@talqing/sdk 0.15.2 → 0.16.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/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 +14 -1
- package/dist/cjs/gen/sdk.gen.d.ts.map +1 -1
- package/dist/cjs/gen/sdk.gen.js +27 -2
- package/dist/cjs/gen/sdk.gen.js.map +1 -1
- package/dist/cjs/gen/types.gen.d.ts +202 -35
- package/dist/cjs/gen/types.gen.d.ts.map +1 -1
- package/dist/cjs/vocabulary.d.ts +2 -0
- package/dist/cjs/vocabulary.d.ts.map +1 -1
- package/dist/esm/gen/index.d.ts +1 -1
- package/dist/esm/gen/index.d.ts.map +1 -1
- package/dist/esm/gen/sdk.gen.d.ts +14 -1
- package/dist/esm/gen/sdk.gen.d.ts.map +1 -1
- package/dist/esm/gen/sdk.gen.js +24 -0
- package/dist/esm/gen/sdk.gen.js.map +1 -1
- package/dist/esm/gen/types.gen.d.ts +202 -35
- package/dist/esm/gen/types.gen.d.ts.map +1 -1
- package/dist/esm/vocabulary.d.ts +2 -0
- package/dist/esm/vocabulary.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/gen/index.ts +1 -1
- package/src/gen/sdk.gen.ts +31 -1
- package/src/gen/types.gen.ts +210 -36
- package/src/vocabulary.ts +2 -0
package/src/gen/types.gen.ts
CHANGED
|
@@ -776,6 +776,20 @@ export type AssistantStartedEvent = {
|
|
|
776
776
|
trigger_item_id: string;
|
|
777
777
|
};
|
|
778
778
|
|
|
779
|
+
/**
|
|
780
|
+
* AttachmentNotKept
|
|
781
|
+
*
|
|
782
|
+
* A file the person sent that could not be stored.
|
|
783
|
+
*/
|
|
784
|
+
export type AttachmentNotKept = {
|
|
785
|
+
/**
|
|
786
|
+
* Reason
|
|
787
|
+
*
|
|
788
|
+
* Why, as a sentence for a person.
|
|
789
|
+
*/
|
|
790
|
+
reason: string;
|
|
791
|
+
};
|
|
792
|
+
|
|
779
793
|
/**
|
|
780
794
|
* AvatarCatalogEntryResponse
|
|
781
795
|
*/
|
|
@@ -1921,9 +1935,11 @@ export type ChatMessageRequest = {
|
|
|
1921
1935
|
*/
|
|
1922
1936
|
client_message_id: string;
|
|
1923
1937
|
/**
|
|
1924
|
-
*
|
|
1938
|
+
* Files
|
|
1939
|
+
*
|
|
1940
|
+
* Any type; photos, PDFs and Word files are read by the agent.
|
|
1925
1941
|
*/
|
|
1926
|
-
|
|
1942
|
+
files?: Array<InboundFile>;
|
|
1927
1943
|
/**
|
|
1928
1944
|
* Message
|
|
1929
1945
|
*/
|
|
@@ -2174,11 +2190,117 @@ export type ConversationActivity = {
|
|
|
2174
2190
|
};
|
|
2175
2191
|
|
|
2176
2192
|
/**
|
|
2177
|
-
*
|
|
2193
|
+
* ConversationDocument
|
|
2194
|
+
*
|
|
2195
|
+
* A PDF or Word file the person sent, and whether the agent could read it.
|
|
2196
|
+
*/
|
|
2197
|
+
export type ConversationDocument = {
|
|
2198
|
+
/**
|
|
2199
|
+
* Bytes
|
|
2200
|
+
*/
|
|
2201
|
+
bytes: number;
|
|
2202
|
+
/**
|
|
2203
|
+
* Filename
|
|
2204
|
+
*/
|
|
2205
|
+
filename: string | null;
|
|
2206
|
+
/**
|
|
2207
|
+
* Id
|
|
2208
|
+
*/
|
|
2209
|
+
id: string;
|
|
2210
|
+
/**
|
|
2211
|
+
* Kind
|
|
2212
|
+
*/
|
|
2213
|
+
kind?: 'document';
|
|
2214
|
+
/**
|
|
2215
|
+
* Mime Type
|
|
2216
|
+
*/
|
|
2217
|
+
mime_type: string;
|
|
2218
|
+
/**
|
|
2219
|
+
* Pages
|
|
2220
|
+
*
|
|
2221
|
+
* A PDF's page count; null for Word files.
|
|
2222
|
+
*/
|
|
2223
|
+
pages: number | null;
|
|
2224
|
+
/**
|
|
2225
|
+
* Status
|
|
2226
|
+
*
|
|
2227
|
+
* `pending` until the agent's next turn reads it.
|
|
2228
|
+
*/
|
|
2229
|
+
status: 'pending' | 'read' | 'unreadable';
|
|
2230
|
+
/**
|
|
2231
|
+
* Unreadable Reason
|
|
2232
|
+
*
|
|
2233
|
+
* Why the agent could not read it.
|
|
2234
|
+
*/
|
|
2235
|
+
unreadable_reason: string | null;
|
|
2236
|
+
/**
|
|
2237
|
+
* Url
|
|
2238
|
+
*
|
|
2239
|
+
* Signed download link; valid until `url_expires_at`.
|
|
2240
|
+
*/
|
|
2241
|
+
url: string;
|
|
2242
|
+
/**
|
|
2243
|
+
* Url Expires At
|
|
2244
|
+
*/
|
|
2245
|
+
url_expires_at: string;
|
|
2246
|
+
};
|
|
2247
|
+
|
|
2248
|
+
/**
|
|
2249
|
+
* ConversationFile
|
|
2178
2250
|
*
|
|
2179
|
-
*
|
|
2251
|
+
* Any other file the person sent, stored for you; the agent cannot open it.
|
|
2180
2252
|
*/
|
|
2181
|
-
export type
|
|
2253
|
+
export type ConversationFile = {
|
|
2254
|
+
/**
|
|
2255
|
+
* Bytes
|
|
2256
|
+
*/
|
|
2257
|
+
bytes: number;
|
|
2258
|
+
/**
|
|
2259
|
+
* Extension
|
|
2260
|
+
*
|
|
2261
|
+
* The type read from its bytes, e.g. `xlsx`; `bin` if unknown.
|
|
2262
|
+
*/
|
|
2263
|
+
extension: string;
|
|
2264
|
+
/**
|
|
2265
|
+
* Filename
|
|
2266
|
+
*/
|
|
2267
|
+
filename: string | null;
|
|
2268
|
+
/**
|
|
2269
|
+
* Id
|
|
2270
|
+
*/
|
|
2271
|
+
id: string;
|
|
2272
|
+
/**
|
|
2273
|
+
* Kind
|
|
2274
|
+
*/
|
|
2275
|
+
kind?: 'file';
|
|
2276
|
+
/**
|
|
2277
|
+
* Mime Type
|
|
2278
|
+
*/
|
|
2279
|
+
mime_type: string;
|
|
2280
|
+
/**
|
|
2281
|
+
* Playable
|
|
2282
|
+
*
|
|
2283
|
+
* Set when `url` plays in an `<audio>` or `<video>` element.
|
|
2284
|
+
*/
|
|
2285
|
+
playable: 'audio' | 'video' | null;
|
|
2286
|
+
/**
|
|
2287
|
+
* Url
|
|
2288
|
+
*
|
|
2289
|
+
* Signed link; valid until `url_expires_at`.
|
|
2290
|
+
*/
|
|
2291
|
+
url: string;
|
|
2292
|
+
/**
|
|
2293
|
+
* Url Expires At
|
|
2294
|
+
*/
|
|
2295
|
+
url_expires_at: string;
|
|
2296
|
+
};
|
|
2297
|
+
|
|
2298
|
+
/**
|
|
2299
|
+
* ConversationImage
|
|
2300
|
+
*
|
|
2301
|
+
* A photo the person sent, with a short-lived link to it.
|
|
2302
|
+
*/
|
|
2303
|
+
export type ConversationImage = {
|
|
2182
2304
|
/**
|
|
2183
2305
|
* Bytes
|
|
2184
2306
|
*/
|
|
@@ -2205,6 +2327,8 @@ export type ConversationAttachment = {
|
|
|
2205
2327
|
mime_type: string;
|
|
2206
2328
|
/**
|
|
2207
2329
|
* Url
|
|
2330
|
+
*
|
|
2331
|
+
* Signed; valid until `url_expires_at`.
|
|
2208
2332
|
*/
|
|
2209
2333
|
url: string;
|
|
2210
2334
|
/**
|
|
@@ -2232,7 +2356,13 @@ export type ConversationItemResponse = {
|
|
|
2232
2356
|
/**
|
|
2233
2357
|
* Attachments
|
|
2234
2358
|
*/
|
|
2235
|
-
attachments: Array<
|
|
2359
|
+
attachments: Array<ConversationImage | ConversationDocument | ConversationFile>;
|
|
2360
|
+
/**
|
|
2361
|
+
* Attachments Not Kept
|
|
2362
|
+
*
|
|
2363
|
+
* Files the person sent that could not be stored.
|
|
2364
|
+
*/
|
|
2365
|
+
attachments_not_kept: Array<AttachmentNotKept>;
|
|
2236
2366
|
/**
|
|
2237
2367
|
* Who at your business posted this.
|
|
2238
2368
|
*/
|
|
@@ -2280,12 +2410,6 @@ export type ConversationItemResponse = {
|
|
|
2280
2410
|
* Idempotency Key
|
|
2281
2411
|
*/
|
|
2282
2412
|
idempotency_key: string | null;
|
|
2283
|
-
/**
|
|
2284
|
-
* Images Not Kept
|
|
2285
|
-
*
|
|
2286
|
-
* Images the person sent that were not stored, and why.
|
|
2287
|
-
*/
|
|
2288
|
-
images_not_kept: Array<ImageNotKept>;
|
|
2289
2413
|
latency: ReplyLatency | null;
|
|
2290
2414
|
/**
|
|
2291
2415
|
* Metadata
|
|
@@ -5415,16 +5539,6 @@ export type IfOperation = {
|
|
|
5415
5539
|
then?: Array<HttpOperation | CodeOperation | FrontendRpcOperation | IfOperation | SetVariableOperation | SayOperation | GenerateReplyOperation | AddMessageOperation | EndCallOperation | HandoffOperation | TransferOperation | SendDtmfOperation> | null;
|
|
5416
5540
|
};
|
|
5417
5541
|
|
|
5418
|
-
/**
|
|
5419
|
-
* ImageNotKept
|
|
5420
|
-
*/
|
|
5421
|
-
export type ImageNotKept = {
|
|
5422
|
-
/**
|
|
5423
|
-
* Reason
|
|
5424
|
-
*/
|
|
5425
|
-
reason: string;
|
|
5426
|
-
};
|
|
5427
|
-
|
|
5428
5542
|
/**
|
|
5429
5543
|
* ImportPhoneNumbersRequest
|
|
5430
5544
|
*/
|
|
@@ -5506,13 +5620,15 @@ export type InboundContent = {
|
|
|
5506
5620
|
};
|
|
5507
5621
|
|
|
5508
5622
|
/**
|
|
5509
|
-
*
|
|
5623
|
+
* InboundFile
|
|
5510
5624
|
*
|
|
5511
|
-
* One
|
|
5625
|
+
* One file on an inbound text message: the bytes, and what to call them.
|
|
5512
5626
|
*/
|
|
5513
|
-
export type
|
|
5627
|
+
export type InboundFile = {
|
|
5514
5628
|
/**
|
|
5515
5629
|
* Data Url
|
|
5630
|
+
*
|
|
5631
|
+
* `data:<mime>;base64,<bytes>`, up to 20 MB decoded.
|
|
5516
5632
|
*/
|
|
5517
5633
|
data_url: string;
|
|
5518
5634
|
/**
|
|
@@ -6076,7 +6192,13 @@ export type ItemCreatedEvent = {
|
|
|
6076
6192
|
/**
|
|
6077
6193
|
* Attachments
|
|
6078
6194
|
*/
|
|
6079
|
-
attachments: Array<
|
|
6195
|
+
attachments: Array<ConversationImage | ConversationDocument | ConversationFile>;
|
|
6196
|
+
/**
|
|
6197
|
+
* Attachments Not Kept
|
|
6198
|
+
*
|
|
6199
|
+
* Files the person sent that could not be stored.
|
|
6200
|
+
*/
|
|
6201
|
+
attachments_not_kept: Array<AttachmentNotKept>;
|
|
6080
6202
|
/**
|
|
6081
6203
|
* Who at your business posted this.
|
|
6082
6204
|
*/
|
|
@@ -6128,12 +6250,6 @@ export type ItemCreatedEvent = {
|
|
|
6128
6250
|
* Idempotency Key
|
|
6129
6251
|
*/
|
|
6130
6252
|
idempotency_key: string | null;
|
|
6131
|
-
/**
|
|
6132
|
-
* Images Not Kept
|
|
6133
|
-
*
|
|
6134
|
-
* Images the person sent that were not stored, and why.
|
|
6135
|
-
*/
|
|
6136
|
-
images_not_kept: Array<ImageNotKept>;
|
|
6137
6253
|
latency: ReplyLatency | null;
|
|
6138
6254
|
/**
|
|
6139
6255
|
* Metadata
|
|
@@ -6392,7 +6508,7 @@ export type LLMModelSpec = {
|
|
|
6392
6508
|
/**
|
|
6393
6509
|
* Priority
|
|
6394
6510
|
*
|
|
6395
|
-
* Run this model in its provider's priority (low-latency) lane, where its catalog entry declares one. Steadies the worst case rather than the average, and costs
|
|
6511
|
+
* Run this model in its provider's priority (low-latency) lane, where its catalog entry declares one; on OpenRouter, any model (standard where no host sells one). Steadies the worst case rather than the average, and costs more per token.
|
|
6396
6512
|
*/
|
|
6397
6513
|
priority?: boolean;
|
|
6398
6514
|
/**
|
|
@@ -6430,7 +6546,7 @@ export type LLMModelSpecOverride = {
|
|
|
6430
6546
|
/**
|
|
6431
6547
|
* Priority
|
|
6432
6548
|
*
|
|
6433
|
-
* Run this model in its provider's priority (low-latency) lane, where its catalog entry declares one. Steadies the worst case rather than the average, and costs
|
|
6549
|
+
* Run this model in its provider's priority (low-latency) lane, where its catalog entry declares one; on OpenRouter, any model (standard where no host sells one). Steadies the worst case rather than the average, and costs more per token.
|
|
6434
6550
|
*/
|
|
6435
6551
|
priority?: boolean | null;
|
|
6436
6552
|
/**
|
|
@@ -6540,7 +6656,7 @@ export type LLMSpec = {
|
|
|
6540
6656
|
/**
|
|
6541
6657
|
* Priority
|
|
6542
6658
|
*
|
|
6543
|
-
* Run this model in its provider's priority (low-latency) lane, where its catalog entry declares one. Steadies the worst case rather than the average, and costs
|
|
6659
|
+
* Run this model in its provider's priority (low-latency) lane, where its catalog entry declares one; on OpenRouter, any model (standard where no host sells one). Steadies the worst case rather than the average, and costs more per token.
|
|
6544
6660
|
*/
|
|
6545
6661
|
priority?: boolean;
|
|
6546
6662
|
/**
|
|
@@ -6579,7 +6695,7 @@ export type LLMSpecOverride = {
|
|
|
6579
6695
|
/**
|
|
6580
6696
|
* Priority
|
|
6581
6697
|
*
|
|
6582
|
-
* Run this model in its provider's priority (low-latency) lane, where its catalog entry declares one. Steadies the worst case rather than the average, and costs
|
|
6698
|
+
* Run this model in its provider's priority (low-latency) lane, where its catalog entry declares one; on OpenRouter, any model (standard where no host sells one). Steadies the worst case rather than the average, and costs more per token.
|
|
6583
6699
|
*/
|
|
6584
6700
|
priority?: boolean | null;
|
|
6585
6701
|
/**
|
|
@@ -6781,6 +6897,10 @@ export type ModelHostResponse = {
|
|
|
6781
6897
|
* Quantization
|
|
6782
6898
|
*/
|
|
6783
6899
|
quantization: string | null;
|
|
6900
|
+
/**
|
|
6901
|
+
* Service Tier
|
|
6902
|
+
*/
|
|
6903
|
+
service_tier: 'priority' | 'ultrafast' | null;
|
|
6784
6904
|
/**
|
|
6785
6905
|
* Throughput P50
|
|
6786
6906
|
*/
|
|
@@ -17391,6 +17511,60 @@ export type ConversationsUpdateResults = {
|
|
|
17391
17511
|
|
|
17392
17512
|
export type ConversationsUpdateResult = ConversationsUpdateResults[keyof ConversationsUpdateResults];
|
|
17393
17513
|
|
|
17514
|
+
export type ConversationsAttachmentsGetData = {
|
|
17515
|
+
body?: never;
|
|
17516
|
+
path: {
|
|
17517
|
+
/**
|
|
17518
|
+
* Conversation Id
|
|
17519
|
+
*/
|
|
17520
|
+
conversation_id: string;
|
|
17521
|
+
/**
|
|
17522
|
+
* Attachment Id
|
|
17523
|
+
*/
|
|
17524
|
+
attachment_id: string;
|
|
17525
|
+
};
|
|
17526
|
+
query?: never;
|
|
17527
|
+
url: '/v1/conversations/{conversation_id}/attachments/{attachment_id}';
|
|
17528
|
+
};
|
|
17529
|
+
|
|
17530
|
+
export type ConversationsAttachmentsGetErrors = {
|
|
17531
|
+
/**
|
|
17532
|
+
* Missing credential, or one that is revoked or no longer a member of this organization.
|
|
17533
|
+
*/
|
|
17534
|
+
401: ErrorResponse;
|
|
17535
|
+
/**
|
|
17536
|
+
* No such resource in this organization.
|
|
17537
|
+
*/
|
|
17538
|
+
404: ErrorResponse;
|
|
17539
|
+
/**
|
|
17540
|
+
* The request did not match this operation's schema; `detail.errors` lists each field.
|
|
17541
|
+
*/
|
|
17542
|
+
422: ErrorResponse;
|
|
17543
|
+
/**
|
|
17544
|
+
* Unexpected error. Every error this API returns carries this body.
|
|
17545
|
+
*/
|
|
17546
|
+
default: ErrorResponse;
|
|
17547
|
+
};
|
|
17548
|
+
|
|
17549
|
+
export type ConversationsAttachmentsGetError = ConversationsAttachmentsGetErrors[keyof ConversationsAttachmentsGetErrors];
|
|
17550
|
+
|
|
17551
|
+
export type ConversationsAttachmentsGetResults = {
|
|
17552
|
+
/**
|
|
17553
|
+
* Response Conversations.Attachments.Get
|
|
17554
|
+
*
|
|
17555
|
+
* Successful Response
|
|
17556
|
+
*/
|
|
17557
|
+
200: ({
|
|
17558
|
+
kind: 'image';
|
|
17559
|
+
} & ConversationImage) | ({
|
|
17560
|
+
kind: 'document';
|
|
17561
|
+
} & ConversationDocument) | ({
|
|
17562
|
+
kind: 'file';
|
|
17563
|
+
} & ConversationFile);
|
|
17564
|
+
};
|
|
17565
|
+
|
|
17566
|
+
export type ConversationsAttachmentsGetResult = ConversationsAttachmentsGetResults[keyof ConversationsAttachmentsGetResults];
|
|
17567
|
+
|
|
17394
17568
|
export type ConversationsEventsData = {
|
|
17395
17569
|
body?: never;
|
|
17396
17570
|
path: {
|
package/src/vocabulary.ts
CHANGED
|
@@ -89,6 +89,8 @@ export type ConversationItemRole = NonNullable<ConversationItemResponse["role"]>
|
|
|
89
89
|
/** Which way the row travelled, and whether the end customer saw it. */
|
|
90
90
|
export type ConversationItemDirection = ConversationItemResponse["direction"];
|
|
91
91
|
export type ConversationItemVisibility = ConversationItemResponse["visibility"];
|
|
92
|
+
/** A file a person sent: a photo, a document, or any other file, by `kind`. */
|
|
93
|
+
export type ConversationAttachment = ConversationItemResponse["attachments"][number];
|
|
92
94
|
|
|
93
95
|
/** One item on a CoPilot rail: a message, a tool call, or its output. A union
|
|
94
96
|
* alias has no schema of its own, so this is the only one of the three that
|