@talqing/sdk 0.12.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/gen/index.d.ts +1 -1
- package/dist/cjs/gen/index.d.ts.map +1 -1
- package/dist/cjs/gen/sdk.gen.d.ts +57 -1
- package/dist/cjs/gen/sdk.gen.d.ts.map +1 -1
- package/dist/cjs/gen/sdk.gen.js +154 -4
- package/dist/cjs/gen/sdk.gen.js.map +1 -1
- package/dist/cjs/gen/types.gen.d.ts +748 -66
- package/dist/cjs/gen/types.gen.d.ts.map +1 -1
- package/dist/esm/gen/index.d.ts +1 -1
- package/dist/esm/gen/index.d.ts.map +1 -1
- package/dist/esm/gen/sdk.gen.d.ts +57 -1
- package/dist/esm/gen/sdk.gen.d.ts.map +1 -1
- package/dist/esm/gen/sdk.gen.js +151 -2
- package/dist/esm/gen/sdk.gen.js.map +1 -1
- package/dist/esm/gen/types.gen.d.ts +748 -66
- package/dist/esm/gen/types.gen.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/gen/index.ts +1 -1
- package/src/gen/sdk.gen.ts +171 -3
- package/src/gen/types.gen.ts +794 -66
|
@@ -182,7 +182,7 @@ export type AgentConfig = {
|
|
|
182
182
|
/**
|
|
183
183
|
* Greeting
|
|
184
184
|
*
|
|
185
|
-
* The opening line, spoken on connect and on the way in from a handoff; empty or null makes the agent wait for the caller to speak first. Voice and video only. Supports the same substitutions as the prompt, plus `{{
|
|
185
|
+
* The opening line, spoken on connect and on the way in from a handoff; empty or null makes the agent wait for the caller to speak first. Voice and video only. Supports the same substitutions as the prompt, plus `{{recording.notice}}`, the recording notice's place in the line.
|
|
186
186
|
*/
|
|
187
187
|
greeting?: string | null;
|
|
188
188
|
/**
|
|
@@ -197,6 +197,12 @@ export type AgentConfig = {
|
|
|
197
197
|
* Where this agent may hand the conversation next. Each entry becomes one tool the model can call, so routing quality lives in its `description`. A target is a stored agent (`agent_id`) or a member of the team defined on the call.
|
|
198
198
|
*/
|
|
199
199
|
handoffs?: Array<HandoffTarget>;
|
|
200
|
+
/**
|
|
201
|
+
* Inbound Webhook
|
|
202
|
+
*
|
|
203
|
+
* Before an inbound call or channel chat starts, ask the workspace's inbound webhook for its vars, secrets, overrides, metadata and userdata. Refused if it does not answer.
|
|
204
|
+
*/
|
|
205
|
+
inbound_webhook?: boolean;
|
|
200
206
|
keypad_input?: KeypadInputSpec;
|
|
201
207
|
/**
|
|
202
208
|
* Language
|
|
@@ -318,7 +324,7 @@ export type AgentOverride = {
|
|
|
318
324
|
/**
|
|
319
325
|
* Greeting
|
|
320
326
|
*
|
|
321
|
-
* The opening line, spoken on connect and on the way in from a handoff; empty or null makes the agent wait for the caller to speak first. Voice and video only. Supports the same substitutions as the prompt, plus `{{
|
|
327
|
+
* The opening line, spoken on connect and on the way in from a handoff; empty or null makes the agent wait for the caller to speak first. Voice and video only. Supports the same substitutions as the prompt, plus `{{recording.notice}}`, the recording notice's place in the line.
|
|
322
328
|
*/
|
|
323
329
|
greeting?: string | null;
|
|
324
330
|
/**
|
|
@@ -333,6 +339,12 @@ export type AgentOverride = {
|
|
|
333
339
|
* Where this agent may hand the conversation next. Each entry becomes one tool the model can call, so routing quality lives in its `description`. A target is a stored agent (`agent_id`) or a member of the team defined on the call.
|
|
334
340
|
*/
|
|
335
341
|
handoffs?: Array<HandoffTarget> | null;
|
|
342
|
+
/**
|
|
343
|
+
* Inbound Webhook
|
|
344
|
+
*
|
|
345
|
+
* Before an inbound call or channel chat starts, ask the workspace's inbound webhook for its vars, secrets, overrides, metadata and userdata. Refused if it does not answer.
|
|
346
|
+
*/
|
|
347
|
+
inbound_webhook?: boolean | null;
|
|
336
348
|
keypad_input?: KeypadInputSpecOverride | null;
|
|
337
349
|
/**
|
|
338
350
|
* Language
|
|
@@ -1169,6 +1181,19 @@ export type BuiltinToolSpec = {
|
|
|
1169
1181
|
*/
|
|
1170
1182
|
type: string;
|
|
1171
1183
|
};
|
|
1184
|
+
/**
|
|
1185
|
+
* ButtonTap
|
|
1186
|
+
*/
|
|
1187
|
+
export type ButtonTap = {
|
|
1188
|
+
/**
|
|
1189
|
+
* Payload
|
|
1190
|
+
*/
|
|
1191
|
+
payload?: string | null;
|
|
1192
|
+
/**
|
|
1193
|
+
* Text
|
|
1194
|
+
*/
|
|
1195
|
+
text: string;
|
|
1196
|
+
};
|
|
1172
1197
|
/**
|
|
1173
1198
|
* CallBatchCounts
|
|
1174
1199
|
*/
|
|
@@ -1498,6 +1523,14 @@ export type CallSessionResponse = {
|
|
|
1498
1523
|
* Livekit Room
|
|
1499
1524
|
*/
|
|
1500
1525
|
livekit_room: string | null;
|
|
1526
|
+
/**
|
|
1527
|
+
* Metadata
|
|
1528
|
+
*
|
|
1529
|
+
* Your own labels for this session, set by your inbound webhook.
|
|
1530
|
+
*/
|
|
1531
|
+
metadata: {
|
|
1532
|
+
[key: string]: string;
|
|
1533
|
+
};
|
|
1501
1534
|
/**
|
|
1502
1535
|
* Phone Number Id
|
|
1503
1536
|
*/
|
|
@@ -1634,6 +1667,14 @@ export type CallSummaryResponse = {
|
|
|
1634
1667
|
* Message Count
|
|
1635
1668
|
*/
|
|
1636
1669
|
message_count?: number;
|
|
1670
|
+
/**
|
|
1671
|
+
* Metadata
|
|
1672
|
+
*
|
|
1673
|
+
* Your own labels for this session, set by your inbound webhook.
|
|
1674
|
+
*/
|
|
1675
|
+
metadata: {
|
|
1676
|
+
[key: string]: string;
|
|
1677
|
+
};
|
|
1637
1678
|
/**
|
|
1638
1679
|
* Outcome
|
|
1639
1680
|
*/
|
|
@@ -1891,6 +1932,14 @@ export type ChatResponse = {
|
|
|
1891
1932
|
* Id
|
|
1892
1933
|
*/
|
|
1893
1934
|
id: string;
|
|
1935
|
+
/**
|
|
1936
|
+
* Metadata
|
|
1937
|
+
*
|
|
1938
|
+
* Your own labels for this session, set by your inbound webhook.
|
|
1939
|
+
*/
|
|
1940
|
+
metadata: {
|
|
1941
|
+
[key: string]: string;
|
|
1942
|
+
};
|
|
1894
1943
|
/**
|
|
1895
1944
|
* Started At
|
|
1896
1945
|
*/
|
|
@@ -2140,10 +2189,24 @@ export type ConversationItemResponse = {
|
|
|
2140
2189
|
* Attachments
|
|
2141
2190
|
*/
|
|
2142
2191
|
attachments: Array<ConversationAttachment>;
|
|
2192
|
+
/**
|
|
2193
|
+
* Who at your business posted this.
|
|
2194
|
+
*/
|
|
2195
|
+
author: ItemAuthor | null;
|
|
2196
|
+
/**
|
|
2197
|
+
* Channel
|
|
2198
|
+
*
|
|
2199
|
+
* How this item reached us or the person; null for notes and instructions.
|
|
2200
|
+
*/
|
|
2201
|
+
channel: 'phone_call' | 'whatsapp_call' | 'whatsapp_message' | 'web_call' | 'chat' | 'telegram' | 'stream' | 'copilot' | null;
|
|
2143
2202
|
/**
|
|
2144
2203
|
* Client Message Id
|
|
2145
2204
|
*/
|
|
2146
2205
|
client_message_id: string | null;
|
|
2206
|
+
/**
|
|
2207
|
+
* What the person sent besides text; null for plain text.
|
|
2208
|
+
*/
|
|
2209
|
+
content: InboundContent | null;
|
|
2147
2210
|
/**
|
|
2148
2211
|
* Conversation Id
|
|
2149
2212
|
*/
|
|
@@ -2156,7 +2219,7 @@ export type ConversationItemResponse = {
|
|
|
2156
2219
|
/**
|
|
2157
2220
|
* Delivery Status
|
|
2158
2221
|
*/
|
|
2159
|
-
delivery_status: 'not_applicable' | 'pending' | 'sending' | 'sent' | 'failed' | 'skipped';
|
|
2222
|
+
delivery_status: 'not_applicable' | 'pending' | 'held' | 'sending' | 'queued' | 'sent' | 'delivered' | 'read' | 'undelivered' | 'failed' | 'skipped' | 'expired';
|
|
2160
2223
|
/**
|
|
2161
2224
|
* Direction
|
|
2162
2225
|
*/
|
|
@@ -2169,6 +2232,16 @@ export type ConversationItemResponse = {
|
|
|
2169
2232
|
* Id
|
|
2170
2233
|
*/
|
|
2171
2234
|
id: string;
|
|
2235
|
+
/**
|
|
2236
|
+
* Idempotency Key
|
|
2237
|
+
*/
|
|
2238
|
+
idempotency_key: string | null;
|
|
2239
|
+
/**
|
|
2240
|
+
* Images Not Kept
|
|
2241
|
+
*
|
|
2242
|
+
* Images the person sent that were not stored, and why.
|
|
2243
|
+
*/
|
|
2244
|
+
images_not_kept: Array<ImageNotKept>;
|
|
2172
2245
|
latency: ReplyLatency | null;
|
|
2173
2246
|
/**
|
|
2174
2247
|
* Metadata
|
|
@@ -2181,6 +2254,12 @@ export type ConversationItemResponse = {
|
|
|
2181
2254
|
* Origin
|
|
2182
2255
|
*/
|
|
2183
2256
|
origin: 'speech' | 'typed' | 'keypad' | null;
|
|
2257
|
+
/**
|
|
2258
|
+
* Post Type
|
|
2259
|
+
*
|
|
2260
|
+
* What was posted through the API; null for everything else.
|
|
2261
|
+
*/
|
|
2262
|
+
post_type: 'template' | 'agent_text' | 'note' | 'instruction' | null;
|
|
2184
2263
|
/**
|
|
2185
2264
|
* Provider Message Id
|
|
2186
2265
|
*/
|
|
@@ -2203,10 +2282,6 @@ export type ConversationItemResponse = {
|
|
|
2203
2282
|
* Session Id
|
|
2204
2283
|
*/
|
|
2205
2284
|
session_id: string | null;
|
|
2206
|
-
/**
|
|
2207
|
-
* Source
|
|
2208
|
-
*/
|
|
2209
|
-
source: string | null;
|
|
2210
2285
|
/**
|
|
2211
2286
|
* Text
|
|
2212
2287
|
*/
|
|
@@ -2242,32 +2317,46 @@ export type ConversationItemResponse = {
|
|
|
2242
2317
|
* The contact this conversation belongs to: key, binding, and what we know.
|
|
2243
2318
|
*/
|
|
2244
2319
|
export type ConversationRefSummary = {
|
|
2245
|
-
/**
|
|
2246
|
-
* Bind Id
|
|
2247
|
-
*/
|
|
2248
|
-
bind_id?: string | null;
|
|
2249
2320
|
/**
|
|
2250
2321
|
* Contact Key
|
|
2251
2322
|
*/
|
|
2252
|
-
contact_key
|
|
2323
|
+
contact_key: string;
|
|
2253
2324
|
/**
|
|
2254
2325
|
* Display Name
|
|
2255
2326
|
*/
|
|
2256
|
-
display_name
|
|
2327
|
+
display_name: string | null;
|
|
2257
2328
|
/**
|
|
2258
2329
|
* Integration Id
|
|
2259
2330
|
*/
|
|
2260
|
-
integration_id
|
|
2331
|
+
integration_id: string | null;
|
|
2261
2332
|
/**
|
|
2262
2333
|
* Kind
|
|
2263
2334
|
*/
|
|
2264
|
-
kind
|
|
2335
|
+
kind: 'phone' | 'integration' | 'stream' | 'web';
|
|
2265
2336
|
/**
|
|
2266
2337
|
* Metadata
|
|
2267
2338
|
*/
|
|
2268
|
-
metadata
|
|
2339
|
+
metadata: {
|
|
2269
2340
|
[key: string]: unknown;
|
|
2270
2341
|
};
|
|
2342
|
+
/**
|
|
2343
|
+
* Number
|
|
2344
|
+
*
|
|
2345
|
+
* Your number, on a phone contact.
|
|
2346
|
+
*/
|
|
2347
|
+
number: string | null;
|
|
2348
|
+
/**
|
|
2349
|
+
* Peer
|
|
2350
|
+
*
|
|
2351
|
+
* Their number, on a phone contact.
|
|
2352
|
+
*/
|
|
2353
|
+
peer: string | null;
|
|
2354
|
+
/**
|
|
2355
|
+
* Whatsapp Window Expires At
|
|
2356
|
+
*
|
|
2357
|
+
* When free-form WhatsApp messages stop being allowed; null if they never contacted you on WhatsApp.
|
|
2358
|
+
*/
|
|
2359
|
+
whatsapp_window_expires_at: string | null;
|
|
2271
2360
|
};
|
|
2272
2361
|
/**
|
|
2273
2362
|
* ConversationResponse
|
|
@@ -2395,6 +2484,14 @@ export type ConversationSessionResponse = {
|
|
|
2395
2484
|
* Integration Id
|
|
2396
2485
|
*/
|
|
2397
2486
|
integration_id: string | null;
|
|
2487
|
+
/**
|
|
2488
|
+
* Metadata
|
|
2489
|
+
*
|
|
2490
|
+
* Your own labels for this session, set by your inbound webhook.
|
|
2491
|
+
*/
|
|
2492
|
+
metadata: {
|
|
2493
|
+
[key: string]: string;
|
|
2494
|
+
};
|
|
2398
2495
|
metrics: SessionMetrics;
|
|
2399
2496
|
/**
|
|
2400
2497
|
* Started At
|
|
@@ -2896,7 +2993,7 @@ export type CreateCallBatchRequest = {
|
|
|
2896
2993
|
/**
|
|
2897
2994
|
* Vars
|
|
2898
2995
|
*
|
|
2899
|
-
* Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so
|
|
2996
|
+
* Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so credentials go in `secrets` (this session's own, where the request takes them) or a workspace secret, read as {{secrets.NAME}} by a tool.
|
|
2900
2997
|
*/
|
|
2901
2998
|
vars?: {
|
|
2902
2999
|
[key: string]: string;
|
|
@@ -2907,7 +3004,8 @@ export type CreateCallBatchRequest = {
|
|
|
2907
3004
|
*
|
|
2908
3005
|
* Who the chat is with, what it starts knowing, and what runs.
|
|
2909
3006
|
*
|
|
2910
|
-
* `vars` comes from `AgentPlanRequest` and
|
|
3007
|
+
* `vars` comes from `AgentPlanRequest` and `secrets` from `SessionSecretsField`;
|
|
3008
|
+
* both are fixed for the life of the chat.
|
|
2911
3009
|
*/
|
|
2912
3010
|
export type CreateChatRequest = {
|
|
2913
3011
|
/**
|
|
@@ -2938,6 +3036,14 @@ export type CreateChatRequest = {
|
|
|
2938
3036
|
* Contact Key
|
|
2939
3037
|
*/
|
|
2940
3038
|
contact_key?: string | null;
|
|
3039
|
+
/**
|
|
3040
|
+
* Secrets
|
|
3041
|
+
*
|
|
3042
|
+
* Secrets for this session only, read by tools as {{secrets.NAME}}; a name here overrides the workspace secret. Never shown to the model or returned.
|
|
3043
|
+
*/
|
|
3044
|
+
secrets?: {
|
|
3045
|
+
[key: string]: string;
|
|
3046
|
+
} | null;
|
|
2941
3047
|
/**
|
|
2942
3048
|
* Userdata
|
|
2943
3049
|
*/
|
|
@@ -2947,7 +3053,7 @@ export type CreateChatRequest = {
|
|
|
2947
3053
|
/**
|
|
2948
3054
|
* Vars
|
|
2949
3055
|
*
|
|
2950
|
-
* Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so
|
|
3056
|
+
* Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so credentials go in `secrets` (this session's own, where the request takes them) or a workspace secret, read as {{secrets.NAME}} by a tool.
|
|
2951
3057
|
*/
|
|
2952
3058
|
vars?: {
|
|
2953
3059
|
[key: string]: string;
|
|
@@ -3682,9 +3788,16 @@ export type DeleteTaskRunsResponse = {
|
|
|
3682
3788
|
*
|
|
3683
3789
|
* Outbound delivery failure detail (provider HTTP / shadow-mode skips).
|
|
3684
3790
|
*
|
|
3685
|
-
* Writers always store `{"message": ...}`
|
|
3791
|
+
* Writers always store `{"message": ...}`, plus the provider's `code` when it
|
|
3792
|
+
* gave one (see services.messaging.delivery).
|
|
3686
3793
|
*/
|
|
3687
3794
|
export type DeliveryError = {
|
|
3795
|
+
/**
|
|
3796
|
+
* Code
|
|
3797
|
+
*
|
|
3798
|
+
* The provider's error code, if any.
|
|
3799
|
+
*/
|
|
3800
|
+
code: string | null;
|
|
3688
3801
|
/**
|
|
3689
3802
|
* Message
|
|
3690
3803
|
*/
|
|
@@ -4321,9 +4434,15 @@ export type EndpointingSpecOverride = {
|
|
|
4321
4434
|
* of individual `errors` (used wherever we surface many problems at once,
|
|
4322
4435
|
* including tool publish, op-tree checks, and request validation). The global
|
|
4323
4436
|
* exception handlers normalize every API error to
|
|
4324
|
-
* `{detail: {message, errors}}`, so SDKs can parse one shape consistently.
|
|
4437
|
+
* `{detail: {message, errors, code}}`, so SDKs can parse one shape consistently.
|
|
4325
4438
|
*/
|
|
4326
4439
|
export type ErrorBody = {
|
|
4440
|
+
/**
|
|
4441
|
+
* Code
|
|
4442
|
+
*
|
|
4443
|
+
* A stable identifier for this error, when it has one.
|
|
4444
|
+
*/
|
|
4445
|
+
code?: string | null;
|
|
4327
4446
|
/**
|
|
4328
4447
|
* Errors
|
|
4329
4448
|
*/
|
|
@@ -5061,6 +5180,15 @@ export type IfOperation = {
|
|
|
5061
5180
|
*/
|
|
5062
5181
|
then?: Array<HttpOperation | CodeOperation | FrontendRpcOperation | IfOperation | SetVariableOperation | SayOperation | GenerateReplyOperation | AddMessageOperation | EndCallOperation | HandoffOperation | TransferOperation | SendDtmfOperation> | null;
|
|
5063
5182
|
};
|
|
5183
|
+
/**
|
|
5184
|
+
* ImageNotKept
|
|
5185
|
+
*/
|
|
5186
|
+
export type ImageNotKept = {
|
|
5187
|
+
/**
|
|
5188
|
+
* Reason
|
|
5189
|
+
*/
|
|
5190
|
+
reason: string;
|
|
5191
|
+
};
|
|
5064
5192
|
/**
|
|
5065
5193
|
* ImportPhoneNumbersRequest
|
|
5066
5194
|
*/
|
|
@@ -5119,6 +5247,24 @@ export type ImportedNumberResult = {
|
|
|
5119
5247
|
ok: boolean;
|
|
5120
5248
|
phone_number?: PhoneNumberResponse | null;
|
|
5121
5249
|
};
|
|
5250
|
+
/**
|
|
5251
|
+
* InboundContent
|
|
5252
|
+
*
|
|
5253
|
+
* What the person sent besides text.
|
|
5254
|
+
*/
|
|
5255
|
+
export type InboundContent = {
|
|
5256
|
+
button: ButtonTap;
|
|
5257
|
+
/**
|
|
5258
|
+
* Kind
|
|
5259
|
+
*/
|
|
5260
|
+
kind: 'button';
|
|
5261
|
+
/**
|
|
5262
|
+
* Replied To
|
|
5263
|
+
*
|
|
5264
|
+
* Provider id of the message this answers, e.g. the template.
|
|
5265
|
+
*/
|
|
5266
|
+
replied_to?: string | null;
|
|
5267
|
+
};
|
|
5122
5268
|
/**
|
|
5123
5269
|
* InboundImage
|
|
5124
5270
|
*
|
|
@@ -5134,6 +5280,35 @@ export type InboundImage = {
|
|
|
5134
5280
|
*/
|
|
5135
5281
|
filename?: string | null;
|
|
5136
5282
|
};
|
|
5283
|
+
/**
|
|
5284
|
+
* InboundWebhookResponse
|
|
5285
|
+
*
|
|
5286
|
+
* The workspace's inbound session webhook.
|
|
5287
|
+
*/
|
|
5288
|
+
export type InboundWebhookResponse = {
|
|
5289
|
+
/**
|
|
5290
|
+
* Created At
|
|
5291
|
+
*/
|
|
5292
|
+
created_at: string;
|
|
5293
|
+
/**
|
|
5294
|
+
* Secret
|
|
5295
|
+
*
|
|
5296
|
+
* The signing secret, only when it was just created or rotated.
|
|
5297
|
+
*/
|
|
5298
|
+
secret: string | null;
|
|
5299
|
+
/**
|
|
5300
|
+
* Secret Hint
|
|
5301
|
+
*/
|
|
5302
|
+
secret_hint: string;
|
|
5303
|
+
/**
|
|
5304
|
+
* Updated At
|
|
5305
|
+
*/
|
|
5306
|
+
updated_at: string;
|
|
5307
|
+
/**
|
|
5308
|
+
* Url
|
|
5309
|
+
*/
|
|
5310
|
+
url: string;
|
|
5311
|
+
};
|
|
5137
5312
|
/**
|
|
5138
5313
|
* InlineFaq
|
|
5139
5314
|
*
|
|
@@ -5612,6 +5787,21 @@ export type InterruptionSpecOverride = {
|
|
|
5612
5787
|
*/
|
|
5613
5788
|
resume_false_interruption?: boolean | null;
|
|
5614
5789
|
};
|
|
5790
|
+
/**
|
|
5791
|
+
* ItemAuthor
|
|
5792
|
+
*
|
|
5793
|
+
* Who at your business posted an item.
|
|
5794
|
+
*/
|
|
5795
|
+
export type ItemAuthor = {
|
|
5796
|
+
/**
|
|
5797
|
+
* Id
|
|
5798
|
+
*/
|
|
5799
|
+
id: string;
|
|
5800
|
+
/**
|
|
5801
|
+
* Name
|
|
5802
|
+
*/
|
|
5803
|
+
name: string;
|
|
5804
|
+
};
|
|
5615
5805
|
/**
|
|
5616
5806
|
* ItemCreatedEvent
|
|
5617
5807
|
*
|
|
@@ -5630,10 +5820,24 @@ export type ItemCreatedEvent = {
|
|
|
5630
5820
|
* Attachments
|
|
5631
5821
|
*/
|
|
5632
5822
|
attachments: Array<ConversationAttachment>;
|
|
5823
|
+
/**
|
|
5824
|
+
* Who at your business posted this.
|
|
5825
|
+
*/
|
|
5826
|
+
author: ItemAuthor | null;
|
|
5827
|
+
/**
|
|
5828
|
+
* Channel
|
|
5829
|
+
*
|
|
5830
|
+
* How this item reached us or the person; null for notes and instructions.
|
|
5831
|
+
*/
|
|
5832
|
+
channel: 'phone_call' | 'whatsapp_call' | 'whatsapp_message' | 'web_call' | 'chat' | 'telegram' | 'stream' | 'copilot' | null;
|
|
5633
5833
|
/**
|
|
5634
5834
|
* Client Message Id
|
|
5635
5835
|
*/
|
|
5636
5836
|
client_message_id: string | null;
|
|
5837
|
+
/**
|
|
5838
|
+
* What the person sent besides text; null for plain text.
|
|
5839
|
+
*/
|
|
5840
|
+
content: InboundContent | null;
|
|
5637
5841
|
/**
|
|
5638
5842
|
* Conversation Id
|
|
5639
5843
|
*/
|
|
@@ -5646,7 +5850,7 @@ export type ItemCreatedEvent = {
|
|
|
5646
5850
|
/**
|
|
5647
5851
|
* Delivery Status
|
|
5648
5852
|
*/
|
|
5649
|
-
delivery_status: 'not_applicable' | 'pending' | 'sending' | 'sent' | 'failed' | 'skipped';
|
|
5853
|
+
delivery_status: 'not_applicable' | 'pending' | 'held' | 'sending' | 'queued' | 'sent' | 'delivered' | 'read' | 'undelivered' | 'failed' | 'skipped' | 'expired';
|
|
5650
5854
|
/**
|
|
5651
5855
|
* Direction
|
|
5652
5856
|
*/
|
|
@@ -5663,6 +5867,16 @@ export type ItemCreatedEvent = {
|
|
|
5663
5867
|
* Id
|
|
5664
5868
|
*/
|
|
5665
5869
|
id: string;
|
|
5870
|
+
/**
|
|
5871
|
+
* Idempotency Key
|
|
5872
|
+
*/
|
|
5873
|
+
idempotency_key: string | null;
|
|
5874
|
+
/**
|
|
5875
|
+
* Images Not Kept
|
|
5876
|
+
*
|
|
5877
|
+
* Images the person sent that were not stored, and why.
|
|
5878
|
+
*/
|
|
5879
|
+
images_not_kept: Array<ImageNotKept>;
|
|
5666
5880
|
latency: ReplyLatency | null;
|
|
5667
5881
|
/**
|
|
5668
5882
|
* Metadata
|
|
@@ -5675,6 +5889,12 @@ export type ItemCreatedEvent = {
|
|
|
5675
5889
|
* Origin
|
|
5676
5890
|
*/
|
|
5677
5891
|
origin: 'speech' | 'typed' | 'keypad' | null;
|
|
5892
|
+
/**
|
|
5893
|
+
* Post Type
|
|
5894
|
+
*
|
|
5895
|
+
* What was posted through the API; null for everything else.
|
|
5896
|
+
*/
|
|
5897
|
+
post_type: 'template' | 'agent_text' | 'note' | 'instruction' | null;
|
|
5678
5898
|
/**
|
|
5679
5899
|
* Provider Message Id
|
|
5680
5900
|
*/
|
|
@@ -5697,10 +5917,6 @@ export type ItemCreatedEvent = {
|
|
|
5697
5917
|
* Session Id
|
|
5698
5918
|
*/
|
|
5699
5919
|
session_id: string | null;
|
|
5700
|
-
/**
|
|
5701
|
-
* Source
|
|
5702
|
-
*/
|
|
5703
|
-
source: string | null;
|
|
5704
5920
|
/**
|
|
5705
5921
|
* Text
|
|
5706
5922
|
*/
|
|
@@ -5733,13 +5949,13 @@ export type ItemCreatedEvent = {
|
|
|
5733
5949
|
/**
|
|
5734
5950
|
* ItemDeliveryUpdatedEvent
|
|
5735
5951
|
*
|
|
5736
|
-
* An outbound item
|
|
5952
|
+
* An outbound item's delivery moved: claimed, sent, held, a receipt, or a failure.
|
|
5737
5953
|
*/
|
|
5738
5954
|
export type ItemDeliveryUpdatedEvent = {
|
|
5739
5955
|
/**
|
|
5740
5956
|
* Delivery Status
|
|
5741
5957
|
*/
|
|
5742
|
-
delivery_status: 'not_applicable' | 'pending' | 'sending' | 'sent' | 'failed' | 'skipped';
|
|
5958
|
+
delivery_status: 'not_applicable' | 'pending' | 'held' | 'sending' | 'queued' | 'sent' | 'delivered' | 'read' | 'undelivered' | 'failed' | 'skipped' | 'expired';
|
|
5743
5959
|
/**
|
|
5744
5960
|
* Error
|
|
5745
5961
|
*/
|
|
@@ -7002,12 +7218,19 @@ export type OkResponse = {
|
|
|
7002
7218
|
*/
|
|
7003
7219
|
ok?: boolean;
|
|
7004
7220
|
};
|
|
7221
|
+
/**
|
|
7222
|
+
* OpenerPolicy
|
|
7223
|
+
*/
|
|
7224
|
+
export type OpenerPolicy = {
|
|
7225
|
+
opener: TemplateSend;
|
|
7226
|
+
};
|
|
7005
7227
|
/**
|
|
7006
7228
|
* OutboundCallRequest
|
|
7007
7229
|
*
|
|
7008
7230
|
* One phone call: who to dial, from which of your numbers, and what runs.
|
|
7009
7231
|
*
|
|
7010
|
-
* `vars` comes from `AgentPlanRequest` and
|
|
7232
|
+
* `vars` comes from `AgentPlanRequest` and `secrets` from `SessionSecretsField`;
|
|
7233
|
+
* both last exactly as long as this call.
|
|
7011
7234
|
*/
|
|
7012
7235
|
export type OutboundCallRequest = {
|
|
7013
7236
|
/**
|
|
@@ -7038,6 +7261,14 @@ export type OutboundCallRequest = {
|
|
|
7038
7261
|
* From Phone Number Id
|
|
7039
7262
|
*/
|
|
7040
7263
|
from_phone_number_id: string;
|
|
7264
|
+
/**
|
|
7265
|
+
* Secrets
|
|
7266
|
+
*
|
|
7267
|
+
* Secrets for this session only, read by tools as {{secrets.NAME}}; a name here overrides the workspace secret. Never shown to the model or returned.
|
|
7268
|
+
*/
|
|
7269
|
+
secrets?: {
|
|
7270
|
+
[key: string]: string;
|
|
7271
|
+
} | null;
|
|
7041
7272
|
/**
|
|
7042
7273
|
* To
|
|
7043
7274
|
*/
|
|
@@ -7051,7 +7282,7 @@ export type OutboundCallRequest = {
|
|
|
7051
7282
|
/**
|
|
7052
7283
|
* Vars
|
|
7053
7284
|
*
|
|
7054
|
-
* Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so
|
|
7285
|
+
* Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so credentials go in `secrets` (this session's own, where the request takes them) or a workspace secret, read as {{secrets.NAME}} by a tool.
|
|
7055
7286
|
*/
|
|
7056
7287
|
vars?: {
|
|
7057
7288
|
[key: string]: string;
|
|
@@ -8354,6 +8585,76 @@ export type PlatformFeePerMinute = {
|
|
|
8354
8585
|
*/
|
|
8355
8586
|
voice: number;
|
|
8356
8587
|
};
|
|
8588
|
+
/**
|
|
8589
|
+
* PostItemRequest
|
|
8590
|
+
*/
|
|
8591
|
+
export type PostItemRequest = {
|
|
8592
|
+
/**
|
|
8593
|
+
* Who at your business posted this; shown in transcripts, never sent to the person or shown to the agent.
|
|
8594
|
+
*/
|
|
8595
|
+
author?: ItemAuthor | null;
|
|
8596
|
+
/**
|
|
8597
|
+
* Idempotency Key
|
|
8598
|
+
*/
|
|
8599
|
+
idempotency_key?: string | null;
|
|
8600
|
+
/**
|
|
8601
|
+
* On Window Closed
|
|
8602
|
+
*
|
|
8603
|
+
* fail refuses free text outside WhatsApp's 24h window; an opener sends that template and holds the message until they reply.
|
|
8604
|
+
*/
|
|
8605
|
+
on_window_closed?: 'fail' | OpenerPolicy;
|
|
8606
|
+
/**
|
|
8607
|
+
* For `template` only.
|
|
8608
|
+
*/
|
|
8609
|
+
template?: TemplateSend | null;
|
|
8610
|
+
/**
|
|
8611
|
+
* Text
|
|
8612
|
+
*
|
|
8613
|
+
* For the other three types.
|
|
8614
|
+
*/
|
|
8615
|
+
text?: string | null;
|
|
8616
|
+
/**
|
|
8617
|
+
* The conversation, or your number and theirs to reach a person with no conversation yet.
|
|
8618
|
+
*/
|
|
8619
|
+
to: PostTarget;
|
|
8620
|
+
/**
|
|
8621
|
+
* Type
|
|
8622
|
+
*
|
|
8623
|
+
* template and agent_text are delivered; note is never delivered; instruct has the agent write and send a message.
|
|
8624
|
+
*/
|
|
8625
|
+
type: 'template' | 'agent_text' | 'note' | 'instruct';
|
|
8626
|
+
/**
|
|
8627
|
+
* Userdata
|
|
8628
|
+
*
|
|
8629
|
+
* Merged into the person's userdata and given to the agent that answers their reply.
|
|
8630
|
+
*/
|
|
8631
|
+
userdata?: {
|
|
8632
|
+
[key: string]: unknown;
|
|
8633
|
+
} | null;
|
|
8634
|
+
};
|
|
8635
|
+
/**
|
|
8636
|
+
* PostTarget
|
|
8637
|
+
*
|
|
8638
|
+
* `conversation_id`, or `number` and `peer`.
|
|
8639
|
+
*/
|
|
8640
|
+
export type PostTarget = {
|
|
8641
|
+
/**
|
|
8642
|
+
* Conversation Id
|
|
8643
|
+
*/
|
|
8644
|
+
conversation_id?: string | null;
|
|
8645
|
+
/**
|
|
8646
|
+
* Number
|
|
8647
|
+
*
|
|
8648
|
+
* Your business number, E.164.
|
|
8649
|
+
*/
|
|
8650
|
+
number?: string | null;
|
|
8651
|
+
/**
|
|
8652
|
+
* Peer
|
|
8653
|
+
*
|
|
8654
|
+
* The person's number.
|
|
8655
|
+
*/
|
|
8656
|
+
peer?: string | null;
|
|
8657
|
+
};
|
|
8357
8658
|
/**
|
|
8358
8659
|
* PreemptiveGenerationSpec
|
|
8359
8660
|
*
|
|
@@ -9148,30 +9449,24 @@ export type RecordingResponse = {
|
|
|
9148
9449
|
/**
|
|
9149
9450
|
* RecordingSpec
|
|
9150
9451
|
*
|
|
9151
|
-
* Whether calls with this agent are recorded, and
|
|
9452
|
+
* Whether calls with this agent are recorded, and whether the caller is told.
|
|
9152
9453
|
*
|
|
9153
9454
|
* On by default: one stereo file per call, kept until the workspace's
|
|
9154
9455
|
* retention policy deletes it.
|
|
9155
9456
|
*/
|
|
9156
9457
|
export type RecordingSpec = {
|
|
9157
|
-
/**
|
|
9158
|
-
* Consent
|
|
9159
|
-
*
|
|
9160
|
-
* Set to 'disclosure' to tell the caller the call is recorded. The greeting must then contain `{{consent.notice}}` to say where, and the agent gains a tool to stop recording if the caller objects.
|
|
9161
|
-
*/
|
|
9162
|
-
consent?: 'off' | 'disclosure';
|
|
9163
|
-
/**
|
|
9164
|
-
* Consent Notice
|
|
9165
|
-
*
|
|
9166
|
-
* The sentence `{{consent.notice}}` resolves to in the greeting.
|
|
9167
|
-
*/
|
|
9168
|
-
consent_notice?: string;
|
|
9169
9458
|
/**
|
|
9170
9459
|
* Enabled
|
|
9171
9460
|
*
|
|
9172
9461
|
* Record the call audio. Voice and video agents only.
|
|
9173
9462
|
*/
|
|
9174
9463
|
enabled?: boolean;
|
|
9464
|
+
/**
|
|
9465
|
+
* Notice
|
|
9466
|
+
*
|
|
9467
|
+
* Spoken where the greeting places {{recording.notice}}, uninterruptibly. Null: no notice.
|
|
9468
|
+
*/
|
|
9469
|
+
notice?: string | null;
|
|
9175
9470
|
};
|
|
9176
9471
|
/**
|
|
9177
9472
|
* RecordingSpecOverride
|
|
@@ -9179,31 +9474,25 @@ export type RecordingSpec = {
|
|
|
9179
9474
|
* A partial RecordingSpec: only the fields this call changes. Absent keeps the base value, an explicit null clears it, objects deep-merge and lists replace.
|
|
9180
9475
|
*/
|
|
9181
9476
|
export type RecordingSpecOverride = {
|
|
9182
|
-
/**
|
|
9183
|
-
* Consent
|
|
9184
|
-
*
|
|
9185
|
-
* Set to 'disclosure' to tell the caller the call is recorded. The greeting must then contain `{{consent.notice}}` to say where, and the agent gains a tool to stop recording if the caller objects.
|
|
9186
|
-
*/
|
|
9187
|
-
consent?: 'off' | 'disclosure' | null;
|
|
9188
|
-
/**
|
|
9189
|
-
* Consent Notice
|
|
9190
|
-
*
|
|
9191
|
-
* The sentence `{{consent.notice}}` resolves to in the greeting.
|
|
9192
|
-
*/
|
|
9193
|
-
consent_notice?: string | null;
|
|
9194
9477
|
/**
|
|
9195
9478
|
* Enabled
|
|
9196
9479
|
*
|
|
9197
9480
|
* Record the call audio. Voice and video agents only.
|
|
9198
9481
|
*/
|
|
9199
9482
|
enabled?: boolean | null;
|
|
9483
|
+
/**
|
|
9484
|
+
* Notice
|
|
9485
|
+
*
|
|
9486
|
+
* Spoken where the greeting places {{recording.notice}}, uninterruptibly. Null: no notice.
|
|
9487
|
+
*/
|
|
9488
|
+
notice?: string | null;
|
|
9200
9489
|
};
|
|
9201
9490
|
/**
|
|
9202
9491
|
* RecordingState
|
|
9203
9492
|
*
|
|
9204
9493
|
* What a reader should do about it. `available` is the only playable one.
|
|
9205
9494
|
*/
|
|
9206
|
-
export type RecordingState = 'none' | 'available' | 'pending' | 'expired' | 'failed' | 'not_shared' | '
|
|
9495
|
+
export type RecordingState = 'none' | 'available' | 'pending' | 'expired' | 'failed' | 'not_shared' | 'deleted';
|
|
9207
9496
|
/**
|
|
9208
9497
|
* RedraftRequest
|
|
9209
9498
|
*
|
|
@@ -9316,6 +9605,14 @@ export type ResumeCallRequest = {
|
|
|
9316
9605
|
* Region
|
|
9317
9606
|
*/
|
|
9318
9607
|
region?: 'us' | 'in';
|
|
9608
|
+
/**
|
|
9609
|
+
* Secrets
|
|
9610
|
+
*
|
|
9611
|
+
* Secrets to add or replace for the resumed call; the dropped call's are kept.
|
|
9612
|
+
*/
|
|
9613
|
+
secrets?: {
|
|
9614
|
+
[key: string]: string;
|
|
9615
|
+
} | null;
|
|
9319
9616
|
};
|
|
9320
9617
|
/**
|
|
9321
9618
|
* RoutedTTS
|
|
@@ -9432,6 +9729,14 @@ export type RunToolRequest = {
|
|
|
9432
9729
|
arguments?: {
|
|
9433
9730
|
[key: string]: unknown;
|
|
9434
9731
|
};
|
|
9732
|
+
/**
|
|
9733
|
+
* Secrets
|
|
9734
|
+
*
|
|
9735
|
+
* Session secrets for this run; override workspace secrets of the same name.
|
|
9736
|
+
*/
|
|
9737
|
+
secrets?: {
|
|
9738
|
+
[key: string]: string;
|
|
9739
|
+
} | null;
|
|
9435
9740
|
/**
|
|
9436
9741
|
* Timezone
|
|
9437
9742
|
*
|
|
@@ -10016,13 +10321,24 @@ export type SessionUsage = {
|
|
|
10016
10321
|
tts: Array<TTSUsage>;
|
|
10017
10322
|
};
|
|
10018
10323
|
/**
|
|
10019
|
-
*
|
|
10324
|
+
* SetInboundWebhookRequest
|
|
10020
10325
|
*/
|
|
10021
|
-
export type
|
|
10326
|
+
export type SetInboundWebhookRequest = {
|
|
10022
10327
|
/**
|
|
10023
|
-
*
|
|
10328
|
+
* Url
|
|
10329
|
+
*
|
|
10330
|
+
* An https URL on your server.
|
|
10024
10331
|
*/
|
|
10025
|
-
|
|
10332
|
+
url: string;
|
|
10333
|
+
};
|
|
10334
|
+
/**
|
|
10335
|
+
* SetProviderKeyRequest
|
|
10336
|
+
*/
|
|
10337
|
+
export type SetProviderKeyRequest = {
|
|
10338
|
+
/**
|
|
10339
|
+
* Api Key
|
|
10340
|
+
*/
|
|
10341
|
+
api_key: string;
|
|
10026
10342
|
};
|
|
10027
10343
|
/**
|
|
10028
10344
|
* SetVariableConfig
|
|
@@ -10299,6 +10615,12 @@ export type StreamResponse = {
|
|
|
10299
10615
|
* One `{{system_vars.*}}` variable the platform fills in.
|
|
10300
10616
|
*/
|
|
10301
10617
|
export type SystemVarResponse = {
|
|
10618
|
+
/**
|
|
10619
|
+
* Channels
|
|
10620
|
+
*
|
|
10621
|
+
* The session channels this has a value on; empty means every one.
|
|
10622
|
+
*/
|
|
10623
|
+
channels: Array<'phone_call' | 'whatsapp_call' | 'whatsapp_message' | 'web_call' | 'chat' | 'telegram' | 'stream'>;
|
|
10302
10624
|
/**
|
|
10303
10625
|
* Description
|
|
10304
10626
|
*/
|
|
@@ -10311,10 +10633,6 @@ export type SystemVarResponse = {
|
|
|
10311
10633
|
* Key
|
|
10312
10634
|
*/
|
|
10313
10635
|
key: string;
|
|
10314
|
-
/**
|
|
10315
|
-
* Voice Only
|
|
10316
|
-
*/
|
|
10317
|
-
voice_only: boolean;
|
|
10318
10636
|
};
|
|
10319
10637
|
/**
|
|
10320
10638
|
* TTSCatalogEntryResponse
|
|
@@ -11587,6 +11905,81 @@ export type TelephonySetupStep = {
|
|
|
11587
11905
|
*/
|
|
11588
11906
|
user_confirmable: boolean;
|
|
11589
11907
|
};
|
|
11908
|
+
/**
|
|
11909
|
+
* TemplateSend
|
|
11910
|
+
*/
|
|
11911
|
+
export type TemplateSend = {
|
|
11912
|
+
/**
|
|
11913
|
+
* Id
|
|
11914
|
+
*
|
|
11915
|
+
* Twilio Content SID (HX…) or Gupshup template id.
|
|
11916
|
+
*/
|
|
11917
|
+
id: string;
|
|
11918
|
+
/**
|
|
11919
|
+
* Variables
|
|
11920
|
+
*
|
|
11921
|
+
* Every placeholder, button variables included.
|
|
11922
|
+
*/
|
|
11923
|
+
variables?: {
|
|
11924
|
+
[key: string]: string;
|
|
11925
|
+
};
|
|
11926
|
+
};
|
|
11927
|
+
/**
|
|
11928
|
+
* TestInboundWebhookRequest
|
|
11929
|
+
*/
|
|
11930
|
+
export type TestInboundWebhookRequest = {
|
|
11931
|
+
/**
|
|
11932
|
+
* Channel
|
|
11933
|
+
*/
|
|
11934
|
+
channel: 'phone_call' | 'whatsapp_call' | 'whatsapp_message' | 'telegram';
|
|
11935
|
+
/**
|
|
11936
|
+
* Number
|
|
11937
|
+
*
|
|
11938
|
+
* Your number, as `to`.
|
|
11939
|
+
*/
|
|
11940
|
+
number: string;
|
|
11941
|
+
/**
|
|
11942
|
+
* Peer
|
|
11943
|
+
*
|
|
11944
|
+
* Theirs, as `from`.
|
|
11945
|
+
*/
|
|
11946
|
+
peer: string;
|
|
11947
|
+
};
|
|
11948
|
+
/**
|
|
11949
|
+
* TestInboundWebhookResponse
|
|
11950
|
+
*
|
|
11951
|
+
* What your server answered to a sample `session.request`.
|
|
11952
|
+
*/
|
|
11953
|
+
export type TestInboundWebhookResponse = {
|
|
11954
|
+
/**
|
|
11955
|
+
* Duration Ms
|
|
11956
|
+
*/
|
|
11957
|
+
duration_ms: number;
|
|
11958
|
+
/**
|
|
11959
|
+
* Errors
|
|
11960
|
+
*/
|
|
11961
|
+
errors: Array<string>;
|
|
11962
|
+
/**
|
|
11963
|
+
* Response
|
|
11964
|
+
*
|
|
11965
|
+
* The JSON object your server returned.
|
|
11966
|
+
*/
|
|
11967
|
+
response: {
|
|
11968
|
+
[key: string]: unknown;
|
|
11969
|
+
} | null;
|
|
11970
|
+
/**
|
|
11971
|
+
* Status Code
|
|
11972
|
+
*
|
|
11973
|
+
* Null when no HTTP response arrived.
|
|
11974
|
+
*/
|
|
11975
|
+
status_code: number | null;
|
|
11976
|
+
/**
|
|
11977
|
+
* Valid
|
|
11978
|
+
*
|
|
11979
|
+
* Whether a real session would have accepted this answer.
|
|
11980
|
+
*/
|
|
11981
|
+
valid: boolean;
|
|
11982
|
+
};
|
|
11590
11983
|
/**
|
|
11591
11984
|
* TimeWindow
|
|
11592
11985
|
*
|
|
@@ -11624,7 +12017,8 @@ export type TimeWindow = {
|
|
|
11624
12017
|
*
|
|
11625
12018
|
* One browser call: who is on it, what it starts knowing, and what runs.
|
|
11626
12019
|
*
|
|
11627
|
-
* `vars` comes from `AgentPlanRequest` and
|
|
12020
|
+
* `vars` comes from `AgentPlanRequest` and `secrets` from `SessionSecretsField`;
|
|
12021
|
+
* both last exactly as long as this call.
|
|
11628
12022
|
*/
|
|
11629
12023
|
export type TokenRequest = {
|
|
11630
12024
|
/**
|
|
@@ -11659,6 +12053,14 @@ export type TokenRequest = {
|
|
|
11659
12053
|
* Region
|
|
11660
12054
|
*/
|
|
11661
12055
|
region?: 'us' | 'in';
|
|
12056
|
+
/**
|
|
12057
|
+
* Secrets
|
|
12058
|
+
*
|
|
12059
|
+
* Secrets for this session only, read by tools as {{secrets.NAME}}; a name here overrides the workspace secret. Never shown to the model or returned.
|
|
12060
|
+
*/
|
|
12061
|
+
secrets?: {
|
|
12062
|
+
[key: string]: string;
|
|
12063
|
+
} | null;
|
|
11662
12064
|
/**
|
|
11663
12065
|
* Userdata
|
|
11664
12066
|
*/
|
|
@@ -11668,7 +12070,7 @@ export type TokenRequest = {
|
|
|
11668
12070
|
/**
|
|
11669
12071
|
* Vars
|
|
11670
12072
|
*
|
|
11671
|
-
* Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so
|
|
12073
|
+
* Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so credentials go in `secrets` (this session's own, where the request takes them) or a workspace secret, read as {{secrets.NAME}} by a tool.
|
|
11672
12074
|
*/
|
|
11673
12075
|
vars?: {
|
|
11674
12076
|
[key: string]: string;
|
|
@@ -13660,6 +14062,12 @@ export type CallsListData = {
|
|
|
13660
14062
|
* only calls placed by this outbound batch, retries included
|
|
13661
14063
|
*/
|
|
13662
14064
|
batch_id?: string | null;
|
|
14065
|
+
/**
|
|
14066
|
+
* Metadata
|
|
14067
|
+
*
|
|
14068
|
+
* `key:value` pairs, all must match.
|
|
14069
|
+
*/
|
|
14070
|
+
metadata?: Array<string>;
|
|
13663
14071
|
};
|
|
13664
14072
|
url: '/v1/calls';
|
|
13665
14073
|
};
|
|
@@ -15022,6 +15430,12 @@ export type ChatsListData = {
|
|
|
15022
15430
|
* Status
|
|
15023
15431
|
*/
|
|
15024
15432
|
status?: 'open' | 'ended' | 'all';
|
|
15433
|
+
/**
|
|
15434
|
+
* Metadata
|
|
15435
|
+
*
|
|
15436
|
+
* `key:value` pairs, all must match.
|
|
15437
|
+
*/
|
|
15438
|
+
metadata?: Array<string>;
|
|
15025
15439
|
};
|
|
15026
15440
|
url: '/v1/chats';
|
|
15027
15441
|
};
|
|
@@ -15563,6 +15977,98 @@ export type ConversationsListResults = {
|
|
|
15563
15977
|
200: PageConversationResponse;
|
|
15564
15978
|
};
|
|
15565
15979
|
export type ConversationsListResult = ConversationsListResults[keyof ConversationsListResults];
|
|
15980
|
+
export type ConversationsItemsCreateData = {
|
|
15981
|
+
body: PostItemRequest;
|
|
15982
|
+
path?: never;
|
|
15983
|
+
query?: never;
|
|
15984
|
+
url: '/v1/conversations/items';
|
|
15985
|
+
};
|
|
15986
|
+
export type ConversationsItemsCreateErrors = {
|
|
15987
|
+
/**
|
|
15988
|
+
* Well-formed, but rejected by a rule; `detail.errors` lists each problem.
|
|
15989
|
+
*/
|
|
15990
|
+
400: ErrorResponse;
|
|
15991
|
+
/**
|
|
15992
|
+
* Missing credential, or one that is revoked or no longer a member of this organization.
|
|
15993
|
+
*/
|
|
15994
|
+
401: ErrorResponse;
|
|
15995
|
+
/**
|
|
15996
|
+
* Authenticated, but this organization role may not perform the operation.
|
|
15997
|
+
*/
|
|
15998
|
+
403: ErrorResponse;
|
|
15999
|
+
/**
|
|
16000
|
+
* The resource's current state forbids this — a name already taken, a job already running.
|
|
16001
|
+
*/
|
|
16002
|
+
409: ErrorResponse;
|
|
16003
|
+
/**
|
|
16004
|
+
* The request did not match this operation's schema; `detail.errors` lists each field.
|
|
16005
|
+
*/
|
|
16006
|
+
422: ErrorResponse;
|
|
16007
|
+
/**
|
|
16008
|
+
* Unexpected error. Every error this API returns carries this body.
|
|
16009
|
+
*/
|
|
16010
|
+
default: ErrorResponse;
|
|
16011
|
+
};
|
|
16012
|
+
export type ConversationsItemsCreateError = ConversationsItemsCreateErrors[keyof ConversationsItemsCreateErrors];
|
|
16013
|
+
export type ConversationsItemsCreateResults = {
|
|
16014
|
+
/**
|
|
16015
|
+
* Idempotent replay.
|
|
16016
|
+
*/
|
|
16017
|
+
200: ConversationItemResponse;
|
|
16018
|
+
/**
|
|
16019
|
+
* Successful Response
|
|
16020
|
+
*/
|
|
16021
|
+
201: ConversationItemResponse;
|
|
16022
|
+
};
|
|
16023
|
+
export type ConversationsItemsCreateResult = ConversationsItemsCreateResults[keyof ConversationsItemsCreateResults];
|
|
16024
|
+
export type ConversationsDeleteData = {
|
|
16025
|
+
body?: never;
|
|
16026
|
+
path: {
|
|
16027
|
+
/**
|
|
16028
|
+
* Conversation Id
|
|
16029
|
+
*/
|
|
16030
|
+
conversation_id: string;
|
|
16031
|
+
};
|
|
16032
|
+
query?: never;
|
|
16033
|
+
url: '/v1/conversations/{conversation_id}';
|
|
16034
|
+
};
|
|
16035
|
+
export type ConversationsDeleteErrors = {
|
|
16036
|
+
/**
|
|
16037
|
+
* Well-formed, but rejected by a rule; `detail.errors` lists each problem.
|
|
16038
|
+
*/
|
|
16039
|
+
400: ErrorResponse;
|
|
16040
|
+
/**
|
|
16041
|
+
* Missing credential, or one that is revoked or no longer a member of this organization.
|
|
16042
|
+
*/
|
|
16043
|
+
401: ErrorResponse;
|
|
16044
|
+
/**
|
|
16045
|
+
* Authenticated, but this organization role may not perform the operation.
|
|
16046
|
+
*/
|
|
16047
|
+
403: ErrorResponse;
|
|
16048
|
+
/**
|
|
16049
|
+
* No such resource in this organization.
|
|
16050
|
+
*/
|
|
16051
|
+
404: ErrorResponse;
|
|
16052
|
+
/**
|
|
16053
|
+
* The resource's current state forbids this — a name already taken, a job already running.
|
|
16054
|
+
*/
|
|
16055
|
+
409: ErrorResponse;
|
|
16056
|
+
/**
|
|
16057
|
+
* The request did not match this operation's schema; `detail.errors` lists each field.
|
|
16058
|
+
*/
|
|
16059
|
+
422: ErrorResponse;
|
|
16060
|
+
/**
|
|
16061
|
+
* Unexpected error. Every error this API returns carries this body.
|
|
16062
|
+
*/
|
|
16063
|
+
default: ErrorResponse;
|
|
16064
|
+
};
|
|
16065
|
+
export type ConversationsDeleteError = ConversationsDeleteErrors[keyof ConversationsDeleteErrors];
|
|
16066
|
+
export type ConversationsDeleteResults = {
|
|
16067
|
+
/**
|
|
16068
|
+
* Erase scheduled. No body.
|
|
16069
|
+
*/
|
|
16070
|
+
202: unknown;
|
|
16071
|
+
};
|
|
15566
16072
|
export type ConversationsGetData = {
|
|
15567
16073
|
body?: never;
|
|
15568
16074
|
path: {
|
|
@@ -17534,6 +18040,182 @@ export type FaqsEntriesUpdateResults = {
|
|
|
17534
18040
|
200: FaqEntry;
|
|
17535
18041
|
};
|
|
17536
18042
|
export type FaqsEntriesUpdateResult = FaqsEntriesUpdateResults[keyof FaqsEntriesUpdateResults];
|
|
18043
|
+
export type InboundWebhookDeleteData = {
|
|
18044
|
+
body?: never;
|
|
18045
|
+
path?: never;
|
|
18046
|
+
query?: never;
|
|
18047
|
+
url: '/v1/inbound-webhook';
|
|
18048
|
+
};
|
|
18049
|
+
export type InboundWebhookDeleteErrors = {
|
|
18050
|
+
/**
|
|
18051
|
+
* Well-formed, but rejected by a rule; `detail.errors` lists each problem.
|
|
18052
|
+
*/
|
|
18053
|
+
400: ErrorResponse;
|
|
18054
|
+
/**
|
|
18055
|
+
* Missing credential, or one that is revoked or no longer a member of this organization.
|
|
18056
|
+
*/
|
|
18057
|
+
401: ErrorResponse;
|
|
18058
|
+
/**
|
|
18059
|
+
* Authenticated, but this organization role may not perform the operation.
|
|
18060
|
+
*/
|
|
18061
|
+
403: ErrorResponse;
|
|
18062
|
+
/**
|
|
18063
|
+
* The resource's current state forbids this — a name already taken, a job already running.
|
|
18064
|
+
*/
|
|
18065
|
+
409: ErrorResponse;
|
|
18066
|
+
/**
|
|
18067
|
+
* Unexpected error. Every error this API returns carries this body.
|
|
18068
|
+
*/
|
|
18069
|
+
default: ErrorResponse;
|
|
18070
|
+
};
|
|
18071
|
+
export type InboundWebhookDeleteError = InboundWebhookDeleteErrors[keyof InboundWebhookDeleteErrors];
|
|
18072
|
+
export type InboundWebhookDeleteResults = {
|
|
18073
|
+
/**
|
|
18074
|
+
* Successful Response
|
|
18075
|
+
*/
|
|
18076
|
+
200: OkResponse;
|
|
18077
|
+
};
|
|
18078
|
+
export type InboundWebhookDeleteResult = InboundWebhookDeleteResults[keyof InboundWebhookDeleteResults];
|
|
18079
|
+
export type InboundWebhookGetData = {
|
|
18080
|
+
body?: never;
|
|
18081
|
+
path?: never;
|
|
18082
|
+
query?: never;
|
|
18083
|
+
url: '/v1/inbound-webhook';
|
|
18084
|
+
};
|
|
18085
|
+
export type InboundWebhookGetErrors = {
|
|
18086
|
+
/**
|
|
18087
|
+
* Missing credential, or one that is revoked or no longer a member of this organization.
|
|
18088
|
+
*/
|
|
18089
|
+
401: ErrorResponse;
|
|
18090
|
+
/**
|
|
18091
|
+
* Unexpected error. Every error this API returns carries this body.
|
|
18092
|
+
*/
|
|
18093
|
+
default: ErrorResponse;
|
|
18094
|
+
};
|
|
18095
|
+
export type InboundWebhookGetError = InboundWebhookGetErrors[keyof InboundWebhookGetErrors];
|
|
18096
|
+
export type InboundWebhookGetResults = {
|
|
18097
|
+
/**
|
|
18098
|
+
* Successful Response
|
|
18099
|
+
*/
|
|
18100
|
+
200: InboundWebhookResponse;
|
|
18101
|
+
};
|
|
18102
|
+
export type InboundWebhookGetResult = InboundWebhookGetResults[keyof InboundWebhookGetResults];
|
|
18103
|
+
export type InboundWebhookSetData = {
|
|
18104
|
+
body: SetInboundWebhookRequest;
|
|
18105
|
+
path?: never;
|
|
18106
|
+
query?: never;
|
|
18107
|
+
url: '/v1/inbound-webhook';
|
|
18108
|
+
};
|
|
18109
|
+
export type InboundWebhookSetErrors = {
|
|
18110
|
+
/**
|
|
18111
|
+
* Well-formed, but rejected by a rule; `detail.errors` lists each problem.
|
|
18112
|
+
*/
|
|
18113
|
+
400: ErrorResponse;
|
|
18114
|
+
/**
|
|
18115
|
+
* Missing credential, or one that is revoked or no longer a member of this organization.
|
|
18116
|
+
*/
|
|
18117
|
+
401: ErrorResponse;
|
|
18118
|
+
/**
|
|
18119
|
+
* Authenticated, but this organization role may not perform the operation.
|
|
18120
|
+
*/
|
|
18121
|
+
403: ErrorResponse;
|
|
18122
|
+
/**
|
|
18123
|
+
* The resource's current state forbids this — a name already taken, a job already running.
|
|
18124
|
+
*/
|
|
18125
|
+
409: ErrorResponse;
|
|
18126
|
+
/**
|
|
18127
|
+
* The request did not match this operation's schema; `detail.errors` lists each field.
|
|
18128
|
+
*/
|
|
18129
|
+
422: ErrorResponse;
|
|
18130
|
+
/**
|
|
18131
|
+
* Unexpected error. Every error this API returns carries this body.
|
|
18132
|
+
*/
|
|
18133
|
+
default: ErrorResponse;
|
|
18134
|
+
};
|
|
18135
|
+
export type InboundWebhookSetError = InboundWebhookSetErrors[keyof InboundWebhookSetErrors];
|
|
18136
|
+
export type InboundWebhookSetResults = {
|
|
18137
|
+
/**
|
|
18138
|
+
* Successful Response
|
|
18139
|
+
*/
|
|
18140
|
+
200: InboundWebhookResponse;
|
|
18141
|
+
};
|
|
18142
|
+
export type InboundWebhookSetResult = InboundWebhookSetResults[keyof InboundWebhookSetResults];
|
|
18143
|
+
export type InboundWebhookRotateSecretData = {
|
|
18144
|
+
body?: never;
|
|
18145
|
+
path?: never;
|
|
18146
|
+
query?: never;
|
|
18147
|
+
url: '/v1/inbound-webhook/rotate-secret';
|
|
18148
|
+
};
|
|
18149
|
+
export type InboundWebhookRotateSecretErrors = {
|
|
18150
|
+
/**
|
|
18151
|
+
* Well-formed, but rejected by a rule; `detail.errors` lists each problem.
|
|
18152
|
+
*/
|
|
18153
|
+
400: ErrorResponse;
|
|
18154
|
+
/**
|
|
18155
|
+
* Missing credential, or one that is revoked or no longer a member of this organization.
|
|
18156
|
+
*/
|
|
18157
|
+
401: ErrorResponse;
|
|
18158
|
+
/**
|
|
18159
|
+
* Authenticated, but this organization role may not perform the operation.
|
|
18160
|
+
*/
|
|
18161
|
+
403: ErrorResponse;
|
|
18162
|
+
/**
|
|
18163
|
+
* The resource's current state forbids this — a name already taken, a job already running.
|
|
18164
|
+
*/
|
|
18165
|
+
409: ErrorResponse;
|
|
18166
|
+
/**
|
|
18167
|
+
* Unexpected error. Every error this API returns carries this body.
|
|
18168
|
+
*/
|
|
18169
|
+
default: ErrorResponse;
|
|
18170
|
+
};
|
|
18171
|
+
export type InboundWebhookRotateSecretError = InboundWebhookRotateSecretErrors[keyof InboundWebhookRotateSecretErrors];
|
|
18172
|
+
export type InboundWebhookRotateSecretResults = {
|
|
18173
|
+
/**
|
|
18174
|
+
* Successful Response
|
|
18175
|
+
*/
|
|
18176
|
+
200: InboundWebhookResponse;
|
|
18177
|
+
};
|
|
18178
|
+
export type InboundWebhookRotateSecretResult = InboundWebhookRotateSecretResults[keyof InboundWebhookRotateSecretResults];
|
|
18179
|
+
export type InboundWebhookTestData = {
|
|
18180
|
+
body: TestInboundWebhookRequest;
|
|
18181
|
+
path?: never;
|
|
18182
|
+
query?: never;
|
|
18183
|
+
url: '/v1/inbound-webhook/test';
|
|
18184
|
+
};
|
|
18185
|
+
export type InboundWebhookTestErrors = {
|
|
18186
|
+
/**
|
|
18187
|
+
* Well-formed, but rejected by a rule; `detail.errors` lists each problem.
|
|
18188
|
+
*/
|
|
18189
|
+
400: ErrorResponse;
|
|
18190
|
+
/**
|
|
18191
|
+
* Missing credential, or one that is revoked or no longer a member of this organization.
|
|
18192
|
+
*/
|
|
18193
|
+
401: ErrorResponse;
|
|
18194
|
+
/**
|
|
18195
|
+
* Authenticated, but this organization role may not perform the operation.
|
|
18196
|
+
*/
|
|
18197
|
+
403: ErrorResponse;
|
|
18198
|
+
/**
|
|
18199
|
+
* The resource's current state forbids this — a name already taken, a job already running.
|
|
18200
|
+
*/
|
|
18201
|
+
409: ErrorResponse;
|
|
18202
|
+
/**
|
|
18203
|
+
* The request did not match this operation's schema; `detail.errors` lists each field.
|
|
18204
|
+
*/
|
|
18205
|
+
422: ErrorResponse;
|
|
18206
|
+
/**
|
|
18207
|
+
* Unexpected error. Every error this API returns carries this body.
|
|
18208
|
+
*/
|
|
18209
|
+
default: ErrorResponse;
|
|
18210
|
+
};
|
|
18211
|
+
export type InboundWebhookTestError = InboundWebhookTestErrors[keyof InboundWebhookTestErrors];
|
|
18212
|
+
export type InboundWebhookTestResults = {
|
|
18213
|
+
/**
|
|
18214
|
+
* Successful Response
|
|
18215
|
+
*/
|
|
18216
|
+
200: TestInboundWebhookResponse;
|
|
18217
|
+
};
|
|
18218
|
+
export type InboundWebhookTestResult = InboundWebhookTestResults[keyof InboundWebhookTestResults];
|
|
17537
18219
|
export type IntegrationsListData = {
|
|
17538
18220
|
body?: never;
|
|
17539
18221
|
path?: never;
|