retell-sdk 4.24.0 → 4.26.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 +28 -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 +68 -72
- 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 +39 -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 +137 -98
- package/src/resources/phone-number.ts +47 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/llm.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Llm = void 0;
|
|
5
5
|
const resource_1 = require("../resource.js");
|
|
6
|
+
const core_1 = require("../core.js");
|
|
6
7
|
class Llm extends resource_1.APIResource {
|
|
7
8
|
/**
|
|
8
9
|
* Create a new Retell LLM Response Engine that can be attached to an agent. This
|
|
@@ -11,17 +12,22 @@ class Llm extends resource_1.APIResource {
|
|
|
11
12
|
create(body, options) {
|
|
12
13
|
return this._client.post('/create-retell-llm', { body, ...options });
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return this._client.get(`/get-retell-llm/${llmId}`, options);
|
|
15
|
+
retrieve(llmId, query = {}, options) {
|
|
16
|
+
if ((0, core_1.isRequestOptions)(query)) {
|
|
17
|
+
return this.retrieve(llmId, {}, query);
|
|
18
|
+
}
|
|
19
|
+
return this._client.get(`/get-retell-llm/${llmId}`, { query, ...options });
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
* Update an existing Retell LLM Response Engine
|
|
22
23
|
*/
|
|
23
|
-
update(llmId,
|
|
24
|
-
|
|
24
|
+
update(llmId, params, options) {
|
|
25
|
+
const { query_version, ...body } = params;
|
|
26
|
+
return this._client.patch(`/update-retell-llm/${llmId}`, {
|
|
27
|
+
query: { version: query_version },
|
|
28
|
+
body,
|
|
29
|
+
...options,
|
|
30
|
+
});
|
|
25
31
|
}
|
|
26
32
|
/**
|
|
27
33
|
* List all Retell LLM Response Engines that can be attached to an agent.
|
package/resources/llm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm.js","sourceRoot":"","sources":["../src/resources/llm.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;
|
|
1
|
+
{"version":3,"file":"llm.js","sourceRoot":"","sources":["../src/resources/llm.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAC1C,qCAA2C;AAG3C,MAAa,GAAI,SAAQ,sBAAW;IAClC;;;OAGG;IACH,MAAM,CAAC,IAAqB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAWD,QAAQ,CACN,KAAa,EACb,QAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACxC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,KAAa,EACb,MAAuB,EACvB,OAA6B;QAE7B,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,sBAAsB,KAAK,EAAE,EAAE;YACvD,KAAK,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;YACjC,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,OAA6B;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAa,EAAE,OAA6B;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,sBAAsB,KAAK,EAAE,EAAE;YACxD,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;CACF;AA7DD,kBA6DC"}
|
package/resources/llm.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../resource.mjs";
|
|
3
|
+
import { isRequestOptions } from "../core.mjs";
|
|
3
4
|
export class Llm extends APIResource {
|
|
4
5
|
/**
|
|
5
6
|
* Create a new Retell LLM Response Engine that can be attached to an agent. This
|
|
@@ -8,17 +9,22 @@ export class Llm extends APIResource {
|
|
|
8
9
|
create(body, options) {
|
|
9
10
|
return this._client.post('/create-retell-llm', { body, ...options });
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return this._client.get(`/get-retell-llm/${llmId}`, options);
|
|
12
|
+
retrieve(llmId, query = {}, options) {
|
|
13
|
+
if (isRequestOptions(query)) {
|
|
14
|
+
return this.retrieve(llmId, {}, query);
|
|
15
|
+
}
|
|
16
|
+
return this._client.get(`/get-retell-llm/${llmId}`, { query, ...options });
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
19
|
* Update an existing Retell LLM Response Engine
|
|
19
20
|
*/
|
|
20
|
-
update(llmId,
|
|
21
|
-
|
|
21
|
+
update(llmId, params, options) {
|
|
22
|
+
const { query_version, ...body } = params;
|
|
23
|
+
return this._client.patch(`/update-retell-llm/${llmId}`, {
|
|
24
|
+
query: { version: query_version },
|
|
25
|
+
body,
|
|
26
|
+
...options,
|
|
27
|
+
});
|
|
22
28
|
}
|
|
23
29
|
/**
|
|
24
30
|
* List all Retell LLM Response Engines that can be attached to an agent.
|
package/resources/llm.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm.mjs","sourceRoot":"","sources":["../src/resources/llm.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"llm.mjs","sourceRoot":"","sources":["../src/resources/llm.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAG3B,MAAM,OAAO,GAAI,SAAQ,WAAW;IAClC;;;OAGG;IACH,MAAM,CAAC,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|
*/
|
|
50
50
|
inbound_agent_id?: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* The version of the inbound agent.
|
|
53
|
+
*/
|
|
54
|
+
inbound_agent_version?: number | null;
|
|
51
55
|
/**
|
|
52
56
|
* If set, will send a webhook for inbound calls, where you can to override agent
|
|
53
57
|
* id, set dynamic variables and other fields specific to that call.
|
|
@@ -63,6 +67,10 @@ export interface PhoneNumberResponse {
|
|
|
63
67
|
* initiate outbound call without agent id override.
|
|
64
68
|
*/
|
|
65
69
|
outbound_agent_id?: string | null;
|
|
70
|
+
/**
|
|
71
|
+
* The version of the outbound agent.
|
|
72
|
+
*/
|
|
73
|
+
outbound_agent_version?: number | null;
|
|
66
74
|
/**
|
|
67
75
|
* Pretty printed phone number, provided for your reference.
|
|
68
76
|
*/
|
|
@@ -85,6 +93,11 @@ export interface PhoneNumberCreateParams {
|
|
|
85
93
|
* inbound call.
|
|
86
94
|
*/
|
|
87
95
|
inbound_agent_id?: string | null;
|
|
96
|
+
/**
|
|
97
|
+
* Version of the inbound agent to bind to the number. If not provided, will
|
|
98
|
+
* default to 0.
|
|
99
|
+
*/
|
|
100
|
+
inbound_agent_version?: number | null;
|
|
88
101
|
/**
|
|
89
102
|
* If set, will send a webhook for inbound calls, where you can to override agent
|
|
90
103
|
* id, set dynamic variables and other fields specific to that call.
|
|
@@ -104,6 +117,11 @@ export interface PhoneNumberCreateParams {
|
|
|
104
117
|
* initiate outbound call without agent id override.
|
|
105
118
|
*/
|
|
106
119
|
outbound_agent_id?: string | null;
|
|
120
|
+
/**
|
|
121
|
+
* Version of the outbound agent to bind to the number. If not provided, will
|
|
122
|
+
* default to 0.
|
|
123
|
+
*/
|
|
124
|
+
outbound_agent_version?: number | null;
|
|
107
125
|
}
|
|
108
126
|
export interface PhoneNumberUpdateParams {
|
|
109
127
|
/**
|
|
@@ -112,6 +130,11 @@ export interface PhoneNumberUpdateParams {
|
|
|
112
130
|
* inbound call.
|
|
113
131
|
*/
|
|
114
132
|
inbound_agent_id?: string | null;
|
|
133
|
+
/**
|
|
134
|
+
* Version of the inbound agent to bind to the number. If not provided, will
|
|
135
|
+
* default to 0.
|
|
136
|
+
*/
|
|
137
|
+
inbound_agent_version?: number | null;
|
|
115
138
|
/**
|
|
116
139
|
* If set, will send a webhook for inbound calls, where you can to override agent
|
|
117
140
|
* id, set dynamic variables and other fields specific to that call.
|
|
@@ -127,6 +150,11 @@ export interface PhoneNumberUpdateParams {
|
|
|
127
150
|
* able to initiate outbound call without agent id override.
|
|
128
151
|
*/
|
|
129
152
|
outbound_agent_id?: string | null;
|
|
153
|
+
/**
|
|
154
|
+
* Version of the outbound agent to bind to the number. If not provided, will
|
|
155
|
+
* default to 0.
|
|
156
|
+
*/
|
|
157
|
+
outbound_agent_version?: number | null;
|
|
130
158
|
}
|
|
131
159
|
export interface PhoneNumberImportParams {
|
|
132
160
|
/**
|
|
@@ -147,6 +175,11 @@ export interface PhoneNumberImportParams {
|
|
|
147
175
|
* inbound call.
|
|
148
176
|
*/
|
|
149
177
|
inbound_agent_id?: string | null;
|
|
178
|
+
/**
|
|
179
|
+
* Version of the inbound agent to bind to the number. If not provided, will
|
|
180
|
+
* default to 0.
|
|
181
|
+
*/
|
|
182
|
+
inbound_agent_version?: number | null;
|
|
150
183
|
/**
|
|
151
184
|
* If set, will send a webhook for inbound calls, where you can to override agent
|
|
152
185
|
* id, set dynamic variables and other fields specific to that call.
|
|
@@ -161,7 +194,12 @@ export interface PhoneNumberImportParams {
|
|
|
161
194
|
* agent when conducting outbound calls. If null, this number would not be able to
|
|
162
195
|
* initiate outbound call without agent id override.
|
|
163
196
|
*/
|
|
164
|
-
outbound_agent_id?: string
|
|
197
|
+
outbound_agent_id?: string;
|
|
198
|
+
/**
|
|
199
|
+
* Version of the outbound agent to bind to the number. If not provided, will
|
|
200
|
+
* default to 0.
|
|
201
|
+
*/
|
|
202
|
+
outbound_agent_version?: number | null;
|
|
165
203
|
/**
|
|
166
204
|
* The password used for authentication for the SIP trunk.
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AC;IAExB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,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
|
|