@talqing/sdk 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -33
- package/dist/cjs/gen/index.d.ts +1 -1
- package/dist/cjs/gen/index.d.ts.map +1 -1
- package/dist/cjs/gen/sdk.gen.d.ts +224 -74
- package/dist/cjs/gen/sdk.gen.d.ts.map +1 -1
- package/dist/cjs/gen/sdk.gen.js +357 -77
- package/dist/cjs/gen/sdk.gen.js.map +1 -1
- package/dist/cjs/gen/types.gen.d.ts +1171 -224
- package/dist/cjs/gen/types.gen.d.ts.map +1 -1
- package/dist/cjs/vocabulary.d.ts +2 -1
- package/dist/cjs/vocabulary.d.ts.map +1 -1
- package/dist/esm/gen/index.d.ts +1 -1
- package/dist/esm/gen/index.d.ts.map +1 -1
- package/dist/esm/gen/sdk.gen.d.ts +224 -74
- package/dist/esm/gen/sdk.gen.d.ts.map +1 -1
- package/dist/esm/gen/sdk.gen.js +351 -74
- package/dist/esm/gen/sdk.gen.js.map +1 -1
- package/dist/esm/gen/types.gen.d.ts +1171 -224
- package/dist/esm/gen/types.gen.d.ts.map +1 -1
- package/dist/esm/vocabulary.d.ts +2 -1
- package/dist/esm/vocabulary.d.ts.map +1 -1
- package/package.json +5 -32
- package/src/gen/index.ts +1 -1
- package/src/gen/sdk.gen.ts +410 -84
- package/src/gen/types.gen.ts +1214 -202
- package/src/vocabulary.ts +2 -0
- package/dist/cjs/browser.d.ts +0 -158
- package/dist/cjs/browser.d.ts.map +0 -1
- package/dist/cjs/browser.js +0 -465
- package/dist/cjs/browser.js.map +0 -1
- package/dist/esm/browser.d.ts +0 -158
- package/dist/esm/browser.d.ts.map +0 -1
- package/dist/esm/browser.js +0 -442
- package/dist/esm/browser.js.map +0 -1
- package/src/browser.tsx +0 -678
|
@@ -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,
|
|
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, CreateEmailSendRequest, CreateIntegrationRequest, CreateIntegrationTriggerRequest, CreateKBRequest, CreateSecretRequest, 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, 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, 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
|
|
@@ -998,6 +998,22 @@ export declare class Recipients2 extends HeyApiClient {
|
|
|
998
998
|
recipient_id: string;
|
|
999
999
|
patchEmailRecipientRequest: PatchEmailRecipientRequest;
|
|
1000
1000
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsUpdateResults, EmailBatchesRecipientsUpdateErrors, ThrowOnError, 'data'>;
|
|
1001
|
+
/**
|
|
1002
|
+
* Redraft Email Batch Recipients
|
|
1003
|
+
*
|
|
1004
|
+
* Draft rows again from scratch. **Each one runs the task and is billed again.**
|
|
1005
|
+
*
|
|
1006
|
+
* `selection` is `failed` (drafting failed), `stale_version` (drafted by an
|
|
1007
|
+
* older published version of the task), `not_sent`, or `all` — which names
|
|
1008
|
+
* every row it refuses. Rows already sent or queued are never redrafted.
|
|
1009
|
+
*
|
|
1010
|
+
* This revives a batch that had finished drafting, and a person's edited cells
|
|
1011
|
+
* survive unless you pass `clear_overrides`.
|
|
1012
|
+
*/
|
|
1013
|
+
redraft<ThrowOnError extends boolean = false>(parameters: {
|
|
1014
|
+
batch_id: string;
|
|
1015
|
+
redraftRequest: RedraftRequest;
|
|
1016
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsRedraftResults, EmailBatchesRecipientsRedraftErrors, ThrowOnError, 'data'>;
|
|
1001
1017
|
/**
|
|
1002
1018
|
* Restore Email Batch Recipients
|
|
1003
1019
|
*
|
|
@@ -1008,50 +1024,105 @@ export declare class Recipients2 extends HeyApiClient {
|
|
|
1008
1024
|
selectRecipientsRequest: SelectRecipientsRequest;
|
|
1009
1025
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsRestoreResults, EmailBatchesRecipientsRestoreErrors, ThrowOnError, 'data'>;
|
|
1010
1026
|
/**
|
|
1011
|
-
*
|
|
1027
|
+
* Skip Email Batch Recipients
|
|
1012
1028
|
*
|
|
1013
|
-
*
|
|
1029
|
+
* Take drafted rows out of consideration. Reversible with `restore`.
|
|
1014
1030
|
*
|
|
1015
|
-
* `selection: "all_eligible"
|
|
1016
|
-
*
|
|
1017
|
-
*
|
|
1018
|
-
* alternative would be telling you that twelve failed rows are unrecoverable
|
|
1019
|
-
* because the other 4 988 finished first.
|
|
1031
|
+
* Takes either `recipient_ids` or `selection: "all_eligible"`, which here means
|
|
1032
|
+
* every row that has a draft. The reversible verbs keep that shorthand while
|
|
1033
|
+
* `send` does not, because the rule is about irreversibility rather than bulk.
|
|
1020
1034
|
*/
|
|
1021
|
-
|
|
1035
|
+
skip<ThrowOnError extends boolean = false>(parameters: {
|
|
1022
1036
|
batch_id: string;
|
|
1023
1037
|
selectRecipientsRequest: SelectRecipientsRequest;
|
|
1024
|
-
}, options?: Options<never, ThrowOnError>): RequestResult<
|
|
1038
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsSkipResults, EmailBatchesRecipientsSkipErrors, ThrowOnError, 'data'>;
|
|
1039
|
+
}
|
|
1040
|
+
export declare class Sends extends HeyApiClient {
|
|
1041
|
+
/**
|
|
1042
|
+
* List Email Sends
|
|
1043
|
+
*
|
|
1044
|
+
* Every send on this batch, newest first, with its counts and its schedule.
|
|
1045
|
+
*/
|
|
1046
|
+
list<ThrowOnError extends boolean = false>(parameters: {
|
|
1047
|
+
batch_id: string;
|
|
1048
|
+
limit?: number;
|
|
1049
|
+
offset?: number;
|
|
1050
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesSendsListResults, EmailBatchesSendsListErrors, ThrowOnError, 'data'>;
|
|
1025
1051
|
/**
|
|
1026
|
-
*
|
|
1052
|
+
* Create Email Send
|
|
1027
1053
|
*
|
|
1028
|
-
* Send
|
|
1054
|
+
* Send these rows. **This mails real people and cannot be undone.**
|
|
1029
1055
|
*
|
|
1030
|
-
*
|
|
1031
|
-
*
|
|
1032
|
-
*
|
|
1033
|
-
* `patch_email_batch_recipient` and try again.
|
|
1056
|
+
* Name `recipient_ids`, or pass `selection: "all_drafts"` for every reviewed
|
|
1057
|
+
* draft. A row whose `to`, `subject` or `body` does not resolve comes back in
|
|
1058
|
+
* `rejected` and stays a draft; fix it with `patch_email_batch_recipient`.
|
|
1034
1059
|
*
|
|
1035
|
-
*
|
|
1036
|
-
*
|
|
1060
|
+
* The send is a row you can steer: `start_at` schedules it, `window` holds it
|
|
1061
|
+
* to business hours, `send_gap_seconds` paces it and `send_daily_cap` bounds
|
|
1062
|
+
* how many leave per day. Everything omitted comes from the batch. Cancel it
|
|
1063
|
+
* and every unsent row comes back as a draft.
|
|
1037
1064
|
*/
|
|
1038
|
-
|
|
1065
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
1039
1066
|
batch_id: string;
|
|
1040
|
-
|
|
1041
|
-
}, options?: Options<never, ThrowOnError>): RequestResult<
|
|
1067
|
+
createEmailSendRequest: CreateEmailSendRequest;
|
|
1068
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesSendsCreateResults, EmailBatchesSendsCreateErrors, ThrowOnError, 'data'>;
|
|
1042
1069
|
/**
|
|
1043
|
-
*
|
|
1070
|
+
* Get Email Send
|
|
1044
1071
|
*
|
|
1045
|
-
*
|
|
1072
|
+
* One send: where its rows are, and when it next does something.
|
|
1046
1073
|
*
|
|
1047
|
-
*
|
|
1048
|
-
*
|
|
1049
|
-
* `send` does not, because the rule is about irreversibility rather than bulk.
|
|
1074
|
+
* `next_send_at` covers all three reasons a send waits — a start time, a closed
|
|
1075
|
+
* window, and a daily cap already spent.
|
|
1050
1076
|
*/
|
|
1051
|
-
|
|
1077
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
1052
1078
|
batch_id: string;
|
|
1053
|
-
|
|
1054
|
-
}, options?: Options<never, ThrowOnError>): RequestResult<
|
|
1079
|
+
send_id: string;
|
|
1080
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesSendsGetResults, EmailBatchesSendsGetErrors, ThrowOnError, 'data'>;
|
|
1081
|
+
/**
|
|
1082
|
+
* Patch Email Send
|
|
1083
|
+
*
|
|
1084
|
+
* Re-steer one send: its pace, its hours, its daily cap, its start time.
|
|
1085
|
+
*
|
|
1086
|
+
* Never its sender, and never which rows it holds — to change that, cancel it
|
|
1087
|
+
* and create another. `start_at` moves only before the send has begun.
|
|
1088
|
+
*/
|
|
1089
|
+
update<ThrowOnError extends boolean = false>(parameters: {
|
|
1090
|
+
batch_id: string;
|
|
1091
|
+
send_id: string;
|
|
1092
|
+
patchEmailSendRequest: PatchEmailSendRequest;
|
|
1093
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesSendsUpdateResults, EmailBatchesSendsUpdateErrors, ThrowOnError, 'data'>;
|
|
1094
|
+
/**
|
|
1095
|
+
* Cancel Email Send
|
|
1096
|
+
*
|
|
1097
|
+
* Stop this send, and give every row it has not sent back as a draft.
|
|
1098
|
+
*
|
|
1099
|
+
* Not a destructive action: the drafts come back exactly as they were, ready
|
|
1100
|
+
* for another send. It is also the only way to change what a scheduled send
|
|
1101
|
+
* contains — a send's rows are fixed once it exists.
|
|
1102
|
+
*/
|
|
1103
|
+
cancel<ThrowOnError extends boolean = false>(parameters: {
|
|
1104
|
+
batch_id: string;
|
|
1105
|
+
send_id: string;
|
|
1106
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesSendsCancelResults, EmailBatchesSendsCancelErrors, ThrowOnError, 'data'>;
|
|
1107
|
+
/**
|
|
1108
|
+
* Pause Email Send
|
|
1109
|
+
*
|
|
1110
|
+
* Stop sending. It takes hold on the next email, and nothing is lost —
|
|
1111
|
+
* the rows stay queued for whenever you resume.
|
|
1112
|
+
*/
|
|
1113
|
+
pause<ThrowOnError extends boolean = false>(parameters: {
|
|
1114
|
+
batch_id: string;
|
|
1115
|
+
send_id: string;
|
|
1116
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesSendsPauseResults, EmailBatchesSendsPauseErrors, ThrowOnError, 'data'>;
|
|
1117
|
+
/**
|
|
1118
|
+
* Resume Email Send
|
|
1119
|
+
*
|
|
1120
|
+
* Undo a pause and carry on from where it stopped.
|
|
1121
|
+
*/
|
|
1122
|
+
resume<ThrowOnError extends boolean = false>(parameters: {
|
|
1123
|
+
batch_id: string;
|
|
1124
|
+
send_id: string;
|
|
1125
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesSendsResumeResults, EmailBatchesSendsResumeErrors, ThrowOnError, 'data'>;
|
|
1055
1126
|
}
|
|
1056
1127
|
export declare class Batches2 extends HeyApiClient {
|
|
1057
1128
|
/**
|
|
@@ -1080,13 +1151,16 @@ export declare class Batches2 extends HeyApiClient {
|
|
|
1080
1151
|
* scraped contacts — and this runs on your account under your agreement.
|
|
1081
1152
|
*
|
|
1082
1153
|
* **Nothing is sent that a person has not selected.** Creating a batch only
|
|
1083
|
-
* starts drafting; sending is a separate call
|
|
1154
|
+
* starts drafting; sending is a separate call that creates a send you can
|
|
1155
|
+
* schedule, pace, pause and cancel.
|
|
1084
1156
|
*
|
|
1085
|
-
* **Every row runs
|
|
1086
|
-
*
|
|
1157
|
+
* **Every row runs the task's CURRENT published version**, re-read every pass,
|
|
1158
|
+
* so publishing a better prompt mid-batch changes every row drafted after it.
|
|
1087
1159
|
*
|
|
1088
1160
|
* `field_map` points `to`, `subject` and `body` at a column of your list or at
|
|
1089
|
-
* a field the task produces.
|
|
1161
|
+
* a field the task produces. `window` is when email may LEAVE, inherited by
|
|
1162
|
+
* every send; drafting is not restricted by hours. An invalid batch is a 400
|
|
1163
|
+
* listing every problem.
|
|
1090
1164
|
*
|
|
1091
1165
|
* There is no spend cap: every row runs the task and is billed, so a 5 000-row
|
|
1092
1166
|
* batch doing research costs 5 000 task runs whether or not anything is sent.
|
|
@@ -1097,9 +1171,10 @@ export declare class Batches2 extends HeyApiClient {
|
|
|
1097
1171
|
/**
|
|
1098
1172
|
* Get Email Batch
|
|
1099
1173
|
*
|
|
1100
|
-
* One batch: its policy, its per-status counts
|
|
1101
|
-
*
|
|
1102
|
-
* `
|
|
1174
|
+
* One batch: its policy, its per-status counts and what drafting has cost.
|
|
1175
|
+
*
|
|
1176
|
+
* `drafted_versions` says which published version of the task wrote how many
|
|
1177
|
+
* rows, and `sent_today` how much of `send_daily_cap` is left today.
|
|
1103
1178
|
*/
|
|
1104
1179
|
get<ThrowOnError extends boolean = false>(parameters: {
|
|
1105
1180
|
batch_id: string;
|
|
@@ -1109,10 +1184,12 @@ export declare class Batches2 extends HeyApiClient {
|
|
|
1109
1184
|
*
|
|
1110
1185
|
* Edit a batch's policy. The next drafting pass reads the new row.
|
|
1111
1186
|
*
|
|
1112
|
-
* Pacing and the
|
|
1113
|
-
*
|
|
1114
|
-
*
|
|
1115
|
-
*
|
|
1187
|
+
* Pacing, the window and the daily cap are editable at any time; the sending
|
|
1188
|
+
* half is the DEFAULT for the next send, and a send already created carries its
|
|
1189
|
+
* own copy. The sender, the body format and the field map freeze once the batch
|
|
1190
|
+
* has sent anything — changing them then would make the rows already delivered
|
|
1191
|
+
* no longer describe what they were sent as. `start_at` moves only while the
|
|
1192
|
+
* batch is still scheduled.
|
|
1116
1193
|
*/
|
|
1117
1194
|
update<ThrowOnError extends boolean = false>(parameters: {
|
|
1118
1195
|
batch_id: string;
|
|
@@ -1121,12 +1198,12 @@ export declare class Batches2 extends HeyApiClient {
|
|
|
1121
1198
|
/**
|
|
1122
1199
|
* Cancel Email Batch
|
|
1123
1200
|
*
|
|
1124
|
-
* Stop drafting for good.
|
|
1125
|
-
*
|
|
1201
|
+
* Stop drafting for good. A batch cannot be deleted, because it is the
|
|
1202
|
+
* record of what was sent to whom.
|
|
1126
1203
|
*
|
|
1127
|
-
* Rows already drafted are **not** touched
|
|
1128
|
-
* drafts already produced are still worth reviewing and
|
|
1129
|
-
* reached report as `canceled`.
|
|
1204
|
+
* Rows already drafted are **not** touched and neither is any send: cancelling
|
|
1205
|
+
* stops drafting, and drafts already produced are still worth reviewing and
|
|
1206
|
+
* sending. Rows never reached report as `canceled`.
|
|
1130
1207
|
*/
|
|
1131
1208
|
cancel<ThrowOnError extends boolean = false>(parameters: {
|
|
1132
1209
|
batch_id: string;
|
|
@@ -1152,6 +1229,8 @@ export declare class Batches2 extends HeyApiClient {
|
|
|
1152
1229
|
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesResumeResults, EmailBatchesResumeErrors, ThrowOnError, 'data'>;
|
|
1153
1230
|
private _recipients?;
|
|
1154
1231
|
get recipients(): Recipients2;
|
|
1232
|
+
private _sends?;
|
|
1233
|
+
get sends(): Sends;
|
|
1155
1234
|
}
|
|
1156
1235
|
export declare class Senders extends HeyApiClient {
|
|
1157
1236
|
/**
|
|
@@ -1233,8 +1312,10 @@ export declare class Triggers extends HeyApiClient {
|
|
|
1233
1312
|
* Patch Integration Trigger
|
|
1234
1313
|
*
|
|
1235
1314
|
* Update a trigger: reassign the agent, change reply mode, enable or
|
|
1236
|
-
* disable it.
|
|
1237
|
-
*
|
|
1315
|
+
* disable it.
|
|
1316
|
+
*
|
|
1317
|
+
* Omitted fields are left unchanged, and enabling one runs the same checks
|
|
1318
|
+
* creating it did.
|
|
1238
1319
|
*/
|
|
1239
1320
|
update<ThrowOnError extends boolean = false>(parameters: {
|
|
1240
1321
|
integration_id: string;
|
|
@@ -1516,6 +1597,21 @@ export declare class Observability extends HeyApiClient {
|
|
|
1516
1597
|
channel?: 'voice' | 'video' | 'text' | null;
|
|
1517
1598
|
}, options?: Options<never, ThrowOnError>): RequestResult<ObservabilityGetResults, ObservabilityGetErrors, ThrowOnError, 'data'>;
|
|
1518
1599
|
}
|
|
1600
|
+
export declare class Functions extends HeyApiClient {
|
|
1601
|
+
/**
|
|
1602
|
+
* Describe Function
|
|
1603
|
+
*
|
|
1604
|
+
* The full argument schema of one function, by name.
|
|
1605
|
+
*
|
|
1606
|
+
* Every function's arguments are fetched here rather than shown up front, so
|
|
1607
|
+
* call this before the first time you use one. Two exceptions, which carry
|
|
1608
|
+
* their own shape because they would otherwise be uncallable: this function
|
|
1609
|
+
* and `describe_schema`.
|
|
1610
|
+
*/
|
|
1611
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
1612
|
+
name: string;
|
|
1613
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<SchemasFunctionsGetResults, SchemasFunctionsGetErrors, ThrowOnError, 'data'>;
|
|
1614
|
+
}
|
|
1519
1615
|
export declare class Schemas extends HeyApiClient {
|
|
1520
1616
|
/**
|
|
1521
1617
|
* Describe Schema
|
|
@@ -1536,6 +1632,8 @@ export declare class Schemas extends HeyApiClient {
|
|
|
1536
1632
|
get<ThrowOnError extends boolean = false>(parameters: {
|
|
1537
1633
|
name: 'AgentConfig' | 'AgentOverride' | 'AgentTeam' | 'TaskConfig' | 'ToolOperations';
|
|
1538
1634
|
}, options?: Options<never, ThrowOnError>): RequestResult<SchemasGetResults, SchemasGetErrors, ThrowOnError, 'data'>;
|
|
1635
|
+
private _functions?;
|
|
1636
|
+
get functions(): Functions;
|
|
1539
1637
|
}
|
|
1540
1638
|
export declare class Secrets extends HeyApiClient {
|
|
1541
1639
|
/**
|
|
@@ -1577,8 +1675,8 @@ export declare class Runs extends HeyApiClient {
|
|
|
1577
1675
|
*
|
|
1578
1676
|
* This task's runs, newest first, each with its output, trace and cost.
|
|
1579
1677
|
*
|
|
1580
|
-
*
|
|
1581
|
-
*
|
|
1678
|
+
* `task_version` says which published definition each one ran, and is null for
|
|
1679
|
+
* a run of the draft.
|
|
1582
1680
|
*/
|
|
1583
1681
|
list<ThrowOnError extends boolean = false>(parameters: {
|
|
1584
1682
|
task_id: string;
|
|
@@ -1594,10 +1692,12 @@ export declare class Runs extends HeyApiClient {
|
|
|
1594
1692
|
* the MCP servers spend your credits, and the model spends your tokens. A task
|
|
1595
1693
|
* that books a slot, charges a card or sends a message will do so.
|
|
1596
1694
|
*
|
|
1597
|
-
*
|
|
1598
|
-
*
|
|
1599
|
-
*
|
|
1600
|
-
*
|
|
1695
|
+
* Runs the published version unless `version` names another one, or `"draft"`
|
|
1696
|
+
* to run the unpublished config. `vars` must match what that version declares
|
|
1697
|
+
* — an unknown name is refused rather than dropped. The response is the whole
|
|
1698
|
+
* run: the structured `output`, a `trace` of every tool call, the steps used
|
|
1699
|
+
* and what the tokens cost. On failure `error.type` says whose problem it is.
|
|
1700
|
+
* Secrets are redacted.
|
|
1601
1701
|
*/
|
|
1602
1702
|
create<ThrowOnError extends boolean = false>(parameters: {
|
|
1603
1703
|
task_id: string;
|
|
@@ -1618,6 +1718,35 @@ export declare class Runs extends HeyApiClient {
|
|
|
1618
1718
|
run_id: string;
|
|
1619
1719
|
}, options?: Options<never, ThrowOnError>): RequestResult<TasksRunsGetResults, TasksRunsGetErrors, ThrowOnError, 'data'>;
|
|
1620
1720
|
}
|
|
1721
|
+
export declare class Versions2 extends HeyApiClient {
|
|
1722
|
+
/**
|
|
1723
|
+
* Get Task Version
|
|
1724
|
+
*
|
|
1725
|
+
* Fetch what one published version of a task actually contains.
|
|
1726
|
+
*
|
|
1727
|
+
* `get_task` lists the versions and when each was published; this returns the
|
|
1728
|
+
* frozen definition itself — prompt, model, output fields and the tool
|
|
1729
|
+
* versions it pinned, exactly as they were at that publish.
|
|
1730
|
+
*/
|
|
1731
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
1732
|
+
task_id: string;
|
|
1733
|
+
version: number;
|
|
1734
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TasksVersionsGetResults, TasksVersionsGetErrors, ThrowOnError, 'data'>;
|
|
1735
|
+
/**
|
|
1736
|
+
* Rollback Task Version
|
|
1737
|
+
*
|
|
1738
|
+
* Put an earlier published version of a task back into production.
|
|
1739
|
+
*
|
|
1740
|
+
* That version becomes live **immediately** and **replaces the current draft**,
|
|
1741
|
+
* so any unpublished edits are lost. No new version is created. The restored
|
|
1742
|
+
* draft tracks each tool's latest published version, not the ones this version
|
|
1743
|
+
* pinned.
|
|
1744
|
+
*/
|
|
1745
|
+
rollback<ThrowOnError extends boolean = false>(parameters: {
|
|
1746
|
+
task_id: string;
|
|
1747
|
+
version: number;
|
|
1748
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TasksVersionsRollbackResults, TasksVersionsRollbackErrors, ThrowOnError, 'data'>;
|
|
1749
|
+
}
|
|
1621
1750
|
export declare class Tasks2 extends HeyApiClient {
|
|
1622
1751
|
/**
|
|
1623
1752
|
* List Tasks
|
|
@@ -1626,9 +1755,8 @@ export declare class Tasks2 extends HeyApiClient {
|
|
|
1626
1755
|
*
|
|
1627
1756
|
* A task is an agent nobody talks to: a prompt, one LLM, tools and MCP
|
|
1628
1757
|
* servers, the variables it takes as input, and the typed result it must
|
|
1629
|
-
* produce.
|
|
1630
|
-
*
|
|
1631
|
-
* than only in its own history.
|
|
1758
|
+
* produce. Each item carries the full draft config, the published version
|
|
1759
|
+
* number (null while it has never been published), and `last_run`.
|
|
1632
1760
|
*/
|
|
1633
1761
|
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1634
1762
|
limit?: number;
|
|
@@ -1637,18 +1765,13 @@ export declare class Tasks2 extends HeyApiClient {
|
|
|
1637
1765
|
/**
|
|
1638
1766
|
* Create Task
|
|
1639
1767
|
*
|
|
1640
|
-
* Create an agent task
|
|
1641
|
-
*
|
|
1642
|
-
* A task has no draft and no publish step: it is valid the moment it saves and
|
|
1643
|
-
* callable immediately. An invalid config is a 400 listing every problem and
|
|
1644
|
-
* nothing is stored.
|
|
1768
|
+
* Create an agent task: an agent nobody talks to, which takes named inputs
|
|
1769
|
+
* and returns a typed result.
|
|
1645
1770
|
*
|
|
1646
1771
|
* `output` is what makes this a task rather than a chat agent — declare the
|
|
1647
1772
|
* fields the model must produce and it is given a `submit_result` tool built
|
|
1648
|
-
* from them. `vars` are its inputs, read as `{{vars.name}}`.
|
|
1649
|
-
*
|
|
1650
|
-
* `warnings` reports the non-fatal problems. There is no publish screen to
|
|
1651
|
-
* show them on, so read them here.
|
|
1773
|
+
* from them. `vars` are its inputs, read as `{{vars.name}}`. The task starts
|
|
1774
|
+
* unpublished; publish it before running it.
|
|
1652
1775
|
*/
|
|
1653
1776
|
create<ThrowOnError extends boolean = false>(parameters: {
|
|
1654
1777
|
createTaskRequest: CreateTaskRequest;
|
|
@@ -1656,7 +1779,8 @@ export declare class Tasks2 extends HeyApiClient {
|
|
|
1656
1779
|
/**
|
|
1657
1780
|
* Delete Task
|
|
1658
1781
|
*
|
|
1659
|
-
* Delete a task. Its
|
|
1782
|
+
* Delete a task and its published versions. Its runs survive, still named
|
|
1783
|
+
* after it.
|
|
1660
1784
|
*/
|
|
1661
1785
|
delete<ThrowOnError extends boolean = false>(parameters: {
|
|
1662
1786
|
task_id: string;
|
|
@@ -1664,7 +1788,7 @@ export declare class Tasks2 extends HeyApiClient {
|
|
|
1664
1788
|
/**
|
|
1665
1789
|
* Get Task
|
|
1666
1790
|
*
|
|
1667
|
-
* Fetch one task's config
|
|
1791
|
+
* Fetch one task's draft config, published version, history and last run.
|
|
1668
1792
|
*/
|
|
1669
1793
|
get<ThrowOnError extends boolean = false>(parameters: {
|
|
1670
1794
|
task_id: string;
|
|
@@ -1672,19 +1796,45 @@ export declare class Tasks2 extends HeyApiClient {
|
|
|
1672
1796
|
/**
|
|
1673
1797
|
* Update Task
|
|
1674
1798
|
*
|
|
1675
|
-
* Replace
|
|
1799
|
+
* Replace the task's draft config with the one supplied.
|
|
1676
1800
|
*
|
|
1677
|
-
* The whole config is sent, so include every field you mean to keep
|
|
1678
|
-
*
|
|
1679
|
-
*
|
|
1680
|
-
* record of which definition produced an earlier run.
|
|
1801
|
+
* The whole config is sent, so include every field you mean to keep. Writes
|
|
1802
|
+
* land on the draft only — runs and email batches keep using the published
|
|
1803
|
+
* version until you publish again.
|
|
1681
1804
|
*/
|
|
1682
1805
|
update<ThrowOnError extends boolean = false>(parameters: {
|
|
1683
1806
|
task_id: string;
|
|
1684
1807
|
patchTaskRequest: PatchTaskRequest;
|
|
1685
1808
|
}, options?: Options<never, ThrowOnError>): RequestResult<TasksUpdateResults, TasksUpdateErrors, ThrowOnError, 'data'>;
|
|
1809
|
+
/**
|
|
1810
|
+
* Publish Task
|
|
1811
|
+
*
|
|
1812
|
+
* Freeze the current draft as a new immutable version and make it live.
|
|
1813
|
+
*
|
|
1814
|
+
* Validation must pass. Publishing pins every attached tool to the tool
|
|
1815
|
+
* version live right now, so republishing a tool does not change this task
|
|
1816
|
+
* until the task is published again.
|
|
1817
|
+
*/
|
|
1818
|
+
publish<ThrowOnError extends boolean = false>(parameters: {
|
|
1819
|
+
task_id: string;
|
|
1820
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TasksPublishResults, TasksPublishErrors, ThrowOnError, 'data'>;
|
|
1821
|
+
/**
|
|
1822
|
+
* Validate Task
|
|
1823
|
+
*
|
|
1824
|
+
* Run publish-grade validation on the draft without publishing it.
|
|
1825
|
+
*
|
|
1826
|
+
* Covers everything a draft write checks plus what publishing adds: a
|
|
1827
|
+
* workspace API key for the model, at least one output field, the operation
|
|
1828
|
+
* trees of the attached tools, and the email batches already drafting with
|
|
1829
|
+
* this task. Returns errors (blocking) and warnings (advisory).
|
|
1830
|
+
*/
|
|
1831
|
+
validate<ThrowOnError extends boolean = false>(parameters: {
|
|
1832
|
+
task_id: string;
|
|
1833
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TasksValidateResults, TasksValidateErrors, ThrowOnError, 'data'>;
|
|
1686
1834
|
private _runs?;
|
|
1687
1835
|
get runs(): Runs;
|
|
1836
|
+
private _versions?;
|
|
1837
|
+
get versions(): Versions2;
|
|
1688
1838
|
}
|
|
1689
1839
|
export declare class Accounts extends HeyApiClient {
|
|
1690
1840
|
/**
|
|
@@ -1894,7 +2044,7 @@ export declare class Telephony extends HeyApiClient {
|
|
|
1894
2044
|
private _providers?;
|
|
1895
2045
|
get providers(): Providers;
|
|
1896
2046
|
}
|
|
1897
|
-
export declare class
|
|
2047
|
+
export declare class Versions3 extends HeyApiClient {
|
|
1898
2048
|
/**
|
|
1899
2049
|
* Get Tool Version
|
|
1900
2050
|
*
|
|
@@ -2026,7 +2176,7 @@ export declare class Tools2 extends HeyApiClient {
|
|
|
2026
2176
|
tool_id: string;
|
|
2027
2177
|
}, options?: Options<never, ThrowOnError>): RequestResult<ToolsValidateResults, ToolsValidateErrors, ThrowOnError, 'data'>;
|
|
2028
2178
|
private _versions?;
|
|
2029
|
-
get versions():
|
|
2179
|
+
get versions(): Versions3;
|
|
2030
2180
|
}
|
|
2031
2181
|
export declare class Webhooks extends HeyApiClient {
|
|
2032
2182
|
/**
|