retell-sdk 5.4.0 → 5.6.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +9 -0
  3. package/client.d.mts +1 -1
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +1 -1
  6. package/client.d.ts.map +1 -1
  7. package/client.js +2 -12
  8. package/client.js.map +1 -1
  9. package/client.mjs +2 -12
  10. package/client.mjs.map +1 -1
  11. package/internal/utils/query.d.mts +5 -0
  12. package/internal/utils/query.d.mts.map +1 -0
  13. package/internal/utils/query.d.ts +5 -0
  14. package/internal/utils/query.d.ts.map +1 -0
  15. package/internal/utils/query.js +23 -0
  16. package/internal/utils/query.js.map +1 -0
  17. package/internal/utils/query.mjs +20 -0
  18. package/internal/utils/query.mjs.map +1 -0
  19. package/internal/utils.d.mts +1 -0
  20. package/internal/utils.d.ts +1 -0
  21. package/internal/utils.js +1 -0
  22. package/internal/utils.js.map +1 -1
  23. package/internal/utils.mjs +1 -0
  24. package/package.json +1 -1
  25. package/resources/agent.d.mts +18 -0
  26. package/resources/agent.d.mts.map +1 -1
  27. package/resources/agent.d.ts +18 -0
  28. package/resources/agent.d.ts.map +1 -1
  29. package/resources/batch-call.d.mts +12 -0
  30. package/resources/batch-call.d.mts.map +1 -1
  31. package/resources/batch-call.d.ts +12 -0
  32. package/resources/batch-call.d.ts.map +1 -1
  33. package/resources/call.d.mts +22 -4
  34. package/resources/call.d.mts.map +1 -1
  35. package/resources/call.d.ts +22 -4
  36. package/resources/call.d.ts.map +1 -1
  37. package/resources/knowledge-base.d.mts +20 -0
  38. package/resources/knowledge-base.d.mts.map +1 -1
  39. package/resources/knowledge-base.d.ts +20 -0
  40. package/resources/knowledge-base.d.ts.map +1 -1
  41. package/src/client.ts +5 -17
  42. package/src/internal/utils/query.ts +23 -0
  43. package/src/internal/utils.ts +1 -0
  44. package/src/resources/agent.ts +21 -0
  45. package/src/resources/batch-call.ts +12 -0
  46. package/src/resources/call.ts +33 -3
  47. package/src/resources/knowledge-base.ts +24 -0
  48. package/src/version.ts +1 -1
  49. package/version.d.mts +1 -1
  50. package/version.d.ts +1 -1
  51. package/version.js +1 -1
  52. package/version.mjs +1 -1
@@ -99,6 +99,15 @@ export interface KnowledgeBaseResponse {
99
99
  * enable_auto_refresh is true.
100
100
  */
101
101
  last_refreshed_timestamp?: number;
102
+ /**
103
+ * Maximum number of characters per chunk when splitting knowledge base content.
104
+ */
105
+ max_chunk_size?: number;
106
+ /**
107
+ * Minimum number of characters per chunk. Chunks smaller than this are merged with
108
+ * adjacent chunks.
109
+ */
110
+ min_chunk_size?: number;
102
111
  }
103
112
  export declare namespace KnowledgeBaseResponse {
104
113
  interface KnowledgeBaseSourceDocument {
@@ -176,6 +185,17 @@ export interface KnowledgeBaseCreateParams {
176
185
  * URLs to be scraped and added to the knowledge base. Must be valid urls.
177
186
  */
178
187
  knowledge_base_urls?: Array<string>;
188
+ /**
189
+ * Maximum number of characters per chunk when splitting knowledge base. Default
190
+ * is 2000. content. Immutable after creation.
191
+ */
192
+ max_chunk_size?: number;
193
+ /**
194
+ * Minimum number of characters per chunk. Chunks smaller than this will be merged
195
+ * with adjacent chunks. Must be less than max_chunk_size. Immutable after
196
+ * creation. Default is 400.
197
+ */
198
+ min_chunk_size?: number;
179
199
  }
180
200
  export declare namespace KnowledgeBaseCreateParams {
181
201
  interface KnowledgeBaseText {
@@ -1 +1 @@
1
- {"version":3,"file":"knowledge-base.d.ts","sourceRoot":"","sources":["../src/resources/knowledge-base.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OAEnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,G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,CAAC;KACf;CACF;AAED,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
package/src/client.ts CHANGED
@@ -11,6 +11,7 @@ import type { APIResponseProps } from './internal/parse';
11
11
  import { getPlatformHeaders } from './internal/detect-platform';
12
12
  import * as Shims from './internal/shims';
13
13
  import * as Opts from './internal/request-options';
14
+ import { stringifyQuery } from './internal/utils/query';
14
15
  import { VERSION } from './version';
15
16
  import * as Errors from './core/error';
16
17
  import * as Uploads from './core/uploads';
@@ -321,21 +322,8 @@ export class Retell {
321
322
  /**
322
323
  * Basic re-implementation of `qs.stringify` for primitive types.
323
324
  */
324
- protected stringifyQuery(query: Record<string, unknown>): string {
325
- return Object.entries(query)
326
- .filter(([_, value]) => typeof value !== 'undefined')
327
- .map(([key, value]) => {
328
- if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
329
- return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
330
- }
331
- if (value === null) {
332
- return `${encodeURIComponent(key)}=`;
333
- }
334
- throw new Errors.RetellError(
335
- `Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`,
336
- );
337
- })
338
- .join('&');
325
+ protected stringifyQuery(query: object | Record<string, unknown>): string {
326
+ return stringifyQuery(query);
339
327
  }
340
328
 
341
329
  private getUserAgent(): string {
@@ -372,7 +360,7 @@ export class Retell {
372
360
  }
373
361
 
374
362
  if (typeof query === 'object' && query && !Array.isArray(query)) {
375
- url.search = this.stringifyQuery(query as Record<string, unknown>);
363
+ url.search = this.stringifyQuery(query);
376
364
  }
377
365
 
378
366
  return url.toString();
@@ -811,7 +799,7 @@ export class Retell {
811
799
  ) {
812
800
  return {
813
801
  bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
814
- body: this.stringifyQuery(body as Record<string, unknown>),
802
+ body: this.stringifyQuery(body),
815
803
  };
816
804
  } else {
817
805
  return this.#encoder({ body, headers });
@@ -0,0 +1,23 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { RetellError } from '../../core/error';
4
+
5
+ /**
6
+ * Basic re-implementation of `qs.stringify` for primitive types.
7
+ */
8
+ export function stringifyQuery(query: object | Record<string, unknown>) {
9
+ return Object.entries(query)
10
+ .filter(([_, value]) => typeof value !== 'undefined')
11
+ .map(([key, value]) => {
12
+ if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
13
+ return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
14
+ }
15
+ if (value === null) {
16
+ return `${encodeURIComponent(key)}=`;
17
+ }
18
+ throw new RetellError(
19
+ `Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`,
20
+ );
21
+ })
22
+ .join('&');
23
+ }
@@ -6,3 +6,4 @@ export * from './utils/env';
6
6
  export * from './utils/log';
7
7
  export * from './utils/uuid';
8
8
  export * from './utils/sleep';
9
+ export * from './utils/query';
@@ -295,6 +295,13 @@ export interface AgentResponse {
295
295
  */
296
296
  enable_backchannel?: boolean;
297
297
 
298
+ /**
299
+ * If set to true, the agent will dynamically adjust how quickly it responds based
300
+ * on the user's speech rate and past turn-taking behavior in the call. If unset,
301
+ * default value false will apply.
302
+ */
303
+ enable_dynamic_responsiveness?: boolean;
304
+
298
305
  /**
299
306
  * If set to true, will enable dynamic voice speed adjustment based on the user's
300
307
  * speech rate and conversation context. If unset, default value false will apply.
@@ -1111,6 +1118,13 @@ export interface AgentCreateParams {
1111
1118
  */
1112
1119
  enable_backchannel?: boolean;
1113
1120
 
1121
+ /**
1122
+ * If set to true, the agent will dynamically adjust how quickly it responds based
1123
+ * on the user's speech rate and past turn-taking behavior in the call. If unset,
1124
+ * default value false will apply.
1125
+ */
1126
+ enable_dynamic_responsiveness?: boolean;
1127
+
1114
1128
  /**
1115
1129
  * If set to true, will enable dynamic voice speed adjustment based on the user's
1116
1130
  * speech rate and conversation context. If unset, default value false will apply.
@@ -1916,6 +1930,13 @@ export interface AgentUpdateParams {
1916
1930
  */
1917
1931
  enable_backchannel?: boolean;
1918
1932
 
1933
+ /**
1934
+ * Body param: If set to true, the agent will dynamically adjust how quickly it
1935
+ * responds based on the user's speech rate and past turn-taking behavior in the
1936
+ * call. If unset, default value false will apply.
1937
+ */
1938
+ enable_dynamic_responsiveness?: boolean;
1939
+
1919
1940
  /**
1920
1941
  * Body param: If set to true, will enable dynamic voice speed adjustment based on
1921
1942
  * the user's speech rate and conversation context. If unset, default value false
@@ -150,6 +150,11 @@ export namespace BatchCallCreateBatchCallParams {
150
150
  */
151
151
  agent_override?: Task.AgentOverride;
152
152
 
153
+ /**
154
+ * Add optional custom SIP headers to the call.
155
+ */
156
+ custom_sip_headers?: { [key: string]: string };
157
+
153
158
  /**
154
159
  * If true, the e.164 validation will be ignored for the from_number. This can be
155
160
  * useful when you want to dial to internal pseudo numbers. This only applies when
@@ -360,6 +365,13 @@ export namespace BatchCallCreateBatchCallParams {
360
365
  */
361
366
  enable_backchannel?: boolean;
362
367
 
368
+ /**
369
+ * If set to true, the agent will dynamically adjust how quickly it responds based
370
+ * on the user's speech rate and past turn-taking behavior in the call. If unset,
371
+ * default value false will apply.
372
+ */
373
+ enable_dynamic_responsiveness?: boolean;
374
+
363
375
  /**
364
376
  * If set to true, will enable dynamic voice speed adjustment based on the user's
365
377
  * speech rate and conversation context. If unset, default value false will apply.
@@ -223,6 +223,7 @@ export interface PhoneCallResponse {
223
223
  | 'agent_hangup'
224
224
  | 'call_transfer'
225
225
  | 'voicemail_reached'
226
+ | 'ivr_reached'
226
227
  | 'inactivity'
227
228
  | 'max_duration_reached'
228
229
  | 'concurrency_limit_reached'
@@ -246,7 +247,9 @@ export interface PhoneCallResponse {
246
247
  | 'error_retell'
247
248
  | 'error_unknown'
248
249
  | 'error_user_not_joined'
249
- | 'registered_call_timeout';
250
+ | 'registered_call_timeout'
251
+ | 'transfer_bridged'
252
+ | 'transfer_cancelled';
250
253
 
251
254
  /**
252
255
  * Duration of the call in milliseconds. Available after call ends.
@@ -1276,6 +1279,7 @@ export interface WebCallResponse {
1276
1279
  | 'agent_hangup'
1277
1280
  | 'call_transfer'
1278
1281
  | 'voicemail_reached'
1282
+ | 'ivr_reached'
1279
1283
  | 'inactivity'
1280
1284
  | 'max_duration_reached'
1281
1285
  | 'concurrency_limit_reached'
@@ -1299,7 +1303,9 @@ export interface WebCallResponse {
1299
1303
  | 'error_retell'
1300
1304
  | 'error_unknown'
1301
1305
  | 'error_user_not_joined'
1302
- | 'registered_call_timeout';
1306
+ | 'registered_call_timeout'
1307
+ | 'transfer_bridged'
1308
+ | 'transfer_cancelled';
1303
1309
 
1304
1310
  /**
1305
1311
  * Duration of the call in milliseconds. Available after call ends.
@@ -2307,7 +2313,7 @@ export namespace CallListParams {
2307
2313
  /**
2308
2314
  * Only retrieve calls with specific call status(es).
2309
2315
  */
2310
- call_status?: Array<'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'>;
2316
+ call_status?: Array<'not_connected' | 'ongoing' | 'ended' | 'error'>;
2311
2317
 
2312
2318
  /**
2313
2319
  * Only retrieve calls with specific call successful(s).
@@ -2332,6 +2338,7 @@ export namespace CallListParams {
2332
2338
  | 'agent_hangup'
2333
2339
  | 'call_transfer'
2334
2340
  | 'voicemail_reached'
2341
+ | 'ivr_reached'
2335
2342
  | 'inactivity'
2336
2343
  | 'max_duration_reached'
2337
2344
  | 'concurrency_limit_reached'
@@ -2356,6 +2363,8 @@ export namespace CallListParams {
2356
2363
  | 'error_unknown'
2357
2364
  | 'error_user_not_joined'
2358
2365
  | 'registered_call_timeout'
2366
+ | 'transfer_bridged'
2367
+ | 'transfer_cancelled'
2359
2368
  >;
2360
2369
 
2361
2370
  /**
@@ -2685,6 +2694,13 @@ export namespace CallCreatePhoneCallParams {
2685
2694
  */
2686
2695
  enable_backchannel?: boolean;
2687
2696
 
2697
+ /**
2698
+ * If set to true, the agent will dynamically adjust how quickly it responds based
2699
+ * on the user's speech rate and past turn-taking behavior in the call. If unset,
2700
+ * default value false will apply.
2701
+ */
2702
+ enable_dynamic_responsiveness?: boolean;
2703
+
2688
2704
  /**
2689
2705
  * If set to true, will enable dynamic voice speed adjustment based on the user's
2690
2706
  * speech rate and conversation context. If unset, default value false will apply.
@@ -3764,6 +3780,13 @@ export namespace CallCreateWebCallParams {
3764
3780
  */
3765
3781
  enable_backchannel?: boolean;
3766
3782
 
3783
+ /**
3784
+ * If set to true, the agent will dynamically adjust how quickly it responds based
3785
+ * on the user's speech rate and past turn-taking behavior in the call. If unset,
3786
+ * default value false will apply.
3787
+ */
3788
+ enable_dynamic_responsiveness?: boolean;
3789
+
3767
3790
  /**
3768
3791
  * If set to true, will enable dynamic voice speed adjustment based on the user's
3769
3792
  * speech rate and conversation context. If unset, default value false will apply.
@@ -4857,6 +4880,13 @@ export namespace CallRegisterPhoneCallParams {
4857
4880
  */
4858
4881
  enable_backchannel?: boolean;
4859
4882
 
4883
+ /**
4884
+ * If set to true, the agent will dynamically adjust how quickly it responds based
4885
+ * on the user's speech rate and past turn-taking behavior in the call. If unset,
4886
+ * default value false will apply.
4887
+ */
4888
+ enable_dynamic_responsiveness?: boolean;
4889
+
4860
4890
  /**
4861
4891
  * If set to true, will enable dynamic voice speed adjustment based on the user's
4862
4892
  * speech rate and conversation context. If unset, default value false will apply.
@@ -153,6 +153,17 @@ export interface KnowledgeBaseResponse {
153
153
  * enable_auto_refresh is true.
154
154
  */
155
155
  last_refreshed_timestamp?: number;
156
+
157
+ /**
158
+ * Maximum number of characters per chunk when splitting knowledge base content.
159
+ */
160
+ max_chunk_size?: number;
161
+
162
+ /**
163
+ * Minimum number of characters per chunk. Chunks smaller than this are merged with
164
+ * adjacent chunks.
165
+ */
166
+ min_chunk_size?: number;
156
167
  }
157
168
 
158
169
  export namespace KnowledgeBaseResponse {
@@ -247,6 +258,19 @@ export interface KnowledgeBaseCreateParams {
247
258
  * URLs to be scraped and added to the knowledge base. Must be valid urls.
248
259
  */
249
260
  knowledge_base_urls?: Array<string>;
261
+
262
+ /**
263
+ * Maximum number of characters per chunk when splitting knowledge base. Default
264
+ * is 2000. content. Immutable after creation.
265
+ */
266
+ max_chunk_size?: number;
267
+
268
+ /**
269
+ * Minimum number of characters per chunk. Chunks smaller than this will be merged
270
+ * with adjacent chunks. Must be less than max_chunk_size. Immutable after
271
+ * creation. Default is 400.
272
+ */
273
+ min_chunk_size?: number;
250
274
  }
251
275
 
252
276
  export namespace KnowledgeBaseCreateParams {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '5.4.0'; // x-release-please-version
1
+ export const VERSION = '5.6.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "5.4.0";
1
+ export declare const VERSION = "5.6.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "5.4.0";
1
+ export declare const VERSION = "5.6.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '5.4.0'; // x-release-please-version
4
+ exports.VERSION = '5.6.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '5.4.0'; // x-release-please-version
1
+ export const VERSION = '5.6.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map