Documentation
¶
Index ¶
- func AdminImportPhonebookCSV(c *gin.Context)
- func AdminReloadProfiles(c *gin.Context)
- func BuildUserJWTClaims(opts UserJWTOptions) jwtv5.MapClaims
- func CheckPersistentToken(c *gin.Context)
- func CheckSummaryByUniqueID(c *gin.Context)
- func CreatePersistentToken(c *gin.Context)
- func DeleteExpiredTokens()
- func DeleteSummaryByUniqueID(c *gin.Context)
- func Disable2FA(c *gin.Context)
- func Get2FARecoveryCodes(c *gin.Context)
- func Get2FAStatus(c *gin.Context)
- func GetFilteredHistory(c *gin.Context)
- func GetSummaryByUniqueID(c *gin.Context)
- func GetTranscriptionByUniqueID(c *gin.Context)
- func GetUserStatus(username string) (string, error)
- func ImportPhonebookCSV(c *gin.Context)
- func IssueUserJWT(opts UserJWTOptions) (jwtv5.MapClaims, string, error)
- func ListSummaryStatus(c *gin.Context)
- func ListVoicemailByID(c *gin.Context)
- func PhoneIslandTokenCheck(c *gin.Context)
- func PhoneIslandTokenLogin(c *gin.Context)
- func PhoneIslandTokenRemove(c *gin.Context)
- func ProxyV1Request(c *gin.Context, path string, allowAnonymous bool)
- func QRCode(c *gin.Context)
- func RemovePersistentToken(c *gin.Context)
- func UpdateSummaryByUniqueID(c *gin.Context)
- func VerifyOTP(c *gin.Context)
- func VerifyUserPassword(username, password string) bool
- func WatchCallSummary(c *gin.Context)
- type CallMetadata
- type PhonebookImportResponse
- type SummaryDrawer
- type SummaryListItem
- type SummaryStatusLookup
- type SummaryUpdateRequest
- type SummaryWatchRequest
- type TranscriptionDrawer
- type UserInfo
- type UserJWTOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminImportPhonebookCSV ¶ added in v0.4.5
AdminImportPhonebookCSV handles CSV phonebook imports for admin users. Admin can import contacts into any target user's phonebook by specifying the username form field. Requires super admin bearer token authentication.
func AdminReloadProfiles ¶ added in v0.4.5
AdminReloadProfiles reloads profiles and users globally via super admin API endpoint
func BuildUserJWTClaims ¶ added in v0.5.0
func BuildUserJWTClaims(opts UserJWTOptions) jwtv5.MapClaims
BuildUserJWTClaims builds the canonical final JWT claims set for a user.
func CheckPersistentToken ¶ added in v0.4.5
CheckPersistentToken checks if at least one valid integration token exists for the requested audience.
func CheckSummaryByUniqueID ¶ added in v0.5.0
CheckSummaryByUniqueID verifies whether a non-deleted summary exists for the given uniqueid. It is intended for HEAD endpoints and returns status only (no response body).
func CreatePersistentToken ¶ added in v0.4.5
CreatePersistentToken creates a JWT integration token for the requested audience.
func DeleteExpiredTokens ¶ added in v0.0.3
func DeleteExpiredTokens()
func DeleteSummaryByUniqueID ¶ added in v0.5.0
DeleteSummaryByUniqueID removes the summary for the given uniqueid.
func Disable2FA ¶ added in v0.0.3
Disable2FA disables two-factor authentication for the user
func Get2FARecoveryCodes ¶ added in v0.0.3
Get2FARecoveryCodes retrieves the recovery codes for the user
func Get2FAStatus ¶ added in v0.0.3
Test2FAStatus checks if 2FA is enabled for the user
func GetFilteredHistory ¶ added in v0.5.0
GetFilteredHistory returns history rows filtered server-side by voicemail, summary or transcription and keeps count/pagination consistent.
func GetSummaryByUniqueID ¶ added in v0.5.0
GetSummaryByUniqueID returns the summary for the given uniqueid.
func GetTranscriptionByUniqueID ¶ added in v0.5.0
GetTranscriptionByUniqueID returns the transcription for the given uniqueid.
func GetUserStatus ¶ added in v0.0.3
GetUserStatus retrieves the 2FA status for the user
func ImportPhonebookCSV ¶ added in v0.4.5
ImportPhonebookCSV handles CSV phonebook imports for the authenticated user. Requires JWT bearer token authentication.
func IssueUserJWT ¶ added in v0.5.0
func IssueUserJWT(opts UserJWTOptions) (jwtv5.MapClaims, string, error)
IssueUserJWT builds and signs a canonical user JWT in one place.
func ListSummaryStatus ¶ added in v0.5.0
ListSummaryStatus returns the list of summary/transcription status for user's calls.
func ListVoicemailByID ¶ added in v0.5.0
ListVoicemailByID returns a single voicemail by DB id when :id is numeric. For legacy list types such as "all", "old" or "inbox", it transparently falls back to the V1 voicemail endpoint to preserve existing behavior.
func PhoneIslandTokenCheck ¶ added in v0.0.3
PhoneIslandTokenCheck is a legacy compatibility endpoint. Historically this endpoint checked the phone-island integration token existence.
func PhoneIslandTokenLogin ¶ added in v0.0.3
PhoneIslandTokenLogin is a legacy compatibility endpoint. It maps legacy subtype values to the new persistent token audiences.
func PhoneIslandTokenRemove ¶ added in v0.0.3
PhoneIslandTokenRemove is a legacy compatibility endpoint. It maps legacy subtype values to the new persistent token audiences.
func ProxyV1Request ¶
ProxyV1Request forwards requests to the legacy V1 API
func RemovePersistentToken ¶ added in v0.4.5
RemovePersistentToken revokes all integration JWTs for the requested audience.
func UpdateSummaryByUniqueID ¶ added in v0.5.0
UpdateSummaryByUniqueID updates the summary for the given uniqueid.
func VerifyUserPassword ¶ added in v0.2.0
VerifyUserPassword verifies a user's password against NetCTI server
func WatchCallSummary ¶ added in v0.5.0
WatchCallSummary starts watching for a summary in the satellite transcripts table.
Types ¶
type CallMetadata ¶ added in v0.5.0
type PhonebookImportResponse ¶ added in v0.4.5
type PhonebookImportResponse struct {
Message string `json:"message"`
TotalRows int `json:"total_rows"`
ImportedRows int `json:"imported_rows"`
FailedRows int `json:"failed_rows"`
SkippedRows int `json:"skipped_rows"`
ErrorMessages []string `json:"error_messages,omitempty"`
}
PhonebookImportResponse represents the response from a CSV import
type SummaryDrawer ¶ added in v0.5.0
type SummaryDrawer struct {
UniqueID string `json:"uniqueid"`
Summary string `json:"summary"`
Sentiment *int `json:"sentiment,omitempty"`
State string `json:"state"`
Src string `json:"src,omitempty"`
Dst string `json:"dst,omitempty"`
CNam string `json:"cnam,omitempty"`
Company string `json:"company,omitempty"`
DstCompany string `json:"dst_company,omitempty"`
DstCNam string `json:"dst_cnam,omitempty"`
CallTimestamp *time.Time `json:"call_timestamp,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
}
type SummaryListItem ¶ added in v0.5.0
type SummaryListItem struct {
ID int64 `json:"id,omitempty"`
LinkedID string `json:"linkedid,omitempty"`
UniqueID string `json:"uniqueid"`
State string `json:"state"`
HasTranscription bool `json:"has_transcription"`
HasSummary bool `json:"has_summary"`
SrcNumber string `json:"src_number,omitempty"`
DstNumber string `json:"dst_number,omitempty"`
// DurationSeconds is the wall-clock length of this conversation segment, set by
// the satellite for transfer sub-legs (consultation / post-transfer) that have
// no CDR row of their own for every participant. Lets the UI render a real
// duration instead of 00:00:00. Nil when unknown.
DurationSeconds *int `json:"duration_seconds,omitempty"`
// Extra marks a conversation surfaced in addition to the requested history
// row (e.g. the consultation leg of a transfer). The frontend renders these
// as their own conversation rows, keyed by id (not uniqueid, which they may
// share with the main leg).
Extra bool `json:"extra,omitempty"`
UpdatedAt *time.Time `json:"updated_at"`
}
type SummaryStatusLookup ¶ added in v0.5.3
type SummaryUpdateRequest ¶ added in v0.5.0
type SummaryUpdateRequest struct {
Summary string `json:"summary"`
}
type SummaryWatchRequest ¶ added in v0.5.0
type TranscriptionDrawer ¶ added in v0.5.0
type TranscriptionDrawer struct {
UniqueID string `json:"uniqueid"`
Transcription string `json:"transcription"`
Src string `json:"src,omitempty"`
CNum string `json:"cnum,omitempty"`
CNam string `json:"cnam,omitempty"`
Company string `json:"company,omitempty"`
CCompany string `json:"ccompany,omitempty"`
DstCompany string `json:"dst_company,omitempty"`
DstCNam string `json:"dst_cnam,omitempty"`
Dst string `json:"dst,omitempty"`
CallTimestamp *time.Time `json:"call_timestamp,omitempty"`
CreatedAt *time.Time `json:"created_at"`
}
type UserInfo ¶ added in v0.3.0
UserInfo contains the user data needed by transcript authorization checks.
func GetUserInfo ¶ added in v0.3.0
GetUserInfo keeps compatibility with existing transcript checks by resolving the in-memory session token back to the local user/profile store.