@talqing/sdk 0.4.5 → 0.6.0
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/README.md +15 -12
- package/dist/cjs/gen/index.d.ts +1 -1
- package/dist/cjs/gen/index.d.ts.map +1 -1
- package/dist/cjs/gen/sdk.gen.d.ts +334 -44
- package/dist/cjs/gen/sdk.gen.d.ts.map +1 -1
- package/dist/cjs/gen/sdk.gen.js +719 -68
- package/dist/cjs/gen/sdk.gen.js.map +1 -1
- package/dist/cjs/gen/types.gen.d.ts +5009 -2767
- package/dist/cjs/gen/types.gen.d.ts.map +1 -1
- package/dist/esm/gen/index.d.ts +1 -1
- package/dist/esm/gen/index.d.ts.map +1 -1
- package/dist/esm/gen/sdk.gen.d.ts +334 -44
- package/dist/esm/gen/sdk.gen.d.ts.map +1 -1
- package/dist/esm/gen/sdk.gen.js +708 -66
- package/dist/esm/gen/sdk.gen.js.map +1 -1
- package/dist/esm/gen/types.gen.d.ts +5009 -2767
- package/dist/esm/gen/types.gen.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/gen/index.ts +1 -1
- package/src/gen/sdk.gen.ts +842 -78
- package/src/gen/types.gen.ts +5254 -2847
package/src/gen/sdk.gen.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { client } from './client.gen.js';
|
|
4
4
|
import { buildClientParams, type Client, type ClientMeta, type Options as Options2, type RequestResult, type ServerSentEventsResult, type TDataShape } from './client/index.js';
|
|
5
|
-
import type { AddRecipientsRequest, AddVoiceRequest, AgentsCreateErrors, AgentsCreateResults, AgentsDeleteErrors, AgentsDeleteResults, AgentsGetErrors, AgentsGetResults, AgentsListErrors, AgentsListResults, AgentsPublishErrors, AgentsPublishResults, AgentsUpdateErrors, AgentsUpdateResults, AgentsValidateErrors, AgentsValidateResults, AgentsVersionsGetErrors, AgentsVersionsGetResults, AgentsVersionsRollbackErrors, AgentsVersionsRollbackResults, AssignPhoneNumberRequest, BackfillAnalysisRequest, BillingCreditsCheckoutErrors, BillingCreditsCheckoutResults, BillingCreditsGetErrors, BillingCreditsGetResults, BillingCreditsLedgerErrors, BillingCreditsLedgerResults, BuildKBRequest, CallsAnalysisBackfillErrors, CallsAnalysisBackfillResults, CallsAnalysisPreviewErrors, CallsAnalysisPreviewResults, CallsBatchesCancelErrors, CallsBatchesCancelResults, CallsBatchesCreateErrors, CallsBatchesCreateResults, CallsBatchesGetErrors, CallsBatchesGetResults, CallsBatchesListErrors, CallsBatchesListResults, CallsBatchesPauseErrors, CallsBatchesPauseResults, CallsBatchesRecipientsAddErrors, CallsBatchesRecipientsAddResults, CallsBatchesRecipientsListErrors, CallsBatchesRecipientsListResults, CallsBatchesResumeErrors, CallsBatchesResumeResults, CallsBatchesUpdateErrors, CallsBatchesUpdateResults, CallsDeleteErrors, CallsDeleteResults, CallsGetErrors, CallsGetResults, CallsListErrors, CallsListResults, CallsOutboundErrors, CallsOutboundResults, CallsRecordingDeleteErrors, CallsRecordingDeleteResults, CallsRecordingGetErrors, CallsRecordingGetResults, CallsScreenRecordingGetErrors, CallsScreenRecordingGetResults, CallsStatsErrors, CallsStatsResults, CallsTokenErrors, CallsTokenResults, CatalogAvatarsListErrors, CatalogAvatarsListResults, CatalogGetErrors, CatalogGetResults, CatalogModelsHostsErrors, CatalogModelsHostsResults, CatalogModelsSearchErrors, CatalogModelsSearchResults, CatalogVoicesElevenlabsAddErrors, CatalogVoicesElevenlabsAddResults, CatalogVoicesElevenlabsSettingsErrors, CatalogVoicesElevenlabsSettingsResults, CatalogVoicesListErrors, CatalogVoicesListResults, ConversationsCreateErrors, ConversationsCreateResults, ConversationsEventsErrors, ConversationsEventsResult, ConversationsEventsResults, ConversationsGetErrors, ConversationsGetResults, ConversationsItemsListErrors, ConversationsItemsListResults, ConversationsListErrors, ConversationsListResults, ConversationsMessagesCreateErrors, ConversationsMessagesCreateResults, ConversationsSessionsListErrors, ConversationsSessionsListResults, ConversationsSnapshotErrors, ConversationsSnapshotResults, ConversationsUpdateErrors, ConversationsUpdateResults, CopilotAgentsSendErrors, CopilotAgentsSendResults, CopilotAgentsStreamErrors, CopilotAgentsStreamResult, CopilotAgentsStreamResults, CopilotKnowledgeSendErrors, CopilotKnowledgeSendResults, CopilotKnowledgeStreamErrors, CopilotKnowledgeStreamResult, CopilotKnowledgeStreamResults, CopilotTasksSendErrors, CopilotTasksSendResults, CopilotTasksStreamErrors, CopilotTasksStreamResult, CopilotTasksStreamResults, CopilotToolsSendErrors, CopilotToolsSendResults, CopilotToolsStreamErrors, CopilotToolsStreamResult, CopilotToolsStreamResults, CreateAgentRequest, CreateCallBatchRequest, CreateEmailBatchRequest, CreateEmailSendRequest, CreateIntegrationRequest, CreateIntegrationTriggerRequest, CreateKBRequest, CreateSecretRequest, CreateStreamConnectionRequest, CreateTaskRequest, CreateTelephonyAccountRequest, CreateTextConversationRequest, CreateToolRequest, CreateWebhookRequest, CreditCheckoutRequest, EmailBatchesCancelErrors, EmailBatchesCancelResults, EmailBatchesCreateErrors, EmailBatchesCreateResults, EmailBatchesGetErrors, EmailBatchesGetResults, EmailBatchesListErrors, EmailBatchesListResults, EmailBatchesPauseErrors, EmailBatchesPauseResults, EmailBatchesRecipientsListErrors, EmailBatchesRecipientsListResults, EmailBatchesRecipientsRedraftErrors, EmailBatchesRecipientsRedraftResults, EmailBatchesRecipientsRestoreErrors, EmailBatchesRecipientsRestoreResults, EmailBatchesRecipientsSkipErrors, EmailBatchesRecipientsSkipResults, EmailBatchesRecipientsUpdateErrors, EmailBatchesRecipientsUpdateResults, EmailBatchesResumeErrors, EmailBatchesResumeResults, EmailBatchesSendsCancelErrors, EmailBatchesSendsCancelResults, EmailBatchesSendsCreateErrors, EmailBatchesSendsCreateResults, EmailBatchesSendsGetErrors, EmailBatchesSendsGetResults, EmailBatchesSendsListErrors, EmailBatchesSendsListResults, EmailBatchesSendsPauseErrors, EmailBatchesSendsPauseResults, EmailBatchesSendsResumeErrors, EmailBatchesSendsResumeResults, EmailBatchesSendsUpdateErrors, EmailBatchesSendsUpdateResults, EmailBatchesUpdateErrors, EmailBatchesUpdateResults, EmailSendersListErrors, EmailSendersListResults, HealthErrors, HealthResults, ImportPhoneNumbersRequest, IntegrationsCatalogErrors, IntegrationsCatalogResults, IntegrationsCreateErrors, IntegrationsCreateResults, IntegrationsDeleteErrors, IntegrationsDeleteResults, IntegrationsGetErrors, IntegrationsGetResults, IntegrationsListErrors, IntegrationsListResults, IntegrationsMcpToolsListErrors, IntegrationsMcpToolsListResults, IntegrationsTriggersCreateErrors, IntegrationsTriggersCreateResults, IntegrationsTriggersDeleteErrors, IntegrationsTriggersDeleteResults, IntegrationsTriggersListErrors, IntegrationsTriggersListResults, IntegrationsTriggersUpdateErrors, IntegrationsTriggersUpdateResults, IntegrationsUpdateErrors, IntegrationsUpdateResults, KnowledgeBuildErrors, KnowledgeBuildResults, KnowledgeCreateErrors, KnowledgeCreateResults, KnowledgeDeleteErrors, KnowledgeDeleteResults, KnowledgeEventsErrors, KnowledgeEventsResult, KnowledgeEventsResults, KnowledgeGetErrors, KnowledgeGetResults, KnowledgeListErrors, KnowledgeListResults, KnowledgeNodesDeleteErrors, KnowledgeNodesDeleteResults, KnowledgeNodesGetErrors, KnowledgeNodesGetResults, KnowledgeNodesUpdateErrors, KnowledgeNodesUpdateResults, KnowledgePagesListErrors, KnowledgePagesListResults, KnowledgePromptErrors, KnowledgePromptResults, KnowledgeRegenerateTocErrors, KnowledgeRegenerateTocResults, ObservabilityGetErrors, ObservabilityGetResults, OutboundCallRequest, PatchCallBatchRequest, PatchConversationRequest, PatchEmailBatchRequest, PatchEmailRecipientRequest, PatchEmailSendRequest, PatchIntegrationRequest, PatchIntegrationTriggerRequest, PatchNodeRequest, PatchPhoneNumberRequest, PatchStreamConnectionRequest, PatchTaskRequest, PatchTelephonyAccountRequest, PatchToolRequest, PatchWebhookRequest, PreviewAnalysisRequest, ProviderKeysDeleteErrors, ProviderKeysDeleteResults, ProviderKeysListErrors, ProviderKeysListResults, ProviderKeysSetErrors, ProviderKeysSetResults, PublishToolRequest, RedraftRequest, RunTaskRequest, RunToolRequest, SchemasFunctionsGetErrors, SchemasFunctionsGetResults, SchemasGetErrors, SchemasGetResults, SecretsCreateErrors, SecretsCreateResults, SecretsDeleteErrors, SecretsDeleteResults, SecretsListErrors, SecretsListResults, SelectRecipientsRequest, SendMessageRequest, SetProviderKeyRequest, TasksCreateErrors, TasksCreateResults, TasksDeleteErrors, TasksDeleteResults, TasksGetErrors, TasksGetResults, TasksListErrors, TasksListResults, TasksPublishErrors, TasksPublishResults, TasksRunsCreateErrors, TasksRunsCreateResults, TasksRunsGetErrors, TasksRunsGetResults, TasksRunsListErrors, TasksRunsListResults, TasksUpdateErrors, TasksUpdateResults, TasksValidateErrors, TasksValidateResults, TasksVersionsGetErrors, TasksVersionsGetResults, TasksVersionsRollbackErrors, TasksVersionsRollbackResults, TelephonyAccountsCreateErrors, TelephonyAccountsCreateResults, TelephonyAccountsDeleteErrors, TelephonyAccountsDeleteResults, TelephonyAccountsGetErrors, TelephonyAccountsGetResults, TelephonyAccountsListErrors, TelephonyAccountsListResults, TelephonyAccountsProvisionErrors, TelephonyAccountsProvisionResults, TelephonyAccountsRemoteNumbersErrors, TelephonyAccountsRemoteNumbersResults, TelephonyAccountsUpdateErrors, TelephonyAccountsUpdateResults, TelephonyPhoneNumbersAssignErrors, TelephonyPhoneNumbersAssignResults, TelephonyPhoneNumbersGetErrors, TelephonyPhoneNumbersGetResults, TelephonyPhoneNumbersImportErrors, TelephonyPhoneNumbersImportResults, TelephonyPhoneNumbersListErrors, TelephonyPhoneNumbersListResults, TelephonyPhoneNumbersProvisionErrors, TelephonyPhoneNumbersProvisionResults, TelephonyPhoneNumbersUnassignErrors, TelephonyPhoneNumbersUnassignResults, TelephonyPhoneNumbersUpdateErrors, TelephonyPhoneNumbersUpdateResults, TelephonyProvidersListErrors, TelephonyProvidersListResults, TelephonyStreamsCreateErrors, TelephonyStreamsCreateResults, TelephonyStreamsDeleteErrors, TelephonyStreamsDeleteResults, TelephonyStreamsGetErrors, TelephonyStreamsGetResults, TelephonyStreamsListErrors, TelephonyStreamsListResults, TelephonyStreamsUpdateErrors, TelephonyStreamsUpdateResults, TextMessageRequest, TokenRequest, ToolsCreateErrors, ToolsCreateResults, ToolsDeleteErrors, ToolsDeleteResults, ToolsGetErrors, ToolsGetResults, ToolsListErrors, ToolsListResults, ToolsPublishErrors, ToolsPublishResults, ToolsRunErrors, ToolsRunResults, ToolsUpdateErrors, ToolsUpdateResults, ToolsValidateErrors, ToolsValidateResults, ToolsVersionsGetErrors, ToolsVersionsGetResults, ToolsVersionsRollbackErrors, ToolsVersionsRollbackResults, UpdateAgentRequest, WebhooksCreateErrors, WebhooksCreateResults, WebhooksDeleteErrors, WebhooksDeleteResults, WebhooksDeliveriesErrors, WebhooksDeliveriesResults, WebhooksEventTypesErrors, WebhooksEventTypesResults, WebhooksListErrors, WebhooksListResults, WebhooksRotateSecretErrors, WebhooksRotateSecretResults, WebhooksTestErrors, WebhooksTestResults, WebhooksUpdateErrors, WebhooksUpdateResults } from './types.gen.js';
|
|
5
|
+
import type { AddRecipientsRequest, AddVoiceRequest, AgentsCreateErrors, AgentsCreateResults, AgentsDeleteErrors, AgentsDeleteResults, AgentsGetErrors, AgentsGetResults, AgentsListErrors, AgentsListResults, AgentsPublishErrors, AgentsPublishResults, AgentsUpdateErrors, AgentsUpdateResults, AgentsValidateErrors, AgentsValidateResults, AgentsVersionsGetErrors, AgentsVersionsGetResults, AgentsVersionsRollbackErrors, AgentsVersionsRollbackResults, AssignPhoneNumberRequest, BackfillAnalysisRequest, BillingCreditsCheckoutErrors, BillingCreditsCheckoutResults, BillingCreditsGetErrors, BillingCreditsGetResults, BillingCreditsLedgerErrors, BillingCreditsLedgerResults, BuildKBRequest, CallsAnalysisBackfillErrors, CallsAnalysisBackfillResults, CallsAnalysisPreviewErrors, CallsAnalysisPreviewResults, CallsBatchesCancelErrors, CallsBatchesCancelResults, CallsBatchesCreateErrors, CallsBatchesCreateResults, CallsBatchesDeleteErrors, CallsBatchesDeleteResults, CallsBatchesGetErrors, CallsBatchesGetResults, CallsBatchesListErrors, CallsBatchesListResults, CallsBatchesPauseErrors, CallsBatchesPauseResults, CallsBatchesRecipientsAddErrors, CallsBatchesRecipientsAddResults, CallsBatchesRecipientsListErrors, CallsBatchesRecipientsListResults, CallsBatchesResumeErrors, CallsBatchesResumeResults, CallsBatchesUpdateErrors, CallsBatchesUpdateResults, CallsDeleteErrors, CallsDeleteResults, CallsGetErrors, CallsGetResults, CallsListErrors, CallsListResults, CallsOutboundErrors, CallsOutboundResults, CallsRecordingDeleteErrors, CallsRecordingDeleteResults, CallsRecordingGetErrors, CallsRecordingGetResults, CallsScreenRecordingGetErrors, CallsScreenRecordingGetResults, CallsStatsErrors, CallsStatsResults, CallsTokenErrors, CallsTokenResults, CatalogAvatarsListErrors, CatalogAvatarsListResults, CatalogGetErrors, CatalogGetResults, CatalogModelsHostsErrors, CatalogModelsHostsResults, CatalogModelsSearchErrors, CatalogModelsSearchResults, CatalogVoicesElevenlabsAddErrors, CatalogVoicesElevenlabsAddResults, CatalogVoicesElevenlabsSettingsErrors, CatalogVoicesElevenlabsSettingsResults, CatalogVoicesListErrors, CatalogVoicesListResults, ChatMessageRequest, ChatsAnalysisPreviewErrors, ChatsAnalysisPreviewResults, ChatsAnalysisRerunErrors, ChatsAnalysisRerunResults, ChatsCreateErrors, ChatsCreateResults, ChatsDeleteErrors, ChatsDeleteResults, ChatsDetailErrors, ChatsDetailResults, ChatsEndErrors, ChatsEndResults, ChatsGetErrors, ChatsGetResults, ChatsItemsListErrors, ChatsItemsListResults, ChatsListErrors, ChatsListResults, ChatsMessagesCreateErrors, ChatsMessagesCreateResults, ChatsTokensCreateErrors, ChatsTokensCreateResults, ConversationsEventsErrors, ConversationsEventsResult, ConversationsEventsResults, ConversationsGetErrors, ConversationsGetResults, ConversationsItemsListErrors, ConversationsItemsListResults, ConversationsListErrors, ConversationsListResults, ConversationsSessionsListErrors, ConversationsSessionsListResults, ConversationsSnapshotErrors, ConversationsSnapshotResults, ConversationsTraceErrors, ConversationsTraceResults, ConversationsUpdateErrors, ConversationsUpdateResults, CopilotAgentsSendErrors, CopilotAgentsSendResults, CopilotAgentsStreamErrors, CopilotAgentsStreamResult, CopilotAgentsStreamResults, CopilotKnowledgeSendErrors, CopilotKnowledgeSendResults, CopilotKnowledgeStreamErrors, CopilotKnowledgeStreamResult, CopilotKnowledgeStreamResults, CopilotTasksSendErrors, CopilotTasksSendResults, CopilotTasksStreamErrors, CopilotTasksStreamResult, CopilotTasksStreamResults, CopilotToolsSendErrors, CopilotToolsSendResults, CopilotToolsStreamErrors, CopilotToolsStreamResult, CopilotToolsStreamResults, CreateAgentRequest, CreateCallBatchRequest, CreateChatRequest, CreateEmailBatchRequest, CreateEmailSendRequest, CreateIntegrationRequest, CreateIntegrationTriggerRequest, CreateKBRequest, CreateSecretRequest, CreateStreamConnectionRequest, CreateTaskRequest, CreateTelephonyAccountRequest, CreateToolRequest, CreateWebhookRequest, CreateWhatsAppBatchRequest, CreditCheckoutRequest, EmailBatchesCancelErrors, EmailBatchesCancelResults, EmailBatchesCreateErrors, EmailBatchesCreateResults, EmailBatchesDeleteErrors, EmailBatchesDeleteResults, EmailBatchesGetErrors, EmailBatchesGetResults, EmailBatchesListErrors, EmailBatchesListResults, EmailBatchesPauseErrors, EmailBatchesPauseResults, EmailBatchesRecipientsListErrors, EmailBatchesRecipientsListResults, EmailBatchesRecipientsRedraftErrors, EmailBatchesRecipientsRedraftResults, EmailBatchesRecipientsRestoreErrors, EmailBatchesRecipientsRestoreResults, EmailBatchesRecipientsSkipErrors, EmailBatchesRecipientsSkipResults, EmailBatchesRecipientsUpdateErrors, EmailBatchesRecipientsUpdateResults, EmailBatchesResumeErrors, EmailBatchesResumeResults, EmailBatchesSendsCancelErrors, EmailBatchesSendsCancelResults, EmailBatchesSendsCreateErrors, EmailBatchesSendsCreateResults, EmailBatchesSendsGetErrors, EmailBatchesSendsGetResults, EmailBatchesSendsListErrors, EmailBatchesSendsListResults, EmailBatchesSendsPauseErrors, EmailBatchesSendsPauseResults, EmailBatchesSendsResumeErrors, EmailBatchesSendsResumeResults, EmailBatchesSendsUpdateErrors, EmailBatchesSendsUpdateResults, EmailBatchesUpdateErrors, EmailBatchesUpdateResults, EmailSendersListErrors, EmailSendersListResults, HealthErrors, HealthResults, ImportPhoneNumbersRequest, IntegrationsCatalogErrors, IntegrationsCatalogResults, IntegrationsCreateErrors, IntegrationsCreateResults, IntegrationsDeleteErrors, IntegrationsDeleteResults, IntegrationsGetErrors, IntegrationsGetResults, IntegrationsListErrors, IntegrationsListResults, IntegrationsMcpToolsListErrors, IntegrationsMcpToolsListResults, IntegrationsTriggersCreateErrors, IntegrationsTriggersCreateResults, IntegrationsTriggersDeleteErrors, IntegrationsTriggersDeleteResults, IntegrationsTriggersListErrors, IntegrationsTriggersListResults, IntegrationsTriggersUpdateErrors, IntegrationsTriggersUpdateResults, IntegrationsUpdateErrors, IntegrationsUpdateResults, KnowledgeBuildErrors, KnowledgeBuildResults, KnowledgeCreateErrors, KnowledgeCreateResults, KnowledgeDeleteErrors, KnowledgeDeleteResults, KnowledgeEventsErrors, KnowledgeEventsResult, KnowledgeEventsResults, KnowledgeGetErrors, KnowledgeGetResults, KnowledgeListErrors, KnowledgeListResults, KnowledgeNodesDeleteErrors, KnowledgeNodesDeleteResults, KnowledgeNodesGetErrors, KnowledgeNodesGetResults, KnowledgeNodesUpdateErrors, KnowledgeNodesUpdateResults, KnowledgePagesListErrors, KnowledgePagesListResults, KnowledgePromptErrors, KnowledgePromptResults, KnowledgeRegenerateTocErrors, KnowledgeRegenerateTocResults, ObservabilityGetErrors, ObservabilityGetResults, OutboundCallRequest, PatchCallBatchRequest, PatchConversationRequest, PatchEmailBatchRequest, PatchEmailRecipientRequest, PatchEmailSendRequest, PatchIntegrationRequest, PatchIntegrationTriggerRequest, PatchNodeRequest, PatchPhoneNumberRequest, PatchStreamConnectionRequest, PatchTaskRequest, PatchTelephonyAccountRequest, PatchToolRequest, PatchWebhookRequest, PatchWhatsAppBatchRequest, PatchWhatsAppRecipientRequest, PreviewAnalysisRequest, ProviderKeysDeleteErrors, ProviderKeysDeleteResults, ProviderKeysListErrors, ProviderKeysListResults, ProviderKeysSetErrors, ProviderKeysSetResults, PublishToolRequest, RedraftRequest, RunTaskRequest, RunToolRequest, SchemasFunctionsGetErrors, SchemasFunctionsGetResults, SchemasGetErrors, SchemasGetResults, SecretsCreateErrors, SecretsCreateResults, SecretsDeleteErrors, SecretsDeleteResults, SecretsListErrors, SecretsListResults, SelectRecipientsRequest, SendMessageRequest, SendWhatsAppBatchRequest, SetProviderKeyRequest, TasksCreateErrors, TasksCreateResults, TasksDeleteErrors, TasksDeleteResults, TasksGetErrors, TasksGetResults, TasksListErrors, TasksListResults, TasksPublishErrors, TasksPublishResults, TasksRunsCreateErrors, TasksRunsCreateResults, TasksRunsGetErrors, TasksRunsGetResults, TasksRunsListErrors, TasksRunsListResults, TasksUpdateErrors, TasksUpdateResults, TasksValidateErrors, TasksValidateResults, TasksVersionsGetErrors, TasksVersionsGetResults, TasksVersionsRollbackErrors, TasksVersionsRollbackResults, TelephonyAccountsCreateErrors, TelephonyAccountsCreateResults, TelephonyAccountsDeleteErrors, TelephonyAccountsDeleteResults, TelephonyAccountsGetErrors, TelephonyAccountsGetResults, TelephonyAccountsListErrors, TelephonyAccountsListResults, TelephonyAccountsProvisionErrors, TelephonyAccountsProvisionResults, TelephonyAccountsRemoteNumbersErrors, TelephonyAccountsRemoteNumbersResults, TelephonyAccountsUpdateErrors, TelephonyAccountsUpdateResults, TelephonyPhoneNumbersAssignErrors, TelephonyPhoneNumbersAssignResults, TelephonyPhoneNumbersGetErrors, TelephonyPhoneNumbersGetResults, TelephonyPhoneNumbersImportErrors, TelephonyPhoneNumbersImportResults, TelephonyPhoneNumbersListErrors, TelephonyPhoneNumbersListResults, TelephonyPhoneNumbersProvisionErrors, TelephonyPhoneNumbersProvisionResults, TelephonyPhoneNumbersUnassignErrors, TelephonyPhoneNumbersUnassignResults, TelephonyPhoneNumbersUpdateErrors, TelephonyPhoneNumbersUpdateResults, TelephonyProvidersListErrors, TelephonyProvidersListResults, TelephonyStreamsCreateErrors, TelephonyStreamsCreateResults, TelephonyStreamsDeleteErrors, TelephonyStreamsDeleteResults, TelephonyStreamsGetErrors, TelephonyStreamsGetResults, TelephonyStreamsListErrors, TelephonyStreamsListResults, TelephonyStreamsUpdateErrors, TelephonyStreamsUpdateResults, TokenRequest, ToolsCreateErrors, ToolsCreateResults, ToolsDeleteErrors, ToolsDeleteResults, ToolsGetErrors, ToolsGetResults, ToolsListErrors, ToolsListResults, ToolsPublishErrors, ToolsPublishResults, ToolsRunErrors, ToolsRunResults, ToolsUpdateErrors, ToolsUpdateResults, ToolsValidateErrors, ToolsValidateResults, ToolsVersionsGetErrors, ToolsVersionsGetResults, ToolsVersionsRollbackErrors, ToolsVersionsRollbackResults, TwilioSendersRequest, UpdateAgentRequest, WebhooksCreateErrors, WebhooksCreateResults, WebhooksDeleteErrors, WebhooksDeleteResults, WebhooksDeliveriesErrors, WebhooksDeliveriesResults, WebhooksEventTypesErrors, WebhooksEventTypesResults, WebhooksListErrors, WebhooksListResults, WebhooksRotateSecretErrors, WebhooksRotateSecretResults, WebhooksTestErrors, WebhooksTestResults, WebhooksUpdateErrors, WebhooksUpdateResults, WhatsappBatchesCancelErrors, WhatsappBatchesCancelResults, WhatsappBatchesCreateErrors, WhatsappBatchesCreateResults, WhatsappBatchesDeleteErrors, WhatsappBatchesDeleteResults, WhatsappBatchesGetErrors, WhatsappBatchesGetResults, WhatsappBatchesListErrors, WhatsappBatchesListResults, WhatsappBatchesPauseErrors, WhatsappBatchesPauseResults, WhatsappBatchesRecipientsListErrors, WhatsappBatchesRecipientsListResults, WhatsappBatchesRecipientsRestoreErrors, WhatsappBatchesRecipientsRestoreResults, WhatsappBatchesRecipientsSkipErrors, WhatsappBatchesRecipientsSkipResults, WhatsappBatchesRecipientsUpdateErrors, WhatsappBatchesRecipientsUpdateResults, WhatsappBatchesResumeErrors, WhatsappBatchesResumeResults, WhatsappBatchesSendErrors, WhatsappBatchesSendResults, WhatsappBatchesUpdateErrors, WhatsappBatchesUpdateResults, WhatsappTemplatesListErrors, WhatsappTemplatesListResults, WhatsappTwilioSendersListErrors, WhatsappTwilioSendersListResults } from './types.gen.js';
|
|
6
6
|
|
|
7
7
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
8
8
|
/**
|
|
@@ -168,7 +168,7 @@ export class Agents extends HeyApiClient {
|
|
|
168
168
|
/**
|
|
169
169
|
* Delete Agent
|
|
170
170
|
*
|
|
171
|
-
* Delete an agent and its
|
|
171
|
+
* Delete an agent and its versions permanently; 409 while anything still points at it.
|
|
172
172
|
*/
|
|
173
173
|
public delete<ThrowOnError extends boolean = false>(parameters: {
|
|
174
174
|
agent_id: string;
|
|
@@ -682,7 +682,9 @@ export class Batches extends HeyApiClient {
|
|
|
682
682
|
*
|
|
683
683
|
* Two things you would otherwise learn from an invoice:
|
|
684
684
|
*
|
|
685
|
-
* - **
|
|
685
|
+
* - **Voicemail is answered and billed** unless the agent has
|
|
686
|
+
* `voicemail_detection` on; then it hangs up (optionally after a message),
|
|
687
|
+
* and the recipient is retried like a missed call.
|
|
686
688
|
* - **Calls run your agent's current published version.** Republishing changes
|
|
687
689
|
* every call placed after that moment.
|
|
688
690
|
*/
|
|
@@ -708,6 +710,30 @@ export class Batches extends HeyApiClient {
|
|
|
708
710
|
});
|
|
709
711
|
}
|
|
710
712
|
|
|
713
|
+
/**
|
|
714
|
+
* Delete Call Batch
|
|
715
|
+
*
|
|
716
|
+
* Delete a finished batch and its recipient list for good. Its calls stay.
|
|
717
|
+
*
|
|
718
|
+
* Refused while it is live or a call of it is still in progress; cancel it first.
|
|
719
|
+
*/
|
|
720
|
+
public delete<ThrowOnError extends boolean = false>(parameters: {
|
|
721
|
+
batch_id: string;
|
|
722
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsBatchesDeleteResults, CallsBatchesDeleteErrors, ThrowOnError, 'data'> {
|
|
723
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }] }]);
|
|
724
|
+
return (options?.client ?? this.client).delete<CallsBatchesDeleteResults, CallsBatchesDeleteErrors, ThrowOnError, 'data'>({
|
|
725
|
+
responseStyle: 'data',
|
|
726
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
727
|
+
in: 'cookie',
|
|
728
|
+
name: 'talqing_session',
|
|
729
|
+
type: 'apiKey'
|
|
730
|
+
}],
|
|
731
|
+
url: '/v1/calls/batches/{batch_id}',
|
|
732
|
+
...options,
|
|
733
|
+
...params
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
|
|
711
737
|
/**
|
|
712
738
|
* Get Call Batch
|
|
713
739
|
*
|
|
@@ -770,7 +796,7 @@ export class Batches extends HeyApiClient {
|
|
|
770
796
|
/**
|
|
771
797
|
* Cancel Call Batch
|
|
772
798
|
*
|
|
773
|
-
* Stop a batch for good. There is no undo
|
|
799
|
+
* Stop a batch for good. There is no undo.
|
|
774
800
|
*
|
|
775
801
|
* Everyone not yet called immediately reads as `canceled`. Calls already
|
|
776
802
|
* ringing or in progress are **not** dropped — they run to their natural end,
|
|
@@ -975,7 +1001,7 @@ export class Calls extends HeyApiClient {
|
|
|
975
1001
|
start?: string | null;
|
|
976
1002
|
end?: string | null;
|
|
977
1003
|
agent_id?: string | null;
|
|
978
|
-
type?: 'WEB' | 'SIP_INBOUND' | 'SIP_OUTBOUND' | 'STREAM' | null;
|
|
1004
|
+
type?: 'WEB' | 'SIP_INBOUND' | 'SIP_OUTBOUND' | 'STREAM' | 'WHATSAPP_INBOUND' | null;
|
|
979
1005
|
status?: string | null;
|
|
980
1006
|
outcome?: string | null;
|
|
981
1007
|
contact_key?: string | null;
|
|
@@ -1478,31 +1504,202 @@ export class Catalog extends HeyApiClient {
|
|
|
1478
1504
|
}
|
|
1479
1505
|
}
|
|
1480
1506
|
|
|
1507
|
+
export class Analysis2 extends HeyApiClient {
|
|
1508
|
+
/**
|
|
1509
|
+
* Rerun Chat Analysis
|
|
1510
|
+
*
|
|
1511
|
+
* Analyse an ended chat again with its agent's saved definition.
|
|
1512
|
+
*
|
|
1513
|
+
* A real model call: the workspace is charged and the chat re-priced.
|
|
1514
|
+
*/
|
|
1515
|
+
public rerun<ThrowOnError extends boolean = false>(parameters: {
|
|
1516
|
+
chat_id: string;
|
|
1517
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ChatsAnalysisRerunResults, ChatsAnalysisRerunErrors, ThrowOnError, 'data'> {
|
|
1518
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'chat_id' }] }]);
|
|
1519
|
+
return (options?.client ?? this.client).post<ChatsAnalysisRerunResults, ChatsAnalysisRerunErrors, ThrowOnError, 'data'>({
|
|
1520
|
+
responseStyle: 'data',
|
|
1521
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
1522
|
+
in: 'cookie',
|
|
1523
|
+
name: 'talqing_session',
|
|
1524
|
+
type: 'apiKey'
|
|
1525
|
+
}],
|
|
1526
|
+
url: '/v1/chats/{chat_id}/analysis',
|
|
1527
|
+
...options,
|
|
1528
|
+
...params
|
|
1529
|
+
});
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
/**
|
|
1533
|
+
* Preview Chat Analysis
|
|
1534
|
+
*
|
|
1535
|
+
* Try an analysis definition against an ended chat. Nothing is saved; costs one model call.
|
|
1536
|
+
*/
|
|
1537
|
+
public preview<ThrowOnError extends boolean = false>(parameters: {
|
|
1538
|
+
chat_id: string;
|
|
1539
|
+
previewAnalysisRequest: PreviewAnalysisRequest;
|
|
1540
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ChatsAnalysisPreviewResults, ChatsAnalysisPreviewErrors, ThrowOnError, 'data'> {
|
|
1541
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'chat_id' }, { key: 'previewAnalysisRequest', map: 'body' }] }]);
|
|
1542
|
+
return (options?.client ?? this.client).post<ChatsAnalysisPreviewResults, ChatsAnalysisPreviewErrors, ThrowOnError, 'data'>({
|
|
1543
|
+
responseStyle: 'data',
|
|
1544
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
1545
|
+
in: 'cookie',
|
|
1546
|
+
name: 'talqing_session',
|
|
1547
|
+
type: 'apiKey'
|
|
1548
|
+
}],
|
|
1549
|
+
url: '/v1/chats/{chat_id}/analysis/preview',
|
|
1550
|
+
...options,
|
|
1551
|
+
...params,
|
|
1552
|
+
headers: {
|
|
1553
|
+
'Content-Type': 'application/json',
|
|
1554
|
+
...options?.headers,
|
|
1555
|
+
...params.headers
|
|
1556
|
+
}
|
|
1557
|
+
});
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
export class Items extends HeyApiClient {
|
|
1562
|
+
/**
|
|
1563
|
+
* List Chat Items
|
|
1564
|
+
*
|
|
1565
|
+
* The messages, tool calls and handoffs of one chat.
|
|
1566
|
+
*/
|
|
1567
|
+
public list<ThrowOnError extends boolean = false>(parameters: {
|
|
1568
|
+
chat_id: string;
|
|
1569
|
+
limit?: number;
|
|
1570
|
+
offset?: number;
|
|
1571
|
+
order?: string;
|
|
1572
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ChatsItemsListResults, ChatsItemsListErrors, ThrowOnError, 'data'> {
|
|
1573
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
1574
|
+
{ in: 'path', key: 'chat_id' },
|
|
1575
|
+
{ in: 'query', key: 'limit' },
|
|
1576
|
+
{ in: 'query', key: 'offset' },
|
|
1577
|
+
{ in: 'query', key: 'order' }
|
|
1578
|
+
] }]);
|
|
1579
|
+
return (options?.client ?? this.client).get<ChatsItemsListResults, ChatsItemsListErrors, ThrowOnError, 'data'>({
|
|
1580
|
+
responseStyle: 'data',
|
|
1581
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
1582
|
+
in: 'cookie',
|
|
1583
|
+
name: 'talqing_session',
|
|
1584
|
+
type: 'apiKey'
|
|
1585
|
+
}],
|
|
1586
|
+
url: '/v1/chats/{chat_id}/items',
|
|
1587
|
+
...options,
|
|
1588
|
+
...params
|
|
1589
|
+
});
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1481
1593
|
export class Messages extends HeyApiClient {
|
|
1482
1594
|
/**
|
|
1483
|
-
* Create
|
|
1595
|
+
* Create Chat Message
|
|
1596
|
+
*
|
|
1597
|
+
* Send a message and get the agent's reply back on this request.
|
|
1598
|
+
*
|
|
1599
|
+
* A newer message supersedes one still being answered: the older request
|
|
1600
|
+
* returns `status: canceled` with `superseded_by_item_id`.
|
|
1601
|
+
*/
|
|
1602
|
+
public create<ThrowOnError extends boolean = false>(parameters: {
|
|
1603
|
+
chat_id: string;
|
|
1604
|
+
chatMessageRequest: ChatMessageRequest;
|
|
1605
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ChatsMessagesCreateResults, ChatsMessagesCreateErrors, ThrowOnError, 'data'> {
|
|
1606
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'chat_id' }, { key: 'chatMessageRequest', map: 'body' }] }]);
|
|
1607
|
+
return (options?.client ?? this.client).post<ChatsMessagesCreateResults, ChatsMessagesCreateErrors, ThrowOnError, 'data'>({
|
|
1608
|
+
responseStyle: 'data',
|
|
1609
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
1610
|
+
in: 'cookie',
|
|
1611
|
+
name: 'talqing_session',
|
|
1612
|
+
type: 'apiKey'
|
|
1613
|
+
}],
|
|
1614
|
+
url: '/v1/chats/{chat_id}/messages',
|
|
1615
|
+
...options,
|
|
1616
|
+
...params,
|
|
1617
|
+
headers: {
|
|
1618
|
+
'Content-Type': 'application/json',
|
|
1619
|
+
...options?.headers,
|
|
1620
|
+
...params.headers
|
|
1621
|
+
}
|
|
1622
|
+
});
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
export class Tokens extends HeyApiClient {
|
|
1627
|
+
/**
|
|
1628
|
+
* Create Chat Token
|
|
1629
|
+
*
|
|
1630
|
+
* Mint a one-hour browser token for this chat. Mint another to refresh.
|
|
1631
|
+
*/
|
|
1632
|
+
public create<ThrowOnError extends boolean = false>(parameters: {
|
|
1633
|
+
chat_id: string;
|
|
1634
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ChatsTokensCreateResults, ChatsTokensCreateErrors, ThrowOnError, 'data'> {
|
|
1635
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'chat_id' }] }]);
|
|
1636
|
+
return (options?.client ?? this.client).post<ChatsTokensCreateResults, ChatsTokensCreateErrors, ThrowOnError, 'data'>({
|
|
1637
|
+
responseStyle: 'data',
|
|
1638
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
1639
|
+
in: 'cookie',
|
|
1640
|
+
name: 'talqing_session',
|
|
1641
|
+
type: 'apiKey'
|
|
1642
|
+
}],
|
|
1643
|
+
url: '/v1/chats/{chat_id}/token',
|
|
1644
|
+
...options,
|
|
1645
|
+
...params
|
|
1646
|
+
});
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
export class Chats extends HeyApiClient {
|
|
1651
|
+
/**
|
|
1652
|
+
* List Chats
|
|
1484
1653
|
*
|
|
1485
|
-
*
|
|
1654
|
+
* List chats, newest first.
|
|
1655
|
+
*/
|
|
1656
|
+
public list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1657
|
+
limit?: number;
|
|
1658
|
+
offset?: number;
|
|
1659
|
+
agent_id?: string | null;
|
|
1660
|
+
contact_key?: string | null;
|
|
1661
|
+
status?: 'open' | 'ended' | 'all';
|
|
1662
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ChatsListResults, ChatsListErrors, ThrowOnError, 'data'> {
|
|
1663
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
1664
|
+
{ in: 'query', key: 'limit' },
|
|
1665
|
+
{ in: 'query', key: 'offset' },
|
|
1666
|
+
{ in: 'query', key: 'agent_id' },
|
|
1667
|
+
{ in: 'query', key: 'contact_key' },
|
|
1668
|
+
{ in: 'query', key: 'status' }
|
|
1669
|
+
] }]);
|
|
1670
|
+
return (options?.client ?? this.client).get<ChatsListResults, ChatsListErrors, ThrowOnError, 'data'>({
|
|
1671
|
+
responseStyle: 'data',
|
|
1672
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
1673
|
+
in: 'cookie',
|
|
1674
|
+
name: 'talqing_session',
|
|
1675
|
+
type: 'apiKey'
|
|
1676
|
+
}],
|
|
1677
|
+
url: '/v1/chats',
|
|
1678
|
+
...options,
|
|
1679
|
+
...params
|
|
1680
|
+
});
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
/**
|
|
1684
|
+
* Create Chat
|
|
1486
1685
|
*
|
|
1487
|
-
*
|
|
1488
|
-
* same thread. `client_message_id` is a UUID you generate; re-sending with the
|
|
1489
|
-
* same one is ignored rather than duplicated.
|
|
1686
|
+
* Start a chat with a text agent. Send it messages with `create_chat_message`.
|
|
1490
1687
|
*
|
|
1491
|
-
*
|
|
1492
|
-
*
|
|
1688
|
+
* It stays open until the agent's `end_call` tool or `end_chat` ends it. Starting
|
|
1689
|
+
* one ends the contact's open chat with the same agent.
|
|
1493
1690
|
*/
|
|
1494
1691
|
public create<ThrowOnError extends boolean = false>(parameters: {
|
|
1495
|
-
|
|
1496
|
-
}, options?: Options<never, ThrowOnError>): RequestResult<
|
|
1497
|
-
const params = buildClientParams([parameters], [{ args: [{ key: '
|
|
1498
|
-
return (options?.client ?? this.client).post<
|
|
1692
|
+
createChatRequest: CreateChatRequest;
|
|
1693
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ChatsCreateResults, ChatsCreateErrors, ThrowOnError, 'data'> {
|
|
1694
|
+
const params = buildClientParams([parameters], [{ args: [{ key: 'createChatRequest', map: 'body' }] }]);
|
|
1695
|
+
return (options?.client ?? this.client).post<ChatsCreateResults, ChatsCreateErrors, ThrowOnError, 'data'>({
|
|
1499
1696
|
responseStyle: 'data',
|
|
1500
1697
|
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
1501
1698
|
in: 'cookie',
|
|
1502
1699
|
name: 'talqing_session',
|
|
1503
1700
|
type: 'apiKey'
|
|
1504
1701
|
}],
|
|
1505
|
-
url: '/v1/
|
|
1702
|
+
url: '/v1/chats',
|
|
1506
1703
|
...options,
|
|
1507
1704
|
...params,
|
|
1508
1705
|
headers: {
|
|
@@ -1512,9 +1709,117 @@ export class Messages extends HeyApiClient {
|
|
|
1512
1709
|
}
|
|
1513
1710
|
});
|
|
1514
1711
|
}
|
|
1712
|
+
|
|
1713
|
+
/**
|
|
1714
|
+
* Delete Chat
|
|
1715
|
+
*
|
|
1716
|
+
* Erase an ended chat's content; the chat and its cost stay. Cannot be undone.
|
|
1717
|
+
*/
|
|
1718
|
+
public delete<ThrowOnError extends boolean = false>(parameters: {
|
|
1719
|
+
chat_id: string;
|
|
1720
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ChatsDeleteResults, ChatsDeleteErrors, ThrowOnError, 'data'> {
|
|
1721
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'chat_id' }] }]);
|
|
1722
|
+
return (options?.client ?? this.client).delete<ChatsDeleteResults, ChatsDeleteErrors, ThrowOnError, 'data'>({
|
|
1723
|
+
responseStyle: 'data',
|
|
1724
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
1725
|
+
in: 'cookie',
|
|
1726
|
+
name: 'talqing_session',
|
|
1727
|
+
type: 'apiKey'
|
|
1728
|
+
}],
|
|
1729
|
+
url: '/v1/chats/{chat_id}',
|
|
1730
|
+
...options,
|
|
1731
|
+
...params
|
|
1732
|
+
});
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
/**
|
|
1736
|
+
* Get Chat
|
|
1737
|
+
*
|
|
1738
|
+
* Read one chat: its status, cost so far and, once ended, its analysis.
|
|
1739
|
+
*/
|
|
1740
|
+
public get<ThrowOnError extends boolean = false>(parameters: {
|
|
1741
|
+
chat_id: string;
|
|
1742
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ChatsGetResults, ChatsGetErrors, ThrowOnError, 'data'> {
|
|
1743
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'chat_id' }] }]);
|
|
1744
|
+
return (options?.client ?? this.client).get<ChatsGetResults, ChatsGetErrors, ThrowOnError, 'data'>({
|
|
1745
|
+
responseStyle: 'data',
|
|
1746
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
1747
|
+
in: 'cookie',
|
|
1748
|
+
name: 'talqing_session',
|
|
1749
|
+
type: 'apiKey'
|
|
1750
|
+
}],
|
|
1751
|
+
url: '/v1/chats/{chat_id}',
|
|
1752
|
+
...options,
|
|
1753
|
+
...params
|
|
1754
|
+
});
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
/**
|
|
1758
|
+
* Get Chat Detail
|
|
1759
|
+
*
|
|
1760
|
+
* One chat with its health snapshot, cost lines, vars and event trace.
|
|
1761
|
+
*/
|
|
1762
|
+
public detail<ThrowOnError extends boolean = false>(parameters: {
|
|
1763
|
+
chat_id: string;
|
|
1764
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ChatsDetailResults, ChatsDetailErrors, ThrowOnError, 'data'> {
|
|
1765
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'chat_id' }] }]);
|
|
1766
|
+
return (options?.client ?? this.client).get<ChatsDetailResults, ChatsDetailErrors, ThrowOnError, 'data'>({
|
|
1767
|
+
responseStyle: 'data',
|
|
1768
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
1769
|
+
in: 'cookie',
|
|
1770
|
+
name: 'talqing_session',
|
|
1771
|
+
type: 'apiKey'
|
|
1772
|
+
}],
|
|
1773
|
+
url: '/v1/chats/{chat_id}/detail',
|
|
1774
|
+
...options,
|
|
1775
|
+
...params
|
|
1776
|
+
});
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
/**
|
|
1780
|
+
* End Chat
|
|
1781
|
+
*
|
|
1782
|
+
* End a chat. Its analysis and `session.completed` webhook follow.
|
|
1783
|
+
*/
|
|
1784
|
+
public end<ThrowOnError extends boolean = false>(parameters: {
|
|
1785
|
+
chat_id: string;
|
|
1786
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ChatsEndResults, ChatsEndErrors, ThrowOnError, 'data'> {
|
|
1787
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'chat_id' }] }]);
|
|
1788
|
+
return (options?.client ?? this.client).post<ChatsEndResults, ChatsEndErrors, ThrowOnError, 'data'>({
|
|
1789
|
+
responseStyle: 'data',
|
|
1790
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
1791
|
+
in: 'cookie',
|
|
1792
|
+
name: 'talqing_session',
|
|
1793
|
+
type: 'apiKey'
|
|
1794
|
+
}],
|
|
1795
|
+
url: '/v1/chats/{chat_id}/end',
|
|
1796
|
+
...options,
|
|
1797
|
+
...params
|
|
1798
|
+
});
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
private _analysis?: Analysis2;
|
|
1802
|
+
get analysis(): Analysis2 {
|
|
1803
|
+
return this._analysis ??= new Analysis2({ client: this.client });
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
private _items?: Items;
|
|
1807
|
+
get items(): Items {
|
|
1808
|
+
return this._items ??= new Items({ client: this.client });
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
private _messages?: Messages;
|
|
1812
|
+
get messages(): Messages {
|
|
1813
|
+
return this._messages ??= new Messages({ client: this.client });
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
private _tokens?: Tokens;
|
|
1817
|
+
get tokens(): Tokens {
|
|
1818
|
+
return this._tokens ??= new Tokens({ client: this.client });
|
|
1819
|
+
}
|
|
1515
1820
|
}
|
|
1516
1821
|
|
|
1517
|
-
export class
|
|
1822
|
+
export class Items2 extends HeyApiClient {
|
|
1518
1823
|
/**
|
|
1519
1824
|
* List Conversation Items
|
|
1520
1825
|
*
|
|
@@ -1557,10 +1862,9 @@ export class Sessions extends HeyApiClient {
|
|
|
1557
1862
|
*
|
|
1558
1863
|
* The agent sessions behind a conversation, newest first.
|
|
1559
1864
|
*
|
|
1560
|
-
* A thread can be handled many times — each phone call
|
|
1561
|
-
*
|
|
1562
|
-
*
|
|
1563
|
-
* the matching `session_id` for `get_call`.
|
|
1865
|
+
* A thread can be handled many times — each phone call and each chat is one
|
|
1866
|
+
* session, recording which agent version ran, how it finished and what its
|
|
1867
|
+
* analysis concluded. A session's id is its `get_call` or `get_chat` id.
|
|
1564
1868
|
*/
|
|
1565
1869
|
public list<ThrowOnError extends boolean = false>(parameters: {
|
|
1566
1870
|
conversation_id: string;
|
|
@@ -1592,8 +1896,8 @@ export class Conversations extends HeyApiClient {
|
|
|
1592
1896
|
*
|
|
1593
1897
|
* List conversations across every channel, most recently active first.
|
|
1594
1898
|
*
|
|
1595
|
-
* One conversation is one
|
|
1596
|
-
*
|
|
1899
|
+
* One conversation is one thread — a web chat, a Telegram thread, or a single
|
|
1900
|
+
* phone call — with `surface` saying which. Several of them
|
|
1597
1901
|
* can belong to the same person: pass `contact_key` to list only theirs.
|
|
1598
1902
|
*/
|
|
1599
1903
|
public list<ThrowOnError extends boolean = false>(parameters?: {
|
|
@@ -1601,12 +1905,14 @@ export class Conversations extends HeyApiClient {
|
|
|
1601
1905
|
offset?: number;
|
|
1602
1906
|
agent_id?: string | null;
|
|
1603
1907
|
contact_key?: string | null;
|
|
1908
|
+
status?: 'active' | 'inactive' | 'all';
|
|
1604
1909
|
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsListResults, ConversationsListErrors, ThrowOnError, 'data'> {
|
|
1605
1910
|
const params = buildClientParams([parameters], [{ args: [
|
|
1606
1911
|
{ in: 'query', key: 'limit' },
|
|
1607
1912
|
{ in: 'query', key: 'offset' },
|
|
1608
1913
|
{ in: 'query', key: 'agent_id' },
|
|
1609
|
-
{ in: 'query', key: 'contact_key' }
|
|
1914
|
+
{ in: 'query', key: 'contact_key' },
|
|
1915
|
+
{ in: 'query', key: 'status' }
|
|
1610
1916
|
] }]);
|
|
1611
1917
|
return (options?.client ?? this.client).get<ConversationsListResults, ConversationsListErrors, ThrowOnError, 'data'>({
|
|
1612
1918
|
responseStyle: 'data',
|
|
@@ -1621,41 +1927,6 @@ export class Conversations extends HeyApiClient {
|
|
|
1621
1927
|
});
|
|
1622
1928
|
}
|
|
1623
1929
|
|
|
1624
|
-
/**
|
|
1625
|
-
* Create Text Conversation
|
|
1626
|
-
*
|
|
1627
|
-
* Open a text conversation with a published text agent.
|
|
1628
|
-
*
|
|
1629
|
-
* `contact_key` is your own stable id for the person you are talking to —
|
|
1630
|
-
* unique in the workspace, and how you reach them again. `userdata` seeds what
|
|
1631
|
-
* the agent knows about them, readable as `{{userdata.field}}` from the
|
|
1632
|
-
* agent's tools.
|
|
1633
|
-
*
|
|
1634
|
-
* Creating the conversation does not send anything; call `create_text_message`
|
|
1635
|
-
* to say something.
|
|
1636
|
-
*/
|
|
1637
|
-
public create<ThrowOnError extends boolean = false>(parameters: {
|
|
1638
|
-
createTextConversationRequest: CreateTextConversationRequest;
|
|
1639
|
-
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsCreateResults, ConversationsCreateErrors, ThrowOnError, 'data'> {
|
|
1640
|
-
const params = buildClientParams([parameters], [{ args: [{ key: 'createTextConversationRequest', map: 'body' }] }]);
|
|
1641
|
-
return (options?.client ?? this.client).post<ConversationsCreateResults, ConversationsCreateErrors, ThrowOnError, 'data'>({
|
|
1642
|
-
responseStyle: 'data',
|
|
1643
|
-
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
1644
|
-
in: 'cookie',
|
|
1645
|
-
name: 'talqing_session',
|
|
1646
|
-
type: 'apiKey'
|
|
1647
|
-
}],
|
|
1648
|
-
url: '/v1/conversations',
|
|
1649
|
-
...options,
|
|
1650
|
-
...params,
|
|
1651
|
-
headers: {
|
|
1652
|
-
'Content-Type': 'application/json',
|
|
1653
|
-
...options?.headers,
|
|
1654
|
-
...params.headers
|
|
1655
|
-
}
|
|
1656
|
-
});
|
|
1657
|
-
}
|
|
1658
|
-
|
|
1659
1930
|
/**
|
|
1660
1931
|
* Get Conversation
|
|
1661
1932
|
*
|
|
@@ -1774,20 +2045,43 @@ export class Conversations extends HeyApiClient {
|
|
|
1774
2045
|
});
|
|
1775
2046
|
}
|
|
1776
2047
|
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
2048
|
+
/**
|
|
2049
|
+
* List Conversation Trace
|
|
2050
|
+
*
|
|
2051
|
+
* What the platform did during this conversation's sessions, oldest first.
|
|
2052
|
+
*/
|
|
2053
|
+
public trace<ThrowOnError extends boolean = false>(parameters: {
|
|
2054
|
+
conversation_id: string;
|
|
2055
|
+
after?: string | null;
|
|
2056
|
+
before?: string | null;
|
|
2057
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsTraceResults, ConversationsTraceErrors, ThrowOnError, 'data'> {
|
|
2058
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
2059
|
+
{ in: 'path', key: 'conversation_id' },
|
|
2060
|
+
{ in: 'query', key: 'after' },
|
|
2061
|
+
{ in: 'query', key: 'before' }
|
|
2062
|
+
] }]);
|
|
2063
|
+
return (options?.client ?? this.client).get<ConversationsTraceResults, ConversationsTraceErrors, ThrowOnError, 'data'>({
|
|
2064
|
+
responseStyle: 'data',
|
|
2065
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
2066
|
+
in: 'cookie',
|
|
2067
|
+
name: 'talqing_session',
|
|
2068
|
+
type: 'apiKey'
|
|
2069
|
+
}],
|
|
2070
|
+
url: '/v1/conversations/{conversation_id}/trace',
|
|
2071
|
+
...options,
|
|
2072
|
+
...params
|
|
2073
|
+
});
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
private _items?: Items2;
|
|
2077
|
+
get items(): Items2 {
|
|
2078
|
+
return this._items ??= new Items2({ client: this.client });
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
private _sessions?: Sessions;
|
|
2082
|
+
get sessions(): Sessions {
|
|
2083
|
+
return this._sessions ??= new Sessions({ client: this.client });
|
|
2084
|
+
}
|
|
1791
2085
|
}
|
|
1792
2086
|
|
|
1793
2087
|
export class Agents2 extends HeyApiClient {
|
|
@@ -2504,6 +2798,30 @@ export class Batches2 extends HeyApiClient {
|
|
|
2504
2798
|
});
|
|
2505
2799
|
}
|
|
2506
2800
|
|
|
2801
|
+
/**
|
|
2802
|
+
* Delete Email Batch
|
|
2803
|
+
*
|
|
2804
|
+
* Delete a batch, its rows and its sends for good. **The record of what was sent goes too.**
|
|
2805
|
+
*
|
|
2806
|
+
* Refused while it is still drafting or a send has not finished; cancel those first.
|
|
2807
|
+
*/
|
|
2808
|
+
public delete<ThrowOnError extends boolean = false>(parameters: {
|
|
2809
|
+
batch_id: string;
|
|
2810
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesDeleteResults, EmailBatchesDeleteErrors, ThrowOnError, 'data'> {
|
|
2811
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }] }]);
|
|
2812
|
+
return (options?.client ?? this.client).delete<EmailBatchesDeleteResults, EmailBatchesDeleteErrors, ThrowOnError, 'data'>({
|
|
2813
|
+
responseStyle: 'data',
|
|
2814
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
2815
|
+
in: 'cookie',
|
|
2816
|
+
name: 'talqing_session',
|
|
2817
|
+
type: 'apiKey'
|
|
2818
|
+
}],
|
|
2819
|
+
url: '/v1/email/batches/{batch_id}',
|
|
2820
|
+
...options,
|
|
2821
|
+
...params
|
|
2822
|
+
});
|
|
2823
|
+
}
|
|
2824
|
+
|
|
2507
2825
|
/**
|
|
2508
2826
|
* Get Email Batch
|
|
2509
2827
|
*
|
|
@@ -2567,8 +2885,7 @@ export class Batches2 extends HeyApiClient {
|
|
|
2567
2885
|
/**
|
|
2568
2886
|
* Cancel Email Batch
|
|
2569
2887
|
*
|
|
2570
|
-
* Stop drafting for good.
|
|
2571
|
-
* record of what was sent to whom.
|
|
2888
|
+
* Stop drafting for good.
|
|
2572
2889
|
*
|
|
2573
2890
|
* Rows already drafted are **not** touched and neither is any send: cancelling
|
|
2574
2891
|
* stops drafting, and drafts already produced are still worth reviewing and
|
|
@@ -3568,8 +3885,8 @@ export class Secrets extends HeyApiClient {
|
|
|
3568
3885
|
/**
|
|
3569
3886
|
* Delete Secret
|
|
3570
3887
|
*
|
|
3571
|
-
* Delete a secret permanently.
|
|
3572
|
-
*
|
|
3888
|
+
* Delete a secret permanently. Refused with 409 while a tool, integration or
|
|
3889
|
+
* carrier account references it. Organization admins only.
|
|
3573
3890
|
*/
|
|
3574
3891
|
public delete<ThrowOnError extends boolean = false>(parameters: {
|
|
3575
3892
|
secret_id: string;
|
|
@@ -5044,6 +5361,443 @@ export class Webhooks extends HeyApiClient {
|
|
|
5044
5361
|
}
|
|
5045
5362
|
}
|
|
5046
5363
|
|
|
5364
|
+
export class Recipients3 extends HeyApiClient {
|
|
5365
|
+
/**
|
|
5366
|
+
* List Whatsapp Batch Recipients
|
|
5367
|
+
*
|
|
5368
|
+
* A batch's rows in upload order, each with its rendered message.
|
|
5369
|
+
*
|
|
5370
|
+
* `status` may repeat; a row matching any of them is returned.
|
|
5371
|
+
*/
|
|
5372
|
+
public list<ThrowOnError extends boolean = false>(parameters: {
|
|
5373
|
+
batch_id: string;
|
|
5374
|
+
limit?: number;
|
|
5375
|
+
offset?: number;
|
|
5376
|
+
status?: Array<'ready' | 'skipped' | 'sending' | 'queued' | 'sent' | 'delivered' | 'read' | 'undelivered' | 'failed' | 'replied'> | null;
|
|
5377
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesRecipientsListResults, WhatsappBatchesRecipientsListErrors, ThrowOnError, 'data'> {
|
|
5378
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
5379
|
+
{ in: 'path', key: 'batch_id' },
|
|
5380
|
+
{ in: 'query', key: 'limit' },
|
|
5381
|
+
{ in: 'query', key: 'offset' },
|
|
5382
|
+
{ in: 'query', key: 'status' }
|
|
5383
|
+
] }]);
|
|
5384
|
+
return (options?.client ?? this.client).get<WhatsappBatchesRecipientsListResults, WhatsappBatchesRecipientsListErrors, ThrowOnError, 'data'>({
|
|
5385
|
+
responseStyle: 'data',
|
|
5386
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
5387
|
+
in: 'cookie',
|
|
5388
|
+
name: 'talqing_session',
|
|
5389
|
+
type: 'apiKey'
|
|
5390
|
+
}],
|
|
5391
|
+
url: '/v1/whatsapp/batches/{batch_id}/recipients',
|
|
5392
|
+
...options,
|
|
5393
|
+
...params
|
|
5394
|
+
});
|
|
5395
|
+
}
|
|
5396
|
+
|
|
5397
|
+
/**
|
|
5398
|
+
* Restore Whatsapp Batch Recipients
|
|
5399
|
+
*
|
|
5400
|
+
* Put rows a person skipped back. A row skipped for its cells returns when they are fixed.
|
|
5401
|
+
*/
|
|
5402
|
+
public restore<ThrowOnError extends boolean = false>(parameters: {
|
|
5403
|
+
batch_id: string;
|
|
5404
|
+
selectRecipientsRequest: SelectRecipientsRequest;
|
|
5405
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesRecipientsRestoreResults, WhatsappBatchesRecipientsRestoreErrors, ThrowOnError, 'data'> {
|
|
5406
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }, { key: 'selectRecipientsRequest', map: 'body' }] }]);
|
|
5407
|
+
return (options?.client ?? this.client).post<WhatsappBatchesRecipientsRestoreResults, WhatsappBatchesRecipientsRestoreErrors, ThrowOnError, 'data'>({
|
|
5408
|
+
responseStyle: 'data',
|
|
5409
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
5410
|
+
in: 'cookie',
|
|
5411
|
+
name: 'talqing_session',
|
|
5412
|
+
type: 'apiKey'
|
|
5413
|
+
}],
|
|
5414
|
+
url: '/v1/whatsapp/batches/{batch_id}/recipients/restore',
|
|
5415
|
+
...options,
|
|
5416
|
+
...params,
|
|
5417
|
+
headers: {
|
|
5418
|
+
'Content-Type': 'application/json',
|
|
5419
|
+
...options?.headers,
|
|
5420
|
+
...params.headers
|
|
5421
|
+
}
|
|
5422
|
+
});
|
|
5423
|
+
}
|
|
5424
|
+
|
|
5425
|
+
/**
|
|
5426
|
+
* Skip Whatsapp Batch Recipients
|
|
5427
|
+
*
|
|
5428
|
+
* Take ready rows out of the send. Reversible with restore.
|
|
5429
|
+
*/
|
|
5430
|
+
public skip<ThrowOnError extends boolean = false>(parameters: {
|
|
5431
|
+
batch_id: string;
|
|
5432
|
+
selectRecipientsRequest: SelectRecipientsRequest;
|
|
5433
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesRecipientsSkipResults, WhatsappBatchesRecipientsSkipErrors, ThrowOnError, 'data'> {
|
|
5434
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }, { key: 'selectRecipientsRequest', map: 'body' }] }]);
|
|
5435
|
+
return (options?.client ?? this.client).post<WhatsappBatchesRecipientsSkipResults, WhatsappBatchesRecipientsSkipErrors, ThrowOnError, 'data'>({
|
|
5436
|
+
responseStyle: 'data',
|
|
5437
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
5438
|
+
in: 'cookie',
|
|
5439
|
+
name: 'talqing_session',
|
|
5440
|
+
type: 'apiKey'
|
|
5441
|
+
}],
|
|
5442
|
+
url: '/v1/whatsapp/batches/{batch_id}/recipients/skip',
|
|
5443
|
+
...options,
|
|
5444
|
+
...params,
|
|
5445
|
+
headers: {
|
|
5446
|
+
'Content-Type': 'application/json',
|
|
5447
|
+
...options?.headers,
|
|
5448
|
+
...params.headers
|
|
5449
|
+
}
|
|
5450
|
+
});
|
|
5451
|
+
}
|
|
5452
|
+
|
|
5453
|
+
/**
|
|
5454
|
+
* Patch Whatsapp Batch Recipient
|
|
5455
|
+
*
|
|
5456
|
+
* Edit cells on a row not yet sent, its phone included. An empty value clears the edit.
|
|
5457
|
+
*/
|
|
5458
|
+
public update<ThrowOnError extends boolean = false>(parameters: {
|
|
5459
|
+
batch_id: string;
|
|
5460
|
+
recipient_id: string;
|
|
5461
|
+
patchWhatsAppRecipientRequest: PatchWhatsAppRecipientRequest;
|
|
5462
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesRecipientsUpdateResults, WhatsappBatchesRecipientsUpdateErrors, ThrowOnError, 'data'> {
|
|
5463
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
5464
|
+
{ in: 'path', key: 'batch_id' },
|
|
5465
|
+
{ in: 'path', key: 'recipient_id' },
|
|
5466
|
+
{ key: 'patchWhatsAppRecipientRequest', map: 'body' }
|
|
5467
|
+
] }]);
|
|
5468
|
+
return (options?.client ?? this.client).patch<WhatsappBatchesRecipientsUpdateResults, WhatsappBatchesRecipientsUpdateErrors, ThrowOnError, 'data'>({
|
|
5469
|
+
responseStyle: 'data',
|
|
5470
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
5471
|
+
in: 'cookie',
|
|
5472
|
+
name: 'talqing_session',
|
|
5473
|
+
type: 'apiKey'
|
|
5474
|
+
}],
|
|
5475
|
+
url: '/v1/whatsapp/batches/{batch_id}/recipients/{recipient_id}',
|
|
5476
|
+
...options,
|
|
5477
|
+
...params,
|
|
5478
|
+
headers: {
|
|
5479
|
+
'Content-Type': 'application/json',
|
|
5480
|
+
...options?.headers,
|
|
5481
|
+
...params.headers
|
|
5482
|
+
}
|
|
5483
|
+
});
|
|
5484
|
+
}
|
|
5485
|
+
}
|
|
5486
|
+
|
|
5487
|
+
export class Batches3 extends HeyApiClient {
|
|
5488
|
+
/**
|
|
5489
|
+
* List Whatsapp Batches
|
|
5490
|
+
*
|
|
5491
|
+
* List WhatsApp batches, newest first.
|
|
5492
|
+
*/
|
|
5493
|
+
public list<ThrowOnError extends boolean = false>(parameters?: {
|
|
5494
|
+
limit?: number;
|
|
5495
|
+
offset?: number;
|
|
5496
|
+
status?: 'draft' | 'scheduled' | 'sending' | 'paused' | 'completed' | 'canceled' | 'failed' | null;
|
|
5497
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesListResults, WhatsappBatchesListErrors, ThrowOnError, 'data'> {
|
|
5498
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
5499
|
+
{ in: 'query', key: 'limit' },
|
|
5500
|
+
{ in: 'query', key: 'offset' },
|
|
5501
|
+
{ in: 'query', key: 'status' }
|
|
5502
|
+
] }]);
|
|
5503
|
+
return (options?.client ?? this.client).get<WhatsappBatchesListResults, WhatsappBatchesListErrors, ThrowOnError, 'data'>({
|
|
5504
|
+
responseStyle: 'data',
|
|
5505
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
5506
|
+
in: 'cookie',
|
|
5507
|
+
name: 'talqing_session',
|
|
5508
|
+
type: 'apiKey'
|
|
5509
|
+
}],
|
|
5510
|
+
url: '/v1/whatsapp/batches',
|
|
5511
|
+
...options,
|
|
5512
|
+
...params
|
|
5513
|
+
});
|
|
5514
|
+
}
|
|
5515
|
+
|
|
5516
|
+
/**
|
|
5517
|
+
* Create Whatsapp Batch
|
|
5518
|
+
*
|
|
5519
|
+
* Create a WhatsApp batch: one approved template, sent once per CSV row. Sends nothing yet.
|
|
5520
|
+
*
|
|
5521
|
+
* Only message people who opted in to hear from you on WhatsApp. A row with an
|
|
5522
|
+
* invalid or repeated phone, or a blank or line-broken mapped cell, is kept and
|
|
5523
|
+
* skipped with the reason. Replies go to the sender's assigned agent, which
|
|
5524
|
+
* sees the row's cells as `{{userdata.<column>}}`.
|
|
5525
|
+
*/
|
|
5526
|
+
public create<ThrowOnError extends boolean = false>(parameters: {
|
|
5527
|
+
createWhatsAppBatchRequest: CreateWhatsAppBatchRequest;
|
|
5528
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesCreateResults, WhatsappBatchesCreateErrors, ThrowOnError, 'data'> {
|
|
5529
|
+
const params = buildClientParams([parameters], [{ args: [{ key: 'createWhatsAppBatchRequest', map: 'body' }] }]);
|
|
5530
|
+
return (options?.client ?? this.client).post<WhatsappBatchesCreateResults, WhatsappBatchesCreateErrors, ThrowOnError, 'data'>({
|
|
5531
|
+
responseStyle: 'data',
|
|
5532
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
5533
|
+
in: 'cookie',
|
|
5534
|
+
name: 'talqing_session',
|
|
5535
|
+
type: 'apiKey'
|
|
5536
|
+
}],
|
|
5537
|
+
url: '/v1/whatsapp/batches',
|
|
5538
|
+
...options,
|
|
5539
|
+
...params,
|
|
5540
|
+
headers: {
|
|
5541
|
+
'Content-Type': 'application/json',
|
|
5542
|
+
...options?.headers,
|
|
5543
|
+
...params.headers
|
|
5544
|
+
}
|
|
5545
|
+
});
|
|
5546
|
+
}
|
|
5547
|
+
|
|
5548
|
+
/**
|
|
5549
|
+
* Delete Whatsapp Batch
|
|
5550
|
+
*
|
|
5551
|
+
* Delete a batch and its rows for good. A live batch must be canceled first.
|
|
5552
|
+
*
|
|
5553
|
+
* The conversations it started stay; its delivery and reply counts do not.
|
|
5554
|
+
*/
|
|
5555
|
+
public delete<ThrowOnError extends boolean = false>(parameters: {
|
|
5556
|
+
batch_id: string;
|
|
5557
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesDeleteResults, WhatsappBatchesDeleteErrors, ThrowOnError, 'data'> {
|
|
5558
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }] }]);
|
|
5559
|
+
return (options?.client ?? this.client).delete<WhatsappBatchesDeleteResults, WhatsappBatchesDeleteErrors, ThrowOnError, 'data'>({
|
|
5560
|
+
responseStyle: 'data',
|
|
5561
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
5562
|
+
in: 'cookie',
|
|
5563
|
+
name: 'talqing_session',
|
|
5564
|
+
type: 'apiKey'
|
|
5565
|
+
}],
|
|
5566
|
+
url: '/v1/whatsapp/batches/{batch_id}',
|
|
5567
|
+
...options,
|
|
5568
|
+
...params
|
|
5569
|
+
});
|
|
5570
|
+
}
|
|
5571
|
+
|
|
5572
|
+
/**
|
|
5573
|
+
* Get Whatsapp Batch
|
|
5574
|
+
*
|
|
5575
|
+
* One batch: its template, schedule and per-status counts, `replied` included.
|
|
5576
|
+
*/
|
|
5577
|
+
public get<ThrowOnError extends boolean = false>(parameters: {
|
|
5578
|
+
batch_id: string;
|
|
5579
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesGetResults, WhatsappBatchesGetErrors, ThrowOnError, 'data'> {
|
|
5580
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }] }]);
|
|
5581
|
+
return (options?.client ?? this.client).get<WhatsappBatchesGetResults, WhatsappBatchesGetErrors, ThrowOnError, 'data'>({
|
|
5582
|
+
responseStyle: 'data',
|
|
5583
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
5584
|
+
in: 'cookie',
|
|
5585
|
+
name: 'talqing_session',
|
|
5586
|
+
type: 'apiKey'
|
|
5587
|
+
}],
|
|
5588
|
+
url: '/v1/whatsapp/batches/{batch_id}',
|
|
5589
|
+
...options,
|
|
5590
|
+
...params
|
|
5591
|
+
});
|
|
5592
|
+
}
|
|
5593
|
+
|
|
5594
|
+
/**
|
|
5595
|
+
* Patch Whatsapp Batch
|
|
5596
|
+
*
|
|
5597
|
+
* Edit a batch. Pacing and the window reach a live send within minutes.
|
|
5598
|
+
*
|
|
5599
|
+
* `variable_map` changes only before sending, `start_at` only before it begins;
|
|
5600
|
+
* a finished batch takes `name` alone.
|
|
5601
|
+
*/
|
|
5602
|
+
public update<ThrowOnError extends boolean = false>(parameters: {
|
|
5603
|
+
batch_id: string;
|
|
5604
|
+
patchWhatsAppBatchRequest: PatchWhatsAppBatchRequest;
|
|
5605
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesUpdateResults, WhatsappBatchesUpdateErrors, ThrowOnError, 'data'> {
|
|
5606
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }, { key: 'patchWhatsAppBatchRequest', map: 'body' }] }]);
|
|
5607
|
+
return (options?.client ?? this.client).patch<WhatsappBatchesUpdateResults, WhatsappBatchesUpdateErrors, ThrowOnError, 'data'>({
|
|
5608
|
+
responseStyle: 'data',
|
|
5609
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
5610
|
+
in: 'cookie',
|
|
5611
|
+
name: 'talqing_session',
|
|
5612
|
+
type: 'apiKey'
|
|
5613
|
+
}],
|
|
5614
|
+
url: '/v1/whatsapp/batches/{batch_id}',
|
|
5615
|
+
...options,
|
|
5616
|
+
...params,
|
|
5617
|
+
headers: {
|
|
5618
|
+
'Content-Type': 'application/json',
|
|
5619
|
+
...options?.headers,
|
|
5620
|
+
...params.headers
|
|
5621
|
+
}
|
|
5622
|
+
});
|
|
5623
|
+
}
|
|
5624
|
+
|
|
5625
|
+
/**
|
|
5626
|
+
* Cancel Whatsapp Batch
|
|
5627
|
+
*
|
|
5628
|
+
* Stop for good. Messages already sent stay sent, and replies are still answered.
|
|
5629
|
+
*/
|
|
5630
|
+
public cancel<ThrowOnError extends boolean = false>(parameters: {
|
|
5631
|
+
batch_id: string;
|
|
5632
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesCancelResults, WhatsappBatchesCancelErrors, ThrowOnError, 'data'> {
|
|
5633
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }] }]);
|
|
5634
|
+
return (options?.client ?? this.client).post<WhatsappBatchesCancelResults, WhatsappBatchesCancelErrors, ThrowOnError, 'data'>({
|
|
5635
|
+
responseStyle: 'data',
|
|
5636
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
5637
|
+
in: 'cookie',
|
|
5638
|
+
name: 'talqing_session',
|
|
5639
|
+
type: 'apiKey'
|
|
5640
|
+
}],
|
|
5641
|
+
url: '/v1/whatsapp/batches/{batch_id}/cancel',
|
|
5642
|
+
...options,
|
|
5643
|
+
...params
|
|
5644
|
+
});
|
|
5645
|
+
}
|
|
5646
|
+
|
|
5647
|
+
/**
|
|
5648
|
+
* Pause Whatsapp Batch
|
|
5649
|
+
*
|
|
5650
|
+
* Stop sending before the next message. Nothing is lost.
|
|
5651
|
+
*/
|
|
5652
|
+
public pause<ThrowOnError extends boolean = false>(parameters: {
|
|
5653
|
+
batch_id: string;
|
|
5654
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesPauseResults, WhatsappBatchesPauseErrors, ThrowOnError, 'data'> {
|
|
5655
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }] }]);
|
|
5656
|
+
return (options?.client ?? this.client).post<WhatsappBatchesPauseResults, WhatsappBatchesPauseErrors, ThrowOnError, 'data'>({
|
|
5657
|
+
responseStyle: 'data',
|
|
5658
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
5659
|
+
in: 'cookie',
|
|
5660
|
+
name: 'talqing_session',
|
|
5661
|
+
type: 'apiKey'
|
|
5662
|
+
}],
|
|
5663
|
+
url: '/v1/whatsapp/batches/{batch_id}/pause',
|
|
5664
|
+
...options,
|
|
5665
|
+
...params
|
|
5666
|
+
});
|
|
5667
|
+
}
|
|
5668
|
+
|
|
5669
|
+
/**
|
|
5670
|
+
* Resume Whatsapp Batch
|
|
5671
|
+
*
|
|
5672
|
+
* Carry on sending from where the batch stopped.
|
|
5673
|
+
*/
|
|
5674
|
+
public resume<ThrowOnError extends boolean = false>(parameters: {
|
|
5675
|
+
batch_id: string;
|
|
5676
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesResumeResults, WhatsappBatchesResumeErrors, ThrowOnError, 'data'> {
|
|
5677
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }] }]);
|
|
5678
|
+
return (options?.client ?? this.client).post<WhatsappBatchesResumeResults, WhatsappBatchesResumeErrors, ThrowOnError, 'data'>({
|
|
5679
|
+
responseStyle: 'data',
|
|
5680
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
5681
|
+
in: 'cookie',
|
|
5682
|
+
name: 'talqing_session',
|
|
5683
|
+
type: 'apiKey'
|
|
5684
|
+
}],
|
|
5685
|
+
url: '/v1/whatsapp/batches/{batch_id}/resume',
|
|
5686
|
+
...options,
|
|
5687
|
+
...params
|
|
5688
|
+
});
|
|
5689
|
+
}
|
|
5690
|
+
|
|
5691
|
+
/**
|
|
5692
|
+
* Send Whatsapp Batch
|
|
5693
|
+
*
|
|
5694
|
+
* Send every ready row. **This messages real people and cannot be undone.**
|
|
5695
|
+
*
|
|
5696
|
+
* `start_at` schedules it, `window` holds it to business hours, and
|
|
5697
|
+
* `send_daily_cap` (default 250, Meta's lowest tier) and `send_gap_seconds`
|
|
5698
|
+
* pace it.
|
|
5699
|
+
*/
|
|
5700
|
+
public send<ThrowOnError extends boolean = false>(parameters: {
|
|
5701
|
+
batch_id: string;
|
|
5702
|
+
sendWhatsAppBatchRequest: SendWhatsAppBatchRequest;
|
|
5703
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesSendResults, WhatsappBatchesSendErrors, ThrowOnError, 'data'> {
|
|
5704
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }, { key: 'sendWhatsAppBatchRequest', map: 'body' }] }]);
|
|
5705
|
+
return (options?.client ?? this.client).post<WhatsappBatchesSendResults, WhatsappBatchesSendErrors, ThrowOnError, 'data'>({
|
|
5706
|
+
responseStyle: 'data',
|
|
5707
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
5708
|
+
in: 'cookie',
|
|
5709
|
+
name: 'talqing_session',
|
|
5710
|
+
type: 'apiKey'
|
|
5711
|
+
}],
|
|
5712
|
+
url: '/v1/whatsapp/batches/{batch_id}/send',
|
|
5713
|
+
...options,
|
|
5714
|
+
...params,
|
|
5715
|
+
headers: {
|
|
5716
|
+
'Content-Type': 'application/json',
|
|
5717
|
+
...options?.headers,
|
|
5718
|
+
...params.headers
|
|
5719
|
+
}
|
|
5720
|
+
});
|
|
5721
|
+
}
|
|
5722
|
+
|
|
5723
|
+
private _recipients?: Recipients3;
|
|
5724
|
+
get recipients(): Recipients3 {
|
|
5725
|
+
return this._recipients ??= new Recipients3({ client: this.client });
|
|
5726
|
+
}
|
|
5727
|
+
}
|
|
5728
|
+
|
|
5729
|
+
export class Templates extends HeyApiClient {
|
|
5730
|
+
/**
|
|
5731
|
+
* List Whatsapp Templates
|
|
5732
|
+
*
|
|
5733
|
+
* List a WhatsApp sender's approved templates, read live from its BSP.
|
|
5734
|
+
*
|
|
5735
|
+
* One with `unsupported_reason` set cannot be sent from a batch.
|
|
5736
|
+
*/
|
|
5737
|
+
public list<ThrowOnError extends boolean = false>(parameters: {
|
|
5738
|
+
integration_id: string;
|
|
5739
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappTemplatesListResults, WhatsappTemplatesListErrors, ThrowOnError, 'data'> {
|
|
5740
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'integration_id' }] }]);
|
|
5741
|
+
return (options?.client ?? this.client).get<WhatsappTemplatesListResults, WhatsappTemplatesListErrors, ThrowOnError, 'data'>({
|
|
5742
|
+
responseStyle: 'data',
|
|
5743
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
5744
|
+
in: 'cookie',
|
|
5745
|
+
name: 'talqing_session',
|
|
5746
|
+
type: 'apiKey'
|
|
5747
|
+
}],
|
|
5748
|
+
url: '/v1/whatsapp/templates',
|
|
5749
|
+
...options,
|
|
5750
|
+
...params
|
|
5751
|
+
});
|
|
5752
|
+
}
|
|
5753
|
+
}
|
|
5754
|
+
|
|
5755
|
+
export class TwilioSenders extends HeyApiClient {
|
|
5756
|
+
/**
|
|
5757
|
+
* List Twilio Whatsapp Senders
|
|
5758
|
+
*
|
|
5759
|
+
* List the WhatsApp senders on a Twilio account, before connecting one. Stores nothing.
|
|
5760
|
+
*/
|
|
5761
|
+
public list<ThrowOnError extends boolean = false>(parameters: {
|
|
5762
|
+
twilioSendersRequest: TwilioSendersRequest;
|
|
5763
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappTwilioSendersListResults, WhatsappTwilioSendersListErrors, ThrowOnError, 'data'> {
|
|
5764
|
+
const params = buildClientParams([parameters], [{ args: [{ key: 'twilioSendersRequest', map: 'body' }] }]);
|
|
5765
|
+
return (options?.client ?? this.client).post<WhatsappTwilioSendersListResults, WhatsappTwilioSendersListErrors, ThrowOnError, 'data'>({
|
|
5766
|
+
responseStyle: 'data',
|
|
5767
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
5768
|
+
in: 'cookie',
|
|
5769
|
+
name: 'talqing_session',
|
|
5770
|
+
type: 'apiKey'
|
|
5771
|
+
}],
|
|
5772
|
+
url: '/v1/whatsapp/twilio-senders',
|
|
5773
|
+
...options,
|
|
5774
|
+
...params,
|
|
5775
|
+
headers: {
|
|
5776
|
+
'Content-Type': 'application/json',
|
|
5777
|
+
...options?.headers,
|
|
5778
|
+
...params.headers
|
|
5779
|
+
}
|
|
5780
|
+
});
|
|
5781
|
+
}
|
|
5782
|
+
}
|
|
5783
|
+
|
|
5784
|
+
export class Whatsapp extends HeyApiClient {
|
|
5785
|
+
private _batches?: Batches3;
|
|
5786
|
+
get batches(): Batches3 {
|
|
5787
|
+
return this._batches ??= new Batches3({ client: this.client });
|
|
5788
|
+
}
|
|
5789
|
+
|
|
5790
|
+
private _templates?: Templates;
|
|
5791
|
+
get templates(): Templates {
|
|
5792
|
+
return this._templates ??= new Templates({ client: this.client });
|
|
5793
|
+
}
|
|
5794
|
+
|
|
5795
|
+
private _twilioSenders?: TwilioSenders;
|
|
5796
|
+
get twilioSenders(): TwilioSenders {
|
|
5797
|
+
return this._twilioSenders ??= new TwilioSenders({ client: this.client });
|
|
5798
|
+
}
|
|
5799
|
+
}
|
|
5800
|
+
|
|
5047
5801
|
export class TalqingApi extends HeyApiClient {
|
|
5048
5802
|
public static readonly __registry: HeyApiRegistry<TalqingApi> = new HeyApiRegistry<TalqingApi>();
|
|
5049
5803
|
|
|
@@ -5098,6 +5852,11 @@ export class TalqingApi extends HeyApiClient {
|
|
|
5098
5852
|
return this._catalog ??= new Catalog({ client: this.client });
|
|
5099
5853
|
}
|
|
5100
5854
|
|
|
5855
|
+
private _chats?: Chats;
|
|
5856
|
+
get chats(): Chats {
|
|
5857
|
+
return this._chats ??= new Chats({ client: this.client });
|
|
5858
|
+
}
|
|
5859
|
+
|
|
5101
5860
|
private _conversations?: Conversations;
|
|
5102
5861
|
get conversations(): Conversations {
|
|
5103
5862
|
return this._conversations ??= new Conversations({ client: this.client });
|
|
@@ -5157,4 +5916,9 @@ export class TalqingApi extends HeyApiClient {
|
|
|
5157
5916
|
get webhooks(): Webhooks {
|
|
5158
5917
|
return this._webhooks ??= new Webhooks({ client: this.client });
|
|
5159
5918
|
}
|
|
5919
|
+
|
|
5920
|
+
private _whatsapp?: Whatsapp;
|
|
5921
|
+
get whatsapp(): Whatsapp {
|
|
5922
|
+
return this._whatsapp ??= new Whatsapp({ client: this.client });
|
|
5923
|
+
}
|
|
5160
5924
|
}
|