retell-sdk 6.0.1 → 6.1.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 (96) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/agent.d.mts +3222 -526
  10. package/resources/agent.d.mts.map +1 -1
  11. package/resources/agent.d.ts +3222 -526
  12. package/resources/agent.d.ts.map +1 -1
  13. package/resources/app.d.mts +122 -5
  14. package/resources/app.d.mts.map +1 -1
  15. package/resources/app.d.ts +122 -5
  16. package/resources/app.d.ts.map +1 -1
  17. package/resources/app.js +17 -1
  18. package/resources/app.js.map +1 -1
  19. package/resources/app.mjs +17 -1
  20. package/resources/app.mjs.map +1 -1
  21. package/resources/batch-call.d.mts +912 -13
  22. package/resources/batch-call.d.mts.map +1 -1
  23. package/resources/batch-call.d.ts +912 -13
  24. package/resources/batch-call.d.ts.map +1 -1
  25. package/resources/call.d.mts +7843 -3792
  26. package/resources/call.d.mts.map +1 -1
  27. package/resources/call.d.ts +7843 -3792
  28. package/resources/call.d.ts.map +1 -1
  29. package/resources/call.js +1 -1
  30. package/resources/call.mjs +1 -1
  31. package/resources/chat-agent.d.mts +3125 -453
  32. package/resources/chat-agent.d.mts.map +1 -1
  33. package/resources/chat-agent.d.ts +3125 -453
  34. package/resources/chat-agent.d.ts.map +1 -1
  35. package/resources/chat.d.mts +892 -26
  36. package/resources/chat.d.mts.map +1 -1
  37. package/resources/chat.d.ts +892 -26
  38. package/resources/chat.d.ts.map +1 -1
  39. package/resources/contact.d.mts +162 -20
  40. package/resources/contact.d.mts.map +1 -1
  41. package/resources/contact.d.ts +162 -20
  42. package/resources/contact.d.ts.map +1 -1
  43. package/resources/contact.js +98 -4
  44. package/resources/contact.js.map +1 -1
  45. package/resources/contact.mjs +98 -4
  46. package/resources/contact.mjs.map +1 -1
  47. package/resources/conversation-flow-component.d.mts +3282 -243
  48. package/resources/conversation-flow-component.d.mts.map +1 -1
  49. package/resources/conversation-flow-component.d.ts +3282 -243
  50. package/resources/conversation-flow-component.d.ts.map +1 -1
  51. package/resources/conversation-flow.d.mts +7347 -1269
  52. package/resources/conversation-flow.d.mts.map +1 -1
  53. package/resources/conversation-flow.d.ts +7347 -1269
  54. package/resources/conversation-flow.d.ts.map +1 -1
  55. package/resources/crm.d.mts +37 -5
  56. package/resources/crm.d.mts.map +1 -1
  57. package/resources/crm.d.ts +37 -5
  58. package/resources/crm.d.ts.map +1 -1
  59. package/resources/identity.d.mts +4 -0
  60. package/resources/identity.d.mts.map +1 -1
  61. package/resources/identity.d.ts +4 -0
  62. package/resources/identity.d.ts.map +1 -1
  63. package/resources/index.d.mts +1 -1
  64. package/resources/index.d.mts.map +1 -1
  65. package/resources/index.d.ts +1 -1
  66. package/resources/index.d.ts.map +1 -1
  67. package/resources/index.js.map +1 -1
  68. package/resources/index.mjs.map +1 -1
  69. package/resources/llm.d.mts +867 -9
  70. package/resources/llm.d.mts.map +1 -1
  71. package/resources/llm.d.ts +867 -9
  72. package/resources/llm.d.ts.map +1 -1
  73. package/resources/tests.d.mts +3 -3
  74. package/resources/tests.d.mts.map +1 -1
  75. package/resources/tests.d.ts +3 -3
  76. package/resources/tests.d.ts.map +1 -1
  77. package/src/client.ts +4 -0
  78. package/src/resources/agent.ts +4786 -1504
  79. package/src/resources/app.ts +144 -4
  80. package/src/resources/batch-call.ts +1115 -10
  81. package/src/resources/call.ts +9825 -4806
  82. package/src/resources/chat-agent.ts +3958 -698
  83. package/src/resources/chat.ts +1133 -50
  84. package/src/resources/contact.ts +168 -20
  85. package/src/resources/conversation-flow-component.ts +4466 -191
  86. package/src/resources/conversation-flow.ts +9084 -525
  87. package/src/resources/crm.ts +44 -5
  88. package/src/resources/identity.ts +5 -0
  89. package/src/resources/index.ts +2 -0
  90. package/src/resources/llm.ts +1045 -46
  91. package/src/resources/tests.ts +21 -0
  92. package/src/version.ts +1 -1
  93. package/version.d.mts +1 -1
  94. package/version.d.ts +1 -1
  95. package/version.js +1 -1
  96. package/version.mjs +1 -1
@@ -12,7 +12,8 @@ export class App extends APIResource {
12
12
  * desk, and so on), holding its credentials and settings. Providers with
13
13
  * caller-managed credentials accept auth_config. Providers using the OAuth
14
14
  * callback must omit auth_config and be authorized through connect-app.
15
- * Credentials are stored encrypted and never returned. Up to 20 apps per provider.
15
+ * Credentials are stored encrypted and never returned. Up to 20 apps per provider
16
+ * by default, unless a custom limit is configured for the organization.
16
17
  */
17
18
  create(body: AppCreateParams, options?: RequestOptions): APIPromise<AppResponse> {
18
19
  return this._client.post('/create-app', { body, ...options });
@@ -59,6 +60,26 @@ export class App extends APIResource {
59
60
  return this._client.get(path`/get-app/${appID}`, options);
60
61
  }
61
62
 
63
+ /**
64
+ * One round of multi-step schema resolution for an app tool template against a
65
+ * connected App. parameters is the input parameters resolved so far, with
66
+ * properties configured by const or description, and is empty on the first call.
67
+ * Returns the next input_schema to fill; complete marks the last round (it may
68
+ * accompany the final input_schema) and may include an optional response_schema.
69
+ * Input-schema property descriptions provide the default text for LLM inference,
70
+ * and each property's default_input_mode ("const" or "description") is the input
71
+ * mode to preselect for it. A property may also carry extra_info ({ text?, link?
72
+ * }), guidance to render under its editor, e.g. a docs link on how to find an id.
73
+ * Used by the tool config UI.
74
+ */
75
+ getToolSchema(
76
+ appID: string,
77
+ body: AppGetToolSchemaParams,
78
+ options?: RequestOptions,
79
+ ): APIPromise<AppGetToolSchemaResponse> {
80
+ return this._client.post(path`/get-app-tool-schema/${appID}`, { body, ...options });
81
+ }
82
+
62
83
  /**
63
84
  * List the agents and knowledge bases referencing an App, most recently configured
64
85
  * first by default.
@@ -171,7 +192,8 @@ export namespace AppResponse {
171
192
  export interface CRMConfig {
172
193
  /**
173
194
  * Field mappings applied when syncing CRM records into Retell contacts. Must
174
- * include phone_number, which is the field the two systems are matched on.
195
+ * include phone_number, which is the field the two systems are matched on. A
196
+ * do_not_call mapping can mark contacts as do-not-call but never clears the flag.
175
197
  */
176
198
  inbound_sync_mappings?: Array<CRMConfig.InboundSyncMapping>;
177
199
 
@@ -238,6 +260,80 @@ export interface AppListResponse {
238
260
  pagination_key?: string;
239
261
  }
240
262
 
263
+ export interface AppGetToolSchemaResponse {
264
+ complete: boolean;
265
+
266
+ /**
267
+ * The parameters the functions accepts, described as a JSON Schema object. See
268
+ * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
269
+ * documentation about the format. Omitting parameters defines a function with an
270
+ * empty parameter list.
271
+ */
272
+ input_schema?: AppGetToolSchemaResponse.InputSchema;
273
+
274
+ /**
275
+ * The parameters the functions accepts, described as a JSON Schema object. See
276
+ * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
277
+ * documentation about the format. Omitting parameters defines a function with an
278
+ * empty parameter list.
279
+ */
280
+ response_schema?: AppGetToolSchemaResponse.ResponseSchema;
281
+ }
282
+
283
+ export namespace AppGetToolSchemaResponse {
284
+ /**
285
+ * The parameters the functions accepts, described as a JSON Schema object. See
286
+ * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
287
+ * documentation about the format. Omitting parameters defines a function with an
288
+ * empty parameter list.
289
+ */
290
+ export interface InputSchema {
291
+ /**
292
+ * The value of properties is an object, where each key is the name of a property
293
+ * and each value is a schema used to validate that property.
294
+ */
295
+ properties: unknown;
296
+
297
+ /**
298
+ * Type must be "object" for a JSON Schema object.
299
+ */
300
+ type: 'object';
301
+
302
+ /**
303
+ * List of names of required property when generating this parameter. LLM will do
304
+ * its best to generate the required properties in its function arguments. Property
305
+ * must exist in properties.
306
+ */
307
+ required?: Array<string>;
308
+ }
309
+
310
+ /**
311
+ * The parameters the functions accepts, described as a JSON Schema object. See
312
+ * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
313
+ * documentation about the format. Omitting parameters defines a function with an
314
+ * empty parameter list.
315
+ */
316
+ export interface ResponseSchema {
317
+ /**
318
+ * The value of properties is an object, where each key is the name of a property
319
+ * and each value is a schema used to validate that property.
320
+ */
321
+ properties: unknown;
322
+
323
+ /**
324
+ * Type must be "object" for a JSON Schema object.
325
+ */
326
+ type: 'object';
327
+
328
+ /**
329
+ * List of names of required property when generating this parameter. LLM will do
330
+ * its best to generate the required properties in its function arguments. Property
331
+ * must exist in properties.
332
+ */
333
+ required?: Array<string>;
334
+ }
335
+ }
336
+
241
337
  export interface AppListUsagesResponse {
242
338
  /**
243
339
  * Whether more results are available.
@@ -370,7 +466,8 @@ export namespace AppCreateParams {
370
466
  export interface CRMConfig {
371
467
  /**
372
468
  * Field mappings applied when syncing CRM records into Retell contacts. Must
373
- * include phone_number, which is the field the two systems are matched on.
469
+ * include phone_number, which is the field the two systems are matched on. A
470
+ * do_not_call mapping can mark contacts as do-not-call but never clears the flag.
374
471
  */
375
472
  inbound_sync_mappings?: Array<CRMConfig.InboundSyncMapping>;
376
473
 
@@ -484,7 +581,8 @@ export namespace AppUpdateParams {
484
581
  export interface CRMConfig {
485
582
  /**
486
583
  * Field mappings applied when syncing CRM records into Retell contacts. Must
487
- * include phone_number, which is the field the two systems are matched on.
584
+ * include phone_number, which is the field the two systems are matched on. A
585
+ * do_not_call mapping can mark contacts as do-not-call but never clears the flag.
488
586
  */
489
587
  inbound_sync_mappings?: Array<CRMConfig.InboundSyncMapping>;
490
588
 
@@ -561,6 +659,46 @@ export interface AppDeleteParams {
561
659
  force_delete?: boolean;
562
660
  }
563
661
 
662
+ export interface AppGetToolSchemaParams {
663
+ /**
664
+ * The app tool template name (the provider's catalog tool name).
665
+ */
666
+ app_tool_template_name: string;
667
+
668
+ /**
669
+ * The input parameters resolved so far; empty on the first call.
670
+ */
671
+ parameters?: Array<AppGetToolSchemaParams.Parameter>;
672
+ }
673
+
674
+ export namespace AppGetToolSchemaParams {
675
+ /**
676
+ * The parameters the functions accepts, described as a JSON Schema object. See
677
+ * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
678
+ * documentation about the format. Omitting parameters defines a function with an
679
+ * empty parameter list.
680
+ */
681
+ export interface Parameter {
682
+ /**
683
+ * The value of properties is an object, where each key is the name of a property
684
+ * and each value is a schema used to validate that property.
685
+ */
686
+ properties: unknown;
687
+
688
+ /**
689
+ * Type must be "object" for a JSON Schema object.
690
+ */
691
+ type: 'object';
692
+
693
+ /**
694
+ * List of names of required property when generating this parameter. LLM will do
695
+ * its best to generate the required properties in its function arguments. Property
696
+ * must exist in properties.
697
+ */
698
+ required?: Array<string>;
699
+ }
700
+ }
701
+
564
702
  export interface AppListUsagesParams {
565
703
  /**
566
704
  * Maximum number of items to return.
@@ -582,12 +720,14 @@ export declare namespace App {
582
720
  export {
583
721
  type AppResponse as AppResponse,
584
722
  type AppListResponse as AppListResponse,
723
+ type AppGetToolSchemaResponse as AppGetToolSchemaResponse,
585
724
  type AppListUsagesResponse as AppListUsagesResponse,
586
725
  type AppTestAuthResponse as AppTestAuthResponse,
587
726
  type AppCreateParams as AppCreateParams,
588
727
  type AppUpdateParams as AppUpdateParams,
589
728
  type AppListParams as AppListParams,
590
729
  type AppDeleteParams as AppDeleteParams,
730
+ type AppGetToolSchemaParams as AppGetToolSchemaParams,
591
731
  type AppListUsagesParams as AppListUsagesParams,
592
732
  };
593
733
  }