@boltix/sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BaseClient.d.ts +42 -0
- package/dist/BaseClient.js +43 -0
- package/dist/Client.d.ts +77 -0
- package/dist/Client.js +120 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/api/resources/audit/client/Client.d.ts +37 -0
- package/dist/api/resources/audit/client/Client.js +115 -0
- package/dist/api/resources/audit/client/index.d.ts +1 -0
- package/dist/api/resources/audit/client/index.js +1 -0
- package/dist/api/resources/audit/client/requests/GetEventAuditRequest.d.ts +10 -0
- package/dist/api/resources/audit/client/requests/GetEventAuditRequest.js +2 -0
- package/dist/api/resources/audit/client/requests/ListEventsAuditRequest.d.ts +18 -0
- package/dist/api/resources/audit/client/requests/ListEventsAuditRequest.js +2 -0
- package/dist/api/resources/audit/client/requests/index.d.ts +2 -0
- package/dist/api/resources/audit/client/requests/index.js +1 -0
- package/dist/api/resources/audit/exports.d.ts +2 -0
- package/dist/api/resources/audit/exports.js +3 -0
- package/dist/api/resources/audit/index.d.ts +1 -0
- package/dist/api/resources/audit/index.js +1 -0
- package/dist/api/resources/auth/client/Client.d.ts +55 -0
- package/dist/api/resources/auth/client/Client.js +148 -0
- package/dist/api/resources/auth/client/index.d.ts +1 -0
- package/dist/api/resources/auth/client/index.js +1 -0
- package/dist/api/resources/auth/client/requests/LoginInputBody.d.ts +13 -0
- package/dist/api/resources/auth/client/requests/LoginInputBody.js +2 -0
- package/dist/api/resources/auth/client/requests/RefreshInputBody.d.ts +10 -0
- package/dist/api/resources/auth/client/requests/RefreshInputBody.js +2 -0
- package/dist/api/resources/auth/client/requests/RegisterInputBody.d.ts +18 -0
- package/dist/api/resources/auth/client/requests/RegisterInputBody.js +2 -0
- package/dist/api/resources/auth/client/requests/index.d.ts +3 -0
- package/dist/api/resources/auth/client/requests/index.js +1 -0
- package/dist/api/resources/auth/exports.d.ts +2 -0
- package/dist/api/resources/auth/exports.js +3 -0
- package/dist/api/resources/auth/index.d.ts +1 -0
- package/dist/api/resources/auth/index.js +1 -0
- package/dist/api/resources/automation/client/Client.d.ts +161 -0
- package/dist/api/resources/automation/client/Client.js +539 -0
- package/dist/api/resources/automation/client/index.d.ts +1 -0
- package/dist/api/resources/automation/client/index.js +1 -0
- package/dist/api/resources/automation/client/requests/CreateTriggerInputBody.d.ts +43 -0
- package/dist/api/resources/automation/client/requests/CreateTriggerInputBody.js +11 -0
- package/dist/api/resources/automation/client/requests/CreateWorkflowInputBody.d.ts +39 -0
- package/dist/api/resources/automation/client/requests/CreateWorkflowInputBody.js +2 -0
- package/dist/api/resources/automation/client/requests/DeleteTriggerAutomationRequest.d.ts +10 -0
- package/dist/api/resources/automation/client/requests/DeleteTriggerAutomationRequest.js +2 -0
- package/dist/api/resources/automation/client/requests/DeleteWorkflowAutomationRequest.d.ts +10 -0
- package/dist/api/resources/automation/client/requests/DeleteWorkflowAutomationRequest.js +2 -0
- package/dist/api/resources/automation/client/requests/GetConfigAutomationRequest.d.ts +8 -0
- package/dist/api/resources/automation/client/requests/GetConfigAutomationRequest.js +2 -0
- package/dist/api/resources/automation/client/requests/GetTriggerAutomationRequest.d.ts +10 -0
- package/dist/api/resources/automation/client/requests/GetTriggerAutomationRequest.js +2 -0
- package/dist/api/resources/automation/client/requests/GetWorkflowAutomationRequest.d.ts +10 -0
- package/dist/api/resources/automation/client/requests/GetWorkflowAutomationRequest.js +2 -0
- package/dist/api/resources/automation/client/requests/UpdateConfigInputBody.d.ts +46 -0
- package/dist/api/resources/automation/client/requests/UpdateConfigInputBody.js +2 -0
- package/dist/api/resources/automation/client/requests/UpdateTriggerInputBody.d.ts +42 -0
- package/dist/api/resources/automation/client/requests/UpdateTriggerInputBody.js +11 -0
- package/dist/api/resources/automation/client/requests/UpdateWorkflowInputBody.d.ts +38 -0
- package/dist/api/resources/automation/client/requests/UpdateWorkflowInputBody.js +2 -0
- package/dist/api/resources/automation/client/requests/index.d.ts +10 -0
- package/dist/api/resources/automation/client/requests/index.js +2 -0
- package/dist/api/resources/automation/exports.d.ts +2 -0
- package/dist/api/resources/automation/exports.js +3 -0
- package/dist/api/resources/automation/index.d.ts +1 -0
- package/dist/api/resources/automation/index.js +1 -0
- package/dist/api/resources/campaigns/client/Client.d.ts +140 -0
- package/dist/api/resources/campaigns/client/Client.js +447 -0
- package/dist/api/resources/campaigns/client/index.d.ts +1 -0
- package/dist/api/resources/campaigns/client/index.js +1 -0
- package/dist/api/resources/campaigns/client/requests/AddRecipientsInputBody.d.ts +13 -0
- package/dist/api/resources/campaigns/client/requests/AddRecipientsInputBody.js +2 -0
- package/dist/api/resources/campaigns/client/requests/CancelCampaignsRequest.d.ts +10 -0
- package/dist/api/resources/campaigns/client/requests/CancelCampaignsRequest.js +2 -0
- package/dist/api/resources/campaigns/client/requests/CreateCampaignInputBody.d.ts +24 -0
- package/dist/api/resources/campaigns/client/requests/CreateCampaignInputBody.js +2 -0
- package/dist/api/resources/campaigns/client/requests/DeleteCampaignsRequest.d.ts +10 -0
- package/dist/api/resources/campaigns/client/requests/DeleteCampaignsRequest.js +2 -0
- package/dist/api/resources/campaigns/client/requests/GetCampaignsRequest.d.ts +10 -0
- package/dist/api/resources/campaigns/client/requests/GetCampaignsRequest.js +2 -0
- package/dist/api/resources/campaigns/client/requests/ListRecipientsCampaignsRequest.d.ts +10 -0
- package/dist/api/resources/campaigns/client/requests/ListRecipientsCampaignsRequest.js +2 -0
- package/dist/api/resources/campaigns/client/requests/PauseCampaignsRequest.d.ts +10 -0
- package/dist/api/resources/campaigns/client/requests/PauseCampaignsRequest.js +2 -0
- package/dist/api/resources/campaigns/client/requests/StartCampaignsRequest.d.ts +10 -0
- package/dist/api/resources/campaigns/client/requests/StartCampaignsRequest.js +2 -0
- package/dist/api/resources/campaigns/client/requests/UpdateCampaignInputBody.d.ts +26 -0
- package/dist/api/resources/campaigns/client/requests/UpdateCampaignInputBody.js +2 -0
- package/dist/api/resources/campaigns/client/requests/index.d.ts +9 -0
- package/dist/api/resources/campaigns/client/requests/index.js +1 -0
- package/dist/api/resources/campaigns/exports.d.ts +2 -0
- package/dist/api/resources/campaigns/exports.js +3 -0
- package/dist/api/resources/campaigns/index.d.ts +1 -0
- package/dist/api/resources/campaigns/index.js +1 -0
- package/dist/api/resources/catalog/client/Client.d.ts +103 -0
- package/dist/api/resources/catalog/client/Client.js +320 -0
- package/dist/api/resources/catalog/client/index.d.ts +1 -0
- package/dist/api/resources/catalog/client/index.js +1 -0
- package/dist/api/resources/catalog/client/requests/CreateProductInputBody.d.ts +30 -0
- package/dist/api/resources/catalog/client/requests/CreateProductInputBody.js +2 -0
- package/dist/api/resources/catalog/client/requests/CreateStoreInputBody.d.ts +16 -0
- package/dist/api/resources/catalog/client/requests/CreateStoreInputBody.js +2 -0
- package/dist/api/resources/catalog/client/requests/DeleteStoreCatalogRequest.d.ts +10 -0
- package/dist/api/resources/catalog/client/requests/DeleteStoreCatalogRequest.js +2 -0
- package/dist/api/resources/catalog/client/requests/GetStoreCatalogRequest.d.ts +10 -0
- package/dist/api/resources/catalog/client/requests/GetStoreCatalogRequest.js +2 -0
- package/dist/api/resources/catalog/client/requests/ListProductsCatalogRequest.d.ts +10 -0
- package/dist/api/resources/catalog/client/requests/ListProductsCatalogRequest.js +2 -0
- package/dist/api/resources/catalog/client/requests/UpdateStoreInputBody.d.ts +18 -0
- package/dist/api/resources/catalog/client/requests/UpdateStoreInputBody.js +2 -0
- package/dist/api/resources/catalog/client/requests/index.d.ts +6 -0
- package/dist/api/resources/catalog/client/requests/index.js +1 -0
- package/dist/api/resources/catalog/exports.d.ts +2 -0
- package/dist/api/resources/catalog/exports.js +3 -0
- package/dist/api/resources/catalog/index.d.ts +1 -0
- package/dist/api/resources/catalog/index.js +1 -0
- package/dist/api/resources/channels/client/Client.d.ts +75 -0
- package/dist/api/resources/channels/client/Client.js +229 -0
- package/dist/api/resources/channels/client/index.d.ts +1 -0
- package/dist/api/resources/channels/client/index.js +1 -0
- package/dist/api/resources/channels/client/requests/CreateChannelInputBody.d.ts +28 -0
- package/dist/api/resources/channels/client/requests/CreateChannelInputBody.js +2 -0
- package/dist/api/resources/channels/client/requests/DeleteChannelsRequest.d.ts +10 -0
- package/dist/api/resources/channels/client/requests/DeleteChannelsRequest.js +2 -0
- package/dist/api/resources/channels/client/requests/GetChannelsRequest.d.ts +10 -0
- package/dist/api/resources/channels/client/requests/GetChannelsRequest.js +2 -0
- package/dist/api/resources/channels/client/requests/UpdateChannelInputBody.d.ts +31 -0
- package/dist/api/resources/channels/client/requests/UpdateChannelInputBody.js +10 -0
- package/dist/api/resources/channels/client/requests/index.d.ts +4 -0
- package/dist/api/resources/channels/client/requests/index.js +1 -0
- package/dist/api/resources/channels/exports.d.ts +2 -0
- package/dist/api/resources/channels/exports.js +3 -0
- package/dist/api/resources/channels/index.d.ts +1 -0
- package/dist/api/resources/channels/index.js +1 -0
- package/dist/api/resources/contacts/client/Client.d.ts +118 -0
- package/dist/api/resources/contacts/client/Client.js +368 -0
- package/dist/api/resources/contacts/client/index.d.ts +1 -0
- package/dist/api/resources/contacts/client/index.js +1 -0
- package/dist/api/resources/contacts/client/requests/AssignInputBody.d.ts +12 -0
- package/dist/api/resources/contacts/client/requests/AssignInputBody.js +2 -0
- package/dist/api/resources/contacts/client/requests/CreateContactInputBody.d.ts +21 -0
- package/dist/api/resources/contacts/client/requests/CreateContactInputBody.js +2 -0
- package/dist/api/resources/contacts/client/requests/DeleteContactsRequest.d.ts +10 -0
- package/dist/api/resources/contacts/client/requests/DeleteContactsRequest.js +2 -0
- package/dist/api/resources/contacts/client/requests/GetContactsRequest.d.ts +10 -0
- package/dist/api/resources/contacts/client/requests/GetContactsRequest.js +2 -0
- package/dist/api/resources/contacts/client/requests/MarkReadContactsRequest.d.ts +10 -0
- package/dist/api/resources/contacts/client/requests/MarkReadContactsRequest.js +2 -0
- package/dist/api/resources/contacts/client/requests/SetTagsInputBody.d.ts +14 -0
- package/dist/api/resources/contacts/client/requests/SetTagsInputBody.js +2 -0
- package/dist/api/resources/contacts/client/requests/UpdateContactInputBody.d.ts +14 -0
- package/dist/api/resources/contacts/client/requests/UpdateContactInputBody.js +2 -0
- package/dist/api/resources/contacts/client/requests/index.d.ts +7 -0
- package/dist/api/resources/contacts/client/requests/index.js +1 -0
- package/dist/api/resources/contacts/exports.d.ts +2 -0
- package/dist/api/resources/contacts/exports.js +3 -0
- package/dist/api/resources/contacts/index.d.ts +1 -0
- package/dist/api/resources/contacts/index.js +1 -0
- package/dist/api/resources/identity/client/Client.d.ts +58 -0
- package/dist/api/resources/identity/client/Client.js +180 -0
- package/dist/api/resources/identity/client/index.d.ts +1 -0
- package/dist/api/resources/identity/client/index.js +1 -0
- package/dist/api/resources/identity/client/requests/CreateAccountInputBody.d.ts +15 -0
- package/dist/api/resources/identity/client/requests/CreateAccountInputBody.js +2 -0
- package/dist/api/resources/identity/client/requests/UpdateProfileInputBody.d.ts +10 -0
- package/dist/api/resources/identity/client/requests/UpdateProfileInputBody.js +2 -0
- package/dist/api/resources/identity/client/requests/index.d.ts +2 -0
- package/dist/api/resources/identity/client/requests/index.js +1 -0
- package/dist/api/resources/identity/exports.d.ts +2 -0
- package/dist/api/resources/identity/exports.js +3 -0
- package/dist/api/resources/identity/index.d.ts +1 -0
- package/dist/api/resources/identity/index.js +1 -0
- package/dist/api/resources/index.d.ts +36 -0
- package/dist/api/resources/index.js +36 -0
- package/dist/api/resources/insights/client/Client.d.ts +90 -0
- package/dist/api/resources/insights/client/Client.js +274 -0
- package/dist/api/resources/insights/client/index.d.ts +1 -0
- package/dist/api/resources/insights/client/index.js +1 -0
- package/dist/api/resources/insights/client/requests/CreatePanelInputBody.d.ts +81 -0
- package/dist/api/resources/insights/client/requests/CreatePanelInputBody.js +30 -0
- package/dist/api/resources/insights/client/requests/DeletePanelInsightsRequest.d.ts +10 -0
- package/dist/api/resources/insights/client/requests/DeletePanelInsightsRequest.js +2 -0
- package/dist/api/resources/insights/client/requests/GetPanelDataInsightsRequest.d.ts +10 -0
- package/dist/api/resources/insights/client/requests/GetPanelDataInsightsRequest.js +2 -0
- package/dist/api/resources/insights/client/requests/GetPanelInsightsRequest.d.ts +10 -0
- package/dist/api/resources/insights/client/requests/GetPanelInsightsRequest.js +2 -0
- package/dist/api/resources/insights/client/requests/UpdatePanelInputBody.d.ts +83 -0
- package/dist/api/resources/insights/client/requests/UpdatePanelInputBody.js +30 -0
- package/dist/api/resources/insights/client/requests/index.d.ts +5 -0
- package/dist/api/resources/insights/client/requests/index.js +2 -0
- package/dist/api/resources/insights/exports.d.ts +2 -0
- package/dist/api/resources/insights/exports.js +3 -0
- package/dist/api/resources/insights/index.d.ts +1 -0
- package/dist/api/resources/insights/index.js +1 -0
- package/dist/api/resources/intelligence/client/Client.d.ts +76 -0
- package/dist/api/resources/intelligence/client/Client.js +239 -0
- package/dist/api/resources/intelligence/client/index.d.ts +1 -0
- package/dist/api/resources/intelligence/client/index.js +1 -0
- package/dist/api/resources/intelligence/client/requests/CreateContextInputBody.d.ts +33 -0
- package/dist/api/resources/intelligence/client/requests/CreateContextInputBody.js +9 -0
- package/dist/api/resources/intelligence/client/requests/DeleteContextIntelligenceRequest.d.ts +10 -0
- package/dist/api/resources/intelligence/client/requests/DeleteContextIntelligenceRequest.js +2 -0
- package/dist/api/resources/intelligence/client/requests/GetContextIntelligenceRequest.d.ts +10 -0
- package/dist/api/resources/intelligence/client/requests/GetContextIntelligenceRequest.js +2 -0
- package/dist/api/resources/intelligence/client/requests/UpdateContextInputBody.d.ts +34 -0
- package/dist/api/resources/intelligence/client/requests/UpdateContextInputBody.js +9 -0
- package/dist/api/resources/intelligence/client/requests/index.d.ts +4 -0
- package/dist/api/resources/intelligence/client/requests/index.js +2 -0
- package/dist/api/resources/intelligence/exports.d.ts +2 -0
- package/dist/api/resources/intelligence/exports.js +3 -0
- package/dist/api/resources/intelligence/index.d.ts +1 -0
- package/dist/api/resources/intelligence/index.js +1 -0
- package/dist/api/resources/media/client/Client.d.ts +40 -0
- package/dist/api/resources/media/client/Client.js +107 -0
- package/dist/api/resources/media/client/index.d.ts +1 -0
- package/dist/api/resources/media/client/index.js +1 -0
- package/dist/api/resources/media/client/requests/CreateDownloadUrlInputBody.d.ts +10 -0
- package/dist/api/resources/media/client/requests/CreateDownloadUrlInputBody.js +2 -0
- package/dist/api/resources/media/client/requests/CreateUploadUrlInputBody.d.ts +13 -0
- package/dist/api/resources/media/client/requests/CreateUploadUrlInputBody.js +2 -0
- package/dist/api/resources/media/client/requests/index.d.ts +2 -0
- package/dist/api/resources/media/client/requests/index.js +1 -0
- package/dist/api/resources/media/exports.d.ts +2 -0
- package/dist/api/resources/media/exports.js +3 -0
- package/dist/api/resources/media/index.d.ts +1 -0
- package/dist/api/resources/media/index.js +1 -0
- package/dist/api/resources/messages/client/Client.d.ts +40 -0
- package/dist/api/resources/messages/client/Client.js +113 -0
- package/dist/api/resources/messages/client/index.d.ts +1 -0
- package/dist/api/resources/messages/client/index.js +1 -0
- package/dist/api/resources/messages/client/requests/ListMessagesRequest.d.ts +14 -0
- package/dist/api/resources/messages/client/requests/ListMessagesRequest.js +2 -0
- package/dist/api/resources/messages/client/requests/SendMessageInputBody.d.ts +29 -0
- package/dist/api/resources/messages/client/requests/SendMessageInputBody.js +2 -0
- package/dist/api/resources/messages/client/requests/index.d.ts +2 -0
- package/dist/api/resources/messages/client/requests/index.js +1 -0
- package/dist/api/resources/messages/exports.d.ts +2 -0
- package/dist/api/resources/messages/exports.js +3 -0
- package/dist/api/resources/messages/index.d.ts +1 -0
- package/dist/api/resources/messages/index.js +1 -0
- package/dist/api/resources/organizations/client/Client.d.ts +47 -0
- package/dist/api/resources/organizations/client/Client.js +140 -0
- package/dist/api/resources/organizations/client/index.d.ts +1 -0
- package/dist/api/resources/organizations/client/index.js +1 -0
- package/dist/api/resources/organizations/client/requests/CreateOrganizationInputBody.d.ts +15 -0
- package/dist/api/resources/organizations/client/requests/CreateOrganizationInputBody.js +2 -0
- package/dist/api/resources/organizations/client/requests/index.d.ts +1 -0
- package/dist/api/resources/organizations/client/requests/index.js +1 -0
- package/dist/api/resources/organizations/exports.d.ts +2 -0
- package/dist/api/resources/organizations/exports.js +3 -0
- package/dist/api/resources/organizations/index.d.ts +1 -0
- package/dist/api/resources/organizations/index.js +1 -0
- package/dist/api/resources/routing/client/Client.d.ts +182 -0
- package/dist/api/resources/routing/client/Client.js +594 -0
- package/dist/api/resources/routing/client/index.d.ts +1 -0
- package/dist/api/resources/routing/client/index.js +1 -0
- package/dist/api/resources/routing/client/requests/AddAgentInputBody.d.ts +23 -0
- package/dist/api/resources/routing/client/requests/AddAgentInputBody.js +9 -0
- package/dist/api/resources/routing/client/requests/AssignHandoffInputBody.d.ts +13 -0
- package/dist/api/resources/routing/client/requests/AssignHandoffInputBody.js +2 -0
- package/dist/api/resources/routing/client/requests/CreateHandoffInputBody.d.ts +32 -0
- package/dist/api/resources/routing/client/requests/CreateHandoffInputBody.js +11 -0
- package/dist/api/resources/routing/client/requests/CreateTeamInputBody.d.ts +27 -0
- package/dist/api/resources/routing/client/requests/CreateTeamInputBody.js +10 -0
- package/dist/api/resources/routing/client/requests/DeleteTeamRoutingRequest.d.ts +10 -0
- package/dist/api/resources/routing/client/requests/DeleteTeamRoutingRequest.js +2 -0
- package/dist/api/resources/routing/client/requests/GetTeamRoutingRequest.d.ts +10 -0
- package/dist/api/resources/routing/client/requests/GetTeamRoutingRequest.js +2 -0
- package/dist/api/resources/routing/client/requests/ListAgentsRoutingRequest.d.ts +10 -0
- package/dist/api/resources/routing/client/requests/ListAgentsRoutingRequest.js +2 -0
- package/dist/api/resources/routing/client/requests/ListHandoffsRoutingRequest.d.ts +8 -0
- package/dist/api/resources/routing/client/requests/ListHandoffsRoutingRequest.js +2 -0
- package/dist/api/resources/routing/client/requests/PickNextHandoffInputBody.d.ts +10 -0
- package/dist/api/resources/routing/client/requests/PickNextHandoffInputBody.js +2 -0
- package/dist/api/resources/routing/client/requests/RemoveAgentRoutingRequest.d.ts +13 -0
- package/dist/api/resources/routing/client/requests/RemoveAgentRoutingRequest.js +2 -0
- package/dist/api/resources/routing/client/requests/ResumeHandoffRoutingRequest.d.ts +10 -0
- package/dist/api/resources/routing/client/requests/ResumeHandoffRoutingRequest.js +2 -0
- package/dist/api/resources/routing/client/requests/UpdateTeamInputBody.d.ts +29 -0
- package/dist/api/resources/routing/client/requests/UpdateTeamInputBody.js +10 -0
- package/dist/api/resources/routing/client/requests/index.d.ts +12 -0
- package/dist/api/resources/routing/client/requests/index.js +4 -0
- package/dist/api/resources/routing/exports.d.ts +2 -0
- package/dist/api/resources/routing/exports.js +3 -0
- package/dist/api/resources/routing/index.d.ts +1 -0
- package/dist/api/resources/routing/index.js +1 -0
- package/dist/api/resources/snippets/client/Client.d.ts +76 -0
- package/dist/api/resources/snippets/client/Client.js +230 -0
- package/dist/api/resources/snippets/client/index.d.ts +1 -0
- package/dist/api/resources/snippets/client/index.js +1 -0
- package/dist/api/resources/snippets/client/requests/CreateSnippetInputBody.d.ts +21 -0
- package/dist/api/resources/snippets/client/requests/CreateSnippetInputBody.js +2 -0
- package/dist/api/resources/snippets/client/requests/DeleteSnippetsRequest.d.ts +10 -0
- package/dist/api/resources/snippets/client/requests/DeleteSnippetsRequest.js +2 -0
- package/dist/api/resources/snippets/client/requests/GetSnippetsRequest.d.ts +10 -0
- package/dist/api/resources/snippets/client/requests/GetSnippetsRequest.js +2 -0
- package/dist/api/resources/snippets/client/requests/UpdateSnippetInputBody.d.ts +22 -0
- package/dist/api/resources/snippets/client/requests/UpdateSnippetInputBody.js +2 -0
- package/dist/api/resources/snippets/client/requests/index.d.ts +4 -0
- package/dist/api/resources/snippets/client/requests/index.js +1 -0
- package/dist/api/resources/snippets/exports.d.ts +2 -0
- package/dist/api/resources/snippets/exports.js +3 -0
- package/dist/api/resources/snippets/index.d.ts +1 -0
- package/dist/api/resources/snippets/index.js +1 -0
- package/dist/api/resources/tags/client/Client.d.ts +62 -0
- package/dist/api/resources/tags/client/Client.js +186 -0
- package/dist/api/resources/tags/client/index.d.ts +1 -0
- package/dist/api/resources/tags/client/index.js +1 -0
- package/dist/api/resources/tags/client/requests/CreateTagInputBody.d.ts +24 -0
- package/dist/api/resources/tags/client/requests/CreateTagInputBody.js +13 -0
- package/dist/api/resources/tags/client/requests/DeleteTagsRequest.d.ts +10 -0
- package/dist/api/resources/tags/client/requests/DeleteTagsRequest.js +2 -0
- package/dist/api/resources/tags/client/requests/UpdateTagInputBody.d.ts +24 -0
- package/dist/api/resources/tags/client/requests/UpdateTagInputBody.js +13 -0
- package/dist/api/resources/tags/client/requests/index.d.ts +3 -0
- package/dist/api/resources/tags/client/requests/index.js +2 -0
- package/dist/api/resources/tags/exports.d.ts +2 -0
- package/dist/api/resources/tags/exports.js +3 -0
- package/dist/api/resources/tags/index.d.ts +1 -0
- package/dist/api/resources/tags/index.js +1 -0
- package/dist/api/resources/templates/client/Client.d.ts +100 -0
- package/dist/api/resources/templates/client/Client.js +313 -0
- package/dist/api/resources/templates/client/index.d.ts +1 -0
- package/dist/api/resources/templates/client/index.js +1 -0
- package/dist/api/resources/templates/client/requests/CreateTemplateInputBody.d.ts +42 -0
- package/dist/api/resources/templates/client/requests/CreateTemplateInputBody.js +2 -0
- package/dist/api/resources/templates/client/requests/DeleteTemplatesRequest.d.ts +10 -0
- package/dist/api/resources/templates/client/requests/DeleteTemplatesRequest.js +2 -0
- package/dist/api/resources/templates/client/requests/GetTemplatesRequest.d.ts +10 -0
- package/dist/api/resources/templates/client/requests/GetTemplatesRequest.js +2 -0
- package/dist/api/resources/templates/client/requests/SubmitTemplatesRequest.d.ts +10 -0
- package/dist/api/resources/templates/client/requests/SubmitTemplatesRequest.js +2 -0
- package/dist/api/resources/templates/client/requests/UpdateTemplateInputBody.d.ts +42 -0
- package/dist/api/resources/templates/client/requests/UpdateTemplateInputBody.js +2 -0
- package/dist/api/resources/templates/client/requests/index.d.ts +5 -0
- package/dist/api/resources/templates/client/requests/index.js +1 -0
- package/dist/api/resources/templates/exports.d.ts +2 -0
- package/dist/api/resources/templates/exports.js +3 -0
- package/dist/api/resources/templates/index.d.ts +1 -0
- package/dist/api/resources/templates/index.js +1 -0
- package/dist/api/resources/webhooks/client/Client.d.ts +152 -0
- package/dist/api/resources/webhooks/client/Client.js +490 -0
- package/dist/api/resources/webhooks/client/index.d.ts +1 -0
- package/dist/api/resources/webhooks/client/index.js +1 -0
- package/dist/api/resources/webhooks/client/requests/CreateActionInputBody.d.ts +21 -0
- package/dist/api/resources/webhooks/client/requests/CreateActionInputBody.js +2 -0
- package/dist/api/resources/webhooks/client/requests/CreateWebhookInputBody.d.ts +21 -0
- package/dist/api/resources/webhooks/client/requests/CreateWebhookInputBody.js +2 -0
- package/dist/api/resources/webhooks/client/requests/DeleteActionWebhooksRequest.d.ts +10 -0
- package/dist/api/resources/webhooks/client/requests/DeleteActionWebhooksRequest.js +2 -0
- package/dist/api/resources/webhooks/client/requests/DeleteWebhooksRequest.d.ts +10 -0
- package/dist/api/resources/webhooks/client/requests/DeleteWebhooksRequest.js +2 -0
- package/dist/api/resources/webhooks/client/requests/GetActionWebhooksRequest.d.ts +10 -0
- package/dist/api/resources/webhooks/client/requests/GetActionWebhooksRequest.js +2 -0
- package/dist/api/resources/webhooks/client/requests/GetWebhooksRequest.d.ts +10 -0
- package/dist/api/resources/webhooks/client/requests/GetWebhooksRequest.js +2 -0
- package/dist/api/resources/webhooks/client/requests/TestWebhooksRequest.d.ts +10 -0
- package/dist/api/resources/webhooks/client/requests/TestWebhooksRequest.js +2 -0
- package/dist/api/resources/webhooks/client/requests/UpdateActionInputBody.d.ts +22 -0
- package/dist/api/resources/webhooks/client/requests/UpdateActionInputBody.js +2 -0
- package/dist/api/resources/webhooks/client/requests/UpdateWebhookInputBody.d.ts +22 -0
- package/dist/api/resources/webhooks/client/requests/UpdateWebhookInputBody.js +2 -0
- package/dist/api/resources/webhooks/client/requests/index.d.ts +9 -0
- package/dist/api/resources/webhooks/client/requests/index.js +1 -0
- package/dist/api/resources/webhooks/exports.d.ts +2 -0
- package/dist/api/resources/webhooks/exports.js +3 -0
- package/dist/api/resources/webhooks/index.d.ts +1 -0
- package/dist/api/resources/webhooks/index.js +1 -0
- package/dist/api/types/ActionResponse.d.ts +23 -0
- package/dist/api/types/ActionResponse.js +2 -0
- package/dist/api/types/AddRecipientsOutputBody.d.ts +7 -0
- package/dist/api/types/AddRecipientsOutputBody.js +2 -0
- package/dist/api/types/AgentResponse.d.ts +18 -0
- package/dist/api/types/AgentResponse.js +2 -0
- package/dist/api/types/AutomationConfigResponse.d.ts +48 -0
- package/dist/api/types/AutomationConfigResponse.js +2 -0
- package/dist/api/types/AutomationTriggerResponse.d.ts +40 -0
- package/dist/api/types/AutomationTriggerResponse.js +2 -0
- package/dist/api/types/AutomationWorkflowResponse.d.ts +46 -0
- package/dist/api/types/AutomationWorkflowResponse.js +2 -0
- package/dist/api/types/CampaignResponse.d.ts +48 -0
- package/dist/api/types/CampaignResponse.js +2 -0
- package/dist/api/types/ChannelResponse.d.ts +43 -0
- package/dist/api/types/ChannelResponse.js +10 -0
- package/dist/api/types/ChartDataPointResponse.d.ts +6 -0
- package/dist/api/types/ChartDataPointResponse.js +2 -0
- package/dist/api/types/ContactResponse.d.ts +34 -0
- package/dist/api/types/ContactResponse.js +2 -0
- package/dist/api/types/CreateDownloadUrlOutputBody.d.ts +8 -0
- package/dist/api/types/CreateDownloadUrlOutputBody.js +2 -0
- package/dist/api/types/CreateUploadUrlOutputBody.d.ts +10 -0
- package/dist/api/types/CreateUploadUrlOutputBody.js +2 -0
- package/dist/api/types/ErrorDetail.d.ts +8 -0
- package/dist/api/types/ErrorDetail.js +2 -0
- package/dist/api/types/ErrorModel.d.ts +17 -0
- package/dist/api/types/ErrorModel.js +2 -0
- package/dist/api/types/EventResponse.d.ts +21 -0
- package/dist/api/types/EventResponse.js +2 -0
- package/dist/api/types/HandoffResponse.d.ts +48 -0
- package/dist/api/types/HandoffResponse.js +2 -0
- package/dist/api/types/IdentityAccountResponse.d.ts +28 -0
- package/dist/api/types/IdentityAccountResponse.js +2 -0
- package/dist/api/types/IntelligenceContextResponse.d.ts +39 -0
- package/dist/api/types/IntelligenceContextResponse.js +9 -0
- package/dist/api/types/ListAccountsOutputBody.d.ts +7 -0
- package/dist/api/types/ListAccountsOutputBody.js +2 -0
- package/dist/api/types/ListActionsOutputBody.d.ts +7 -0
- package/dist/api/types/ListActionsOutputBody.js +2 -0
- package/dist/api/types/ListAgentsOutputBody.d.ts +7 -0
- package/dist/api/types/ListAgentsOutputBody.js +2 -0
- package/dist/api/types/ListCampaignsOutputBody.d.ts +7 -0
- package/dist/api/types/ListCampaignsOutputBody.js +2 -0
- package/dist/api/types/ListChannelsOutputBody.d.ts +7 -0
- package/dist/api/types/ListChannelsOutputBody.js +2 -0
- package/dist/api/types/ListContactsOutputBody.d.ts +7 -0
- package/dist/api/types/ListContactsOutputBody.js +2 -0
- package/dist/api/types/ListContextsOutputBody.d.ts +7 -0
- package/dist/api/types/ListContextsOutputBody.js +2 -0
- package/dist/api/types/ListEventsOutputBody.d.ts +7 -0
- package/dist/api/types/ListEventsOutputBody.js +2 -0
- package/dist/api/types/ListHandoffsOutputBody.d.ts +7 -0
- package/dist/api/types/ListHandoffsOutputBody.js +2 -0
- package/dist/api/types/ListMessagesOutputBody.d.ts +7 -0
- package/dist/api/types/ListMessagesOutputBody.js +2 -0
- package/dist/api/types/ListOrganizationsOutputBody.d.ts +7 -0
- package/dist/api/types/ListOrganizationsOutputBody.js +2 -0
- package/dist/api/types/ListPanelsOutputBody.d.ts +7 -0
- package/dist/api/types/ListPanelsOutputBody.js +2 -0
- package/dist/api/types/ListProductsOutputBody.d.ts +7 -0
- package/dist/api/types/ListProductsOutputBody.js +2 -0
- package/dist/api/types/ListRecipientsOutputBody.d.ts +7 -0
- package/dist/api/types/ListRecipientsOutputBody.js +2 -0
- package/dist/api/types/ListSnippetsOutputBody.d.ts +7 -0
- package/dist/api/types/ListSnippetsOutputBody.js +2 -0
- package/dist/api/types/ListStoresOutputBody.d.ts +7 -0
- package/dist/api/types/ListStoresOutputBody.js +2 -0
- package/dist/api/types/ListTagsOutputBody.d.ts +7 -0
- package/dist/api/types/ListTagsOutputBody.js +2 -0
- package/dist/api/types/ListTeamsOutputBody.d.ts +7 -0
- package/dist/api/types/ListTeamsOutputBody.js +2 -0
- package/dist/api/types/ListTemplatesOutputBody.d.ts +7 -0
- package/dist/api/types/ListTemplatesOutputBody.js +2 -0
- package/dist/api/types/ListTriggersOutputBody.d.ts +7 -0
- package/dist/api/types/ListTriggersOutputBody.js +2 -0
- package/dist/api/types/ListWebhooksOutputBody.d.ts +7 -0
- package/dist/api/types/ListWebhooksOutputBody.js +2 -0
- package/dist/api/types/ListWorkflowsOutputBody.d.ts +7 -0
- package/dist/api/types/ListWorkflowsOutputBody.js +2 -0
- package/dist/api/types/LoginOutputBody.d.ts +13 -0
- package/dist/api/types/LoginOutputBody.js +2 -0
- package/dist/api/types/MessageResponse.d.ts +45 -0
- package/dist/api/types/MessageResponse.js +2 -0
- package/dist/api/types/OrganizationResponse.d.ts +16 -0
- package/dist/api/types/OrganizationResponse.js +2 -0
- package/dist/api/types/PanelDataResponse.d.ts +13 -0
- package/dist/api/types/PanelDataResponse.js +2 -0
- package/dist/api/types/PanelFilterInput.d.ts +21 -0
- package/dist/api/types/PanelFilterInput.js +14 -0
- package/dist/api/types/PanelFilterResponse.d.ts +8 -0
- package/dist/api/types/PanelFilterResponse.js +2 -0
- package/dist/api/types/PanelResponse.d.ts +55 -0
- package/dist/api/types/PanelResponse.js +2 -0
- package/dist/api/types/ProductResponse.d.ts +34 -0
- package/dist/api/types/ProductResponse.js +2 -0
- package/dist/api/types/RecipientInput.d.ts +10 -0
- package/dist/api/types/RecipientInput.js +2 -0
- package/dist/api/types/RecipientResponse.d.ts +30 -0
- package/dist/api/types/RecipientResponse.js +2 -0
- package/dist/api/types/RefreshOutputBody.d.ts +10 -0
- package/dist/api/types/RefreshOutputBody.js +2 -0
- package/dist/api/types/RegisterOutputBody.d.ts +7 -0
- package/dist/api/types/RegisterOutputBody.js +2 -0
- package/dist/api/types/SnippetResponse.d.ts +27 -0
- package/dist/api/types/SnippetResponse.js +2 -0
- package/dist/api/types/StoreResponse.d.ts +22 -0
- package/dist/api/types/StoreResponse.js +2 -0
- package/dist/api/types/TagResponse.d.ts +14 -0
- package/dist/api/types/TagResponse.js +2 -0
- package/dist/api/types/TeamResponse.d.ts +26 -0
- package/dist/api/types/TeamResponse.js +2 -0
- package/dist/api/types/TemplateResponse.d.ts +46 -0
- package/dist/api/types/TemplateResponse.js +2 -0
- package/dist/api/types/WebhookResponse.d.ts +22 -0
- package/dist/api/types/WebhookResponse.js +2 -0
- package/dist/api/types/index.d.ts +58 -0
- package/dist/api/types/index.js +58 -0
- package/dist/auth/BearerAuthProvider.d.ts +20 -0
- package/dist/auth/BearerAuthProvider.js +32 -0
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.js +1 -0
- package/dist/core/auth/AuthProvider.d.ts +8 -0
- package/dist/core/auth/AuthProvider.js +6 -0
- package/dist/core/auth/AuthRequest.d.ts +9 -0
- package/dist/core/auth/AuthRequest.js +1 -0
- package/dist/core/auth/BasicAuth.d.ts +8 -0
- package/dist/core/auth/BasicAuth.js +29 -0
- package/dist/core/auth/BearerToken.d.ts +7 -0
- package/dist/core/auth/BearerToken.js +13 -0
- package/dist/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/core/auth/NoOpAuthProvider.js +5 -0
- package/dist/core/auth/index.d.ts +5 -0
- package/dist/core/auth/index.js +4 -0
- package/dist/core/base64.d.ts +2 -0
- package/dist/core/base64.js +22 -0
- package/dist/core/exports.d.ts +1 -0
- package/dist/core/exports.js +1 -0
- package/dist/core/fetcher/APIResponse.d.ts +20 -0
- package/dist/core/fetcher/APIResponse.js +1 -0
- package/dist/core/fetcher/BinaryResponse.d.ts +19 -0
- package/dist/core/fetcher/BinaryResponse.js +14 -0
- package/dist/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/core/fetcher/EndpointMetadata.js +1 -0
- package/dist/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/core/fetcher/EndpointSupplier.js +10 -0
- package/dist/core/fetcher/Fetcher.d.ts +56 -0
- package/dist/core/fetcher/Fetcher.js +306 -0
- package/dist/core/fetcher/Headers.d.ts +2 -0
- package/dist/core/fetcher/Headers.js +83 -0
- package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/core/fetcher/HttpResponsePromise.js +90 -0
- package/dist/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/core/fetcher/RawResponse.js +40 -0
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +10 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +5 -0
- package/dist/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getErrorResponseBody.js +30 -0
- package/dist/core/fetcher/getFetchFn.d.ts +1 -0
- package/dist/core/fetcher/getFetchFn.js +3 -0
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/fetcher/getHeader.js +8 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +13 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +55 -0
- package/dist/core/fetcher/index.d.ts +13 -0
- package/dist/core/fetcher/index.js +7 -0
- package/dist/core/fetcher/makePassthroughRequest.d.ts +49 -0
- package/dist/core/fetcher/makePassthroughRequest.js +119 -0
- package/dist/core/fetcher/makeRequest.d.ts +6 -0
- package/dist/core/fetcher/makeRequest.js +53 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +56 -0
- package/dist/core/fetcher/signals.d.ts +5 -0
- package/dist/core/fetcher/signals.js +20 -0
- package/dist/core/headers.d.ts +2 -0
- package/dist/core/headers.js +27 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.js +6 -0
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +19 -0
- package/dist/core/logging/exports.d.ts +18 -0
- package/dist/core/logging/exports.js +9 -0
- package/dist/core/logging/index.d.ts +1 -0
- package/dist/core/logging/index.js +1 -0
- package/dist/core/logging/logger.d.ts +126 -0
- package/dist/core/logging/logger.js +140 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +1 -0
- package/dist/core/runtime/runtime.d.ts +9 -0
- package/dist/core/runtime/runtime.js +100 -0
- package/dist/core/url/QueryStringBuilder.d.ts +47 -0
- package/dist/core/url/QueryStringBuilder.js +78 -0
- package/dist/core/url/encodePathParam.d.ts +1 -0
- package/dist/core/url/encodePathParam.js +18 -0
- package/dist/core/url/index.d.ts +4 -0
- package/dist/core/url/index.js +4 -0
- package/dist/core/url/join.d.ts +1 -0
- package/dist/core/url/join.js +65 -0
- package/dist/core/url/qs.d.ts +7 -0
- package/dist/core/url/qs.js +76 -0
- package/dist/environments.d.ts +4 -0
- package/dist/environments.js +4 -0
- package/dist/errors/BoltixApiError.d.ts +14 -0
- package/dist/errors/BoltixApiError.js +35 -0
- package/dist/errors/BoltixApiTimeoutError.d.ts +6 -0
- package/dist/errors/BoltixApiTimeoutError.js +15 -0
- package/dist/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/errors/handleNonStatusCodeError.js +32 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +2 -0
- package/dist/exports.d.ts +1 -0
- package/dist/exports.js +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +5 -0
- package/package.json +37 -0
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import { mergeHeaders } from "../../../../core/headers.js";
|
|
4
|
+
import * as core from "../../../../core/index.js";
|
|
5
|
+
import * as environments from "../../../../environments.js";
|
|
6
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
|
|
7
|
+
import * as errors from "../../../../errors/index.js";
|
|
8
|
+
export class RoutingClient {
|
|
9
|
+
_options;
|
|
10
|
+
constructor(options = {}) {
|
|
11
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Returns all handoffs for the current organization.
|
|
15
|
+
*
|
|
16
|
+
* @param {BoltixApi.ListHandoffsRoutingRequest} request
|
|
17
|
+
* @param {RoutingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* await client.routing.listHandoffs()
|
|
21
|
+
*/
|
|
22
|
+
listHandoffs(request = {}, requestOptions) {
|
|
23
|
+
return core.HttpResponsePromise.fromPromise(this.__listHandoffs(request, requestOptions));
|
|
24
|
+
}
|
|
25
|
+
async __listHandoffs(request = {}, requestOptions) {
|
|
26
|
+
const { status } = request;
|
|
27
|
+
const _queryParams = {
|
|
28
|
+
status,
|
|
29
|
+
};
|
|
30
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
31
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
32
|
+
const _response = await core.fetcher({
|
|
33
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
34
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
35
|
+
environments.BoltixApiEnvironment.Production, "v1/routing/handoffs"),
|
|
36
|
+
method: "GET",
|
|
37
|
+
headers: _headers,
|
|
38
|
+
queryString: core.url
|
|
39
|
+
.queryBuilder()
|
|
40
|
+
.addMany(_queryParams)
|
|
41
|
+
.add("status", _queryParams.status, { style: "comma" })
|
|
42
|
+
.mergeAdditional(requestOptions?.queryParams)
|
|
43
|
+
.build(),
|
|
44
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
45
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
46
|
+
abortSignal: requestOptions?.abortSignal,
|
|
47
|
+
fetchFn: this._options?.fetch,
|
|
48
|
+
logging: this._options.logging,
|
|
49
|
+
});
|
|
50
|
+
if (_response.ok) {
|
|
51
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
52
|
+
}
|
|
53
|
+
if (_response.error.reason === "status-code") {
|
|
54
|
+
throw new errors.BoltixApiError({
|
|
55
|
+
statusCode: _response.error.statusCode,
|
|
56
|
+
body: _response.error.body,
|
|
57
|
+
rawResponse: _response.rawResponse,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/routing/handoffs");
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Creates a new conversation handoff to a human agent.
|
|
64
|
+
*
|
|
65
|
+
* @param {BoltixApi.CreateHandoffInputBody} request
|
|
66
|
+
* @param {RoutingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* await client.routing.createHandoff({
|
|
70
|
+
* channel_name: "channel_name",
|
|
71
|
+
* contact_id: "contact_id",
|
|
72
|
+
* phone_number: "phone_number"
|
|
73
|
+
* })
|
|
74
|
+
*/
|
|
75
|
+
createHandoff(request, requestOptions) {
|
|
76
|
+
return core.HttpResponsePromise.fromPromise(this.__createHandoff(request, requestOptions));
|
|
77
|
+
}
|
|
78
|
+
async __createHandoff(request, requestOptions) {
|
|
79
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
80
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
81
|
+
const _response = await core.fetcher({
|
|
82
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
83
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
84
|
+
environments.BoltixApiEnvironment.Production, "v1/routing/handoffs"),
|
|
85
|
+
method: "POST",
|
|
86
|
+
headers: _headers,
|
|
87
|
+
contentType: "application/json",
|
|
88
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
89
|
+
requestType: "json",
|
|
90
|
+
body: request,
|
|
91
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
92
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
93
|
+
abortSignal: requestOptions?.abortSignal,
|
|
94
|
+
fetchFn: this._options?.fetch,
|
|
95
|
+
logging: this._options.logging,
|
|
96
|
+
});
|
|
97
|
+
if (_response.ok) {
|
|
98
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
99
|
+
}
|
|
100
|
+
if (_response.error.reason === "status-code") {
|
|
101
|
+
throw new errors.BoltixApiError({
|
|
102
|
+
statusCode: _response.error.statusCode,
|
|
103
|
+
body: _response.error.body,
|
|
104
|
+
rawResponse: _response.rawResponse,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/routing/handoffs");
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Picks the next available handoff from the queue.
|
|
111
|
+
*
|
|
112
|
+
* @param {BoltixApi.PickNextHandoffInputBody} request
|
|
113
|
+
* @param {RoutingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* await client.routing.pickNextHandoff({
|
|
117
|
+
* team_id: "team_id"
|
|
118
|
+
* })
|
|
119
|
+
*/
|
|
120
|
+
pickNextHandoff(request, requestOptions) {
|
|
121
|
+
return core.HttpResponsePromise.fromPromise(this.__pickNextHandoff(request, requestOptions));
|
|
122
|
+
}
|
|
123
|
+
async __pickNextHandoff(request, requestOptions) {
|
|
124
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
125
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
126
|
+
const _response = await core.fetcher({
|
|
127
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
128
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
129
|
+
environments.BoltixApiEnvironment.Production, "v1/routing/handoffs/pick"),
|
|
130
|
+
method: "POST",
|
|
131
|
+
headers: _headers,
|
|
132
|
+
contentType: "application/json",
|
|
133
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
134
|
+
requestType: "json",
|
|
135
|
+
body: request,
|
|
136
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
137
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
138
|
+
abortSignal: requestOptions?.abortSignal,
|
|
139
|
+
fetchFn: this._options?.fetch,
|
|
140
|
+
logging: this._options.logging,
|
|
141
|
+
});
|
|
142
|
+
if (_response.ok) {
|
|
143
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
144
|
+
}
|
|
145
|
+
if (_response.error.reason === "status-code") {
|
|
146
|
+
throw new errors.BoltixApiError({
|
|
147
|
+
statusCode: _response.error.statusCode,
|
|
148
|
+
body: _response.error.body,
|
|
149
|
+
rawResponse: _response.rawResponse,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/routing/handoffs/pick");
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Assigns a handoff to a specific agent.
|
|
156
|
+
*
|
|
157
|
+
* @param {BoltixApi.AssignHandoffInputBody} request
|
|
158
|
+
* @param {RoutingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* await client.routing.assignHandoff({
|
|
162
|
+
* id: "id",
|
|
163
|
+
* agent_id: "agent_id"
|
|
164
|
+
* })
|
|
165
|
+
*/
|
|
166
|
+
assignHandoff(request, requestOptions) {
|
|
167
|
+
return core.HttpResponsePromise.fromPromise(this.__assignHandoff(request, requestOptions));
|
|
168
|
+
}
|
|
169
|
+
async __assignHandoff(request, requestOptions) {
|
|
170
|
+
const { id, ..._body } = request;
|
|
171
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
172
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
173
|
+
const _response = await core.fetcher({
|
|
174
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
175
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
176
|
+
environments.BoltixApiEnvironment.Production, `v1/routing/handoffs/${core.url.encodePathParam(id)}/assign`),
|
|
177
|
+
method: "PUT",
|
|
178
|
+
headers: _headers,
|
|
179
|
+
contentType: "application/json",
|
|
180
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
181
|
+
requestType: "json",
|
|
182
|
+
body: _body,
|
|
183
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
184
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
185
|
+
abortSignal: requestOptions?.abortSignal,
|
|
186
|
+
fetchFn: this._options?.fetch,
|
|
187
|
+
logging: this._options.logging,
|
|
188
|
+
});
|
|
189
|
+
if (_response.ok) {
|
|
190
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
191
|
+
}
|
|
192
|
+
if (_response.error.reason === "status-code") {
|
|
193
|
+
throw new errors.BoltixApiError({
|
|
194
|
+
statusCode: _response.error.statusCode,
|
|
195
|
+
body: _response.error.body,
|
|
196
|
+
rawResponse: _response.rawResponse,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/v1/routing/handoffs/{id}/assign");
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Resumes automation for a handoff (returns conversation to bot).
|
|
203
|
+
*
|
|
204
|
+
* @param {BoltixApi.ResumeHandoffRoutingRequest} request
|
|
205
|
+
* @param {RoutingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* await client.routing.resumeHandoff({
|
|
209
|
+
* id: "id"
|
|
210
|
+
* })
|
|
211
|
+
*/
|
|
212
|
+
resumeHandoff(request, requestOptions) {
|
|
213
|
+
return core.HttpResponsePromise.fromPromise(this.__resumeHandoff(request, requestOptions));
|
|
214
|
+
}
|
|
215
|
+
async __resumeHandoff(request, requestOptions) {
|
|
216
|
+
const { id } = request;
|
|
217
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
218
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
219
|
+
const _response = await core.fetcher({
|
|
220
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
221
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
222
|
+
environments.BoltixApiEnvironment.Production, `v1/routing/handoffs/${core.url.encodePathParam(id)}/resume`),
|
|
223
|
+
method: "PUT",
|
|
224
|
+
headers: _headers,
|
|
225
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
226
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
227
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
228
|
+
abortSignal: requestOptions?.abortSignal,
|
|
229
|
+
fetchFn: this._options?.fetch,
|
|
230
|
+
logging: this._options.logging,
|
|
231
|
+
});
|
|
232
|
+
if (_response.ok) {
|
|
233
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
234
|
+
}
|
|
235
|
+
if (_response.error.reason === "status-code") {
|
|
236
|
+
throw new errors.BoltixApiError({
|
|
237
|
+
statusCode: _response.error.statusCode,
|
|
238
|
+
body: _response.error.body,
|
|
239
|
+
rawResponse: _response.rawResponse,
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/v1/routing/handoffs/{id}/resume");
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Returns all teams for the current organization.
|
|
246
|
+
*
|
|
247
|
+
* @param {RoutingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* await client.routing.listTeams()
|
|
251
|
+
*/
|
|
252
|
+
listTeams(requestOptions) {
|
|
253
|
+
return core.HttpResponsePromise.fromPromise(this.__listTeams(requestOptions));
|
|
254
|
+
}
|
|
255
|
+
async __listTeams(requestOptions) {
|
|
256
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
257
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
258
|
+
const _response = await core.fetcher({
|
|
259
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
260
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
261
|
+
environments.BoltixApiEnvironment.Production, "v1/teams"),
|
|
262
|
+
method: "GET",
|
|
263
|
+
headers: _headers,
|
|
264
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
265
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
266
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
267
|
+
abortSignal: requestOptions?.abortSignal,
|
|
268
|
+
fetchFn: this._options?.fetch,
|
|
269
|
+
logging: this._options.logging,
|
|
270
|
+
});
|
|
271
|
+
if (_response.ok) {
|
|
272
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
273
|
+
}
|
|
274
|
+
if (_response.error.reason === "status-code") {
|
|
275
|
+
throw new errors.BoltixApiError({
|
|
276
|
+
statusCode: _response.error.statusCode,
|
|
277
|
+
body: _response.error.body,
|
|
278
|
+
rawResponse: _response.rawResponse,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/teams");
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Creates a new agent team.
|
|
285
|
+
*
|
|
286
|
+
* @param {BoltixApi.CreateTeamInputBody} request
|
|
287
|
+
* @param {RoutingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* await client.routing.createTeam({
|
|
291
|
+
* name: "name"
|
|
292
|
+
* })
|
|
293
|
+
*/
|
|
294
|
+
createTeam(request, requestOptions) {
|
|
295
|
+
return core.HttpResponsePromise.fromPromise(this.__createTeam(request, requestOptions));
|
|
296
|
+
}
|
|
297
|
+
async __createTeam(request, requestOptions) {
|
|
298
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
299
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
300
|
+
const _response = await core.fetcher({
|
|
301
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
302
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
303
|
+
environments.BoltixApiEnvironment.Production, "v1/teams"),
|
|
304
|
+
method: "POST",
|
|
305
|
+
headers: _headers,
|
|
306
|
+
contentType: "application/json",
|
|
307
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
308
|
+
requestType: "json",
|
|
309
|
+
body: request,
|
|
310
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
311
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
312
|
+
abortSignal: requestOptions?.abortSignal,
|
|
313
|
+
fetchFn: this._options?.fetch,
|
|
314
|
+
logging: this._options.logging,
|
|
315
|
+
});
|
|
316
|
+
if (_response.ok) {
|
|
317
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
318
|
+
}
|
|
319
|
+
if (_response.error.reason === "status-code") {
|
|
320
|
+
throw new errors.BoltixApiError({
|
|
321
|
+
statusCode: _response.error.statusCode,
|
|
322
|
+
body: _response.error.body,
|
|
323
|
+
rawResponse: _response.rawResponse,
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/teams");
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Returns a single team by ID.
|
|
330
|
+
*
|
|
331
|
+
* @param {BoltixApi.GetTeamRoutingRequest} request
|
|
332
|
+
* @param {RoutingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
333
|
+
*
|
|
334
|
+
* @example
|
|
335
|
+
* await client.routing.getTeam({
|
|
336
|
+
* id: "id"
|
|
337
|
+
* })
|
|
338
|
+
*/
|
|
339
|
+
getTeam(request, requestOptions) {
|
|
340
|
+
return core.HttpResponsePromise.fromPromise(this.__getTeam(request, requestOptions));
|
|
341
|
+
}
|
|
342
|
+
async __getTeam(request, requestOptions) {
|
|
343
|
+
const { id } = request;
|
|
344
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
345
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
346
|
+
const _response = await core.fetcher({
|
|
347
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
348
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
349
|
+
environments.BoltixApiEnvironment.Production, `v1/teams/${core.url.encodePathParam(id)}`),
|
|
350
|
+
method: "GET",
|
|
351
|
+
headers: _headers,
|
|
352
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
353
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
354
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
355
|
+
abortSignal: requestOptions?.abortSignal,
|
|
356
|
+
fetchFn: this._options?.fetch,
|
|
357
|
+
logging: this._options.logging,
|
|
358
|
+
});
|
|
359
|
+
if (_response.ok) {
|
|
360
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
361
|
+
}
|
|
362
|
+
if (_response.error.reason === "status-code") {
|
|
363
|
+
throw new errors.BoltixApiError({
|
|
364
|
+
statusCode: _response.error.statusCode,
|
|
365
|
+
body: _response.error.body,
|
|
366
|
+
rawResponse: _response.rawResponse,
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/teams/{id}");
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Updates an existing team.
|
|
373
|
+
*
|
|
374
|
+
* @param {BoltixApi.UpdateTeamInputBody} request
|
|
375
|
+
* @param {RoutingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
376
|
+
*
|
|
377
|
+
* @example
|
|
378
|
+
* await client.routing.updateTeam({
|
|
379
|
+
* id: "id"
|
|
380
|
+
* })
|
|
381
|
+
*/
|
|
382
|
+
updateTeam(request, requestOptions) {
|
|
383
|
+
return core.HttpResponsePromise.fromPromise(this.__updateTeam(request, requestOptions));
|
|
384
|
+
}
|
|
385
|
+
async __updateTeam(request, requestOptions) {
|
|
386
|
+
const { id, ..._body } = request;
|
|
387
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
388
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
389
|
+
const _response = await core.fetcher({
|
|
390
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
391
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
392
|
+
environments.BoltixApiEnvironment.Production, `v1/teams/${core.url.encodePathParam(id)}`),
|
|
393
|
+
method: "PUT",
|
|
394
|
+
headers: _headers,
|
|
395
|
+
contentType: "application/json",
|
|
396
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
397
|
+
requestType: "json",
|
|
398
|
+
body: _body,
|
|
399
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
400
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
401
|
+
abortSignal: requestOptions?.abortSignal,
|
|
402
|
+
fetchFn: this._options?.fetch,
|
|
403
|
+
logging: this._options.logging,
|
|
404
|
+
});
|
|
405
|
+
if (_response.ok) {
|
|
406
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
407
|
+
}
|
|
408
|
+
if (_response.error.reason === "status-code") {
|
|
409
|
+
throw new errors.BoltixApiError({
|
|
410
|
+
statusCode: _response.error.statusCode,
|
|
411
|
+
body: _response.error.body,
|
|
412
|
+
rawResponse: _response.rawResponse,
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/v1/teams/{id}");
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Soft-deletes a team.
|
|
419
|
+
*
|
|
420
|
+
* @param {BoltixApi.DeleteTeamRoutingRequest} request
|
|
421
|
+
* @param {RoutingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
422
|
+
*
|
|
423
|
+
* @example
|
|
424
|
+
* await client.routing.deleteTeam({
|
|
425
|
+
* id: "id"
|
|
426
|
+
* })
|
|
427
|
+
*/
|
|
428
|
+
deleteTeam(request, requestOptions) {
|
|
429
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteTeam(request, requestOptions));
|
|
430
|
+
}
|
|
431
|
+
async __deleteTeam(request, requestOptions) {
|
|
432
|
+
const { id } = request;
|
|
433
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
434
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
435
|
+
const _response = await core.fetcher({
|
|
436
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
437
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
438
|
+
environments.BoltixApiEnvironment.Production, `v1/teams/${core.url.encodePathParam(id)}`),
|
|
439
|
+
method: "DELETE",
|
|
440
|
+
headers: _headers,
|
|
441
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
442
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
443
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
444
|
+
abortSignal: requestOptions?.abortSignal,
|
|
445
|
+
fetchFn: this._options?.fetch,
|
|
446
|
+
logging: this._options.logging,
|
|
447
|
+
});
|
|
448
|
+
if (_response.ok) {
|
|
449
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
450
|
+
}
|
|
451
|
+
if (_response.error.reason === "status-code") {
|
|
452
|
+
throw new errors.BoltixApiError({
|
|
453
|
+
statusCode: _response.error.statusCode,
|
|
454
|
+
body: _response.error.body,
|
|
455
|
+
rawResponse: _response.rawResponse,
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v1/teams/{id}");
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* Returns all agents in a team.
|
|
462
|
+
*
|
|
463
|
+
* @param {BoltixApi.ListAgentsRoutingRequest} request
|
|
464
|
+
* @param {RoutingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
465
|
+
*
|
|
466
|
+
* @example
|
|
467
|
+
* await client.routing.listAgents({
|
|
468
|
+
* id: "id"
|
|
469
|
+
* })
|
|
470
|
+
*/
|
|
471
|
+
listAgents(request, requestOptions) {
|
|
472
|
+
return core.HttpResponsePromise.fromPromise(this.__listAgents(request, requestOptions));
|
|
473
|
+
}
|
|
474
|
+
async __listAgents(request, requestOptions) {
|
|
475
|
+
const { id } = request;
|
|
476
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
477
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
478
|
+
const _response = await core.fetcher({
|
|
479
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
480
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
481
|
+
environments.BoltixApiEnvironment.Production, `v1/teams/${core.url.encodePathParam(id)}/agents`),
|
|
482
|
+
method: "GET",
|
|
483
|
+
headers: _headers,
|
|
484
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
485
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
486
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
487
|
+
abortSignal: requestOptions?.abortSignal,
|
|
488
|
+
fetchFn: this._options?.fetch,
|
|
489
|
+
logging: this._options.logging,
|
|
490
|
+
});
|
|
491
|
+
if (_response.ok) {
|
|
492
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
493
|
+
}
|
|
494
|
+
if (_response.error.reason === "status-code") {
|
|
495
|
+
throw new errors.BoltixApiError({
|
|
496
|
+
statusCode: _response.error.statusCode,
|
|
497
|
+
body: _response.error.body,
|
|
498
|
+
rawResponse: _response.rawResponse,
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/teams/{id}/agents");
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Adds an account as an agent to a team.
|
|
505
|
+
*
|
|
506
|
+
* @param {BoltixApi.AddAgentInputBody} request
|
|
507
|
+
* @param {RoutingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
508
|
+
*
|
|
509
|
+
* @example
|
|
510
|
+
* await client.routing.addAgent({
|
|
511
|
+
* id: "id",
|
|
512
|
+
* account_id: "account_id"
|
|
513
|
+
* })
|
|
514
|
+
*/
|
|
515
|
+
addAgent(request, requestOptions) {
|
|
516
|
+
return core.HttpResponsePromise.fromPromise(this.__addAgent(request, requestOptions));
|
|
517
|
+
}
|
|
518
|
+
async __addAgent(request, requestOptions) {
|
|
519
|
+
const { id, ..._body } = request;
|
|
520
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
521
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
522
|
+
const _response = await core.fetcher({
|
|
523
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
524
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
525
|
+
environments.BoltixApiEnvironment.Production, `v1/teams/${core.url.encodePathParam(id)}/agents`),
|
|
526
|
+
method: "POST",
|
|
527
|
+
headers: _headers,
|
|
528
|
+
contentType: "application/json",
|
|
529
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
530
|
+
requestType: "json",
|
|
531
|
+
body: _body,
|
|
532
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
533
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
534
|
+
abortSignal: requestOptions?.abortSignal,
|
|
535
|
+
fetchFn: this._options?.fetch,
|
|
536
|
+
logging: this._options.logging,
|
|
537
|
+
});
|
|
538
|
+
if (_response.ok) {
|
|
539
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
540
|
+
}
|
|
541
|
+
if (_response.error.reason === "status-code") {
|
|
542
|
+
throw new errors.BoltixApiError({
|
|
543
|
+
statusCode: _response.error.statusCode,
|
|
544
|
+
body: _response.error.body,
|
|
545
|
+
rawResponse: _response.rawResponse,
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/teams/{id}/agents");
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Removes an agent from a team.
|
|
552
|
+
*
|
|
553
|
+
* @param {BoltixApi.RemoveAgentRoutingRequest} request
|
|
554
|
+
* @param {RoutingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
555
|
+
*
|
|
556
|
+
* @example
|
|
557
|
+
* await client.routing.removeAgent({
|
|
558
|
+
* id: "id",
|
|
559
|
+
* agent_id: "agent_id"
|
|
560
|
+
* })
|
|
561
|
+
*/
|
|
562
|
+
removeAgent(request, requestOptions) {
|
|
563
|
+
return core.HttpResponsePromise.fromPromise(this.__removeAgent(request, requestOptions));
|
|
564
|
+
}
|
|
565
|
+
async __removeAgent(request, requestOptions) {
|
|
566
|
+
const { id, agent_id: agentId } = request;
|
|
567
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
568
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
569
|
+
const _response = await core.fetcher({
|
|
570
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
571
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
572
|
+
environments.BoltixApiEnvironment.Production, `v1/teams/${core.url.encodePathParam(id)}/agents/${core.url.encodePathParam(agentId)}`),
|
|
573
|
+
method: "DELETE",
|
|
574
|
+
headers: _headers,
|
|
575
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
576
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
577
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
578
|
+
abortSignal: requestOptions?.abortSignal,
|
|
579
|
+
fetchFn: this._options?.fetch,
|
|
580
|
+
logging: this._options.logging,
|
|
581
|
+
});
|
|
582
|
+
if (_response.ok) {
|
|
583
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
584
|
+
}
|
|
585
|
+
if (_response.error.reason === "status-code") {
|
|
586
|
+
throw new errors.BoltixApiError({
|
|
587
|
+
statusCode: _response.error.statusCode,
|
|
588
|
+
body: _response.error.body,
|
|
589
|
+
rawResponse: _response.rawResponse,
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v1/teams/{id}/agents/{agent_id}");
|
|
593
|
+
}
|
|
594
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* id: "id",
|
|
5
|
+
* account_id: "account_id"
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface AddAgentInputBody {
|
|
9
|
+
/** Team ID */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Account to add as agent */
|
|
12
|
+
account_id: string;
|
|
13
|
+
/** Agent role (defaults to agent) */
|
|
14
|
+
role?: AddAgentInputBody.Role;
|
|
15
|
+
}
|
|
16
|
+
export declare namespace AddAgentInputBody {
|
|
17
|
+
/** Agent role (defaults to agent) */
|
|
18
|
+
const Role: {
|
|
19
|
+
readonly Manager: "manager";
|
|
20
|
+
readonly Agent: "agent";
|
|
21
|
+
};
|
|
22
|
+
type Role = (typeof Role)[keyof typeof Role];
|
|
23
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var AddAgentInputBody;
|
|
3
|
+
(function (AddAgentInputBody) {
|
|
4
|
+
/** Agent role (defaults to agent) */
|
|
5
|
+
AddAgentInputBody.Role = {
|
|
6
|
+
Manager: "manager",
|
|
7
|
+
Agent: "agent",
|
|
8
|
+
};
|
|
9
|
+
})(AddAgentInputBody || (AddAgentInputBody = {}));
|