@talqing/sdk 0.17.0 → 0.19.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.
@@ -207,7 +207,7 @@ export type AgentConfig = {
207
207
  /**
208
208
  * Language
209
209
  *
210
- * The one language the caller and the agent speak, shared by every model in the pipeline. Use a code from the provider catalog's language lists; null means Auto. Voice and video only.
210
+ * The one language the caller and the agent speak, shared by every model in the pipeline. Use a code from the provider catalog's language lists; null means Auto. On a text agent, only with `stt` set.
211
211
  */
212
212
  language?: string | null;
213
213
  llm?: LLMSpec | null;
@@ -248,6 +248,9 @@ export type AgentConfig = {
248
248
  realtime?: RealtimeSpec | null;
249
249
  recording?: RecordingSpec;
250
250
  silence?: SilenceSpec;
251
+ /**
252
+ * Text agents: transcribes voice notes; null = the agent can't listen to them.
253
+ */
251
254
  stt?: STTSpec | null;
252
255
  /**
253
256
  * Tasks
@@ -349,7 +352,7 @@ export type AgentOverride = {
349
352
  /**
350
353
  * Language
351
354
  *
352
- * The one language the caller and the agent speak, shared by every model in the pipeline. Use a code from the provider catalog's language lists; null means Auto. Voice and video only.
355
+ * The one language the caller and the agent speak, shared by every model in the pipeline. Use a code from the provider catalog's language lists; null means Auto. On a text agent, only with `stt` set.
353
356
  */
354
357
  language?: string | null;
355
358
  llm?: LLMSpecOverride | null;
@@ -390,6 +393,9 @@ export type AgentOverride = {
390
393
  realtime?: RealtimeSpecOverride | null;
391
394
  recording?: RecordingSpecOverride | null;
392
395
  silence?: SilenceSpecOverride | null;
396
+ /**
397
+ * Text agents: transcribes voice notes; null = the agent can't listen to them.
398
+ */
393
399
  stt?: STTSpecOverride | null;
394
400
  /**
395
401
  * Tasks
@@ -2110,6 +2116,29 @@ export type ConnectionQuality = {
2110
2116
  */
2111
2117
  overall: string;
2112
2118
  };
2119
+ /**
2120
+ * ContactCard
2121
+ *
2122
+ * One card in a shared contact file.
2123
+ */
2124
+ export type ContactCard = {
2125
+ /**
2126
+ * Emails
2127
+ */
2128
+ emails: Array<string>;
2129
+ /**
2130
+ * Name
2131
+ */
2132
+ name: string | null;
2133
+ /**
2134
+ * Organization
2135
+ */
2136
+ organization: string | null;
2137
+ /**
2138
+ * Phones
2139
+ */
2140
+ phones: Array<string>;
2141
+ };
2113
2142
  /**
2114
2143
  * ConversationActivity
2115
2144
  *
@@ -2121,6 +2150,120 @@ export type ConversationActivity = {
2121
2150
  */
2122
2151
  state: 'running' | 'idle';
2123
2152
  };
2153
+ /**
2154
+ * ConversationAudio
2155
+ *
2156
+ * A voice note or audio file the person sent, and what they said in it.
2157
+ */
2158
+ export type ConversationAudio = {
2159
+ /**
2160
+ * Bytes
2161
+ */
2162
+ bytes: number;
2163
+ /**
2164
+ * Duration Seconds
2165
+ */
2166
+ duration_seconds: number | null;
2167
+ /**
2168
+ * Extension
2169
+ *
2170
+ * The type read from its bytes, e.g. `ogg` or `m4a`.
2171
+ */
2172
+ extension: string;
2173
+ /**
2174
+ * Failed Reason
2175
+ *
2176
+ * Why it could not be transcribed.
2177
+ */
2178
+ failed_reason: string | null;
2179
+ /**
2180
+ * Filename
2181
+ */
2182
+ filename: string | null;
2183
+ /**
2184
+ * Id
2185
+ */
2186
+ id: string;
2187
+ /**
2188
+ * Kind
2189
+ */
2190
+ kind?: 'audio';
2191
+ /**
2192
+ * Mime Type
2193
+ */
2194
+ mime_type: string;
2195
+ /**
2196
+ * Playable
2197
+ *
2198
+ * Whether `url` plays in an `<audio>` element.
2199
+ */
2200
+ playable: boolean;
2201
+ /**
2202
+ * Status
2203
+ *
2204
+ * `pending` until an agent with a speech-to-text model takes a turn.
2205
+ */
2206
+ status: 'pending' | 'transcribed' | 'failed';
2207
+ /**
2208
+ * Transcript
2209
+ *
2210
+ * What was said; empty when there was no speech.
2211
+ */
2212
+ transcript: string | null;
2213
+ /**
2214
+ * Url
2215
+ *
2216
+ * Signed link; valid until `url_expires_at`.
2217
+ */
2218
+ url: string;
2219
+ /**
2220
+ * Url Expires At
2221
+ */
2222
+ url_expires_at: string;
2223
+ };
2224
+ /**
2225
+ * ConversationContact
2226
+ *
2227
+ * A contact card the person shared, as read from the vCard.
2228
+ */
2229
+ export type ConversationContact = {
2230
+ /**
2231
+ * Bytes
2232
+ */
2233
+ bytes: number;
2234
+ /**
2235
+ * Contacts
2236
+ *
2237
+ * One per card in the file.
2238
+ */
2239
+ contacts: Array<ContactCard>;
2240
+ /**
2241
+ * Filename
2242
+ */
2243
+ filename: string | null;
2244
+ /**
2245
+ * Id
2246
+ */
2247
+ id: string;
2248
+ /**
2249
+ * Kind
2250
+ */
2251
+ kind?: 'contact';
2252
+ /**
2253
+ * Mime Type
2254
+ */
2255
+ mime_type?: 'text/vcard';
2256
+ /**
2257
+ * Url
2258
+ *
2259
+ * Signed download of the .vcf; valid until `url_expires_at`.
2260
+ */
2261
+ url: string;
2262
+ /**
2263
+ * Url Expires At
2264
+ */
2265
+ url_expires_at: string;
2266
+ };
2124
2267
  /**
2125
2268
  * ConversationDocument
2126
2269
  *
@@ -2211,9 +2354,9 @@ export type ConversationFile = {
2211
2354
  /**
2212
2355
  * Playable
2213
2356
  *
2214
- * Set when `url` plays in an `<audio>` or `<video>` element.
2357
+ * Set when `url` plays in a `<video>` element.
2215
2358
  */
2216
- playable: 'audio' | 'video' | null;
2359
+ playable: 'video' | null;
2217
2360
  /**
2218
2361
  * Url
2219
2362
  *
@@ -2285,7 +2428,7 @@ export type ConversationItemResponse = {
2285
2428
  /**
2286
2429
  * Attachments
2287
2430
  */
2288
- attachments: Array<ConversationImage | ConversationDocument | ConversationFile>;
2431
+ attachments: Array<ConversationImage | ConversationDocument | ConversationAudio | ConversationContact | ConversationFile>;
2289
2432
  /**
2290
2433
  * Attachments Not Kept
2291
2434
  *
@@ -6042,7 +6185,7 @@ export type ItemCreatedEvent = {
6042
6185
  /**
6043
6186
  * Attachments
6044
6187
  */
6045
- attachments: Array<ConversationImage | ConversationDocument | ConversationFile>;
6188
+ attachments: Array<ConversationImage | ConversationDocument | ConversationAudio | ConversationContact | ConversationFile>;
6046
6189
  /**
6047
6190
  * Attachments Not Kept
6048
6191
  *
@@ -10177,6 +10320,10 @@ export type STTCatalogEntryResponse = {
10177
10320
  * Default Language
10178
10321
  */
10179
10322
  default_language: string | null;
10323
+ /**
10324
+ * File Transcription
10325
+ */
10326
+ file_transcription: 'whole' | 'chunked' | null;
10180
10327
  /**
10181
10328
  * Label
10182
10329
  */
@@ -14480,6 +14627,55 @@ export type AgentsVersionsRollbackResults = {
14480
14627
  200: AgentResponse;
14481
14628
  };
14482
14629
  export type AgentsVersionsRollbackResult = AgentsVersionsRollbackResults[keyof AgentsVersionsRollbackResults];
14630
+ export type AttachmentsGetData = {
14631
+ body?: never;
14632
+ path: {
14633
+ /**
14634
+ * Attachment Id
14635
+ */
14636
+ attachment_id: string;
14637
+ };
14638
+ query?: never;
14639
+ url: '/v1/attachments/{attachment_id}';
14640
+ };
14641
+ export type AttachmentsGetErrors = {
14642
+ /**
14643
+ * Missing credential, or one that is revoked or no longer a member of this organization.
14644
+ */
14645
+ 401: ErrorResponse;
14646
+ /**
14647
+ * No such resource in this organization.
14648
+ */
14649
+ 404: ErrorResponse;
14650
+ /**
14651
+ * The request did not match this operation's schema; `detail.errors` lists each field.
14652
+ */
14653
+ 422: ErrorResponse;
14654
+ /**
14655
+ * Unexpected error. Every error this API returns carries this body.
14656
+ */
14657
+ default: ErrorResponse;
14658
+ };
14659
+ export type AttachmentsGetError = AttachmentsGetErrors[keyof AttachmentsGetErrors];
14660
+ export type AttachmentsGetResults = {
14661
+ /**
14662
+ * Response Attachments.Get
14663
+ *
14664
+ * Successful Response
14665
+ */
14666
+ 200: ({
14667
+ kind: 'image';
14668
+ } & ConversationImage) | ({
14669
+ kind: 'document';
14670
+ } & ConversationDocument) | ({
14671
+ kind: 'audio';
14672
+ } & ConversationAudio) | ({
14673
+ kind: 'contact';
14674
+ } & ConversationContact) | ({
14675
+ kind: 'file';
14676
+ } & ConversationFile);
14677
+ };
14678
+ export type AttachmentsGetResult = AttachmentsGetResults[keyof AttachmentsGetResults];
14483
14679
  export type BillingCreditsGetData = {
14484
14680
  body?: never;
14485
14681
  path?: never;
@@ -16871,55 +17067,6 @@ export type ConversationsUpdateResults = {
16871
17067
  200: ConversationResponse;
16872
17068
  };
16873
17069
  export type ConversationsUpdateResult = ConversationsUpdateResults[keyof ConversationsUpdateResults];
16874
- export type ConversationsAttachmentsGetData = {
16875
- body?: never;
16876
- path: {
16877
- /**
16878
- * Conversation Id
16879
- */
16880
- conversation_id: string;
16881
- /**
16882
- * Attachment Id
16883
- */
16884
- attachment_id: string;
16885
- };
16886
- query?: never;
16887
- url: '/v1/conversations/{conversation_id}/attachments/{attachment_id}';
16888
- };
16889
- export type ConversationsAttachmentsGetErrors = {
16890
- /**
16891
- * Missing credential, or one that is revoked or no longer a member of this organization.
16892
- */
16893
- 401: ErrorResponse;
16894
- /**
16895
- * No such resource in this organization.
16896
- */
16897
- 404: ErrorResponse;
16898
- /**
16899
- * The request did not match this operation's schema; `detail.errors` lists each field.
16900
- */
16901
- 422: ErrorResponse;
16902
- /**
16903
- * Unexpected error. Every error this API returns carries this body.
16904
- */
16905
- default: ErrorResponse;
16906
- };
16907
- export type ConversationsAttachmentsGetError = ConversationsAttachmentsGetErrors[keyof ConversationsAttachmentsGetErrors];
16908
- export type ConversationsAttachmentsGetResults = {
16909
- /**
16910
- * Response Conversations.Attachments.Get
16911
- *
16912
- * Successful Response
16913
- */
16914
- 200: ({
16915
- kind: 'image';
16916
- } & ConversationImage) | ({
16917
- kind: 'document';
16918
- } & ConversationDocument) | ({
16919
- kind: 'file';
16920
- } & ConversationFile);
16921
- };
16922
- export type ConversationsAttachmentsGetResult = ConversationsAttachmentsGetResults[keyof ConversationsAttachmentsGetResults];
16923
17070
  export type ConversationsEventsData = {
16924
17071
  body?: never;
16925
17072
  path: {