retell-sdk 5.31.1 → 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.
- package/CHANGELOG.md +13 -0
- package/client.d.mts +9 -11
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -11
- package/client.d.ts.map +1 -1
- package/client.js +0 -3
- package/client.js.map +1 -1
- package/client.mjs +0 -3
- package/client.mjs.map +1 -1
- package/index.d.mts +0 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +0 -1
- package/index.d.ts.map +1 -1
- package/index.js +1 -4
- package/index.js.map +1 -1
- package/index.mjs +0 -1
- package/index.mjs.map +1 -1
- package/internal/uploads.js +2 -12
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +2 -12
- package/internal/uploads.mjs.map +1 -1
- package/package.json +1 -11
- package/resources/agent.d.mts +44 -44
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +44 -44
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.js +25 -25
- package/resources/agent.js.map +1 -1
- package/resources/agent.mjs +25 -25
- package/resources/agent.mjs.map +1 -1
- package/resources/call.d.mts +1367 -1367
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +1367 -1367
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +60 -60
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +60 -60
- package/resources/call.mjs.map +1 -1
- package/resources/chat-agent.d.mts +46 -46
- package/resources/chat-agent.d.mts.map +1 -1
- package/resources/chat-agent.d.ts +46 -46
- package/resources/chat-agent.d.ts.map +1 -1
- package/resources/chat-agent.js +27 -27
- package/resources/chat-agent.js.map +1 -1
- package/resources/chat-agent.mjs +27 -27
- package/resources/chat-agent.mjs.map +1 -1
- package/resources/chat.d.mts +92 -92
- package/resources/chat.d.mts.map +1 -1
- package/resources/chat.d.ts +92 -92
- package/resources/chat.d.ts.map +1 -1
- package/resources/chat.js +55 -55
- package/resources/chat.js.map +1 -1
- package/resources/chat.mjs +55 -55
- package/resources/chat.mjs.map +1 -1
- package/resources/conversation-flow-component.d.mts +25 -25
- package/resources/conversation-flow-component.d.mts.map +1 -1
- package/resources/conversation-flow-component.d.ts +25 -25
- package/resources/conversation-flow-component.d.ts.map +1 -1
- package/resources/conversation-flow-component.js +12 -12
- package/resources/conversation-flow-component.js.map +1 -1
- package/resources/conversation-flow-component.mjs +12 -12
- package/resources/conversation-flow-component.mjs.map +1 -1
- package/resources/conversation-flow.d.mts +26 -26
- package/resources/conversation-flow.d.mts.map +1 -1
- package/resources/conversation-flow.d.ts +26 -26
- package/resources/conversation-flow.d.ts.map +1 -1
- package/resources/conversation-flow.js +12 -12
- package/resources/conversation-flow.js.map +1 -1
- package/resources/conversation-flow.mjs +12 -12
- package/resources/conversation-flow.mjs.map +1 -1
- package/resources/index.d.mts +9 -9
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +9 -9
- package/resources/index.d.ts.map +1 -1
- package/resources/llm.d.mts +24 -24
- package/resources/llm.d.mts.map +1 -1
- package/resources/llm.d.ts +24 -24
- package/resources/llm.d.ts.map +1 -1
- package/resources/llm.js +11 -11
- package/resources/llm.js.map +1 -1
- package/resources/llm.mjs +11 -11
- package/resources/llm.mjs.map +1 -1
- package/resources/phone-number.d.mts +8 -8
- package/resources/phone-number.d.ts +8 -8
- package/resources/tests.d.mts +95 -95
- package/resources/tests.d.mts.map +1 -1
- package/resources/tests.d.ts +95 -95
- package/resources/tests.d.ts.map +1 -1
- package/resources/tests.js +27 -27
- package/resources/tests.js.map +1 -1
- package/resources/tests.mjs +27 -27
- package/resources/tests.mjs.map +1 -1
- package/resources/voice.d.mts +8 -8
- package/resources/voice.d.mts.map +1 -1
- package/resources/voice.d.ts +8 -8
- package/resources/voice.d.ts.map +1 -1
- package/resources/voice.js +12 -12
- package/resources/voice.js.map +1 -1
- package/resources/voice.mjs +12 -12
- package/resources/voice.mjs.map +1 -1
- package/src/client.ts +18 -22
- package/src/index.ts +0 -1
- package/src/internal/uploads.ts +4 -12
- package/src/resources/agent.ts +61 -61
- package/src/resources/call.ts +2364 -2364
- package/src/resources/chat-agent.ts +63 -63
- package/src/resources/chat.ts +107 -107
- package/src/resources/conversation-flow-component.ts +34 -34
- package/src/resources/conversation-flow.ts +35 -35
- package/src/resources/index.ts +18 -18
- package/src/resources/llm.ts +30 -30
- package/src/resources/phone-number.ts +8 -8
- package/src/resources/tests.ts +136 -136
- package/src/resources/voice.ts +12 -12
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/lib/webhook_auth.d.mts +0 -11
- package/lib/webhook_auth.d.mts.map +0 -1
- package/lib/webhook_auth.d.ts +0 -11
- package/lib/webhook_auth.d.ts.map +0 -1
- package/lib/webhook_auth.js +0 -48
- package/lib/webhook_auth.js.map +0 -1
- package/lib/webhook_auth.mjs +0 -43
- package/lib/webhook_auth.mjs.map +0 -1
- package/src/lib/webhook_auth.ts +0 -76
package/src/resources/agent.ts
CHANGED
|
@@ -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
|
-
*
|
|
79
|
+
* Delete an existing agent
|
|
65
80
|
*
|
|
66
81
|
* @example
|
|
67
82
|
* ```ts
|
|
68
|
-
*
|
|
83
|
+
* await client.agent.delete(
|
|
84
|
+
* 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
|
|
85
|
+
* );
|
|
69
86
|
* ```
|
|
70
87
|
*/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
-
*
|
|
96
|
+
* Publish an existing draft version in place.
|
|
80
97
|
*
|
|
81
98
|
* @example
|
|
82
99
|
* ```ts
|
|
83
|
-
* await client.agent.
|
|
84
|
-
* 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
|
|
85
|
-
* );
|
|
100
|
+
* await client.agent.publish('agent_xxx', { version: 15 });
|
|
86
101
|
* ```
|
|
87
102
|
*/
|
|
88
|
-
|
|
89
|
-
return this._client.
|
|
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
|
|
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
|
}
|