@talqing/sdk 0.15.2 → 0.16.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/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 +194 -31
- 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 +194 -31
- 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 +202 -32
- package/src/vocabulary.ts +2 -0
|
@@ -747,6 +747,19 @@ export type AssistantStartedEvent = {
|
|
|
747
747
|
*/
|
|
748
748
|
trigger_item_id: string;
|
|
749
749
|
};
|
|
750
|
+
/**
|
|
751
|
+
* AttachmentNotKept
|
|
752
|
+
*
|
|
753
|
+
* A file the person sent that could not be stored.
|
|
754
|
+
*/
|
|
755
|
+
export type AttachmentNotKept = {
|
|
756
|
+
/**
|
|
757
|
+
* Reason
|
|
758
|
+
*
|
|
759
|
+
* Why, as a sentence for a person.
|
|
760
|
+
*/
|
|
761
|
+
reason: string;
|
|
762
|
+
};
|
|
750
763
|
/**
|
|
751
764
|
* AvatarCatalogEntryResponse
|
|
752
765
|
*/
|
|
@@ -1863,9 +1876,11 @@ export type ChatMessageRequest = {
|
|
|
1863
1876
|
*/
|
|
1864
1877
|
client_message_id: string;
|
|
1865
1878
|
/**
|
|
1866
|
-
*
|
|
1879
|
+
* Files
|
|
1880
|
+
*
|
|
1881
|
+
* Any type; photos, PDFs and Word files are read by the agent.
|
|
1867
1882
|
*/
|
|
1868
|
-
|
|
1883
|
+
files?: Array<InboundFile>;
|
|
1869
1884
|
/**
|
|
1870
1885
|
* Message
|
|
1871
1886
|
*/
|
|
@@ -2107,11 +2122,115 @@ export type ConversationActivity = {
|
|
|
2107
2122
|
state: 'running' | 'idle';
|
|
2108
2123
|
};
|
|
2109
2124
|
/**
|
|
2110
|
-
*
|
|
2125
|
+
* ConversationDocument
|
|
2126
|
+
*
|
|
2127
|
+
* A PDF or Word file the person sent, and whether the agent could read it.
|
|
2128
|
+
*/
|
|
2129
|
+
export type ConversationDocument = {
|
|
2130
|
+
/**
|
|
2131
|
+
* Bytes
|
|
2132
|
+
*/
|
|
2133
|
+
bytes: number;
|
|
2134
|
+
/**
|
|
2135
|
+
* Filename
|
|
2136
|
+
*/
|
|
2137
|
+
filename: string | null;
|
|
2138
|
+
/**
|
|
2139
|
+
* Id
|
|
2140
|
+
*/
|
|
2141
|
+
id: string;
|
|
2142
|
+
/**
|
|
2143
|
+
* Kind
|
|
2144
|
+
*/
|
|
2145
|
+
kind?: 'document';
|
|
2146
|
+
/**
|
|
2147
|
+
* Mime Type
|
|
2148
|
+
*/
|
|
2149
|
+
mime_type: string;
|
|
2150
|
+
/**
|
|
2151
|
+
* Pages
|
|
2152
|
+
*
|
|
2153
|
+
* A PDF's page count; null for Word files.
|
|
2154
|
+
*/
|
|
2155
|
+
pages: number | null;
|
|
2156
|
+
/**
|
|
2157
|
+
* Status
|
|
2158
|
+
*
|
|
2159
|
+
* `pending` until the agent's next turn reads it.
|
|
2160
|
+
*/
|
|
2161
|
+
status: 'pending' | 'read' | 'unreadable';
|
|
2162
|
+
/**
|
|
2163
|
+
* Unreadable Reason
|
|
2164
|
+
*
|
|
2165
|
+
* Why the agent could not read it.
|
|
2166
|
+
*/
|
|
2167
|
+
unreadable_reason: string | null;
|
|
2168
|
+
/**
|
|
2169
|
+
* Url
|
|
2170
|
+
*
|
|
2171
|
+
* Signed download link; valid until `url_expires_at`.
|
|
2172
|
+
*/
|
|
2173
|
+
url: string;
|
|
2174
|
+
/**
|
|
2175
|
+
* Url Expires At
|
|
2176
|
+
*/
|
|
2177
|
+
url_expires_at: string;
|
|
2178
|
+
};
|
|
2179
|
+
/**
|
|
2180
|
+
* ConversationFile
|
|
2111
2181
|
*
|
|
2112
|
-
*
|
|
2182
|
+
* Any other file the person sent, stored for you; the agent cannot open it.
|
|
2113
2183
|
*/
|
|
2114
|
-
export type
|
|
2184
|
+
export type ConversationFile = {
|
|
2185
|
+
/**
|
|
2186
|
+
* Bytes
|
|
2187
|
+
*/
|
|
2188
|
+
bytes: number;
|
|
2189
|
+
/**
|
|
2190
|
+
* Extension
|
|
2191
|
+
*
|
|
2192
|
+
* The type read from its bytes, e.g. `xlsx`; `bin` if unknown.
|
|
2193
|
+
*/
|
|
2194
|
+
extension: string;
|
|
2195
|
+
/**
|
|
2196
|
+
* Filename
|
|
2197
|
+
*/
|
|
2198
|
+
filename: string | null;
|
|
2199
|
+
/**
|
|
2200
|
+
* Id
|
|
2201
|
+
*/
|
|
2202
|
+
id: string;
|
|
2203
|
+
/**
|
|
2204
|
+
* Kind
|
|
2205
|
+
*/
|
|
2206
|
+
kind?: 'file';
|
|
2207
|
+
/**
|
|
2208
|
+
* Mime Type
|
|
2209
|
+
*/
|
|
2210
|
+
mime_type: string;
|
|
2211
|
+
/**
|
|
2212
|
+
* Playable
|
|
2213
|
+
*
|
|
2214
|
+
* Set when `url` plays in an `<audio>` or `<video>` element.
|
|
2215
|
+
*/
|
|
2216
|
+
playable: 'audio' | 'video' | null;
|
|
2217
|
+
/**
|
|
2218
|
+
* Url
|
|
2219
|
+
*
|
|
2220
|
+
* Signed link; valid until `url_expires_at`.
|
|
2221
|
+
*/
|
|
2222
|
+
url: string;
|
|
2223
|
+
/**
|
|
2224
|
+
* Url Expires At
|
|
2225
|
+
*/
|
|
2226
|
+
url_expires_at: string;
|
|
2227
|
+
};
|
|
2228
|
+
/**
|
|
2229
|
+
* ConversationImage
|
|
2230
|
+
*
|
|
2231
|
+
* A photo the person sent, with a short-lived link to it.
|
|
2232
|
+
*/
|
|
2233
|
+
export type ConversationImage = {
|
|
2115
2234
|
/**
|
|
2116
2235
|
* Bytes
|
|
2117
2236
|
*/
|
|
@@ -2138,6 +2257,8 @@ export type ConversationAttachment = {
|
|
|
2138
2257
|
mime_type: string;
|
|
2139
2258
|
/**
|
|
2140
2259
|
* Url
|
|
2260
|
+
*
|
|
2261
|
+
* Signed; valid until `url_expires_at`.
|
|
2141
2262
|
*/
|
|
2142
2263
|
url: string;
|
|
2143
2264
|
/**
|
|
@@ -2164,7 +2285,13 @@ export type ConversationItemResponse = {
|
|
|
2164
2285
|
/**
|
|
2165
2286
|
* Attachments
|
|
2166
2287
|
*/
|
|
2167
|
-
attachments: Array<
|
|
2288
|
+
attachments: Array<ConversationImage | ConversationDocument | ConversationFile>;
|
|
2289
|
+
/**
|
|
2290
|
+
* Attachments Not Kept
|
|
2291
|
+
*
|
|
2292
|
+
* Files the person sent that could not be stored.
|
|
2293
|
+
*/
|
|
2294
|
+
attachments_not_kept: Array<AttachmentNotKept>;
|
|
2168
2295
|
/**
|
|
2169
2296
|
* Who at your business posted this.
|
|
2170
2297
|
*/
|
|
@@ -2212,12 +2339,6 @@ export type ConversationItemResponse = {
|
|
|
2212
2339
|
* Idempotency Key
|
|
2213
2340
|
*/
|
|
2214
2341
|
idempotency_key: string | null;
|
|
2215
|
-
/**
|
|
2216
|
-
* Images Not Kept
|
|
2217
|
-
*
|
|
2218
|
-
* Images the person sent that were not stored, and why.
|
|
2219
|
-
*/
|
|
2220
|
-
images_not_kept: Array<ImageNotKept>;
|
|
2221
2342
|
latency: ReplyLatency | null;
|
|
2222
2343
|
/**
|
|
2223
2344
|
* Metadata
|
|
@@ -5256,15 +5377,6 @@ export type IfOperation = {
|
|
|
5256
5377
|
*/
|
|
5257
5378
|
then?: Array<HttpOperation | CodeOperation | FrontendRpcOperation | IfOperation | SetVariableOperation | SayOperation | GenerateReplyOperation | AddMessageOperation | EndCallOperation | HandoffOperation | TransferOperation | SendDtmfOperation> | null;
|
|
5258
5379
|
};
|
|
5259
|
-
/**
|
|
5260
|
-
* ImageNotKept
|
|
5261
|
-
*/
|
|
5262
|
-
export type ImageNotKept = {
|
|
5263
|
-
/**
|
|
5264
|
-
* Reason
|
|
5265
|
-
*/
|
|
5266
|
-
reason: string;
|
|
5267
|
-
};
|
|
5268
5380
|
/**
|
|
5269
5381
|
* ImportPhoneNumbersRequest
|
|
5270
5382
|
*/
|
|
@@ -5342,13 +5454,15 @@ export type InboundContent = {
|
|
|
5342
5454
|
replied_to?: string | null;
|
|
5343
5455
|
};
|
|
5344
5456
|
/**
|
|
5345
|
-
*
|
|
5457
|
+
* InboundFile
|
|
5346
5458
|
*
|
|
5347
|
-
* One
|
|
5459
|
+
* One file on an inbound text message: the bytes, and what to call them.
|
|
5348
5460
|
*/
|
|
5349
|
-
export type
|
|
5461
|
+
export type InboundFile = {
|
|
5350
5462
|
/**
|
|
5351
5463
|
* Data Url
|
|
5464
|
+
*
|
|
5465
|
+
* `data:<mime>;base64,<bytes>`, up to 20 MB decoded.
|
|
5352
5466
|
*/
|
|
5353
5467
|
data_url: string;
|
|
5354
5468
|
/**
|
|
@@ -5895,7 +6009,13 @@ export type ItemCreatedEvent = {
|
|
|
5895
6009
|
/**
|
|
5896
6010
|
* Attachments
|
|
5897
6011
|
*/
|
|
5898
|
-
attachments: Array<
|
|
6012
|
+
attachments: Array<ConversationImage | ConversationDocument | ConversationFile>;
|
|
6013
|
+
/**
|
|
6014
|
+
* Attachments Not Kept
|
|
6015
|
+
*
|
|
6016
|
+
* Files the person sent that could not be stored.
|
|
6017
|
+
*/
|
|
6018
|
+
attachments_not_kept: Array<AttachmentNotKept>;
|
|
5899
6019
|
/**
|
|
5900
6020
|
* Who at your business posted this.
|
|
5901
6021
|
*/
|
|
@@ -5947,12 +6067,6 @@ export type ItemCreatedEvent = {
|
|
|
5947
6067
|
* Idempotency Key
|
|
5948
6068
|
*/
|
|
5949
6069
|
idempotency_key: string | null;
|
|
5950
|
-
/**
|
|
5951
|
-
* Images Not Kept
|
|
5952
|
-
*
|
|
5953
|
-
* Images the person sent that were not stored, and why.
|
|
5954
|
-
*/
|
|
5955
|
-
images_not_kept: Array<ImageNotKept>;
|
|
5956
6070
|
latency: ReplyLatency | null;
|
|
5957
6071
|
/**
|
|
5958
6072
|
* Metadata
|
|
@@ -16637,6 +16751,55 @@ export type ConversationsUpdateResults = {
|
|
|
16637
16751
|
200: ConversationResponse;
|
|
16638
16752
|
};
|
|
16639
16753
|
export type ConversationsUpdateResult = ConversationsUpdateResults[keyof ConversationsUpdateResults];
|
|
16754
|
+
export type ConversationsAttachmentsGetData = {
|
|
16755
|
+
body?: never;
|
|
16756
|
+
path: {
|
|
16757
|
+
/**
|
|
16758
|
+
* Conversation Id
|
|
16759
|
+
*/
|
|
16760
|
+
conversation_id: string;
|
|
16761
|
+
/**
|
|
16762
|
+
* Attachment Id
|
|
16763
|
+
*/
|
|
16764
|
+
attachment_id: string;
|
|
16765
|
+
};
|
|
16766
|
+
query?: never;
|
|
16767
|
+
url: '/v1/conversations/{conversation_id}/attachments/{attachment_id}';
|
|
16768
|
+
};
|
|
16769
|
+
export type ConversationsAttachmentsGetErrors = {
|
|
16770
|
+
/**
|
|
16771
|
+
* Missing credential, or one that is revoked or no longer a member of this organization.
|
|
16772
|
+
*/
|
|
16773
|
+
401: ErrorResponse;
|
|
16774
|
+
/**
|
|
16775
|
+
* No such resource in this organization.
|
|
16776
|
+
*/
|
|
16777
|
+
404: ErrorResponse;
|
|
16778
|
+
/**
|
|
16779
|
+
* The request did not match this operation's schema; `detail.errors` lists each field.
|
|
16780
|
+
*/
|
|
16781
|
+
422: ErrorResponse;
|
|
16782
|
+
/**
|
|
16783
|
+
* Unexpected error. Every error this API returns carries this body.
|
|
16784
|
+
*/
|
|
16785
|
+
default: ErrorResponse;
|
|
16786
|
+
};
|
|
16787
|
+
export type ConversationsAttachmentsGetError = ConversationsAttachmentsGetErrors[keyof ConversationsAttachmentsGetErrors];
|
|
16788
|
+
export type ConversationsAttachmentsGetResults = {
|
|
16789
|
+
/**
|
|
16790
|
+
* Response Conversations.Attachments.Get
|
|
16791
|
+
*
|
|
16792
|
+
* Successful Response
|
|
16793
|
+
*/
|
|
16794
|
+
200: ({
|
|
16795
|
+
kind: 'image';
|
|
16796
|
+
} & ConversationImage) | ({
|
|
16797
|
+
kind: 'document';
|
|
16798
|
+
} & ConversationDocument) | ({
|
|
16799
|
+
kind: 'file';
|
|
16800
|
+
} & ConversationFile);
|
|
16801
|
+
};
|
|
16802
|
+
export type ConversationsAttachmentsGetResult = ConversationsAttachmentsGetResults[keyof ConversationsAttachmentsGetResults];
|
|
16640
16803
|
export type ConversationsEventsData = {
|
|
16641
16804
|
body?: never;
|
|
16642
16805
|
path: {
|