retell-sdk 5.49.1 → 5.49.2

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 (107) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/client.d.mts +9 -9
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +9 -9
  5. package/client.d.ts.map +1 -1
  6. package/package.json +1 -1
  7. package/resources/agent.d.mts +69 -69
  8. package/resources/agent.d.mts.map +1 -1
  9. package/resources/agent.d.ts +69 -69
  10. package/resources/agent.d.ts.map +1 -1
  11. package/resources/agent.js +30 -30
  12. package/resources/agent.js.map +1 -1
  13. package/resources/agent.mjs +30 -30
  14. package/resources/agent.mjs.map +1 -1
  15. package/resources/call.d.mts +1350 -1350
  16. package/resources/call.d.mts.map +1 -1
  17. package/resources/call.d.ts +1350 -1350
  18. package/resources/call.d.ts.map +1 -1
  19. package/resources/call.js +60 -60
  20. package/resources/call.js.map +1 -1
  21. package/resources/call.mjs +60 -60
  22. package/resources/call.mjs.map +1 -1
  23. package/resources/chat-agent.d.mts +70 -70
  24. package/resources/chat-agent.d.mts.map +1 -1
  25. package/resources/chat-agent.d.ts +70 -70
  26. package/resources/chat-agent.d.ts.map +1 -1
  27. package/resources/chat-agent.js +31 -31
  28. package/resources/chat-agent.js.map +1 -1
  29. package/resources/chat-agent.mjs +31 -31
  30. package/resources/chat-agent.mjs.map +1 -1
  31. package/resources/chat.d.mts +97 -97
  32. package/resources/chat.d.mts.map +1 -1
  33. package/resources/chat.d.ts +97 -97
  34. package/resources/chat.d.ts.map +1 -1
  35. package/resources/chat.js +55 -55
  36. package/resources/chat.js.map +1 -1
  37. package/resources/chat.mjs +55 -55
  38. package/resources/chat.mjs.map +1 -1
  39. package/resources/conversation-flow-component.d.mts +25 -25
  40. package/resources/conversation-flow-component.d.mts.map +1 -1
  41. package/resources/conversation-flow-component.d.ts +25 -25
  42. package/resources/conversation-flow-component.d.ts.map +1 -1
  43. package/resources/conversation-flow-component.js +12 -12
  44. package/resources/conversation-flow-component.js.map +1 -1
  45. package/resources/conversation-flow-component.mjs +12 -12
  46. package/resources/conversation-flow-component.mjs.map +1 -1
  47. package/resources/conversation-flow.d.mts +25 -25
  48. package/resources/conversation-flow.d.mts.map +1 -1
  49. package/resources/conversation-flow.d.ts +25 -25
  50. package/resources/conversation-flow.d.ts.map +1 -1
  51. package/resources/conversation-flow.js +12 -12
  52. package/resources/conversation-flow.js.map +1 -1
  53. package/resources/conversation-flow.mjs +12 -12
  54. package/resources/conversation-flow.mjs.map +1 -1
  55. package/resources/index.d.mts +9 -9
  56. package/resources/index.d.mts.map +1 -1
  57. package/resources/index.d.ts +9 -9
  58. package/resources/index.d.ts.map +1 -1
  59. package/resources/llm.d.mts +24 -24
  60. package/resources/llm.d.mts.map +1 -1
  61. package/resources/llm.d.ts +24 -24
  62. package/resources/llm.d.ts.map +1 -1
  63. package/resources/llm.js +11 -11
  64. package/resources/llm.js.map +1 -1
  65. package/resources/llm.mjs +11 -11
  66. package/resources/llm.mjs.map +1 -1
  67. package/resources/phone-number.d.mts +130 -130
  68. package/resources/phone-number.d.mts.map +1 -1
  69. package/resources/phone-number.d.ts +130 -130
  70. package/resources/phone-number.d.ts.map +1 -1
  71. package/resources/phone-number.js +27 -27
  72. package/resources/phone-number.js.map +1 -1
  73. package/resources/phone-number.mjs +27 -27
  74. package/resources/phone-number.mjs.map +1 -1
  75. package/resources/tests.d.mts +95 -95
  76. package/resources/tests.d.mts.map +1 -1
  77. package/resources/tests.d.ts +95 -95
  78. package/resources/tests.d.ts.map +1 -1
  79. package/resources/tests.js +27 -27
  80. package/resources/tests.js.map +1 -1
  81. package/resources/tests.mjs +27 -27
  82. package/resources/tests.mjs.map +1 -1
  83. package/resources/voice.d.mts +8 -8
  84. package/resources/voice.d.mts.map +1 -1
  85. package/resources/voice.d.ts +8 -8
  86. package/resources/voice.d.ts.map +1 -1
  87. package/resources/voice.js +12 -12
  88. package/resources/voice.js.map +1 -1
  89. package/resources/voice.mjs +12 -12
  90. package/resources/voice.mjs.map +1 -1
  91. package/src/client.ts +18 -18
  92. package/src/resources/agent.ts +90 -90
  93. package/src/resources/call.ts +1821 -1821
  94. package/src/resources/chat-agent.ts +95 -95
  95. package/src/resources/chat.ts +112 -112
  96. package/src/resources/conversation-flow-component.ts +34 -34
  97. package/src/resources/conversation-flow.ts +34 -34
  98. package/src/resources/index.ts +18 -18
  99. package/src/resources/llm.ts +30 -30
  100. package/src/resources/phone-number.ts +152 -152
  101. package/src/resources/tests.ts +136 -136
  102. package/src/resources/voice.ts +12 -12
  103. package/src/version.ts +1 -1
  104. package/version.d.mts +1 -1
  105. package/version.d.ts +1 -1
  106. package/version.js +1 -1
  107. package/version.mjs +1 -1
@@ -44,6 +44,22 @@ export class Agent extends APIResource {
44
44
  return this._client.get(path`/get-agent/${agentID}`, { query, ...options });
45
45
  }
46
46
 
47
+ /**
48
+ * Update an existing agent's latest draft version
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const agentResponse = await client.agent.update(
53
+ * '16b980523634a6dc504898cda492e939',
54
+ * { agent_name: 'Jarvis' },
55
+ * );
56
+ * ```
57
+ */
58
+ update(agentID: string, params: AgentUpdateParams, options?: RequestOptions): APIPromise<AgentResponse> {
59
+ const { version, ...body } = params;
60
+ return this._client.patch(path`/update-agent/${agentID}`, { query: { version }, body, ...options });
61
+ }
62
+
47
63
  /**
48
64
  * List unique agents with pagination.
49
65
  *
@@ -72,22 +88,6 @@ export class Agent extends APIResource {
72
88
  });
73
89
  }
74
90
 
75
- /**
76
- * Update an existing agent's latest draft version
77
- *
78
- * @example
79
- * ```ts
80
- * const agentResponse = await client.agent.update(
81
- * '16b980523634a6dc504898cda492e939',
82
- * { agent_name: 'Jarvis' },
83
- * );
84
- * ```
85
- */
86
- update(agentID: string, params: AgentUpdateParams, options?: RequestOptions): APIPromise<AgentResponse> {
87
- const { version, ...body } = params;
88
- return this._client.patch(path`/update-agent/${agentID}`, { query: { version }, body, ...options });
89
- }
90
-
91
91
  /**
92
92
  * Delete an existing agent
93
93
  *
@@ -105,22 +105,6 @@ export class Agent extends APIResource {
105
105
  });
106
106
  }
107
107
 
108
- /**
109
- * Publish an existing draft version in place.
110
- *
111
- * @example
112
- * ```ts
113
- * await client.agent.publish('agent_xxx', { version: 15 });
114
- * ```
115
- */
116
- publish(agentID: string, body: AgentPublishParams, options?: RequestOptions): APIPromise<void> {
117
- return this._client.post(path`/publish-agent-version/${agentID}`, {
118
- body,
119
- ...options,
120
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
121
- });
122
- }
123
-
124
108
  /**
125
109
  * Create a new draft agent version from a base version.
126
110
  *
@@ -176,6 +160,22 @@ export class Agent extends APIResource {
176
160
  getVersions(agentID: string, options?: RequestOptions): APIPromise<AgentGetVersionsResponse> {
177
161
  return this._client.get(path`/get-agent-versions/${agentID}`, options);
178
162
  }
163
+
164
+ /**
165
+ * Publish an existing draft version in place.
166
+ *
167
+ * @example
168
+ * ```ts
169
+ * await client.agent.publish('agent_xxx', { version: 15 });
170
+ * ```
171
+ */
172
+ publish(agentID: string, body: AgentPublishParams, options?: RequestOptions): APIPromise<void> {
173
+ return this._client.post(path`/publish-agent-version/${agentID}`, {
174
+ body,
175
+ ...options,
176
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
177
+ });
178
+ }
179
179
  }
180
180
 
181
181
  export interface AgentResponse {
@@ -2418,57 +2418,6 @@ export interface AgentRetrieveParams {
2418
2418
  version?: string | number;
2419
2419
  }
2420
2420
 
2421
- export interface AgentListParams {
2422
- /**
2423
- * Query param: Maximum number of items to return.
2424
- */
2425
- limit?: number;
2426
-
2427
- /**
2428
- * Query param: Pagination key for fetching the next page.
2429
- */
2430
- pagination_key?: string;
2431
-
2432
- /**
2433
- * Query param: Sort order for results.
2434
- */
2435
- sort_order?: 'ascending' | 'descending';
2436
-
2437
- /**
2438
- * Body param: Filters for listing agents. All provided filters are connected with
2439
- * AND.
2440
- */
2441
- filter_criteria?: AgentListParams.FilterCriteria;
2442
- }
2443
-
2444
- export namespace AgentListParams {
2445
- /**
2446
- * Filters for listing agents. All provided filters are connected with AND.
2447
- */
2448
- export interface FilterCriteria {
2449
- channel?: FilterCriteria.Channel;
2450
-
2451
- /**
2452
- * Case-insensitive substring search over agent name, plus substring search over
2453
- * agent id.
2454
- */
2455
- query?: string;
2456
- }
2457
-
2458
- export namespace FilterCriteria {
2459
- export interface Channel {
2460
- /**
2461
- * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
2462
- */
2463
- op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
2464
-
2465
- type: 'string';
2466
-
2467
- value: 'voice' | 'chat';
2468
- }
2469
- }
2470
- }
2471
-
2472
2421
  export interface AgentUpdateParams {
2473
2422
  /**
2474
2423
  * Query param: Optional version of the API to use for this request. Default to
@@ -3560,15 +3509,55 @@ export namespace AgentUpdateParams {
3560
3509
  }
3561
3510
  }
3562
3511
 
3563
- export interface AgentPublishParams {
3564
- version: number;
3512
+ export interface AgentListParams {
3513
+ /**
3514
+ * Query param: Maximum number of items to return.
3515
+ */
3516
+ limit?: number;
3565
3517
 
3566
- version_description?: string;
3518
+ /**
3519
+ * Query param: Pagination key for fetching the next page.
3520
+ */
3521
+ pagination_key?: string;
3567
3522
 
3568
3523
  /**
3569
- * Optional title of the agent version. Used for your own reference.
3524
+ * Query param: Sort order for results.
3570
3525
  */
3571
- version_title?: string;
3526
+ sort_order?: 'ascending' | 'descending';
3527
+
3528
+ /**
3529
+ * Body param: Filters for listing agents. All provided filters are connected with
3530
+ * AND.
3531
+ */
3532
+ filter_criteria?: AgentListParams.FilterCriteria;
3533
+ }
3534
+
3535
+ export namespace AgentListParams {
3536
+ /**
3537
+ * Filters for listing agents. All provided filters are connected with AND.
3538
+ */
3539
+ export interface FilterCriteria {
3540
+ channel?: FilterCriteria.Channel;
3541
+
3542
+ /**
3543
+ * Case-insensitive substring search over agent name, plus substring search over
3544
+ * agent id.
3545
+ */
3546
+ query?: string;
3547
+ }
3548
+
3549
+ export namespace FilterCriteria {
3550
+ export interface Channel {
3551
+ /**
3552
+ * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
3553
+ */
3554
+ op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
3555
+
3556
+ type: 'string';
3557
+
3558
+ value: 'voice' | 'chat';
3559
+ }
3560
+ }
3572
3561
  }
3573
3562
 
3574
3563
  export interface AgentCreateVersionParams {
@@ -3585,6 +3574,17 @@ export interface AgentDeleteVersionParams {
3585
3574
  version: number;
3586
3575
  }
3587
3576
 
3577
+ export interface AgentPublishParams {
3578
+ version: number;
3579
+
3580
+ version_description?: string;
3581
+
3582
+ /**
3583
+ * Optional title of the agent version. Used for your own reference.
3584
+ */
3585
+ version_title?: string;
3586
+ }
3587
+
3588
3588
  export declare namespace Agent {
3589
3589
  export {
3590
3590
  type AgentResponse as AgentResponse,
@@ -3593,10 +3593,10 @@ export declare namespace Agent {
3593
3593
  type AgentGetVersionsResponse as AgentGetVersionsResponse,
3594
3594
  type AgentCreateParams as AgentCreateParams,
3595
3595
  type AgentRetrieveParams as AgentRetrieveParams,
3596
- type AgentListParams as AgentListParams,
3597
3596
  type AgentUpdateParams as AgentUpdateParams,
3598
- type AgentPublishParams as AgentPublishParams,
3597
+ type AgentListParams as AgentListParams,
3599
3598
  type AgentCreateVersionParams as AgentCreateVersionParams,
3600
3599
  type AgentDeleteVersionParams as AgentDeleteVersionParams,
3600
+ type AgentPublishParams as AgentPublishParams,
3601
3601
  };
3602
3602
  }