retell-sdk 5.49.1 → 5.50.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 +24 -0
- package/client.d.mts +11 -9
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -9
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +4 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/lib/webhook_auth.d.mts +18 -0
- package/lib/webhook_auth.d.mts.map +1 -0
- package/lib/webhook_auth.d.ts +18 -0
- package/lib/webhook_auth.d.ts.map +1 -0
- package/lib/webhook_auth.js +80 -0
- package/lib/webhook_auth.js.map +1 -0
- package/lib/webhook_auth.mjs +75 -0
- package/lib/webhook_auth.mjs.map +1 -0
- package/package.json +11 -1
- package/resources/agent.d.mts +69 -69
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +69 -69
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.js +30 -30
- package/resources/agent.js.map +1 -1
- package/resources/agent.mjs +30 -30
- package/resources/agent.mjs.map +1 -1
- package/resources/call.d.mts +1350 -1350
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +1350 -1350
- 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 +70 -70
- package/resources/chat-agent.d.mts.map +1 -1
- package/resources/chat-agent.d.ts +70 -70
- package/resources/chat-agent.d.ts.map +1 -1
- package/resources/chat-agent.js +31 -31
- package/resources/chat-agent.js.map +1 -1
- package/resources/chat-agent.mjs +31 -31
- package/resources/chat-agent.mjs.map +1 -1
- package/resources/chat.d.mts +97 -97
- package/resources/chat.d.mts.map +1 -1
- package/resources/chat.d.ts +97 -97
- 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 +25 -25
- package/resources/conversation-flow.d.mts.map +1 -1
- package/resources/conversation-flow.d.ts +25 -25
- 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 +130 -130
- package/resources/phone-number.d.mts.map +1 -1
- package/resources/phone-number.d.ts +130 -130
- package/resources/phone-number.d.ts.map +1 -1
- package/resources/phone-number.js +27 -27
- package/resources/phone-number.js.map +1 -1
- package/resources/phone-number.mjs +27 -27
- package/resources/phone-number.mjs.map +1 -1
- 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 +21 -18
- package/src/index.ts +1 -0
- package/src/lib/webhook_auth.ts +112 -0
- package/src/resources/agent.ts +90 -90
- package/src/resources/call.ts +1821 -1821
- package/src/resources/chat-agent.ts +95 -95
- package/src/resources/chat.ts +112 -112
- package/src/resources/conversation-flow-component.ts +34 -34
- package/src/resources/conversation-flow.ts +34 -34
- package/src/resources/index.ts +18 -18
- package/src/resources/llm.ts +30 -30
- package/src/resources/phone-number.ts +152 -152
- 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/src/resources/agent.ts
CHANGED
|
@@ -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
|
|
3564
|
-
|
|
3512
|
+
export interface AgentListParams {
|
|
3513
|
+
/**
|
|
3514
|
+
* Query param: Maximum number of items to return.
|
|
3515
|
+
*/
|
|
3516
|
+
limit?: number;
|
|
3565
3517
|
|
|
3566
|
-
|
|
3518
|
+
/**
|
|
3519
|
+
* Query param: Pagination key for fetching the next page.
|
|
3520
|
+
*/
|
|
3521
|
+
pagination_key?: string;
|
|
3567
3522
|
|
|
3568
3523
|
/**
|
|
3569
|
-
*
|
|
3524
|
+
* Query param: Sort order for results.
|
|
3570
3525
|
*/
|
|
3571
|
-
|
|
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
|
|
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
|
}
|