@talqing/sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +193 -0
- package/dist/browser.d.ts +153 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +440 -0
- package/dist/browser.js.map +1 -0
- package/dist/client.d.ts +101 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +88 -0
- package/dist/client.js.map +1 -0
- package/dist/gen/apiVersion.d.ts +3 -0
- package/dist/gen/apiVersion.d.ts.map +1 -0
- package/dist/gen/apiVersion.js +4 -0
- package/dist/gen/apiVersion.js.map +1 -0
- package/dist/gen/client/client.gen.d.ts +3 -0
- package/dist/gen/client/client.gen.d.ts.map +1 -0
- package/dist/gen/client/client.gen.js +217 -0
- package/dist/gen/client/client.gen.js.map +1 -0
- package/dist/gen/client/index.d.ts +11 -0
- package/dist/gen/client/index.d.ts.map +1 -0
- package/dist/gen/client/index.js +7 -0
- package/dist/gen/client/index.js.map +1 -0
- package/dist/gen/client/types.gen.d.ts +121 -0
- package/dist/gen/client/types.gen.d.ts.map +1 -0
- package/dist/gen/client/types.gen.js +3 -0
- package/dist/gen/client/types.gen.js.map +1 -0
- package/dist/gen/client/utils.gen.d.ts +38 -0
- package/dist/gen/client/utils.gen.d.ts.map +1 -0
- package/dist/gen/client/utils.gen.js +231 -0
- package/dist/gen/client/utils.gen.js.map +1 -0
- package/dist/gen/client.gen.d.ts +13 -0
- package/dist/gen/client.gen.d.ts.map +1 -0
- package/dist/gen/client.gen.js +4 -0
- package/dist/gen/client.gen.js.map +1 -0
- package/dist/gen/core/auth.gen.d.ts +26 -0
- package/dist/gen/core/auth.gen.d.ts.map +1 -0
- package/dist/gen/core/auth.gen.js +15 -0
- package/dist/gen/core/auth.gen.js.map +1 -0
- package/dist/gen/core/bodySerializer.gen.d.ts +26 -0
- package/dist/gen/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/gen/core/bodySerializer.gen.js +58 -0
- package/dist/gen/core/bodySerializer.gen.js.map +1 -0
- package/dist/gen/core/params.gen.d.ts +44 -0
- package/dist/gen/core/params.gen.d.ts.map +1 -0
- package/dist/gen/core/params.gen.js +110 -0
- package/dist/gen/core/params.gen.js.map +1 -0
- package/dist/gen/core/pathSerializer.gen.d.ts +34 -0
- package/dist/gen/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/gen/core/pathSerializer.gen.js +107 -0
- package/dist/gen/core/pathSerializer.gen.js.map +1 -0
- package/dist/gen/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/gen/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/gen/core/queryKeySerializer.gen.js +93 -0
- package/dist/gen/core/queryKeySerializer.gen.js.map +1 -0
- package/dist/gen/core/serverSentEvents.gen.d.ts +72 -0
- package/dist/gen/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/gen/core/serverSentEvents.gen.js +133 -0
- package/dist/gen/core/serverSentEvents.gen.js.map +1 -0
- package/dist/gen/core/types.gen.d.ts +84 -0
- package/dist/gen/core/types.gen.d.ts.map +1 -0
- package/dist/gen/core/types.gen.js +3 -0
- package/dist/gen/core/types.gen.js.map +1 -0
- package/dist/gen/core/utils.gen.d.ts +20 -0
- package/dist/gen/core/utils.gen.d.ts.map +1 -0
- package/dist/gen/core/utils.gen.js +88 -0
- package/dist/gen/core/utils.gen.js.map +1 -0
- package/dist/gen/index.d.ts +3 -0
- package/dist/gen/index.d.ts.map +1 -0
- package/dist/gen/index.js +3 -0
- package/dist/gen/index.js.map +1 -0
- package/dist/gen/sdk.gen.d.ts +2330 -0
- package/dist/gen/sdk.gen.d.ts.map +1 -0
- package/dist/gen/sdk.gen.js +4320 -0
- package/dist/gen/sdk.gen.js.map +1 -0
- package/dist/gen/types.gen.d.ts +17288 -0
- package/dist/gen/types.gen.d.ts.map +1 -0
- package/dist/gen/types.gen.js +3 -0
- package/dist/gen/types.gen.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/vocabulary.d.ts +67 -0
- package/dist/vocabulary.d.ts.map +1 -0
- package/dist/vocabulary.js +12 -0
- package/dist/vocabulary.js.map +1 -0
- package/package.json +67 -0
- package/src/browser.tsx +675 -0
- package/src/client.ts +189 -0
- package/src/gen/apiVersion.ts +4 -0
- package/src/gen/client/client.gen.ts +277 -0
- package/src/gen/client/index.ts +27 -0
- package/src/gen/client/types.gen.ts +218 -0
- package/src/gen/client/utils.gen.ts +316 -0
- package/src/gen/client.gen.ts +16 -0
- package/src/gen/core/auth.gen.ts +48 -0
- package/src/gen/core/bodySerializer.gen.ts +82 -0
- package/src/gen/core/params.gen.ts +178 -0
- package/src/gen/core/pathSerializer.gen.ts +171 -0
- package/src/gen/core/queryKeySerializer.gen.ts +117 -0
- package/src/gen/core/serverSentEvents.gen.ts +242 -0
- package/src/gen/core/types.gen.ts +110 -0
- package/src/gen/core/utils.gen.ts +140 -0
- package/src/gen/index.ts +4 -0
- package/src/gen/sdk.gen.ts +5008 -0
- package/src/gen/types.gen.ts +18418 -0
- package/src/index.ts +13 -0
- package/src/vocabulary.ts +134 -0
|
@@ -0,0 +1,2330 @@
|
|
|
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, AuthLogoutErrors, AuthLogoutResults, AuthMeErrors, AuthMeResults, BackfillAnalysisRequest, 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, CreateTokenRequest, CreateToolRequest, CreateWebhookRequest, 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, InviteRequest, 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, OrgNameRequest, OrgsCreateErrors, OrgsCreateResults, OrgsInvitesCreateErrors, OrgsInvitesCreateResults, OrgsInvitesListErrors, OrgsInvitesListResults, OrgsInvitesRevokeErrors, OrgsInvitesRevokeResults, OrgsLeaveErrors, OrgsLeaveResults, OrgsListErrors, OrgsListResults, OrgsMembersListErrors, OrgsMembersListResults, OrgsMembersRemoveErrors, OrgsMembersRemoveResults, OrgsMembersSetRoleErrors, OrgsMembersSetRoleResults, OrgsSwitchErrors, OrgsSwitchResults, OrgsUpdateErrors, OrgsUpdateResults, OutboundCallRequest, PatchCallBatchRequest, PatchConversationRequest, PatchEmailBatchRequest, PatchEmailRecipientRequest, PatchIntegrationRequest, PatchIntegrationTriggerRequest, PatchNodeRequest, PatchOrgRequest, PatchPhoneNumberRequest, PatchTaskRequest, PatchTelephonyAccountRequest, PatchToolRequest, PatchWebhookRequest, PreviewAnalysisRequest, ProviderKeysDeleteErrors, ProviderKeysDeleteResults, ProviderKeysListErrors, ProviderKeysListResults, ProviderKeysSetErrors, ProviderKeysSetResults, PublishToolRequest, RoleRequest, RunTaskRequest, RunToolRequest, 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, TokensCreateErrors, TokensCreateResults, TokensDeleteErrors, TokensDeleteResults, TokensListErrors, TokensListResults, TokensMcpErrors, TokensMcpResults, 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
|
+
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
4
|
+
/**
|
|
5
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
6
|
+
* individual options. This might be also useful if you want to implement a
|
|
7
|
+
* custom client.
|
|
8
|
+
*/
|
|
9
|
+
client?: Client;
|
|
10
|
+
/**
|
|
11
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
12
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
13
|
+
*/
|
|
14
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
15
|
+
};
|
|
16
|
+
declare class HeyApiClient {
|
|
17
|
+
protected client: Client;
|
|
18
|
+
constructor(args?: {
|
|
19
|
+
client?: Client;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
declare class HeyApiRegistry<T> {
|
|
23
|
+
private readonly defaultKey;
|
|
24
|
+
private readonly instances;
|
|
25
|
+
get(key?: string): T;
|
|
26
|
+
set(value: T, key?: string): void;
|
|
27
|
+
}
|
|
28
|
+
export declare class Versions extends HeyApiClient {
|
|
29
|
+
/**
|
|
30
|
+
* Get Agent Version
|
|
31
|
+
*
|
|
32
|
+
* Fetch what one published version of an agent actually contains.
|
|
33
|
+
*
|
|
34
|
+
* `get_agent` lists the versions and when each was published; this returns the
|
|
35
|
+
* frozen definition itself — prompt, models, turn handling and the tool
|
|
36
|
+
* versions it pinned, exactly as they were at that publish. Use it to see what
|
|
37
|
+
* changed between two versions, or between a version and the current draft.
|
|
38
|
+
*/
|
|
39
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
40
|
+
agent_id: string;
|
|
41
|
+
version: number;
|
|
42
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<AgentsVersionsGetResults, AgentsVersionsGetErrors, ThrowOnError, 'data'>;
|
|
43
|
+
/**
|
|
44
|
+
* Rollback Agent Version
|
|
45
|
+
*
|
|
46
|
+
* Put an earlier published version of an agent back into production.
|
|
47
|
+
*
|
|
48
|
+
* That version becomes live **immediately** and **replaces the current draft**,
|
|
49
|
+
* so any unpublished edits are lost. Calls already in progress finish on the
|
|
50
|
+
* version they started.
|
|
51
|
+
*
|
|
52
|
+
* No new version is created: `published_version` simply points at the older
|
|
53
|
+
* one. The restored draft tracks each tool's latest published version, not the
|
|
54
|
+
* ones this version pinned.
|
|
55
|
+
*/
|
|
56
|
+
rollback<ThrowOnError extends boolean = false>(parameters: {
|
|
57
|
+
agent_id: string;
|
|
58
|
+
version: number;
|
|
59
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<AgentsVersionsRollbackResults, AgentsVersionsRollbackErrors, ThrowOnError, 'data'>;
|
|
60
|
+
}
|
|
61
|
+
export declare class Agents extends HeyApiClient {
|
|
62
|
+
/**
|
|
63
|
+
* List Agents
|
|
64
|
+
*
|
|
65
|
+
* List the workspace's agents, newest edit first.
|
|
66
|
+
*
|
|
67
|
+
* Each item carries the full draft config and the published version number
|
|
68
|
+
* (null while the agent has never been published).
|
|
69
|
+
*/
|
|
70
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
71
|
+
limit?: number;
|
|
72
|
+
offset?: number;
|
|
73
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<AgentsListResults, AgentsListErrors, ThrowOnError, 'data'>;
|
|
74
|
+
/**
|
|
75
|
+
* Create Agent
|
|
76
|
+
*
|
|
77
|
+
* Create an agent from a complete config.
|
|
78
|
+
*
|
|
79
|
+
* The config is validated the same way an update is, so unknown models or
|
|
80
|
+
* unpublished tool references are rejected here. Names are unique per
|
|
81
|
+
* workspace. The agent starts unpublished.
|
|
82
|
+
*/
|
|
83
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
84
|
+
createAgentRequest: CreateAgentRequest;
|
|
85
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<AgentsCreateResults, AgentsCreateErrors, ThrowOnError, 'data'>;
|
|
86
|
+
/**
|
|
87
|
+
* Delete Agent
|
|
88
|
+
*
|
|
89
|
+
* Delete an agent and its published versions permanently.
|
|
90
|
+
*/
|
|
91
|
+
delete<ThrowOnError extends boolean = false>(parameters: {
|
|
92
|
+
agent_id: string;
|
|
93
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<AgentsDeleteResults, AgentsDeleteErrors, ThrowOnError, 'data'>;
|
|
94
|
+
/**
|
|
95
|
+
* Get Agent
|
|
96
|
+
*
|
|
97
|
+
* Fetch one agent's draft config, published version and publish history.
|
|
98
|
+
*/
|
|
99
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
100
|
+
agent_id: string;
|
|
101
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<AgentsGetResults, AgentsGetErrors, ThrowOnError, 'data'>;
|
|
102
|
+
/**
|
|
103
|
+
* Update Agent
|
|
104
|
+
*
|
|
105
|
+
* Replace the agent's draft config with the one supplied.
|
|
106
|
+
*
|
|
107
|
+
* `config` is the complete definition, not a partial patch: whatever it omits
|
|
108
|
+
* reverts to that field's default. Writes land on the draft only — live
|
|
109
|
+
* traffic keeps running the published version until you publish again.
|
|
110
|
+
*
|
|
111
|
+
* Switching `channel` normalizes the media stack: text agents drop stt, tts,
|
|
112
|
+
* realtime, greeting, turn handling and avatar.
|
|
113
|
+
*
|
|
114
|
+
* Setting `realtime` to a speech-to-speech model makes it the whole pipeline —
|
|
115
|
+
* `stt`, `llm` and `tts` are cleared and it handles turn detection itself.
|
|
116
|
+
* Realtime agents have no fallback model, cannot use the 'after each user
|
|
117
|
+
* turn' hook, and only approximate a fixed greeting.
|
|
118
|
+
*/
|
|
119
|
+
update<ThrowOnError extends boolean = false>(parameters: {
|
|
120
|
+
agent_id: string;
|
|
121
|
+
updateAgentRequest: UpdateAgentRequest;
|
|
122
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<AgentsUpdateResults, AgentsUpdateErrors, ThrowOnError, 'data'>;
|
|
123
|
+
/**
|
|
124
|
+
* Publish Agent
|
|
125
|
+
*
|
|
126
|
+
* Freeze the current draft as a new immutable version and make it live.
|
|
127
|
+
*
|
|
128
|
+
* Validation must pass. Publishing pins every attached tool (and lifecycle
|
|
129
|
+
* hook) to the tool version that is live right now, so republishing a tool does
|
|
130
|
+
* not change this agent's behaviour until the agent is published again.
|
|
131
|
+
*/
|
|
132
|
+
publish<ThrowOnError extends boolean = false>(parameters: {
|
|
133
|
+
agent_id: string;
|
|
134
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<AgentsPublishResults, AgentsPublishErrors, ThrowOnError, 'data'>;
|
|
135
|
+
/**
|
|
136
|
+
* Validate Agent
|
|
137
|
+
*
|
|
138
|
+
* Run publish-grade validation on the draft without publishing it.
|
|
139
|
+
*
|
|
140
|
+
* Covers everything a draft write checks plus the deeper checks publishing
|
|
141
|
+
* adds: a workspace API key for every provider the agent needs, and the
|
|
142
|
+
* operation trees of attached and hook tools. Returns errors (blocking) and
|
|
143
|
+
* warnings (advisory).
|
|
144
|
+
*/
|
|
145
|
+
validate<ThrowOnError extends boolean = false>(parameters: {
|
|
146
|
+
agent_id: string;
|
|
147
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<AgentsValidateResults, AgentsValidateErrors, ThrowOnError, 'data'>;
|
|
148
|
+
private _versions?;
|
|
149
|
+
get versions(): Versions;
|
|
150
|
+
}
|
|
151
|
+
export declare class Auth extends HeyApiClient {
|
|
152
|
+
/**
|
|
153
|
+
* Logout
|
|
154
|
+
*/
|
|
155
|
+
logout<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<AuthLogoutResults, AuthLogoutErrors, ThrowOnError, 'data'>;
|
|
156
|
+
/**
|
|
157
|
+
* Me
|
|
158
|
+
*
|
|
159
|
+
* Who this credential is: the signed-in user, their role, and the organization.
|
|
160
|
+
*
|
|
161
|
+
* Everything else you can reach is scoped to that organization, and `role`
|
|
162
|
+
* (`ADMIN`, `EDITOR` or `VIEWER`) decides whether writes will be accepted. A
|
|
163
|
+
* user may belong to several organizations with a different role in each; this
|
|
164
|
+
* reports the one this credential is for.
|
|
165
|
+
*/
|
|
166
|
+
me<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<AuthMeResults, AuthMeErrors, ThrowOnError, 'data'>;
|
|
167
|
+
}
|
|
168
|
+
export declare class ProviderKeys extends HeyApiClient {
|
|
169
|
+
/**
|
|
170
|
+
* List Provider Keys
|
|
171
|
+
*
|
|
172
|
+
* List every AI provider and whether this workspace has an API key for it.
|
|
173
|
+
*
|
|
174
|
+
* Talqing is strict BYOK: agents run on the workspace's own provider keys.
|
|
175
|
+
* Publishing fails if the agent needs a provider with no key configured.
|
|
176
|
+
* Every key listed here was accepted by its provider when it was saved.
|
|
177
|
+
*/
|
|
178
|
+
list<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<ProviderKeysListResults, ProviderKeysListErrors, ThrowOnError, 'data'>;
|
|
179
|
+
/**
|
|
180
|
+
* Delete Provider Key
|
|
181
|
+
*
|
|
182
|
+
* Remove this organization's API key for one provider. Agents that need it
|
|
183
|
+
* will stop working and can no longer be published. Organization admins only.
|
|
184
|
+
*/
|
|
185
|
+
delete<ThrowOnError extends boolean = false>(parameters: {
|
|
186
|
+
provider: string;
|
|
187
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ProviderKeysDeleteResults, ProviderKeysDeleteErrors, ThrowOnError, 'data'>;
|
|
188
|
+
/**
|
|
189
|
+
* Set Provider Key
|
|
190
|
+
*
|
|
191
|
+
* Store this workspace's API key for one provider, replacing any existing key.
|
|
192
|
+
*
|
|
193
|
+
* The key is called against the provider first and only stored if accepted: a
|
|
194
|
+
* rejected key is a 400 that leaves any existing key untouched, and a provider
|
|
195
|
+
* that cannot be reached is a 502. Encrypted at rest and never returned.
|
|
196
|
+
* Organization admins only.
|
|
197
|
+
*/
|
|
198
|
+
set<ThrowOnError extends boolean = false>(parameters: {
|
|
199
|
+
provider: string;
|
|
200
|
+
setProviderKeyRequest: SetProviderKeyRequest;
|
|
201
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ProviderKeysSetResults, ProviderKeysSetErrors, ThrowOnError, 'data'>;
|
|
202
|
+
}
|
|
203
|
+
export declare class Analysis extends HeyApiClient {
|
|
204
|
+
/**
|
|
205
|
+
* Backfill Call Analysis
|
|
206
|
+
*
|
|
207
|
+
* Re-analyse past calls with each one's current agent definition.
|
|
208
|
+
*
|
|
209
|
+
* Use this after changing what an agent extracts, to fill in calls that ran
|
|
210
|
+
* under the old definition — and to retry calls whose analysis failed.
|
|
211
|
+
*
|
|
212
|
+
* Each call is analysed by a real model call and re-priced, so the tenant is
|
|
213
|
+
* charged again for every call in the list. Try the definition on one call
|
|
214
|
+
* with `preview_call_analysis` first.
|
|
215
|
+
*/
|
|
216
|
+
backfill<ThrowOnError extends boolean = false>(parameters: {
|
|
217
|
+
backfillAnalysisRequest: BackfillAnalysisRequest;
|
|
218
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsAnalysisBackfillResults, CallsAnalysisBackfillErrors, ThrowOnError, 'data'>;
|
|
219
|
+
/**
|
|
220
|
+
* Preview Call Analysis
|
|
221
|
+
*
|
|
222
|
+
* Try an analysis definition against one past call and see what it finds.
|
|
223
|
+
*
|
|
224
|
+
* Nothing is saved, which makes this the way to tune a summary prompt, a
|
|
225
|
+
* success definition or an extraction field before putting it on the agent.
|
|
226
|
+
* The call is analysed against the agent definition it actually ran. Costs one
|
|
227
|
+
* model call.
|
|
228
|
+
*/
|
|
229
|
+
preview<ThrowOnError extends boolean = false>(parameters: {
|
|
230
|
+
session_id: string;
|
|
231
|
+
previewAnalysisRequest: PreviewAnalysisRequest;
|
|
232
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsAnalysisPreviewResults, CallsAnalysisPreviewErrors, ThrowOnError, 'data'>;
|
|
233
|
+
}
|
|
234
|
+
export declare class Recipients extends HeyApiClient {
|
|
235
|
+
/**
|
|
236
|
+
* List Call Batch Recipients
|
|
237
|
+
*
|
|
238
|
+
* One batch's recipients and how each call went, in the uploaded order.
|
|
239
|
+
*
|
|
240
|
+
* `session_id` is that person's most recent call — pass it to `get_call` for
|
|
241
|
+
* the transcript, recording and cost, and `last_close_reason` says exactly how
|
|
242
|
+
* the attempt ended. A recipient of a cancelled batch reads as `canceled` even
|
|
243
|
+
* though their row was never touched.
|
|
244
|
+
*/
|
|
245
|
+
list<ThrowOnError extends boolean = false>(parameters: {
|
|
246
|
+
batch_id: string;
|
|
247
|
+
limit?: number;
|
|
248
|
+
offset?: number;
|
|
249
|
+
status?: string | null;
|
|
250
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsBatchesRecipientsListResults, CallsBatchesRecipientsListErrors, ThrowOnError, 'data'>;
|
|
251
|
+
/**
|
|
252
|
+
* Add Call Batch Recipients
|
|
253
|
+
*
|
|
254
|
+
* Append people to a batch, including one that is already running.
|
|
255
|
+
*
|
|
256
|
+
* Numbers the batch already holds are **skipped and reported**, not rejected —
|
|
257
|
+
* re-uploading a list exported from a CRM is the normal case, and nobody
|
|
258
|
+
* already called is called again. The new rows are dialled after the existing
|
|
259
|
+
* ones.
|
|
260
|
+
*/
|
|
261
|
+
add<ThrowOnError extends boolean = false>(parameters: {
|
|
262
|
+
batch_id: string;
|
|
263
|
+
addRecipientsRequest: AddRecipientsRequest;
|
|
264
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsBatchesRecipientsAddResults, CallsBatchesRecipientsAddErrors, ThrowOnError, 'data'>;
|
|
265
|
+
}
|
|
266
|
+
export declare class Batches extends HeyApiClient {
|
|
267
|
+
/**
|
|
268
|
+
* List Call Batches
|
|
269
|
+
*
|
|
270
|
+
* List outbound calling batches, newest first, with live progress.
|
|
271
|
+
*
|
|
272
|
+
* `counts` breaks the recipient list down by outcome and `next_dial_at` says
|
|
273
|
+
* when a batch that is not dialling will start again — the clock, not a fault.
|
|
274
|
+
* A `failed` batch carries `failure_reason`: the circuit breaker stopped it
|
|
275
|
+
* after ten consecutive setup failures.
|
|
276
|
+
*/
|
|
277
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
278
|
+
limit?: number;
|
|
279
|
+
offset?: number;
|
|
280
|
+
status?: string | null;
|
|
281
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsBatchesListResults, CallsBatchesListErrors, ThrowOnError, 'data'>;
|
|
282
|
+
/**
|
|
283
|
+
* Create Call Batch
|
|
284
|
+
*
|
|
285
|
+
* Call a list of people with a published agent, now or on a schedule.
|
|
286
|
+
*
|
|
287
|
+
* **This places real, billable PSTN calls** — one per recipient, up to 10 000
|
|
288
|
+
* of them. Only call it when the user has asked for this specific list to be
|
|
289
|
+
* dialled.
|
|
290
|
+
*
|
|
291
|
+
* `recipients[]` carries `to` (any format, normalized to E.164) and
|
|
292
|
+
* `userdata`, the session state behind `{{userdata.field}}` in the prompt and
|
|
293
|
+
* greeting. A number that appears twice is refused with both row numbers.
|
|
294
|
+
*
|
|
295
|
+
* `start_at` and `calling_window` schedule it in the timezone you give;
|
|
296
|
+
* `max_concurrency` and `max_attempts` pace it. A number that was reached is
|
|
297
|
+
* never called twice.
|
|
298
|
+
*
|
|
299
|
+
* Two things you would otherwise learn from an invoice:
|
|
300
|
+
*
|
|
301
|
+
* - **Answering machines are not detected.** Voicemail is answered and billed.
|
|
302
|
+
* - **Calls run your agent's current published version.** Republishing changes
|
|
303
|
+
* every call placed after that moment.
|
|
304
|
+
*/
|
|
305
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
306
|
+
createCallBatchRequest: CreateCallBatchRequest;
|
|
307
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsBatchesCreateResults, CallsBatchesCreateErrors, ThrowOnError, 'data'>;
|
|
308
|
+
/**
|
|
309
|
+
* Get Call Batch
|
|
310
|
+
*
|
|
311
|
+
* One batch: its policy, its progress, and why it is or is not dialling.
|
|
312
|
+
*
|
|
313
|
+
* `agent_name` and `from_e164` are read live, so a renamed agent shows its
|
|
314
|
+
* current name and a deleted one shows null.
|
|
315
|
+
*/
|
|
316
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
317
|
+
batch_id: string;
|
|
318
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsBatchesGetResults, CallsBatchesGetErrors, ThrowOnError, 'data'>;
|
|
319
|
+
/**
|
|
320
|
+
* Patch Call Batch
|
|
321
|
+
*
|
|
322
|
+
* Change a batch's policy while it runs. The next pass picks it up.
|
|
323
|
+
*
|
|
324
|
+
* Everything here is policy, so nothing revisits a recipient already called,
|
|
325
|
+
* and calls in flight finish under the policy they were dispatched with. You
|
|
326
|
+
* do not need this to pick up a republished prompt — every call already runs
|
|
327
|
+
* the current published version. `start_at` moves only while the batch is
|
|
328
|
+
* still `scheduled`.
|
|
329
|
+
*/
|
|
330
|
+
update<ThrowOnError extends boolean = false>(parameters: {
|
|
331
|
+
batch_id: string;
|
|
332
|
+
patchCallBatchRequest: PatchCallBatchRequest;
|
|
333
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsBatchesUpdateResults, CallsBatchesUpdateErrors, ThrowOnError, 'data'>;
|
|
334
|
+
/**
|
|
335
|
+
* Cancel Call Batch
|
|
336
|
+
*
|
|
337
|
+
* Stop a batch for good. There is no undo, and a batch cannot be deleted.
|
|
338
|
+
*
|
|
339
|
+
* Everyone not yet called immediately reads as `canceled`. Calls already
|
|
340
|
+
* ringing or in progress are **not** dropped — they run to their natural end,
|
|
341
|
+
* and the batch is only finished once they have.
|
|
342
|
+
*/
|
|
343
|
+
cancel<ThrowOnError extends boolean = false>(parameters: {
|
|
344
|
+
batch_id: string;
|
|
345
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsBatchesCancelResults, CallsBatchesCancelErrors, ThrowOnError, 'data'>;
|
|
346
|
+
/**
|
|
347
|
+
* Pause Call Batch
|
|
348
|
+
*
|
|
349
|
+
* Stop placing new calls. Calls already in progress run to their end.
|
|
350
|
+
*/
|
|
351
|
+
pause<ThrowOnError extends boolean = false>(parameters: {
|
|
352
|
+
batch_id: string;
|
|
353
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsBatchesPauseResults, CallsBatchesPauseErrors, ThrowOnError, 'data'>;
|
|
354
|
+
/**
|
|
355
|
+
* Resume Call Batch
|
|
356
|
+
*
|
|
357
|
+
* Undo a pause and carry on from where the batch stopped.
|
|
358
|
+
*
|
|
359
|
+
* A batch whose `start_at` is still in the future goes back to `scheduled`
|
|
360
|
+
* rather than starting early.
|
|
361
|
+
*/
|
|
362
|
+
resume<ThrowOnError extends boolean = false>(parameters: {
|
|
363
|
+
batch_id: string;
|
|
364
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsBatchesResumeResults, CallsBatchesResumeErrors, ThrowOnError, 'data'>;
|
|
365
|
+
private _recipients?;
|
|
366
|
+
get recipients(): Recipients;
|
|
367
|
+
}
|
|
368
|
+
export declare class Recording extends HeyApiClient {
|
|
369
|
+
/**
|
|
370
|
+
* Delete Call Recording
|
|
371
|
+
*
|
|
372
|
+
* Delete the call's recorded media, keeping the call itself.
|
|
373
|
+
*
|
|
374
|
+
* Both the audio and, where the agent watched one, the screen video. The
|
|
375
|
+
* transcript, cost and everything else about the call stay exactly as they are.
|
|
376
|
+
* This is immediate and cannot be undone. Deleting a recording that is already
|
|
377
|
+
* gone succeeds quietly.
|
|
378
|
+
*
|
|
379
|
+
* Deliberately synchronous, unlike `delete_call`: this destroys one or two
|
|
380
|
+
* objects and returns, where deleting a call schedules a redaction across
|
|
381
|
+
* several tables.
|
|
382
|
+
*/
|
|
383
|
+
delete<ThrowOnError extends boolean = false>(parameters: {
|
|
384
|
+
session_id: string;
|
|
385
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsRecordingDeleteResults, CallsRecordingDeleteErrors, ThrowOnError, 'data'>;
|
|
386
|
+
/**
|
|
387
|
+
* Get Call Recording
|
|
388
|
+
*
|
|
389
|
+
* Redirect to the call's audio: one stereo Ogg/Opus file.
|
|
390
|
+
*
|
|
391
|
+
* The redirect goes to object storage and expires within the hour, so follow
|
|
392
|
+
* it straight away rather than storing it. It supports `Range`, which is what
|
|
393
|
+
* lets a player seek without downloading the whole call first. Pass
|
|
394
|
+
* `download=true` for a link that saves as `call-{id}.ogg`.
|
|
395
|
+
*
|
|
396
|
+
* The caller is the left channel and the agent is the right, so you can listen
|
|
397
|
+
* to either side alone by splitting the channels — one `ffmpeg -map_channel`
|
|
398
|
+
* away, and what makes the file useful both for hearing the call and for
|
|
399
|
+
* building training data. It is what the agent heard after noise cancellation,
|
|
400
|
+
* not a capture of the phone line, and it does not include background audio,
|
|
401
|
+
* which the agent publishes as its own track.
|
|
402
|
+
*
|
|
403
|
+
* A `404` here means there is nothing to play, and its message says why — the
|
|
404
|
+
* agent had recording off, the call is still running, the recording was
|
|
405
|
+
* deleted by a person or by your retention policy, the caller asked not to be
|
|
406
|
+
* recorded, or it failed to save. Check `recording.state` on the call first to
|
|
407
|
+
* know which without a round trip; `get_call` also returns ready-made
|
|
408
|
+
* `recording.url` and `recording.download_url` links.
|
|
409
|
+
*/
|
|
410
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
411
|
+
session_id: string;
|
|
412
|
+
download?: boolean;
|
|
413
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsRecordingGetResults, CallsRecordingGetErrors, ThrowOnError, 'data'>;
|
|
414
|
+
}
|
|
415
|
+
export declare class ScreenRecording extends HeyApiClient {
|
|
416
|
+
/**
|
|
417
|
+
* Get Call Screen Recording
|
|
418
|
+
*
|
|
419
|
+
* Redirect to the screen the person shared: one 1 fps H.264 file.
|
|
420
|
+
*
|
|
421
|
+
* Only agents with `vision_input.screenshare.record` produce one. It covers the
|
|
422
|
+
* whole call rather than only the shared stretches — the parts where nobody was
|
|
423
|
+
* sharing are black — so its timeline lines up with the audio and the
|
|
424
|
+
* transcript second for second, and a turn's offset into it is the same
|
|
425
|
+
* arithmetic as into the recording.
|
|
426
|
+
*
|
|
427
|
+
* Like the audio, the redirect goes to object storage, expires within the hour
|
|
428
|
+
* and supports `Range`. A `404` says why there is nothing to play, and
|
|
429
|
+
* `screen_recording.state` on the call answers the same question without a
|
|
430
|
+
* round trip — including `not_shared`, which means screen recording was on and
|
|
431
|
+
* nobody ever shared, as opposed to `none`, which means it was off.
|
|
432
|
+
*/
|
|
433
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
434
|
+
session_id: string;
|
|
435
|
+
download?: boolean;
|
|
436
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsScreenRecordingGetResults, CallsScreenRecordingGetErrors, ThrowOnError, 'data'>;
|
|
437
|
+
}
|
|
438
|
+
export declare class Calls extends HeyApiClient {
|
|
439
|
+
/**
|
|
440
|
+
* List Calls
|
|
441
|
+
*
|
|
442
|
+
* List voice and video calls, newest first, with status, duration and cost.
|
|
443
|
+
*
|
|
444
|
+
* The window defaults to the last 30 days. Filter by `agent_id`, by `type` to
|
|
445
|
+
* separate web calls from phone calls, by `contact_key` for one customer's
|
|
446
|
+
* whole history, or by `batch_id` for every call one outbound batch placed.
|
|
447
|
+
* Text conversations are not calls — those live under `list_conversations`.
|
|
448
|
+
*/
|
|
449
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
450
|
+
limit?: number;
|
|
451
|
+
offset?: number;
|
|
452
|
+
start?: string | null;
|
|
453
|
+
end?: string | null;
|
|
454
|
+
agent_id?: string | null;
|
|
455
|
+
type?: 'WEB' | 'SIP_INBOUND' | 'SIP_OUTBOUND' | null;
|
|
456
|
+
status?: string | null;
|
|
457
|
+
outcome?: string | null;
|
|
458
|
+
contact_key?: string | null;
|
|
459
|
+
close_reason?: string | null;
|
|
460
|
+
batch_id?: string | null;
|
|
461
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsListResults, CallsListErrors, ThrowOnError, 'data'>;
|
|
462
|
+
/**
|
|
463
|
+
* Create Outbound Call
|
|
464
|
+
*
|
|
465
|
+
* Dial a real phone number and have a published agent take the call.
|
|
466
|
+
*
|
|
467
|
+
* **This places a live, billable PSTN call** — only call it when the user has
|
|
468
|
+
* asked for this specific call to be made. The agent must be published and on
|
|
469
|
+
* the `voice` channel, and `from_phone_number_id` an active outbound-capable
|
|
470
|
+
* number on a ready carrier account.
|
|
471
|
+
*
|
|
472
|
+
* `userdata` seeds the session state read as `{{userdata.field}}`; keys
|
|
473
|
+
* beginning with `_talqing` are reserved. Prefer `agent_id`; reach for
|
|
474
|
+
* `agent_override`, `agent` or `agent_team` only when the definition is
|
|
475
|
+
* generated per request and would never be reused.
|
|
476
|
+
*
|
|
477
|
+
* It returns when the call is placed, not when it is answered.
|
|
478
|
+
*/
|
|
479
|
+
outbound<ThrowOnError extends boolean = false>(parameters: {
|
|
480
|
+
outboundCallRequest: OutboundCallRequest;
|
|
481
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsOutboundResults, CallsOutboundErrors, ThrowOnError, 'data'>;
|
|
482
|
+
/**
|
|
483
|
+
* Call Stats
|
|
484
|
+
*
|
|
485
|
+
* Totals for a window: call count, minutes, spend and average cost.
|
|
486
|
+
*
|
|
487
|
+
* Spend and `avg_cost_per_call` count only priced calls (`priced_calls`), so
|
|
488
|
+
* a call still being priced does not drag the average down. The window
|
|
489
|
+
* defaults to the last 30 days.
|
|
490
|
+
*/
|
|
491
|
+
stats<ThrowOnError extends boolean = false>(parameters?: {
|
|
492
|
+
start?: string | null;
|
|
493
|
+
end?: string | null;
|
|
494
|
+
agent_id?: string | null;
|
|
495
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsStatsResults, CallsStatsErrors, ThrowOnError, 'data'>;
|
|
496
|
+
/**
|
|
497
|
+
* Calls Token
|
|
498
|
+
*
|
|
499
|
+
* Mint a LiveKit token for a browser to open a web call with an agent.
|
|
500
|
+
*
|
|
501
|
+
* `userdata` seeds the session state read as `{{userdata.field}}`; keys
|
|
502
|
+
* beginning with `_talqing` are reserved. Prefer `agent_id`; reach for
|
|
503
|
+
* `agent_override`, `agent` or `agent_team` only when the definition is
|
|
504
|
+
* generated per request and would never be reused.
|
|
505
|
+
*
|
|
506
|
+
* Needs the editor role — these fields run an arbitrary prompt on an arbitrary
|
|
507
|
+
* model, paid for with the workspace's own provider keys.
|
|
508
|
+
*
|
|
509
|
+
* The token only lets a browser connect. To dial a phone, use
|
|
510
|
+
* `create_outbound_call`.
|
|
511
|
+
*/
|
|
512
|
+
token<ThrowOnError extends boolean = false>(parameters: {
|
|
513
|
+
tokenRequest: TokenRequest;
|
|
514
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsTokenResults, CallsTokenErrors, ThrowOnError, 'data'>;
|
|
515
|
+
/**
|
|
516
|
+
* Delete Call
|
|
517
|
+
*
|
|
518
|
+
* Erase this call's content. The call itself stays, with its cost.
|
|
519
|
+
*
|
|
520
|
+
* What goes: the recording, the transcript, every tool call and its output,
|
|
521
|
+
* the session's userdata, the summary, the extracted fields, and the phone
|
|
522
|
+
* numbers on the call. What stays: the call, its duration, status, outcome,
|
|
523
|
+
* per-turn timings and everything it was billed — so past invoices still
|
|
524
|
+
* resolve.
|
|
525
|
+
*
|
|
526
|
+
* Erasing a person's last remaining call also erases what your agents
|
|
527
|
+
* remember about them, so the next call from that number meets an agent that
|
|
528
|
+
* has never heard of them.
|
|
529
|
+
*
|
|
530
|
+
* Returns `202`: the work is scheduled rather than done, which is what stops a
|
|
531
|
+
* request to erase two hundred thousand calls arriving as two hundred thousand
|
|
532
|
+
* synchronous deletes. It normally completes within seconds. This cannot be
|
|
533
|
+
* undone.
|
|
534
|
+
*
|
|
535
|
+
* A call that is still in progress is refused with a `409` — it is still
|
|
536
|
+
* writing, and finalize would put the content back on a row already marked
|
|
537
|
+
* erased. Ask again once it has ended.
|
|
538
|
+
*
|
|
539
|
+
* To delete only the audio and keep the transcript, use
|
|
540
|
+
* `delete_call_recording` instead — that one is immediate.
|
|
541
|
+
*/
|
|
542
|
+
delete<ThrowOnError extends boolean = false>(parameters: {
|
|
543
|
+
session_id: string;
|
|
544
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsDeleteResults, CallsDeleteErrors, ThrowOnError, 'data'>;
|
|
545
|
+
/**
|
|
546
|
+
* Get Call
|
|
547
|
+
*
|
|
548
|
+
* Everything about one call: health, transcript, tool calls, usage, cost.
|
|
549
|
+
*
|
|
550
|
+
* Start with `snapshot`: it answers "did this call go well?" on its own —
|
|
551
|
+
* `snapshot.issues` names every problem found and `snapshot.ok` is true when
|
|
552
|
+
* there were none.
|
|
553
|
+
*
|
|
554
|
+
* `transcript` carries what was said with every function call and its output,
|
|
555
|
+
* and `session.userdata` is the state the call ended with. `tools`,
|
|
556
|
+
* `starting_prompt` and `greeting` are the frozen version this call actually
|
|
557
|
+
* ran, not the agent's current draft.
|
|
558
|
+
*/
|
|
559
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
560
|
+
session_id: string;
|
|
561
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CallsGetResults, CallsGetErrors, ThrowOnError, 'data'>;
|
|
562
|
+
private _analysis?;
|
|
563
|
+
get analysis(): Analysis;
|
|
564
|
+
private _batches?;
|
|
565
|
+
get batches(): Batches;
|
|
566
|
+
private _recording?;
|
|
567
|
+
get recording(): Recording;
|
|
568
|
+
private _screenRecording?;
|
|
569
|
+
get screenRecording(): ScreenRecording;
|
|
570
|
+
}
|
|
571
|
+
export declare class Avatars extends HeyApiClient {
|
|
572
|
+
/**
|
|
573
|
+
* Catalog Avatars
|
|
574
|
+
*
|
|
575
|
+
* The Anam avatar gallery — the faces a video agent can wear.
|
|
576
|
+
*
|
|
577
|
+
* An avatar's `id` is what a video agent's `avatar.avatar_id` refers to.
|
|
578
|
+
* `active_version` and `render_style` are gallery facets, not billing models —
|
|
579
|
+
* an agent's `avatar.model` always comes from the provider catalog.
|
|
580
|
+
*
|
|
581
|
+
* Shows your own Anam account when you have a key for it and Talqing's
|
|
582
|
+
* otherwise; `workspace_key` says which.
|
|
583
|
+
*/
|
|
584
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
585
|
+
active_version?: string | null;
|
|
586
|
+
render_style?: string | null;
|
|
587
|
+
offset?: number;
|
|
588
|
+
limit?: number;
|
|
589
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CatalogAvatarsListResults, CatalogAvatarsListErrors, ThrowOnError, 'data'>;
|
|
590
|
+
}
|
|
591
|
+
export declare class Elevenlabs extends HeyApiClient {
|
|
592
|
+
/**
|
|
593
|
+
* Add Elevenlabs Voice
|
|
594
|
+
*
|
|
595
|
+
* Save a shared ElevenLabs library voice so agents can use it.
|
|
596
|
+
*
|
|
597
|
+
* Takes the `voice_id` and `owner_id` of a shared voice and returns the id to
|
|
598
|
+
* set as an agent's `tts.voice`. Saved into your workspace's own ElevenLabs
|
|
599
|
+
* account when you have a key for it. Voices already in that account come back
|
|
600
|
+
* from `catalog_voices` with no `owner_id` and need no save at all.
|
|
601
|
+
*/
|
|
602
|
+
add<ThrowOnError extends boolean = false>(parameters: {
|
|
603
|
+
addVoiceRequest: AddVoiceRequest;
|
|
604
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CatalogVoicesElevenlabsAddResults, CatalogVoicesElevenlabsAddErrors, ThrowOnError, 'data'>;
|
|
605
|
+
/**
|
|
606
|
+
* Elevenlabs Voice Settings
|
|
607
|
+
*
|
|
608
|
+
* The `stability` and `similarity_boost` an ElevenLabs voice was tuned with.
|
|
609
|
+
*
|
|
610
|
+
* Copy these onto an agent's `tts` when you set its `voice`: ElevenLabs
|
|
611
|
+
* applies a voice's own settings only when a request carries no overrides at
|
|
612
|
+
* all, and Talqing always sends a speed — so an agent without these numbers
|
|
613
|
+
* speaks in the generic default rather than the voice its author shipped.
|
|
614
|
+
*
|
|
615
|
+
* A shared-library voice must be saved by `add_elevenlabs_voice` first; call
|
|
616
|
+
* this with the id THAT returned.
|
|
617
|
+
*/
|
|
618
|
+
settings<ThrowOnError extends boolean = false>(parameters: {
|
|
619
|
+
voice_id: string;
|
|
620
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CatalogVoicesElevenlabsSettingsResults, CatalogVoicesElevenlabsSettingsErrors, ThrowOnError, 'data'>;
|
|
621
|
+
}
|
|
622
|
+
export declare class Voices extends HeyApiClient {
|
|
623
|
+
/**
|
|
624
|
+
* Catalog Voices
|
|
625
|
+
*
|
|
626
|
+
* Browse and filter the voices available for one provider.
|
|
627
|
+
*
|
|
628
|
+
* A voice's `id` is what an agent's `tts.voice` refers to, or `realtime.voice`
|
|
629
|
+
* when `kind` is `realtime` — speech-to-speech models pick from their own
|
|
630
|
+
* roster. Use this before choosing a voice by style, accent or gender rather
|
|
631
|
+
* than assuming an id exists.
|
|
632
|
+
*
|
|
633
|
+
* With a workspace key saved for the provider the listing runs on that key and
|
|
634
|
+
* leads with your own account's voices; `workspace_key` says whether it did.
|
|
635
|
+
*/
|
|
636
|
+
list<ThrowOnError extends boolean = false>(parameters: {
|
|
637
|
+
provider: string;
|
|
638
|
+
model?: string | null;
|
|
639
|
+
kind?: 'tts' | 'realtime';
|
|
640
|
+
search?: string;
|
|
641
|
+
language?: string;
|
|
642
|
+
accent?: string;
|
|
643
|
+
gender?: string;
|
|
644
|
+
page?: number;
|
|
645
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CatalogVoicesListResults, CatalogVoicesListErrors, ThrowOnError, 'data'>;
|
|
646
|
+
private _elevenlabs?;
|
|
647
|
+
get elevenlabs(): Elevenlabs;
|
|
648
|
+
}
|
|
649
|
+
export declare class Catalog extends HeyApiClient {
|
|
650
|
+
/**
|
|
651
|
+
* Get Catalog
|
|
652
|
+
*
|
|
653
|
+
* The provider catalog: every LLM, STT, TTS, realtime and avatar model that
|
|
654
|
+
* agents may use.
|
|
655
|
+
*
|
|
656
|
+
* The authoritative source for `provider`/`model` pairs and for what each
|
|
657
|
+
* entry supports — channels, language codes, speed range, default voice. A
|
|
658
|
+
* config naming anything not listed here is rejected.
|
|
659
|
+
*
|
|
660
|
+
* `realtime` lists the speech-to-speech models. One of those replaces `stt`,
|
|
661
|
+
* `llm` and `tts` together, so an agent sets either `realtime` or the three
|
|
662
|
+
* cascade slots, never both.
|
|
663
|
+
*/
|
|
664
|
+
get<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<CatalogGetResults, CatalogGetErrors, ThrowOnError, 'data'>;
|
|
665
|
+
private _avatars?;
|
|
666
|
+
get avatars(): Avatars;
|
|
667
|
+
private _voices?;
|
|
668
|
+
get voices(): Voices;
|
|
669
|
+
}
|
|
670
|
+
export declare class Messages extends HeyApiClient {
|
|
671
|
+
/**
|
|
672
|
+
* Create Text Message
|
|
673
|
+
*
|
|
674
|
+
* Send a message to a text agent — the way to actually talk to one.
|
|
675
|
+
*
|
|
676
|
+
* Addressed by `contact_key`, not by id, so the same key always reaches the
|
|
677
|
+
* same thread. `client_message_id` is a UUID you generate; re-sending with the
|
|
678
|
+
* same one is ignored rather than duplicated.
|
|
679
|
+
*
|
|
680
|
+
* Returns as soon as the message is accepted, carrying only the user's own
|
|
681
|
+
* item — poll `list_conversation_items` for the agent's reply.
|
|
682
|
+
*/
|
|
683
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
684
|
+
textMessageRequest: TextMessageRequest;
|
|
685
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsMessagesCreateResults, ConversationsMessagesCreateErrors, ThrowOnError, 'data'>;
|
|
686
|
+
}
|
|
687
|
+
export declare class Items extends HeyApiClient {
|
|
688
|
+
/**
|
|
689
|
+
* List Conversation Items
|
|
690
|
+
*
|
|
691
|
+
* The messages in a conversation — the transcript of what was said.
|
|
692
|
+
*
|
|
693
|
+
* `order=asc` reads from the beginning; `order=desc` returns the newest
|
|
694
|
+
* window, still chronological within the page, which is what you want to see
|
|
695
|
+
* an agent's latest reply. `direction` distinguishes inbound from outbound
|
|
696
|
+
* and `delivery_status` says whether an outbound message actually landed.
|
|
697
|
+
*/
|
|
698
|
+
list<ThrowOnError extends boolean = false>(parameters: {
|
|
699
|
+
conversation_id: string;
|
|
700
|
+
limit?: number;
|
|
701
|
+
offset?: number;
|
|
702
|
+
order?: string;
|
|
703
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsItemsListResults, ConversationsItemsListErrors, ThrowOnError, 'data'>;
|
|
704
|
+
}
|
|
705
|
+
export declare class Sessions extends HeyApiClient {
|
|
706
|
+
/**
|
|
707
|
+
* List Conversation Sessions
|
|
708
|
+
*
|
|
709
|
+
* The agent sessions behind a conversation, newest first.
|
|
710
|
+
*
|
|
711
|
+
* A thread can be handled many times — each phone call, each text window,
|
|
712
|
+
* each trigger firing is one session, recording which agent version ran and
|
|
713
|
+
* how it finished. Use it to find out *which* version answered, and to reach
|
|
714
|
+
* the matching `session_id` for `get_call`.
|
|
715
|
+
*/
|
|
716
|
+
list<ThrowOnError extends boolean = false>(parameters: {
|
|
717
|
+
conversation_id: string;
|
|
718
|
+
limit?: number;
|
|
719
|
+
offset?: number;
|
|
720
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsSessionsListResults, ConversationsSessionsListErrors, ThrowOnError, 'data'>;
|
|
721
|
+
}
|
|
722
|
+
export declare class Conversations extends HeyApiClient {
|
|
723
|
+
/**
|
|
724
|
+
* List Conversations
|
|
725
|
+
*
|
|
726
|
+
* List conversations across every channel, most recently active first.
|
|
727
|
+
*
|
|
728
|
+
* One conversation is one bounded stretch of talking — a web chat, a Telegram
|
|
729
|
+
* thread, or a single phone call — with `surface` saying which. Several of them
|
|
730
|
+
* can belong to the same person: pass `contact_key` to list only theirs.
|
|
731
|
+
*/
|
|
732
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
733
|
+
limit?: number;
|
|
734
|
+
offset?: number;
|
|
735
|
+
agent_id?: string | null;
|
|
736
|
+
contact_key?: string | null;
|
|
737
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsListResults, ConversationsListErrors, ThrowOnError, 'data'>;
|
|
738
|
+
/**
|
|
739
|
+
* Create Text Conversation
|
|
740
|
+
*
|
|
741
|
+
* Open a text conversation with a published text agent.
|
|
742
|
+
*
|
|
743
|
+
* `contact_key` is your own stable id for the person you are talking to —
|
|
744
|
+
* unique in the workspace, and how you reach them again. `userdata` seeds what
|
|
745
|
+
* the agent knows about them, readable as `{{userdata.field}}` from the
|
|
746
|
+
* agent's tools.
|
|
747
|
+
*
|
|
748
|
+
* Creating the conversation does not send anything; call `create_text_message`
|
|
749
|
+
* to say something.
|
|
750
|
+
*/
|
|
751
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
752
|
+
createTextConversationRequest: CreateTextConversationRequest;
|
|
753
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsCreateResults, ConversationsCreateErrors, ThrowOnError, 'data'>;
|
|
754
|
+
/**
|
|
755
|
+
* Get Conversation
|
|
756
|
+
*
|
|
757
|
+
* Read one conversation's header: agent, surface, summary and userdata.
|
|
758
|
+
*
|
|
759
|
+
* `userdata` is what the agent knows about the *contact* — what its tools
|
|
760
|
+
* published to the `userdata` store, across every conversation with them. For
|
|
761
|
+
* what one call ended up knowing, read a session's own `userdata` from
|
|
762
|
+
* `list_conversation_sessions`. The messages are in `list_conversation_items`.
|
|
763
|
+
*/
|
|
764
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
765
|
+
conversation_id: string;
|
|
766
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsGetResults, ConversationsGetErrors, ThrowOnError, 'data'>;
|
|
767
|
+
/**
|
|
768
|
+
* Patch Conversation
|
|
769
|
+
*
|
|
770
|
+
* Edit a conversation's summary, userdata or metadata.
|
|
771
|
+
*
|
|
772
|
+
* Writing `userdata` changes what the agent sees as `{{userdata.field}}` on the
|
|
773
|
+
* next turn — the way to correct or preload what it knows from outside a call.
|
|
774
|
+
* It belongs to the *contact*, so it reaches every conversation with them, not
|
|
775
|
+
* just this one. Each field you send replaces that whole object; omitted fields
|
|
776
|
+
* are left alone.
|
|
777
|
+
*/
|
|
778
|
+
update<ThrowOnError extends boolean = false>(parameters: {
|
|
779
|
+
conversation_id: string;
|
|
780
|
+
patchConversationRequest: PatchConversationRequest;
|
|
781
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsUpdateResults, ConversationsUpdateErrors, ThrowOnError, 'data'>;
|
|
782
|
+
/**
|
|
783
|
+
* Conversation Event Stream
|
|
784
|
+
*
|
|
785
|
+
* Watch one conversation happen: a snapshot, then every item and turn live.
|
|
786
|
+
*
|
|
787
|
+
* Frames: `conversation.snapshot` (the conversation and its items, sent first
|
|
788
|
+
* and on every reconnect), `item.created`, `item.delivery_updated`, `turn` and
|
|
789
|
+
* `turn.failed` (turn lifecycle), and `assistant.started` / `assistant.delta`
|
|
790
|
+
* / `assistant.completed` for the reply as it is generated.
|
|
791
|
+
*
|
|
792
|
+
* Nothing here is canonical — a dropped frame is recovered by reconnecting
|
|
793
|
+
* (the snapshot re-syncs) or by `list_conversation_items`.
|
|
794
|
+
*/
|
|
795
|
+
events<ThrowOnError extends boolean = false>(parameters: {
|
|
796
|
+
conversation_id: string;
|
|
797
|
+
}, options?: Options<never, ThrowOnError, ConversationsEventsResult>): Promise<ServerSentEventsResult<ConversationsEventsResults>>;
|
|
798
|
+
/**
|
|
799
|
+
* Get Conversation Snapshot
|
|
800
|
+
*
|
|
801
|
+
* Did this conversation go well? One verdict over the whole thread.
|
|
802
|
+
*
|
|
803
|
+
* `issues` names every problem found across every session in the thread —
|
|
804
|
+
* errors, failed tools, slow responses, a bad connection — and `ok` is true
|
|
805
|
+
* when there were none. Cost and duration sum across sessions; latency and
|
|
806
|
+
* tooling come from the merged timeline.
|
|
807
|
+
*/
|
|
808
|
+
snapshot<ThrowOnError extends boolean = false>(parameters: {
|
|
809
|
+
conversation_id: string;
|
|
810
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ConversationsSnapshotResults, ConversationsSnapshotErrors, ThrowOnError, 'data'>;
|
|
811
|
+
private _messages?;
|
|
812
|
+
get messages(): Messages;
|
|
813
|
+
private _items?;
|
|
814
|
+
get items(): Items;
|
|
815
|
+
private _sessions?;
|
|
816
|
+
get sessions(): Sessions;
|
|
817
|
+
}
|
|
818
|
+
export declare class Agents2 extends HeyApiClient {
|
|
819
|
+
/**
|
|
820
|
+
* Agent Copilot Send Message
|
|
821
|
+
*
|
|
822
|
+
* Say something to AgentCoPilot. The reply arrives on the stream, not here.
|
|
823
|
+
*
|
|
824
|
+
* Returns as soon as the turn is queued; watch `turn` and `message` frames
|
|
825
|
+
* on the matching `/stream` for what it does.
|
|
826
|
+
*/
|
|
827
|
+
send<ThrowOnError extends boolean = false>(parameters: {
|
|
828
|
+
agent_id: string;
|
|
829
|
+
sendMessageRequest: SendMessageRequest;
|
|
830
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CopilotAgentsSendResults, CopilotAgentsSendErrors, ThrowOnError, 'data'>;
|
|
831
|
+
/**
|
|
832
|
+
* Agent Copilot Stream
|
|
833
|
+
*
|
|
834
|
+
* AgentCoPilot's conversation for one agent, as its editor rail shows it.
|
|
835
|
+
*
|
|
836
|
+
* Frames: `snapshot` (the whole conversation, sent first and on every
|
|
837
|
+
* reconnect), `message` (one new message), `turn` (that turn's lifecycle —
|
|
838
|
+
* `running`, `done`, `error`, `canceled`).
|
|
839
|
+
*/
|
|
840
|
+
stream<ThrowOnError extends boolean = false>(parameters: {
|
|
841
|
+
agent_id: string;
|
|
842
|
+
}, options?: Options<never, ThrowOnError, CopilotAgentsStreamResult>): Promise<ServerSentEventsResult<CopilotAgentsStreamResults>>;
|
|
843
|
+
}
|
|
844
|
+
export declare class Knowledge extends HeyApiClient {
|
|
845
|
+
/**
|
|
846
|
+
* Knowledge Copilot Send Message
|
|
847
|
+
*
|
|
848
|
+
* Say something to KnowledgeCoPilot. The reply arrives on the stream, not here.
|
|
849
|
+
*
|
|
850
|
+
* Returns as soon as the turn is queued; watch `turn` and `message` frames
|
|
851
|
+
* on the matching `/stream` for what it does.
|
|
852
|
+
*/
|
|
853
|
+
send<ThrowOnError extends boolean = false>(parameters: {
|
|
854
|
+
kb_id: string;
|
|
855
|
+
sendMessageRequest: SendMessageRequest;
|
|
856
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CopilotKnowledgeSendResults, CopilotKnowledgeSendErrors, ThrowOnError, 'data'>;
|
|
857
|
+
/**
|
|
858
|
+
* Knowledge Copilot Stream
|
|
859
|
+
*
|
|
860
|
+
* KnowledgeCoPilot's curation chat for one knowledge base.
|
|
861
|
+
*
|
|
862
|
+
* Frames: `snapshot` (the whole conversation, sent first and on every
|
|
863
|
+
* reconnect), `message` (one new message), `turn` (that turn's lifecycle —
|
|
864
|
+
* `running`, `done`, `error`, `canceled`).
|
|
865
|
+
*/
|
|
866
|
+
stream<ThrowOnError extends boolean = false>(parameters: {
|
|
867
|
+
kb_id: string;
|
|
868
|
+
}, options?: Options<never, ThrowOnError, CopilotKnowledgeStreamResult>): Promise<ServerSentEventsResult<CopilotKnowledgeStreamResults>>;
|
|
869
|
+
}
|
|
870
|
+
export declare class Tasks extends HeyApiClient {
|
|
871
|
+
/**
|
|
872
|
+
* Task Copilot Send Message
|
|
873
|
+
*
|
|
874
|
+
* Say something to TaskCoPilot. The reply arrives on the stream, not here.
|
|
875
|
+
*
|
|
876
|
+
* Returns as soon as the turn is queued; watch `turn` and `message` frames
|
|
877
|
+
* on the matching `/stream` for what it does.
|
|
878
|
+
*/
|
|
879
|
+
send<ThrowOnError extends boolean = false>(parameters: {
|
|
880
|
+
task_id: string;
|
|
881
|
+
sendMessageRequest: SendMessageRequest;
|
|
882
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CopilotTasksSendResults, CopilotTasksSendErrors, ThrowOnError, 'data'>;
|
|
883
|
+
/**
|
|
884
|
+
* Task Copilot Stream
|
|
885
|
+
*
|
|
886
|
+
* TaskCoPilot's conversation for one agent task, as its editor rail shows it.
|
|
887
|
+
*
|
|
888
|
+
* Frames: `snapshot` (the whole conversation, sent first and on every
|
|
889
|
+
* reconnect), `message` (one new message), `turn` (that turn's lifecycle —
|
|
890
|
+
* `running`, `done`, `error`, `canceled`).
|
|
891
|
+
*/
|
|
892
|
+
stream<ThrowOnError extends boolean = false>(parameters: {
|
|
893
|
+
task_id: string;
|
|
894
|
+
}, options?: Options<never, ThrowOnError, CopilotTasksStreamResult>): Promise<ServerSentEventsResult<CopilotTasksStreamResults>>;
|
|
895
|
+
}
|
|
896
|
+
export declare class Tools extends HeyApiClient {
|
|
897
|
+
/**
|
|
898
|
+
* Tool Copilot Send Message
|
|
899
|
+
*
|
|
900
|
+
* Say something to ToolCoPilot. The reply arrives on the stream, not here.
|
|
901
|
+
*
|
|
902
|
+
* Returns as soon as the turn is queued; watch `turn` and `message` frames
|
|
903
|
+
* on the matching `/stream` for what it does.
|
|
904
|
+
*/
|
|
905
|
+
send<ThrowOnError extends boolean = false>(parameters: {
|
|
906
|
+
tool_id: string;
|
|
907
|
+
sendMessageRequest: SendMessageRequest;
|
|
908
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<CopilotToolsSendResults, CopilotToolsSendErrors, ThrowOnError, 'data'>;
|
|
909
|
+
/**
|
|
910
|
+
* Tool Copilot Stream
|
|
911
|
+
*
|
|
912
|
+
* ToolCoPilot's conversation for one tool, as its editor rail shows it.
|
|
913
|
+
*
|
|
914
|
+
* Frames: `snapshot` (the whole conversation, sent first and on every
|
|
915
|
+
* reconnect), `message` (one new message), `turn` (that turn's lifecycle —
|
|
916
|
+
* `running`, `done`, `error`, `canceled`).
|
|
917
|
+
*/
|
|
918
|
+
stream<ThrowOnError extends boolean = false>(parameters: {
|
|
919
|
+
tool_id: string;
|
|
920
|
+
}, options?: Options<never, ThrowOnError, CopilotToolsStreamResult>): Promise<ServerSentEventsResult<CopilotToolsStreamResults>>;
|
|
921
|
+
}
|
|
922
|
+
export declare class Copilot extends HeyApiClient {
|
|
923
|
+
private _agents?;
|
|
924
|
+
get agents(): Agents2;
|
|
925
|
+
private _knowledge?;
|
|
926
|
+
get knowledge(): Knowledge;
|
|
927
|
+
private _tasks?;
|
|
928
|
+
get tasks(): Tasks;
|
|
929
|
+
private _tools?;
|
|
930
|
+
get tools(): Tools;
|
|
931
|
+
}
|
|
932
|
+
export declare class Recipients2 extends HeyApiClient {
|
|
933
|
+
/**
|
|
934
|
+
* List Email Batch Recipients
|
|
935
|
+
*
|
|
936
|
+
* One batch's rows, in the order they were uploaded.
|
|
937
|
+
*
|
|
938
|
+
* Each row carries `columns` — the merged space of what you uploaded, what the
|
|
939
|
+
* task produced and what a person edited, in that precedence — plus the three
|
|
940
|
+
* halves separately, so an edited cell can be told from the model's own value.
|
|
941
|
+
* `not_ready_reason` is why this row cannot be sent yet, and is null when it
|
|
942
|
+
* can be.
|
|
943
|
+
*/
|
|
944
|
+
list<ThrowOnError extends boolean = false>(parameters: {
|
|
945
|
+
batch_id: string;
|
|
946
|
+
limit?: number;
|
|
947
|
+
offset?: number;
|
|
948
|
+
status?: string | null;
|
|
949
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsListResults, EmailBatchesRecipientsListErrors, ThrowOnError, 'data'>;
|
|
950
|
+
/**
|
|
951
|
+
* Patch Email Batch Recipient
|
|
952
|
+
*
|
|
953
|
+
* Edit cells on one row before it is sent.
|
|
954
|
+
*
|
|
955
|
+
* `overrides` is merged over the uploaded and generated values at send time and
|
|
956
|
+
* stored apart from both, so what the model wrote stays readable underneath.
|
|
957
|
+
* Sending an empty value clears that edit rather than sending an empty field —
|
|
958
|
+
* the way to send nothing is to skip the row. A row that has already been
|
|
959
|
+
* queued or sent can no longer be edited.
|
|
960
|
+
*/
|
|
961
|
+
update<ThrowOnError extends boolean = false>(parameters: {
|
|
962
|
+
batch_id: string;
|
|
963
|
+
recipient_id: string;
|
|
964
|
+
patchEmailRecipientRequest: PatchEmailRecipientRequest;
|
|
965
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsUpdateResults, EmailBatchesRecipientsUpdateErrors, ThrowOnError, 'data'>;
|
|
966
|
+
/**
|
|
967
|
+
* Restore Email Batch Recipients
|
|
968
|
+
*
|
|
969
|
+
* Put skipped rows back. `selection: "all_eligible"` means every skipped row.
|
|
970
|
+
*/
|
|
971
|
+
restore<ThrowOnError extends boolean = false>(parameters: {
|
|
972
|
+
batch_id: string;
|
|
973
|
+
selectRecipientsRequest: SelectRecipientsRequest;
|
|
974
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsRestoreResults, EmailBatchesRecipientsRestoreErrors, ThrowOnError, 'data'>;
|
|
975
|
+
/**
|
|
976
|
+
* Retry Email Batch Recipients
|
|
977
|
+
*
|
|
978
|
+
* Draft rows whose first attempt failed, again.
|
|
979
|
+
*
|
|
980
|
+
* `selection: "all_eligible"` means every row whose drafting failed. This is
|
|
981
|
+
* the one action that revives a batch that has already finished drafting: it
|
|
982
|
+
* goes back to `drafting` and picks up exactly the rows you retried — the
|
|
983
|
+
* alternative would be telling you that twelve failed rows are unrecoverable
|
|
984
|
+
* because the other 4 988 finished first.
|
|
985
|
+
*/
|
|
986
|
+
retry<ThrowOnError extends boolean = false>(parameters: {
|
|
987
|
+
batch_id: string;
|
|
988
|
+
selectRecipientsRequest: SelectRecipientsRequest;
|
|
989
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsRetryResults, EmailBatchesRecipientsRetryErrors, ThrowOnError, 'data'>;
|
|
990
|
+
/**
|
|
991
|
+
* Send Email Batch Recipients
|
|
992
|
+
*
|
|
993
|
+
* Send the rows you name. **This mails real people and cannot be undone.**
|
|
994
|
+
*
|
|
995
|
+
* At most 50 rows per call, named one by one — there is no "select all" and no
|
|
996
|
+
* bulk form of this. A row whose `to`, `subject` or `body` does not resolve
|
|
997
|
+
* comes back in `rejected` and stays a draft; fix it with
|
|
998
|
+
* `patch_email_batch_recipient` and try again.
|
|
999
|
+
*
|
|
1000
|
+
* `from_email`, `from_name` and `reply_to` override the sender for this call
|
|
1001
|
+
* only, and must be on a domain verified on the same Resend account.
|
|
1002
|
+
*/
|
|
1003
|
+
send<ThrowOnError extends boolean = false>(parameters: {
|
|
1004
|
+
batch_id: string;
|
|
1005
|
+
sendEmailBatchRequest: SendEmailBatchRequest;
|
|
1006
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsSendResults, EmailBatchesRecipientsSendErrors, ThrowOnError, 'data'>;
|
|
1007
|
+
/**
|
|
1008
|
+
* Skip Email Batch Recipients
|
|
1009
|
+
*
|
|
1010
|
+
* Take drafted rows out of consideration. Reversible with `restore`.
|
|
1011
|
+
*
|
|
1012
|
+
* Takes either `recipient_ids` or `selection: "all_eligible"`, which here means
|
|
1013
|
+
* every row that has a draft. The reversible verbs keep that shorthand while
|
|
1014
|
+
* `send` does not, because the rule is about irreversibility rather than bulk.
|
|
1015
|
+
*/
|
|
1016
|
+
skip<ThrowOnError extends boolean = false>(parameters: {
|
|
1017
|
+
batch_id: string;
|
|
1018
|
+
selectRecipientsRequest: SelectRecipientsRequest;
|
|
1019
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesRecipientsSkipResults, EmailBatchesRecipientsSkipErrors, ThrowOnError, 'data'>;
|
|
1020
|
+
}
|
|
1021
|
+
export declare class Batches2 extends HeyApiClient {
|
|
1022
|
+
/**
|
|
1023
|
+
* List Email Batches
|
|
1024
|
+
*
|
|
1025
|
+
* List email batches, newest first.
|
|
1026
|
+
*
|
|
1027
|
+
* `status` is about **drafting** and nothing else: `scheduled`, `drafting`,
|
|
1028
|
+
* `paused`, `drafted`, `canceled`, `failed`. A `drafted` batch is one whose
|
|
1029
|
+
* drafts are ready to review — it says nothing about how many have been sent,
|
|
1030
|
+
* which is what `counts` is for.
|
|
1031
|
+
*/
|
|
1032
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1033
|
+
limit?: number;
|
|
1034
|
+
offset?: number;
|
|
1035
|
+
status?: string | null;
|
|
1036
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesListResults, EmailBatchesListErrors, ThrowOnError, 'data'>;
|
|
1037
|
+
/**
|
|
1038
|
+
* Create Email Batch
|
|
1039
|
+
*
|
|
1040
|
+
* Create an email batch: a list, an agent task that drafts each row, and a
|
|
1041
|
+
* connected Resend account to send from.
|
|
1042
|
+
*
|
|
1043
|
+
* **Read your provider's terms first.** Resend's Acceptable Use Policy
|
|
1044
|
+
* prohibits unsolicited mail of any kind — cold outreach, purchased lists,
|
|
1045
|
+
* scraped contacts — and this runs on your account under your agreement.
|
|
1046
|
+
*
|
|
1047
|
+
* **Nothing is sent that a person has not selected.** Creating a batch only
|
|
1048
|
+
* starts drafting; sending is a separate call over at most 50 named rows.
|
|
1049
|
+
*
|
|
1050
|
+
* **Every row runs your task as it stands right now** — a task has no
|
|
1051
|
+
* versions, so editing it mid-batch changes every row drafted after that.
|
|
1052
|
+
*
|
|
1053
|
+
* `field_map` points `to`, `subject` and `body` at a column of your list or at
|
|
1054
|
+
* a field the task produces. An invalid batch is a 400 listing every problem.
|
|
1055
|
+
*
|
|
1056
|
+
* There is no spend cap: every row runs the task and is billed, so a 5 000-row
|
|
1057
|
+
* batch doing research costs 5 000 task runs whether or not anything is sent.
|
|
1058
|
+
*/
|
|
1059
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
1060
|
+
createEmailBatchRequest: CreateEmailBatchRequest;
|
|
1061
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesCreateResults, EmailBatchesCreateErrors, ThrowOnError, 'data'>;
|
|
1062
|
+
/**
|
|
1063
|
+
* Get Email Batch
|
|
1064
|
+
*
|
|
1065
|
+
* One batch: its policy, its per-status counts, what drafting has cost so
|
|
1066
|
+
* far, and — while it is waiting on a start time or a closed window —
|
|
1067
|
+
* `next_draft_at`.
|
|
1068
|
+
*/
|
|
1069
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
1070
|
+
batch_id: string;
|
|
1071
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesGetResults, EmailBatchesGetErrors, ThrowOnError, 'data'>;
|
|
1072
|
+
/**
|
|
1073
|
+
* Patch Email Batch
|
|
1074
|
+
*
|
|
1075
|
+
* Edit a batch's policy. The next drafting pass reads the new row.
|
|
1076
|
+
*
|
|
1077
|
+
* Pacing and the calling window are editable at any time. The sender, the body
|
|
1078
|
+
* format and the field map freeze once the batch has sent anything — changing
|
|
1079
|
+
* them then would make the rows already delivered no longer describe what they
|
|
1080
|
+
* were sent as. `start_at` moves only while the batch is still scheduled.
|
|
1081
|
+
*/
|
|
1082
|
+
update<ThrowOnError extends boolean = false>(parameters: {
|
|
1083
|
+
batch_id: string;
|
|
1084
|
+
patchEmailBatchRequest: PatchEmailBatchRequest;
|
|
1085
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesUpdateResults, EmailBatchesUpdateErrors, ThrowOnError, 'data'>;
|
|
1086
|
+
/**
|
|
1087
|
+
* Cancel Email Batch
|
|
1088
|
+
*
|
|
1089
|
+
* Stop drafting for good. This is the only terminal action — a batch cannot
|
|
1090
|
+
* be deleted, because it is the record of what was sent to whom.
|
|
1091
|
+
*
|
|
1092
|
+
* Rows already drafted are **not** touched: cancelling stops drafting, and
|
|
1093
|
+
* drafts already produced are still worth reviewing and sending. Rows never
|
|
1094
|
+
* reached report as `canceled`.
|
|
1095
|
+
*/
|
|
1096
|
+
cancel<ThrowOnError extends boolean = false>(parameters: {
|
|
1097
|
+
batch_id: string;
|
|
1098
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesCancelResults, EmailBatchesCancelErrors, ThrowOnError, 'data'>;
|
|
1099
|
+
/**
|
|
1100
|
+
* Pause Email Batch
|
|
1101
|
+
*
|
|
1102
|
+
* Stop drafting new rows. Runs already in flight finish.
|
|
1103
|
+
*
|
|
1104
|
+
* A paused batch has nothing scheduled at all until you resume it. Drafts
|
|
1105
|
+
* already produced stay reviewable and sendable.
|
|
1106
|
+
*/
|
|
1107
|
+
pause<ThrowOnError extends boolean = false>(parameters: {
|
|
1108
|
+
batch_id: string;
|
|
1109
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesPauseResults, EmailBatchesPauseErrors, ThrowOnError, 'data'>;
|
|
1110
|
+
/**
|
|
1111
|
+
* Resume Email Batch
|
|
1112
|
+
*
|
|
1113
|
+
* Undo a pause and start drafting again from where it stopped.
|
|
1114
|
+
*/
|
|
1115
|
+
resume<ThrowOnError extends boolean = false>(parameters: {
|
|
1116
|
+
batch_id: string;
|
|
1117
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailBatchesResumeResults, EmailBatchesResumeErrors, ThrowOnError, 'data'>;
|
|
1118
|
+
private _recipients?;
|
|
1119
|
+
get recipients(): Recipients2;
|
|
1120
|
+
}
|
|
1121
|
+
export declare class Senders extends HeyApiClient {
|
|
1122
|
+
/**
|
|
1123
|
+
* List Email Senders
|
|
1124
|
+
*
|
|
1125
|
+
* The domains a connected email account may send from, right now.
|
|
1126
|
+
*
|
|
1127
|
+
* Domains rather than addresses, because that is what Resend verifies: any
|
|
1128
|
+
* local part on a verified domain sends. Read live off the account, and this
|
|
1129
|
+
* is what a `from_email` is checked against — both the batch's default and a
|
|
1130
|
+
* per-send override.
|
|
1131
|
+
*/
|
|
1132
|
+
list<ThrowOnError extends boolean = false>(parameters: {
|
|
1133
|
+
integration_id: string;
|
|
1134
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<EmailSendersListResults, EmailSendersListErrors, ThrowOnError, 'data'>;
|
|
1135
|
+
}
|
|
1136
|
+
export declare class Email extends HeyApiClient {
|
|
1137
|
+
private _batches?;
|
|
1138
|
+
get batches(): Batches2;
|
|
1139
|
+
private _senders?;
|
|
1140
|
+
get senders(): Senders;
|
|
1141
|
+
}
|
|
1142
|
+
export declare class McpTools extends HeyApiClient {
|
|
1143
|
+
/**
|
|
1144
|
+
* List Integration Mcp Tools
|
|
1145
|
+
*
|
|
1146
|
+
* Connect to the integration's MCP server and list every tool it offers.
|
|
1147
|
+
*
|
|
1148
|
+
* A live call to the provider, so it also proves the connection works. The
|
|
1149
|
+
* list is unfiltered — it is what tool approval is chosen from. Which of these
|
|
1150
|
+
* an attached agent can actually call is the integration's `allowed_tools`
|
|
1151
|
+
* (null there means all of them). Fails if the integration is not active or
|
|
1152
|
+
* the server is unreachable.
|
|
1153
|
+
*/
|
|
1154
|
+
list<ThrowOnError extends boolean = false>(parameters: {
|
|
1155
|
+
integration_id: string;
|
|
1156
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<IntegrationsMcpToolsListResults, IntegrationsMcpToolsListErrors, ThrowOnError, 'data'>;
|
|
1157
|
+
}
|
|
1158
|
+
export declare class Triggers extends HeyApiClient {
|
|
1159
|
+
/**
|
|
1160
|
+
* List Integration Triggers
|
|
1161
|
+
*
|
|
1162
|
+
* List the trigger deployments under an integration.
|
|
1163
|
+
*
|
|
1164
|
+
* A trigger binds an inbound provider event — a Telegram message — to a
|
|
1165
|
+
* published agent version.
|
|
1166
|
+
*/
|
|
1167
|
+
list<ThrowOnError extends boolean = false>(parameters: {
|
|
1168
|
+
integration_id: string;
|
|
1169
|
+
limit?: number;
|
|
1170
|
+
offset?: number;
|
|
1171
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<IntegrationsTriggersListResults, IntegrationsTriggersListErrors, ThrowOnError, 'data'>;
|
|
1172
|
+
/**
|
|
1173
|
+
* Create Integration Trigger
|
|
1174
|
+
*
|
|
1175
|
+
* Deploy an agent to an inbound provider event.
|
|
1176
|
+
*
|
|
1177
|
+
* `reply_mode` decides what happens with the agent's answer: `public_reply`
|
|
1178
|
+
* sends it to the customer, `internal_note` posts it privately where the
|
|
1179
|
+
* provider supports that, `none` generates without sending.
|
|
1180
|
+
*
|
|
1181
|
+
* Enabling validates that the integration is active and the assigned agent is
|
|
1182
|
+
* a published text agent, so create disabled while still wiring things up.
|
|
1183
|
+
*/
|
|
1184
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
1185
|
+
integration_id: string;
|
|
1186
|
+
createIntegrationTriggerRequest: CreateIntegrationTriggerRequest;
|
|
1187
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<IntegrationsTriggersCreateResults, IntegrationsTriggersCreateErrors, ThrowOnError, 'data'>;
|
|
1188
|
+
/**
|
|
1189
|
+
* Delete Integration Trigger
|
|
1190
|
+
*
|
|
1191
|
+
* Delete a trigger permanently. The agent stops receiving that event.
|
|
1192
|
+
*/
|
|
1193
|
+
delete<ThrowOnError extends boolean = false>(parameters: {
|
|
1194
|
+
integration_id: string;
|
|
1195
|
+
trigger_id: string;
|
|
1196
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<IntegrationsTriggersDeleteResults, IntegrationsTriggersDeleteErrors, ThrowOnError, 'data'>;
|
|
1197
|
+
/**
|
|
1198
|
+
* Patch Integration Trigger
|
|
1199
|
+
*
|
|
1200
|
+
* Update a trigger: reassign the agent, change reply mode, enable or
|
|
1201
|
+
* disable it. Omitted fields are left unchanged. The same checks as creation
|
|
1202
|
+
* run when enabling.
|
|
1203
|
+
*/
|
|
1204
|
+
update<ThrowOnError extends boolean = false>(parameters: {
|
|
1205
|
+
integration_id: string;
|
|
1206
|
+
trigger_id: string;
|
|
1207
|
+
patchIntegrationTriggerRequest: PatchIntegrationTriggerRequest;
|
|
1208
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<IntegrationsTriggersUpdateResults, IntegrationsTriggersUpdateErrors, ThrowOnError, 'data'>;
|
|
1209
|
+
}
|
|
1210
|
+
export declare class Integrations extends HeyApiClient {
|
|
1211
|
+
/**
|
|
1212
|
+
* List Integrations
|
|
1213
|
+
*
|
|
1214
|
+
* List the workspace's integrations with their provider, status and config.
|
|
1215
|
+
*
|
|
1216
|
+
* Secret values are never returned — credential fields come back as
|
|
1217
|
+
* `{{secrets.NAME}}` references.
|
|
1218
|
+
*/
|
|
1219
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1220
|
+
limit?: number;
|
|
1221
|
+
offset?: number;
|
|
1222
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<IntegrationsListResults, IntegrationsListErrors, ThrowOnError, 'data'>;
|
|
1223
|
+
/**
|
|
1224
|
+
* Create Integration
|
|
1225
|
+
*
|
|
1226
|
+
* Create a manual integration, fully configured.
|
|
1227
|
+
*
|
|
1228
|
+
* Which of `credentials_ref`, `provider_account_info`, `mcp_config` and
|
|
1229
|
+
* `webhook_config` a provider needs is described by its `setup_fields` in the
|
|
1230
|
+
* integration catalog. Secret-bearing fields take a plaintext value — stored
|
|
1231
|
+
* as a workspace secret — or an existing `{{secrets.NAME}}` reference.
|
|
1232
|
+
*
|
|
1233
|
+
* Leave `allowed_tools` unset to expose every tool the server lists. OAuth
|
|
1234
|
+
* providers are connected from the dashboard instead.
|
|
1235
|
+
*/
|
|
1236
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
1237
|
+
createIntegrationRequest: CreateIntegrationRequest;
|
|
1238
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<IntegrationsCreateResults, IntegrationsCreateErrors, ThrowOnError, 'data'>;
|
|
1239
|
+
/**
|
|
1240
|
+
* Integration Catalog
|
|
1241
|
+
*
|
|
1242
|
+
* List the providers that can be integrated, and how to connect each one.
|
|
1243
|
+
*
|
|
1244
|
+
* `auth_type` says which path a provider takes: `manual` through this API,
|
|
1245
|
+
* `oauth` from the dashboard. `setup_fields` is the authoritative list of what
|
|
1246
|
+
* each manual provider requires — read it rather than guessing. `capabilities`
|
|
1247
|
+
* says whether it serves tools (MCP) or a messaging channel (triggers).
|
|
1248
|
+
*/
|
|
1249
|
+
catalog<ThrowOnError extends boolean = false>(parameters?: {
|
|
1250
|
+
limit?: number;
|
|
1251
|
+
offset?: number;
|
|
1252
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<IntegrationsCatalogResults, IntegrationsCatalogErrors, ThrowOnError, 'data'>;
|
|
1253
|
+
/**
|
|
1254
|
+
* Delete Integration
|
|
1255
|
+
*
|
|
1256
|
+
* Delete an integration and its triggers permanently.
|
|
1257
|
+
*/
|
|
1258
|
+
delete<ThrowOnError extends boolean = false>(parameters: {
|
|
1259
|
+
integration_id: string;
|
|
1260
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<IntegrationsDeleteResults, IntegrationsDeleteErrors, ThrowOnError, 'data'>;
|
|
1261
|
+
/**
|
|
1262
|
+
* Get Integration
|
|
1263
|
+
*
|
|
1264
|
+
* Fetch one integration: provider, status, structured config, trigger
|
|
1265
|
+
* capabilities and inbound webhook setup state.
|
|
1266
|
+
*/
|
|
1267
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
1268
|
+
integration_id: string;
|
|
1269
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<IntegrationsGetResults, IntegrationsGetErrors, ThrowOnError, 'data'>;
|
|
1270
|
+
/**
|
|
1271
|
+
* Patch Integration
|
|
1272
|
+
*
|
|
1273
|
+
* Update an integration. Omitted fields are left unchanged.
|
|
1274
|
+
*
|
|
1275
|
+
* Sending `credentials_ref` rotates the credential. Only `active` integrations
|
|
1276
|
+
* can be attached to agents or serve triggers.
|
|
1277
|
+
*
|
|
1278
|
+
* `allowed_tools` replaces the approved list wholesale: exactly those tools
|
|
1279
|
+
* become callable by every agent this integration is attached to. It cannot be
|
|
1280
|
+
* emptied — an agent that should call nothing is an integration that should be
|
|
1281
|
+
* disabled.
|
|
1282
|
+
*/
|
|
1283
|
+
update<ThrowOnError extends boolean = false>(parameters: {
|
|
1284
|
+
integration_id: string;
|
|
1285
|
+
patchIntegrationRequest: PatchIntegrationRequest;
|
|
1286
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<IntegrationsUpdateResults, IntegrationsUpdateErrors, ThrowOnError, 'data'>;
|
|
1287
|
+
private _mcpTools?;
|
|
1288
|
+
get mcpTools(): McpTools;
|
|
1289
|
+
private _triggers?;
|
|
1290
|
+
get triggers(): Triggers;
|
|
1291
|
+
}
|
|
1292
|
+
export declare class Nodes extends HeyApiClient {
|
|
1293
|
+
/**
|
|
1294
|
+
* Delete Node
|
|
1295
|
+
*
|
|
1296
|
+
* Drop one entry from the table of contents, permanently.
|
|
1297
|
+
*
|
|
1298
|
+
* Its children go with it, and agents can no longer retrieve any of it.
|
|
1299
|
+
*/
|
|
1300
|
+
delete<ThrowOnError extends boolean = false>(parameters: {
|
|
1301
|
+
kb_id: string;
|
|
1302
|
+
node_id: string;
|
|
1303
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<KnowledgeNodesDeleteResults, KnowledgeNodesDeleteErrors, ThrowOnError, 'data'>;
|
|
1304
|
+
/**
|
|
1305
|
+
* Get Node
|
|
1306
|
+
*
|
|
1307
|
+
* Read one entry of the table of contents, with its full content.
|
|
1308
|
+
*
|
|
1309
|
+
* This is the text an agent retrieves when it fetches this node. `version` is
|
|
1310
|
+
* what `patch_node` needs for a safe edit.
|
|
1311
|
+
*/
|
|
1312
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
1313
|
+
kb_id: string;
|
|
1314
|
+
node_id: string;
|
|
1315
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<KnowledgeNodesGetResults, KnowledgeNodesGetErrors, ThrowOnError, 'data'>;
|
|
1316
|
+
/**
|
|
1317
|
+
* Patch Node
|
|
1318
|
+
*
|
|
1319
|
+
* Correct one entry's title, summary or content by hand — the way to fix a
|
|
1320
|
+
* fact the crawl got wrong without rebuilding.
|
|
1321
|
+
*
|
|
1322
|
+
* `title` and `summary` are what the agent sees in the table of contents and
|
|
1323
|
+
* decide whether it ever fetches this node, so keep them accurate.
|
|
1324
|
+
*
|
|
1325
|
+
* Send the `version` you read from `get_node`; a mismatch is rejected rather
|
|
1326
|
+
* than overwriting someone else's edit.
|
|
1327
|
+
*/
|
|
1328
|
+
update<ThrowOnError extends boolean = false>(parameters: {
|
|
1329
|
+
kb_id: string;
|
|
1330
|
+
node_id: string;
|
|
1331
|
+
patchNodeRequest: PatchNodeRequest;
|
|
1332
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<KnowledgeNodesUpdateResults, KnowledgeNodesUpdateErrors, ThrowOnError, 'data'>;
|
|
1333
|
+
}
|
|
1334
|
+
export declare class Pages extends HeyApiClient {
|
|
1335
|
+
/**
|
|
1336
|
+
* List Pages
|
|
1337
|
+
*
|
|
1338
|
+
* List the crawled pages and how each one transcribed.
|
|
1339
|
+
*
|
|
1340
|
+
* Where you look when a knowledge base is missing something: a page with a
|
|
1341
|
+
* non-`done` status and an `error` never made it in, and `content_len` of 0
|
|
1342
|
+
* means the URL yielded nothing worth indexing.
|
|
1343
|
+
*/
|
|
1344
|
+
list<ThrowOnError extends boolean = false>(parameters: {
|
|
1345
|
+
kb_id: string;
|
|
1346
|
+
limit?: number;
|
|
1347
|
+
offset?: number;
|
|
1348
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<KnowledgePagesListResults, KnowledgePagesListErrors, ThrowOnError, 'data'>;
|
|
1349
|
+
}
|
|
1350
|
+
export declare class Knowledge2 extends HeyApiClient {
|
|
1351
|
+
/**
|
|
1352
|
+
* List Kbs
|
|
1353
|
+
*
|
|
1354
|
+
* List the workspace's knowledge bases with their build status.
|
|
1355
|
+
*
|
|
1356
|
+
* A knowledge base gives an agent grounded answers over crawled content. Only
|
|
1357
|
+
* one with status `ready` can be attached to an agent, through the agent
|
|
1358
|
+
* config's `kb_ids`.
|
|
1359
|
+
*/
|
|
1360
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1361
|
+
limit?: number;
|
|
1362
|
+
offset?: number;
|
|
1363
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<KnowledgeListResults, KnowledgeListErrors, ThrowOnError, 'data'>;
|
|
1364
|
+
/**
|
|
1365
|
+
* Create Kb
|
|
1366
|
+
*
|
|
1367
|
+
* Start a knowledge base by crawling one or more websites.
|
|
1368
|
+
*
|
|
1369
|
+
* Returns immediately with `status: discovering` — crawling takes minutes.
|
|
1370
|
+
* Poll `get_kb` until `review`, then pass the URLs worth indexing to
|
|
1371
|
+
* `build_kb`. `max_pages` caps how many discovery may find (default 1000) and
|
|
1372
|
+
* `notes` guides how the content is transcribed and organized.
|
|
1373
|
+
*/
|
|
1374
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
1375
|
+
createKbRequest: CreateKBRequest;
|
|
1376
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<KnowledgeCreateResults, KnowledgeCreateErrors, ThrowOnError, 'data'>;
|
|
1377
|
+
/**
|
|
1378
|
+
* Delete Kb
|
|
1379
|
+
*
|
|
1380
|
+
* Delete a knowledge base and everything crawled into it, permanently.
|
|
1381
|
+
*
|
|
1382
|
+
* Rebuilding means crawling the site again. Agents that list it in `kb_ids`
|
|
1383
|
+
* lose those grounded answers, so detach it there first.
|
|
1384
|
+
*/
|
|
1385
|
+
delete<ThrowOnError extends boolean = false>(parameters: {
|
|
1386
|
+
kb_id: string;
|
|
1387
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<KnowledgeDeleteResults, KnowledgeDeleteErrors, ThrowOnError, 'data'>;
|
|
1388
|
+
/**
|
|
1389
|
+
* Get Kb
|
|
1390
|
+
*
|
|
1391
|
+
* Read one knowledge base: build status, progress and content tree.
|
|
1392
|
+
*
|
|
1393
|
+
* `status` walks `discovering` -> `review` -> `transcribing` -> `generating`
|
|
1394
|
+
* -> `ready`, with `error` set if it stopped. At `review`, `discovered` holds
|
|
1395
|
+
* the crawled URLs awaiting your selection; once ready, `tree` is the table of
|
|
1396
|
+
* contents. This is the endpoint to poll while a build runs.
|
|
1397
|
+
*/
|
|
1398
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
1399
|
+
kb_id: string;
|
|
1400
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<KnowledgeGetResults, KnowledgeGetErrors, ThrowOnError, 'data'>;
|
|
1401
|
+
/**
|
|
1402
|
+
* Build Kb
|
|
1403
|
+
*
|
|
1404
|
+
* Index the chosen pages, then write the table of contents.
|
|
1405
|
+
*
|
|
1406
|
+
* Call this once the knowledge base reaches `review`, passing the subset of
|
|
1407
|
+
* `discovered` URLs worth indexing — the KB is only as good as that choice.
|
|
1408
|
+
* Returns as soon as the work is queued; poll `get_kb` until `ready`, which is
|
|
1409
|
+
* when it can be attached to an agent.
|
|
1410
|
+
*/
|
|
1411
|
+
build<ThrowOnError extends boolean = false>(parameters: {
|
|
1412
|
+
kb_id: string;
|
|
1413
|
+
buildKbRequest: BuildKBRequest;
|
|
1414
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<KnowledgeBuildResults, KnowledgeBuildErrors, ThrowOnError, 'data'>;
|
|
1415
|
+
/**
|
|
1416
|
+
* Events
|
|
1417
|
+
*
|
|
1418
|
+
* Watch one knowledge base build: `snapshot` first, then `progress` and `status`.
|
|
1419
|
+
*
|
|
1420
|
+
* `progress` carries the per-stage counts, `status` the terminal verdict
|
|
1421
|
+
* (`ready`, or an `error`). The same state is readable at any time with
|
|
1422
|
+
* `get_kb`; this is the live view of it.
|
|
1423
|
+
*/
|
|
1424
|
+
events<ThrowOnError extends boolean = false>(parameters: {
|
|
1425
|
+
kb_id: string;
|
|
1426
|
+
}, options?: Options<never, ThrowOnError, KnowledgeEventsResult>): Promise<ServerSentEventsResult<KnowledgeEventsResults>>;
|
|
1427
|
+
/**
|
|
1428
|
+
* Get Kb Prompt
|
|
1429
|
+
*
|
|
1430
|
+
* The table of contents exactly as an agent using this KB is given it.
|
|
1431
|
+
*
|
|
1432
|
+
* Read it to judge what the agent can actually find — if a topic reads
|
|
1433
|
+
* vaguely here, the agent will not know to fetch it. `chars` is how much of
|
|
1434
|
+
* the agent's context this KB occupies.
|
|
1435
|
+
*/
|
|
1436
|
+
prompt<ThrowOnError extends boolean = false>(parameters: {
|
|
1437
|
+
kb_id: string;
|
|
1438
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<KnowledgePromptResults, KnowledgePromptErrors, ThrowOnError, 'data'>;
|
|
1439
|
+
/**
|
|
1440
|
+
* Regenerate Toc
|
|
1441
|
+
*
|
|
1442
|
+
* Rewrite the table of contents from the pages already indexed.
|
|
1443
|
+
*
|
|
1444
|
+
* The repair for a knowledge base whose structure came out wrong, or whose
|
|
1445
|
+
* build failed at the last stage: it re-runs only that stage, so the site is
|
|
1446
|
+
* not crawled or transcribed again.
|
|
1447
|
+
*/
|
|
1448
|
+
regenerateToc<ThrowOnError extends boolean = false>(parameters: {
|
|
1449
|
+
kb_id: string;
|
|
1450
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<KnowledgeRegenerateTocResults, KnowledgeRegenerateTocErrors, ThrowOnError, 'data'>;
|
|
1451
|
+
private _nodes?;
|
|
1452
|
+
get nodes(): Nodes;
|
|
1453
|
+
private _pages?;
|
|
1454
|
+
get pages(): Pages;
|
|
1455
|
+
}
|
|
1456
|
+
export declare class Tokens extends HeyApiClient {
|
|
1457
|
+
/**
|
|
1458
|
+
* Mcp Token
|
|
1459
|
+
*
|
|
1460
|
+
* This user's MCP token, in plaintext, with the API URL to pair it with.
|
|
1461
|
+
*
|
|
1462
|
+
* Unlike a token created by hand, this one can be read whenever it is needed:
|
|
1463
|
+
* the dashboard renders it into ready-to-paste MCP configuration for Claude
|
|
1464
|
+
* Code, Codex and Grok. The value is re-derived from the token's row, not
|
|
1465
|
+
* stored, and is the same string every time — so a configuration a user
|
|
1466
|
+
* already saved keeps working.
|
|
1467
|
+
*
|
|
1468
|
+
* It is always the caller's own token, never anyone else's, and is created on
|
|
1469
|
+
* the spot for a user who somehow has none. Delete it from the tokens list to
|
|
1470
|
+
* revoke it; the next call issues a new one, which rotates the credential.
|
|
1471
|
+
*/
|
|
1472
|
+
mcp<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<TokensMcpResults, TokensMcpErrors, ThrowOnError, 'data'>;
|
|
1473
|
+
/**
|
|
1474
|
+
* List Tokens
|
|
1475
|
+
*
|
|
1476
|
+
* List personal access tokens: your own, or every one in the organization
|
|
1477
|
+
* if you are an admin.
|
|
1478
|
+
*
|
|
1479
|
+
* Who holds which credential is organization-admin information, so an EDITOR
|
|
1480
|
+
* or VIEWER sees only what they created. Plaintext token values are never
|
|
1481
|
+
* returned. A token with `kind: mcp` was issued automatically for the
|
|
1482
|
+
* dashboard's MCP setup; the rest were created by hand.
|
|
1483
|
+
*/
|
|
1484
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1485
|
+
limit?: number;
|
|
1486
|
+
offset?: number;
|
|
1487
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TokensListResults, TokensListErrors, ThrowOnError, 'data'>;
|
|
1488
|
+
/**
|
|
1489
|
+
* Create Token
|
|
1490
|
+
*
|
|
1491
|
+
* Create a personal access token for driving this API without the dashboard.
|
|
1492
|
+
*
|
|
1493
|
+
* The token authenticates as its creator and acts with that user's live role,
|
|
1494
|
+
* so it can never do more than they can. It does not expire; deleting it is
|
|
1495
|
+
* the revocation. The plaintext value is returned once here and never again —
|
|
1496
|
+
* treat it like a password and do not echo it back into a conversation.
|
|
1497
|
+
*/
|
|
1498
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
1499
|
+
createTokenRequest: CreateTokenRequest;
|
|
1500
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TokensCreateResults, TokensCreateErrors, ThrowOnError, 'data'>;
|
|
1501
|
+
/**
|
|
1502
|
+
* Delete Token
|
|
1503
|
+
*
|
|
1504
|
+
* Revoke a token immediately and permanently.
|
|
1505
|
+
*
|
|
1506
|
+
* Owners can delete their own; organization admins can delete any in the
|
|
1507
|
+
* organization. Deleting an `mcp` token rotates it: the owner's next dashboard
|
|
1508
|
+
* visit issues a replacement, and anything still configured with the old one
|
|
1509
|
+
* stops working.
|
|
1510
|
+
*/
|
|
1511
|
+
delete<ThrowOnError extends boolean = false>(parameters: {
|
|
1512
|
+
token_id: string;
|
|
1513
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TokensDeleteResults, TokensDeleteErrors, ThrowOnError, 'data'>;
|
|
1514
|
+
}
|
|
1515
|
+
export declare class Observability extends HeyApiClient {
|
|
1516
|
+
/**
|
|
1517
|
+
* Get Observability
|
|
1518
|
+
*
|
|
1519
|
+
* Workspace analytics: volume, endings, recordings, response time and spend.
|
|
1520
|
+
* One snapshot of a date range, up to 7 days.
|
|
1521
|
+
*
|
|
1522
|
+
* `summary` is the range total, `daily` one row per day, and `volume` the same
|
|
1523
|
+
* days cut by dimension (agent, phone number, type, status, close reason,
|
|
1524
|
+
* recording, analysis, transfer) — each capped at eight series with the tail
|
|
1525
|
+
* rolled into `Other`. `latency` reports response time per model stage and
|
|
1526
|
+
* `cost` breaks the bill down by stage, provider and model.
|
|
1527
|
+
*
|
|
1528
|
+
* Narrow it with `agent_id` and `channel`; `timezone` decides day boundaries.
|
|
1529
|
+
*
|
|
1530
|
+
* Two traps. `latency.basis` is `per_turn` for voice and video and `per_call`
|
|
1531
|
+
* for text, so the two are never averaged into one number. And every rate is
|
|
1532
|
+
* over a subset — `success_rate` over `judged_sessions`, `cost` over
|
|
1533
|
+
* `priced_sessions`, latency over `measured_sessions`.
|
|
1534
|
+
*/
|
|
1535
|
+
get<ThrowOnError extends boolean = false>(parameters?: {
|
|
1536
|
+
start_date?: string | null;
|
|
1537
|
+
end_date?: string | null;
|
|
1538
|
+
timezone?: string;
|
|
1539
|
+
agent_id?: string | null;
|
|
1540
|
+
channel?: 'voice' | 'video' | 'text' | null;
|
|
1541
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ObservabilityGetResults, ObservabilityGetErrors, ThrowOnError, 'data'>;
|
|
1542
|
+
}
|
|
1543
|
+
export declare class Invites extends HeyApiClient {
|
|
1544
|
+
/**
|
|
1545
|
+
* List Invites
|
|
1546
|
+
*
|
|
1547
|
+
* Invites waiting on a first login. Accepted and revoked ones drop off the
|
|
1548
|
+
* list — an accepted invite is a member, and belongs on the roster instead.
|
|
1549
|
+
*/
|
|
1550
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1551
|
+
limit?: number;
|
|
1552
|
+
offset?: number;
|
|
1553
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<OrgsInvitesListResults, OrgsInvitesListErrors, ThrowOnError, 'data'>;
|
|
1554
|
+
/**
|
|
1555
|
+
* Create Invite
|
|
1556
|
+
*
|
|
1557
|
+
* Invite an email address into this organization with a role.
|
|
1558
|
+
*
|
|
1559
|
+
* There is no invite link and no accept step: the invite is keyed to a Google
|
|
1560
|
+
* identity, so signing in with that address *is* the check. Someone who
|
|
1561
|
+
* already has an account joins immediately; anyone else joins the first time
|
|
1562
|
+
* they sign in.
|
|
1563
|
+
*
|
|
1564
|
+
* No email is sent at MVP, so an existing user finds out by seeing the
|
|
1565
|
+
* organization appear in their switcher — tell them yourself.
|
|
1566
|
+
*/
|
|
1567
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
1568
|
+
inviteRequest: InviteRequest;
|
|
1569
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<OrgsInvitesCreateResults, OrgsInvitesCreateErrors, ThrowOnError, 'data'>;
|
|
1570
|
+
/**
|
|
1571
|
+
* Revoke Invite
|
|
1572
|
+
*
|
|
1573
|
+
* Withdraw a pending invite, so signing in with that address no longer
|
|
1574
|
+
* joins this organization.
|
|
1575
|
+
*/
|
|
1576
|
+
revoke<ThrowOnError extends boolean = false>(parameters: {
|
|
1577
|
+
invite_id: string;
|
|
1578
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<OrgsInvitesRevokeResults, OrgsInvitesRevokeErrors, ThrowOnError, 'data'>;
|
|
1579
|
+
}
|
|
1580
|
+
export declare class Members extends HeyApiClient {
|
|
1581
|
+
/**
|
|
1582
|
+
* List Members
|
|
1583
|
+
*
|
|
1584
|
+
* Every member sees the roster; only an ADMIN can change it.
|
|
1585
|
+
*/
|
|
1586
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1587
|
+
limit?: number;
|
|
1588
|
+
offset?: number;
|
|
1589
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<OrgsMembersListResults, OrgsMembersListErrors, ThrowOnError, 'data'>;
|
|
1590
|
+
/**
|
|
1591
|
+
* Remove Member
|
|
1592
|
+
*
|
|
1593
|
+
* Remove someone from this organization.
|
|
1594
|
+
*
|
|
1595
|
+
* They lose access on their next request, and their access tokens for this
|
|
1596
|
+
* organization stop working with them. Nothing they created is deleted.
|
|
1597
|
+
*
|
|
1598
|
+
* Allowed even when this is the only organization they belong to — whether
|
|
1599
|
+
* they have somewhere else to go is not this organization's problem, and their
|
|
1600
|
+
* next sign-in gives them one of their own.
|
|
1601
|
+
*/
|
|
1602
|
+
remove<ThrowOnError extends boolean = false>(parameters: {
|
|
1603
|
+
user_id: string;
|
|
1604
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<OrgsMembersRemoveResults, OrgsMembersRemoveErrors, ThrowOnError, 'data'>;
|
|
1605
|
+
/**
|
|
1606
|
+
* Set Member Role
|
|
1607
|
+
*
|
|
1608
|
+
* Change a member's role. Takes effect on their very next request.
|
|
1609
|
+
*/
|
|
1610
|
+
setRole<ThrowOnError extends boolean = false>(parameters: {
|
|
1611
|
+
user_id: string;
|
|
1612
|
+
roleRequest: RoleRequest;
|
|
1613
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<OrgsMembersSetRoleResults, OrgsMembersSetRoleErrors, ThrowOnError, 'data'>;
|
|
1614
|
+
}
|
|
1615
|
+
export declare class Orgs extends HeyApiClient {
|
|
1616
|
+
/**
|
|
1617
|
+
* Patch Org
|
|
1618
|
+
*
|
|
1619
|
+
* Change this organization's name or its data retention policy.
|
|
1620
|
+
*
|
|
1621
|
+
* The name is display only — nothing keys on it.
|
|
1622
|
+
*
|
|
1623
|
+
* `retention_days` is how long call and conversation *content* is kept:
|
|
1624
|
+
* recordings, transcripts, summaries, extracted fields and the phone numbers
|
|
1625
|
+
* on a call. When it passes, all of that is deleted and the call itself
|
|
1626
|
+
* remains, with its duration, outcome and cost, so past invoices still
|
|
1627
|
+
* resolve. `null` keeps everything forever, which is the default.
|
|
1628
|
+
*
|
|
1629
|
+
* It applies to calls from now on: a call already in the system keeps the
|
|
1630
|
+
* deadline it was given when it ended, so shortening the policy never
|
|
1631
|
+
* retroactively destroys anything. Erasing a contact's last call also resets
|
|
1632
|
+
* what your agents remember about that person.
|
|
1633
|
+
*/
|
|
1634
|
+
update<ThrowOnError extends boolean = false>(parameters: {
|
|
1635
|
+
patchOrgRequest: PatchOrgRequest;
|
|
1636
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<OrgsUpdateResults, OrgsUpdateErrors, ThrowOnError, 'data'>;
|
|
1637
|
+
/**
|
|
1638
|
+
* Leave Org
|
|
1639
|
+
*
|
|
1640
|
+
* Leave this organization. Any member may, including an admin who has
|
|
1641
|
+
* promoted a successor. Nothing they created is deleted.
|
|
1642
|
+
*/
|
|
1643
|
+
leave<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<OrgsLeaveResults, OrgsLeaveErrors, ThrowOnError, 'data'>;
|
|
1644
|
+
/**
|
|
1645
|
+
* List Orgs
|
|
1646
|
+
*
|
|
1647
|
+
* Every organization the signed-in user belongs to, with their role in each.
|
|
1648
|
+
*
|
|
1649
|
+
* Newest membership first, deliberately: an admin can add you to their
|
|
1650
|
+
* organization without you being asked or emailed, so the one you did not know
|
|
1651
|
+
* about is the one that needs to be visible.
|
|
1652
|
+
*/
|
|
1653
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1654
|
+
limit?: number;
|
|
1655
|
+
offset?: number;
|
|
1656
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<OrgsListResults, OrgsListErrors, ThrowOnError, 'data'>;
|
|
1657
|
+
/**
|
|
1658
|
+
* Create Org
|
|
1659
|
+
*
|
|
1660
|
+
* Create a new, empty organization with the caller as its ADMIN.
|
|
1661
|
+
*
|
|
1662
|
+
* Any member can do this — it grants nothing in the organization they are
|
|
1663
|
+
* currently in. Switch into it to start working there.
|
|
1664
|
+
*/
|
|
1665
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
1666
|
+
orgNameRequest: OrgNameRequest;
|
|
1667
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<OrgsCreateResults, OrgsCreateErrors, ThrowOnError, 'data'>;
|
|
1668
|
+
/**
|
|
1669
|
+
* Switch Org
|
|
1670
|
+
*
|
|
1671
|
+
* Point the dashboard session at another of the caller's organizations.
|
|
1672
|
+
*
|
|
1673
|
+
* The session cookie carries the organization, so switching re-issues it — the
|
|
1674
|
+
* caller's role, resources and billing all move with it. Reload after this.
|
|
1675
|
+
*/
|
|
1676
|
+
switch<ThrowOnError extends boolean = false>(parameters: {
|
|
1677
|
+
org_id: string;
|
|
1678
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<OrgsSwitchResults, OrgsSwitchErrors, ThrowOnError, 'data'>;
|
|
1679
|
+
private _invites?;
|
|
1680
|
+
get invites(): Invites;
|
|
1681
|
+
private _members?;
|
|
1682
|
+
get members(): Members;
|
|
1683
|
+
}
|
|
1684
|
+
export declare class Schemas extends HeyApiClient {
|
|
1685
|
+
/**
|
|
1686
|
+
* Describe Schema
|
|
1687
|
+
*
|
|
1688
|
+
* The full JSON Schema of one of the five large request types.
|
|
1689
|
+
*
|
|
1690
|
+
* An argument whose description ends in `describe_schema('X')` carries only a
|
|
1691
|
+
* placeholder for its shape — fetch the real one here before writing it.
|
|
1692
|
+
*
|
|
1693
|
+
* - `AgentConfig` — a whole agent definition; what `create_agent` takes.
|
|
1694
|
+
* - `AgentOverride` — the same tree, every field optional, for one call.
|
|
1695
|
+
* - `AgentTeam` — several agents on one call, handing off to each other.
|
|
1696
|
+
* - `TaskConfig` — an agent task: inputs, output shape, model stack.
|
|
1697
|
+
* - `ToolOperations` — the operation tree a custom tool runs.
|
|
1698
|
+
*
|
|
1699
|
+
* These compose, so a document you fetch may itself defer to another.
|
|
1700
|
+
*/
|
|
1701
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
1702
|
+
name: 'AgentConfig' | 'AgentOverride' | 'AgentTeam' | 'TaskConfig' | 'ToolOperations';
|
|
1703
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<SchemasGetResults, SchemasGetErrors, ThrowOnError, 'data'>;
|
|
1704
|
+
}
|
|
1705
|
+
export declare class Secrets extends HeyApiClient {
|
|
1706
|
+
/**
|
|
1707
|
+
* List Secrets
|
|
1708
|
+
*
|
|
1709
|
+
* List the workspace's secrets by name, with a masked hint of each value.
|
|
1710
|
+
*
|
|
1711
|
+
* Values are write-only: once stored, a secret can only be read by the runtime
|
|
1712
|
+
* through a `{{secrets.NAME}}` reference.
|
|
1713
|
+
*/
|
|
1714
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1715
|
+
limit?: number;
|
|
1716
|
+
offset?: number;
|
|
1717
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<SecretsListResults, SecretsListErrors, ThrowOnError, 'data'>;
|
|
1718
|
+
/**
|
|
1719
|
+
* Create Secret
|
|
1720
|
+
*
|
|
1721
|
+
* Store a secret, replacing any existing one with the same name.
|
|
1722
|
+
*
|
|
1723
|
+
* `name` must be a valid identifier and is how tool operations and integration
|
|
1724
|
+
* config refer to the value, as `{{secrets.NAME}}`. Organization admins only.
|
|
1725
|
+
*/
|
|
1726
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
1727
|
+
createSecretRequest: CreateSecretRequest;
|
|
1728
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<SecretsCreateResults, SecretsCreateErrors, ThrowOnError, 'data'>;
|
|
1729
|
+
/**
|
|
1730
|
+
* Delete Secret
|
|
1731
|
+
*
|
|
1732
|
+
* Delete a secret permanently. Anything still referencing it will fail to
|
|
1733
|
+
* resolve at runtime. Organization admins only.
|
|
1734
|
+
*/
|
|
1735
|
+
delete<ThrowOnError extends boolean = false>(parameters: {
|
|
1736
|
+
secret_id: string;
|
|
1737
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<SecretsDeleteResults, SecretsDeleteErrors, ThrowOnError, 'data'>;
|
|
1738
|
+
}
|
|
1739
|
+
export declare class Runs extends HeyApiClient {
|
|
1740
|
+
/**
|
|
1741
|
+
* List Task Runs
|
|
1742
|
+
*
|
|
1743
|
+
* This task's runs, newest first, each with its output, trace and cost.
|
|
1744
|
+
*
|
|
1745
|
+
* A run records the task's *name* and nothing else about the definition it ran
|
|
1746
|
+
* under, so two runs either side of an edit are indistinguishable here.
|
|
1747
|
+
*/
|
|
1748
|
+
list<ThrowOnError extends boolean = false>(parameters: {
|
|
1749
|
+
task_id: string;
|
|
1750
|
+
limit?: number;
|
|
1751
|
+
offset?: number;
|
|
1752
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TasksRunsListResults, TasksRunsListErrors, ThrowOnError, 'data'>;
|
|
1753
|
+
/**
|
|
1754
|
+
* Run Task
|
|
1755
|
+
*
|
|
1756
|
+
* Run the task once with the variables you supply, and wait for the result.
|
|
1757
|
+
*
|
|
1758
|
+
* **This executes for real**: the tools call your endpoints with your secrets,
|
|
1759
|
+
* the MCP servers spend your credits, and the model spends your tokens. A task
|
|
1760
|
+
* that books a slot, charges a card or sends a message will do so.
|
|
1761
|
+
*
|
|
1762
|
+
* `vars` must match what the task declares — an unknown name is refused rather
|
|
1763
|
+
* than dropped. The response is the whole run: the structured `output`, a
|
|
1764
|
+
* `trace` of every tool call, the steps used and what the tokens cost. On
|
|
1765
|
+
* failure `error.type` says whose problem it is. Secrets are redacted.
|
|
1766
|
+
*/
|
|
1767
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
1768
|
+
task_id: string;
|
|
1769
|
+
runTaskRequest: RunTaskRequest;
|
|
1770
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TasksRunsCreateResults, TasksRunsCreateErrors, ThrowOnError, 'data'>;
|
|
1771
|
+
/**
|
|
1772
|
+
* Get Task Run
|
|
1773
|
+
*
|
|
1774
|
+
* One run in full: what it produced, every tool it called on the way, and
|
|
1775
|
+
* what it cost.
|
|
1776
|
+
*
|
|
1777
|
+
* This is what answers "why did it write that" for a caller holding one run id
|
|
1778
|
+
* — an email batch's review table links each drafted row here. Secret values
|
|
1779
|
+
* are redacted from the trace, and a trace that was cut reports it.
|
|
1780
|
+
*/
|
|
1781
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
1782
|
+
task_id: string;
|
|
1783
|
+
run_id: string;
|
|
1784
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TasksRunsGetResults, TasksRunsGetErrors, ThrowOnError, 'data'>;
|
|
1785
|
+
}
|
|
1786
|
+
export declare class Tasks2 extends HeyApiClient {
|
|
1787
|
+
/**
|
|
1788
|
+
* List Tasks
|
|
1789
|
+
*
|
|
1790
|
+
* List the workspace's agent tasks.
|
|
1791
|
+
*
|
|
1792
|
+
* A task is an agent nobody talks to: a prompt, one LLM, tools and MCP
|
|
1793
|
+
* servers, the variables it takes as input, and the typed result it must
|
|
1794
|
+
* produce. `last_run` says how the most recent run of each one went, so a
|
|
1795
|
+
* task whose prompt stopped calling `submit_result` is visible here rather
|
|
1796
|
+
* than only in its own history.
|
|
1797
|
+
*/
|
|
1798
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1799
|
+
limit?: number;
|
|
1800
|
+
offset?: number;
|
|
1801
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TasksListResults, TasksListErrors, ThrowOnError, 'data'>;
|
|
1802
|
+
/**
|
|
1803
|
+
* Create Task
|
|
1804
|
+
*
|
|
1805
|
+
* Create an agent task.
|
|
1806
|
+
*
|
|
1807
|
+
* A task has no draft and no publish step: it is valid the moment it saves and
|
|
1808
|
+
* callable immediately. An invalid config is a 400 listing every problem and
|
|
1809
|
+
* nothing is stored.
|
|
1810
|
+
*
|
|
1811
|
+
* `output` is what makes this a task rather than a chat agent — declare the
|
|
1812
|
+
* fields the model must produce and it is given a `submit_result` tool built
|
|
1813
|
+
* from them. `vars` are its inputs, read as `{{vars.name}}`.
|
|
1814
|
+
*
|
|
1815
|
+
* `warnings` reports the non-fatal problems. There is no publish screen to
|
|
1816
|
+
* show them on, so read them here.
|
|
1817
|
+
*/
|
|
1818
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
1819
|
+
createTaskRequest: CreateTaskRequest;
|
|
1820
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TasksCreateResults, TasksCreateErrors, ThrowOnError, 'data'>;
|
|
1821
|
+
/**
|
|
1822
|
+
* Delete Task
|
|
1823
|
+
*
|
|
1824
|
+
* Delete a task. Its run history survives, still named after it.
|
|
1825
|
+
*/
|
|
1826
|
+
delete<ThrowOnError extends boolean = false>(parameters: {
|
|
1827
|
+
task_id: string;
|
|
1828
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TasksDeleteResults, TasksDeleteErrors, ThrowOnError, 'data'>;
|
|
1829
|
+
/**
|
|
1830
|
+
* Get Task
|
|
1831
|
+
*
|
|
1832
|
+
* Fetch one task's config and how its last run went.
|
|
1833
|
+
*/
|
|
1834
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
1835
|
+
task_id: string;
|
|
1836
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TasksGetResults, TasksGetErrors, ThrowOnError, 'data'>;
|
|
1837
|
+
/**
|
|
1838
|
+
* Update Task
|
|
1839
|
+
*
|
|
1840
|
+
* Replace a task's config.
|
|
1841
|
+
*
|
|
1842
|
+
* The whole config is sent, so include every field you mean to keep, and it is
|
|
1843
|
+
* validated exactly as `create_task` is. The edit takes effect on the next run
|
|
1844
|
+
* — a task has no versions, so there is no old wording to go back to and no
|
|
1845
|
+
* record of which definition produced an earlier run.
|
|
1846
|
+
*/
|
|
1847
|
+
update<ThrowOnError extends boolean = false>(parameters: {
|
|
1848
|
+
task_id: string;
|
|
1849
|
+
patchTaskRequest: PatchTaskRequest;
|
|
1850
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TasksUpdateResults, TasksUpdateErrors, ThrowOnError, 'data'>;
|
|
1851
|
+
private _runs?;
|
|
1852
|
+
get runs(): Runs;
|
|
1853
|
+
}
|
|
1854
|
+
export declare class Accounts extends HeyApiClient {
|
|
1855
|
+
/**
|
|
1856
|
+
* List Telephony Accounts
|
|
1857
|
+
*
|
|
1858
|
+
* List the workspace's connected carrier accounts.
|
|
1859
|
+
*
|
|
1860
|
+
* A carrier account is the credential Talqing uses to reach a phone network;
|
|
1861
|
+
* phone numbers hang off one. `setup_complete` and `setup_steps` say whether
|
|
1862
|
+
* it is finished — including the steps that can only be done in the carrier's
|
|
1863
|
+
* own console.
|
|
1864
|
+
*/
|
|
1865
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1866
|
+
limit?: number;
|
|
1867
|
+
offset?: number;
|
|
1868
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TelephonyAccountsListResults, TelephonyAccountsListErrors, ThrowOnError, 'data'>;
|
|
1869
|
+
/**
|
|
1870
|
+
* Create Telephony Account
|
|
1871
|
+
*
|
|
1872
|
+
* Connect a carrier account so the workspace can own phone numbers.
|
|
1873
|
+
*
|
|
1874
|
+
* `account_info` and `credentials` must carry exactly the keys that carrier's
|
|
1875
|
+
* `list_telephony_providers` entry declares. A credential may be plaintext —
|
|
1876
|
+
* stored as a workspace secret — or an existing reference.
|
|
1877
|
+
*
|
|
1878
|
+
* Creating only records the credential; call `provision_telephony_account`
|
|
1879
|
+
* next to build the SIP trunk.
|
|
1880
|
+
*/
|
|
1881
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
1882
|
+
createTelephonyAccountRequest: CreateTelephonyAccountRequest;
|
|
1883
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TelephonyAccountsCreateResults, TelephonyAccountsCreateErrors, ThrowOnError, 'data'>;
|
|
1884
|
+
/**
|
|
1885
|
+
* Delete Telephony Account
|
|
1886
|
+
*
|
|
1887
|
+
* Disconnect a carrier account permanently.
|
|
1888
|
+
*
|
|
1889
|
+
* Every phone number on it must be disabled first, so this can never silently
|
|
1890
|
+
* take live numbers off the air. Deleting also tears down the SIP trunk.
|
|
1891
|
+
*/
|
|
1892
|
+
delete<ThrowOnError extends boolean = false>(parameters: {
|
|
1893
|
+
account_id: string;
|
|
1894
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TelephonyAccountsDeleteResults, TelephonyAccountsDeleteErrors, ThrowOnError, 'data'>;
|
|
1895
|
+
/**
|
|
1896
|
+
* Get Telephony Account
|
|
1897
|
+
*
|
|
1898
|
+
* Read one carrier account, including what its setup still needs.
|
|
1899
|
+
*
|
|
1900
|
+
* `setup_steps` is the authoritative checklist — read it rather than trying
|
|
1901
|
+
* to re-derive setup state from `provider_state`. A step marked
|
|
1902
|
+
* `user_confirmable` cannot be checked over any API; it is done in the
|
|
1903
|
+
* carrier's console and confirmed with `patch_telephony_account`.
|
|
1904
|
+
*/
|
|
1905
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
1906
|
+
account_id: string;
|
|
1907
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TelephonyAccountsGetResults, TelephonyAccountsGetErrors, ThrowOnError, 'data'>;
|
|
1908
|
+
/**
|
|
1909
|
+
* Patch Telephony Account
|
|
1910
|
+
*
|
|
1911
|
+
* Update a carrier account: rename it, replace credentials, or disable it.
|
|
1912
|
+
*
|
|
1913
|
+
* Only the fields you send change. `status` accepts `disabled` to stop the
|
|
1914
|
+
* account and `connected` to re-enable it. Set `console_setup_confirmed` when
|
|
1915
|
+
* the user says they have finished the carrier-console steps — no API can
|
|
1916
|
+
* verify that work, and inbound calling on this account's numbers stays
|
|
1917
|
+
* blocked until they confirm.
|
|
1918
|
+
*/
|
|
1919
|
+
update<ThrowOnError extends boolean = false>(parameters: {
|
|
1920
|
+
account_id: string;
|
|
1921
|
+
patchTelephonyAccountRequest: PatchTelephonyAccountRequest;
|
|
1922
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TelephonyAccountsUpdateResults, TelephonyAccountsUpdateErrors, ThrowOnError, 'data'>;
|
|
1923
|
+
/**
|
|
1924
|
+
* Provision Telephony Account
|
|
1925
|
+
*
|
|
1926
|
+
* Build (or repair) the SIP trunk between Talqing and the carrier.
|
|
1927
|
+
*
|
|
1928
|
+
* Run this after connecting an account, and again after replacing its
|
|
1929
|
+
* credentials. It is safe to repeat: it converges the carrier side to what
|
|
1930
|
+
* the account should have rather than creating a second trunk. The response's
|
|
1931
|
+
* `status` and `setup_steps` say what is working and what is left.
|
|
1932
|
+
*/
|
|
1933
|
+
provision<ThrowOnError extends boolean = false>(parameters: {
|
|
1934
|
+
account_id: string;
|
|
1935
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TelephonyAccountsProvisionResults, TelephonyAccountsProvisionErrors, ThrowOnError, 'data'>;
|
|
1936
|
+
/**
|
|
1937
|
+
* List Remote Numbers
|
|
1938
|
+
*
|
|
1939
|
+
* List the numbers this account owns at the carrier, ready to import.
|
|
1940
|
+
*
|
|
1941
|
+
* Read live from the carrier, so it also proves the credentials work.
|
|
1942
|
+
* `already_imported` marks the ones Talqing already has — pass the rest to
|
|
1943
|
+
* `import_phone_numbers`. Buying a number is done at the carrier, not here.
|
|
1944
|
+
*/
|
|
1945
|
+
remoteNumbers<ThrowOnError extends boolean = false>(parameters: {
|
|
1946
|
+
account_id: string;
|
|
1947
|
+
limit?: number;
|
|
1948
|
+
offset?: number;
|
|
1949
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TelephonyAccountsRemoteNumbersResults, TelephonyAccountsRemoteNumbersErrors, ThrowOnError, 'data'>;
|
|
1950
|
+
}
|
|
1951
|
+
export declare class PhoneNumbers extends HeyApiClient {
|
|
1952
|
+
/**
|
|
1953
|
+
* List Phone Numbers
|
|
1954
|
+
*
|
|
1955
|
+
* List the workspace's phone numbers, optionally for one carrier account.
|
|
1956
|
+
*
|
|
1957
|
+
* `readiness` is the field to report to a user — it collapses status,
|
|
1958
|
+
* capability and routing into the one answer they want: `live` (answering
|
|
1959
|
+
* inbound), `needs_agent`, `needs_carrier_setup`, `setting_up`, `error` or
|
|
1960
|
+
* `disabled`.
|
|
1961
|
+
*/
|
|
1962
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1963
|
+
account_id?: string | null;
|
|
1964
|
+
limit?: number;
|
|
1965
|
+
offset?: number;
|
|
1966
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TelephonyPhoneNumbersListResults, TelephonyPhoneNumbersListErrors, ThrowOnError, 'data'>;
|
|
1967
|
+
/**
|
|
1968
|
+
* Import Phone Numbers
|
|
1969
|
+
*
|
|
1970
|
+
* Bring carrier-owned numbers into the workspace, provisioning each one.
|
|
1971
|
+
*
|
|
1972
|
+
* Per number, not all-or-nothing: `items` carries one result per requested
|
|
1973
|
+
* E.164, so check every `ok` rather than assuming a 200 means all of them
|
|
1974
|
+
* landed. `provision` defaults to true, which is what makes a number usable.
|
|
1975
|
+
*/
|
|
1976
|
+
import<ThrowOnError extends boolean = false>(parameters: {
|
|
1977
|
+
importPhoneNumbersRequest: ImportPhoneNumbersRequest;
|
|
1978
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TelephonyPhoneNumbersImportResults, TelephonyPhoneNumbersImportErrors, ThrowOnError, 'data'>;
|
|
1979
|
+
/**
|
|
1980
|
+
* Get Phone Number
|
|
1981
|
+
*
|
|
1982
|
+
* Read one phone number: its carrier, capabilities, agent and readiness.
|
|
1983
|
+
*/
|
|
1984
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
1985
|
+
number_id: string;
|
|
1986
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TelephonyPhoneNumbersGetResults, TelephonyPhoneNumbersGetErrors, ThrowOnError, 'data'>;
|
|
1987
|
+
/**
|
|
1988
|
+
* Patch Phone Number
|
|
1989
|
+
*
|
|
1990
|
+
* Relabel a number, change what it may do, or take it out of service.
|
|
1991
|
+
*
|
|
1992
|
+
* `can_inbound` and `can_outbound` gate the directions it will carry.
|
|
1993
|
+
* `status` accepts `disabled`, which tears down its LiveKit routing, and
|
|
1994
|
+
* `pending`, which re-opens a disabled number so it can be provisioned again.
|
|
1995
|
+
*/
|
|
1996
|
+
update<ThrowOnError extends boolean = false>(parameters: {
|
|
1997
|
+
number_id: string;
|
|
1998
|
+
patchPhoneNumberRequest: PatchPhoneNumberRequest;
|
|
1999
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TelephonyPhoneNumbersUpdateResults, TelephonyPhoneNumbersUpdateErrors, ThrowOnError, 'data'>;
|
|
2000
|
+
/**
|
|
2001
|
+
* Assign Phone Number
|
|
2002
|
+
*
|
|
2003
|
+
* Put an agent on a number so it answers incoming calls.
|
|
2004
|
+
*
|
|
2005
|
+
* The agent must be **published** and on the `voice` or `video` channel, and
|
|
2006
|
+
* the number active, inbound-capable and on a ready carrier account — each is
|
|
2007
|
+
* refused with the reason. One agent per number; assigning again replaces the
|
|
2008
|
+
* previous one. Republishing the agent later needs no reassignment.
|
|
2009
|
+
*/
|
|
2010
|
+
assign<ThrowOnError extends boolean = false>(parameters: {
|
|
2011
|
+
number_id: string;
|
|
2012
|
+
assignPhoneNumberRequest: AssignPhoneNumberRequest;
|
|
2013
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TelephonyPhoneNumbersAssignResults, TelephonyPhoneNumbersAssignErrors, ThrowOnError, 'data'>;
|
|
2014
|
+
/**
|
|
2015
|
+
* Provision Phone Number
|
|
2016
|
+
*
|
|
2017
|
+
* Wire a number up at the carrier and in LiveKit so it can carry calls.
|
|
2018
|
+
*
|
|
2019
|
+
* `import_phone_numbers` already does this unless it was called with
|
|
2020
|
+
* `provision: false`; use this to retry a number left in `error`, or to bring
|
|
2021
|
+
* one back after re-enabling it.
|
|
2022
|
+
*/
|
|
2023
|
+
provision<ThrowOnError extends boolean = false>(parameters: {
|
|
2024
|
+
number_id: string;
|
|
2025
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TelephonyPhoneNumbersProvisionResults, TelephonyPhoneNumbersProvisionErrors, ThrowOnError, 'data'>;
|
|
2026
|
+
/**
|
|
2027
|
+
* Unassign Phone Number
|
|
2028
|
+
*
|
|
2029
|
+
* Take the agent off a number, so incoming calls are no longer answered.
|
|
2030
|
+
*
|
|
2031
|
+
* The number stays provisioned and can still place outbound calls; its
|
|
2032
|
+
* readiness drops to `needs_agent`.
|
|
2033
|
+
*/
|
|
2034
|
+
unassign<ThrowOnError extends boolean = false>(parameters: {
|
|
2035
|
+
number_id: string;
|
|
2036
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TelephonyPhoneNumbersUnassignResults, TelephonyPhoneNumbersUnassignErrors, ThrowOnError, 'data'>;
|
|
2037
|
+
}
|
|
2038
|
+
export declare class Providers extends HeyApiClient {
|
|
2039
|
+
/**
|
|
2040
|
+
* List Telephony Providers
|
|
2041
|
+
*
|
|
2042
|
+
* List the telephony carriers an account can be connected to.
|
|
2043
|
+
*
|
|
2044
|
+
* `account_info_keys`, `credential_keys` and `setup_fields` state exactly what
|
|
2045
|
+
* connecting each carrier needs — read this before `create_telephony_account`
|
|
2046
|
+
* rather than guessing field names. Entries with `implemented: false` have no
|
|
2047
|
+
* adapter yet and cannot be used.
|
|
2048
|
+
*/
|
|
2049
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
2050
|
+
limit?: number;
|
|
2051
|
+
offset?: number;
|
|
2052
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<TelephonyProvidersListResults, TelephonyProvidersListErrors, ThrowOnError, 'data'>;
|
|
2053
|
+
}
|
|
2054
|
+
export declare class Telephony extends HeyApiClient {
|
|
2055
|
+
private _accounts?;
|
|
2056
|
+
get accounts(): Accounts;
|
|
2057
|
+
private _phoneNumbers?;
|
|
2058
|
+
get phoneNumbers(): PhoneNumbers;
|
|
2059
|
+
private _providers?;
|
|
2060
|
+
get providers(): Providers;
|
|
2061
|
+
}
|
|
2062
|
+
export declare class Versions2 extends HeyApiClient {
|
|
2063
|
+
/**
|
|
2064
|
+
* Get Tool Version
|
|
2065
|
+
*
|
|
2066
|
+
* Fetch what one published version of a tool actually contains.
|
|
2067
|
+
*
|
|
2068
|
+
* `get_tool` lists the versions and when each was published; this returns the
|
|
2069
|
+
* frozen definition itself — the arguments, behaviour flags and operation tree
|
|
2070
|
+
* exactly as they were at that publish. Use it to see what changed between two
|
|
2071
|
+
* versions, or between a version and the current draft.
|
|
2072
|
+
*/
|
|
2073
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
2074
|
+
tool_id: string;
|
|
2075
|
+
version: number;
|
|
2076
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ToolsVersionsGetResults, ToolsVersionsGetErrors, ThrowOnError, 'data'>;
|
|
2077
|
+
/**
|
|
2078
|
+
* Rollback Tool Version
|
|
2079
|
+
*
|
|
2080
|
+
* Put an earlier published version of a tool back into production.
|
|
2081
|
+
*
|
|
2082
|
+
* That version becomes live immediately and **replaces the current draft**, so
|
|
2083
|
+
* any unpublished edits are lost. No new version is created.
|
|
2084
|
+
*
|
|
2085
|
+
* Agents already published keep the tool definition they were published with,
|
|
2086
|
+
* so republish them for the rollback to reach live calls.
|
|
2087
|
+
*/
|
|
2088
|
+
rollback<ThrowOnError extends boolean = false>(parameters: {
|
|
2089
|
+
tool_id: string;
|
|
2090
|
+
version: number;
|
|
2091
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ToolsVersionsRollbackResults, ToolsVersionsRollbackErrors, ThrowOnError, 'data'>;
|
|
2092
|
+
}
|
|
2093
|
+
export declare class Tools2 extends HeyApiClient {
|
|
2094
|
+
/**
|
|
2095
|
+
* List Tools
|
|
2096
|
+
*
|
|
2097
|
+
* List the workspace's tools with their draft operation trees.
|
|
2098
|
+
*
|
|
2099
|
+
* `published_version` is null for a tool that has never been published; only
|
|
2100
|
+
* published tools can be attached to an agent or used as a lifecycle hook.
|
|
2101
|
+
*/
|
|
2102
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
2103
|
+
limit?: number;
|
|
2104
|
+
offset?: number;
|
|
2105
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ToolsListResults, ToolsListErrors, ThrowOnError, 'data'>;
|
|
2106
|
+
/**
|
|
2107
|
+
* Create Tool
|
|
2108
|
+
*
|
|
2109
|
+
* Create a draft tool.
|
|
2110
|
+
*
|
|
2111
|
+
* `name` is the function name the agent's LLM sees, so it must be a valid
|
|
2112
|
+
* identifier and describe the capability. `json_schema` declares the arguments
|
|
2113
|
+
* that LLM supplies. `operations` may be sent here or added later with a
|
|
2114
|
+
* patch. The tool is a draft until published.
|
|
2115
|
+
*/
|
|
2116
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
2117
|
+
createToolRequest: CreateToolRequest;
|
|
2118
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ToolsCreateResults, ToolsCreateErrors, ThrowOnError, 'data'>;
|
|
2119
|
+
/**
|
|
2120
|
+
* Delete Tool
|
|
2121
|
+
*
|
|
2122
|
+
* Delete a tool and its published versions permanently.
|
|
2123
|
+
*/
|
|
2124
|
+
delete<ThrowOnError extends boolean = false>(parameters: {
|
|
2125
|
+
tool_id: string;
|
|
2126
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ToolsDeleteResults, ToolsDeleteErrors, ThrowOnError, 'data'>;
|
|
2127
|
+
/**
|
|
2128
|
+
* Get Tool
|
|
2129
|
+
*
|
|
2130
|
+
* Fetch one tool: behaviour flags, argument schema, draft operation tree
|
|
2131
|
+
* and the list of published versions.
|
|
2132
|
+
*/
|
|
2133
|
+
get<ThrowOnError extends boolean = false>(parameters: {
|
|
2134
|
+
tool_id: string;
|
|
2135
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ToolsGetResults, ToolsGetErrors, ThrowOnError, 'data'>;
|
|
2136
|
+
/**
|
|
2137
|
+
* Patch Tool
|
|
2138
|
+
*
|
|
2139
|
+
* Update a draft tool. Omitted fields are left unchanged.
|
|
2140
|
+
*
|
|
2141
|
+
* `operations` is the one exception: sending it replaces the entire tree, so
|
|
2142
|
+
* include every node you want to keep. Changes land on the draft; publish to
|
|
2143
|
+
* make them live.
|
|
2144
|
+
*/
|
|
2145
|
+
update<ThrowOnError extends boolean = false>(parameters: {
|
|
2146
|
+
tool_id: string;
|
|
2147
|
+
patchToolRequest: PatchToolRequest;
|
|
2148
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ToolsUpdateResults, ToolsUpdateErrors, ThrowOnError, 'data'>;
|
|
2149
|
+
/**
|
|
2150
|
+
* Publish Tool
|
|
2151
|
+
*
|
|
2152
|
+
* Validate the draft and freeze it as a new immutable tool version.
|
|
2153
|
+
*
|
|
2154
|
+
* Required before the tool can be attached to an agent or used as a lifecycle
|
|
2155
|
+
* hook. Agents already published keep the definition they were published with
|
|
2156
|
+
* until they are republished.
|
|
2157
|
+
*/
|
|
2158
|
+
publish<ThrowOnError extends boolean = false>(parameters: {
|
|
2159
|
+
tool_id: string;
|
|
2160
|
+
publishToolRequest: PublishToolRequest;
|
|
2161
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ToolsPublishResults, ToolsPublishErrors, ThrowOnError, 'data'>;
|
|
2162
|
+
/**
|
|
2163
|
+
* Run Tool
|
|
2164
|
+
*
|
|
2165
|
+
* Run the draft tool once with arguments you supply and see every step.
|
|
2166
|
+
*
|
|
2167
|
+
* This executes for real: HTTP operations call your endpoints with your
|
|
2168
|
+
* secrets, so a tool that books a slot or charges a card will do so.
|
|
2169
|
+
* Conversational operations (`say`, `generate_reply`, `add_message`,
|
|
2170
|
+
* `handoff`, `end_call`, `frontend_rpc`) are recorded with their resolved text
|
|
2171
|
+
* rather than performed.
|
|
2172
|
+
*
|
|
2173
|
+
* Each step reports the resolved request and response, the branch an `if`
|
|
2174
|
+
* took, and everything published into `tooldata` or `userdata`. Secrets are
|
|
2175
|
+
* redacted. Nothing is saved, so there is no need to publish first.
|
|
2176
|
+
*/
|
|
2177
|
+
run<ThrowOnError extends boolean = false>(parameters: {
|
|
2178
|
+
tool_id: string;
|
|
2179
|
+
runToolRequest: RunToolRequest;
|
|
2180
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ToolsRunResults, ToolsRunErrors, ThrowOnError, 'data'>;
|
|
2181
|
+
/**
|
|
2182
|
+
* Validate Tool
|
|
2183
|
+
*
|
|
2184
|
+
* Check the draft operation tree without publishing it.
|
|
2185
|
+
*
|
|
2186
|
+
* Reports unknown argument and secret references, unreachable published
|
|
2187
|
+
* fields, handoff targets that are not published, code that fails to
|
|
2188
|
+
* transpile, and userdata read before it is written.
|
|
2189
|
+
*/
|
|
2190
|
+
validate<ThrowOnError extends boolean = false>(parameters: {
|
|
2191
|
+
tool_id: string;
|
|
2192
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<ToolsValidateResults, ToolsValidateErrors, ThrowOnError, 'data'>;
|
|
2193
|
+
private _versions?;
|
|
2194
|
+
get versions(): Versions2;
|
|
2195
|
+
}
|
|
2196
|
+
export declare class Webhooks extends HeyApiClient {
|
|
2197
|
+
/**
|
|
2198
|
+
* List Webhooks
|
|
2199
|
+
*
|
|
2200
|
+
* List the workspace's webhooks with their subscriptions and last delivery
|
|
2201
|
+
* result. Signing secrets are returned only as a masked hint.
|
|
2202
|
+
*/
|
|
2203
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
2204
|
+
limit?: number;
|
|
2205
|
+
offset?: number;
|
|
2206
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WebhooksListResults, WebhooksListErrors, ThrowOnError, 'data'>;
|
|
2207
|
+
/**
|
|
2208
|
+
* Create Webhook
|
|
2209
|
+
*
|
|
2210
|
+
* Create a webhook. Webhooks are workspace-wide — they fire for every agent.
|
|
2211
|
+
*
|
|
2212
|
+
* An empty `subscribed_events` subscribes to all events. A signing secret is
|
|
2213
|
+
* generated when none is supplied; either way the plaintext secret is returned
|
|
2214
|
+
* once here and never again.
|
|
2215
|
+
*/
|
|
2216
|
+
create<ThrowOnError extends boolean = false>(parameters: {
|
|
2217
|
+
createWebhookRequest: CreateWebhookRequest;
|
|
2218
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WebhooksCreateResults, WebhooksCreateErrors, ThrowOnError, 'data'>;
|
|
2219
|
+
/**
|
|
2220
|
+
* Event Types
|
|
2221
|
+
*
|
|
2222
|
+
* List every event a webhook can subscribe to, and which are emitted today.
|
|
2223
|
+
*/
|
|
2224
|
+
eventTypes<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<WebhooksEventTypesResults, WebhooksEventTypesErrors, ThrowOnError, 'data'>;
|
|
2225
|
+
/**
|
|
2226
|
+
* Delete Webhook
|
|
2227
|
+
*
|
|
2228
|
+
* Delete a webhook permanently.
|
|
2229
|
+
*/
|
|
2230
|
+
delete<ThrowOnError extends boolean = false>(parameters: {
|
|
2231
|
+
webhook_id: string;
|
|
2232
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WebhooksDeleteResults, WebhooksDeleteErrors, ThrowOnError, 'data'>;
|
|
2233
|
+
/**
|
|
2234
|
+
* Patch Webhook
|
|
2235
|
+
*
|
|
2236
|
+
* Update a webhook's URL, subscriptions or status. Omitted fields are left
|
|
2237
|
+
* unchanged; a disabled webhook stops receiving deliveries.
|
|
2238
|
+
*/
|
|
2239
|
+
update<ThrowOnError extends boolean = false>(parameters: {
|
|
2240
|
+
webhook_id: string;
|
|
2241
|
+
patchWebhookRequest: PatchWebhookRequest;
|
|
2242
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WebhooksUpdateResults, WebhooksUpdateErrors, ThrowOnError, 'data'>;
|
|
2243
|
+
/**
|
|
2244
|
+
* Webhook Deliveries
|
|
2245
|
+
*
|
|
2246
|
+
* List recent delivery attempts for one webhook — event, response status
|
|
2247
|
+
* and error — newest first. The place to look when a webhook seems silent.
|
|
2248
|
+
*/
|
|
2249
|
+
deliveries<ThrowOnError extends boolean = false>(parameters: {
|
|
2250
|
+
webhook_id: string;
|
|
2251
|
+
limit?: number;
|
|
2252
|
+
offset?: number;
|
|
2253
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WebhooksDeliveriesResults, WebhooksDeliveriesErrors, ThrowOnError, 'data'>;
|
|
2254
|
+
/**
|
|
2255
|
+
* Rotate Webhook Secret
|
|
2256
|
+
*
|
|
2257
|
+
* Issue a new signing secret, invalidating the old one immediately.
|
|
2258
|
+
*
|
|
2259
|
+
* The new plaintext secret is returned once here; the receiver must be updated
|
|
2260
|
+
* or signature checks will start failing.
|
|
2261
|
+
*/
|
|
2262
|
+
rotateSecret<ThrowOnError extends boolean = false>(parameters: {
|
|
2263
|
+
webhook_id: string;
|
|
2264
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WebhooksRotateSecretResults, WebhooksRotateSecretErrors, ThrowOnError, 'data'>;
|
|
2265
|
+
/**
|
|
2266
|
+
* Test Webhook
|
|
2267
|
+
*
|
|
2268
|
+
* Send a signed test event and return the endpoint's response, so delivery
|
|
2269
|
+
* and signature verification can be checked end to end.
|
|
2270
|
+
*/
|
|
2271
|
+
test<ThrowOnError extends boolean = false>(parameters: {
|
|
2272
|
+
webhook_id: string;
|
|
2273
|
+
}, options?: Options<never, ThrowOnError>): RequestResult<WebhooksTestResults, WebhooksTestErrors, ThrowOnError, 'data'>;
|
|
2274
|
+
}
|
|
2275
|
+
export declare class TalqingApi extends HeyApiClient {
|
|
2276
|
+
static readonly __registry: HeyApiRegistry<TalqingApi>;
|
|
2277
|
+
constructor(args?: {
|
|
2278
|
+
client?: Client;
|
|
2279
|
+
key?: string;
|
|
2280
|
+
});
|
|
2281
|
+
/**
|
|
2282
|
+
* Health
|
|
2283
|
+
*
|
|
2284
|
+
* Liveness probe: `200` once this process is serving. Unauthenticated.
|
|
2285
|
+
*
|
|
2286
|
+
* It answers for the API process, not its dependencies — a `200` here does not
|
|
2287
|
+
* promise Postgres, Redis or LiveKit are reachable.
|
|
2288
|
+
*/
|
|
2289
|
+
health<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<HealthResults, HealthErrors, ThrowOnError, 'data'>;
|
|
2290
|
+
private _agents?;
|
|
2291
|
+
get agents(): Agents;
|
|
2292
|
+
private _auth?;
|
|
2293
|
+
get auth(): Auth;
|
|
2294
|
+
private _providerKeys?;
|
|
2295
|
+
get providerKeys(): ProviderKeys;
|
|
2296
|
+
private _calls?;
|
|
2297
|
+
get calls(): Calls;
|
|
2298
|
+
private _catalog?;
|
|
2299
|
+
get catalog(): Catalog;
|
|
2300
|
+
private _conversations?;
|
|
2301
|
+
get conversations(): Conversations;
|
|
2302
|
+
private _copilot?;
|
|
2303
|
+
get copilot(): Copilot;
|
|
2304
|
+
private _email?;
|
|
2305
|
+
get email(): Email;
|
|
2306
|
+
private _integrations?;
|
|
2307
|
+
get integrations(): Integrations;
|
|
2308
|
+
private _knowledge?;
|
|
2309
|
+
get knowledge(): Knowledge2;
|
|
2310
|
+
private _tokens?;
|
|
2311
|
+
get tokens(): Tokens;
|
|
2312
|
+
private _observability?;
|
|
2313
|
+
get observability(): Observability;
|
|
2314
|
+
private _orgs?;
|
|
2315
|
+
get orgs(): Orgs;
|
|
2316
|
+
private _schemas?;
|
|
2317
|
+
get schemas(): Schemas;
|
|
2318
|
+
private _secrets?;
|
|
2319
|
+
get secrets(): Secrets;
|
|
2320
|
+
private _tasks?;
|
|
2321
|
+
get tasks(): Tasks2;
|
|
2322
|
+
private _telephony?;
|
|
2323
|
+
get telephony(): Telephony;
|
|
2324
|
+
private _tools?;
|
|
2325
|
+
get tools(): Tools2;
|
|
2326
|
+
private _webhooks?;
|
|
2327
|
+
get webhooks(): Webhooks;
|
|
2328
|
+
}
|
|
2329
|
+
export {};
|
|
2330
|
+
//# sourceMappingURL=sdk.gen.d.ts.map
|