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.APIKey(accessID, accessToken),
})
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
- type APIError
- type AgentGroupsResource
- func (r *AgentGroupsResource) AddAgent(ctx context.Context, groupID, agentID string) (*managerapi.AgentGroupAdditionResponse, 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) ListAll(ctx context.Context, pageSize int) ([]managerapi.AgentGroup, error)
- func (r *AgentGroupsResource) Update(ctx context.Context, id string, body managerapi.RestUpdateAgentGroup) (*managerapi.AgentGroupItemResponse, error)
- type AgentsResource
- func (r *AgentsResource) Create(ctx context.Context, body managerapi.RestCreateAgent) (*managerapi.AgentItemResponse, error)
- func (r *AgentsResource) Delete(ctx context.Context, id string) error
- func (r *AgentsResource) Get(ctx context.Context, id string) (*managerapi.AgentItemResponse, 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) Update(ctx context.Context, id string, body managerapi.RestUpdateAgent) (*managerapi.AgentItemResponse, error)
- func (r *AgentsResource) UpdateStatus(ctx context.Context, id string, status managerapi.UpdateAgentStatusRequest) (*managerapi.AgentStatus, 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) 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) ListAll(ctx context.Context, q ListApplicationsQuery) ([]managerapi.Application, 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
- type AutomationsResource
- 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) 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)
- 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) 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) 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) Update(ctx context.Context, id string, body managerapi.RestUpdateBusinessHour) (*managerapi.BusinessHourItemResponse, error)
- type CalendarsResource
- func (r *CalendarsResource) AddDate(ctx context.Context, id string) 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) GetDates(ctx context.Context, id string) ([]byte, 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) Update(ctx context.Context, id string, body managerapi.RestUpdateCalendar) (*managerapi.CalendarItemResponse, error)
- type CallsResource
- 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) SetSessionVariables(ctx context.Context, id string, ...) (*managerapi.SetCallSessionVariablesResponse, error)
- type CampaignsResource
- 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) List(ctx context.Context) ([]managerapi.OutboundCampaign, 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) 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) Get(ctx context.Context, id string) (*managerapi.ConversationItemResponse, error)
- func (r *ConversationsResource) GetEvent(ctx context.Context, conversationID, id string) (*managerapi.ConversationEventItemResponse, error)
- func (r *ConversationsResource) GetSession(ctx context.Context, conversationID string) (*managerapi.ConversationSessionVariablesItemResponse, 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) 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 EventsResource
- type ExpressionsResource
- type IntegrationsResource
- 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) Available(ctx context.Context) (*managerapi.IntegrationListAvailableIntegrationsResponse, 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) DispatchAction(ctx context.Context, integrationID, action string, ...) (*managerapi.IntegrationDispatchActionResponse, error)
- func (r *IntegrationsResource) Get(ctx context.Context, id string) (*managerapi.IntegrationItemResponse, error)
- func (r *IntegrationsResource) List(ctx context.Context, params managerapi.ListIntegrationsParams) iter.Seq2[managerapi.Integration, error]
- func (r *IntegrationsResource) ListAll(ctx context.Context, params managerapi.ListIntegrationsParams) ([]managerapi.Integration, 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) RemoveAssociation(ctx context.Context, integrationID, associationID, actionName string) (*managerapi.IntegrationRemoveAssociationResponse, 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) Live(ctx context.Context) ([]managerapi.LiveLog, 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) 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)
- func (r *MetricsResource) Push(ctx context.Context) (*managerapi.MetricRequestPushResponse, error)
- func (r *MetricsResource) Reset(ctx context.Context) (*managerapi.MetricResetCountersResponse, 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)
- type Options
- type OutboundResource
- func (r *OutboundResource) AddLead(ctx context.Context, listID string, body managerapi.AddOutboundLeadRequest) (*managerapi.OutboundLeadItemResponse, error)
- func (r *OutboundResource) ClearList(ctx context.Context, id string) (*managerapi.OutboundListItemResponse, 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) Lists(ctx context.Context) ([]managerapi.OutboundList, error)
- func (r *OutboundResource) UpdateLead(ctx context.Context, listID, leadID string, ...) (*managerapi.OutboundLeadItemResponse, error)
- type PhonebookResource
- 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 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)
- 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) Update(ctx context.Context, queueID, id string, ...) (*managerapi.QueueSelectionItemResponse, error)
- type QueuesResource
- 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) 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) Update(ctx context.Context, id string, body managerapi.RestUpdateQueue) (*managerapi.QueueItemResponse, error)
- type ReportingResource
- 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)
- func (r *ReportingResource) SimpleAllByType(ctx context.Context, reportType managerapi.SimpleReportingReportType, ...) ([]managerapi.ReportingCall, error)
- func (r *ReportingResource) SimpleByType(ctx context.Context, reportType managerapi.SimpleReportingReportType, ...) iter.Seq2[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
- type SmsResource
- 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)
- 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
- type TriggersResource
- func (r *TriggersResource) Clone(ctx context.Context, id string) (*managerapi.TriggerItemResponse, 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) 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) 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)
- type UiSettings
- 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) 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) 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 ¶
This section is empty.
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) 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) 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) 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) 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) Delete ¶ added in v0.3.0
func (r *AgentsResource) Delete(ctx context.Context, id string) error
Delete deletes an agent by id.
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) 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) 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) 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).
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) 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) 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) 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 APIKey, Bearer, or Password.
func APIKey ¶
APIKey authenticates with the X-Auth-Access-Id / X-Auth-Access-Token header pair (the primary server-to-server mode).
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) 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) 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.
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) 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) 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) 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) error
AddDate adds a date to a calendar.
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) GetDates ¶ added in v0.17.0
GetDates returns a calendar's dates as the raw response body.
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) 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.
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) 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) 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) 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) List ¶ added in v0.17.0
func (r *CampaignsResource) List(ctx context.Context) ([]managerapi.OutboundCampaign, error)
List returns all outbound campaigns.
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) 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) 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) GetEvent ¶ added in v0.17.0
func (r *ConversationsResource) GetEvent(ctx context.Context, conversationID, id string) (*managerapi.ConversationEventItemResponse, error)
GetEvent returns a single conversation event.
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) 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) 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 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 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) Live ¶ added in v0.17.0
func (r *LogsResource) Live(ctx context.Context) ([]managerapi.LiveLog, error)
Live returns the current live logs.
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
// 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
// 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
// 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
}
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) 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.
func (*MetricsResource) Push ¶ added in v0.3.0
func (r *MetricsResource) Push(ctx context.Context) (*managerapi.MetricRequestPushResponse, error)
Push triggers a metrics push.
func (*MetricsResource) Reset ¶ added in v0.3.0
func (r *MetricsResource) Reset(ctx context.Context) (*managerapi.MetricResetCountersResponse, error)
Reset resets the metric counters.
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).
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) 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) 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) Lists ¶ added in v0.17.0
func (r *OutboundResource) Lists(ctx context.Context) ([]managerapi.OutboundList, error)
Lists returns all outbound lists.
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.
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) 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 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".
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) 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) 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) 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) 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 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) 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).
func (*ReportingResource) SimpleAllByType ¶ added in v0.3.0
func (r *ReportingResource) SimpleAllByType(ctx context.Context, reportType managerapi.SimpleReportingReportType, params managerapi.ListSimpleReportingCallsParams) ([]managerapi.ReportingCall, error)
SimpleAllByType collects every call from a single report type into a slice.
func (*ReportingResource) SimpleByType ¶ added in v0.3.0
func (r *ReportingResource) SimpleByType(ctx context.Context, reportType managerapi.SimpleReportingReportType, params managerapi.ListSimpleReportingCallsParams) iter.Seq2[managerapi.ReportingCall, error]
SimpleByType returns an iterator over the simple call report for a single report type (/api/v2/calls/reporting/simple/{reportType}), auto-paginating across pages.
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
}
SettingsResource is the global-settings namespace (/api/v2/settings), grouped by 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) 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).
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"`
}
TokenResponse is the OAuth2 token endpoint response.
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.
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) 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) 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) 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) 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.
type UiSettings ¶ added in v0.4.0
type UiSettings struct {
I18n Setting[managerapi.SettingsUiI18n, managerapi.SettingsUiI18nRequestData]
}
UiSettings groups the `ui` settings.
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) List ¶
func (r *UsersResource) List(ctx context.Context, q ListUsersQuery) iter.Seq2[managerapi.ManagedUser, error]
List returns an iterator over users, auto-paginating across pages.
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) 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
- automations.go
- babeldesk.go
- businesshours.go
- calendars.go
- calls.go
- campaigns.go
- client.go
- conferences.go
- conversations.go
- doc.go
- errors.go
- events.go
- expressions.go
- integrations.go
- logs.go
- me.go
- metrics.go
- numbers.go
- outbound.go
- phonebook.go
- prompts.go
- queues.go
- retry.go
- routing.go
- sessions.go
- settings.go
- sms.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
|
|
|
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. |