@talqing/sdk 0.4.5 → 0.5.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.
@@ -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, ChatsCreateErrors, ChatsCreateResults, ChatsDeleteErrors, ChatsDeleteResults, 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, 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 published versions permanently.
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
- * - **Answering machines are not detected.** Voicemail is answered and billed.
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, and a batch cannot be deleted.
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,148 @@ export class Catalog extends HeyApiClient {
1478
1504
  }
1479
1505
  }
1480
1506
 
1507
+ export class Items extends HeyApiClient {
1508
+ /**
1509
+ * List Chat Items
1510
+ *
1511
+ * The messages, tool calls and handoffs of one chat.
1512
+ */
1513
+ public list<ThrowOnError extends boolean = false>(parameters: {
1514
+ chat_id: string;
1515
+ limit?: number;
1516
+ offset?: number;
1517
+ order?: string;
1518
+ }, options?: Options<never, ThrowOnError>): RequestResult<ChatsItemsListResults, ChatsItemsListErrors, ThrowOnError, 'data'> {
1519
+ const params = buildClientParams([parameters], [{ args: [
1520
+ { in: 'path', key: 'chat_id' },
1521
+ { in: 'query', key: 'limit' },
1522
+ { in: 'query', key: 'offset' },
1523
+ { in: 'query', key: 'order' }
1524
+ ] }]);
1525
+ return (options?.client ?? this.client).get<ChatsItemsListResults, ChatsItemsListErrors, ThrowOnError, 'data'>({
1526
+ responseStyle: 'data',
1527
+ security: [{ scheme: 'bearer', type: 'http' }, {
1528
+ in: 'cookie',
1529
+ name: 'talqing_session',
1530
+ type: 'apiKey'
1531
+ }],
1532
+ url: '/v1/chats/{chat_id}/items',
1533
+ ...options,
1534
+ ...params
1535
+ });
1536
+ }
1537
+ }
1538
+
1481
1539
  export class Messages extends HeyApiClient {
1482
1540
  /**
1483
- * Create Text Message
1541
+ * Create Chat Message
1542
+ *
1543
+ * Send a message and get the agent's reply back on this request.
1544
+ *
1545
+ * A newer message supersedes one still being answered: the older request
1546
+ * returns `status: canceled` with `superseded_by_item_id`.
1547
+ */
1548
+ public create<ThrowOnError extends boolean = false>(parameters: {
1549
+ chat_id: string;
1550
+ chatMessageRequest: ChatMessageRequest;
1551
+ }, options?: Options<never, ThrowOnError>): RequestResult<ChatsMessagesCreateResults, ChatsMessagesCreateErrors, ThrowOnError, 'data'> {
1552
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'chat_id' }, { key: 'chatMessageRequest', map: 'body' }] }]);
1553
+ return (options?.client ?? this.client).post<ChatsMessagesCreateResults, ChatsMessagesCreateErrors, ThrowOnError, 'data'>({
1554
+ responseStyle: 'data',
1555
+ security: [{ scheme: 'bearer', type: 'http' }, {
1556
+ in: 'cookie',
1557
+ name: 'talqing_session',
1558
+ type: 'apiKey'
1559
+ }],
1560
+ url: '/v1/chats/{chat_id}/messages',
1561
+ ...options,
1562
+ ...params,
1563
+ headers: {
1564
+ 'Content-Type': 'application/json',
1565
+ ...options?.headers,
1566
+ ...params.headers
1567
+ }
1568
+ });
1569
+ }
1570
+ }
1571
+
1572
+ export class Tokens extends HeyApiClient {
1573
+ /**
1574
+ * Create Chat Token
1575
+ *
1576
+ * Mint a one-hour browser token for this chat. Mint another to refresh.
1577
+ */
1578
+ public create<ThrowOnError extends boolean = false>(parameters: {
1579
+ chat_id: string;
1580
+ }, options?: Options<never, ThrowOnError>): RequestResult<ChatsTokensCreateResults, ChatsTokensCreateErrors, ThrowOnError, 'data'> {
1581
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'chat_id' }] }]);
1582
+ return (options?.client ?? this.client).post<ChatsTokensCreateResults, ChatsTokensCreateErrors, ThrowOnError, 'data'>({
1583
+ responseStyle: 'data',
1584
+ security: [{ scheme: 'bearer', type: 'http' }, {
1585
+ in: 'cookie',
1586
+ name: 'talqing_session',
1587
+ type: 'apiKey'
1588
+ }],
1589
+ url: '/v1/chats/{chat_id}/token',
1590
+ ...options,
1591
+ ...params
1592
+ });
1593
+ }
1594
+ }
1595
+
1596
+ export class Chats extends HeyApiClient {
1597
+ /**
1598
+ * List Chats
1484
1599
  *
1485
- * Send a message to a text agent — the way to actually talk to one.
1600
+ * List chats, newest first.
1601
+ */
1602
+ public list<ThrowOnError extends boolean = false>(parameters?: {
1603
+ limit?: number;
1604
+ offset?: number;
1605
+ agent_id?: string | null;
1606
+ contact_key?: string | null;
1607
+ status?: 'open' | 'ended' | 'all';
1608
+ }, options?: Options<never, ThrowOnError>): RequestResult<ChatsListResults, ChatsListErrors, ThrowOnError, 'data'> {
1609
+ const params = buildClientParams([parameters], [{ args: [
1610
+ { in: 'query', key: 'limit' },
1611
+ { in: 'query', key: 'offset' },
1612
+ { in: 'query', key: 'agent_id' },
1613
+ { in: 'query', key: 'contact_key' },
1614
+ { in: 'query', key: 'status' }
1615
+ ] }]);
1616
+ return (options?.client ?? this.client).get<ChatsListResults, ChatsListErrors, ThrowOnError, 'data'>({
1617
+ responseStyle: 'data',
1618
+ security: [{ scheme: 'bearer', type: 'http' }, {
1619
+ in: 'cookie',
1620
+ name: 'talqing_session',
1621
+ type: 'apiKey'
1622
+ }],
1623
+ url: '/v1/chats',
1624
+ ...options,
1625
+ ...params
1626
+ });
1627
+ }
1628
+
1629
+ /**
1630
+ * Create Chat
1486
1631
  *
1487
- * Addressed by `contact_key`, not by id, so the same key always reaches the
1488
- * same thread. `client_message_id` is a UUID you generate; re-sending with the
1489
- * same one is ignored rather than duplicated.
1632
+ * Start a chat with a text agent. Send it messages with `create_chat_message`.
1490
1633
  *
1491
- * Returns as soon as the message is accepted, carrying only the user's own
1492
- * item — poll `list_conversation_items` for the agent's reply.
1634
+ * It stays open until the agent's `end_call` tool or `end_chat` ends it. Starting
1635
+ * one ends the contact's open chat with the same agent.
1493
1636
  */
1494
1637
  public create<ThrowOnError extends boolean = false>(parameters: {
1495
- textMessageRequest: TextMessageRequest;
1496
- }, options?: Options<never, ThrowOnError>): RequestResult<ConversationsMessagesCreateResults, ConversationsMessagesCreateErrors, ThrowOnError, 'data'> {
1497
- const params = buildClientParams([parameters], [{ args: [{ key: 'textMessageRequest', map: 'body' }] }]);
1498
- return (options?.client ?? this.client).post<ConversationsMessagesCreateResults, ConversationsMessagesCreateErrors, ThrowOnError, 'data'>({
1638
+ createChatRequest: CreateChatRequest;
1639
+ }, options?: Options<never, ThrowOnError>): RequestResult<ChatsCreateResults, ChatsCreateErrors, ThrowOnError, 'data'> {
1640
+ const params = buildClientParams([parameters], [{ args: [{ key: 'createChatRequest', map: 'body' }] }]);
1641
+ return (options?.client ?? this.client).post<ChatsCreateResults, ChatsCreateErrors, ThrowOnError, 'data'>({
1499
1642
  responseStyle: 'data',
1500
1643
  security: [{ scheme: 'bearer', type: 'http' }, {
1501
1644
  in: 'cookie',
1502
1645
  name: 'talqing_session',
1503
1646
  type: 'apiKey'
1504
1647
  }],
1505
- url: '/v1/conversations/messages',
1648
+ url: '/v1/chats',
1506
1649
  ...options,
1507
1650
  ...params,
1508
1651
  headers: {
@@ -1512,9 +1655,90 @@ export class Messages extends HeyApiClient {
1512
1655
  }
1513
1656
  });
1514
1657
  }
1658
+
1659
+ /**
1660
+ * Delete Chat
1661
+ *
1662
+ * Erase an ended chat's content; the chat and its cost stay. Cannot be undone.
1663
+ */
1664
+ public delete<ThrowOnError extends boolean = false>(parameters: {
1665
+ chat_id: string;
1666
+ }, options?: Options<never, ThrowOnError>): RequestResult<ChatsDeleteResults, ChatsDeleteErrors, ThrowOnError, 'data'> {
1667
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'chat_id' }] }]);
1668
+ return (options?.client ?? this.client).delete<ChatsDeleteResults, ChatsDeleteErrors, ThrowOnError, 'data'>({
1669
+ responseStyle: 'data',
1670
+ security: [{ scheme: 'bearer', type: 'http' }, {
1671
+ in: 'cookie',
1672
+ name: 'talqing_session',
1673
+ type: 'apiKey'
1674
+ }],
1675
+ url: '/v1/chats/{chat_id}',
1676
+ ...options,
1677
+ ...params
1678
+ });
1679
+ }
1680
+
1681
+ /**
1682
+ * Get Chat
1683
+ *
1684
+ * Read one chat: its status, cost so far and, once ended, its analysis.
1685
+ */
1686
+ public get<ThrowOnError extends boolean = false>(parameters: {
1687
+ chat_id: string;
1688
+ }, options?: Options<never, ThrowOnError>): RequestResult<ChatsGetResults, ChatsGetErrors, ThrowOnError, 'data'> {
1689
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'chat_id' }] }]);
1690
+ return (options?.client ?? this.client).get<ChatsGetResults, ChatsGetErrors, ThrowOnError, 'data'>({
1691
+ responseStyle: 'data',
1692
+ security: [{ scheme: 'bearer', type: 'http' }, {
1693
+ in: 'cookie',
1694
+ name: 'talqing_session',
1695
+ type: 'apiKey'
1696
+ }],
1697
+ url: '/v1/chats/{chat_id}',
1698
+ ...options,
1699
+ ...params
1700
+ });
1701
+ }
1702
+
1703
+ /**
1704
+ * End Chat
1705
+ *
1706
+ * End a chat. Its analysis and `session.completed` webhook follow.
1707
+ */
1708
+ public end<ThrowOnError extends boolean = false>(parameters: {
1709
+ chat_id: string;
1710
+ }, options?: Options<never, ThrowOnError>): RequestResult<ChatsEndResults, ChatsEndErrors, ThrowOnError, 'data'> {
1711
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'chat_id' }] }]);
1712
+ return (options?.client ?? this.client).post<ChatsEndResults, ChatsEndErrors, ThrowOnError, 'data'>({
1713
+ responseStyle: 'data',
1714
+ security: [{ scheme: 'bearer', type: 'http' }, {
1715
+ in: 'cookie',
1716
+ name: 'talqing_session',
1717
+ type: 'apiKey'
1718
+ }],
1719
+ url: '/v1/chats/{chat_id}/end',
1720
+ ...options,
1721
+ ...params
1722
+ });
1723
+ }
1724
+
1725
+ private _items?: Items;
1726
+ get items(): Items {
1727
+ return this._items ??= new Items({ client: this.client });
1728
+ }
1729
+
1730
+ private _messages?: Messages;
1731
+ get messages(): Messages {
1732
+ return this._messages ??= new Messages({ client: this.client });
1733
+ }
1734
+
1735
+ private _tokens?: Tokens;
1736
+ get tokens(): Tokens {
1737
+ return this._tokens ??= new Tokens({ client: this.client });
1738
+ }
1515
1739
  }
1516
1740
 
1517
- export class Items extends HeyApiClient {
1741
+ export class Items2 extends HeyApiClient {
1518
1742
  /**
1519
1743
  * List Conversation Items
1520
1744
  *
@@ -1557,10 +1781,10 @@ export class Sessions extends HeyApiClient {
1557
1781
  *
1558
1782
  * The agent sessions behind a conversation, newest first.
1559
1783
  *
1560
- * A thread can be handled many times — each phone call, each text window,
1561
- * each trigger firing is one session, recording which agent version ran and
1562
- * how it finished. Use it to find out *which* version answered, and to reach
1563
- * the matching `session_id` for `get_call`.
1784
+ * A thread can be handled many times — each phone call and each chat is one
1785
+ * session, recording which agent version ran and how it finished. Use it to
1786
+ * find out *which* version answered; a session's id is its `get_call` or
1787
+ * `get_chat` id.
1564
1788
  */
1565
1789
  public list<ThrowOnError extends boolean = false>(parameters: {
1566
1790
  conversation_id: string;
@@ -1592,8 +1816,8 @@ export class Conversations extends HeyApiClient {
1592
1816
  *
1593
1817
  * List conversations across every channel, most recently active first.
1594
1818
  *
1595
- * One conversation is one bounded stretch of talking — a web chat, a Telegram
1596
- * thread, or a single phone call — with `surface` saying which. Several of them
1819
+ * One conversation is one thread — a web chat, a Telegram thread, or a single
1820
+ * phone call — with `surface` saying which. Several of them
1597
1821
  * can belong to the same person: pass `contact_key` to list only theirs.
1598
1822
  */
1599
1823
  public list<ThrowOnError extends boolean = false>(parameters?: {
@@ -1601,12 +1825,14 @@ export class Conversations extends HeyApiClient {
1601
1825
  offset?: number;
1602
1826
  agent_id?: string | null;
1603
1827
  contact_key?: string | null;
1828
+ status?: 'active' | 'inactive' | 'all';
1604
1829
  }, options?: Options<never, ThrowOnError>): RequestResult<ConversationsListResults, ConversationsListErrors, ThrowOnError, 'data'> {
1605
1830
  const params = buildClientParams([parameters], [{ args: [
1606
1831
  { in: 'query', key: 'limit' },
1607
1832
  { in: 'query', key: 'offset' },
1608
1833
  { in: 'query', key: 'agent_id' },
1609
- { in: 'query', key: 'contact_key' }
1834
+ { in: 'query', key: 'contact_key' },
1835
+ { in: 'query', key: 'status' }
1610
1836
  ] }]);
1611
1837
  return (options?.client ?? this.client).get<ConversationsListResults, ConversationsListErrors, ThrowOnError, 'data'>({
1612
1838
  responseStyle: 'data',
@@ -1621,41 +1847,6 @@ export class Conversations extends HeyApiClient {
1621
1847
  });
1622
1848
  }
1623
1849
 
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
1850
  /**
1660
1851
  * Get Conversation
1661
1852
  *
@@ -1774,14 +1965,9 @@ export class Conversations extends HeyApiClient {
1774
1965
  });
1775
1966
  }
1776
1967
 
1777
- private _messages?: Messages;
1778
- get messages(): Messages {
1779
- return this._messages ??= new Messages({ client: this.client });
1780
- }
1781
-
1782
- private _items?: Items;
1783
- get items(): Items {
1784
- return this._items ??= new Items({ client: this.client });
1968
+ private _items?: Items2;
1969
+ get items(): Items2 {
1970
+ return this._items ??= new Items2({ client: this.client });
1785
1971
  }
1786
1972
 
1787
1973
  private _sessions?: Sessions;
@@ -2504,6 +2690,30 @@ export class Batches2 extends HeyApiClient {
2504
2690
  });
2505
2691
  }
2506
2692
 
2693
+ /**
2694
+ * Delete Email Batch
2695
+ *
2696
+ * Delete a batch, its rows and its sends for good. **The record of what was sent goes too.**
2697
+ *
2698
+ * Refused while it is still drafting or a send has not finished; cancel those first.
2699
+ */
2700
+ public delete<ThrowOnError extends boolean = false>(parameters: {
2701
+ batch_id: string;
2702
+ }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesDeleteResults, EmailBatchesDeleteErrors, ThrowOnError, 'data'> {
2703
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }] }]);
2704
+ return (options?.client ?? this.client).delete<EmailBatchesDeleteResults, EmailBatchesDeleteErrors, ThrowOnError, 'data'>({
2705
+ responseStyle: 'data',
2706
+ security: [{ scheme: 'bearer', type: 'http' }, {
2707
+ in: 'cookie',
2708
+ name: 'talqing_session',
2709
+ type: 'apiKey'
2710
+ }],
2711
+ url: '/v1/email/batches/{batch_id}',
2712
+ ...options,
2713
+ ...params
2714
+ });
2715
+ }
2716
+
2507
2717
  /**
2508
2718
  * Get Email Batch
2509
2719
  *
@@ -2567,8 +2777,7 @@ export class Batches2 extends HeyApiClient {
2567
2777
  /**
2568
2778
  * Cancel Email Batch
2569
2779
  *
2570
- * Stop drafting for good. A batch cannot be deleted, because it is the
2571
- * record of what was sent to whom.
2780
+ * Stop drafting for good.
2572
2781
  *
2573
2782
  * Rows already drafted are **not** touched and neither is any send: cancelling
2574
2783
  * stops drafting, and drafts already produced are still worth reviewing and
@@ -3568,8 +3777,8 @@ export class Secrets extends HeyApiClient {
3568
3777
  /**
3569
3778
  * Delete Secret
3570
3779
  *
3571
- * Delete a secret permanently. Anything still referencing it will fail to
3572
- * resolve at runtime. Organization admins only.
3780
+ * Delete a secret permanently. Refused with 409 while a tool, integration or
3781
+ * carrier account references it. Organization admins only.
3573
3782
  */
3574
3783
  public delete<ThrowOnError extends boolean = false>(parameters: {
3575
3784
  secret_id: string;
@@ -5044,37 +5253,474 @@ export class Webhooks extends HeyApiClient {
5044
5253
  }
5045
5254
  }
5046
5255
 
5047
- export class TalqingApi extends HeyApiClient {
5048
- public static readonly __registry: HeyApiRegistry<TalqingApi> = new HeyApiRegistry<TalqingApi>();
5049
-
5050
- constructor(args?: {
5051
- client?: Client;
5052
- key?: string;
5053
- }) {
5054
- super(args);
5055
- TalqingApi.__registry.set(this, args?.key);
5056
- }
5057
-
5256
+ export class Recipients3 extends HeyApiClient {
5058
5257
  /**
5059
- * Health
5258
+ * List Whatsapp Batch Recipients
5060
5259
  *
5061
- * Liveness probe: `200` once this process is serving. Unauthenticated.
5260
+ * A batch's rows in upload order, each with its rendered message.
5062
5261
  *
5063
- * It answers for the API process, not its dependencies — a `200` here does
5064
- * not promise Postgres, Redis or LiveKit are reachable. The one thing it
5065
- * does report is `model_registry`, because that snapshot lives in this
5066
- * process's memory and nothing else can see how old it is.
5262
+ * `status` may repeat; a row matching any of them is returned.
5067
5263
  */
5068
- public health<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<HealthResults, HealthErrors, ThrowOnError, 'data'> {
5069
- return (options?.client ?? this.client).get<HealthResults, HealthErrors, ThrowOnError, 'data'>({
5264
+ public list<ThrowOnError extends boolean = false>(parameters: {
5265
+ batch_id: string;
5266
+ limit?: number;
5267
+ offset?: number;
5268
+ status?: Array<'ready' | 'skipped' | 'sending' | 'queued' | 'sent' | 'delivered' | 'read' | 'undelivered' | 'failed' | 'replied'> | null;
5269
+ }, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesRecipientsListResults, WhatsappBatchesRecipientsListErrors, ThrowOnError, 'data'> {
5270
+ const params = buildClientParams([parameters], [{ args: [
5271
+ { in: 'path', key: 'batch_id' },
5272
+ { in: 'query', key: 'limit' },
5273
+ { in: 'query', key: 'offset' },
5274
+ { in: 'query', key: 'status' }
5275
+ ] }]);
5276
+ return (options?.client ?? this.client).get<WhatsappBatchesRecipientsListResults, WhatsappBatchesRecipientsListErrors, ThrowOnError, 'data'>({
5070
5277
  responseStyle: 'data',
5071
- url: '/health',
5072
- ...options
5278
+ security: [{ scheme: 'bearer', type: 'http' }, {
5279
+ in: 'cookie',
5280
+ name: 'talqing_session',
5281
+ type: 'apiKey'
5282
+ }],
5283
+ url: '/v1/whatsapp/batches/{batch_id}/recipients',
5284
+ ...options,
5285
+ ...params
5073
5286
  });
5074
5287
  }
5075
5288
 
5076
- private _agents?: Agents;
5077
- get agents(): Agents {
5289
+ /**
5290
+ * Restore Whatsapp Batch Recipients
5291
+ *
5292
+ * Put rows a person skipped back. A row skipped for its cells returns when they are fixed.
5293
+ */
5294
+ public restore<ThrowOnError extends boolean = false>(parameters: {
5295
+ batch_id: string;
5296
+ selectRecipientsRequest: SelectRecipientsRequest;
5297
+ }, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesRecipientsRestoreResults, WhatsappBatchesRecipientsRestoreErrors, ThrowOnError, 'data'> {
5298
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }, { key: 'selectRecipientsRequest', map: 'body' }] }]);
5299
+ return (options?.client ?? this.client).post<WhatsappBatchesRecipientsRestoreResults, WhatsappBatchesRecipientsRestoreErrors, ThrowOnError, 'data'>({
5300
+ responseStyle: 'data',
5301
+ security: [{ scheme: 'bearer', type: 'http' }, {
5302
+ in: 'cookie',
5303
+ name: 'talqing_session',
5304
+ type: 'apiKey'
5305
+ }],
5306
+ url: '/v1/whatsapp/batches/{batch_id}/recipients/restore',
5307
+ ...options,
5308
+ ...params,
5309
+ headers: {
5310
+ 'Content-Type': 'application/json',
5311
+ ...options?.headers,
5312
+ ...params.headers
5313
+ }
5314
+ });
5315
+ }
5316
+
5317
+ /**
5318
+ * Skip Whatsapp Batch Recipients
5319
+ *
5320
+ * Take ready rows out of the send. Reversible with restore.
5321
+ */
5322
+ public skip<ThrowOnError extends boolean = false>(parameters: {
5323
+ batch_id: string;
5324
+ selectRecipientsRequest: SelectRecipientsRequest;
5325
+ }, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesRecipientsSkipResults, WhatsappBatchesRecipientsSkipErrors, ThrowOnError, 'data'> {
5326
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }, { key: 'selectRecipientsRequest', map: 'body' }] }]);
5327
+ return (options?.client ?? this.client).post<WhatsappBatchesRecipientsSkipResults, WhatsappBatchesRecipientsSkipErrors, ThrowOnError, 'data'>({
5328
+ responseStyle: 'data',
5329
+ security: [{ scheme: 'bearer', type: 'http' }, {
5330
+ in: 'cookie',
5331
+ name: 'talqing_session',
5332
+ type: 'apiKey'
5333
+ }],
5334
+ url: '/v1/whatsapp/batches/{batch_id}/recipients/skip',
5335
+ ...options,
5336
+ ...params,
5337
+ headers: {
5338
+ 'Content-Type': 'application/json',
5339
+ ...options?.headers,
5340
+ ...params.headers
5341
+ }
5342
+ });
5343
+ }
5344
+
5345
+ /**
5346
+ * Patch Whatsapp Batch Recipient
5347
+ *
5348
+ * Edit cells on a row not yet sent, its phone included. An empty value clears the edit.
5349
+ */
5350
+ public update<ThrowOnError extends boolean = false>(parameters: {
5351
+ batch_id: string;
5352
+ recipient_id: string;
5353
+ patchWhatsAppRecipientRequest: PatchWhatsAppRecipientRequest;
5354
+ }, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesRecipientsUpdateResults, WhatsappBatchesRecipientsUpdateErrors, ThrowOnError, 'data'> {
5355
+ const params = buildClientParams([parameters], [{ args: [
5356
+ { in: 'path', key: 'batch_id' },
5357
+ { in: 'path', key: 'recipient_id' },
5358
+ { key: 'patchWhatsAppRecipientRequest', map: 'body' }
5359
+ ] }]);
5360
+ return (options?.client ?? this.client).patch<WhatsappBatchesRecipientsUpdateResults, WhatsappBatchesRecipientsUpdateErrors, ThrowOnError, 'data'>({
5361
+ responseStyle: 'data',
5362
+ security: [{ scheme: 'bearer', type: 'http' }, {
5363
+ in: 'cookie',
5364
+ name: 'talqing_session',
5365
+ type: 'apiKey'
5366
+ }],
5367
+ url: '/v1/whatsapp/batches/{batch_id}/recipients/{recipient_id}',
5368
+ ...options,
5369
+ ...params,
5370
+ headers: {
5371
+ 'Content-Type': 'application/json',
5372
+ ...options?.headers,
5373
+ ...params.headers
5374
+ }
5375
+ });
5376
+ }
5377
+ }
5378
+
5379
+ export class Batches3 extends HeyApiClient {
5380
+ /**
5381
+ * List Whatsapp Batches
5382
+ *
5383
+ * List WhatsApp batches, newest first.
5384
+ */
5385
+ public list<ThrowOnError extends boolean = false>(parameters?: {
5386
+ limit?: number;
5387
+ offset?: number;
5388
+ status?: 'draft' | 'scheduled' | 'sending' | 'paused' | 'completed' | 'canceled' | 'failed' | null;
5389
+ }, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesListResults, WhatsappBatchesListErrors, ThrowOnError, 'data'> {
5390
+ const params = buildClientParams([parameters], [{ args: [
5391
+ { in: 'query', key: 'limit' },
5392
+ { in: 'query', key: 'offset' },
5393
+ { in: 'query', key: 'status' }
5394
+ ] }]);
5395
+ return (options?.client ?? this.client).get<WhatsappBatchesListResults, WhatsappBatchesListErrors, ThrowOnError, 'data'>({
5396
+ responseStyle: 'data',
5397
+ security: [{ scheme: 'bearer', type: 'http' }, {
5398
+ in: 'cookie',
5399
+ name: 'talqing_session',
5400
+ type: 'apiKey'
5401
+ }],
5402
+ url: '/v1/whatsapp/batches',
5403
+ ...options,
5404
+ ...params
5405
+ });
5406
+ }
5407
+
5408
+ /**
5409
+ * Create Whatsapp Batch
5410
+ *
5411
+ * Create a WhatsApp batch: one approved template, sent once per CSV row. Sends nothing yet.
5412
+ *
5413
+ * Only message people who opted in to hear from you on WhatsApp. A row with an
5414
+ * invalid or repeated phone, or a blank or line-broken mapped cell, is kept and
5415
+ * skipped with the reason. Replies go to the sender's assigned agent, which
5416
+ * sees the row's cells as `{{userdata.<column>}}`.
5417
+ */
5418
+ public create<ThrowOnError extends boolean = false>(parameters: {
5419
+ createWhatsAppBatchRequest: CreateWhatsAppBatchRequest;
5420
+ }, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesCreateResults, WhatsappBatchesCreateErrors, ThrowOnError, 'data'> {
5421
+ const params = buildClientParams([parameters], [{ args: [{ key: 'createWhatsAppBatchRequest', map: 'body' }] }]);
5422
+ return (options?.client ?? this.client).post<WhatsappBatchesCreateResults, WhatsappBatchesCreateErrors, ThrowOnError, 'data'>({
5423
+ responseStyle: 'data',
5424
+ security: [{ scheme: 'bearer', type: 'http' }, {
5425
+ in: 'cookie',
5426
+ name: 'talqing_session',
5427
+ type: 'apiKey'
5428
+ }],
5429
+ url: '/v1/whatsapp/batches',
5430
+ ...options,
5431
+ ...params,
5432
+ headers: {
5433
+ 'Content-Type': 'application/json',
5434
+ ...options?.headers,
5435
+ ...params.headers
5436
+ }
5437
+ });
5438
+ }
5439
+
5440
+ /**
5441
+ * Delete Whatsapp Batch
5442
+ *
5443
+ * Delete a batch and its rows for good. A live batch must be canceled first.
5444
+ *
5445
+ * The conversations it started stay; its delivery and reply counts do not.
5446
+ */
5447
+ public delete<ThrowOnError extends boolean = false>(parameters: {
5448
+ batch_id: string;
5449
+ }, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesDeleteResults, WhatsappBatchesDeleteErrors, ThrowOnError, 'data'> {
5450
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }] }]);
5451
+ return (options?.client ?? this.client).delete<WhatsappBatchesDeleteResults, WhatsappBatchesDeleteErrors, ThrowOnError, 'data'>({
5452
+ responseStyle: 'data',
5453
+ security: [{ scheme: 'bearer', type: 'http' }, {
5454
+ in: 'cookie',
5455
+ name: 'talqing_session',
5456
+ type: 'apiKey'
5457
+ }],
5458
+ url: '/v1/whatsapp/batches/{batch_id}',
5459
+ ...options,
5460
+ ...params
5461
+ });
5462
+ }
5463
+
5464
+ /**
5465
+ * Get Whatsapp Batch
5466
+ *
5467
+ * One batch: its template, schedule and per-status counts, `replied` included.
5468
+ */
5469
+ public get<ThrowOnError extends boolean = false>(parameters: {
5470
+ batch_id: string;
5471
+ }, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesGetResults, WhatsappBatchesGetErrors, ThrowOnError, 'data'> {
5472
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }] }]);
5473
+ return (options?.client ?? this.client).get<WhatsappBatchesGetResults, WhatsappBatchesGetErrors, ThrowOnError, 'data'>({
5474
+ responseStyle: 'data',
5475
+ security: [{ scheme: 'bearer', type: 'http' }, {
5476
+ in: 'cookie',
5477
+ name: 'talqing_session',
5478
+ type: 'apiKey'
5479
+ }],
5480
+ url: '/v1/whatsapp/batches/{batch_id}',
5481
+ ...options,
5482
+ ...params
5483
+ });
5484
+ }
5485
+
5486
+ /**
5487
+ * Patch Whatsapp Batch
5488
+ *
5489
+ * Edit a batch. Pacing and the window reach a live send within minutes.
5490
+ *
5491
+ * `variable_map` changes only before sending, `start_at` only before it begins;
5492
+ * a finished batch takes `name` alone.
5493
+ */
5494
+ public update<ThrowOnError extends boolean = false>(parameters: {
5495
+ batch_id: string;
5496
+ patchWhatsAppBatchRequest: PatchWhatsAppBatchRequest;
5497
+ }, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesUpdateResults, WhatsappBatchesUpdateErrors, ThrowOnError, 'data'> {
5498
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }, { key: 'patchWhatsAppBatchRequest', map: 'body' }] }]);
5499
+ return (options?.client ?? this.client).patch<WhatsappBatchesUpdateResults, WhatsappBatchesUpdateErrors, ThrowOnError, 'data'>({
5500
+ responseStyle: 'data',
5501
+ security: [{ scheme: 'bearer', type: 'http' }, {
5502
+ in: 'cookie',
5503
+ name: 'talqing_session',
5504
+ type: 'apiKey'
5505
+ }],
5506
+ url: '/v1/whatsapp/batches/{batch_id}',
5507
+ ...options,
5508
+ ...params,
5509
+ headers: {
5510
+ 'Content-Type': 'application/json',
5511
+ ...options?.headers,
5512
+ ...params.headers
5513
+ }
5514
+ });
5515
+ }
5516
+
5517
+ /**
5518
+ * Cancel Whatsapp Batch
5519
+ *
5520
+ * Stop for good. Messages already sent stay sent, and replies are still answered.
5521
+ */
5522
+ public cancel<ThrowOnError extends boolean = false>(parameters: {
5523
+ batch_id: string;
5524
+ }, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesCancelResults, WhatsappBatchesCancelErrors, ThrowOnError, 'data'> {
5525
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }] }]);
5526
+ return (options?.client ?? this.client).post<WhatsappBatchesCancelResults, WhatsappBatchesCancelErrors, ThrowOnError, 'data'>({
5527
+ responseStyle: 'data',
5528
+ security: [{ scheme: 'bearer', type: 'http' }, {
5529
+ in: 'cookie',
5530
+ name: 'talqing_session',
5531
+ type: 'apiKey'
5532
+ }],
5533
+ url: '/v1/whatsapp/batches/{batch_id}/cancel',
5534
+ ...options,
5535
+ ...params
5536
+ });
5537
+ }
5538
+
5539
+ /**
5540
+ * Pause Whatsapp Batch
5541
+ *
5542
+ * Stop sending before the next message. Nothing is lost.
5543
+ */
5544
+ public pause<ThrowOnError extends boolean = false>(parameters: {
5545
+ batch_id: string;
5546
+ }, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesPauseResults, WhatsappBatchesPauseErrors, ThrowOnError, 'data'> {
5547
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }] }]);
5548
+ return (options?.client ?? this.client).post<WhatsappBatchesPauseResults, WhatsappBatchesPauseErrors, ThrowOnError, 'data'>({
5549
+ responseStyle: 'data',
5550
+ security: [{ scheme: 'bearer', type: 'http' }, {
5551
+ in: 'cookie',
5552
+ name: 'talqing_session',
5553
+ type: 'apiKey'
5554
+ }],
5555
+ url: '/v1/whatsapp/batches/{batch_id}/pause',
5556
+ ...options,
5557
+ ...params
5558
+ });
5559
+ }
5560
+
5561
+ /**
5562
+ * Resume Whatsapp Batch
5563
+ *
5564
+ * Carry on sending from where the batch stopped.
5565
+ */
5566
+ public resume<ThrowOnError extends boolean = false>(parameters: {
5567
+ batch_id: string;
5568
+ }, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesResumeResults, WhatsappBatchesResumeErrors, ThrowOnError, 'data'> {
5569
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }] }]);
5570
+ return (options?.client ?? this.client).post<WhatsappBatchesResumeResults, WhatsappBatchesResumeErrors, ThrowOnError, 'data'>({
5571
+ responseStyle: 'data',
5572
+ security: [{ scheme: 'bearer', type: 'http' }, {
5573
+ in: 'cookie',
5574
+ name: 'talqing_session',
5575
+ type: 'apiKey'
5576
+ }],
5577
+ url: '/v1/whatsapp/batches/{batch_id}/resume',
5578
+ ...options,
5579
+ ...params
5580
+ });
5581
+ }
5582
+
5583
+ /**
5584
+ * Send Whatsapp Batch
5585
+ *
5586
+ * Send every ready row. **This messages real people and cannot be undone.**
5587
+ *
5588
+ * `start_at` schedules it, `window` holds it to business hours, and
5589
+ * `send_daily_cap` (default 250, Meta's lowest tier) and `send_gap_seconds`
5590
+ * pace it.
5591
+ */
5592
+ public send<ThrowOnError extends boolean = false>(parameters: {
5593
+ batch_id: string;
5594
+ sendWhatsAppBatchRequest: SendWhatsAppBatchRequest;
5595
+ }, options?: Options<never, ThrowOnError>): RequestResult<WhatsappBatchesSendResults, WhatsappBatchesSendErrors, ThrowOnError, 'data'> {
5596
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }, { key: 'sendWhatsAppBatchRequest', map: 'body' }] }]);
5597
+ return (options?.client ?? this.client).post<WhatsappBatchesSendResults, WhatsappBatchesSendErrors, ThrowOnError, 'data'>({
5598
+ responseStyle: 'data',
5599
+ security: [{ scheme: 'bearer', type: 'http' }, {
5600
+ in: 'cookie',
5601
+ name: 'talqing_session',
5602
+ type: 'apiKey'
5603
+ }],
5604
+ url: '/v1/whatsapp/batches/{batch_id}/send',
5605
+ ...options,
5606
+ ...params,
5607
+ headers: {
5608
+ 'Content-Type': 'application/json',
5609
+ ...options?.headers,
5610
+ ...params.headers
5611
+ }
5612
+ });
5613
+ }
5614
+
5615
+ private _recipients?: Recipients3;
5616
+ get recipients(): Recipients3 {
5617
+ return this._recipients ??= new Recipients3({ client: this.client });
5618
+ }
5619
+ }
5620
+
5621
+ export class Templates extends HeyApiClient {
5622
+ /**
5623
+ * List Whatsapp Templates
5624
+ *
5625
+ * List a WhatsApp sender's approved templates, read live from its BSP.
5626
+ *
5627
+ * One with `unsupported_reason` set cannot be sent from a batch.
5628
+ */
5629
+ public list<ThrowOnError extends boolean = false>(parameters: {
5630
+ integration_id: string;
5631
+ }, options?: Options<never, ThrowOnError>): RequestResult<WhatsappTemplatesListResults, WhatsappTemplatesListErrors, ThrowOnError, 'data'> {
5632
+ const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'integration_id' }] }]);
5633
+ return (options?.client ?? this.client).get<WhatsappTemplatesListResults, WhatsappTemplatesListErrors, ThrowOnError, 'data'>({
5634
+ responseStyle: 'data',
5635
+ security: [{ scheme: 'bearer', type: 'http' }, {
5636
+ in: 'cookie',
5637
+ name: 'talqing_session',
5638
+ type: 'apiKey'
5639
+ }],
5640
+ url: '/v1/whatsapp/templates',
5641
+ ...options,
5642
+ ...params
5643
+ });
5644
+ }
5645
+ }
5646
+
5647
+ export class TwilioSenders extends HeyApiClient {
5648
+ /**
5649
+ * List Twilio Whatsapp Senders
5650
+ *
5651
+ * List the WhatsApp senders on a Twilio account, before connecting one. Stores nothing.
5652
+ */
5653
+ public list<ThrowOnError extends boolean = false>(parameters: {
5654
+ twilioSendersRequest: TwilioSendersRequest;
5655
+ }, options?: Options<never, ThrowOnError>): RequestResult<WhatsappTwilioSendersListResults, WhatsappTwilioSendersListErrors, ThrowOnError, 'data'> {
5656
+ const params = buildClientParams([parameters], [{ args: [{ key: 'twilioSendersRequest', map: 'body' }] }]);
5657
+ return (options?.client ?? this.client).post<WhatsappTwilioSendersListResults, WhatsappTwilioSendersListErrors, ThrowOnError, 'data'>({
5658
+ responseStyle: 'data',
5659
+ security: [{ scheme: 'bearer', type: 'http' }, {
5660
+ in: 'cookie',
5661
+ name: 'talqing_session',
5662
+ type: 'apiKey'
5663
+ }],
5664
+ url: '/v1/whatsapp/twilio-senders',
5665
+ ...options,
5666
+ ...params,
5667
+ headers: {
5668
+ 'Content-Type': 'application/json',
5669
+ ...options?.headers,
5670
+ ...params.headers
5671
+ }
5672
+ });
5673
+ }
5674
+ }
5675
+
5676
+ export class Whatsapp extends HeyApiClient {
5677
+ private _batches?: Batches3;
5678
+ get batches(): Batches3 {
5679
+ return this._batches ??= new Batches3({ client: this.client });
5680
+ }
5681
+
5682
+ private _templates?: Templates;
5683
+ get templates(): Templates {
5684
+ return this._templates ??= new Templates({ client: this.client });
5685
+ }
5686
+
5687
+ private _twilioSenders?: TwilioSenders;
5688
+ get twilioSenders(): TwilioSenders {
5689
+ return this._twilioSenders ??= new TwilioSenders({ client: this.client });
5690
+ }
5691
+ }
5692
+
5693
+ export class TalqingApi extends HeyApiClient {
5694
+ public static readonly __registry: HeyApiRegistry<TalqingApi> = new HeyApiRegistry<TalqingApi>();
5695
+
5696
+ constructor(args?: {
5697
+ client?: Client;
5698
+ key?: string;
5699
+ }) {
5700
+ super(args);
5701
+ TalqingApi.__registry.set(this, args?.key);
5702
+ }
5703
+
5704
+ /**
5705
+ * Health
5706
+ *
5707
+ * Liveness probe: `200` once this process is serving. Unauthenticated.
5708
+ *
5709
+ * It answers for the API process, not its dependencies — a `200` here does
5710
+ * not promise Postgres, Redis or LiveKit are reachable. The one thing it
5711
+ * does report is `model_registry`, because that snapshot lives in this
5712
+ * process's memory and nothing else can see how old it is.
5713
+ */
5714
+ public health<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<HealthResults, HealthErrors, ThrowOnError, 'data'> {
5715
+ return (options?.client ?? this.client).get<HealthResults, HealthErrors, ThrowOnError, 'data'>({
5716
+ responseStyle: 'data',
5717
+ url: '/health',
5718
+ ...options
5719
+ });
5720
+ }
5721
+
5722
+ private _agents?: Agents;
5723
+ get agents(): Agents {
5078
5724
  return this._agents ??= new Agents({ client: this.client });
5079
5725
  }
5080
5726
 
@@ -5098,6 +5744,11 @@ export class TalqingApi extends HeyApiClient {
5098
5744
  return this._catalog ??= new Catalog({ client: this.client });
5099
5745
  }
5100
5746
 
5747
+ private _chats?: Chats;
5748
+ get chats(): Chats {
5749
+ return this._chats ??= new Chats({ client: this.client });
5750
+ }
5751
+
5101
5752
  private _conversations?: Conversations;
5102
5753
  get conversations(): Conversations {
5103
5754
  return this._conversations ??= new Conversations({ client: this.client });
@@ -5157,4 +5808,9 @@ export class TalqingApi extends HeyApiClient {
5157
5808
  get webhooks(): Webhooks {
5158
5809
  return this._webhooks ??= new Webhooks({ client: this.client });
5159
5810
  }
5811
+
5812
+ private _whatsapp?: Whatsapp;
5813
+ get whatsapp(): Whatsapp {
5814
+ return this._whatsapp ??= new Whatsapp({ client: this.client });
5815
+ }
5160
5816
  }