@talqing/sdk 0.4.0 → 0.4.2

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.
@@ -1,5 +1,5 @@
1
1
  import { type Client, type ClientMeta, type Options as Options2, type RequestResult, type ServerSentEventsResult, type TDataShape } from './client/index.js';
2
- 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, CatalogVoicesElevenlabsAddErrors, CatalogVoicesElevenlabsAddResults, CatalogVoicesElevenlabsSettingsErrors, CatalogVoicesElevenlabsSettingsResults, CatalogVoicesListErrors, CatalogVoicesListResults, ConversationsCreateErrors, ConversationsCreateResults, ConversationsEventsResult, ConversationsEventsResults, ConversationsGetErrors, ConversationsGetResults, ConversationsItemsListErrors, ConversationsItemsListResults, ConversationsListErrors, ConversationsListResults, ConversationsMessagesCreateErrors, ConversationsMessagesCreateResults, ConversationsSessionsListErrors, ConversationsSessionsListResults, ConversationsSnapshotErrors, ConversationsSnapshotResults, ConversationsUpdateErrors, ConversationsUpdateResults, CopilotAgentsSendErrors, CopilotAgentsSendResults, CopilotAgentsStreamResult, CopilotAgentsStreamResults, CopilotKnowledgeSendErrors, CopilotKnowledgeSendResults, CopilotKnowledgeStreamResult, CopilotKnowledgeStreamResults, CopilotTasksSendErrors, CopilotTasksSendResults, CopilotTasksStreamResult, CopilotTasksStreamResults, CopilotToolsSendErrors, CopilotToolsSendResults, CopilotToolsStreamResult, CopilotToolsStreamResults, CreateAgentRequest, CreateCallBatchRequest, CreateEmailBatchRequest, CreateIntegrationRequest, CreateIntegrationTriggerRequest, CreateKBRequest, CreateSecretRequest, CreateTaskRequest, CreateTelephonyAccountRequest, CreateTextConversationRequest, CreateToolRequest, CreateWebhookRequest, CreditCheckoutRequest, EmailBatchesCancelErrors, EmailBatchesCancelResults, EmailBatchesCreateErrors, EmailBatchesCreateResults, EmailBatchesGetErrors, EmailBatchesGetResults, EmailBatchesListErrors, EmailBatchesListResults, EmailBatchesPauseErrors, EmailBatchesPauseResults, EmailBatchesRecipientsListErrors, EmailBatchesRecipientsListResults, EmailBatchesRecipientsRestoreErrors, EmailBatchesRecipientsRestoreResults, EmailBatchesRecipientsRetryErrors, EmailBatchesRecipientsRetryResults, EmailBatchesRecipientsSendErrors, EmailBatchesRecipientsSendResults, EmailBatchesRecipientsSkipErrors, EmailBatchesRecipientsSkipResults, EmailBatchesRecipientsUpdateErrors, EmailBatchesRecipientsUpdateResults, EmailBatchesResumeErrors, EmailBatchesResumeResults, 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, 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, PatchIntegrationRequest, PatchIntegrationTriggerRequest, PatchNodeRequest, PatchPhoneNumberRequest, PatchTaskRequest, PatchTelephonyAccountRequest, PatchToolRequest, PatchWebhookRequest, PreviewAnalysisRequest, ProviderKeysDeleteErrors, ProviderKeysDeleteResults, ProviderKeysListErrors, ProviderKeysListResults, ProviderKeysSetErrors, ProviderKeysSetResults, PublishToolRequest, RunTaskRequest, RunToolRequest, SchemasFunctionsGetErrors, SchemasFunctionsGetResults, SchemasGetErrors, SchemasGetResults, SecretsCreateErrors, SecretsCreateResults, SecretsDeleteErrors, SecretsDeleteResults, SecretsListErrors, SecretsListResults, SelectRecipientsRequest, SendEmailBatchRequest, SendMessageRequest, SetProviderKeyRequest, TasksCreateErrors, TasksCreateResults, TasksDeleteErrors, TasksDeleteResults, TasksGetErrors, TasksGetResults, TasksListErrors, TasksListResults, TasksRunsCreateErrors, TasksRunsCreateResults, TasksRunsGetErrors, TasksRunsGetResults, TasksRunsListErrors, TasksRunsListResults, TasksUpdateErrors, TasksUpdateResults, 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, 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';
2
+ 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, CatalogModelsSearchErrors, CatalogModelsSearchResults, CatalogVoicesElevenlabsAddErrors, CatalogVoicesElevenlabsAddResults, CatalogVoicesElevenlabsSettingsErrors, CatalogVoicesElevenlabsSettingsResults, CatalogVoicesListErrors, CatalogVoicesListResults, ConversationsCreateErrors, ConversationsCreateResults, ConversationsEventsResult, ConversationsEventsResults, ConversationsGetErrors, ConversationsGetResults, ConversationsItemsListErrors, ConversationsItemsListResults, ConversationsListErrors, ConversationsListResults, ConversationsMessagesCreateErrors, ConversationsMessagesCreateResults, ConversationsSessionsListErrors, ConversationsSessionsListResults, ConversationsSnapshotErrors, ConversationsSnapshotResults, ConversationsUpdateErrors, ConversationsUpdateResults, CopilotAgentsSendErrors, CopilotAgentsSendResults, CopilotAgentsStreamResult, CopilotAgentsStreamResults, CopilotKnowledgeSendErrors, CopilotKnowledgeSendResults, CopilotKnowledgeStreamResult, CopilotKnowledgeStreamResults, CopilotTasksSendErrors, CopilotTasksSendResults, CopilotTasksStreamResult, CopilotTasksStreamResults, CopilotToolsSendErrors, CopilotToolsSendResults, 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, 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';
3
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
4
4
  /**
5
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -487,7 +487,7 @@ export declare class Calls extends HeyApiClient {
487
487
  start?: string | null;
488
488
  end?: string | null;
489
489
  agent_id?: string | null;
490
- type?: 'WEB' | 'SIP_INBOUND' | 'SIP_OUTBOUND' | null;
490
+ type?: 'WEB' | 'SIP_INBOUND' | 'SIP_OUTBOUND' | 'STREAM' | null;
491
491
  status?: string | null;
492
492
  outcome?: string | null;
493
493
  contact_key?: string | null;
@@ -623,6 +623,23 @@ export declare class Avatars extends HeyApiClient {
623
623
  limit?: number;
624
624
  }, options?: Options<never, ThrowOnError>): RequestResult<CatalogAvatarsListResults, CatalogAvatarsListErrors, ThrowOnError, 'data'>;
625
625
  }
626
+ export declare class Models extends HeyApiClient {
627
+ /**
628
+ * Search Models
629
+ *
630
+ * Search the language models a provider offers too many of to list.
631
+ *
632
+ * `GET /catalog` carries every model except these. A provider marked
633
+ * `browse: "search"` there — OpenRouter — reaches hundreds of models through
634
+ * one key, so they are searched a page at a time instead. With no `q` the order
635
+ * is real-world popularity. Everything returned is a valid `llm.model`.
636
+ */
637
+ search<ThrowOnError extends boolean = false>(parameters?: {
638
+ q?: string;
639
+ limit?: number;
640
+ cursor?: string;
641
+ }, options?: Options<never, ThrowOnError>): RequestResult<CatalogModelsSearchResults, CatalogModelsSearchErrors, ThrowOnError, 'data'>;
642
+ }
626
643
  export declare class Elevenlabs extends HeyApiClient {
627
644
  /**
628
645
  * Add Elevenlabs Voice
@@ -695,10 +712,16 @@ export declare class Catalog extends HeyApiClient {
695
712
  * `realtime` lists the speech-to-speech models. One of those replaces `stt`,
696
713
  * `llm` and `tts` together, so an agent sets either `realtime` or the three
697
714
  * cascade slots, never both.
715
+ *
716
+ * One provider's models are NOT here: a `providers` entry whose `browse` is
717
+ * `search` reaches hundreds of them through one key, and they are searched
718
+ * through `GET /catalog/models` instead.
698
719
  */
699
720
  get<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<CatalogGetResults, CatalogGetErrors, ThrowOnError, 'data'>;
700
721
  private _avatars?;
701
722
  get avatars(): Avatars;
723
+ private _models?;
724
+ get models(): Models;
702
725
  private _voices?;
703
726
  get voices(): Voices;
704
727
  }
@@ -998,6 +1021,23 @@ export declare class Recipients2 extends HeyApiClient {
998
1021
  recipient_id: string;
999
1022
  patchEmailRecipientRequest: PatchEmailRecipientRequest;
1000
1023
  }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsUpdateResults, EmailBatchesRecipientsUpdateErrors, ThrowOnError, 'data'>;
1024
+ /**
1025
+ * Redraft Email Batch Recipients
1026
+ *
1027
+ * Draft rows again from scratch. **Each one runs the task and is billed again.**
1028
+ *
1029
+ * `selection` is `failed` (drafting failed), `stale_version` (drafted by an
1030
+ * older published version of the task), `not_sent`, or `all` — which names
1031
+ * every row it refuses. Rows already sent or queued are never redrafted.
1032
+ *
1033
+ * This revives a batch that had finished drafting, and a person's edited cells
1034
+ * survive unless you pass `clear_overrides` — and are what the task is given.
1035
+ * Refused on a canceled batch, whose rows can never draft again.
1036
+ */
1037
+ redraft<ThrowOnError extends boolean = false>(parameters: {
1038
+ batch_id: string;
1039
+ redraftRequest: RedraftRequest;
1040
+ }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsRedraftResults, EmailBatchesRecipientsRedraftErrors, ThrowOnError, 'data'>;
1001
1041
  /**
1002
1042
  * Restore Email Batch Recipients
1003
1043
  *
@@ -1008,50 +1048,104 @@ export declare class Recipients2 extends HeyApiClient {
1008
1048
  selectRecipientsRequest: SelectRecipientsRequest;
1009
1049
  }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsRestoreResults, EmailBatchesRecipientsRestoreErrors, ThrowOnError, 'data'>;
1010
1050
  /**
1011
- * Retry Email Batch Recipients
1051
+ * Skip Email Batch Recipients
1012
1052
  *
1013
- * Draft rows whose first attempt failed, again.
1053
+ * Take rows out of consideration. Reversible with `restore`.
1014
1054
  *
1015
- * `selection: "all_eligible"` means every row whose drafting failed. This is
1016
- * the one action that revives a batch that has already finished drafting: it
1017
- * goes back to `drafting` and picks up exactly the rows you retried — the
1018
- * alternative would be telling you that twelve failed rows are unrecoverable
1019
- * because the other 4 988 finished first.
1055
+ * Accepts drafted rows and rows whose drafting failed. Takes either
1056
+ * `recipient_ids` or `selection: "all_eligible"`, which here means both.
1020
1057
  */
1021
- retry<ThrowOnError extends boolean = false>(parameters: {
1058
+ skip<ThrowOnError extends boolean = false>(parameters: {
1022
1059
  batch_id: string;
1023
1060
  selectRecipientsRequest: SelectRecipientsRequest;
1024
- }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsRetryResults, EmailBatchesRecipientsRetryErrors, ThrowOnError, 'data'>;
1061
+ }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsSkipResults, EmailBatchesRecipientsSkipErrors, ThrowOnError, 'data'>;
1062
+ }
1063
+ export declare class Sends extends HeyApiClient {
1064
+ /**
1065
+ * List Email Sends
1066
+ *
1067
+ * Every send on this batch, newest first, with its counts and its schedule.
1068
+ */
1069
+ list<ThrowOnError extends boolean = false>(parameters: {
1070
+ batch_id: string;
1071
+ limit?: number;
1072
+ offset?: number;
1073
+ }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesSendsListResults, EmailBatchesSendsListErrors, ThrowOnError, 'data'>;
1025
1074
  /**
1026
- * Send Email Batch Recipients
1075
+ * Create Email Send
1027
1076
  *
1028
- * Send the rows you name. **This mails real people and cannot be undone.**
1077
+ * Send these rows. **This mails real people and cannot be undone.**
1029
1078
  *
1030
- * At most 50 rows per call, named one by one — there is no "select all" and no
1031
- * bulk form of this. A row whose `to`, `subject` or `body` does not resolve
1032
- * comes back in `rejected` and stays a draft; fix it with
1033
- * `patch_email_batch_recipient` and try again.
1079
+ * Name `recipient_ids`, or pass `selection: "all_drafts"` for every reviewed
1080
+ * draft. A row whose `to`, `subject` or `body` does not resolve comes back in
1081
+ * `rejected` and stays a draft; fix it with `patch_email_batch_recipient`.
1034
1082
  *
1035
- * `from_email`, `from_name` and `reply_to` override the sender for this call
1036
- * only, and must be on a domain verified on the same Resend account.
1083
+ * The send is a row you can steer: `start_at` schedules it, `window` holds it
1084
+ * to business hours, `send_gap_seconds` paces it and `send_daily_cap` bounds
1085
+ * how many leave per day. Everything omitted comes from the batch. Cancel it
1086
+ * and every unsent row comes back as a draft.
1037
1087
  */
1038
- send<ThrowOnError extends boolean = false>(parameters: {
1088
+ create<ThrowOnError extends boolean = false>(parameters: {
1039
1089
  batch_id: string;
1040
- sendEmailBatchRequest: SendEmailBatchRequest;
1041
- }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsSendResults, EmailBatchesRecipientsSendErrors, ThrowOnError, 'data'>;
1090
+ createEmailSendRequest: CreateEmailSendRequest;
1091
+ }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesSendsCreateResults, EmailBatchesSendsCreateErrors, ThrowOnError, 'data'>;
1042
1092
  /**
1043
- * Skip Email Batch Recipients
1093
+ * Get Email Send
1044
1094
  *
1045
- * Take drafted rows out of consideration. Reversible with `restore`.
1095
+ * One send: where its rows are, and when it next does something.
1046
1096
  *
1047
- * Takes either `recipient_ids` or `selection: "all_eligible"`, which here means
1048
- * every row that has a draft. The reversible verbs keep that shorthand while
1049
- * `send` does not, because the rule is about irreversibility rather than bulk.
1097
+ * `next_send_reason` says which gate is holding it — `start`, `window`,
1098
+ * `daily_cap`, `retry` or `gap`.
1050
1099
  */
1051
- skip<ThrowOnError extends boolean = false>(parameters: {
1100
+ get<ThrowOnError extends boolean = false>(parameters: {
1052
1101
  batch_id: string;
1053
- selectRecipientsRequest: SelectRecipientsRequest;
1054
- }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsSkipResults, EmailBatchesRecipientsSkipErrors, ThrowOnError, 'data'>;
1102
+ send_id: string;
1103
+ }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesSendsGetResults, EmailBatchesSendsGetErrors, ThrowOnError, 'data'>;
1104
+ /**
1105
+ * Patch Email Send
1106
+ *
1107
+ * Re-steer one send: its pace, its hours, its daily cap, its start time.
1108
+ *
1109
+ * Never its sender, and never which rows it holds — to change that, cancel it
1110
+ * and create another. `start_at` moves only before the send has begun.
1111
+ */
1112
+ update<ThrowOnError extends boolean = false>(parameters: {
1113
+ batch_id: string;
1114
+ send_id: string;
1115
+ patchEmailSendRequest: PatchEmailSendRequest;
1116
+ }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesSendsUpdateResults, EmailBatchesSendsUpdateErrors, ThrowOnError, 'data'>;
1117
+ /**
1118
+ * Cancel Email Send
1119
+ *
1120
+ * Stop this send, and give every row it has not sent back as a draft.
1121
+ *
1122
+ * Not a destructive action: the drafts come back exactly as they were, ready
1123
+ * for another send. It is also the only way to change what a scheduled send
1124
+ * contains — a send's rows are fixed once it exists.
1125
+ */
1126
+ cancel<ThrowOnError extends boolean = false>(parameters: {
1127
+ batch_id: string;
1128
+ send_id: string;
1129
+ }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesSendsCancelResults, EmailBatchesSendsCancelErrors, ThrowOnError, 'data'>;
1130
+ /**
1131
+ * Pause Email Send
1132
+ *
1133
+ * Stop sending. It takes hold on the next email, and nothing is lost —
1134
+ * the rows stay queued for whenever you resume.
1135
+ */
1136
+ pause<ThrowOnError extends boolean = false>(parameters: {
1137
+ batch_id: string;
1138
+ send_id: string;
1139
+ }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesSendsPauseResults, EmailBatchesSendsPauseErrors, ThrowOnError, 'data'>;
1140
+ /**
1141
+ * Resume Email Send
1142
+ *
1143
+ * Undo a pause and carry on from where it stopped.
1144
+ */
1145
+ resume<ThrowOnError extends boolean = false>(parameters: {
1146
+ batch_id: string;
1147
+ send_id: string;
1148
+ }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesSendsResumeResults, EmailBatchesSendsResumeErrors, ThrowOnError, 'data'>;
1055
1149
  }
1056
1150
  export declare class Batches2 extends HeyApiClient {
1057
1151
  /**
@@ -1080,13 +1174,16 @@ export declare class Batches2 extends HeyApiClient {
1080
1174
  * scraped contacts — and this runs on your account under your agreement.
1081
1175
  *
1082
1176
  * **Nothing is sent that a person has not selected.** Creating a batch only
1083
- * starts drafting; sending is a separate call over at most 50 named rows.
1177
+ * starts drafting; sending is a separate call that creates a send you can
1178
+ * schedule, pace, pause and cancel.
1084
1179
  *
1085
- * **Every row runs your task as it stands right now** — a task has no
1086
- * versions, so editing it mid-batch changes every row drafted after that.
1180
+ * **Every row runs the task's CURRENT published version**, re-read every pass,
1181
+ * so publishing a better prompt mid-batch changes every row drafted after it.
1087
1182
  *
1088
1183
  * `field_map` points `to`, `subject` and `body` at a column of your list or at
1089
- * a field the task produces. An invalid batch is a 400 listing every problem.
1184
+ * a field the task produces. `window` is when email may LEAVE, inherited by
1185
+ * every send; drafting is not restricted by hours. An invalid batch is a 400
1186
+ * listing every problem.
1090
1187
  *
1091
1188
  * There is no spend cap: every row runs the task and is billed, so a 5 000-row
1092
1189
  * batch doing research costs 5 000 task runs whether or not anything is sent.
@@ -1099,8 +1196,8 @@ export declare class Batches2 extends HeyApiClient {
1099
1196
  *
1100
1197
  * One batch: its policy, its per-status counts and what drafting has cost.
1101
1198
  *
1102
- * While the batch is waiting on a start time or a closed window, the response
1103
- * also carries `next_draft_at`.
1199
+ * `drafted_versions` says which published version of the task wrote how many
1200
+ * rows, and `sent_today` how much of `send_daily_cap` is left today.
1104
1201
  */
1105
1202
  get<ThrowOnError extends boolean = false>(parameters: {
1106
1203
  batch_id: string;
@@ -1110,10 +1207,12 @@ export declare class Batches2 extends HeyApiClient {
1110
1207
  *
1111
1208
  * Edit a batch's policy. The next drafting pass reads the new row.
1112
1209
  *
1113
- * Pacing and the calling window are editable at any time. The sender, the body
1114
- * format and the field map freeze once the batch has sent anything changing
1115
- * them then would make the rows already delivered no longer describe what they
1116
- * were sent as. `start_at` moves only while the batch is still scheduled.
1210
+ * Pacing, the window and the daily cap are editable at any time; the sending
1211
+ * half is the DEFAULT for the next send, and a send already created carries its
1212
+ * own copy. The sender, the body format and the field map freeze once the batch
1213
+ * has sent anything changing them then would make the rows already delivered
1214
+ * no longer describe what they were sent as. `start_at` moves only while the
1215
+ * batch is still scheduled.
1117
1216
  */
1118
1217
  update<ThrowOnError extends boolean = false>(parameters: {
1119
1218
  batch_id: string;
@@ -1122,12 +1221,12 @@ export declare class Batches2 extends HeyApiClient {
1122
1221
  /**
1123
1222
  * Cancel Email Batch
1124
1223
  *
1125
- * Stop drafting for good. This is the only terminal action a batch cannot
1126
- * be deleted, because it is the record of what was sent to whom.
1224
+ * Stop drafting for good. A batch cannot be deleted, because it is the
1225
+ * record of what was sent to whom.
1127
1226
  *
1128
- * Rows already drafted are **not** touched: cancelling stops drafting, and
1129
- * drafts already produced are still worth reviewing and sending. Rows never
1130
- * reached report as `canceled`.
1227
+ * Rows already drafted are **not** touched and neither is any send: cancelling
1228
+ * stops drafting, and drafts already produced are still worth reviewing and
1229
+ * sending. Rows never reached report as `canceled`.
1131
1230
  */
1132
1231
  cancel<ThrowOnError extends boolean = false>(parameters: {
1133
1232
  batch_id: string;
@@ -1153,6 +1252,8 @@ export declare class Batches2 extends HeyApiClient {
1153
1252
  }, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesResumeResults, EmailBatchesResumeErrors, ThrowOnError, 'data'>;
1154
1253
  private _recipients?;
1155
1254
  get recipients(): Recipients2;
1255
+ private _sends?;
1256
+ get sends(): Sends;
1156
1257
  }
1157
1258
  export declare class Senders extends HeyApiClient {
1158
1259
  /**
@@ -1591,121 +1692,55 @@ export declare class Secrets extends HeyApiClient {
1591
1692
  secret_id: string;
1592
1693
  }, options?: Options<never, ThrowOnError>): RequestResult<SecretsDeleteResults, SecretsDeleteErrors, ThrowOnError, 'data'>;
1593
1694
  }
1594
- export declare class Runs extends HeyApiClient {
1595
- /**
1596
- * List Task Runs
1597
- *
1598
- * This task's runs, newest first, each with its output, trace and cost.
1599
- *
1600
- * A run records the task's *name* and nothing else about the definition it ran
1601
- * under, so two runs either side of an edit are indistinguishable here.
1602
- */
1603
- list<ThrowOnError extends boolean = false>(parameters: {
1604
- task_id: string;
1605
- limit?: number;
1606
- offset?: number;
1607
- }, options?: Options<never, ThrowOnError>): RequestResult<TasksRunsListResults, TasksRunsListErrors, ThrowOnError, 'data'>;
1608
- /**
1609
- * Run Task
1610
- *
1611
- * Run the task once with the variables you supply, and wait for the result.
1612
- *
1613
- * **This executes for real**: the tools call your endpoints with your secrets,
1614
- * the MCP servers spend your credits, and the model spends your tokens. A task
1615
- * that books a slot, charges a card or sends a message will do so.
1616
- *
1617
- * `vars` must match what the task declares — an unknown name is refused rather
1618
- * than dropped. The response is the whole run: the structured `output`, a
1619
- * `trace` of every tool call, the steps used and what the tokens cost. On
1620
- * failure `error.type` says whose problem it is. Secrets are redacted.
1621
- */
1622
- create<ThrowOnError extends boolean = false>(parameters: {
1623
- task_id: string;
1624
- runTaskRequest: RunTaskRequest;
1625
- }, options?: Options<never, ThrowOnError>): RequestResult<TasksRunsCreateResults, TasksRunsCreateErrors, ThrowOnError, 'data'>;
1626
- /**
1627
- * Get Task Run
1628
- *
1629
- * One run in full: what it produced, every tool it called on the way, and
1630
- * what it cost.
1631
- *
1632
- * This is what answers "why did it write that" for a caller holding one run id
1633
- * — an email batch's review table links each drafted row here. Secret values
1634
- * are redacted from the trace, and a trace that was cut reports it.
1635
- */
1636
- get<ThrowOnError extends boolean = false>(parameters: {
1637
- task_id: string;
1638
- run_id: string;
1639
- }, options?: Options<never, ThrowOnError>): RequestResult<TasksRunsGetResults, TasksRunsGetErrors, ThrowOnError, 'data'>;
1640
- }
1641
- export declare class Tasks2 extends HeyApiClient {
1695
+ export declare class Streams extends HeyApiClient {
1642
1696
  /**
1643
- * List Tasks
1644
- *
1645
- * List the workspace's agent tasks.
1697
+ * List Stream Connections
1646
1698
  *
1647
- * A task is an agent nobody talks to: a prompt, one LLM, tools and MCP
1648
- * servers, the variables it takes as input, and the typed result it must
1649
- * produce. `last_run` says how the most recent run of each one went, so a
1650
- * task whose prompt stopped calling `submit_result` is visible here rather
1651
- * than only in its own history.
1699
+ * List WebSocket media-stream connections a partner can dial.
1652
1700
  */
1653
1701
  list<ThrowOnError extends boolean = false>(parameters?: {
1654
1702
  limit?: number;
1655
1703
  offset?: number;
1656
- }, options?: Options<never, ThrowOnError>): RequestResult<TasksListResults, TasksListErrors, ThrowOnError, 'data'>;
1704
+ }, options?: Options<never, ThrowOnError>): RequestResult<TelephonyStreamsListResults, TelephonyStreamsListErrors, ThrowOnError, 'data'>;
1657
1705
  /**
1658
- * Create Task
1659
- *
1660
- * Create an agent task: an agent nobody talks to, which takes named inputs
1661
- * and returns a typed result.
1706
+ * Create Stream Connection
1662
1707
  *
1663
- * A task has no draft and no publish step: it is valid the moment it saves and
1664
- * callable immediately. An invalid config is a 400 listing every problem and
1665
- * nothing is stored.
1666
- *
1667
- * `output` is what makes this a task rather than a chat agent — declare the
1668
- * fields the model must produce and it is given a `submit_result` tool built
1669
- * from them. `vars` are its inputs, read as `{{vars.name}}`.
1708
+ * Create a connection a streaming partner can dial.
1670
1709
  *
1671
- * `warnings` reports the non-fatal problems. There is no publish screen to
1672
- * show them on, so read them here.
1710
+ * One connection per agent per dialect: the URL names both, so a second would
1711
+ * only be the same URL again.
1673
1712
  */
1674
1713
  create<ThrowOnError extends boolean = false>(parameters: {
1675
- createTaskRequest: CreateTaskRequest;
1676
- }, options?: Options<never, ThrowOnError>): RequestResult<TasksCreateResults, TasksCreateErrors, ThrowOnError, 'data'>;
1714
+ createStreamConnectionRequest: CreateStreamConnectionRequest;
1715
+ }, options?: Options<never, ThrowOnError>): RequestResult<TelephonyStreamsCreateResults, TelephonyStreamsCreateErrors, ThrowOnError, 'data'>;
1677
1716
  /**
1678
- * Delete Task
1717
+ * Delete Stream Connection
1679
1718
  *
1680
- * Delete a task. Its run history survives, still named after it.
1719
+ * Delete a stream connection. Calls it already carried are kept.
1681
1720
  */
1682
1721
  delete<ThrowOnError extends boolean = false>(parameters: {
1683
- task_id: string;
1684
- }, options?: Options<never, ThrowOnError>): RequestResult<TasksDeleteResults, TasksDeleteErrors, ThrowOnError, 'data'>;
1722
+ connection_id: string;
1723
+ }, options?: Options<never, ThrowOnError>): RequestResult<TelephonyStreamsDeleteResults, TelephonyStreamsDeleteErrors, ThrowOnError, 'data'>;
1685
1724
  /**
1686
- * Get Task
1725
+ * Get Stream Connection
1687
1726
  *
1688
- * Fetch one task's config and how its last run went.
1727
+ * One stream connection, with the URL to hand the partner.
1689
1728
  */
1690
1729
  get<ThrowOnError extends boolean = false>(parameters: {
1691
- task_id: string;
1692
- }, options?: Options<never, ThrowOnError>): RequestResult<TasksGetResults, TasksGetErrors, ThrowOnError, 'data'>;
1730
+ connection_id: string;
1731
+ }, options?: Options<never, ThrowOnError>): RequestResult<TelephonyStreamsGetResults, TelephonyStreamsGetErrors, ThrowOnError, 'data'>;
1693
1732
  /**
1694
- * Update Task
1733
+ * Patch Stream Connection
1695
1734
  *
1696
- * Replace a task's config.
1735
+ * Rename a connection, point it at another agent, or disable it.
1697
1736
  *
1698
- * The whole config is sent, so include every field you mean to keep, and it is
1699
- * validated exactly as `create_task` is. The edit takes effect on the next run
1700
- * — a task has no versions, so there is no old wording to go back to and no
1701
- * record of which definition produced an earlier run.
1737
+ * Disabling refuses new calls immediately and is the only way to stop a URL
1738
+ * answering; calls already running are untouched.
1702
1739
  */
1703
1740
  update<ThrowOnError extends boolean = false>(parameters: {
1704
- task_id: string;
1705
- patchTaskRequest: PatchTaskRequest;
1706
- }, options?: Options<never, ThrowOnError>): RequestResult<TasksUpdateResults, TasksUpdateErrors, ThrowOnError, 'data'>;
1707
- private _runs?;
1708
- get runs(): Runs;
1741
+ connection_id: string;
1742
+ patchStreamConnectionRequest: PatchStreamConnectionRequest;
1743
+ }, options?: Options<never, ThrowOnError>): RequestResult<TelephonyStreamsUpdateResults, TelephonyStreamsUpdateErrors, ThrowOnError, 'data'>;
1709
1744
  }
1710
1745
  export declare class Accounts extends HeyApiClient {
1711
1746
  /**
@@ -1908,6 +1943,8 @@ export declare class Providers extends HeyApiClient {
1908
1943
  }, options?: Options<never, ThrowOnError>): RequestResult<TelephonyProvidersListResults, TelephonyProvidersListErrors, ThrowOnError, 'data'>;
1909
1944
  }
1910
1945
  export declare class Telephony extends HeyApiClient {
1946
+ private _streams?;
1947
+ get streams(): Streams;
1911
1948
  private _accounts?;
1912
1949
  get accounts(): Accounts;
1913
1950
  private _phoneNumbers?;
@@ -1915,7 +1952,174 @@ export declare class Telephony extends HeyApiClient {
1915
1952
  private _providers?;
1916
1953
  get providers(): Providers;
1917
1954
  }
1955
+ export declare class Runs extends HeyApiClient {
1956
+ /**
1957
+ * List Task Runs
1958
+ *
1959
+ * This task's runs, newest first, each with its output, trace and cost.
1960
+ *
1961
+ * `task_version` says which published definition each one ran, and is null for
1962
+ * a run of the draft.
1963
+ */
1964
+ list<ThrowOnError extends boolean = false>(parameters: {
1965
+ task_id: string;
1966
+ limit?: number;
1967
+ offset?: number;
1968
+ }, options?: Options<never, ThrowOnError>): RequestResult<TasksRunsListResults, TasksRunsListErrors, ThrowOnError, 'data'>;
1969
+ /**
1970
+ * Run Task
1971
+ *
1972
+ * Run the task once with the variables you supply, and wait for the result.
1973
+ *
1974
+ * **This executes for real**: the tools call your endpoints with your secrets,
1975
+ * the MCP servers spend your credits, and the model spends your tokens. A task
1976
+ * that books a slot, charges a card or sends a message will do so.
1977
+ *
1978
+ * Runs the published version unless `version` names another one, or `"draft"`
1979
+ * to run the unpublished config. `vars` must match what that version declares
1980
+ * — an unknown name is refused rather than dropped. The response is the whole
1981
+ * run: the structured `output`, a `trace` of every tool call, the steps used
1982
+ * and what the tokens cost. On failure `error.type` says whose problem it is.
1983
+ * Secrets are redacted.
1984
+ */
1985
+ create<ThrowOnError extends boolean = false>(parameters: {
1986
+ task_id: string;
1987
+ runTaskRequest: RunTaskRequest;
1988
+ }, options?: Options<never, ThrowOnError>): RequestResult<TasksRunsCreateResults, TasksRunsCreateErrors, ThrowOnError, 'data'>;
1989
+ /**
1990
+ * Get Task Run
1991
+ *
1992
+ * One run in full: what it produced, every tool it called on the way, and
1993
+ * what it cost.
1994
+ *
1995
+ * This is what answers "why did it write that" for a caller holding one run id
1996
+ * — an email batch's review table links each drafted row here. Secret values
1997
+ * are redacted from the trace, and a trace that was cut reports it.
1998
+ */
1999
+ get<ThrowOnError extends boolean = false>(parameters: {
2000
+ task_id: string;
2001
+ run_id: string;
2002
+ }, options?: Options<never, ThrowOnError>): RequestResult<TasksRunsGetResults, TasksRunsGetErrors, ThrowOnError, 'data'>;
2003
+ }
1918
2004
  export declare class Versions2 extends HeyApiClient {
2005
+ /**
2006
+ * Get Task Version
2007
+ *
2008
+ * Fetch what one published version of a task actually contains.
2009
+ *
2010
+ * `get_task` lists the versions and when each was published; this returns the
2011
+ * frozen definition itself — prompt, model, output fields and the tool
2012
+ * versions it pinned, exactly as they were at that publish.
2013
+ */
2014
+ get<ThrowOnError extends boolean = false>(parameters: {
2015
+ task_id: string;
2016
+ version: number;
2017
+ }, options?: Options<never, ThrowOnError>): RequestResult<TasksVersionsGetResults, TasksVersionsGetErrors, ThrowOnError, 'data'>;
2018
+ /**
2019
+ * Rollback Task Version
2020
+ *
2021
+ * Put an earlier published version of a task back into production.
2022
+ *
2023
+ * That version becomes live **immediately** and **replaces the current draft**,
2024
+ * so any unpublished edits are lost. No new version is created. The restored
2025
+ * draft tracks each tool's latest published version, not the ones this version
2026
+ * pinned.
2027
+ */
2028
+ rollback<ThrowOnError extends boolean = false>(parameters: {
2029
+ task_id: string;
2030
+ version: number;
2031
+ }, options?: Options<never, ThrowOnError>): RequestResult<TasksVersionsRollbackResults, TasksVersionsRollbackErrors, ThrowOnError, 'data'>;
2032
+ }
2033
+ export declare class Tasks2 extends HeyApiClient {
2034
+ /**
2035
+ * List Tasks
2036
+ *
2037
+ * List the workspace's agent tasks.
2038
+ *
2039
+ * A task is an agent nobody talks to: a prompt, one LLM, tools and MCP
2040
+ * servers, the variables it takes as input, and the typed result it must
2041
+ * produce. Each item carries the full draft config, the published version
2042
+ * number (null while it has never been published), and `last_run`.
2043
+ */
2044
+ list<ThrowOnError extends boolean = false>(parameters?: {
2045
+ limit?: number;
2046
+ offset?: number;
2047
+ }, options?: Options<never, ThrowOnError>): RequestResult<TasksListResults, TasksListErrors, ThrowOnError, 'data'>;
2048
+ /**
2049
+ * Create Task
2050
+ *
2051
+ * Create an agent task: an agent nobody talks to, which takes named inputs
2052
+ * and returns a typed result.
2053
+ *
2054
+ * `output` is what makes this a task rather than a chat agent — declare the
2055
+ * fields the model must produce and it is given a `submit_result` tool built
2056
+ * from them. `vars` are its inputs, read as `{{vars.name}}`. The task starts
2057
+ * unpublished; publish it before running it.
2058
+ */
2059
+ create<ThrowOnError extends boolean = false>(parameters: {
2060
+ createTaskRequest: CreateTaskRequest;
2061
+ }, options?: Options<never, ThrowOnError>): RequestResult<TasksCreateResults, TasksCreateErrors, ThrowOnError, 'data'>;
2062
+ /**
2063
+ * Delete Task
2064
+ *
2065
+ * Delete a task and its published versions. Its runs survive, still named
2066
+ * after it.
2067
+ */
2068
+ delete<ThrowOnError extends boolean = false>(parameters: {
2069
+ task_id: string;
2070
+ }, options?: Options<never, ThrowOnError>): RequestResult<TasksDeleteResults, TasksDeleteErrors, ThrowOnError, 'data'>;
2071
+ /**
2072
+ * Get Task
2073
+ *
2074
+ * Fetch one task's draft config, published version, history and last run.
2075
+ */
2076
+ get<ThrowOnError extends boolean = false>(parameters: {
2077
+ task_id: string;
2078
+ }, options?: Options<never, ThrowOnError>): RequestResult<TasksGetResults, TasksGetErrors, ThrowOnError, 'data'>;
2079
+ /**
2080
+ * Update Task
2081
+ *
2082
+ * Replace the task's draft config with the one supplied.
2083
+ *
2084
+ * The whole config is sent, so include every field you mean to keep. Writes
2085
+ * land on the draft only — runs and email batches keep using the published
2086
+ * version until you publish again.
2087
+ */
2088
+ update<ThrowOnError extends boolean = false>(parameters: {
2089
+ task_id: string;
2090
+ patchTaskRequest: PatchTaskRequest;
2091
+ }, options?: Options<never, ThrowOnError>): RequestResult<TasksUpdateResults, TasksUpdateErrors, ThrowOnError, 'data'>;
2092
+ /**
2093
+ * Publish Task
2094
+ *
2095
+ * Freeze the current draft as a new immutable version and make it live.
2096
+ *
2097
+ * Validation must pass. Publishing pins every attached tool to the tool
2098
+ * version live right now, so republishing a tool does not change this task
2099
+ * until the task is published again.
2100
+ */
2101
+ publish<ThrowOnError extends boolean = false>(parameters: {
2102
+ task_id: string;
2103
+ }, options?: Options<never, ThrowOnError>): RequestResult<TasksPublishResults, TasksPublishErrors, ThrowOnError, 'data'>;
2104
+ /**
2105
+ * Validate Task
2106
+ *
2107
+ * Run publish-grade validation on the draft without publishing it.
2108
+ *
2109
+ * Covers everything a draft write checks plus what publishing adds: a
2110
+ * workspace API key for the model, at least one output field, the operation
2111
+ * trees of the attached tools, and the email batches already drafting with
2112
+ * this task. Returns errors (blocking) and warnings (advisory).
2113
+ */
2114
+ validate<ThrowOnError extends boolean = false>(parameters: {
2115
+ task_id: string;
2116
+ }, options?: Options<never, ThrowOnError>): RequestResult<TasksValidateResults, TasksValidateErrors, ThrowOnError, 'data'>;
2117
+ private _runs?;
2118
+ get runs(): Runs;
2119
+ private _versions?;
2120
+ get versions(): Versions2;
2121
+ }
2122
+ export declare class Versions3 extends HeyApiClient {
1919
2123
  /**
1920
2124
  * Get Tool Version
1921
2125
  *
@@ -2047,7 +2251,7 @@ export declare class Tools2 extends HeyApiClient {
2047
2251
  tool_id: string;
2048
2252
  }, options?: Options<never, ThrowOnError>): RequestResult<ToolsValidateResults, ToolsValidateErrors, ThrowOnError, 'data'>;
2049
2253
  private _versions?;
2050
- get versions(): Versions2;
2254
+ get versions(): Versions3;
2051
2255
  }
2052
2256
  export declare class Webhooks extends HeyApiClient {
2053
2257
  /**
@@ -2140,7 +2344,9 @@ export declare class TalqingApi extends HeyApiClient {
2140
2344
  * Liveness probe: `200` once this process is serving. Unauthenticated.
2141
2345
  *
2142
2346
  * It answers for the API process, not its dependencies — a `200` here does
2143
- * not promise Postgres, Redis or LiveKit are reachable.
2347
+ * not promise Postgres, Redis or LiveKit are reachable. The one thing it
2348
+ * does report is `model_registry`, because that snapshot lives in this
2349
+ * process's memory and nothing else can see how old it is.
2144
2350
  */
2145
2351
  health<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<HealthResults, HealthErrors, ThrowOnError, 'data'>;
2146
2352
  private _agents?;
@@ -2169,10 +2375,10 @@ export declare class TalqingApi extends HeyApiClient {
2169
2375
  get schemas(): Schemas;
2170
2376
  private _secrets?;
2171
2377
  get secrets(): Secrets;
2172
- private _tasks?;
2173
- get tasks(): Tasks2;
2174
2378
  private _telephony?;
2175
2379
  get telephony(): Telephony;
2380
+ private _tasks?;
2381
+ get tasks(): Tasks2;
2176
2382
  private _tools?;
2177
2383
  get tools(): Tools2;
2178
2384
  private _webhooks?;