retell-sdk 4.25.0 → 4.27.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 +22 -0
- package/core.d.ts +1 -1
- package/core.d.ts.map +1 -1
- package/core.js +5 -5
- package/core.js.map +1 -1
- package/core.mjs +5 -5
- package/core.mjs.map +1 -1
- package/index.d.mts +4 -4
- package/index.d.ts +4 -4
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent.d.ts +142 -110
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.js +19 -7
- package/resources/agent.js.map +1 -1
- package/resources/agent.mjs +19 -7
- package/resources/agent.mjs.map +1 -1
- package/resources/call.d.ts +26 -0
- package/resources/call.d.ts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/llm.d.ts +62 -36
- package/resources/llm.d.ts.map +1 -1
- package/resources/llm.js +13 -7
- package/resources/llm.js.map +1 -1
- package/resources/llm.mjs +13 -7
- package/resources/llm.mjs.map +1 -1
- package/resources/phone-number.d.ts +41 -1
- package/resources/phone-number.d.ts.map +1 -1
- package/src/core.ts +4 -4
- package/src/index.ts +13 -1
- package/src/resources/agent.ts +173 -112
- package/src/resources/call.ts +32 -0
- package/src/resources/index.ts +3 -0
- package/src/resources/llm.ts +98 -35
- package/src/resources/phone-number.ts +49 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -48,6 +48,11 @@ export interface PhoneNumberResponse {
|
|
|
48
48
|
* inbound call.
|
|
49
49
|
*/
|
|
50
50
|
inbound_agent_id?: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* Version of the inbound agent to bind to the number. If not provided, will
|
|
53
|
+
* default to 0.
|
|
54
|
+
*/
|
|
55
|
+
inbound_agent_version?: number | null;
|
|
51
56
|
/**
|
|
52
57
|
* If set, will send a webhook for inbound calls, where you can to override agent
|
|
53
58
|
* id, set dynamic variables and other fields specific to that call.
|
|
@@ -63,6 +68,11 @@ export interface PhoneNumberResponse {
|
|
|
63
68
|
* initiate outbound call without agent id override.
|
|
64
69
|
*/
|
|
65
70
|
outbound_agent_id?: string | null;
|
|
71
|
+
/**
|
|
72
|
+
* Version of the outbound agent to bind to the number. If not provided, will
|
|
73
|
+
* default to 0.
|
|
74
|
+
*/
|
|
75
|
+
outbound_agent_version?: number | null;
|
|
66
76
|
/**
|
|
67
77
|
* Pretty printed phone number, provided for your reference.
|
|
68
78
|
*/
|
|
@@ -85,6 +95,11 @@ export interface PhoneNumberCreateParams {
|
|
|
85
95
|
* inbound call.
|
|
86
96
|
*/
|
|
87
97
|
inbound_agent_id?: string | null;
|
|
98
|
+
/**
|
|
99
|
+
* Version of the inbound agent to bind to the number. If not provided, will
|
|
100
|
+
* default to 0.
|
|
101
|
+
*/
|
|
102
|
+
inbound_agent_version?: number | null;
|
|
88
103
|
/**
|
|
89
104
|
* If set, will send a webhook for inbound calls, where you can to override agent
|
|
90
105
|
* id, set dynamic variables and other fields specific to that call.
|
|
@@ -104,6 +119,11 @@ export interface PhoneNumberCreateParams {
|
|
|
104
119
|
* initiate outbound call without agent id override.
|
|
105
120
|
*/
|
|
106
121
|
outbound_agent_id?: string | null;
|
|
122
|
+
/**
|
|
123
|
+
* Version of the outbound agent to bind to the number. If not provided, will
|
|
124
|
+
* default to 0.
|
|
125
|
+
*/
|
|
126
|
+
outbound_agent_version?: number | null;
|
|
107
127
|
}
|
|
108
128
|
export interface PhoneNumberUpdateParams {
|
|
109
129
|
/**
|
|
@@ -112,6 +132,11 @@ export interface PhoneNumberUpdateParams {
|
|
|
112
132
|
* inbound call.
|
|
113
133
|
*/
|
|
114
134
|
inbound_agent_id?: string | null;
|
|
135
|
+
/**
|
|
136
|
+
* Version of the inbound agent to bind to the number. If not provided, will
|
|
137
|
+
* default to 0.
|
|
138
|
+
*/
|
|
139
|
+
inbound_agent_version?: number | null;
|
|
115
140
|
/**
|
|
116
141
|
* If set, will send a webhook for inbound calls, where you can to override agent
|
|
117
142
|
* id, set dynamic variables and other fields specific to that call.
|
|
@@ -127,6 +152,11 @@ export interface PhoneNumberUpdateParams {
|
|
|
127
152
|
* able to initiate outbound call without agent id override.
|
|
128
153
|
*/
|
|
129
154
|
outbound_agent_id?: string | null;
|
|
155
|
+
/**
|
|
156
|
+
* Version of the outbound agent to bind to the number. If not provided, will
|
|
157
|
+
* default to 0.
|
|
158
|
+
*/
|
|
159
|
+
outbound_agent_version?: number | null;
|
|
130
160
|
}
|
|
131
161
|
export interface PhoneNumberImportParams {
|
|
132
162
|
/**
|
|
@@ -147,6 +177,11 @@ export interface PhoneNumberImportParams {
|
|
|
147
177
|
* inbound call.
|
|
148
178
|
*/
|
|
149
179
|
inbound_agent_id?: string | null;
|
|
180
|
+
/**
|
|
181
|
+
* Version of the inbound agent to bind to the number. If not provided, will
|
|
182
|
+
* default to 0.
|
|
183
|
+
*/
|
|
184
|
+
inbound_agent_version?: number | null;
|
|
150
185
|
/**
|
|
151
186
|
* If set, will send a webhook for inbound calls, where you can to override agent
|
|
152
187
|
* id, set dynamic variables and other fields specific to that call.
|
|
@@ -161,7 +196,12 @@ export interface PhoneNumberImportParams {
|
|
|
161
196
|
* agent when conducting outbound calls. If null, this number would not be able to
|
|
162
197
|
* initiate outbound call without agent id override.
|
|
163
198
|
*/
|
|
164
|
-
outbound_agent_id?: string
|
|
199
|
+
outbound_agent_id?: string;
|
|
200
|
+
/**
|
|
201
|
+
* Version of the outbound agent to bind to the number. If not provided, will
|
|
202
|
+
* default to 0.
|
|
203
|
+
*/
|
|
204
|
+
outbound_agent_version?: number | null;
|
|
165
205
|
/**
|
|
166
206
|
* The password used for authentication for the SIP trunk.
|
|
167
207
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3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AG,IAAI,CAAC;IAEjC;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvC;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
package/src/core.ts
CHANGED
|
@@ -296,10 +296,10 @@ export abstract class APIClient {
|
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
buildRequest<Req>(
|
|
299
|
-
|
|
299
|
+
inputOptions: FinalRequestOptions<Req>,
|
|
300
300
|
{ retryCount = 0 }: { retryCount?: number } = {},
|
|
301
301
|
): { req: RequestInit; url: string; timeout: number } {
|
|
302
|
-
options = { ...
|
|
302
|
+
const options = { ...inputOptions };
|
|
303
303
|
const { method, path, query, headers: headers = {} } = options;
|
|
304
304
|
|
|
305
305
|
const body =
|
|
@@ -327,8 +327,8 @@ export abstract class APIClient {
|
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
if (this.idempotencyHeader && method !== 'GET') {
|
|
330
|
-
if (!
|
|
331
|
-
headers[this.idempotencyHeader] =
|
|
330
|
+
if (!inputOptions.idempotencyKey) inputOptions.idempotencyKey = this.defaultIdempotencyKey();
|
|
331
|
+
headers[this.idempotencyHeader] = inputOptions.idempotencyKey;
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
const reqHeaders = this.buildHeaders({ options, headers, contentLength, retryCount });
|
package/src/index.ts
CHANGED
|
@@ -8,8 +8,10 @@ import * as API from './resources/index';
|
|
|
8
8
|
import {
|
|
9
9
|
Agent as AgentAPIAgent,
|
|
10
10
|
AgentCreateParams,
|
|
11
|
+
AgentGetVersionsResponse,
|
|
11
12
|
AgentListResponse,
|
|
12
13
|
AgentResponse,
|
|
14
|
+
AgentRetrieveParams,
|
|
13
15
|
AgentUpdateParams,
|
|
14
16
|
} from './resources/agent';
|
|
15
17
|
import { BatchCall, BatchCallCreateBatchCallParams, BatchCallResponse } from './resources/batch-call';
|
|
@@ -33,7 +35,14 @@ import {
|
|
|
33
35
|
KnowledgeBaseListResponse,
|
|
34
36
|
KnowledgeBaseResponse,
|
|
35
37
|
} from './resources/knowledge-base';
|
|
36
|
-
import {
|
|
38
|
+
import {
|
|
39
|
+
Llm,
|
|
40
|
+
LlmCreateParams,
|
|
41
|
+
LlmListResponse,
|
|
42
|
+
LlmResponse,
|
|
43
|
+
LlmRetrieveParams,
|
|
44
|
+
LlmUpdateParams,
|
|
45
|
+
} from './resources/llm';
|
|
37
46
|
import {
|
|
38
47
|
PhoneNumber,
|
|
39
48
|
PhoneNumberCreateParams,
|
|
@@ -236,7 +245,9 @@ export declare namespace Retell {
|
|
|
236
245
|
AgentAPIAgent as Agent,
|
|
237
246
|
type AgentResponse as AgentResponse,
|
|
238
247
|
type AgentListResponse as AgentListResponse,
|
|
248
|
+
type AgentGetVersionsResponse as AgentGetVersionsResponse,
|
|
239
249
|
type AgentCreateParams as AgentCreateParams,
|
|
250
|
+
type AgentRetrieveParams as AgentRetrieveParams,
|
|
240
251
|
type AgentUpdateParams as AgentUpdateParams,
|
|
241
252
|
};
|
|
242
253
|
|
|
@@ -245,6 +256,7 @@ export declare namespace Retell {
|
|
|
245
256
|
type LlmResponse as LlmResponse,
|
|
246
257
|
type LlmListResponse as LlmListResponse,
|
|
247
258
|
type LlmCreateParams as LlmCreateParams,
|
|
259
|
+
type LlmRetrieveParams as LlmRetrieveParams,
|
|
248
260
|
type LlmUpdateParams as LlmUpdateParams,
|
|
249
261
|
};
|
|
250
262
|
|