Documentation
¶
Overview ¶
Package manager is the babelforce manager SDK for Go.
It provides an intuitive, hand-written client over the babelforce manager APIs — auth, user & agent management, call reporting, metrics, and task automations. Configure one ManagerClient with Connect, authenticate once, and use its resource namespaces.
mgr, err := manager.Connect(ctx, manager.Options{
Auth: manager.ClientCredentials(clientID, clientSecret),
})
for user, err := range mgr.Users.List(ctx, manager.ListUsersQuery{}) {
if err != nil { return err }
fmt.Println(user.Email)
}
The low-level clients under gen/ are generated from the OpenAPI specs and are an internal detail; this package is the public surface.
Index ¶
- Constants
- func BuildAuthorizeURL(p AuthorizeURLParams) string
- type APIError
- type AgentGroupsResource
- func (r *AgentGroupsResource) AddAgent(ctx context.Context, groupID, agentID string) (*managerapi.AgentGroupAdditionResponse, error)
- func (r *AgentGroupsResource) BulkDelete(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *AgentGroupsResource) Create(ctx context.Context, body managerapi.RestCreateAgentGroup) (*managerapi.AgentGroupItemResponse, error)
- func (r *AgentGroupsResource) Delete(ctx context.Context, id string) error
- func (r *AgentGroupsResource) Get(ctx context.Context, id string) (*managerapi.AgentGroupItemResponse, error)
- func (r *AgentGroupsResource) List(ctx context.Context, pageSize int) iter.Seq2[managerapi.AgentGroup, error]
- func (r *AgentGroupsResource) ListAgents(ctx context.Context, groupID string, params managerapi.ListAgentsInGroupParams) iter.Seq2[managerapi.Agent, error]
- func (r *AgentGroupsResource) ListAll(ctx context.Context, pageSize int) ([]managerapi.AgentGroup, error)
- func (r *AgentGroupsResource) RemoveAgent(ctx context.Context, groupID, agentID string) (*managerapi.AgentGroupItemResponse, error)
- func (r *AgentGroupsResource) Update(ctx context.Context, id string, body managerapi.RestUpdateAgentGroup) (*managerapi.AgentGroupItemResponse, error)
- type AgentsResource
- func (r *AgentsResource) AllLogs(ctx context.Context, params managerapi.ListAllAgentLogsParams) iter.Seq2[managerapi.AgentLogEntry, error]
- func (r *AgentsResource) AvailableStatuses(ctx context.Context) (*managerapi.AgentAvailabilityListResponse, error)
- func (r *AgentsResource) BulkAction(ctx context.Context, action string, body managerapi.AgentBulkRequest) (*managerapi.AgentBulkResponse, error)
- func (r *AgentsResource) Create(ctx context.Context, body managerapi.RestCreateAgent) (*managerapi.AgentItemResponse, error)
- func (r *AgentsResource) CreatePresence(ctx context.Context, body managerapi.AgentPresenceWriteBody) (*managerapi.AgentPresenceItemResponse, error)
- func (r *AgentsResource) Delete(ctx context.Context, id string) error
- func (r *AgentsResource) DeletePresence(ctx context.Context, name string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *AgentsResource) Disable(ctx context.Context, id string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *AgentsResource) Enable(ctx context.Context, id string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *AgentsResource) Export(ctx context.Context, format string) ([]byte, error)
- func (r *AgentsResource) Get(ctx context.Context, id string) (*managerapi.AgentItemResponse, error)
- func (r *AgentsResource) GetImportJob(ctx context.Context, id string) (*managerapi.AgentImportJobItemResponse, error)
- func (r *AgentsResource) GetPresence(ctx context.Context, name string) (*managerapi.AgentPresenceItemResponse, error)
- func (r *AgentsResource) GetStatus(ctx context.Context, id string) (*managerapi.AgentTotalStatusResponse, error)
- func (r *AgentsResource) HangupCall(ctx context.Context, id string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *AgentsResource) Import(ctx context.Context, contentType string, body io.Reader, ...) (*managerapi.AgentImportValidationResults, error)
- func (r *AgentsResource) List(ctx context.Context, q ListAgentsQuery) iter.Seq2[managerapi.Agent, error]
- func (r *AgentsResource) ListAll(ctx context.Context, q ListAgentsQuery) ([]managerapi.Agent, error)
- func (r *AgentsResource) Logs(ctx context.Context, id string, params managerapi.ListAgentLogsParams) iter.Seq2[managerapi.AgentLogEntry, error]
- func (r *AgentsResource) Presences(ctx context.Context) (*managerapi.AgentPresenceListResponse, error)
- func (r *AgentsResource) Push(ctx context.Context, body managerapi.AgentPushRequest) (*managerapi.DefaultV2MessageResponse, error)
- func (r *AgentsResource) Update(ctx context.Context, id string, body managerapi.RestUpdateAgent) (*managerapi.AgentItemResponse, error)
- func (r *AgentsResource) UpdatePassword(ctx context.Context, id string, body managerapi.AgentPasswordUpdateRequest) (*managerapi.DefaultV2MessageResponse, error)
- func (r *AgentsResource) UpdatePresence(ctx context.Context, name string, body managerapi.AgentPresenceWriteBody) (*managerapi.AgentPresenceItemResponse, error)
- func (r *AgentsResource) UpdateStatus(ctx context.Context, id string, status managerapi.UpdateAgentStatusRequest) (*managerapi.AgentStatus, error)
- func (r *AgentsResource) ValidateImport(ctx context.Context, contentType string, body io.Reader) (*managerapi.AgentImportValidationResults, error)
- type AppActionsResource
- func (r *AppActionsResource) Create(ctx context.Context, applicationID string, ...) (*managerapi.LocalAutomationItemResponse, error)
- func (r *AppActionsResource) Delete(ctx context.Context, applicationID, id string) error
- func (r *AppActionsResource) Get(ctx context.Context, applicationID, id string) (*managerapi.LocalAutomationItemResponse, error)
- func (r *AppActionsResource) List(ctx context.Context, applicationID string, pageSize int) iter.Seq2[managerapi.LocalAutomation, error]
- func (r *AppActionsResource) ListAll(ctx context.Context, applicationID string, pageSize int) ([]managerapi.LocalAutomation, error)
- func (r *AppActionsResource) Update(ctx context.Context, applicationID, id string, ...) (*managerapi.LocalAutomationItemResponse, error)
- type AppSettings
- type ApplicationView
- type ApplicationsResource
- func (r *ApplicationsResource) AllLocalAutomations(ctx context.Context, params managerapi.ListAllLocalAutomationsParams) iter.Seq2[managerapi.LocalAutomation, error]
- func (r *ApplicationsResource) BulkUpdate(ctx context.Context, body managerapi.BulkUpdateApplicationsRequest) (*managerapi.DefaultV2MessageResponse, error)
- func (r *ApplicationsResource) Clone(ctx context.Context, id string) (*managerapi.ApplicationItemResponse, error)
- func (r *ApplicationsResource) Create(ctx context.Context, body managerapi.ApplicationCreateBody) (*managerapi.ApplicationItemResponse, error)
- func (r *ApplicationsResource) Delete(ctx context.Context, id string) error
- func (r *ApplicationsResource) DeleteMany(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *ApplicationsResource) Dispatch(ctx context.Context, id, position string, async bool, ...) (*managerapi.DispatchLocalAutomationsResponse, error)
- func (r *ApplicationsResource) Get(ctx context.Context, id string) (*managerapi.ApplicationItemResponse, error)
- func (r *ApplicationsResource) List(ctx context.Context, q ListApplicationsQuery) iter.Seq2[managerapi.Application, error]
- func (r *ApplicationsResource) ListActions(ctx context.Context) (*managerapi.ObjectListResponse, error)
- func (r *ApplicationsResource) ListAll(ctx context.Context, q ListApplicationsQuery) ([]managerapi.Application, error)
- func (r *ApplicationsResource) ListErrors(ctx context.Context) (*managerapi.ObjectListResponse, error)
- func (r *ApplicationsResource) ListModules(ctx context.Context) (*managerapi.ListModulesResponse, error)
- func (r *ApplicationsResource) Update(ctx context.Context, id string, body managerapi.ApplicationUpdateBody) (*managerapi.ApplicationItemResponse, error)
- type AuditSettings
- type Auth
- func Bearer(token string) Auth
- func ClientCredentials(clientID, clientSecret string) Auth
- func Password(user, pass string) Auth
- func PasswordWithClientID(user, pass, clientID string) Auth
- func RefreshToken(refreshToken, clientID string) Auth
- func RefreshTokenWithSecret(refreshToken, clientID, clientSecret string) Auth
- type AuthResource
- func (r *AuthResource) Authorize(ctx context.Context, params authapi.AuthorizeParams) (*authapi.AuthorizeHTTPResp, error)
- func (r *AuthResource) Revoke(ctx context.Context, body authapi.OAuthRevokeRequest) error
- func (r *AuthResource) Token(ctx context.Context, body authapi.OAuthTokenRequest) (*authapi.OAuthTokenResponse, error)
- type AuthorizeURLParams
- type AutomationsResource
- func (r *AutomationsResource) BulkDelete(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *AutomationsResource) BulkUpdate(ctx context.Context, body managerapi.BulkUpdateRequest) (*managerapi.ObjectListResponse, error)
- func (r *AutomationsResource) Clone(ctx context.Context, id string) (*managerapi.GlobalAutomationItemResponse, error)
- func (r *AutomationsResource) Create(ctx context.Context, body managerapi.RestCreateGlobalAutomation) (*managerapi.GlobalAutomationItemResponse, error)
- func (r *AutomationsResource) Delete(ctx context.Context, id string) error
- func (r *AutomationsResource) Dispatch(ctx context.Context, eventTriggerID string, ...) (map[string]any, error)
- func (r *AutomationsResource) Get(ctx context.Context, id string) (*managerapi.GlobalAutomationItemResponse, error)
- func (r *AutomationsResource) List(ctx context.Context, params managerapi.ListGlobalAutomationsParams) iter.Seq2[managerapi.GlobalAutomation, error]
- func (r *AutomationsResource) ListAll(ctx context.Context, params managerapi.ListGlobalAutomationsParams) ([]managerapi.GlobalAutomation, error)
- func (r *AutomationsResource) Update(ctx context.Context, id string, body managerapi.RestUpdateGlobalAutomation) (*managerapi.GlobalAutomationItemResponse, error)
- type BabeldeskResource
- func (r *BabeldeskResource) Create(ctx context.Context, body managerapi.RestCreateBabeldesk) (*managerapi.BabeldeskItemResponse, error)
- func (r *BabeldeskResource) Delete(ctx context.Context, id string) error
- func (r *BabeldeskResource) Get(ctx context.Context, id string) (*managerapi.BabeldeskItemResponse, error)
- func (r *BabeldeskResource) List(ctx context.Context, params managerapi.ListBabeldesksParams) iter.Seq2[managerapi.Babeldesk, error]
- func (r *BabeldeskResource) ListAll(ctx context.Context, params managerapi.ListBabeldesksParams) ([]managerapi.Babeldesk, error)
- func (r *BabeldeskResource) Update(ctx context.Context, id string, body managerapi.RestUpdateBabeldesk) (*managerapi.BabeldeskItemResponse, error)
- func (r *BabeldeskResource) WidgetSettings(ctx context.Context, widgetType string) (*managerapi.WidgetSettingsResponse, error)
- type BabeldeskWidgetsResource
- func (r *BabeldeskWidgetsResource) Create(ctx context.Context, body managerapi.RestCreateBabeldeskWidget) (*managerapi.BabeldeskWidgetItemResponse, error)
- func (r *BabeldeskWidgetsResource) Delete(ctx context.Context, id string) error
- func (r *BabeldeskWidgetsResource) Get(ctx context.Context, id string) (*managerapi.BabeldeskWidgetItemResponse, error)
- func (r *BabeldeskWidgetsResource) List(ctx context.Context, params managerapi.ListBabeldeskWidgetsParams) iter.Seq2[managerapi.BabeldeskWidget, error]
- func (r *BabeldeskWidgetsResource) ListAll(ctx context.Context, params managerapi.ListBabeldeskWidgetsParams) ([]managerapi.BabeldeskWidget, error)
- func (r *BabeldeskWidgetsResource) Update(ctx context.Context, id string, body managerapi.RestUpdateBabeldeskWidget) (*managerapi.BabeldeskWidgetItemResponse, error)
- type BusinessHoursResource
- func (r *BusinessHoursResource) AddRanges(ctx context.Context, id string, body managerapi.BusinessHourRangesBody) (*managerapi.BusinessHourItemResponse, error)
- func (r *BusinessHoursResource) BulkDelete(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *BusinessHoursResource) BulkUpdate(ctx context.Context, body managerapi.BusinessHourBulkUpdateRequest) (*managerapi.BusinessHourListResponse, error)
- func (r *BusinessHoursResource) Create(ctx context.Context, body managerapi.RestCreateBusinessHour) (*managerapi.BusinessHourItemResponse, error)
- func (r *BusinessHoursResource) Delete(ctx context.Context, id string) error
- func (r *BusinessHoursResource) Get(ctx context.Context, id string) (*managerapi.BusinessHourItemResponse, error)
- func (r *BusinessHoursResource) GetRange(ctx context.Context, id, rangeID string) (*managerapi.BusinessHourRangeItemResponse, error)
- func (r *BusinessHoursResource) List(ctx context.Context, params managerapi.ListBusinessHoursParams) iter.Seq2[managerapi.BusinessHour, error]
- func (r *BusinessHoursResource) ListAll(ctx context.Context, params managerapi.ListBusinessHoursParams) ([]managerapi.BusinessHour, error)
- func (r *BusinessHoursResource) ListRanges(ctx context.Context, id string) (*managerapi.BusinessHourRangeListResponse, error)
- func (r *BusinessHoursResource) RemoveRange(ctx context.Context, id, rangeID string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *BusinessHoursResource) Update(ctx context.Context, id string, body managerapi.RestUpdateBusinessHour) (*managerapi.BusinessHourItemResponse, error)
- type CalendarsResource
- func (r *CalendarsResource) AddDate(ctx context.Context, id string, body managerapi.AddCalendarDateJSONRequestBody) (*managerapi.CalendarDateItemResponse, error)
- func (r *CalendarsResource) BulkDelete(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *CalendarsResource) BulkUpdate(ctx context.Context, body managerapi.CalendarBulkUpdateRequest) (*managerapi.CalendarListResponse, error)
- func (r *CalendarsResource) Create(ctx context.Context, body managerapi.RestCreateCalendar) (*managerapi.CalendarItemResponse, error)
- func (r *CalendarsResource) Delete(ctx context.Context, id string) error
- func (r *CalendarsResource) Get(ctx context.Context, id string) (*managerapi.CalendarItemResponse, error)
- func (r *CalendarsResource) GetDate(ctx context.Context, id, dateID string) (*managerapi.CalendarDateItemResponse, error)
- func (r *CalendarsResource) GetDates(ctx context.Context, id string) ([]managerapi.CalendarDate, error)
- func (r *CalendarsResource) List(ctx context.Context, params managerapi.ListCalendarsParams) iter.Seq2[managerapi.Calendar, error]
- func (r *CalendarsResource) ListAll(ctx context.Context, params managerapi.ListCalendarsParams) ([]managerapi.Calendar, error)
- func (r *CalendarsResource) RemoveDate(ctx context.Context, id, dateID string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *CalendarsResource) TestDate(ctx context.Context, date *string) (*managerapi.GenericItemResponse, error)
- func (r *CalendarsResource) Update(ctx context.Context, id string, body managerapi.RestUpdateCalendar) (*managerapi.CalendarItemResponse, error)
- func (r *CalendarsResource) UpdateDate(ctx context.Context, id, dateID string, body managerapi.CalendarDateBody) (*managerapi.CalendarDateItemResponse, error)
- type CallsResource
- func (r *CallsResource) Cancel(ctx context.Context, id string) (*managerapi.CallItemResponse, error)
- func (r *CallsResource) CreateTestCall(ctx context.Context, body managerapi.CreateTestCall) (*managerapi.CallItemResponse, error)
- func (r *CallsResource) Get(ctx context.Context, id string) (*managerapi.CallItemResponse, error)
- func (r *CallsResource) Hangup(ctx context.Context, id string) (*managerapi.CallItemResponse, error)
- func (r *CallsResource) ListQueued(ctx context.Context, queueID string, params managerapi.ListQueuedCallsParams) iter.Seq2[managerapi.QueuedCall, error]
- func (r *CallsResource) QueueCallback(ctx context.Context, queueID string, body managerapi.QueueCallbackRequest) (*managerapi.QueueCallbackResponse, error)
- func (r *CallsResource) SetSessionVariables(ctx context.Context, id string, ...) (*managerapi.SetCallSessionVariablesResponse, error)
- type CampaignsResource
- func (r *CampaignsResource) Attempts(ctx context.Context, id string, params *managerapi.ListCampaignAttemptsParams) (*managerapi.PaginatedAttemptResponse, error)
- func (r *CampaignsResource) Create(ctx context.Context, body managerapi.CreateCampaignRequest) (*managerapi.OutboundCampaignItemResponse, error)
- func (r *CampaignsResource) Delete(ctx context.Context, id string) error
- func (r *CampaignsResource) Get(ctx context.Context, id string) (*managerapi.OutboundCampaignItemResponse, error)
- func (r *CampaignsResource) GetList(ctx context.Context, id string) (*managerapi.LeadListItemResponse, error)
- func (r *CampaignsResource) Hopper(ctx context.Context, id string) (*managerapi.CampaignHopperResponse, error)
- func (r *CampaignsResource) Leads(ctx context.Context, id string) (*managerapi.PaginatedLeadResponse, error)
- func (r *CampaignsResource) List(ctx context.Context) ([]managerapi.OutboundCampaign, error)
- func (r *CampaignsResource) LogoutAllAgents(ctx context.Context, id string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *CampaignsResource) ProcessedLeads(ctx context.Context, id string) (*managerapi.PaginatedLeadResponse, error)
- func (r *CampaignsResource) SetList(ctx context.Context, id string, body managerapi.SetCampaignListRequest) (*managerapi.CampaignItemResponse, error)
- func (r *CampaignsResource) SetListById(ctx context.Context, id string, listID string) (*managerapi.CampaignItemResponse, error)
- func (r *CampaignsResource) Statistics(ctx context.Context, id string, params *managerapi.GetCampaignStatisticsParams) (*managerapi.CampaignStatisticsResponse, error)
- func (r *CampaignsResource) Status(ctx context.Context, id string) (*managerapi.CampaignRealtimeStatusResponse, error)
- func (r *CampaignsResource) UnsetList(ctx context.Context, id string) (*managerapi.CampaignItemResponse, error)
- func (r *CampaignsResource) Update(ctx context.Context, id string, body managerapi.UpdateCampaignRequest) (*managerapi.OutboundCampaignItemResponse, error)
- type ConferencesResource
- func (r *ConferencesResource) Get(ctx context.Context, id string) (*managerapi.ConferenceItemResponse, error)
- func (r *ConferencesResource) List(ctx context.Context, params managerapi.ListConferencesParams) iter.Seq2[managerapi.Conference, error]
- func (r *ConferencesResource) ListAll(ctx context.Context, params managerapi.ListConferencesParams) ([]managerapi.Conference, error)
- type ConversationsResource
- func (r *ConversationsResource) AddEvent(ctx context.Context, conversationID string, ...) (*managerapi.ConversationEventItemResponse, error)
- func (r *ConversationsResource) AllEvents(ctx context.Context, params managerapi.ListAllConversationEventsParams) iter.Seq2[managerapi.ConversationEvent, error]
- func (r *ConversationsResource) Close(ctx context.Context, conversationID string) (*managerapi.ConversationItemResponse, error)
- func (r *ConversationsResource) Create(ctx context.Context, body managerapi.RestCreateConversation) (*managerapi.ConversationItemResponse, error)
- func (r *ConversationsResource) Delete(ctx context.Context, id string) error
- func (r *ConversationsResource) Events(ctx context.Context, conversationID string) ([]managerapi.ConversationEvent, error)
- func (r *ConversationsResource) FirstEvent(ctx context.Context, conversationID string) (*managerapi.ConversationEventItemResponse, error)
- func (r *ConversationsResource) Get(ctx context.Context, id string) (*managerapi.ConversationItemResponse, error)
- func (r *ConversationsResource) GetSession(ctx context.Context, conversationID string) (*managerapi.ConversationSessionVariablesItemResponse, error)
- func (r *ConversationsResource) LatestEvent(ctx context.Context, conversationID string) (*managerapi.ConversationEventItemResponse, error)
- func (r *ConversationsResource) List(ctx context.Context, params managerapi.ListConversationsParams) iter.Seq2[managerapi.Conversation, error]
- func (r *ConversationsResource) ListAll(ctx context.Context, params managerapi.ListConversationsParams) ([]managerapi.Conversation, error)
- func (r *ConversationsResource) Open(ctx context.Context, conversationID string) (*managerapi.ConversationItemResponse, error)
- func (r *ConversationsResource) Update(ctx context.Context, id string, body managerapi.RestUpdateConversation) (*managerapi.ConversationItemResponse, error)
- func (r *ConversationsResource) UpdateSession(ctx context.Context, conversationID string, ...) (*managerapi.ConversationSessionVariablesItemResponse, error)
- type DashboardsResource
- func (r *DashboardsResource) AddUser(ctx context.Context, id, email string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *DashboardsResource) Create(ctx context.Context, body managerapi.DashboardCreateBody) (*managerapi.DashboardItemResponse, error)
- func (r *DashboardsResource) Delete(ctx context.Context, id string) error
- func (r *DashboardsResource) Get(ctx context.Context, id string) (*managerapi.DashboardItemResponse, error)
- func (r *DashboardsResource) List(ctx context.Context, params managerapi.ListDashboardsParams) iter.Seq2[managerapi.Dashboard, error]
- func (r *DashboardsResource) ListAll(ctx context.Context, params managerapi.ListDashboardsParams) ([]managerapi.Dashboard, error)
- func (r *DashboardsResource) ListUsers(ctx context.Context, id string) (*managerapi.DashboardUsersResponse, error)
- func (r *DashboardsResource) RemoveUser(ctx context.Context, id, userId string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *DashboardsResource) Update(ctx context.Context, id string, body managerapi.DashboardUpdateBody) (*managerapi.DashboardItemResponse, error)
- type DialerBehavioursResource
- func (r *DialerBehavioursResource) Create(ctx context.Context, body managerapi.DialerBehaviourWriteBody) (*managerapi.DialerBehaviourItemResponse, error)
- func (r *DialerBehavioursResource) Delete(ctx context.Context, id string) error
- func (r *DialerBehavioursResource) Get(ctx context.Context, id string) (*managerapi.DialerBehaviourItemResponse, error)
- func (r *DialerBehavioursResource) List(ctx context.Context, pageSize int) iter.Seq2[managerapi.DialerBehaviour, error]
- func (r *DialerBehavioursResource) ListAll(ctx context.Context, pageSize int) ([]managerapi.DialerBehaviour, error)
- func (r *DialerBehavioursResource) Update(ctx context.Context, id string, body managerapi.DialerBehaviourWriteBody) (*managerapi.DialerBehaviourItemResponse, error)
- type DialerResource
- func (r *DialerResource) Flush(ctx context.Context, id *string, all *bool) (*managerapi.DefaultV2MessageResponse, error)
- func (r *DialerResource) Info(ctx context.Context) (*managerapi.GenericItemResponse, error)
- func (r *DialerResource) SimpleReporting(ctx context.Context, params managerapi.ListDialerSimpleReportingCallsParams) iter.Seq2[managerapi.ReportingCall, error]
- func (r *DialerResource) SimpleReportingAll(ctx context.Context, params managerapi.ListDialerSimpleReportingCallsParams) ([]managerapi.ReportingCall, error)
- type EventsResource
- type ExpressionsResource
- type FilesResource
- func (r *FilesResource) Backups(ctx context.Context) ([]managerapi.StoredFile, error)
- func (r *FilesResource) BulkDelete(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *FilesResource) BulkDownload(ctx context.Context, ids []string) ([]byte, error)
- func (r *FilesResource) BulkDownloadPost(ctx context.Context, ids []string) ([]byte, error)
- func (r *FilesResource) Delete(ctx context.Context, id string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *FilesResource) Download(ctx context.Context, id string) ([]byte, error)
- func (r *FilesResource) Get(ctx context.Context, id string) (*managerapi.StoredFileItemResponse, error)
- func (r *FilesResource) List(ctx context.Context, params managerapi.ListFilesParams) iter.Seq2[managerapi.StoredFile, error]
- func (r *FilesResource) ListAll(ctx context.Context, params managerapi.ListFilesParams) ([]managerapi.StoredFile, error)
- func (r *FilesResource) ListByType(ctx context.Context, fileType managerapi.StorageType) ([]managerapi.StoredFile, error)
- func (r *FilesResource) Prompts(ctx context.Context) ([]managerapi.StoredFile, error)
- func (r *FilesResource) Recordings(ctx context.Context) ([]managerapi.StoredFile, error)
- type IntegrationsResource
- func (r *IntegrationsResource) APIProxyGet(ctx context.Context, integrationID, uri string) ([]byte, error)
- func (r *IntegrationsResource) APIProxyPost(ctx context.Context, integrationID, uri string, body map[string]any) ([]byte, error)
- func (r *IntegrationsResource) ActionVariables(ctx context.Context, provider managerapi.IntegrationProvider, ...) (*managerapi.VariableDefinitionItemsResponse, error)
- func (r *IntegrationsResource) AddAssociation(ctx context.Context, integrationID, associationID, actionName string) (*managerapi.IntegrationAddAssociationResponse, error)
- func (r *IntegrationsResource) Authorize(ctx context.Context, id string, body map[string]any) (*managerapi.IntegrationItemResponse, error)
- func (r *IntegrationsResource) Available(ctx context.Context) (*managerapi.IntegrationListAvailableIntegrationsResponse, error)
- func (r *IntegrationsResource) BulkDelete(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *IntegrationsResource) BulkUpdate(ctx context.Context, body managerapi.BulkUpdateIntegrationsRequest) (*managerapi.DefaultV2MessageResponse, error)
- func (r *IntegrationsResource) Clone(ctx context.Context, id string) (*managerapi.IntegrationItemResponse, error)
- func (r *IntegrationsResource) Create(ctx context.Context, body managerapi.IntegrationCreateRequest) (*managerapi.IntegrationItemResponse, error)
- func (r *IntegrationsResource) Delete(ctx context.Context, id string) error
- func (r *IntegrationsResource) DeleteToken(ctx context.Context, id, tokenID string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *IntegrationsResource) DispatchAction(ctx context.Context, integrationID, action string, ...) (*managerapi.IntegrationDispatchActionResponse, error)
- func (r *IntegrationsResource) DispatchActionGet(ctx context.Context, integrationID, action string, ...) (*managerapi.IntegrationDispatchActionResponse, error)
- func (r *IntegrationsResource) DispatchTypeAction(ctx context.Context, typ, id, action string, body map[string]any) (*map[string]any, error)
- func (r *IntegrationsResource) ExecuteAction(ctx context.Context, actionType, actionName string, body map[string]any) (*managerapi.DefaultV2MessageResponse, error)
- func (r *IntegrationsResource) Get(ctx context.Context, id string) (*managerapi.IntegrationItemResponse, error)
- func (r *IntegrationsResource) GetToken(ctx context.Context, id, tokenID string) (*managerapi.IntegrationTokenItemResponse, error)
- func (r *IntegrationsResource) Integrate(ctx context.Context, id string, body map[string]any) (*managerapi.IntegrationItemResponse, error)
- func (r *IntegrationsResource) List(ctx context.Context, params managerapi.ListIntegrationsParams) iter.Seq2[managerapi.Integration, error]
- func (r *IntegrationsResource) ListActionParams(ctx context.Context, providerName, providerActionName string) (*managerapi.ObjectListResponse, error)
- func (r *IntegrationsResource) ListActions(ctx context.Context, params managerapi.ListActionsParams) (*managerapi.ObjectListResponse, error)
- func (r *IntegrationsResource) ListAll(ctx context.Context, params managerapi.ListIntegrationsParams) ([]managerapi.Integration, error)
- func (r *IntegrationsResource) ListTokens(ctx context.Context, id string) (*managerapi.IntegrationTokenListResponse, error)
- func (r *IntegrationsResource) ProviderLogo(ctx context.Context, providerName managerapi.IntegrationProvider, size string) (*managerapi.GetIntegrationProviderLogoResponse, error)
- func (r *IntegrationsResource) ProviderSessionVariables(ctx context.Context, provider string) (*managerapi.IntegrationSessionVariableItemsResponse, error)
- func (r *IntegrationsResource) ProviderTemplate(ctx context.Context, provider string) (*map[string]any, error)
- func (r *IntegrationsResource) Providers(ctx context.Context) (*managerapi.IntegrationObjectListResponse, error)
- func (r *IntegrationsResource) RefreshToken(ctx context.Context, id, tokenID string) (*managerapi.IntegrationTokenItemResponse, error)
- func (r *IntegrationsResource) RemoveAssociation(ctx context.Context, integrationID, associationID, actionName string) (*managerapi.IntegrationRemoveAssociationResponse, error)
- func (r *IntegrationsResource) Template(ctx context.Context, typ, provider string) (*map[string]any, error)
- func (r *IntegrationsResource) TypeActions(ctx context.Context, typ string) (*managerapi.IntegrationObjectListResponse, error)
- func (r *IntegrationsResource) Update(ctx context.Context, id string, body managerapi.IntegrationUpdateRequest) (*managerapi.IntegrationItemResponse, error)
- type InterruptTarget
- type ListAgentsQuery
- type ListApplicationsQuery
- type ListTasksQuery
- type ListUsersQuery
- type LogsResource
- func (r *LogsResource) Audit(ctx context.Context, params managerapi.ListAuditLogsParams) iter.Seq2[managerapi.AuditLog, error]
- func (r *LogsResource) AuditAll(ctx context.Context, params managerapi.ListAuditLogsParams) ([]managerapi.AuditLog, error)
- func (r *LogsResource) DisableLive(ctx context.Context) (*managerapi.DefaultV2MessageResponse, error)
- func (r *LogsResource) EnableLive(ctx context.Context) (*managerapi.DefaultV2MessageResponse, error)
- func (r *LogsResource) Live(ctx context.Context) ([]managerapi.LiveLog, error)
- func (r *LogsResource) Write(ctx context.Context, body managerapi.WriteLogRequest) (*managerapi.GenericItemResponse, error)
- type ManagerClient
- type MeResource
- func (r *MeResource) Accounts(ctx context.Context) ([]userapi.Account, error)
- func (r *MeResource) Customer(ctx context.Context) (*userapi.UserCustomerItemResponse, error)
- func (r *MeResource) Get(ctx context.Context) (*userapi.UserItemResponse, error)
- func (r *MeResource) ResetPassword(ctx context.Context) error
- type MetricsResource
- func (r *MetricsResource) Definitions(ctx context.Context) (*managerapi.MetricDefinitionListResponse, error)
- func (r *MetricsResource) Describe(ctx context.Context, id string) (*managerapi.MetricDefinitionItemResponse, error)
- func (r *MetricsResource) Get(ctx context.Context, id string) (*managerapi.MetricResponse, error)
- func (r *MetricsResource) ListIds(ctx context.Context) (*managerapi.MetricIdItemsResponse, error)
- type NumbersResource
- func (r *NumbersResource) AddTags(ctx context.Context, id string, tags []managerapi.Tag) (*managerapi.ServiceNumberItemResponse, error)
- func (r *NumbersResource) Get(ctx context.Context, id string) (*managerapi.ServiceNumberItemResponse, error)
- func (r *NumbersResource) List(ctx context.Context, params managerapi.ListServiceNumbersParams) iter.Seq2[managerapi.ServiceNumber, error]
- func (r *NumbersResource) ListAll(ctx context.Context, params managerapi.ListServiceNumbersParams) ([]managerapi.ServiceNumber, error)
- func (r *NumbersResource) Update(ctx context.Context, id string, body map[string]any) (*managerapi.ServiceNumberItemResponse, error)
- type Options
- type OutboundResource
- func (r *OutboundResource) AddLead(ctx context.Context, listID string, body managerapi.AddOutboundLeadRequest) (*managerapi.OutboundLeadItemResponse, error)
- func (r *OutboundResource) Attempts(ctx context.Context, params managerapi.ListOutboundAttemptsParams) iter.Seq2[managerapi.CallAttempt, error]
- func (r *OutboundResource) AttemptsAll(ctx context.Context, params managerapi.ListOutboundAttemptsParams) ([]managerapi.CallAttempt, error)
- func (r *OutboundResource) BulkDeleteLeads(ctx context.Context, id string, body managerapi.LeadBulkDeleteRequest) (*managerapi.DefaultV2MessageResponse, error)
- func (r *OutboundResource) BulkDeleteLeadsAlt(ctx context.Context, id string, body managerapi.LeadBulkDeleteRequest) (*managerapi.DefaultV2MessageResponse, error)
- func (r *OutboundResource) ClearList(ctx context.Context, id string) (*managerapi.OutboundListItemResponse, error)
- func (r *OutboundResource) CreateAgentCall(ctx context.Context, id string, body managerapi.AgentOutboundCallRequest) (*managerapi.CallItemResponse, error)
- func (r *OutboundResource) CreateList(ctx context.Context, body managerapi.CreateOutboundListRequest) (*managerapi.OutboundListItemResponse, error)
- func (r *OutboundResource) DeleteLead(ctx context.Context, listID, leadID string) error
- func (r *OutboundResource) DeleteList(ctx context.Context, id string) error
- func (r *OutboundResource) GetLead(ctx context.Context, listID, leadID string) (*managerapi.LeadItemResponse, error)
- func (r *OutboundResource) GetList(ctx context.Context, id string) (*managerapi.LeadListItemResponse, error)
- func (r *OutboundResource) Leads(ctx context.Context, params managerapi.ListOutboundLeadsParams) iter.Seq2[managerapi.Lead, error]
- func (r *OutboundResource) LeadsAll(ctx context.Context, params managerapi.ListOutboundLeadsParams) ([]managerapi.Lead, error)
- func (r *OutboundResource) ListLeads(ctx context.Context, listID string, params managerapi.ListLeadsInListParams) (*managerapi.PaginatedLeadResponse, error)
- func (r *OutboundResource) Lists(ctx context.Context) ([]managerapi.OutboundList, error)
- func (r *OutboundResource) ProcessedLeads(ctx context.Context, params managerapi.ListProcessedOutboundLeadsParams) iter.Seq2[managerapi.Lead, error]
- func (r *OutboundResource) ProcessedLeadsAll(ctx context.Context, params managerapi.ListProcessedOutboundLeadsParams) ([]managerapi.Lead, error)
- func (r *OutboundResource) SimpleReporting(ctx context.Context, params managerapi.ListOutboundSimpleReportingCallsParams) iter.Seq2[managerapi.ReportingCall, error]
- func (r *OutboundResource) SimpleReportingAll(ctx context.Context, params managerapi.ListOutboundSimpleReportingCallsParams) ([]managerapi.ReportingCall, error)
- func (r *OutboundResource) UpdateLead(ctx context.Context, listID, leadID string, ...) (*managerapi.OutboundLeadItemResponse, error)
- func (r *OutboundResource) UpdateList(ctx context.Context, id string, body managerapi.CreateListRequest) (*managerapi.LeadListItemResponse, error)
- func (r *OutboundResource) UploadLeads(ctx context.Context, id, filename string, file io.Reader, ...) (*managerapi.LeadUploadResponse, error)
- type PhonebookResource
- func (r *PhonebookResource) BulkDelete(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
- func (r *PhonebookResource) Create(ctx context.Context, body managerapi.RestCreatePhonebookEntry) (*managerapi.PhonebookEntryItemResponse, error)
- func (r *PhonebookResource) Delete(ctx context.Context, id string) error
- func (r *PhonebookResource) Download(ctx context.Context) ([]byte, error)
- func (r *PhonebookResource) Get(ctx context.Context, id string) (*managerapi.PhonebookEntryItemResponse, error)
- func (r *PhonebookResource) List(ctx context.Context, params managerapi.ListPhonebookEntrysParams) iter.Seq2[managerapi.PhonebookEntry, error]
- func (r *PhonebookResource) ListAll(ctx context.Context, params managerapi.ListPhonebookEntrysParams) ([]managerapi.PhonebookEntry, error)
- func (r *PhonebookResource) Update(ctx context.Context, id string, body managerapi.RestUpdatePhonebookEntry) (*managerapi.PhonebookEntryItemResponse, error)
- func (r *PhonebookResource) Upload(ctx context.Context, contentType string, body io.Reader) error
- type PkceChallenge
- type PromptsResource
- func (r *PromptsResource) Delete(ctx context.Context, id string) error
- func (r *PromptsResource) Get(ctx context.Context, id string) (*managerapi.PromptItemResponse, error)
- func (r *PromptsResource) List(ctx context.Context, params managerapi.ListPromptsParams) iter.Seq2[managerapi.Prompt, error]
- func (r *PromptsResource) ListAll(ctx context.Context, params managerapi.ListPromptsParams) ([]managerapi.Prompt, error)
- func (r *PromptsResource) Update(ctx context.Context, id string, body managerapi.RestUpdatePrompt) (*managerapi.PromptItemResponse, error)
- func (r *PromptsResource) Upload(ctx context.Context, contentType string, body io.Reader) (*managerapi.PromptItemResponse, error)
- func (r *PromptsResource) Uses(ctx context.Context, id string) (*managerapi.ObjectListResponse, error)
- type QueueSelectionsResource
- func (r *QueueSelectionsResource) AddAgent(ctx context.Context, queueID, selectionID, agentID string) (*managerapi.QueueSelectionModificationResponse, error)
- func (r *QueueSelectionsResource) AddGroup(ctx context.Context, queueID, selectionID, groupID string) (*managerapi.QueueSelectionModificationResponse, error)
- func (r *QueueSelectionsResource) AddTag(ctx context.Context, queueID, selectionID, tagID string) (*managerapi.QueueSelectionModificationResponse, error)
- func (r *QueueSelectionsResource) Create(ctx context.Context, queueID string, body managerapi.RestCreateQueueSelection) (*managerapi.QueueSelectionItemResponse, error)
- func (r *QueueSelectionsResource) Delete(ctx context.Context, queueID, id string) error
- func (r *QueueSelectionsResource) Get(ctx context.Context, queueID, id string) (*managerapi.QueueSelectionItemResponse, error)
- func (r *QueueSelectionsResource) List(ctx context.Context, queueID string, ...) iter.Seq2[managerapi.QueueSelection, error]
- func (r *QueueSelectionsResource) ListAll(ctx context.Context, queueID string, ...) ([]managerapi.QueueSelection, error)
- func (r *QueueSelectionsResource) RemoveAgent(ctx context.Context, queueID, selectionID, id string) (*managerapi.QueueSelectionModificationResponse, error)
- func (r *QueueSelectionsResource) RemoveGroup(ctx context.Context, queueID, selectionID, id string) (*managerapi.QueueSelectionModificationResponse, error)
- func (r *QueueSelectionsResource) RemoveTag(ctx context.Context, queueID, selectionID, id string) (*managerapi.QueueSelectionModificationResponse, error)
- func (r *QueueSelectionsResource) SelectAgents(ctx context.Context, queueID string) (*managerapi.QueueSelectionResponse, error)
- func (r *QueueSelectionsResource) SetPriority(ctx context.Context, queueID string, ...) (*managerapi.QueueSelectionListResponse, error)
- func (r *QueueSelectionsResource) Update(ctx context.Context, queueID, id string, ...) (*managerapi.QueueSelectionItemResponse, error)
- type QueuesResource
- func (r *QueuesResource) BulkUpdate(ctx context.Context, body managerapi.QueueBulkUpdateRequest) (*managerapi.QueueListResponse, error)
- func (r *QueuesResource) Create(ctx context.Context, body managerapi.RestCreateQueue) (*managerapi.QueueItemResponse, error)
- func (r *QueuesResource) Delete(ctx context.Context, id string) error
- func (r *QueuesResource) Get(ctx context.Context, id string) (*managerapi.QueueItemResponse, error)
- func (r *QueuesResource) GlobalSelections(ctx context.Context) (*managerapi.GlobalQueueSelectionListResponse, error)
- func (r *QueuesResource) List(ctx context.Context, params managerapi.ListQueuesParams) iter.Seq2[managerapi.Queue, error]
- func (r *QueuesResource) ListAll(ctx context.Context, params managerapi.ListQueuesParams) ([]managerapi.Queue, error)
- func (r *QueuesResource) ListTriggers(ctx context.Context, queueID string) (*managerapi.QueueTriggerListResponse, error)
- func (r *QueuesResource) Update(ctx context.Context, id string, body managerapi.RestUpdateQueue) (*managerapi.QueueItemResponse, error)
- type RecordingsResource
- func (r *RecordingsResource) BulkAction(ctx context.Context, action string, ids []string) (*managerapi.BulkActionResponse, error)
- func (r *RecordingsResource) Delete(ctx context.Context, id string) error
- func (r *RecordingsResource) Flag(ctx context.Context, id string) (*managerapi.RecordingItemResponse, error)
- func (r *RecordingsResource) Get(ctx context.Context, id string) (*managerapi.RecordingItemResponse, error)
- func (r *RecordingsResource) GetFlag(ctx context.Context, id string) (*managerapi.RecordingItemResponse, error)
- func (r *RecordingsResource) List(ctx context.Context, params managerapi.ListRecordingsParams) iter.Seq2[managerapi.Recording, error]
- func (r *RecordingsResource) ListAll(ctx context.Context, params managerapi.ListRecordingsParams) ([]managerapi.Recording, error)
- func (r *RecordingsResource) Start(ctx context.Context, body managerapi.RecordingStartRequest) (*managerapi.RecordingItemResponse, error)
- func (r *RecordingsResource) ToggleFlag(ctx context.Context, id string) (*managerapi.RecordingItemResponse, error)
- func (r *RecordingsResource) Unflag(ctx context.Context, id string) (*managerapi.RecordingItemResponse, error)
- func (r *RecordingsResource) Update(ctx context.Context, id string, body managerapi.RecordingUpdateBody) (*managerapi.RecordingItemResponse, error)
- type ReportingResource
- func (r *ReportingResource) InboundSimple(ctx context.Context, params managerapi.ListInboundSimpleReportingCallsParams) iter.Seq2[managerapi.ReportingCall, error]
- func (r *ReportingResource) InboundSimpleAll(ctx context.Context, params managerapi.ListInboundSimpleReportingCallsParams) ([]managerapi.ReportingCall, error)
- func (r *ReportingResource) List(ctx context.Context, params managerapi.ListReportingCallsParams) iter.Seq2[managerapi.Call, error]
- func (r *ReportingResource) ListAll(ctx context.Context, params managerapi.ListReportingCallsParams) ([]managerapi.Call, error)
- func (r *ReportingResource) Simple(ctx context.Context, params managerapi.ListAllSimpleReportingCallsParams) iter.Seq2[managerapi.ReportingCall, error]
- func (r *ReportingResource) SimpleAll(ctx context.Context, params managerapi.ListAllSimpleReportingCallsParams) ([]managerapi.ReportingCall, error)
- type RetentionSettings
- type RetryPolicy
- type RoutingResource
- func (r *RoutingResource) Create(ctx context.Context, body managerapi.RestCreateRouting) (*managerapi.RoutingItemResponse, error)
- func (r *RoutingResource) Delete(ctx context.Context, id string) error
- func (r *RoutingResource) Get(ctx context.Context, id string) (*managerapi.RoutingItemResponse, error)
- func (r *RoutingResource) List(ctx context.Context, params managerapi.ListRoutingsParams) iter.Seq2[managerapi.Routing, error]
- func (r *RoutingResource) ListAll(ctx context.Context, params managerapi.ListRoutingsParams) ([]managerapi.Routing, error)
- func (r *RoutingResource) Update(ctx context.Context, id string, body managerapi.RestUpdateRouting) (*managerapi.RoutingItemResponse, error)
- type SessionsResource
- func (r *SessionsResource) Create(ctx context.Context) (*managerapi.SessionResponse, error)
- func (r *SessionsResource) Get(ctx context.Context, id string) (*managerapi.SessionResponse, error)
- func (r *SessionsResource) UpdateVariables(ctx context.Context, id string, ...) (*managerapi.SessionResponse, error)
- type Setting
- type SettingsResource
- func (r *SettingsResource) Clear(ctx context.Context, scope, key string) (*managerapi.SettingItemResponse, error)
- func (r *SettingsResource) ClearAll(ctx context.Context) (*managerapi.SettingsListResponse, error)
- func (r *SettingsResource) ClearInScope(ctx context.Context, scope string) (*managerapi.SettingsListResponse, error)
- func (r *SettingsResource) ListAll(ctx context.Context) (*managerapi.SettingsListResponse, error)
- func (r *SettingsResource) ListInScope(ctx context.Context, scope string) (*managerapi.SettingsListResponse, error)
- type SmsResource
- func (r *SmsResource) Delete(ctx context.Context, id string) (*managerapi.SmsItemResponse, error)
- func (r *SmsResource) Get(ctx context.Context, id string) (*managerapi.SmsItemResponse, error)
- func (r *SmsResource) List(ctx context.Context, params managerapi.ListSmssParams) iter.Seq2[managerapi.Sms, error]
- func (r *SmsResource) ListAll(ctx context.Context, params managerapi.ListSmssParams) ([]managerapi.Sms, error)
- func (r *SmsResource) Report(ctx context.Context, params managerapi.ReportSmsParams) iter.Seq2[managerapi.Sms, error]
- func (r *SmsResource) Send(ctx context.Context, body managerapi.SmsSendRequest) (*managerapi.SmsItemResponse, error)
- func (r *SmsResource) TestInbound(ctx context.Context, body managerapi.SmsSendRequest) (*managerapi.SmsItemResponse, error)
- type SystemResource
- func (r *SystemResource) ApiStatus(ctx context.Context) (*managerapi.GenericItemResponse, error)
- func (r *SystemResource) Echo(ctx context.Context) (*managerapi.GenericItemResponse, error)
- func (r *SystemResource) ExportTemplates(ctx context.Context, templateType string) (map[string]any, error)
- func (r *SystemResource) Ping(ctx context.Context) (*managerapi.GenericItemResponse, error)
- func (r *SystemResource) PushToken(ctx context.Context) (*managerapi.GenericItemResponse, error)
- func (r *SystemResource) ServerTime(ctx context.Context) (*managerapi.GenericItemResponse, error)
- func (r *SystemResource) Tags(ctx context.Context) (*managerapi.ObjectListResponse, error)
- func (r *SystemResource) TagsByCategory(ctx context.Context, category string) (*managerapi.ObjectListResponse, error)
- func (r *SystemResource) Timezones(ctx context.Context, params managerapi.ListTimezonesParams) (*managerapi.ObjectListResponse, error)
- type TaskMetricsResource
- func (r *TaskMetricsResource) AgentInteractionDurations(ctx context.Context, agentID string) (*taskautomationapi.AgentInteractionDurationsResponse, error)
- func (r *TaskMetricsResource) AgentJournal(ctx context.Context, agentID string) (*taskautomationapi.AgentJournalResponse, error)
- func (r *TaskMetricsResource) TaskJournal(ctx context.Context, taskID string) (*taskautomationapi.JournalResponse, error)
- type TaskSchedulesResource
- func (r *TaskSchedulesResource) Create(ctx context.Context, schedule taskscheduleapi.SubmitTaskSchedule) error
- func (r *TaskSchedulesResource) Delete(ctx context.Context, name string) error
- func (r *TaskSchedulesResource) Get(ctx context.Context, name string) (*taskscheduleapi.TaskSchedule, error)
- func (r *TaskSchedulesResource) List(ctx context.Context) (*taskscheduleapi.TaskScheduleList, error)
- type TaskScriptsResource
- func (r *TaskScriptsResource) Delete(ctx context.Context, scriptType taskautomationapi.ScriptType, codeID string) error
- func (r *TaskScriptsResource) Get(ctx context.Context, scriptType taskautomationapi.ScriptType, codeID string) (*taskautomationapi.ScriptResponse, error)
- func (r *TaskScriptsResource) List(ctx context.Context, scriptType taskautomationapi.ScriptType) (*taskautomationapi.ScriptListResponse, error)
- func (r *TaskScriptsResource) Submit(ctx context.Context, scriptType taskautomationapi.ScriptType, ...) (*taskautomationapi.ScriptResponse, error)
- func (r *TaskScriptsResource) Update(ctx context.Context, scriptType taskautomationapi.ScriptType, codeID string, ...) (*taskautomationapi.ScriptResponse, error)
- type TaskSecretsResource
- func (r *TaskSecretsResource) Create(ctx context.Context, prefix string, ...) error
- func (r *TaskSecretsResource) DeleteKeys(ctx context.Context, prefix string, keys taskautomationapi.SecretKeys) error
- func (r *TaskSecretsResource) ListKeys(ctx context.Context, prefix string) (*taskautomationapi.SecretKeys, error)
- func (r *TaskSecretsResource) ListPrefixes(ctx context.Context) (*taskautomationapi.SecretPrefixes, error)
- func (r *TaskSecretsResource) Patch(ctx context.Context, prefix string, ...) error
- type TaskSelectionConfigResource
- func (r *TaskSelectionConfigResource) Create(ctx context.Context, ...) (*taskautomationapi.SelectionConfigurationResponse, error)
- func (r *TaskSelectionConfigResource) Delete(ctx context.Context) error
- func (r *TaskSelectionConfigResource) Read(ctx context.Context) (*taskautomationapi.SelectionConfigurationResponse, error)
- func (r *TaskSelectionConfigResource) Update(ctx context.Context, ...) (*taskautomationapi.SelectionConfigurationResponse, error)
- type TasksResource
- func (r *TasksResource) AgentAction(ctx context.Context, taskID string, agentAction taskautomationapi.AgentActions, ...) (*taskautomationapi.TaskResponse, error)
- func (r *TasksResource) ChangeState(ctx context.Context, taskID string, taskState taskautomationapi.TaskState) errordeprecated
- func (r *TasksResource) Create(ctx context.Context, task taskautomationapi.SubmitTask) (*taskautomationapi.Task, error)
- func (r *TasksResource) CreateFromTemplate(ctx context.Context, template string, ...) (*taskautomationapi.Task, error)
- func (r *TasksResource) Get(ctx context.Context, taskID string) (*taskautomationapi.Task, error)
- func (r *TasksResource) Interrupt(ctx context.Context, taskID string, target InterruptTarget, ...) error
- func (r *TasksResource) List(ctx context.Context, q ListTasksQuery) iter.Seq2[taskautomationapi.Task, error]
- func (r *TasksResource) ListAll(ctx context.Context, q ListTasksQuery) ([]taskautomationapi.Task, error)
- func (r *TasksResource) Logs(ctx context.Context) (*taskautomationapi.LogsResponse, error)
- func (r *TasksResource) SetAgentLock(ctx context.Context, lockState taskautomationapi.AgentLocking) (*taskautomationapi.AgentLockState, error)
- func (r *TasksResource) TestAction(ctx context.Context, body taskautomationapi.TestAction) (*taskautomationapi.TestActionResponse, error)
- func (r *TasksResource) Update(ctx context.Context, taskID string, task taskautomationapi.Task) (*taskautomationapi.Task, error)
- func (r *TasksResource) Usage(ctx context.Context) (*taskautomationapi.TaskTimeSeriesResponse, error)
- func (r *TasksResource) UsageTypes(ctx context.Context) (*taskautomationapi.TaskUsageTypesResponse, error)
- type TelephonySettings
- type TokenResponse
- func AuthorizationCodeGrant(ctx context.Context, hc *http.Client, ...) (*TokenResponse, error)
- func ClientCredentialsGrant(ctx context.Context, hc *http.Client, baseURL, clientID, clientSecret string) (*TokenResponse, error)
- func PasswordGrant(ctx context.Context, hc *http.Client, baseURL, user, pass, clientID string) (*TokenResponse, error)
- func RefreshTokenGrant(ctx context.Context, hc *http.Client, ...) (*TokenResponse, error)
- type TriggersResource
- func (r *TriggersResource) BulkAction(ctx context.Context, action string, ids []string) (*managerapi.BulkActionResponse, error)
- func (r *TriggersResource) Clone(ctx context.Context, id string) (*managerapi.TriggerItemResponse, error)
- func (r *TriggersResource) Conditions(ctx context.Context, id string) (*managerapi.TriggerConditionListResponse, error)
- func (r *TriggersResource) Create(ctx context.Context, body managerapi.RestCreateTrigger) (*managerapi.TriggerItemResponse, error)
- func (r *TriggersResource) Delete(ctx context.Context, id string) error
- func (r *TriggersResource) Expressions(ctx context.Context) (*managerapi.ObjectListResponse, error)
- func (r *TriggersResource) Get(ctx context.Context, id string) (*managerapi.TriggerItemResponse, error)
- func (r *TriggersResource) List(ctx context.Context, params managerapi.ListTriggersParams) iter.Seq2[managerapi.Trigger, error]
- func (r *TriggersResource) ListAll(ctx context.Context, params managerapi.ListTriggersParams) ([]managerapi.Trigger, error)
- func (r *TriggersResource) Operators(ctx context.Context) (*managerapi.ObjectListResponse, error)
- func (r *TriggersResource) SetConditions(ctx context.Context, id string, body managerapi.TriggerConditionsRequest) (*managerapi.TriggerItemResponse, error)
- func (r *TriggersResource) Test(ctx context.Context, body managerapi.TestTriggersRequest, testMode bool) (*managerapi.TestTriggersResponse, error)
- func (r *TriggersResource) Update(ctx context.Context, id string, body managerapi.RestUpdateTrigger) (*managerapi.TriggerItemResponse, error)
- func (r *TriggersResource) Uses(ctx context.Context, id string) (*managerapi.TriggerUsesResponse, error)
- type UiSettings
- type UploadLeadsOptions
- type UsersResource
- func (r *UsersResource) AddRoles(ctx context.Context, emails []string, roles []managerapi.AccountRole) error
- func (r *UsersResource) Create(ctx context.Context, user managerapi.CreateManagedUserRequest) (*managerapi.ManagedUserItemResponse, error)
- func (r *UsersResource) Delete(ctx context.Context, emails []string) error
- func (r *UsersResource) Disable(ctx context.Context, emails []string) error
- func (r *UsersResource) Enable(ctx context.Context, emails []string) error
- func (r *UsersResource) GetByEmail(ctx context.Context, email string) (*managerapi.ManagedUserItemResponse, error)
- func (r *UsersResource) List(ctx context.Context, q ListUsersQuery) iter.Seq2[managerapi.ManagedUser, error]
- func (r *UsersResource) ListAll(ctx context.Context, q ListUsersQuery) ([]managerapi.ManagedUser, error)
- func (r *UsersResource) ListRoles(ctx context.Context) ([]managerapi.AccountRole, error)
- func (r *UsersResource) Me(ctx context.Context) (*managerapi.GenericItemResponse, error)
- func (r *UsersResource) RemoveRoles(ctx context.Context, emails []string, roles []managerapi.AccountRole) error
- func (r *UsersResource) ResetPasswords(ctx context.Context, emails []string) error
Constants ¶
const DefaultBaseURL = "https://services.babelforce.com"
DefaultBaseURL is the babelforce API host used when Options.BaseURL is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildAuthorizeURL ¶ added in v0.40.0
func BuildAuthorizeURL(p AuthorizeURLParams) string
BuildAuthorizeURL builds the GET {BaseURL}/oauth/authorize URL that starts the Authorization Code + PKCE flow. Redirect the user to it; babelforce redirects back to RedirectURI with a short-lived code.
Types ¶
type APIError ¶
type APIError struct {
// Status is the HTTP status code.
Status int
// Code is the API error code, when the body carries one.
Code string
// Message is a human-readable message (from the body when available, else the status text).
Message string
// Body is the raw response body.
Body []byte
}
APIError is returned when the manager API responds with a non-2xx status.
type AgentGroupsResource ¶ added in v0.3.0
type AgentGroupsResource struct {
// contains filtered or unexported fields
}
AgentGroupsResource is the agent-groups namespace (/api/v2/agents/groups).
func (*AgentGroupsResource) AddAgent ¶ added in v0.3.0
func (r *AgentGroupsResource) AddAgent(ctx context.Context, groupID, agentID string) (*managerapi.AgentGroupAdditionResponse, error)
AddAgent adds an agent (by id) to a group.
func (*AgentGroupsResource) BulkDelete ¶ added in v0.38.0
func (r *AgentGroupsResource) BulkDelete(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
BulkDelete deletes the given agent groups by id.
func (*AgentGroupsResource) Create ¶ added in v0.3.0
func (r *AgentGroupsResource) Create(ctx context.Context, body managerapi.RestCreateAgentGroup) (*managerapi.AgentGroupItemResponse, error)
Create creates an agent group.
func (*AgentGroupsResource) Delete ¶ added in v0.3.0
func (r *AgentGroupsResource) Delete(ctx context.Context, id string) error
Delete deletes an agent group by id.
func (*AgentGroupsResource) Get ¶ added in v0.3.0
func (r *AgentGroupsResource) Get(ctx context.Context, id string) (*managerapi.AgentGroupItemResponse, error)
Get returns an agent group by id.
func (*AgentGroupsResource) List ¶ added in v0.3.0
func (r *AgentGroupsResource) List(ctx context.Context, pageSize int) iter.Seq2[managerapi.AgentGroup, error]
List returns an iterator over agent groups, auto-paginating across pages.
func (*AgentGroupsResource) ListAgents ¶ added in v0.38.0
func (r *AgentGroupsResource) ListAgents(ctx context.Context, groupID string, params managerapi.ListAgentsInGroupParams) iter.Seq2[managerapi.Agent, error]
ListAgents returns an iterator over the agents in a group, auto-paginating across pages.
The Page field of params is managed by the auto-paginator, so leave it unset.
func (*AgentGroupsResource) ListAll ¶ added in v0.3.0
func (r *AgentGroupsResource) ListAll(ctx context.Context, pageSize int) ([]managerapi.AgentGroup, error)
ListAll collects every agent group into a slice (convenience over List).
func (*AgentGroupsResource) RemoveAgent ¶ added in v0.38.0
func (r *AgentGroupsResource) RemoveAgent(ctx context.Context, groupID, agentID string) (*managerapi.AgentGroupItemResponse, error)
RemoveAgent removes an agent (by id) from a group.
func (*AgentGroupsResource) Update ¶ added in v0.3.0
func (r *AgentGroupsResource) Update(ctx context.Context, id string, body managerapi.RestUpdateAgentGroup) (*managerapi.AgentGroupItemResponse, error)
Update updates an agent group.
type AgentsResource ¶ added in v0.3.0
type AgentsResource struct {
// Groups is the agent-groups sub-namespace (/api/v2/agents/groups).
Groups *AgentGroupsResource
// contains filtered or unexported fields
}
AgentsResource is the agent-management namespace (/api/v2/agents).
func (*AgentsResource) AllLogs ¶ added in v0.38.0
func (r *AgentsResource) AllLogs(ctx context.Context, params managerapi.ListAllAgentLogsParams) iter.Seq2[managerapi.AgentLogEntry, error]
AllLogs returns an iterator over every agent's log entries, auto-paginating across pages.
The Page field of params is managed by the auto-paginator, so leave it unset.
func (*AgentsResource) AvailableStatuses ¶ added in v0.38.0
func (r *AgentsResource) AvailableStatuses(ctx context.Context) (*managerapi.AgentAvailabilityListResponse, error)
AvailableStatuses lists the agent availability statuses.
func (*AgentsResource) BulkAction ¶ added in v0.38.0
func (r *AgentsResource) BulkAction(ctx context.Context, action string, body managerapi.AgentBulkRequest) (*managerapi.AgentBulkResponse, error)
BulkAction applies a bulk action (e.g. "enable", "disable", "delete") to the given agent ids.
func (*AgentsResource) Create ¶ added in v0.3.0
func (r *AgentsResource) Create(ctx context.Context, body managerapi.RestCreateAgent) (*managerapi.AgentItemResponse, error)
Create creates an agent.
func (*AgentsResource) CreatePresence ¶ added in v0.38.0
func (r *AgentsResource) CreatePresence(ctx context.Context, body managerapi.AgentPresenceWriteBody) (*managerapi.AgentPresenceItemResponse, error)
CreatePresence creates an available agent presence.
func (*AgentsResource) Delete ¶ added in v0.3.0
func (r *AgentsResource) Delete(ctx context.Context, id string) error
Delete deletes an agent by id.
func (*AgentsResource) DeletePresence ¶ added in v0.38.0
func (r *AgentsResource) DeletePresence(ctx context.Context, name string) (*managerapi.DefaultV2MessageResponse, error)
DeletePresence deletes an available agent presence by name.
func (*AgentsResource) Disable ¶ added in v0.38.0
func (r *AgentsResource) Disable(ctx context.Context, id string) (*managerapi.DefaultV2MessageResponse, error)
Disable disables an agent by id.
func (*AgentsResource) Enable ¶ added in v0.38.0
func (r *AgentsResource) Enable(ctx context.Context, id string) (*managerapi.DefaultV2MessageResponse, error)
Enable enables an agent by id.
func (*AgentsResource) Export ¶ added in v0.38.0
Export returns all agents as a raw export in the given format (e.g. "csv").
func (*AgentsResource) Get ¶ added in v0.3.0
func (r *AgentsResource) Get(ctx context.Context, id string) (*managerapi.AgentItemResponse, error)
Get returns an agent by id.
func (*AgentsResource) GetImportJob ¶ added in v0.38.0
func (r *AgentsResource) GetImportJob(ctx context.Context, id string) (*managerapi.AgentImportJobItemResponse, error)
GetImportJob returns an asynchronous agent-import job by id.
func (*AgentsResource) GetPresence ¶ added in v0.38.0
func (r *AgentsResource) GetPresence(ctx context.Context, name string) (*managerapi.AgentPresenceItemResponse, error)
GetPresence returns an available agent presence by name.
func (*AgentsResource) GetStatus ¶ added in v0.38.0
func (r *AgentsResource) GetStatus(ctx context.Context, id string) (*managerapi.AgentTotalStatusResponse, error)
GetStatus returns the total status of an agent by id.
func (*AgentsResource) HangupCall ¶ added in v0.38.0
func (r *AgentsResource) HangupCall(ctx context.Context, id string) (*managerapi.DefaultV2MessageResponse, error)
HangupCall hangs up the active call of an agent by id.
func (*AgentsResource) Import ¶ added in v0.38.0
func (r *AgentsResource) Import(ctx context.Context, contentType string, body io.Reader, params *managerapi.ImportAgentsParams) (*managerapi.AgentImportValidationResults, error)
Import provisions agents from an upload stream (e.g. a CSV body). contentType is e.g. "text/csv".
func (*AgentsResource) List ¶ added in v0.3.0
func (r *AgentsResource) List(ctx context.Context, q ListAgentsQuery) iter.Seq2[managerapi.Agent, error]
List returns an iterator over agents, auto-paginating across pages.
for agent, err := range mgr.Agents.List(ctx, manager.ListAgentsQuery{}) {
if err != nil { return err }
fmt.Println(agent.Name)
}
func (*AgentsResource) ListAll ¶ added in v0.3.0
func (r *AgentsResource) ListAll(ctx context.Context, q ListAgentsQuery) ([]managerapi.Agent, error)
ListAll collects every agent into a slice (convenience over List).
func (*AgentsResource) Logs ¶ added in v0.38.0
func (r *AgentsResource) Logs(ctx context.Context, id string, params managerapi.ListAgentLogsParams) iter.Seq2[managerapi.AgentLogEntry, error]
Logs returns an iterator over a single agent's log entries, auto-paginating across pages.
The Page field of params is managed by the auto-paginator, so leave it unset.
func (*AgentsResource) Presences ¶ added in v0.38.0
func (r *AgentsResource) Presences(ctx context.Context) (*managerapi.AgentPresenceListResponse, error)
Presences lists the available agent presences.
func (*AgentsResource) Push ¶ added in v0.38.0
func (r *AgentsResource) Push(ctx context.Context, body managerapi.AgentPushRequest) (*managerapi.DefaultV2MessageResponse, error)
Push sends a push notification / event to an agent.
func (*AgentsResource) Update ¶ added in v0.3.0
func (r *AgentsResource) Update(ctx context.Context, id string, body managerapi.RestUpdateAgent) (*managerapi.AgentItemResponse, error)
Update updates an agent.
func (*AgentsResource) UpdatePassword ¶ added in v0.38.0
func (r *AgentsResource) UpdatePassword(ctx context.Context, id string, body managerapi.AgentPasswordUpdateRequest) (*managerapi.DefaultV2MessageResponse, error)
UpdatePassword updates the password of an agent by id.
func (*AgentsResource) UpdatePresence ¶ added in v0.38.0
func (r *AgentsResource) UpdatePresence(ctx context.Context, name string, body managerapi.AgentPresenceWriteBody) (*managerapi.AgentPresenceItemResponse, error)
UpdatePresence updates an available agent presence by name.
func (*AgentsResource) UpdateStatus ¶ added in v0.3.0
func (r *AgentsResource) UpdateStatus(ctx context.Context, id string, status managerapi.UpdateAgentStatusRequest) (*managerapi.AgentStatus, error)
UpdateStatus updates an agent's status (enabled flag and/or presence).
func (*AgentsResource) ValidateImport ¶ added in v0.38.0
func (r *AgentsResource) ValidateImport(ctx context.Context, contentType string, body io.Reader) (*managerapi.AgentImportValidationResults, error)
ValidateImport validates an agent import upload stream without applying it. contentType is e.g. "text/csv".
type AppActionsResource ¶ added in v0.4.0
type AppActionsResource struct {
// contains filtered or unexported fields
}
AppActionsResource is the per-application actions (local automations) namespace (/api/v2/applications/{applicationId}/actions).
func (*AppActionsResource) Create ¶ added in v0.4.0
func (r *AppActionsResource) Create(ctx context.Context, applicationID string, body managerapi.RestCreateLocalAutomation) (*managerapi.LocalAutomationItemResponse, error)
Create creates an action in an application.
func (*AppActionsResource) Delete ¶ added in v0.4.0
func (r *AppActionsResource) Delete(ctx context.Context, applicationID, id string) error
Delete deletes one of an application's actions.
func (*AppActionsResource) Get ¶ added in v0.4.0
func (r *AppActionsResource) Get(ctx context.Context, applicationID, id string) (*managerapi.LocalAutomationItemResponse, error)
Get returns one of an application's actions by id.
func (*AppActionsResource) List ¶ added in v0.4.0
func (r *AppActionsResource) List(ctx context.Context, applicationID string, pageSize int) iter.Seq2[managerapi.LocalAutomation, error]
List returns an iterator over an application's actions, auto-paginating across pages.
func (*AppActionsResource) ListAll ¶ added in v0.4.0
func (r *AppActionsResource) ListAll(ctx context.Context, applicationID string, pageSize int) ([]managerapi.LocalAutomation, error)
ListAll collects every action of an application into a slice (convenience over List).
func (*AppActionsResource) Update ¶ added in v0.4.0
func (r *AppActionsResource) Update(ctx context.Context, applicationID, id string, body managerapi.RestUpdateLocalAutomation) (*managerapi.LocalAutomationItemResponse, error)
Update updates one of an application's actions.
type AppSettings ¶ added in v0.4.0
type AppSettings struct {
CustomerLogging Setting[managerapi.SettingsAppCustomerLogging, managerapi.SettingsAppCustomerLoggingRequestData]
Conversations Setting[managerapi.SettingsAppConversations, managerapi.SettingsAppConversationsRequestData]
Integrations Setting[managerapi.SettingsAppIntegrations, managerapi.SettingsAppIntegrationsRequestData]
AgentStatus Setting[managerapi.SettingsAppAgentStatus, managerapi.SettingsAppAgentStatusRequestData]
}
AppSettings groups the `app` settings.
type ApplicationView ¶ added in v0.5.0
type ApplicationView struct {
Id string `json:"id"`
Name string `json:"name"`
Module string `json:"module"`
Enabled bool `json:"enabled"`
DateCreated time.Time `json:"dateCreated"`
LastUpdated time.Time `json:"lastUpdated"`
Tags []managerapi.Tag `json:"tags"`
}
ApplicationView holds the fields every IVR application variant shares, regardless of its module. managerapi.Application is a oneOf union (a distinct shape per module), so it carries no directly addressable fields; use ApplicationViewOf to read the common ones. For module-specific fields (routings, settings, …) use the generated app.As<Module>Application() accessors or app.ValueByDiscriminator().
func ApplicationViewOf ¶ added in v0.5.0
func ApplicationViewOf(app managerapi.Application) (ApplicationView, error)
ApplicationViewOf extracts the fields common to every Application variant. It also works on the Application returned inside ApplicationItemResponse.Item (Get/Create/Update).
type ApplicationsResource ¶ added in v0.4.0
type ApplicationsResource struct {
// Actions is the per-application actions (local automations) sub-namespace
// (/api/v2/applications/{applicationId}/actions).
Actions *AppActionsResource
// contains filtered or unexported fields
}
ApplicationsResource is the application (IVR) management namespace (/api/v2/applications).
func (*ApplicationsResource) AllLocalAutomations ¶ added in v0.38.0
func (r *ApplicationsResource) AllLocalAutomations(ctx context.Context, params managerapi.ListAllLocalAutomationsParams) iter.Seq2[managerapi.LocalAutomation, error]
AllLocalAutomations returns an iterator over every local automation across all applications, auto-paginating across pages (GET /api/v2/automations/local). The Page field of params is managed by the auto-paginator, so leave it unset.
func (*ApplicationsResource) BulkUpdate ¶ added in v0.38.0
func (r *ApplicationsResource) BulkUpdate(ctx context.Context, body managerapi.BulkUpdateApplicationsRequest) (*managerapi.DefaultV2MessageResponse, error)
BulkUpdate applies a partial update to many applications at once (PUT /api/v2/applications/bulk).
func (*ApplicationsResource) Clone ¶ added in v0.38.0
func (r *ApplicationsResource) Clone(ctx context.Context, id string) (*managerapi.ApplicationItemResponse, error)
Clone duplicates an application and returns the new copy (POST /api/v2/applications/{id}/clone).
func (*ApplicationsResource) Create ¶ added in v0.4.0
func (r *ApplicationsResource) Create(ctx context.Context, body managerapi.ApplicationCreateBody) (*managerapi.ApplicationItemResponse, error)
Create creates an application.
func (*ApplicationsResource) Delete ¶ added in v0.4.0
func (r *ApplicationsResource) Delete(ctx context.Context, id string) error
Delete deletes an application by id.
func (*ApplicationsResource) DeleteMany ¶ added in v0.4.0
func (r *ApplicationsResource) DeleteMany(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
DeleteMany bulk-deletes applications by id.
func (*ApplicationsResource) Dispatch ¶ added in v0.4.0
func (r *ApplicationsResource) Dispatch(ctx context.Context, id, position string, async bool, body *managerapi.LocalAutomationDispatch) (*managerapi.DispatchLocalAutomationsResponse, error)
Dispatch dispatches the local automations configured at a position in an application. The body is optional: pass nil to send no request payload, or a non-nil *LocalAutomationDispatch to send one.
func (*ApplicationsResource) Get ¶ added in v0.4.0
func (r *ApplicationsResource) Get(ctx context.Context, id string) (*managerapi.ApplicationItemResponse, error)
Get returns an application by id.
func (*ApplicationsResource) List ¶ added in v0.4.0
func (r *ApplicationsResource) List(ctx context.Context, q ListApplicationsQuery) iter.Seq2[managerapi.Application, error]
List returns an iterator over applications, auto-paginating across pages.
for app, err := range mgr.Applications.List(ctx, manager.ListApplicationsQuery{}) {
if err != nil { return err }
v, _ := manager.ApplicationViewOf(app)
fmt.Println(v.Id, v.Name, v.Module)
}
func (*ApplicationsResource) ListActions ¶ added in v0.38.0
func (r *ApplicationsResource) ListActions(ctx context.Context) (*managerapi.ObjectListResponse, error)
ListActions lists every action across all applications (GET /api/v2/applications/actions).
func (*ApplicationsResource) ListAll ¶ added in v0.4.0
func (r *ApplicationsResource) ListAll(ctx context.Context, q ListApplicationsQuery) ([]managerapi.Application, error)
ListAll collects every application into a slice (convenience over List).
func (*ApplicationsResource) ListErrors ¶ added in v0.38.0
func (r *ApplicationsResource) ListErrors(ctx context.Context) (*managerapi.ObjectListResponse, error)
ListErrors lists application configuration errors (GET /api/v2/applications/errors).
func (*ApplicationsResource) ListModules ¶ added in v0.4.0
func (r *ApplicationsResource) ListModules(ctx context.Context) (*managerapi.ListModulesResponse, error)
ListModules lists the available IVR modules (the building blocks of applications).
func (*ApplicationsResource) Update ¶ added in v0.4.0
func (r *ApplicationsResource) Update(ctx context.Context, id string, body managerapi.ApplicationUpdateBody) (*managerapi.ApplicationItemResponse, error)
Update updates an application.
type AuditSettings ¶ added in v0.4.0
type AuditSettings struct {
Default Setting[managerapi.SettingsAuditDefault, managerapi.SettingsAuditDefaultRequestData]
}
AuditSettings groups the `audit` settings.
type Auth ¶
type Auth interface {
// contains filtered or unexported methods
}
Auth describes how the SDK authenticates. Construct one with ClientCredentials, Bearer, Password, or RefreshToken (or their PasswordWithClientID / RefreshTokenWithSecret variants).
func ClientCredentials ¶ added in v0.38.0
ClientCredentials authenticates via the OAuth2 client_credentials grant against /oauth/token (the primary server-to-server mode). The token is fetched lazily on first use and refreshed transparently before it expires.
func Password ¶
Password authenticates via the OAuth2 password grant against /oauth/token. The token is fetched lazily on first use and refreshed transparently before it expires. Convenience for interactive/dev use.
func PasswordWithClientID ¶ added in v0.44.0
PasswordWithClientID is Password with an explicit OAuth2 client id instead of the default "manager" — for password grants issued against a custom OAuth2 application.
func RefreshToken ¶ added in v0.40.0
RefreshToken authenticates using a refresh token obtained from the Authorization Code + PKCE flow. The token is exchanged for an access token lazily on first use and refreshed transparently before it expires; the rotated refresh token returned by each exchange is captured and reused. clientID is the registered public client id used at /oauth/authorize. This is the recommended way to run a long-lived client on behalf of a user.
func RefreshTokenWithSecret ¶ added in v0.44.0
RefreshTokenWithSecret is RefreshToken for confidential clients: the client secret is sent with every refresh-token exchange. Public (PKCE) clients have no secret and use RefreshToken.
type AuthResource ¶ added in v0.38.0
type AuthResource struct {
// contains filtered or unexported fields
}
AuthResource is the OAuth 2.0 namespace (/oauth): authorize, token, and revoke.
These endpoints authenticate via OAuth client credentials carried in the request itself, so they operate independently of the client's configured authentication (via Options.Auth).
func (*AuthResource) Authorize ¶ added in v0.38.0
func (r *AuthResource) Authorize(ctx context.Context, params authapi.AuthorizeParams) (*authapi.AuthorizeHTTPResp, error)
Authorize begins the OAuth 2.0 Authorization Code flow at /oauth/authorize. On success the server responds with a redirect (302) carrying the authorization code; the returned response exposes the raw HTTP response (including Location header) for the caller to follow.
func (*AuthResource) Revoke ¶ added in v0.38.0
func (r *AuthResource) Revoke(ctx context.Context, body authapi.OAuthRevokeRequest) error
Revoke invalidates an access or refresh token at /oauth/revoke.
func (*AuthResource) Token ¶ added in v0.38.0
func (r *AuthResource) Token(ctx context.Context, body authapi.OAuthTokenRequest) (*authapi.OAuthTokenResponse, error)
Token exchanges OAuth 2.0 credentials (a grant) for an access token at /oauth/token.
type AuthorizeURLParams ¶ added in v0.40.0
type AuthorizeURLParams struct {
BaseURL string
ClientID string
RedirectURI string
Scope string
CodeChallenge string
State string // optional
CodeChallengeMethod string // optional; defaults to "S256"
}
AuthorizeURLParams are the inputs to BuildAuthorizeURL.
type AutomationsResource ¶ added in v0.17.0
type AutomationsResource struct {
// contains filtered or unexported fields
}
AutomationsResource is the global-automations namespace (event triggers, /api/v2/events/triggers).
List takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*AutomationsResource) BulkDelete ¶ added in v0.38.0
func (r *AutomationsResource) BulkDelete(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
BulkDelete deletes several global automations (event triggers) by id.
func (*AutomationsResource) BulkUpdate ¶ added in v0.38.0
func (r *AutomationsResource) BulkUpdate(ctx context.Context, body managerapi.BulkUpdateRequest) (*managerapi.ObjectListResponse, error)
BulkUpdate updates several global automations (event triggers) in one request. Each item in the body must include its id.
func (*AutomationsResource) Clone ¶ added in v0.38.0
func (r *AutomationsResource) Clone(ctx context.Context, id string) (*managerapi.GlobalAutomationItemResponse, error)
Clone clones a global automation (event trigger) and returns the new automation.
func (*AutomationsResource) Create ¶ added in v0.17.0
func (r *AutomationsResource) Create(ctx context.Context, body managerapi.RestCreateGlobalAutomation) (*managerapi.GlobalAutomationItemResponse, error)
Create creates a global automation.
func (*AutomationsResource) Delete ¶ added in v0.17.0
func (r *AutomationsResource) Delete(ctx context.Context, id string) error
Delete deletes a global automation.
func (*AutomationsResource) Dispatch ¶ added in v0.38.0
func (r *AutomationsResource) Dispatch(ctx context.Context, eventTriggerID string, params *managerapi.DispatchEventTriggerParams, body map[string]any) (map[string]any, error)
Dispatch dispatches a global automation (event trigger) with a payload and returns the raw result.
func (*AutomationsResource) Get ¶ added in v0.17.0
func (r *AutomationsResource) Get(ctx context.Context, id string) (*managerapi.GlobalAutomationItemResponse, error)
Get returns a global automation by id.
func (*AutomationsResource) List ¶ added in v0.17.0
func (r *AutomationsResource) List(ctx context.Context, params managerapi.ListGlobalAutomationsParams) iter.Seq2[managerapi.GlobalAutomation, error]
List returns an iterator over global automations, auto-paginating across pages.
func (*AutomationsResource) ListAll ¶ added in v0.17.0
func (r *AutomationsResource) ListAll(ctx context.Context, params managerapi.ListGlobalAutomationsParams) ([]managerapi.GlobalAutomation, error)
ListAll collects every global automation into a slice (convenience over List).
func (*AutomationsResource) Update ¶ added in v0.17.0
func (r *AutomationsResource) Update(ctx context.Context, id string, body managerapi.RestUpdateGlobalAutomation) (*managerapi.GlobalAutomationItemResponse, error)
Update updates a global automation.
type BabeldeskResource ¶ added in v0.17.0
type BabeldeskResource struct {
// Widgets is the babeldesk-widgets sub-namespace (/api/v2/babeldesk/widgets).
Widgets *BabeldeskWidgetsResource
// contains filtered or unexported fields
}
BabeldeskResource is the babeldesk-dashboards namespace (/api/v2/babeldesk/dashboards), with a nested Widgets sub-resource.
func (*BabeldeskResource) Create ¶ added in v0.17.0
func (r *BabeldeskResource) Create(ctx context.Context, body managerapi.RestCreateBabeldesk) (*managerapi.BabeldeskItemResponse, error)
Create creates a dashboard.
func (*BabeldeskResource) Delete ¶ added in v0.17.0
func (r *BabeldeskResource) Delete(ctx context.Context, id string) error
Delete deletes a dashboard.
func (*BabeldeskResource) Get ¶ added in v0.17.0
func (r *BabeldeskResource) Get(ctx context.Context, id string) (*managerapi.BabeldeskItemResponse, error)
Get returns a dashboard by id.
func (*BabeldeskResource) List ¶ added in v0.17.0
func (r *BabeldeskResource) List(ctx context.Context, params managerapi.ListBabeldesksParams) iter.Seq2[managerapi.Babeldesk, error]
List returns an iterator over babeldesk dashboards, auto-paginating across pages.
func (*BabeldeskResource) ListAll ¶ added in v0.17.0
func (r *BabeldeskResource) ListAll(ctx context.Context, params managerapi.ListBabeldesksParams) ([]managerapi.Babeldesk, error)
ListAll collects every dashboard into a slice (convenience over List).
func (*BabeldeskResource) Update ¶ added in v0.17.0
func (r *BabeldeskResource) Update(ctx context.Context, id string, body managerapi.RestUpdateBabeldesk) (*managerapi.BabeldeskItemResponse, error)
Update updates a dashboard.
func (*BabeldeskResource) WidgetSettings ¶ added in v0.38.0
func (r *BabeldeskResource) WidgetSettings(ctx context.Context, widgetType string) (*managerapi.WidgetSettingsResponse, error)
WidgetSettings returns the UI feature flags and type-specific settings for a widget type (GET /api/v2/widget/{type}/settings).
type BabeldeskWidgetsResource ¶ added in v0.17.0
type BabeldeskWidgetsResource struct {
// contains filtered or unexported fields
}
BabeldeskWidgetsResource is the babeldesk-widgets namespace (/api/v2/babeldesk/widgets).
func (*BabeldeskWidgetsResource) Create ¶ added in v0.17.0
func (r *BabeldeskWidgetsResource) Create(ctx context.Context, body managerapi.RestCreateBabeldeskWidget) (*managerapi.BabeldeskWidgetItemResponse, error)
Create creates a widget.
func (*BabeldeskWidgetsResource) Delete ¶ added in v0.17.0
func (r *BabeldeskWidgetsResource) Delete(ctx context.Context, id string) error
Delete deletes a widget.
func (*BabeldeskWidgetsResource) Get ¶ added in v0.17.0
func (r *BabeldeskWidgetsResource) Get(ctx context.Context, id string) (*managerapi.BabeldeskWidgetItemResponse, error)
Get returns a widget by id.
func (*BabeldeskWidgetsResource) List ¶ added in v0.17.0
func (r *BabeldeskWidgetsResource) List(ctx context.Context, params managerapi.ListBabeldeskWidgetsParams) iter.Seq2[managerapi.BabeldeskWidget, error]
List returns an iterator over widgets, auto-paginating across pages.
func (*BabeldeskWidgetsResource) ListAll ¶ added in v0.17.0
func (r *BabeldeskWidgetsResource) ListAll(ctx context.Context, params managerapi.ListBabeldeskWidgetsParams) ([]managerapi.BabeldeskWidget, error)
ListAll collects every widget into a slice (convenience over List).
func (*BabeldeskWidgetsResource) Update ¶ added in v0.17.0
func (r *BabeldeskWidgetsResource) Update(ctx context.Context, id string, body managerapi.RestUpdateBabeldeskWidget) (*managerapi.BabeldeskWidgetItemResponse, error)
Update updates a widget.
type BusinessHoursResource ¶ added in v0.17.0
type BusinessHoursResource struct {
// contains filtered or unexported fields
}
BusinessHoursResource is the business-hours namespace (/api/v2/business-hours).
List takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*BusinessHoursResource) AddRanges ¶ added in v0.38.0
func (r *BusinessHoursResource) AddRanges(ctx context.Context, id string, body managerapi.BusinessHourRangesBody) (*managerapi.BusinessHourItemResponse, error)
AddRanges adds weekly time ranges to a business-hours definition.
func (*BusinessHoursResource) BulkDelete ¶ added in v0.38.0
func (r *BusinessHoursResource) BulkDelete(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
BulkDelete deletes the given business-hours definitions by id.
func (*BusinessHoursResource) BulkUpdate ¶ added in v0.38.0
func (r *BusinessHoursResource) BulkUpdate(ctx context.Context, body managerapi.BusinessHourBulkUpdateRequest) (*managerapi.BusinessHourListResponse, error)
BulkUpdate applies the given updates to multiple business-hours definitions at once.
func (*BusinessHoursResource) Create ¶ added in v0.17.0
func (r *BusinessHoursResource) Create(ctx context.Context, body managerapi.RestCreateBusinessHour) (*managerapi.BusinessHourItemResponse, error)
Create creates a business-hours definition.
func (*BusinessHoursResource) Delete ¶ added in v0.17.0
func (r *BusinessHoursResource) Delete(ctx context.Context, id string) error
Delete deletes a business-hours definition.
func (*BusinessHoursResource) Get ¶ added in v0.17.0
func (r *BusinessHoursResource) Get(ctx context.Context, id string) (*managerapi.BusinessHourItemResponse, error)
Get returns a business-hours definition by id.
func (*BusinessHoursResource) GetRange ¶ added in v0.38.0
func (r *BusinessHoursResource) GetRange(ctx context.Context, id, rangeID string) (*managerapi.BusinessHourRangeItemResponse, error)
GetRange returns a single weekly time range of a business-hours definition by id.
func (*BusinessHoursResource) List ¶ added in v0.17.0
func (r *BusinessHoursResource) List(ctx context.Context, params managerapi.ListBusinessHoursParams) iter.Seq2[managerapi.BusinessHour, error]
List returns an iterator over business-hours definitions, auto-paginating across pages.
func (*BusinessHoursResource) ListAll ¶ added in v0.17.0
func (r *BusinessHoursResource) ListAll(ctx context.Context, params managerapi.ListBusinessHoursParams) ([]managerapi.BusinessHour, error)
ListAll collects every business-hours definition into a slice (convenience over List).
func (*BusinessHoursResource) ListRanges ¶ added in v0.38.0
func (r *BusinessHoursResource) ListRanges(ctx context.Context, id string) (*managerapi.BusinessHourRangeListResponse, error)
ListRanges returns the weekly time ranges of a business-hours definition.
func (*BusinessHoursResource) RemoveRange ¶ added in v0.38.0
func (r *BusinessHoursResource) RemoveRange(ctx context.Context, id, rangeID string) (*managerapi.DefaultV2MessageResponse, error)
RemoveRange removes a weekly time range from a business-hours definition.
func (*BusinessHoursResource) Update ¶ added in v0.17.0
func (r *BusinessHoursResource) Update(ctx context.Context, id string, body managerapi.RestUpdateBusinessHour) (*managerapi.BusinessHourItemResponse, error)
Update updates a business-hours definition.
type CalendarsResource ¶ added in v0.17.0
type CalendarsResource struct {
// contains filtered or unexported fields
}
CalendarsResource is the calendars namespace (/api/v2/calendars), with calendar dates.
List takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*CalendarsResource) AddDate ¶ added in v0.17.0
func (r *CalendarsResource) AddDate(ctx context.Context, id string, body managerapi.AddCalendarDateJSONRequestBody) (*managerapi.CalendarDateItemResponse, error)
AddDate adds a date to a calendar.
func (*CalendarsResource) BulkDelete ¶ added in v0.38.0
func (r *CalendarsResource) BulkDelete(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
BulkDelete deletes the given calendars by id.
func (*CalendarsResource) BulkUpdate ¶ added in v0.38.0
func (r *CalendarsResource) BulkUpdate(ctx context.Context, body managerapi.CalendarBulkUpdateRequest) (*managerapi.CalendarListResponse, error)
BulkUpdate applies the given updates to multiple calendars at once.
func (*CalendarsResource) Create ¶ added in v0.17.0
func (r *CalendarsResource) Create(ctx context.Context, body managerapi.RestCreateCalendar) (*managerapi.CalendarItemResponse, error)
Create creates a calendar.
func (*CalendarsResource) Delete ¶ added in v0.17.0
func (r *CalendarsResource) Delete(ctx context.Context, id string) error
Delete deletes a calendar.
func (*CalendarsResource) Get ¶ added in v0.17.0
func (r *CalendarsResource) Get(ctx context.Context, id string) (*managerapi.CalendarItemResponse, error)
Get returns a calendar by id.
func (*CalendarsResource) GetDate ¶ added in v0.38.0
func (r *CalendarsResource) GetDate(ctx context.Context, id, dateID string) (*managerapi.CalendarDateItemResponse, error)
GetDate returns a single calendar date by id.
func (*CalendarsResource) GetDates ¶ added in v0.17.0
func (r *CalendarsResource) GetDates(ctx context.Context, id string) ([]managerapi.CalendarDate, error)
GetDates returns a calendar's dates.
func (*CalendarsResource) List ¶ added in v0.17.0
func (r *CalendarsResource) List(ctx context.Context, params managerapi.ListCalendarsParams) iter.Seq2[managerapi.Calendar, error]
List returns an iterator over calendars, auto-paginating across pages.
func (*CalendarsResource) ListAll ¶ added in v0.17.0
func (r *CalendarsResource) ListAll(ctx context.Context, params managerapi.ListCalendarsParams) ([]managerapi.Calendar, error)
ListAll collects every calendar into a slice (convenience over List).
func (*CalendarsResource) RemoveDate ¶ added in v0.38.0
func (r *CalendarsResource) RemoveDate(ctx context.Context, id, dateID string) (*managerapi.DefaultV2MessageResponse, error)
RemoveDate removes a date from a calendar.
func (*CalendarsResource) TestDate ¶ added in v0.38.0
func (r *CalendarsResource) TestDate(ctx context.Context, date *string) (*managerapi.GenericItemResponse, error)
TestDate evaluates the calendars against a date (defaults to now when date is nil).
func (*CalendarsResource) Update ¶ added in v0.17.0
func (r *CalendarsResource) Update(ctx context.Context, id string, body managerapi.RestUpdateCalendar) (*managerapi.CalendarItemResponse, error)
Update updates a calendar.
func (*CalendarsResource) UpdateDate ¶ added in v0.38.0
func (r *CalendarsResource) UpdateDate(ctx context.Context, id, dateID string, body managerapi.CalendarDateBody) (*managerapi.CalendarDateItemResponse, error)
UpdateDate updates a calendar date by id.
type CallsResource ¶ added in v0.3.0
type CallsResource struct {
// Reporting is the call-reporting sub-namespace (/api/v2/calls/reporting).
Reporting *ReportingResource
// contains filtered or unexported fields
}
CallsResource is the call namespace (/api/v2/calls): call reporting plus call control.
func (*CallsResource) Cancel ¶ added in v0.38.0
func (r *CallsResource) Cancel(ctx context.Context, id string) (*managerapi.CallItemResponse, error)
Cancel cancels a queued or ringing call and returns the updated call.
func (*CallsResource) CreateTestCall ¶ added in v0.17.0
func (r *CallsResource) CreateTestCall(ctx context.Context, body managerapi.CreateTestCall) (*managerapi.CallItemResponse, error)
CreateTestCall creates an inbound test call.
func (*CallsResource) Get ¶ added in v0.17.0
func (r *CallsResource) Get(ctx context.Context, id string) (*managerapi.CallItemResponse, error)
Get returns a single call by id.
func (*CallsResource) Hangup ¶ added in v0.17.0
func (r *CallsResource) Hangup(ctx context.Context, id string) (*managerapi.CallItemResponse, error)
Hangup hangs up a live call and returns the updated call.
func (*CallsResource) ListQueued ¶ added in v0.38.0
func (r *CallsResource) ListQueued(ctx context.Context, queueID string, params managerapi.ListQueuedCallsParams) iter.Seq2[managerapi.QueuedCall, error]
ListQueued returns an iterator over the calls currently queued in a queue, auto-paginating across pages. The Page field is managed by the auto-paginator, so leave it unset.
func (*CallsResource) QueueCallback ¶ added in v0.38.0
func (r *CallsResource) QueueCallback(ctx context.Context, queueID string, body managerapi.QueueCallbackRequest) (*managerapi.QueueCallbackResponse, error)
QueueCallback enqueues a callback in a queue and returns the queued callback.
func (*CallsResource) SetSessionVariables ¶ added in v0.17.0
func (r *CallsResource) SetSessionVariables(ctx context.Context, id string, variables managerapi.SetCallSessionVariablesRequest) (*managerapi.SetCallSessionVariablesResponse, error)
SetSessionVariables sets session variables on a call.
type CampaignsResource ¶ added in v0.17.0
type CampaignsResource struct {
// contains filtered or unexported fields
}
CampaignsResource is the outbound-campaigns namespace (/api/v2/outbound/campaigns).
func (*CampaignsResource) Attempts ¶ added in v0.38.0
func (r *CampaignsResource) Attempts(ctx context.Context, id string, params *managerapi.ListCampaignAttemptsParams) (*managerapi.PaginatedAttemptResponse, error)
Attempts lists the dialing attempts for a campaign.
func (*CampaignsResource) Create ¶ added in v0.17.0
func (r *CampaignsResource) Create(ctx context.Context, body managerapi.CreateCampaignRequest) (*managerapi.OutboundCampaignItemResponse, error)
Create creates a campaign.
func (*CampaignsResource) Delete ¶ added in v0.17.0
func (r *CampaignsResource) Delete(ctx context.Context, id string) error
Delete deletes a campaign.
func (*CampaignsResource) Get ¶ added in v0.17.0
func (r *CampaignsResource) Get(ctx context.Context, id string) (*managerapi.OutboundCampaignItemResponse, error)
Get returns a campaign by id.
func (*CampaignsResource) GetList ¶ added in v0.38.0
func (r *CampaignsResource) GetList(ctx context.Context, id string) (*managerapi.LeadListItemResponse, error)
GetList returns the lead list assigned to a campaign.
func (*CampaignsResource) Hopper ¶ added in v0.38.0
func (r *CampaignsResource) Hopper(ctx context.Context, id string) (*managerapi.CampaignHopperResponse, error)
Hopper returns the hopper (next leads to dial) for a campaign.
func (*CampaignsResource) Leads ¶ added in v0.38.0
func (r *CampaignsResource) Leads(ctx context.Context, id string) (*managerapi.PaginatedLeadResponse, error)
Leads lists the leads of a campaign.
func (*CampaignsResource) List ¶ added in v0.17.0
func (r *CampaignsResource) List(ctx context.Context) ([]managerapi.OutboundCampaign, error)
List returns all outbound campaigns.
func (*CampaignsResource) LogoutAllAgents ¶ added in v0.38.0
func (r *CampaignsResource) LogoutAllAgents(ctx context.Context, id string) (*managerapi.DefaultV2MessageResponse, error)
LogoutAllAgents logs out all agents from a campaign.
func (*CampaignsResource) ProcessedLeads ¶ added in v0.38.0
func (r *CampaignsResource) ProcessedLeads(ctx context.Context, id string) (*managerapi.PaginatedLeadResponse, error)
ProcessedLeads lists the already-processed leads of a campaign.
func (*CampaignsResource) SetList ¶ added in v0.38.0
func (r *CampaignsResource) SetList(ctx context.Context, id string, body managerapi.SetCampaignListRequest) (*managerapi.CampaignItemResponse, error)
SetList assigns a lead list to a campaign.
func (*CampaignsResource) SetListById ¶ added in v0.38.0
func (r *CampaignsResource) SetListById(ctx context.Context, id string, listID string) (*managerapi.CampaignItemResponse, error)
SetListById assigns a lead list to a campaign by list id.
func (*CampaignsResource) Statistics ¶ added in v0.38.0
func (r *CampaignsResource) Statistics(ctx context.Context, id string, params *managerapi.GetCampaignStatisticsParams) (*managerapi.CampaignStatisticsResponse, error)
Statistics returns aggregated statistics for a campaign.
func (*CampaignsResource) Status ¶ added in v0.38.0
func (r *CampaignsResource) Status(ctx context.Context, id string) (*managerapi.CampaignRealtimeStatusResponse, error)
Status returns the realtime status of a campaign.
func (*CampaignsResource) UnsetList ¶ added in v0.38.0
func (r *CampaignsResource) UnsetList(ctx context.Context, id string) (*managerapi.CampaignItemResponse, error)
UnsetList removes the lead list assigned to a campaign.
func (*CampaignsResource) Update ¶ added in v0.17.0
func (r *CampaignsResource) Update(ctx context.Context, id string, body managerapi.UpdateCampaignRequest) (*managerapi.OutboundCampaignItemResponse, error)
Update updates a campaign.
type ConferencesResource ¶ added in v0.17.0
type ConferencesResource struct {
// contains filtered or unexported fields
}
ConferencesResource is the conferences namespace (/api/v2/conferences).
List takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*ConferencesResource) Get ¶ added in v0.17.0
func (r *ConferencesResource) Get(ctx context.Context, id string) (*managerapi.ConferenceItemResponse, error)
Get returns a single conference by id.
func (*ConferencesResource) List ¶ added in v0.17.0
func (r *ConferencesResource) List(ctx context.Context, params managerapi.ListConferencesParams) iter.Seq2[managerapi.Conference, error]
List returns an iterator over conferences, auto-paginating across pages.
func (*ConferencesResource) ListAll ¶ added in v0.17.0
func (r *ConferencesResource) ListAll(ctx context.Context, params managerapi.ListConferencesParams) ([]managerapi.Conference, error)
ListAll collects every conference into a slice (convenience over List).
type ConversationsResource ¶ added in v0.17.0
type ConversationsResource struct {
// contains filtered or unexported fields
}
ConversationsResource is the conversations namespace (/api/v2/conversations), with events and session variables.
List takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*ConversationsResource) AddEvent ¶ added in v0.38.0
func (r *ConversationsResource) AddEvent(ctx context.Context, conversationID string, body managerapi.ConversationEventRequest) (*managerapi.ConversationEventItemResponse, error)
AddEvent appends an event to a conversation.
func (*ConversationsResource) AllEvents ¶ added in v0.38.0
func (r *ConversationsResource) AllEvents(ctx context.Context, params managerapi.ListAllConversationEventsParams) iter.Seq2[managerapi.ConversationEvent, error]
AllEvents returns an iterator over events across all conversations, auto-paginating across pages.
Params takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*ConversationsResource) Close ¶ added in v0.38.0
func (r *ConversationsResource) Close(ctx context.Context, conversationID string) (*managerapi.ConversationItemResponse, error)
Close closes a conversation.
func (*ConversationsResource) Create ¶ added in v0.17.0
func (r *ConversationsResource) Create(ctx context.Context, body managerapi.RestCreateConversation) (*managerapi.ConversationItemResponse, error)
Create creates a conversation.
func (*ConversationsResource) Delete ¶ added in v0.17.0
func (r *ConversationsResource) Delete(ctx context.Context, id string) error
Delete deletes a conversation.
func (*ConversationsResource) Events ¶ added in v0.17.0
func (r *ConversationsResource) Events(ctx context.Context, conversationID string) ([]managerapi.ConversationEvent, error)
Events returns a conversation's events.
func (*ConversationsResource) FirstEvent ¶ added in v0.38.0
func (r *ConversationsResource) FirstEvent(ctx context.Context, conversationID string) (*managerapi.ConversationEventItemResponse, error)
FirstEvent returns a conversation's first event.
func (*ConversationsResource) Get ¶ added in v0.17.0
func (r *ConversationsResource) Get(ctx context.Context, id string) (*managerapi.ConversationItemResponse, error)
Get returns a conversation by id.
func (*ConversationsResource) GetSession ¶ added in v0.17.0
func (r *ConversationsResource) GetSession(ctx context.Context, conversationID string) (*managerapi.ConversationSessionVariablesItemResponse, error)
GetSession returns a conversation's session variables.
func (*ConversationsResource) LatestEvent ¶ added in v0.38.0
func (r *ConversationsResource) LatestEvent(ctx context.Context, conversationID string) (*managerapi.ConversationEventItemResponse, error)
LatestEvent returns a conversation's latest event.
func (*ConversationsResource) List ¶ added in v0.17.0
func (r *ConversationsResource) List(ctx context.Context, params managerapi.ListConversationsParams) iter.Seq2[managerapi.Conversation, error]
List returns an iterator over conversations, auto-paginating across pages.
func (*ConversationsResource) ListAll ¶ added in v0.17.0
func (r *ConversationsResource) ListAll(ctx context.Context, params managerapi.ListConversationsParams) ([]managerapi.Conversation, error)
ListAll collects every conversation into a slice (convenience over List).
func (*ConversationsResource) Open ¶ added in v0.38.0
func (r *ConversationsResource) Open(ctx context.Context, conversationID string) (*managerapi.ConversationItemResponse, error)
Open opens (reactivates) a conversation.
func (*ConversationsResource) Update ¶ added in v0.17.0
func (r *ConversationsResource) Update(ctx context.Context, id string, body managerapi.RestUpdateConversation) (*managerapi.ConversationItemResponse, error)
Update updates a conversation.
func (*ConversationsResource) UpdateSession ¶ added in v0.17.0
func (r *ConversationsResource) UpdateSession(ctx context.Context, conversationID string, variables managerapi.ConversationSessionVariables) (*managerapi.ConversationSessionVariablesItemResponse, error)
UpdateSession updates a conversation's session variables.
type DashboardsResource ¶ added in v0.38.0
type DashboardsResource struct {
// contains filtered or unexported fields
}
DashboardsResource is the reporting-dashboards namespace (/api/v2/dashboards).
func (*DashboardsResource) AddUser ¶ added in v0.38.0
func (r *DashboardsResource) AddUser(ctx context.Context, id, email string) (*managerapi.DefaultV2MessageResponse, error)
AddUser grants a user (by email) access to a dashboard.
func (*DashboardsResource) Create ¶ added in v0.38.0
func (r *DashboardsResource) Create(ctx context.Context, body managerapi.DashboardCreateBody) (*managerapi.DashboardItemResponse, error)
Create creates a dashboard.
func (*DashboardsResource) Delete ¶ added in v0.38.0
func (r *DashboardsResource) Delete(ctx context.Context, id string) error
Delete deletes a dashboard by id.
func (*DashboardsResource) Get ¶ added in v0.38.0
func (r *DashboardsResource) Get(ctx context.Context, id string) (*managerapi.DashboardItemResponse, error)
Get returns a dashboard by id.
func (*DashboardsResource) List ¶ added in v0.38.0
func (r *DashboardsResource) List(ctx context.Context, params managerapi.ListDashboardsParams) iter.Seq2[managerapi.Dashboard, error]
List returns an iterator over dashboards, auto-paginating across pages. The Page field of params is managed by the iterator; any other filters (Q, Uuid, Sort, Order, Max) are honoured.
for dashboard, err := range mgr.Dashboards.List(ctx, managerapi.ListDashboardsParams{}) {
if err != nil { return err }
fmt.Println(dashboard.Name)
}
func (*DashboardsResource) ListAll ¶ added in v0.38.0
func (r *DashboardsResource) ListAll(ctx context.Context, params managerapi.ListDashboardsParams) ([]managerapi.Dashboard, error)
ListAll collects every dashboard into a slice (convenience over List).
func (*DashboardsResource) ListUsers ¶ added in v0.38.0
func (r *DashboardsResource) ListUsers(ctx context.Context, id string) (*managerapi.DashboardUsersResponse, error)
ListUsers lists the users allowed to access a dashboard.
func (*DashboardsResource) RemoveUser ¶ added in v0.38.0
func (r *DashboardsResource) RemoveUser(ctx context.Context, id, userId string) (*managerapi.DefaultV2MessageResponse, error)
RemoveUser revokes a user's (by id) access to a dashboard.
func (*DashboardsResource) Update ¶ added in v0.38.0
func (r *DashboardsResource) Update(ctx context.Context, id string, body managerapi.DashboardUpdateBody) (*managerapi.DashboardItemResponse, error)
Update updates a dashboard.
type DialerBehavioursResource ¶ added in v0.38.0
type DialerBehavioursResource struct {
// contains filtered or unexported fields
}
DialerBehavioursResource is the dialer-behaviours namespace (/api/v2/outbound/dialer-behaviours).
func (*DialerBehavioursResource) Create ¶ added in v0.38.0
func (r *DialerBehavioursResource) Create(ctx context.Context, body managerapi.DialerBehaviourWriteBody) (*managerapi.DialerBehaviourItemResponse, error)
Create creates a dialer behaviour.
func (*DialerBehavioursResource) Delete ¶ added in v0.38.0
func (r *DialerBehavioursResource) Delete(ctx context.Context, id string) error
Delete deletes a dialer behaviour by id.
func (*DialerBehavioursResource) Get ¶ added in v0.38.0
func (r *DialerBehavioursResource) Get(ctx context.Context, id string) (*managerapi.DialerBehaviourItemResponse, error)
Get returns a dialer behaviour by id.
func (*DialerBehavioursResource) List ¶ added in v0.38.0
func (r *DialerBehavioursResource) List(ctx context.Context, pageSize int) iter.Seq2[managerapi.DialerBehaviour, error]
List returns an iterator over dialer behaviours, auto-paginating across pages.
func (*DialerBehavioursResource) ListAll ¶ added in v0.38.0
func (r *DialerBehavioursResource) ListAll(ctx context.Context, pageSize int) ([]managerapi.DialerBehaviour, error)
ListAll collects every dialer behaviour into a slice (convenience over List).
func (*DialerBehavioursResource) Update ¶ added in v0.38.0
func (r *DialerBehavioursResource) Update(ctx context.Context, id string, body managerapi.DialerBehaviourWriteBody) (*managerapi.DialerBehaviourItemResponse, error)
Update updates a dialer behaviour.
type DialerResource ¶ added in v0.38.0
type DialerResource struct {
// Behaviours is the dialer-behaviours sub-namespace (/api/v2/outbound/dialer-behaviours).
Behaviours *DialerBehavioursResource
// contains filtered or unexported fields
}
DialerResource is the dialer namespace (/api/v2/dialer): runtime info, queue control, simple call reporting, plus the dialer-behaviours sub-namespace.
func (*DialerResource) Flush ¶ added in v0.38.0
func (r *DialerResource) Flush(ctx context.Context, id *string, all *bool) (*managerapi.DefaultV2MessageResponse, error)
Flush flushes queued dialer tasks. Pass a task id to flush a single task, or all=true to flush every queued task.
func (*DialerResource) Info ¶ added in v0.38.0
func (r *DialerResource) Info(ctx context.Context) (*managerapi.GenericItemResponse, error)
Info returns the current dialer runtime information.
func (*DialerResource) SimpleReporting ¶ added in v0.38.0
func (r *DialerResource) SimpleReporting(ctx context.Context, params managerapi.ListDialerSimpleReportingCallsParams) iter.Seq2[managerapi.ReportingCall, error]
SimpleReporting returns an iterator over the dialer's simple call report (/api/v2/calls/reporting/simple/dialer), auto-paginating across pages.
for call, err := range mgr.Dialer.SimpleReporting(ctx, managerapi.ListDialerSimpleReportingCallsParams{}) {
if err != nil { return err }
fmt.Println(call.Id)
}
func (*DialerResource) SimpleReportingAll ¶ added in v0.38.0
func (r *DialerResource) SimpleReportingAll(ctx context.Context, params managerapi.ListDialerSimpleReportingCallsParams) ([]managerapi.ReportingCall, error)
SimpleReportingAll collects every call from the dialer's simple report into a slice (convenience over SimpleReporting).
type EventsResource ¶ added in v0.17.0
type EventsResource struct {
// contains filtered or unexported fields
}
EventsResource is the events namespace (/api/v2/events): event definitions and custom events.
func (*EventsResource) CreateCustom ¶ added in v0.17.0
func (r *EventsResource) CreateCustom(ctx context.Context, body managerapi.CustomEventRequest) (*managerapi.EventItemResponse, error)
CreateCustom creates a custom event.
func (*EventsResource) DeleteCustom ¶ added in v0.17.0
func (r *EventsResource) DeleteCustom(ctx context.Context, id string) error
DeleteCustom deletes a custom event.
func (*EventsResource) List ¶ added in v0.17.0
func (r *EventsResource) List(ctx context.Context) ([]managerapi.Event, error)
List returns the available event definitions.
type ExpressionsResource ¶ added in v0.17.0
type ExpressionsResource struct {
// contains filtered or unexported fields
}
ExpressionsResource is the expressions namespace (/api/v2/expressions): catalog and evaluation.
func (*ExpressionsResource) Evaluate ¶ added in v0.17.0
func (r *ExpressionsResource) Evaluate(ctx context.Context, body managerapi.EvaluateExpression, async bool) (*managerapi.EvaluateExpressionResponse, error)
Evaluate evaluates an expression against a sample context. async dispatches automations asynchronously.
func (*ExpressionsResource) List ¶ added in v0.17.0
func (r *ExpressionsResource) List(ctx context.Context) ([]managerapi.AvailableExpression, error)
List returns the available expressions.
type FilesResource ¶ added in v0.38.0
type FilesResource struct {
// contains filtered or unexported fields
}
FilesResource is the stored-files namespace (/api/v2/files) — listing, fetching, downloading, and (bulk) deleting stored files (recordings, prompts, backups, …).
func (*FilesResource) Backups ¶ added in v0.38.0
func (r *FilesResource) Backups(ctx context.Context) ([]managerapi.StoredFile, error)
Backups lists the account's backup files.
func (*FilesResource) BulkDelete ¶ added in v0.38.0
func (r *FilesResource) BulkDelete(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
BulkDelete deletes several stored files by id.
func (*FilesResource) BulkDownload ¶ added in v0.38.0
BulkDownload downloads several stored files as a ZIP (ids passed as a query parameter).
func (*FilesResource) BulkDownloadPost ¶ added in v0.38.0
BulkDownloadPost downloads several stored files as a ZIP (ids in the request body).
func (*FilesResource) Delete ¶ added in v0.38.0
func (r *FilesResource) Delete(ctx context.Context, id string) (*managerapi.DefaultV2MessageResponse, error)
Delete deletes a stored file by id.
func (*FilesResource) Get ¶ added in v0.38.0
func (r *FilesResource) Get(ctx context.Context, id string) (*managerapi.StoredFileItemResponse, error)
Get returns a stored file's metadata by id.
func (*FilesResource) List ¶ added in v0.38.0
func (r *FilesResource) List(ctx context.Context, params managerapi.ListFilesParams) iter.Seq2[managerapi.StoredFile, error]
List returns an iterator over stored files, auto-paginating across pages. Page is managed by the iterator; other filters on params (Type, State, Filename, Q, Sort, Order, Max) are honoured.
func (*FilesResource) ListAll ¶ added in v0.38.0
func (r *FilesResource) ListAll(ctx context.Context, params managerapi.ListFilesParams) ([]managerapi.StoredFile, error)
ListAll collects every stored file into a slice (convenience over List).
func (*FilesResource) ListByType ¶ added in v0.38.0
func (r *FilesResource) ListByType(ctx context.Context, fileType managerapi.StorageType) ([]managerapi.StoredFile, error)
ListByType lists the stored files of a given storage type.
func (*FilesResource) Prompts ¶ added in v0.38.0
func (r *FilesResource) Prompts(ctx context.Context) ([]managerapi.StoredFile, error)
Prompts lists the account's prompt files.
func (*FilesResource) Recordings ¶ added in v0.38.0
func (r *FilesResource) Recordings(ctx context.Context) ([]managerapi.StoredFile, error)
Recordings lists the account's recording files.
type IntegrationsResource ¶ added in v0.17.0
type IntegrationsResource struct {
// contains filtered or unexported fields
}
IntegrationsResource is the integrations namespace (/api/v2/integrations).
List takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*IntegrationsResource) APIProxyGet ¶ added in v0.38.0
func (r *IntegrationsResource) APIProxyGet(ctx context.Context, integrationID, uri string) ([]byte, error)
APIProxyGet proxies a GET request to an integration's upstream API and returns the raw response body.
func (*IntegrationsResource) APIProxyPost ¶ added in v0.38.0
func (r *IntegrationsResource) APIProxyPost(ctx context.Context, integrationID, uri string, body map[string]any) ([]byte, error)
APIProxyPost proxies a POST request to an integration's upstream API and returns the raw response body.
func (*IntegrationsResource) ActionVariables ¶ added in v0.17.0
func (r *IntegrationsResource) ActionVariables(ctx context.Context, provider managerapi.IntegrationProvider, actionName string) (*managerapi.VariableDefinitionItemsResponse, error)
ActionVariables lists the variables a single provider action exposes.
func (*IntegrationsResource) AddAssociation ¶ added in v0.17.0
func (r *IntegrationsResource) AddAssociation(ctx context.Context, integrationID, associationID, actionName string) (*managerapi.IntegrationAddAssociationResponse, error)
AddAssociation associates an integration action with an object.
func (*IntegrationsResource) Authorize ¶ added in v0.38.0
func (r *IntegrationsResource) Authorize(ctx context.Context, id string, body map[string]any) (*managerapi.IntegrationItemResponse, error)
Authorize completes the authorization step for an integration.
func (*IntegrationsResource) Available ¶ added in v0.17.0
func (r *IntegrationsResource) Available(ctx context.Context) (*managerapi.IntegrationListAvailableIntegrationsResponse, error)
Available lists the integration providers available to this account.
func (*IntegrationsResource) BulkDelete ¶ added in v0.38.0
func (r *IntegrationsResource) BulkDelete(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
BulkDelete deletes several integrations by id.
func (*IntegrationsResource) BulkUpdate ¶ added in v0.38.0
func (r *IntegrationsResource) BulkUpdate(ctx context.Context, body managerapi.BulkUpdateIntegrationsRequest) (*managerapi.DefaultV2MessageResponse, error)
BulkUpdate updates several integrations in one request.
func (*IntegrationsResource) Clone ¶ added in v0.38.0
func (r *IntegrationsResource) Clone(ctx context.Context, id string) (*managerapi.IntegrationItemResponse, error)
Clone clones an existing integration.
func (*IntegrationsResource) Create ¶ added in v0.17.0
func (r *IntegrationsResource) Create(ctx context.Context, body managerapi.IntegrationCreateRequest) (*managerapi.IntegrationItemResponse, error)
Create creates an integration.
func (*IntegrationsResource) Delete ¶ added in v0.17.0
func (r *IntegrationsResource) Delete(ctx context.Context, id string) error
Delete deletes an integration.
func (*IntegrationsResource) DeleteToken ¶ added in v0.38.0
func (r *IntegrationsResource) DeleteToken(ctx context.Context, id, tokenID string) (*managerapi.DefaultV2MessageResponse, error)
DeleteToken deletes an integration token by id.
func (*IntegrationsResource) DispatchAction ¶ added in v0.17.0
func (r *IntegrationsResource) DispatchAction(ctx context.Context, integrationID, action string, body managerapi.IntegrationDispatchActionRequest) (*managerapi.IntegrationDispatchActionResponse, error)
DispatchAction dispatches an integration action.
func (*IntegrationsResource) DispatchActionGet ¶ added in v0.38.0
func (r *IntegrationsResource) DispatchActionGet(ctx context.Context, integrationID, action string, params managerapi.DispatchActionGetParams) (*managerapi.IntegrationDispatchActionResponse, error)
DispatchActionGet dispatches an integration action via GET, optionally scoped to a call or session.
func (*IntegrationsResource) DispatchTypeAction ¶ added in v0.38.0
func (r *IntegrationsResource) DispatchTypeAction(ctx context.Context, typ, id, action string, body map[string]any) (*map[string]any, error)
DispatchTypeAction dispatches an action on an integration by type.
func (*IntegrationsResource) ExecuteAction ¶ added in v0.38.0
func (r *IntegrationsResource) ExecuteAction(ctx context.Context, actionType, actionName string, body map[string]any) (*managerapi.DefaultV2MessageResponse, error)
ExecuteAction executes an action by type and name with a free-form request body.
func (*IntegrationsResource) Get ¶ added in v0.17.0
func (r *IntegrationsResource) Get(ctx context.Context, id string) (*managerapi.IntegrationItemResponse, error)
Get returns an integration by id.
func (*IntegrationsResource) GetToken ¶ added in v0.38.0
func (r *IntegrationsResource) GetToken(ctx context.Context, id, tokenID string) (*managerapi.IntegrationTokenItemResponse, error)
GetToken returns a single integration token by id.
func (*IntegrationsResource) Integrate ¶ added in v0.38.0
func (r *IntegrationsResource) Integrate(ctx context.Context, id string, body map[string]any) (*managerapi.IntegrationItemResponse, error)
Integrate runs the integrate step for an integration.
func (*IntegrationsResource) List ¶ added in v0.17.0
func (r *IntegrationsResource) List(ctx context.Context, params managerapi.ListIntegrationsParams) iter.Seq2[managerapi.Integration, error]
List returns an iterator over configured integrations, auto-paginating across pages.
func (*IntegrationsResource) ListActionParams ¶ added in v0.38.0
func (r *IntegrationsResource) ListActionParams(ctx context.Context, providerName, providerActionName string) (*managerapi.ObjectListResponse, error)
ListActionParams lists the parameters a single provider action accepts.
func (*IntegrationsResource) ListActions ¶ added in v0.38.0
func (r *IntegrationsResource) ListActions(ctx context.Context, params managerapi.ListActionsParams) (*managerapi.ObjectListResponse, error)
ListActions lists the actions available across providers, optionally filtered by type.
func (*IntegrationsResource) ListAll ¶ added in v0.17.0
func (r *IntegrationsResource) ListAll(ctx context.Context, params managerapi.ListIntegrationsParams) ([]managerapi.Integration, error)
ListAll collects every integration into a slice (convenience over List).
func (*IntegrationsResource) ListTokens ¶ added in v0.38.0
func (r *IntegrationsResource) ListTokens(ctx context.Context, id string) (*managerapi.IntegrationTokenListResponse, error)
ListTokens lists the OAuth tokens stored for an integration.
func (*IntegrationsResource) ProviderLogo ¶ added in v0.17.0
func (r *IntegrationsResource) ProviderLogo(ctx context.Context, providerName managerapi.IntegrationProvider, size string) (*managerapi.GetIntegrationProviderLogoResponse, error)
ProviderLogo returns a provider's logo at a given size.
func (*IntegrationsResource) ProviderSessionVariables ¶ added in v0.17.0
func (r *IntegrationsResource) ProviderSessionVariables(ctx context.Context, provider string) (*managerapi.IntegrationSessionVariableItemsResponse, error)
ProviderSessionVariables lists the session variables a provider's actions expose.
func (*IntegrationsResource) ProviderTemplate ¶ added in v0.38.0
func (r *IntegrationsResource) ProviderTemplate(ctx context.Context, provider string) (*map[string]any, error)
ProviderTemplate returns the configuration template for a provider.
func (*IntegrationsResource) Providers ¶ added in v0.38.0
func (r *IntegrationsResource) Providers(ctx context.Context) (*managerapi.IntegrationObjectListResponse, error)
Providers lists the integration providers known to the manager.
func (*IntegrationsResource) RefreshToken ¶ added in v0.38.0
func (r *IntegrationsResource) RefreshToken(ctx context.Context, id, tokenID string) (*managerapi.IntegrationTokenItemResponse, error)
RefreshToken refreshes an integration token by id.
func (*IntegrationsResource) RemoveAssociation ¶ added in v0.17.0
func (r *IntegrationsResource) RemoveAssociation(ctx context.Context, integrationID, associationID, actionName string) (*managerapi.IntegrationRemoveAssociationResponse, error)
RemoveAssociation removes an integration action association.
func (*IntegrationsResource) Template ¶ added in v0.38.0
func (r *IntegrationsResource) Template(ctx context.Context, typ, provider string) (*map[string]any, error)
Template returns the configuration template for a given type and provider.
func (*IntegrationsResource) TypeActions ¶ added in v0.38.0
func (r *IntegrationsResource) TypeActions(ctx context.Context, typ string) (*managerapi.IntegrationObjectListResponse, error)
TypeActions lists the actions available for an integration type.
func (*IntegrationsResource) Update ¶ added in v0.17.0
func (r *IntegrationsResource) Update(ctx context.Context, id string, body managerapi.IntegrationUpdateRequest) (*managerapi.IntegrationItemResponse, error)
Update updates an integration.
type InterruptTarget ¶ added in v0.2.0
type InterruptTarget = taskautomationapi.InterruptionTargetStates
InterruptTarget is the state a manager-interrupt transitions a task to.
const ( InterruptCancel InterruptTarget = taskautomationapi.InterruptionTargetStatesCanceled InterruptComplete InterruptTarget = taskautomationapi.InterruptionTargetStatesCompleted InterruptFail InterruptTarget = taskautomationapi.InterruptionTargetStatesFailed )
type ListAgentsQuery ¶ added in v0.3.0
type ListAgentsQuery struct {
// Q searches name, group name, number, email, sourceId and integration label at once.
Q *string
// Enabled restricts to enabled (true) or disabled (false) agents.
Enabled *bool
// Name filters by agent name.
Name *string
// Number filters by the agent's number.
Number *string
// SourceId filters by integration source id.
SourceId *string
// State filters by line status.
State *managerapi.AgentLineStatus
// Source filters by source integration.
Source *string
// GroupIds restricts to agents in these group id(s).
GroupIds []string
// PageSize is the page size (the API's max). Zero uses the server default.
PageSize int
}
ListAgentsQuery filters an agent listing.
type ListApplicationsQuery ¶ added in v0.4.0
type ListApplicationsQuery struct {
// PageSize is the page size (the API's max). Zero uses the server default.
PageSize int
}
ListApplicationsQuery filters an application listing.
type ListTasksQuery ¶ added in v0.2.0
type ListTasksQuery struct {
// Filter is a server-side filter expression.
Filter *string
// PageSize is the page size (1..100); defaults to 100.
PageSize int
}
ListTasksQuery filters a task listing.
type ListUsersQuery ¶
type ListUsersQuery struct {
// Email filters by email address.
Email *string
}
ListUsersQuery filters a user listing.
type LogsResource ¶ added in v0.17.0
type LogsResource struct {
// contains filtered or unexported fields
}
LogsResource is the logs namespace: request audit logs (/api/v2/audit) and live logs (/api/v2/logs).
func (*LogsResource) Audit ¶ added in v0.17.0
func (r *LogsResource) Audit(ctx context.Context, params managerapi.ListAuditLogsParams) iter.Seq2[managerapi.AuditLog, error]
Audit returns an iterator over request audit-log entries, auto-paginating across pages.
func (*LogsResource) AuditAll ¶ added in v0.17.0
func (r *LogsResource) AuditAll(ctx context.Context, params managerapi.ListAuditLogsParams) ([]managerapi.AuditLog, error)
AuditAll collects every audit-log entry into a slice (convenience over Audit).
func (*LogsResource) DisableLive ¶ added in v0.38.0
func (r *LogsResource) DisableLive(ctx context.Context) (*managerapi.DefaultV2MessageResponse, error)
DisableLive turns off live logging and returns the acknowledgement message.
func (*LogsResource) EnableLive ¶ added in v0.38.0
func (r *LogsResource) EnableLive(ctx context.Context) (*managerapi.DefaultV2MessageResponse, error)
EnableLive turns on live logging and returns the acknowledgement message.
func (*LogsResource) Live ¶ added in v0.17.0
func (r *LogsResource) Live(ctx context.Context) ([]managerapi.LiveLog, error)
Live returns the current live logs.
func (*LogsResource) Write ¶ added in v0.38.0
func (r *LogsResource) Write(ctx context.Context, body managerapi.WriteLogRequest) (*managerapi.GenericItemResponse, error)
Write appends an entry to the live log and returns the created item.
type ManagerClient ¶
type ManagerClient struct {
// Users is the user-management namespace (/api/v2/users).
Users *UsersResource
// Me is the authenticated-principal namespace (/api/v2/user): current user, accounts.
Me *MeResource
// Agents is the agent-management namespace (/api/v2/agents).
Agents *AgentsResource
// Calls is the call namespace (/api/v2/calls): reporting and call control.
Calls *CallsResource
// Sms is the SMS-records namespace (/api/v2/sms).
Sms *SmsResource
// Numbers is the service-numbers namespace (/api/v2/numbers).
Numbers *NumbersResource
// Conferences is the conferences namespace (/api/v2/conferences).
Conferences *ConferencesResource
// Queues is the queues namespace (/api/v2/queues), including selections.
Queues *QueuesResource
// Routing is the routing-rules namespace (/api/v2/routings).
Routing *RoutingResource
// Triggers is the workflow-triggers namespace (/api/v2/triggers).
Triggers *TriggersResource
// Automations is the global-automations namespace (/api/v2/events/triggers).
Automations *AutomationsResource
// Integrations is the integrations namespace (/api/v2/integrations).
Integrations *IntegrationsResource
// Outbound is the outbound dialer-lists namespace (/api/v2/outbound/lists).
Outbound *OutboundResource
// Dialer is the dialer namespace (/api/v2/dialer): runtime info, queue control,
// simple reporting and behaviours.
Dialer *DialerResource
// Phonebook is the phonebook-entries namespace (/api/v2/phonebook).
Phonebook *PhonebookResource
// Campaigns is the outbound-campaigns namespace (/api/v2/outbound/campaigns).
Campaigns *CampaignsResource
// BusinessHours is the business-hours namespace (/api/v2/business-hours).
BusinessHours *BusinessHoursResource
// Calendars is the calendars namespace (/api/v2/calendars).
Calendars *CalendarsResource
// Conversations is the conversations namespace (/api/v2/conversations).
Conversations *ConversationsResource
// Sessions is the call/automation-sessions namespace (/api/v2/sessions).
Sessions *SessionsResource
// Prompts is the audio-prompts namespace (/api/v2/prompts).
Prompts *PromptsResource
// Babeldesk is the babeldesk namespace (/api/v2/babeldesk): dashboards and widgets.
Babeldesk *BabeldeskResource
// Dashboards is the reporting-dashboards namespace (/api/v2/dashboards).
Dashboards *DashboardsResource
// Files is the stored-files namespace (/api/v2/files).
Files *FilesResource
// Recordings is the call-recordings namespace (/api/v2/recordings).
Recordings *RecordingsResource
// Events is the events namespace (/api/v2/events): definitions and custom events.
Events *EventsResource
// Logs is the logs namespace: request audit logs (/api/v2/audit) and live logs (/api/v2/logs).
Logs *LogsResource
// Expressions is the expressions namespace (/api/v2/expressions): catalog and evaluation.
Expressions *ExpressionsResource
// Metrics is the metrics namespace (/api/v2/metrics).
Metrics *MetricsResource
// System is the system/reference namespace: health checks (/api/v2/echo, /api/v2/ping,
// /api/v2/status), server time and timezones (/api/v2/data), push tokens (/api/v2/push-token),
// tags (/api/v2/tags), and template exports (/api/v2/templates/export).
System *SystemResource
// Applications is the application (IVR) management namespace (/api/v2/applications).
Applications *ApplicationsResource
// Settings is the global-settings namespace (/api/v2/settings).
Settings *SettingsResource
// Tasks is the task-automation namespace (/api/v3/tasks).
Tasks *TasksResource
// Auth is the OAuth 2.0 namespace (/oauth): authorize, token, and revoke. These endpoints
// authenticate via OAuth client credentials in the request, independent of [Options.Auth].
Auth *AuthResource
}
ManagerClient is the babelforce manager SDK client. Create one with Connect.
type MeResource ¶ added in v0.17.0
type MeResource struct {
// contains filtered or unexported fields
}
MeResource is the authenticated-principal namespace (/api/v2/user): the current user, the accounts they can access, and self-service password reset.
func (*MeResource) Accounts ¶ added in v0.17.0
Accounts lists the accounts the current user can access.
func (*MeResource) Customer ¶ added in v0.17.0
func (r *MeResource) Customer(ctx context.Context) (*userapi.UserCustomerItemResponse, error)
Customer returns the current user together with their account (customer) information.
func (*MeResource) Get ¶ added in v0.17.0
func (r *MeResource) Get(ctx context.Context) (*userapi.UserItemResponse, error)
Get returns the current user.
func (*MeResource) ResetPassword ¶ added in v0.17.0
func (r *MeResource) ResetPassword(ctx context.Context) error
ResetPassword requests a password-reset email for the current user.
type MetricsResource ¶ added in v0.3.0
type MetricsResource struct {
// contains filtered or unexported fields
}
MetricsResource is the metrics namespace (/api/v2/metrics).
func (*MetricsResource) Definitions ¶ added in v0.38.0
func (r *MetricsResource) Definitions(ctx context.Context) (*managerapi.MetricDefinitionListResponse, error)
Definitions returns the definitions for every available metric (GET /api/v2/metrics/describe).
func (*MetricsResource) Describe ¶ added in v0.3.0
func (r *MetricsResource) Describe(ctx context.Context, id string) (*managerapi.MetricDefinitionItemResponse, error)
Describe returns a metric's definition by id.
func (*MetricsResource) Get ¶ added in v0.3.0
func (r *MetricsResource) Get(ctx context.Context, id string) (*managerapi.MetricResponse, error)
Get returns a metric's current value by id.
func (*MetricsResource) ListIds ¶ added in v0.3.0
func (r *MetricsResource) ListIds(ctx context.Context) (*managerapi.MetricIdItemsResponse, error)
ListIds lists the available metric ids.
type NumbersResource ¶ added in v0.17.0
type NumbersResource struct {
// contains filtered or unexported fields
}
NumbersResource is the service-numbers namespace (/api/v2/numbers).
List takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*NumbersResource) AddTags ¶ added in v0.17.0
func (r *NumbersResource) AddTags(ctx context.Context, id string, tags []managerapi.Tag) (*managerapi.ServiceNumberItemResponse, error)
AddTags adds tags to a service number and returns the updated number.
func (*NumbersResource) Get ¶ added in v0.17.0
func (r *NumbersResource) Get(ctx context.Context, id string) (*managerapi.ServiceNumberItemResponse, error)
Get returns a single service number by id.
func (*NumbersResource) List ¶ added in v0.17.0
func (r *NumbersResource) List(ctx context.Context, params managerapi.ListServiceNumbersParams) iter.Seq2[managerapi.ServiceNumber, error]
List returns an iterator over service numbers, auto-paginating across pages.
func (*NumbersResource) ListAll ¶ added in v0.17.0
func (r *NumbersResource) ListAll(ctx context.Context, params managerapi.ListServiceNumbersParams) ([]managerapi.ServiceNumber, error)
ListAll collects every service number into a slice (convenience over List).
func (*NumbersResource) Update ¶ added in v0.38.0
func (r *NumbersResource) Update(ctx context.Context, id string, body map[string]any) (*managerapi.ServiceNumberItemResponse, error)
Update updates a service number from a free-form body (the API accepts an arbitrary object).
type Options ¶
type Options struct {
// BaseURL is the base URL of the babelforce API. Defaults to [DefaultBaseURL].
BaseURL string
// Auth is how the client authenticates. Required.
Auth Auth
// HTTPClient is the underlying HTTP client. Defaults to http.DefaultClient.
HTTPClient *http.Client
// Retry tunes automatic retries. Nil uses sensible defaults (see [RetryPolicy]); set
// &RetryPolicy{MaxRetries: 0} to disable.
Retry *RetryPolicy
}
Options configures a ManagerClient.
type OutboundResource ¶ added in v0.17.0
type OutboundResource struct {
// contains filtered or unexported fields
}
OutboundResource is the outbound dialer-lists namespace (/api/v2/outbound/lists), with leads.
func (*OutboundResource) AddLead ¶ added in v0.17.0
func (r *OutboundResource) AddLead(ctx context.Context, listID string, body managerapi.AddOutboundLeadRequest) (*managerapi.OutboundLeadItemResponse, error)
AddLead adds a lead to an outbound list.
func (*OutboundResource) Attempts ¶ added in v0.38.0
func (r *OutboundResource) Attempts(ctx context.Context, params managerapi.ListOutboundAttemptsParams) iter.Seq2[managerapi.CallAttempt, error]
Attempts returns an iterator over outbound call attempts, auto-paginating across pages. Page is managed by the iterator; leave params.Page unset.
Wraps generated ListOutboundAttempts.
func (*OutboundResource) AttemptsAll ¶ added in v0.38.0
func (r *OutboundResource) AttemptsAll(ctx context.Context, params managerapi.ListOutboundAttemptsParams) ([]managerapi.CallAttempt, error)
AttemptsAll collects every outbound call attempt into a slice (convenience over Attempts).
func (*OutboundResource) BulkDeleteLeads ¶ added in v0.38.0
func (r *OutboundResource) BulkDeleteLeads(ctx context.Context, id string, body managerapi.LeadBulkDeleteRequest) (*managerapi.DefaultV2MessageResponse, error)
BulkDeleteLeads bulk-deletes leads from an outbound list.
Wraps generated BulkDeleteOutboundLeads.
func (*OutboundResource) BulkDeleteLeadsAlt ¶ added in v0.38.0
func (r *OutboundResource) BulkDeleteLeadsAlt(ctx context.Context, id string, body managerapi.LeadBulkDeleteRequest) (*managerapi.DefaultV2MessageResponse, error)
BulkDeleteLeadsAlt bulk-deletes leads from an outbound list via the alternate endpoint.
Wraps generated BulkDeleteOutboundLeadsAlt.
func (*OutboundResource) ClearList ¶ added in v0.17.0
func (r *OutboundResource) ClearList(ctx context.Context, id string) (*managerapi.OutboundListItemResponse, error)
ClearList removes all leads from an outbound list and returns the (now empty) list.
func (*OutboundResource) CreateAgentCall ¶ added in v0.38.0
func (r *OutboundResource) CreateAgentCall(ctx context.Context, id string, body managerapi.AgentOutboundCallRequest) (*managerapi.CallItemResponse, error)
CreateAgentCall starts an outbound call from an agent (by id) to a destination.
Wraps generated CreateAgentOutboundCall.
func (*OutboundResource) CreateList ¶ added in v0.17.0
func (r *OutboundResource) CreateList(ctx context.Context, body managerapi.CreateOutboundListRequest) (*managerapi.OutboundListItemResponse, error)
CreateList creates an outbound list.
func (*OutboundResource) DeleteLead ¶ added in v0.17.0
func (r *OutboundResource) DeleteLead(ctx context.Context, listID, leadID string) error
DeleteLead removes a lead from an outbound list.
func (*OutboundResource) DeleteList ¶ added in v0.38.0
func (r *OutboundResource) DeleteList(ctx context.Context, id string) error
DeleteList deletes an outbound list by id.
Wraps generated DeleteOutboundList.
func (*OutboundResource) GetLead ¶ added in v0.38.0
func (r *OutboundResource) GetLead(ctx context.Context, listID, leadID string) (*managerapi.LeadItemResponse, error)
GetLead returns a single lead from an outbound list.
Wraps generated GetLeadInList.
func (*OutboundResource) GetList ¶ added in v0.38.0
func (r *OutboundResource) GetList(ctx context.Context, id string) (*managerapi.LeadListItemResponse, error)
GetList returns an outbound list by id.
Wraps generated GetOutboundList.
func (*OutboundResource) Leads ¶ added in v0.38.0
func (r *OutboundResource) Leads(ctx context.Context, params managerapi.ListOutboundLeadsParams) iter.Seq2[managerapi.Lead, error]
Leads returns an iterator over outbound leads, auto-paginating across pages. Page is managed by the iterator; leave params.Page unset.
Wraps generated ListOutboundLeads.
func (*OutboundResource) LeadsAll ¶ added in v0.38.0
func (r *OutboundResource) LeadsAll(ctx context.Context, params managerapi.ListOutboundLeadsParams) ([]managerapi.Lead, error)
LeadsAll collects every outbound lead into a slice (convenience over Leads).
func (*OutboundResource) ListLeads ¶ added in v0.38.0
func (r *OutboundResource) ListLeads(ctx context.Context, listID string, params managerapi.ListLeadsInListParams) (*managerapi.PaginatedLeadResponse, error)
ListLeads returns the leads of an outbound list (single page; optionally filtered by status).
Wraps generated ListLeadsInList.
func (*OutboundResource) Lists ¶ added in v0.17.0
func (r *OutboundResource) Lists(ctx context.Context) ([]managerapi.OutboundList, error)
Lists returns all outbound lists.
func (*OutboundResource) ProcessedLeads ¶ added in v0.38.0
func (r *OutboundResource) ProcessedLeads(ctx context.Context, params managerapi.ListProcessedOutboundLeadsParams) iter.Seq2[managerapi.Lead, error]
ProcessedLeads returns an iterator over processed outbound leads, auto-paginating across pages. Page is managed by the iterator; leave params.Page unset.
Wraps generated ListProcessedOutboundLeads.
func (*OutboundResource) ProcessedLeadsAll ¶ added in v0.38.0
func (r *OutboundResource) ProcessedLeadsAll(ctx context.Context, params managerapi.ListProcessedOutboundLeadsParams) ([]managerapi.Lead, error)
ProcessedLeadsAll collects every processed outbound lead into a slice (convenience over ProcessedLeads).
func (*OutboundResource) SimpleReporting ¶ added in v0.38.0
func (r *OutboundResource) SimpleReporting(ctx context.Context, params managerapi.ListOutboundSimpleReportingCallsParams) iter.Seq2[managerapi.ReportingCall, error]
SimpleReporting returns an iterator over outbound simple-reporting calls, auto-paginating across pages. Page is managed by the iterator; leave params.Page unset.
Wraps generated ListOutboundSimpleReportingCalls.
func (*OutboundResource) SimpleReportingAll ¶ added in v0.38.0
func (r *OutboundResource) SimpleReportingAll(ctx context.Context, params managerapi.ListOutboundSimpleReportingCallsParams) ([]managerapi.ReportingCall, error)
SimpleReportingAll collects every outbound simple-reporting call into a slice (convenience over SimpleReporting).
func (*OutboundResource) UpdateLead ¶ added in v0.17.0
func (r *OutboundResource) UpdateLead(ctx context.Context, listID, leadID string, body managerapi.AddOutboundLeadRequest) (*managerapi.OutboundLeadItemResponse, error)
UpdateLead updates a lead in an outbound list.
func (*OutboundResource) UpdateList ¶ added in v0.38.0
func (r *OutboundResource) UpdateList(ctx context.Context, id string, body managerapi.CreateListRequest) (*managerapi.LeadListItemResponse, error)
UpdateList updates an outbound list by id.
Wraps generated UpdateOutboundList.
func (*OutboundResource) UploadLeads ¶ added in v0.38.0
func (r *OutboundResource) UploadLeads(ctx context.Context, id, filename string, file io.Reader, opts UploadLeadsOptions) (*managerapi.LeadUploadResponse, error)
UploadLeads imports leads into an outbound list from a CSV file (multipart upload). filename is the form file name (e.g. "leads.csv") and file streams the CSV contents.
Wraps generated UploadOutboundLeads.
type PhonebookResource ¶ added in v0.17.0
type PhonebookResource struct {
// contains filtered or unexported fields
}
PhonebookResource is the phonebook-entries namespace (/api/v2/phonebook), with bulk CSV download/upload.
List takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*PhonebookResource) BulkDelete ¶ added in v0.38.0
func (r *PhonebookResource) BulkDelete(ctx context.Context, ids []string) (*managerapi.DefaultV2MessageResponse, error)
BulkDelete deletes the given phonebook entries by id.
func (*PhonebookResource) Create ¶ added in v0.17.0
func (r *PhonebookResource) Create(ctx context.Context, body managerapi.RestCreatePhonebookEntry) (*managerapi.PhonebookEntryItemResponse, error)
Create creates a phonebook entry.
func (*PhonebookResource) Delete ¶ added in v0.17.0
func (r *PhonebookResource) Delete(ctx context.Context, id string) error
Delete deletes a phonebook entry.
func (*PhonebookResource) Download ¶ added in v0.17.0
func (r *PhonebookResource) Download(ctx context.Context) ([]byte, error)
Download returns all phonebook entries as a raw CSV export (bulk).
func (*PhonebookResource) Get ¶ added in v0.17.0
func (r *PhonebookResource) Get(ctx context.Context, id string) (*managerapi.PhonebookEntryItemResponse, error)
Get returns a phonebook entry by id.
func (*PhonebookResource) List ¶ added in v0.17.0
func (r *PhonebookResource) List(ctx context.Context, params managerapi.ListPhonebookEntrysParams) iter.Seq2[managerapi.PhonebookEntry, error]
List returns an iterator over phonebook entries, auto-paginating across pages.
func (*PhonebookResource) ListAll ¶ added in v0.17.0
func (r *PhonebookResource) ListAll(ctx context.Context, params managerapi.ListPhonebookEntrysParams) ([]managerapi.PhonebookEntry, error)
ListAll collects every phonebook entry into a slice (convenience over List).
func (*PhonebookResource) Update ¶ added in v0.17.0
func (r *PhonebookResource) Update(ctx context.Context, id string, body managerapi.RestUpdatePhonebookEntry) (*managerapi.PhonebookEntryItemResponse, error)
Update updates a phonebook entry.
type PkceChallenge ¶ added in v0.40.0
type PkceChallenge struct {
CodeVerifier string
CodeChallenge string
CodeChallengeMethod string // always "S256"
}
PkceChallenge is a PKCE code verifier + S256 challenge (RFC 7636).
func GeneratePKCE ¶ added in v0.40.0
func GeneratePKCE() (PkceChallenge, error)
GeneratePKCE returns a fresh PKCE verifier + S256 challenge. Pass CodeChallenge to BuildAuthorizeURL and keep CodeVerifier to exchange the returned code via AuthorizationCodeGrant.
type PromptsResource ¶ added in v0.17.0
type PromptsResource struct {
// contains filtered or unexported fields
}
PromptsResource is the audio-prompts namespace (/api/v2/prompts).
List takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*PromptsResource) Delete ¶ added in v0.17.0
func (r *PromptsResource) Delete(ctx context.Context, id string) error
Delete deletes a prompt.
func (*PromptsResource) Get ¶ added in v0.17.0
func (r *PromptsResource) Get(ctx context.Context, id string) (*managerapi.PromptItemResponse, error)
Get returns a prompt by id.
func (*PromptsResource) List ¶ added in v0.17.0
func (r *PromptsResource) List(ctx context.Context, params managerapi.ListPromptsParams) iter.Seq2[managerapi.Prompt, error]
List returns an iterator over prompts, auto-paginating across pages.
func (*PromptsResource) ListAll ¶ added in v0.17.0
func (r *PromptsResource) ListAll(ctx context.Context, params managerapi.ListPromptsParams) ([]managerapi.Prompt, error)
ListAll collects every prompt into a slice (convenience over List).
func (*PromptsResource) Update ¶ added in v0.17.0
func (r *PromptsResource) Update(ctx context.Context, id string, body managerapi.RestUpdatePrompt) (*managerapi.PromptItemResponse, error)
Update updates a prompt's metadata.
func (*PromptsResource) Upload ¶ added in v0.17.0
func (r *PromptsResource) Upload(ctx context.Context, contentType string, body io.Reader) (*managerapi.PromptItemResponse, error)
Upload uploads a new audio prompt from a stream. contentType is e.g. "audio/wav".
func (*PromptsResource) Uses ¶ added in v0.38.0
func (r *PromptsResource) Uses(ctx context.Context, id string) (*managerapi.ObjectListResponse, error)
Uses lists the objects (e.g. applications) that reference a prompt (GET /api/v2/prompts/{id}/uses).
type QueueSelectionsResource ¶ added in v0.17.0
type QueueSelectionsResource struct {
// contains filtered or unexported fields
}
QueueSelectionsResource is queue selections (routing rules) and their agent/group/tag membership.
func (*QueueSelectionsResource) AddAgent ¶ added in v0.17.0
func (r *QueueSelectionsResource) AddAgent(ctx context.Context, queueID, selectionID, agentID string) (*managerapi.QueueSelectionModificationResponse, error)
AddAgent adds an agent to a selection.
func (*QueueSelectionsResource) AddGroup ¶ added in v0.17.0
func (r *QueueSelectionsResource) AddGroup(ctx context.Context, queueID, selectionID, groupID string) (*managerapi.QueueSelectionModificationResponse, error)
AddGroup adds an agent group to a selection.
func (*QueueSelectionsResource) AddTag ¶ added in v0.17.0
func (r *QueueSelectionsResource) AddTag(ctx context.Context, queueID, selectionID, tagID string) (*managerapi.QueueSelectionModificationResponse, error)
AddTag adds a tag to a selection.
func (*QueueSelectionsResource) Create ¶ added in v0.17.0
func (r *QueueSelectionsResource) Create(ctx context.Context, queueID string, body managerapi.RestCreateQueueSelection) (*managerapi.QueueSelectionItemResponse, error)
Create creates a selection on a queue.
func (*QueueSelectionsResource) Delete ¶ added in v0.17.0
func (r *QueueSelectionsResource) Delete(ctx context.Context, queueID, id string) error
Delete deletes a selection.
func (*QueueSelectionsResource) Get ¶ added in v0.17.0
func (r *QueueSelectionsResource) Get(ctx context.Context, queueID, id string) (*managerapi.QueueSelectionItemResponse, error)
Get returns a selection.
func (*QueueSelectionsResource) List ¶ added in v0.17.0
func (r *QueueSelectionsResource) List(ctx context.Context, queueID string, params managerapi.ListQueueSelectionsParams) iter.Seq2[managerapi.QueueSelection, error]
List returns an iterator over a queue's selections, auto-paginating across pages.
func (*QueueSelectionsResource) ListAll ¶ added in v0.17.0
func (r *QueueSelectionsResource) ListAll(ctx context.Context, queueID string, params managerapi.ListQueueSelectionsParams) ([]managerapi.QueueSelection, error)
ListAll collects every selection for a queue into a slice (convenience over List).
func (*QueueSelectionsResource) RemoveAgent ¶ added in v0.17.0
func (r *QueueSelectionsResource) RemoveAgent(ctx context.Context, queueID, selectionID, id string) (*managerapi.QueueSelectionModificationResponse, error)
RemoveAgent removes an agent from a selection.
func (*QueueSelectionsResource) RemoveGroup ¶ added in v0.17.0
func (r *QueueSelectionsResource) RemoveGroup(ctx context.Context, queueID, selectionID, id string) (*managerapi.QueueSelectionModificationResponse, error)
RemoveGroup removes an agent group from a selection.
func (*QueueSelectionsResource) RemoveTag ¶ added in v0.17.0
func (r *QueueSelectionsResource) RemoveTag(ctx context.Context, queueID, selectionID, id string) (*managerapi.QueueSelectionModificationResponse, error)
RemoveTag removes a tag from a selection.
func (*QueueSelectionsResource) SelectAgents ¶ added in v0.17.0
func (r *QueueSelectionsResource) SelectAgents(ctx context.Context, queueID string) (*managerapi.QueueSelectionResponse, error)
SelectAgents resolves the agents currently selected for a queue.
func (*QueueSelectionsResource) SetPriority ¶ added in v0.38.0
func (r *QueueSelectionsResource) SetPriority(ctx context.Context, queueID string, items []managerapi.QueueSelectionPriorityItem) (*managerapi.QueueSelectionListResponse, error)
SetPriority sets the priority of the given selections on a queue.
func (*QueueSelectionsResource) Update ¶ added in v0.17.0
func (r *QueueSelectionsResource) Update(ctx context.Context, queueID, id string, body managerapi.RestUpdateQueueSelection) (*managerapi.QueueSelectionItemResponse, error)
Update updates a selection.
type QueuesResource ¶ added in v0.17.0
type QueuesResource struct {
// Selections is the queue-selections sub-namespace (/api/v2/queues/{queueId}/selections).
Selections *QueueSelectionsResource
// contains filtered or unexported fields
}
QueuesResource is the queues namespace (/api/v2/queues), with a nested Selections sub-resource.
List takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*QueuesResource) BulkUpdate ¶ added in v0.38.0
func (r *QueuesResource) BulkUpdate(ctx context.Context, body managerapi.QueueBulkUpdateRequest) (*managerapi.QueueListResponse, error)
BulkUpdate updates multiple queues in a single request (each item must include its id).
func (*QueuesResource) Create ¶ added in v0.17.0
func (r *QueuesResource) Create(ctx context.Context, body managerapi.RestCreateQueue) (*managerapi.QueueItemResponse, error)
Create creates a queue.
func (*QueuesResource) Delete ¶ added in v0.17.0
func (r *QueuesResource) Delete(ctx context.Context, id string) error
Delete deletes a queue.
func (*QueuesResource) Get ¶ added in v0.17.0
func (r *QueuesResource) Get(ctx context.Context, id string) (*managerapi.QueueItemResponse, error)
Get returns a queue by id.
func (*QueuesResource) GlobalSelections ¶ added in v0.38.0
func (r *QueuesResource) GlobalSelections(ctx context.Context) (*managerapi.GlobalQueueSelectionListResponse, error)
GlobalSelections lists queue selections across all queues.
func (*QueuesResource) List ¶ added in v0.17.0
func (r *QueuesResource) List(ctx context.Context, params managerapi.ListQueuesParams) iter.Seq2[managerapi.Queue, error]
List returns an iterator over queues, auto-paginating across pages.
func (*QueuesResource) ListAll ¶ added in v0.17.0
func (r *QueuesResource) ListAll(ctx context.Context, params managerapi.ListQueuesParams) ([]managerapi.Queue, error)
ListAll collects every queue into a slice (convenience over List).
func (*QueuesResource) ListTriggers ¶ added in v0.38.0
func (r *QueuesResource) ListTriggers(ctx context.Context, queueID string) (*managerapi.QueueTriggerListResponse, error)
ListTriggers lists the triggers attached to a queue.
func (*QueuesResource) Update ¶ added in v0.17.0
func (r *QueuesResource) Update(ctx context.Context, id string, body managerapi.RestUpdateQueue) (*managerapi.QueueItemResponse, error)
Update updates a queue.
type RecordingsResource ¶ added in v0.38.0
type RecordingsResource struct {
// contains filtered or unexported fields
}
RecordingsResource is the call-recordings namespace (/api/v2/recordings): listing, starting, fetching, updating, deleting, bulk actions and flagging of call recordings.
List takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*RecordingsResource) BulkAction ¶ added in v0.38.0
func (r *RecordingsResource) BulkAction(ctx context.Context, action string, ids []string) (*managerapi.BulkActionResponse, error)
BulkAction applies a bulk action (e.g. "delete", "flag") to several recordings by id.
func (*RecordingsResource) Delete ¶ added in v0.38.0
func (r *RecordingsResource) Delete(ctx context.Context, id string) error
Delete deletes a recording by id.
func (*RecordingsResource) Flag ¶ added in v0.38.0
func (r *RecordingsResource) Flag(ctx context.Context, id string) (*managerapi.RecordingItemResponse, error)
Flag flags a recording by id.
func (*RecordingsResource) Get ¶ added in v0.38.0
func (r *RecordingsResource) Get(ctx context.Context, id string) (*managerapi.RecordingItemResponse, error)
Get returns a recording by id.
func (*RecordingsResource) GetFlag ¶ added in v0.38.0
func (r *RecordingsResource) GetFlag(ctx context.Context, id string) (*managerapi.RecordingItemResponse, error)
GetFlag returns a recording's flag state by id.
func (*RecordingsResource) List ¶ added in v0.38.0
func (r *RecordingsResource) List(ctx context.Context, params managerapi.ListRecordingsParams) iter.Seq2[managerapi.Recording, error]
List returns an iterator over recordings, auto-paginating across pages.
for rec, err := range mgr.Recordings.List(ctx, managerapi.ListRecordingsParams{}) {
if err != nil { return err }
fmt.Println(rec.Id)
}
func (*RecordingsResource) ListAll ¶ added in v0.38.0
func (r *RecordingsResource) ListAll(ctx context.Context, params managerapi.ListRecordingsParams) ([]managerapi.Recording, error)
ListAll collects every recording into a slice (convenience over List).
func (*RecordingsResource) Start ¶ added in v0.38.0
func (r *RecordingsResource) Start(ctx context.Context, body managerapi.RecordingStartRequest) (*managerapi.RecordingItemResponse, error)
Start starts a recording for a call.
func (*RecordingsResource) ToggleFlag ¶ added in v0.38.0
func (r *RecordingsResource) ToggleFlag(ctx context.Context, id string) (*managerapi.RecordingItemResponse, error)
ToggleFlag toggles the flag on a recording by id.
func (*RecordingsResource) Unflag ¶ added in v0.38.0
func (r *RecordingsResource) Unflag(ctx context.Context, id string) (*managerapi.RecordingItemResponse, error)
Unflag removes the flag from a recording by id.
func (*RecordingsResource) Update ¶ added in v0.38.0
func (r *RecordingsResource) Update(ctx context.Context, id string, body managerapi.RecordingUpdateBody) (*managerapi.RecordingItemResponse, error)
Update updates a recording (e.g. its tags) by id.
type ReportingResource ¶ added in v0.3.0
type ReportingResource struct {
// contains filtered or unexported fields
}
ReportingResource is the call-reporting namespace (/api/v2/calls/reporting).
The list methods take the generated parameter structs directly (every filter is an optional pointer field); the Page field is managed by the auto-paginator, so leave it unset.
func (*ReportingResource) InboundSimple ¶ added in v0.38.0
func (r *ReportingResource) InboundSimple(ctx context.Context, params managerapi.ListInboundSimpleReportingCallsParams) iter.Seq2[managerapi.ReportingCall, error]
InboundSimple returns an iterator over the simple inbound call report (/api/v2/calls/reporting/simple/inbound), auto-paginating across pages.
func (*ReportingResource) InboundSimpleAll ¶ added in v0.38.0
func (r *ReportingResource) InboundSimpleAll(ctx context.Context, params managerapi.ListInboundSimpleReportingCallsParams) ([]managerapi.ReportingCall, error)
InboundSimpleAll collects every call from the simple inbound report into a slice (convenience over InboundSimple).
func (*ReportingResource) List ¶ added in v0.3.0
func (r *ReportingResource) List(ctx context.Context, params managerapi.ListReportingCallsParams) iter.Seq2[managerapi.Call, error]
List returns an iterator over the detailed call report, auto-paginating across pages.
for call, err := range mgr.Calls.Reporting.List(ctx, managerapi.ListReportingCallsParams{}) {
if err != nil { return err }
fmt.Println(call.Id)
}
func (*ReportingResource) ListAll ¶ added in v0.3.0
func (r *ReportingResource) ListAll(ctx context.Context, params managerapi.ListReportingCallsParams) ([]managerapi.Call, error)
ListAll collects every call from the detailed report into a slice (convenience over List).
func (*ReportingResource) Simple ¶ added in v0.3.0
func (r *ReportingResource) Simple(ctx context.Context, params managerapi.ListAllSimpleReportingCallsParams) iter.Seq2[managerapi.ReportingCall, error]
Simple returns an iterator over the simple call report across all report types (/api/v2/calls/reporting/simple), auto-paginating across pages.
func (*ReportingResource) SimpleAll ¶ added in v0.3.0
func (r *ReportingResource) SimpleAll(ctx context.Context, params managerapi.ListAllSimpleReportingCallsParams) ([]managerapi.ReportingCall, error)
SimpleAll collects every call from the simple report into a slice (convenience over Simple).
type RetentionSettings ¶ added in v0.4.0
type RetentionSettings struct {
Periods Setting[managerapi.SettingsRetentionPeriods, managerapi.SettingsRetentionPeriodsRequestData]
}
RetentionSettings groups the `retention` settings.
type RetryPolicy ¶ added in v0.17.0
type RetryPolicy struct {
// MaxRetries is the number of retry attempts after the initial request. Default 2; 0 disables.
MaxRetries int
// BaseDelay is the base backoff; it grows exponentially per attempt. Default 250ms.
BaseDelay time.Duration
// MaxDelay caps any single backoff and also caps Retry-After. Default 10s.
MaxDelay time.Duration
// RetryStatus is the set of response status codes that trigger a retry.
// Default: 429, 502, 503, 504.
RetryStatus []int
}
RetryPolicy tunes automatic request retries. Transient failures — network errors and a small set of "try again" status codes (429/502/503/504 by default) — are retried with exponential backoff and jitter, honouring a Retry-After header when present.
Retries are on by default with conservative settings (see Connect). To customise, set Options.Retry; zero-valued delay/status fields fall back to the defaults, but MaxRetries is taken literally — set it to 0 to disable retries.
type RoutingResource ¶ added in v0.17.0
type RoutingResource struct {
// contains filtered or unexported fields
}
RoutingResource is the routing-rules namespace (/api/v2/routings).
List takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*RoutingResource) Create ¶ added in v0.17.0
func (r *RoutingResource) Create(ctx context.Context, body managerapi.RestCreateRouting) (*managerapi.RoutingItemResponse, error)
Create creates a routing.
func (*RoutingResource) Delete ¶ added in v0.17.0
func (r *RoutingResource) Delete(ctx context.Context, id string) error
Delete deletes a routing.
func (*RoutingResource) Get ¶ added in v0.17.0
func (r *RoutingResource) Get(ctx context.Context, id string) (*managerapi.RoutingItemResponse, error)
Get returns a routing by id.
func (*RoutingResource) List ¶ added in v0.17.0
func (r *RoutingResource) List(ctx context.Context, params managerapi.ListRoutingsParams) iter.Seq2[managerapi.Routing, error]
List returns an iterator over routings, auto-paginating across pages.
func (*RoutingResource) ListAll ¶ added in v0.17.0
func (r *RoutingResource) ListAll(ctx context.Context, params managerapi.ListRoutingsParams) ([]managerapi.Routing, error)
ListAll collects every routing into a slice (convenience over List).
func (*RoutingResource) Update ¶ added in v0.17.0
func (r *RoutingResource) Update(ctx context.Context, id string, body managerapi.RestUpdateRouting) (*managerapi.RoutingItemResponse, error)
Update updates a routing.
type SessionsResource ¶ added in v0.17.0
type SessionsResource struct {
// contains filtered or unexported fields
}
SessionsResource is the call/automation sessions namespace (/api/v2/sessions).
func (*SessionsResource) Create ¶ added in v0.17.0
func (r *SessionsResource) Create(ctx context.Context) (*managerapi.SessionResponse, error)
Create creates a new session.
func (*SessionsResource) Get ¶ added in v0.17.0
func (r *SessionsResource) Get(ctx context.Context, id string) (*managerapi.SessionResponse, error)
Get returns a session (its variables) by id.
func (*SessionsResource) UpdateVariables ¶ added in v0.17.0
func (r *SessionsResource) UpdateVariables(ctx context.Context, id string, variables managerapi.UpdateSessionVariablesRequest) (*managerapi.SessionResponse, error)
UpdateVariables updates a session's variables.
type Setting ¶ added in v0.4.0
Setting is one global-settings group: read its full value with Get, replace it with Update. TGet is the returned value type; TUpd is the (partial, all-optional) update payload type.
type SettingsResource ¶ added in v0.4.0
type SettingsResource struct {
App AppSettings
Telephony TelephonySettings
Audit AuditSettings
Ui UiSettings
Retention RetentionSettings
// contains filtered or unexported fields
}
SettingsResource is the global-settings namespace (/api/v2/settings), grouped by scope.
The typed section accessors (App, Telephony, …) read and replace individual scope/key groups. The generic methods (ListAll, ListInScope, Clear, ClearInScope, ClearAll) operate across the whole settings collection or an entire scope at once.
func (*SettingsResource) Clear ¶ added in v0.38.0
func (r *SettingsResource) Clear(ctx context.Context, scope, key string) (*managerapi.SettingItemResponse, error)
Clear resets a single setting to its default and returns the cleared item (DELETE /api/v2/settings/{scope}/{key}).
func (*SettingsResource) ClearAll ¶ added in v0.38.0
func (r *SettingsResource) ClearAll(ctx context.Context) (*managerapi.SettingsListResponse, error)
ClearAll resets every customer setting across all scopes to its default and returns the remaining list (DELETE /api/v2/settings).
func (*SettingsResource) ClearInScope ¶ added in v0.38.0
func (r *SettingsResource) ClearInScope(ctx context.Context, scope string) (*managerapi.SettingsListResponse, error)
ClearInScope resets every setting in a scope to its default and returns the remaining list (DELETE /api/v2/settings/{scope}).
func (*SettingsResource) ListAll ¶ added in v0.38.0
func (r *SettingsResource) ListAll(ctx context.Context) (*managerapi.SettingsListResponse, error)
ListAll lists every customer setting across all scopes (GET /api/v2/settings).
func (*SettingsResource) ListInScope ¶ added in v0.38.0
func (r *SettingsResource) ListInScope(ctx context.Context, scope string) (*managerapi.SettingsListResponse, error)
ListInScope lists every customer setting in a scope (GET /api/v2/settings/{scope}).
type SmsResource ¶ added in v0.17.0
type SmsResource struct {
// contains filtered or unexported fields
}
SmsResource is the SMS-records namespace (/api/v2/sms).
List takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*SmsResource) Delete ¶ added in v0.38.0
func (r *SmsResource) Delete(ctx context.Context, id string) (*managerapi.SmsItemResponse, error)
Delete deletes an SMS record by id, returning the deleted record.
func (*SmsResource) Get ¶ added in v0.17.0
func (r *SmsResource) Get(ctx context.Context, id string) (*managerapi.SmsItemResponse, error)
Get returns a single SMS record by id.
func (*SmsResource) List ¶ added in v0.17.0
func (r *SmsResource) List(ctx context.Context, params managerapi.ListSmssParams) iter.Seq2[managerapi.Sms, error]
List returns an iterator over SMS records, auto-paginating across pages.
func (*SmsResource) ListAll ¶ added in v0.17.0
func (r *SmsResource) ListAll(ctx context.Context, params managerapi.ListSmssParams) ([]managerapi.Sms, error)
ListAll collects every SMS record into a slice (convenience over List).
func (*SmsResource) Report ¶ added in v0.38.0
func (r *SmsResource) Report(ctx context.Context, params managerapi.ReportSmsParams) iter.Seq2[managerapi.Sms, error]
Report returns an iterator over the SMS reporting records, auto-paginating across pages.
Params takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*SmsResource) Send ¶ added in v0.38.0
func (r *SmsResource) Send(ctx context.Context, body managerapi.SmsSendRequest) (*managerapi.SmsItemResponse, error)
Send sends an SMS message.
func (*SmsResource) TestInbound ¶ added in v0.38.0
func (r *SmsResource) TestInbound(ctx context.Context, body managerapi.SmsSendRequest) (*managerapi.SmsItemResponse, error)
TestInbound simulates an inbound SMS message for testing.
type SystemResource ¶ added in v0.38.0
type SystemResource struct {
// contains filtered or unexported fields
}
SystemResource is the system/reference namespace: health checks, server time, timezones, push tokens, tags, and template exports.
func (*SystemResource) ApiStatus ¶ added in v0.38.0
func (r *SystemResource) ApiStatus(ctx context.Context) (*managerapi.GenericItemResponse, error)
ApiStatus returns the API status (/api/v2/status).
func (*SystemResource) Echo ¶ added in v0.38.0
func (r *SystemResource) Echo(ctx context.Context) (*managerapi.GenericItemResponse, error)
Echo returns the request echoed back (/api/v2/echo).
func (*SystemResource) ExportTemplates ¶ added in v0.38.0
func (r *SystemResource) ExportTemplates(ctx context.Context, templateType string) (map[string]any, error)
ExportTemplates exports configuration templates of the given type (/api/v2/templates/export/{type}). The response is a free-form object.
func (*SystemResource) Ping ¶ added in v0.38.0
func (r *SystemResource) Ping(ctx context.Context) (*managerapi.GenericItemResponse, error)
Ping is a liveness check (/api/v2/ping).
func (*SystemResource) PushToken ¶ added in v0.38.0
func (r *SystemResource) PushToken(ctx context.Context) (*managerapi.GenericItemResponse, error)
PushToken returns the push token (/api/v2/push-token).
func (*SystemResource) ServerTime ¶ added in v0.38.0
func (r *SystemResource) ServerTime(ctx context.Context) (*managerapi.GenericItemResponse, error)
ServerTime returns the current server time (/api/v2/data/time).
func (*SystemResource) Tags ¶ added in v0.38.0
func (r *SystemResource) Tags(ctx context.Context) (*managerapi.ObjectListResponse, error)
Tags lists all tags (/api/v2/tags).
func (*SystemResource) TagsByCategory ¶ added in v0.38.0
func (r *SystemResource) TagsByCategory(ctx context.Context, category string) (*managerapi.ObjectListResponse, error)
TagsByCategory lists tags within a category (/api/v2/tags/{category}).
func (*SystemResource) Timezones ¶ added in v0.38.0
func (r *SystemResource) Timezones(ctx context.Context, params managerapi.ListTimezonesParams) (*managerapi.ObjectListResponse, error)
Timezones lists the available timezones (/api/v2/data/timezones).
type TaskMetricsResource ¶ added in v0.17.0
type TaskMetricsResource struct {
// contains filtered or unexported fields
}
TaskMetricsResource is the task & agent metrics namespace (/api/v3/tasks/metrics).
func (*TaskMetricsResource) AgentInteractionDurations ¶ added in v0.17.0
func (r *TaskMetricsResource) AgentInteractionDurations(ctx context.Context, agentID string) (*taskautomationapi.AgentInteractionDurationsResponse, error)
AgentInteractionDurations returns interaction durations for an agent.
func (*TaskMetricsResource) AgentJournal ¶ added in v0.17.0
func (r *TaskMetricsResource) AgentJournal(ctx context.Context, agentID string) (*taskautomationapi.AgentJournalResponse, error)
AgentJournal returns the interaction journal for an agent.
func (*TaskMetricsResource) TaskJournal ¶ added in v0.17.0
func (r *TaskMetricsResource) TaskJournal(ctx context.Context, taskID string) (*taskautomationapi.JournalResponse, error)
TaskJournal returns the journal (event timeline) for a single task.
type TaskSchedulesResource ¶ added in v0.2.0
type TaskSchedulesResource struct {
// contains filtered or unexported fields
}
TaskSchedulesResource is the recurring task-schedule namespace (/api/v3/tasks/schedules).
func (*TaskSchedulesResource) Create ¶ added in v0.2.0
func (r *TaskSchedulesResource) Create(ctx context.Context, schedule taskscheduleapi.SubmitTaskSchedule) error
Create creates a task schedule.
func (*TaskSchedulesResource) Delete ¶ added in v0.2.0
func (r *TaskSchedulesResource) Delete(ctx context.Context, name string) error
Delete deletes a task schedule by name.
func (*TaskSchedulesResource) Get ¶ added in v0.2.0
func (r *TaskSchedulesResource) Get(ctx context.Context, name string) (*taskscheduleapi.TaskSchedule, error)
Get returns a task schedule by name.
func (*TaskSchedulesResource) List ¶ added in v0.2.0
func (r *TaskSchedulesResource) List(ctx context.Context) (*taskscheduleapi.TaskScheduleList, error)
List returns all task schedules.
type TaskScriptsResource ¶ added in v0.17.0
type TaskScriptsResource struct {
// contains filtered or unexported fields
}
TaskScriptsResource is the task-scripts namespace (/api/v3/tasks/scripts).
func (*TaskScriptsResource) Delete ¶ added in v0.17.0
func (r *TaskScriptsResource) Delete(ctx context.Context, scriptType taskautomationapi.ScriptType, codeID string) error
Delete deletes a script.
func (*TaskScriptsResource) Get ¶ added in v0.17.0
func (r *TaskScriptsResource) Get(ctx context.Context, scriptType taskautomationapi.ScriptType, codeID string) (*taskautomationapi.ScriptResponse, error)
Get returns a script by type and code id.
func (*TaskScriptsResource) List ¶ added in v0.17.0
func (r *TaskScriptsResource) List(ctx context.Context, scriptType taskautomationapi.ScriptType) (*taskautomationapi.ScriptListResponse, error)
List lists scripts of a given type.
func (*TaskScriptsResource) Submit ¶ added in v0.17.0
func (r *TaskScriptsResource) Submit(ctx context.Context, scriptType taskautomationapi.ScriptType, body taskautomationapi.Script) (*taskautomationapi.ScriptResponse, error)
Submit creates a script of a given type.
func (*TaskScriptsResource) Update ¶ added in v0.17.0
func (r *TaskScriptsResource) Update(ctx context.Context, scriptType taskautomationapi.ScriptType, codeID string, body taskautomationapi.Script) (*taskautomationapi.ScriptResponse, error)
Update updates a script.
type TaskSecretsResource ¶ added in v0.17.0
type TaskSecretsResource struct {
// contains filtered or unexported fields
}
TaskSecretsResource is the task-secrets namespace (/api/v3/tasks/configurations/secrets).
func (*TaskSecretsResource) Create ¶ added in v0.17.0
func (r *TaskSecretsResource) Create(ctx context.Context, prefix string, secrets taskautomationapi.CreateSecretsJSONRequestBody) error
Create creates secrets under a prefix.
func (*TaskSecretsResource) DeleteKeys ¶ added in v0.17.0
func (r *TaskSecretsResource) DeleteKeys(ctx context.Context, prefix string, keys taskautomationapi.SecretKeys) error
DeleteKeys deletes the given secret keys under a prefix.
func (*TaskSecretsResource) ListKeys ¶ added in v0.17.0
func (r *TaskSecretsResource) ListKeys(ctx context.Context, prefix string) (*taskautomationapi.SecretKeys, error)
ListKeys lists the secret keys under a prefix.
func (*TaskSecretsResource) ListPrefixes ¶ added in v0.17.0
func (r *TaskSecretsResource) ListPrefixes(ctx context.Context) (*taskautomationapi.SecretPrefixes, error)
ListPrefixes lists the secret prefixes.
func (*TaskSecretsResource) Patch ¶ added in v0.17.0
func (r *TaskSecretsResource) Patch(ctx context.Context, prefix string, secrets taskautomationapi.PatchSecretsJSONRequestBody) error
Patch merges secrets under a prefix.
type TaskSelectionConfigResource ¶ added in v0.17.0
type TaskSelectionConfigResource struct {
// contains filtered or unexported fields
}
TaskSelectionConfigResource is the account task-selection configuration (/api/v3/tasks/configurations/selection).
func (*TaskSelectionConfigResource) Create ¶ added in v0.17.0
func (r *TaskSelectionConfigResource) Create(ctx context.Context, body taskautomationapi.CreateSelectionConfigurationJSONRequestBody) (*taskautomationapi.SelectionConfigurationResponse, error)
Create creates the selection configuration.
func (*TaskSelectionConfigResource) Delete ¶ added in v0.17.0
func (r *TaskSelectionConfigResource) Delete(ctx context.Context) error
Delete deletes the selection configuration.
func (*TaskSelectionConfigResource) Read ¶ added in v0.17.0
func (r *TaskSelectionConfigResource) Read(ctx context.Context) (*taskautomationapi.SelectionConfigurationResponse, error)
Read reads the current selection configuration.
func (*TaskSelectionConfigResource) Update ¶ added in v0.17.0
func (r *TaskSelectionConfigResource) Update(ctx context.Context, body taskautomationapi.UpdateSelectionConfigurationJSONRequestBody) (*taskautomationapi.SelectionConfigurationResponse, error)
Update updates the selection configuration.
type TasksResource ¶ added in v0.2.0
type TasksResource struct {
// Schedules is the recurring task-schedule namespace (/api/v3/tasks/schedules).
Schedules *TaskSchedulesResource
// Scripts is the task-scripts namespace (/api/v3/tasks/scripts).
Scripts *TaskScriptsResource
// Secrets is the task-secrets namespace (/api/v3/tasks/configurations/secrets).
Secrets *TaskSecretsResource
// SelectionConfig is the account task-selection configuration (/api/v3/tasks/configurations/selection).
SelectionConfig *TaskSelectionConfigResource
// Metrics is the task & agent metrics namespace (/api/v3/tasks/metrics).
Metrics *TaskMetricsResource
// contains filtered or unexported fields
}
TasksResource is the task-automation namespace (/api/v3/tasks).
func (*TasksResource) AgentAction ¶ added in v0.17.0
func (r *TasksResource) AgentAction(ctx context.Context, taskID string, agentAction taskautomationapi.AgentActions, action taskautomationapi.ManualActionRequest) (*taskautomationapi.TaskResponse, error)
AgentAction performs an agent action on a task (accept / reject / complete).
func (*TasksResource) ChangeState
deprecated
added in
v0.17.0
func (r *TasksResource) ChangeState(ctx context.Context, taskID string, taskState taskautomationapi.TaskState) error
ChangeState transitions a task to a new state.
Deprecated: deprecated by the API; prefer Interrupt.
func (*TasksResource) Create ¶ added in v0.2.0
func (r *TasksResource) Create(ctx context.Context, task taskautomationapi.SubmitTask) (*taskautomationapi.Task, error)
Create creates a task.
func (*TasksResource) CreateFromTemplate ¶ added in v0.2.0
func (r *TasksResource) CreateFromTemplate(ctx context.Context, template string, overrides taskautomationapi.TemplateOverride) (*taskautomationapi.Task, error)
CreateFromTemplate creates a task from a template, with overrides.
func (*TasksResource) Get ¶ added in v0.2.0
func (r *TasksResource) Get(ctx context.Context, taskID string) (*taskautomationapi.Task, error)
Get returns a task by id.
func (*TasksResource) Interrupt ¶ added in v0.2.0
func (r *TasksResource) Interrupt(ctx context.Context, taskID string, target InterruptTarget, action taskautomationapi.ManualActionRequest) error
Interrupt manager-interrupts a task, transitioning it to the given target state.
func (*TasksResource) List ¶ added in v0.2.0
func (r *TasksResource) List(ctx context.Context, q ListTasksQuery) iter.Seq2[taskautomationapi.Task, error]
List returns an iterator over tasks, auto-paginating across pages.
func (*TasksResource) ListAll ¶ added in v0.2.0
func (r *TasksResource) ListAll(ctx context.Context, q ListTasksQuery) ([]taskautomationapi.Task, error)
ListAll collects every task into a slice.
func (*TasksResource) Logs ¶ added in v0.17.0
func (r *TasksResource) Logs(ctx context.Context) (*taskautomationapi.LogsResponse, error)
Logs returns the customer task logs.
func (*TasksResource) SetAgentLock ¶ added in v0.17.0
func (r *TasksResource) SetAgentLock(ctx context.Context, lockState taskautomationapi.AgentLocking) (*taskautomationapi.AgentLockState, error)
SetAgentLock changes the agent task-locking state.
func (*TasksResource) TestAction ¶ added in v0.17.0
func (r *TasksResource) TestAction(ctx context.Context, body taskautomationapi.TestAction) (*taskautomationapi.TestActionResponse, error)
TestAction tests a task action without dispatching it.
func (*TasksResource) Update ¶ added in v0.2.0
func (r *TasksResource) Update(ctx context.Context, taskID string, task taskautomationapi.Task) (*taskautomationapi.Task, error)
Update updates a task.
func (*TasksResource) Usage ¶ added in v0.17.0
func (r *TasksResource) Usage(ctx context.Context) (*taskautomationapi.TaskTimeSeriesResponse, error)
Usage returns the task usage time series.
func (*TasksResource) UsageTypes ¶ added in v0.17.0
func (r *TasksResource) UsageTypes(ctx context.Context) (*taskautomationapi.TaskUsageTypesResponse, error)
UsageTypes returns the available task usage types.
type TelephonySettings ¶ added in v0.4.0
type TelephonySettings struct {
AgentInbound Setting[managerapi.SettingsTelephonyAgentInbound, managerapi.SettingsTelephonyAgentInboundRequestData]
AgentOutbound Setting[managerapi.SettingsTelephonyAgentOutbound, managerapi.SettingsTelephonyAgentOutboundRequestData]
AgentRecording Setting[managerapi.SettingsTelephonyAgentRecording, managerapi.SettingsTelephonyAgentRecordingRequestData]
AgentWrapup Setting[managerapi.SettingsTelephonyAgentWrapup, managerapi.SettingsTelephonyAgentWrapupRequestData]
PostCall Setting[managerapi.SettingsTelephonyPostCall, managerapi.SettingsTelephonyPostCallRequestData]
}
TelephonySettings groups the `telephony` settings.
type TokenResponse ¶
type TokenResponse struct {
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in"`
TokenType string `json:"token_type"`
RefreshToken string `json:"refresh_token"`
}
TokenResponse is the OAuth2 token endpoint response.
func AuthorizationCodeGrant ¶ added in v0.40.0
func AuthorizationCodeGrant(ctx context.Context, hc *http.Client, baseURL, code, redirectURI, clientID, codeVerifier, clientSecret string) (*TokenResponse, error)
AuthorizationCodeGrant exchanges an authorization code (+ PKCE verifier) for tokens via {baseURL}/oauth/token. Public clients pass an empty clientSecret. Exposed for callers who want to manage tokens themselves. A non-2xx response surfaces as a typed *APIError.
func ClientCredentialsGrant ¶ added in v0.38.0
func ClientCredentialsGrant(ctx context.Context, hc *http.Client, baseURL, clientID, clientSecret string) (*TokenResponse, error)
ClientCredentialsGrant exchanges a client_id/client_secret for a token via {baseURL}/oauth/token using the OAuth2 client_credentials grant. Exposed for callers who want to manage tokens themselves. A non-2xx response surfaces as a typed *APIError.
func PasswordGrant ¶
func PasswordGrant(ctx context.Context, hc *http.Client, baseURL, user, pass, clientID string) (*TokenResponse, error)
PasswordGrant exchanges a username/password for a token via {baseURL}/oauth/token. Exposed for callers who want to manage tokens themselves. A non-2xx response surfaces as a typed *APIError.
func RefreshTokenGrant ¶ added in v0.40.0
func RefreshTokenGrant(ctx context.Context, hc *http.Client, baseURL, refreshToken, clientID, clientSecret string) (*TokenResponse, error)
RefreshTokenGrant exchanges the most-recently-issued refresh token for a fresh token set (rotated on every use) via {baseURL}/oauth/token. Exposed for callers who want to manage tokens themselves; the RefreshToken auth mode does this transparently. A non-2xx response surfaces as a typed *APIError.
type TriggersResource ¶ added in v0.17.0
type TriggersResource struct {
// contains filtered or unexported fields
}
TriggersResource is the workflow-triggers namespace (/api/v2/triggers).
List takes the generated parameter struct directly; the Page field is managed by the auto-paginator, so leave it unset.
func (*TriggersResource) BulkAction ¶ added in v0.38.0
func (r *TriggersResource) BulkAction(ctx context.Context, action string, ids []string) (*managerapi.BulkActionResponse, error)
BulkAction applies a bulk action (e.g. "enable", "disable", "delete") to several triggers by id.
func (*TriggersResource) Clone ¶ added in v0.17.0
func (r *TriggersResource) Clone(ctx context.Context, id string) (*managerapi.TriggerItemResponse, error)
Clone clones a trigger and returns the new trigger.
func (*TriggersResource) Conditions ¶ added in v0.38.0
func (r *TriggersResource) Conditions(ctx context.Context, id string) (*managerapi.TriggerConditionListResponse, error)
Conditions lists a trigger's conditions.
func (*TriggersResource) Create ¶ added in v0.17.0
func (r *TriggersResource) Create(ctx context.Context, body managerapi.RestCreateTrigger) (*managerapi.TriggerItemResponse, error)
Create creates a trigger.
func (*TriggersResource) Delete ¶ added in v0.17.0
func (r *TriggersResource) Delete(ctx context.Context, id string) error
Delete deletes a trigger.
func (*TriggersResource) Expressions ¶ added in v0.38.0
func (r *TriggersResource) Expressions(ctx context.Context) (*managerapi.ObjectListResponse, error)
Expressions lists the expressions available for use in trigger conditions.
func (*TriggersResource) Get ¶ added in v0.17.0
func (r *TriggersResource) Get(ctx context.Context, id string) (*managerapi.TriggerItemResponse, error)
Get returns a trigger by id.
func (*TriggersResource) List ¶ added in v0.17.0
func (r *TriggersResource) List(ctx context.Context, params managerapi.ListTriggersParams) iter.Seq2[managerapi.Trigger, error]
List returns an iterator over triggers, auto-paginating across pages.
func (*TriggersResource) ListAll ¶ added in v0.17.0
func (r *TriggersResource) ListAll(ctx context.Context, params managerapi.ListTriggersParams) ([]managerapi.Trigger, error)
ListAll collects every trigger into a slice (convenience over List).
func (*TriggersResource) Operators ¶ added in v0.38.0
func (r *TriggersResource) Operators(ctx context.Context) (*managerapi.ObjectListResponse, error)
Operators lists the operators available for use in trigger conditions.
func (*TriggersResource) SetConditions ¶ added in v0.38.0
func (r *TriggersResource) SetConditions(ctx context.Context, id string, body managerapi.TriggerConditionsRequest) (*managerapi.TriggerItemResponse, error)
SetConditions replaces a trigger's conditions.
func (*TriggersResource) Test ¶ added in v0.17.0
func (r *TriggersResource) Test(ctx context.Context, body managerapi.TestTriggersRequest, testMode bool) (*managerapi.TestTriggersResponse, error)
Test tests trigger conditions against a sample payload. testMode runs without side effects.
func (*TriggersResource) Update ¶ added in v0.17.0
func (r *TriggersResource) Update(ctx context.Context, id string, body managerapi.RestUpdateTrigger) (*managerapi.TriggerItemResponse, error)
Update updates a trigger.
func (*TriggersResource) Uses ¶ added in v0.38.0
func (r *TriggersResource) Uses(ctx context.Context, id string) (*managerapi.TriggerUsesResponse, error)
Uses returns where a trigger is used.
type UiSettings ¶ added in v0.4.0
type UiSettings struct {
I18n Setting[managerapi.SettingsUiI18n, managerapi.SettingsUiI18nRequestData]
}
UiSettings groups the `ui` settings.
type UploadLeadsOptions ¶ added in v0.38.0
type UploadLeadsOptions struct {
// Clear clears the list before importing.
Clear *bool
// Mapping is a JSON string mapping CSV columns to lead fields.
Mapping *string
// Separator is the CSV column separator (default ",").
Separator *string
}
UploadLeadsOptions are the optional fields accepted alongside the CSV file by UploadLeads.
type UsersResource ¶
type UsersResource struct {
// contains filtered or unexported fields
}
UsersResource is the user-management namespace (/api/v2/users).
func (*UsersResource) AddRoles ¶ added in v0.17.0
func (r *UsersResource) AddRoles(ctx context.Context, emails []string, roles []managerapi.AccountRole) error
AddRoles grants the given roles to the given users (by email).
func (*UsersResource) Create ¶
func (r *UsersResource) Create(ctx context.Context, user managerapi.CreateManagedUserRequest) (*managerapi.ManagedUserItemResponse, error)
Create creates a user.
func (*UsersResource) Delete ¶
func (r *UsersResource) Delete(ctx context.Context, emails []string) error
Delete deletes the given users (by email).
func (*UsersResource) Disable ¶
func (r *UsersResource) Disable(ctx context.Context, emails []string) error
Disable disables the given users (by email).
func (*UsersResource) Enable ¶
func (r *UsersResource) Enable(ctx context.Context, emails []string) error
Enable enables the given users (by email).
func (*UsersResource) GetByEmail ¶ added in v0.38.0
func (r *UsersResource) GetByEmail(ctx context.Context, email string) (*managerapi.ManagedUserItemResponse, error)
GetByEmail returns a user by email address (GET /api/v2/users/by-email/{email}).
func (*UsersResource) List ¶
func (r *UsersResource) List(ctx context.Context, q ListUsersQuery) iter.Seq2[managerapi.ManagedUser, error]
List returns an iterator over users. The endpoint exposes no pagination parameters (no page/max query), so the SDK issues a single request and yields the response as served.
for user, err := range mgr.Users.List(ctx, manager.ListUsersQuery{}) {
if err != nil { return err }
fmt.Println(user.Email)
}
func (*UsersResource) ListAll ¶
func (r *UsersResource) ListAll(ctx context.Context, q ListUsersQuery) ([]managerapi.ManagedUser, error)
ListAll collects every user into a slice (convenience over List).
func (*UsersResource) ListRoles ¶ added in v0.17.0
func (r *UsersResource) ListRoles(ctx context.Context) ([]managerapi.AccountRole, error)
ListRoles lists the role names that can be assigned to users.
func (*UsersResource) Me ¶ added in v0.38.0
func (r *UsersResource) Me(ctx context.Context) (*managerapi.GenericItemResponse, error)
Me returns the currently authenticated user (GET /api/v2/me).
func (*UsersResource) RemoveRoles ¶ added in v0.17.0
func (r *UsersResource) RemoveRoles(ctx context.Context, emails []string, roles []managerapi.AccountRole) error
RemoveRoles revokes the given roles from the given users (by email).
func (*UsersResource) ResetPasswords ¶ added in v0.17.0
func (r *UsersResource) ResetPasswords(ctx context.Context, emails []string) error
ResetPasswords triggers a password-reset email for the given users (by email).
Source Files
¶
- agents.go
- applications.go
- auth.go
- authresource.go
- automations.go
- babeldesk.go
- businesshours.go
- calendars.go
- calls.go
- campaigns.go
- client.go
- conferences.go
- conversations.go
- dashboards.go
- dialer.go
- doc.go
- errors.go
- events.go
- expressions.go
- files.go
- ids.go
- integrations.go
- logs.go
- me.go
- metrics.go
- numbers.go
- outbound.go
- pagination.go
- phonebook.go
- prompts.go
- queues.go
- recordings.go
- retry.go
- routing.go
- sessions.go
- settings.go
- sms.go
- system.go
- tasks.go
- triggers.go
- users.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Command example lists users against a babelforce API host.
|
Command example lists users against a babelforce API host. |
|
gen
|
|
|
auth
Package auth provides primitives to interact with the openapi HTTP API.
|
Package auth provides primitives to interact with the openapi HTTP API. |
|
manager
Package manager provides primitives to interact with the openapi HTTP API.
|
Package manager provides primitives to interact with the openapi HTTP API. |
|
taskautomation
Package taskautomation provides primitives to interact with the openapi HTTP API.
|
Package taskautomation provides primitives to interact with the openapi HTTP API. |
|
taskschedule
Package taskschedule provides primitives to interact with the openapi HTTP API.
|
Package taskschedule provides primitives to interact with the openapi HTTP API. |
|
user
Package user provides primitives to interact with the openapi HTTP API.
|
Package user provides primitives to interact with the openapi HTTP API. |