retell-sdk 5.31.0 → 5.32.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 (128) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/client.d.mts +9 -11
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +9 -11
  5. package/client.d.ts.map +1 -1
  6. package/client.js +0 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +0 -3
  9. package/client.mjs.map +1 -1
  10. package/index.d.mts +0 -1
  11. package/index.d.mts.map +1 -1
  12. package/index.d.ts +0 -1
  13. package/index.d.ts.map +1 -1
  14. package/index.js +1 -4
  15. package/index.js.map +1 -1
  16. package/index.mjs +0 -1
  17. package/index.mjs.map +1 -1
  18. package/internal/uploads.js +2 -12
  19. package/internal/uploads.js.map +1 -1
  20. package/internal/uploads.mjs +2 -12
  21. package/internal/uploads.mjs.map +1 -1
  22. package/package.json +1 -11
  23. package/resources/agent.d.mts +44 -44
  24. package/resources/agent.d.mts.map +1 -1
  25. package/resources/agent.d.ts +44 -44
  26. package/resources/agent.d.ts.map +1 -1
  27. package/resources/agent.js +25 -25
  28. package/resources/agent.js.map +1 -1
  29. package/resources/agent.mjs +25 -25
  30. package/resources/agent.mjs.map +1 -1
  31. package/resources/call.d.mts +1367 -1367
  32. package/resources/call.d.mts.map +1 -1
  33. package/resources/call.d.ts +1367 -1367
  34. package/resources/call.d.ts.map +1 -1
  35. package/resources/call.js +60 -60
  36. package/resources/call.js.map +1 -1
  37. package/resources/call.mjs +60 -60
  38. package/resources/call.mjs.map +1 -1
  39. package/resources/chat-agent.d.mts +46 -46
  40. package/resources/chat-agent.d.mts.map +1 -1
  41. package/resources/chat-agent.d.ts +46 -46
  42. package/resources/chat-agent.d.ts.map +1 -1
  43. package/resources/chat-agent.js +27 -27
  44. package/resources/chat-agent.js.map +1 -1
  45. package/resources/chat-agent.mjs +27 -27
  46. package/resources/chat-agent.mjs.map +1 -1
  47. package/resources/chat.d.mts +92 -92
  48. package/resources/chat.d.mts.map +1 -1
  49. package/resources/chat.d.ts +92 -92
  50. package/resources/chat.d.ts.map +1 -1
  51. package/resources/chat.js +55 -55
  52. package/resources/chat.js.map +1 -1
  53. package/resources/chat.mjs +55 -55
  54. package/resources/chat.mjs.map +1 -1
  55. package/resources/conversation-flow-component.d.mts +25 -25
  56. package/resources/conversation-flow-component.d.mts.map +1 -1
  57. package/resources/conversation-flow-component.d.ts +25 -25
  58. package/resources/conversation-flow-component.d.ts.map +1 -1
  59. package/resources/conversation-flow-component.js +12 -12
  60. package/resources/conversation-flow-component.js.map +1 -1
  61. package/resources/conversation-flow-component.mjs +12 -12
  62. package/resources/conversation-flow-component.mjs.map +1 -1
  63. package/resources/conversation-flow.d.mts +26 -26
  64. package/resources/conversation-flow.d.mts.map +1 -1
  65. package/resources/conversation-flow.d.ts +26 -26
  66. package/resources/conversation-flow.d.ts.map +1 -1
  67. package/resources/conversation-flow.js +12 -12
  68. package/resources/conversation-flow.js.map +1 -1
  69. package/resources/conversation-flow.mjs +12 -12
  70. package/resources/conversation-flow.mjs.map +1 -1
  71. package/resources/index.d.mts +9 -9
  72. package/resources/index.d.mts.map +1 -1
  73. package/resources/index.d.ts +9 -9
  74. package/resources/index.d.ts.map +1 -1
  75. package/resources/llm.d.mts +24 -24
  76. package/resources/llm.d.mts.map +1 -1
  77. package/resources/llm.d.ts +24 -24
  78. package/resources/llm.d.ts.map +1 -1
  79. package/resources/llm.js +11 -11
  80. package/resources/llm.js.map +1 -1
  81. package/resources/llm.mjs +11 -11
  82. package/resources/llm.mjs.map +1 -1
  83. package/resources/phone-number.d.mts +8 -8
  84. package/resources/phone-number.d.ts +8 -8
  85. package/resources/tests.d.mts +95 -95
  86. package/resources/tests.d.mts.map +1 -1
  87. package/resources/tests.d.ts +95 -95
  88. package/resources/tests.d.ts.map +1 -1
  89. package/resources/tests.js +27 -27
  90. package/resources/tests.js.map +1 -1
  91. package/resources/tests.mjs +27 -27
  92. package/resources/tests.mjs.map +1 -1
  93. package/resources/voice.d.mts +8 -8
  94. package/resources/voice.d.mts.map +1 -1
  95. package/resources/voice.d.ts +8 -8
  96. package/resources/voice.d.ts.map +1 -1
  97. package/resources/voice.js +12 -12
  98. package/resources/voice.js.map +1 -1
  99. package/resources/voice.mjs +12 -12
  100. package/resources/voice.mjs.map +1 -1
  101. package/src/client.ts +18 -22
  102. package/src/index.ts +0 -1
  103. package/src/internal/uploads.ts +4 -12
  104. package/src/resources/agent.ts +61 -61
  105. package/src/resources/call.ts +2364 -2364
  106. package/src/resources/chat-agent.ts +63 -63
  107. package/src/resources/chat.ts +107 -107
  108. package/src/resources/conversation-flow-component.ts +34 -34
  109. package/src/resources/conversation-flow.ts +35 -35
  110. package/src/resources/index.ts +18 -18
  111. package/src/resources/llm.ts +30 -30
  112. package/src/resources/phone-number.ts +8 -8
  113. package/src/resources/tests.ts +136 -136
  114. package/src/resources/voice.ts +12 -12
  115. package/src/version.ts +1 -1
  116. package/version.d.mts +1 -1
  117. package/version.d.ts +1 -1
  118. package/version.js +1 -1
  119. package/version.mjs +1 -1
  120. package/lib/webhook_auth.d.mts +0 -11
  121. package/lib/webhook_auth.d.mts.map +0 -1
  122. package/lib/webhook_auth.d.ts +0 -11
  123. package/lib/webhook_auth.d.ts.map +0 -1
  124. package/lib/webhook_auth.js +0 -48
  125. package/lib/webhook_auth.js.map +0 -1
  126. package/lib/webhook_auth.mjs +0 -43
  127. package/lib/webhook_auth.mjs.map +0 -1
  128. package/src/lib/webhook_auth.ts +0 -76
@@ -44,6 +44,21 @@ export class Agent extends APIResource {
44
44
  return this._client.get(path`/get-agent/${agentID}`, { query, ...options });
45
45
  }
46
46
 
47
+ /**
48
+ * List all agents
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const agentResponses = await client.agent.list();
53
+ * ```
54
+ */
55
+ list(
56
+ query: AgentListParams | null | undefined = {},
57
+ options?: RequestOptions,
58
+ ): APIPromise<AgentListResponse> {
59
+ return this._client.get('/list-agents', { query, ...options });
60
+ }
61
+
47
62
  /**
48
63
  * Update an existing agent's latest draft version
49
64
  *
@@ -61,32 +76,33 @@ export class Agent extends APIResource {
61
76
  }
62
77
 
63
78
  /**
64
- * List all agents
79
+ * Delete an existing agent
65
80
  *
66
81
  * @example
67
82
  * ```ts
68
- * const agentResponses = await client.agent.list();
83
+ * await client.agent.delete(
84
+ * 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
85
+ * );
69
86
  * ```
70
87
  */
71
- list(
72
- query: AgentListParams | null | undefined = {},
73
- options?: RequestOptions,
74
- ): APIPromise<AgentListResponse> {
75
- return this._client.get('/list-agents', { query, ...options });
88
+ delete(agentID: string, options?: RequestOptions): APIPromise<void> {
89
+ return this._client.delete(path`/delete-agent/${agentID}`, {
90
+ ...options,
91
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
92
+ });
76
93
  }
77
94
 
78
95
  /**
79
- * Delete an existing agent
96
+ * Publish an existing draft version in place.
80
97
  *
81
98
  * @example
82
99
  * ```ts
83
- * await client.agent.delete(
84
- * 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
85
- * );
100
+ * await client.agent.publish('agent_xxx', { version: 15 });
86
101
  * ```
87
102
  */
88
- delete(agentID: string, options?: RequestOptions): APIPromise<void> {
89
- return this._client.delete(path`/delete-agent/${agentID}`, {
103
+ publish(agentID: string, body: AgentPublishParams, options?: RequestOptions): APIPromise<void> {
104
+ return this._client.post(path`/publish-agent-version/${agentID}`, {
105
+ body,
90
106
  ...options,
91
107
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
92
108
  });
@@ -147,22 +163,6 @@ export class Agent extends APIResource {
147
163
  getVersions(agentID: string, options?: RequestOptions): APIPromise<AgentGetVersionsResponse> {
148
164
  return this._client.get(path`/get-agent-versions/${agentID}`, options);
149
165
  }
150
-
151
- /**
152
- * Publish an existing draft version in place.
153
- *
154
- * @example
155
- * ```ts
156
- * await client.agent.publish('agent_xxx', { version: 15 });
157
- * ```
158
- */
159
- publish(agentID: string, body: AgentPublishParams, options?: RequestOptions): APIPromise<void> {
160
- return this._client.post(path`/publish-agent-version/${agentID}`, {
161
- body,
162
- ...options,
163
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
164
- });
165
- }
166
166
  }
167
167
 
168
168
  export interface AgentResponse {
@@ -2336,6 +2336,33 @@ export interface AgentRetrieveParams {
2336
2336
  version?: number | string;
2337
2337
  }
2338
2338
 
2339
+ export interface AgentListParams {
2340
+ /**
2341
+ * If true, only return the latest version of each agent.
2342
+ */
2343
+ is_latest?: boolean;
2344
+
2345
+ /**
2346
+ * A limit on the number of objects to be returned. Limit can range between 1 and
2347
+ * 1000, and the default is 1000.
2348
+ */
2349
+ limit?: number;
2350
+
2351
+ /**
2352
+ * The pagination key to continue fetching the next page of agents. Pagination key
2353
+ * is represented by a agent id, pagination key and version pair is exclusive (not
2354
+ * included in the fetched page). If not set, will start from the beginning.
2355
+ */
2356
+ pagination_key?: string;
2357
+
2358
+ /**
2359
+ * Specifies the version of the agent associated with the pagination_key. When
2360
+ * paginating, both the pagination_key and its version must be provided to ensure
2361
+ * consistent ordering and to fetch the next page correctly.
2362
+ */
2363
+ pagination_key_version?: number;
2364
+ }
2365
+
2339
2366
  export interface AgentUpdateParams {
2340
2367
  /**
2341
2368
  * Query param: Optional version of the API to use for this request. Default to
@@ -3416,31 +3443,10 @@ export namespace AgentUpdateParams {
3416
3443
  }
3417
3444
  }
3418
3445
 
3419
- export interface AgentListParams {
3420
- /**
3421
- * If true, only return the latest version of each agent.
3422
- */
3423
- is_latest?: boolean;
3424
-
3425
- /**
3426
- * A limit on the number of objects to be returned. Limit can range between 1 and
3427
- * 1000, and the default is 1000.
3428
- */
3429
- limit?: number;
3430
-
3431
- /**
3432
- * The pagination key to continue fetching the next page of agents. Pagination key
3433
- * is represented by a agent id, pagination key and version pair is exclusive (not
3434
- * included in the fetched page). If not set, will start from the beginning.
3435
- */
3436
- pagination_key?: string;
3446
+ export interface AgentPublishParams {
3447
+ version: number;
3437
3448
 
3438
- /**
3439
- * Specifies the version of the agent associated with the pagination_key. When
3440
- * paginating, both the pagination_key and its version must be provided to ensure
3441
- * consistent ordering and to fetch the next page correctly.
3442
- */
3443
- pagination_key_version?: number;
3449
+ version_description?: string;
3444
3450
  }
3445
3451
 
3446
3452
  export interface AgentCreateVersionParams {
@@ -3457,12 +3463,6 @@ export interface AgentDeleteVersionParams {
3457
3463
  version: number;
3458
3464
  }
3459
3465
 
3460
- export interface AgentPublishParams {
3461
- version: number;
3462
-
3463
- version_description?: string;
3464
- }
3465
-
3466
3466
  export declare namespace Agent {
3467
3467
  export {
3468
3468
  type AgentResponse as AgentResponse,
@@ -3471,10 +3471,10 @@ export declare namespace Agent {
3471
3471
  type AgentGetVersionsResponse as AgentGetVersionsResponse,
3472
3472
  type AgentCreateParams as AgentCreateParams,
3473
3473
  type AgentRetrieveParams as AgentRetrieveParams,
3474
- type AgentUpdateParams as AgentUpdateParams,
3475
3474
  type AgentListParams as AgentListParams,
3475
+ type AgentUpdateParams as AgentUpdateParams,
3476
+ type AgentPublishParams as AgentPublishParams,
3476
3477
  type AgentCreateVersionParams as AgentCreateVersionParams,
3477
3478
  type AgentDeleteVersionParams as AgentDeleteVersionParams,
3478
- type AgentPublishParams as AgentPublishParams,
3479
3479
  };
3480
3480
  }