agentphone 1.0.4 → 1.0.5
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/README.md +10 -10
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +4 -1
- package/dist/cjs/Client.js +24 -19
- package/dist/cjs/api/resources/agentSignup/client/Client.d.ts +50 -0
- package/dist/cjs/api/resources/agentSignup/client/Client.js +170 -0
- package/dist/cjs/api/resources/agentSignup/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/agentSignup/client/index.js +17 -0
- package/dist/cjs/api/resources/agentSignup/client/requests/AgentSignUpRequest.d.ts +10 -0
- package/dist/cjs/api/resources/agentSignup/client/requests/AgentSignUpRequest.js +3 -0
- package/dist/cjs/api/resources/agentSignup/client/requests/AgentVerifyRequest.d.ts +11 -0
- package/dist/cjs/api/resources/agentSignup/client/requests/AgentVerifyRequest.js +3 -0
- package/dist/cjs/api/resources/agentSignup/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/agentSignup/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/agentSignup/index.d.ts +1 -0
- package/dist/cjs/api/resources/agentSignup/index.js +17 -0
- package/dist/cjs/api/resources/agentWebhooks/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/agentWebhooks/client/Client.js +6 -6
- package/dist/cjs/api/resources/agents/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/agents/client/Client.js +11 -11
- package/dist/cjs/api/resources/agents/client/requests/CreateAgentRequest.d.ts +23 -2
- package/dist/cjs/api/resources/agents/client/requests/CreateAgentRequest.js +18 -0
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +23 -2
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.js +18 -0
- package/dist/cjs/api/resources/agents/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/agents/client/requests/index.js +5 -0
- package/dist/cjs/api/resources/calls/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/calls/client/Client.js +8 -8
- package/dist/cjs/api/resources/contacts/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/contacts/client/Client.js +6 -6
- package/dist/cjs/api/resources/conversations/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/conversations/client/Client.js +5 -5
- package/dist/cjs/api/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.js +3 -1
- package/dist/cjs/api/resources/messages/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/messages/client/Client.js +3 -3
- package/dist/cjs/api/resources/numbers/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/numbers/client/Client.js +5 -5
- package/dist/cjs/api/resources/usage/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/usage/client/Client.js +4 -4
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +8 -8
- package/dist/cjs/api/types/AgentResponse.d.ts +23 -2
- package/dist/cjs/api/types/AgentResponse.js +18 -0
- package/dist/cjs/api/types/MessageInConversation.d.ts +2 -0
- package/dist/cjs/api/types/ReactionInConversation.d.ts +7 -0
- package/dist/cjs/api/types/ReactionInConversation.js +3 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/auth/BearerAuthProvider.d.ts +1 -1
- package/dist/cjs/environments.d.ts +2 -2
- package/dist/cjs/environments.js +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +4 -1
- package/dist/esm/Client.mjs +6 -1
- package/dist/esm/api/resources/agentSignup/client/Client.d.mts +50 -0
- package/dist/esm/api/resources/agentSignup/client/Client.mjs +133 -0
- package/dist/esm/api/resources/agentSignup/client/index.d.mts +1 -0
- package/dist/esm/api/resources/agentSignup/client/index.mjs +1 -0
- package/dist/esm/api/resources/agentSignup/client/requests/AgentSignUpRequest.d.mts +10 -0
- package/dist/esm/api/resources/agentSignup/client/requests/AgentSignUpRequest.mjs +2 -0
- package/dist/esm/api/resources/agentSignup/client/requests/AgentVerifyRequest.d.mts +11 -0
- package/dist/esm/api/resources/agentSignup/client/requests/AgentVerifyRequest.mjs +2 -0
- package/dist/esm/api/resources/agentSignup/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/agentSignup/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/agentSignup/index.d.mts +1 -0
- package/dist/esm/api/resources/agentSignup/index.mjs +1 -0
- package/dist/esm/api/resources/agentWebhooks/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/agentWebhooks/client/Client.mjs +6 -6
- package/dist/esm/api/resources/agents/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/agents/client/Client.mjs +11 -11
- package/dist/esm/api/resources/agents/client/requests/CreateAgentRequest.d.mts +23 -2
- package/dist/esm/api/resources/agents/client/requests/CreateAgentRequest.mjs +17 -1
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +23 -2
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.mjs +17 -1
- package/dist/esm/api/resources/agents/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/agents/client/requests/index.mjs +2 -1
- package/dist/esm/api/resources/calls/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/calls/client/Client.mjs +8 -8
- package/dist/esm/api/resources/contacts/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/contacts/client/Client.mjs +6 -6
- package/dist/esm/api/resources/conversations/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/conversations/client/Client.mjs +5 -5
- package/dist/esm/api/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/index.mjs +2 -0
- package/dist/esm/api/resources/messages/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/messages/client/Client.mjs +3 -3
- package/dist/esm/api/resources/numbers/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/numbers/client/Client.mjs +5 -5
- package/dist/esm/api/resources/usage/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/usage/client/Client.mjs +4 -4
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +8 -8
- package/dist/esm/api/types/AgentResponse.d.mts +23 -2
- package/dist/esm/api/types/AgentResponse.mjs +17 -1
- package/dist/esm/api/types/MessageInConversation.d.mts +2 -0
- package/dist/esm/api/types/ReactionInConversation.d.mts +7 -0
- package/dist/esm/api/types/ReactionInConversation.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/auth/BearerAuthProvider.d.mts +1 -1
- package/dist/esm/environments.d.mts +2 -2
- package/dist/esm/environments.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +138 -0
|
@@ -63,7 +63,7 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
|
|
|
63
63
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
64
64
|
const AgentPhone = __importStar(require("../../../index.js"));
|
|
65
65
|
class AgentsClient {
|
|
66
|
-
constructor(options) {
|
|
66
|
+
constructor(options = {}) {
|
|
67
67
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
@@ -83,7 +83,7 @@ class AgentsClient {
|
|
|
83
83
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
84
84
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
85
85
|
const _response = yield core.fetcher({
|
|
86
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
86
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "v1/agents/voices"),
|
|
87
87
|
method: "GET",
|
|
88
88
|
headers: _headers,
|
|
89
89
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -131,7 +131,7 @@ class AgentsClient {
|
|
|
131
131
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
132
132
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
133
133
|
const _response = yield core.fetcher({
|
|
134
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
134
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "v1/agents"),
|
|
135
135
|
method: "GET",
|
|
136
136
|
headers: _headers,
|
|
137
137
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -187,7 +187,7 @@ class AgentsClient {
|
|
|
187
187
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
188
188
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
189
189
|
const _response = yield core.fetcher({
|
|
190
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
190
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "v1/agents"),
|
|
191
191
|
method: "POST",
|
|
192
192
|
headers: _headers,
|
|
193
193
|
contentType: "application/json",
|
|
@@ -241,7 +241,7 @@ class AgentsClient {
|
|
|
241
241
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
242
242
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
243
243
|
const _response = yield core.fetcher({
|
|
244
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
244
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/agents/${core.url.encodePathParam(agentId)}`),
|
|
245
245
|
method: "GET",
|
|
246
246
|
headers: _headers,
|
|
247
247
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -295,7 +295,7 @@ class AgentsClient {
|
|
|
295
295
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
296
296
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
297
297
|
const _response = yield core.fetcher({
|
|
298
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
298
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/agents/${core.url.encodePathParam(agentId)}`),
|
|
299
299
|
method: "DELETE",
|
|
300
300
|
headers: _headers,
|
|
301
301
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -349,7 +349,7 @@ class AgentsClient {
|
|
|
349
349
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
350
350
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
351
351
|
const _response = yield core.fetcher({
|
|
352
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
352
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/agents/${core.url.encodePathParam(agentId)}`),
|
|
353
353
|
method: "PATCH",
|
|
354
354
|
headers: _headers,
|
|
355
355
|
contentType: "application/json",
|
|
@@ -406,7 +406,7 @@ class AgentsClient {
|
|
|
406
406
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
407
407
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
408
408
|
const _response = yield core.fetcher({
|
|
409
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
409
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/agents/${core.url.encodePathParam(agentId)}/numbers`),
|
|
410
410
|
method: "POST",
|
|
411
411
|
headers: _headers,
|
|
412
412
|
contentType: "application/json",
|
|
@@ -463,7 +463,7 @@ class AgentsClient {
|
|
|
463
463
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
464
464
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
465
465
|
const _response = yield core.fetcher({
|
|
466
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
466
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/agents/${core.url.encodePathParam(agentId)}/numbers/${core.url.encodePathParam(numberId)}`),
|
|
467
467
|
method: "DELETE",
|
|
468
468
|
headers: _headers,
|
|
469
469
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -518,7 +518,7 @@ class AgentsClient {
|
|
|
518
518
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
519
519
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
520
520
|
const _response = yield core.fetcher({
|
|
521
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
521
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/agents/${core.url.encodePathParam(agentId)}/conversations`),
|
|
522
522
|
method: "GET",
|
|
523
523
|
headers: _headers,
|
|
524
524
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -576,7 +576,7 @@ class AgentsClient {
|
|
|
576
576
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
577
577
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
578
578
|
const _response = yield core.fetcher({
|
|
579
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
579
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/agents/${core.url.encodePathParam(agentId)}/calls`),
|
|
580
580
|
method: "GET",
|
|
581
581
|
headers: _headers,
|
|
582
582
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -7,11 +7,32 @@
|
|
|
7
7
|
export interface CreateAgentRequest {
|
|
8
8
|
name: string;
|
|
9
9
|
description?: string | null;
|
|
10
|
-
voiceMode?:
|
|
11
|
-
modelTier?:
|
|
10
|
+
voiceMode?: CreateAgentRequest.VoiceMode;
|
|
11
|
+
modelTier?: CreateAgentRequest.ModelTier;
|
|
12
12
|
systemPrompt?: string | null;
|
|
13
13
|
beginMessage?: string | null;
|
|
14
14
|
voice?: string | null;
|
|
15
15
|
transferNumber?: string | null;
|
|
16
16
|
voicemailMessage?: string | null;
|
|
17
|
+
/** Speech-to-text mode. 'fast' optimizes for latency, 'accurate' optimizes for transcription accuracy (~200ms additional latency). */
|
|
18
|
+
sttMode?: CreateAgentRequest.SttMode;
|
|
19
|
+
}
|
|
20
|
+
export declare namespace CreateAgentRequest {
|
|
21
|
+
const VoiceMode: {
|
|
22
|
+
readonly Webhook: "webhook";
|
|
23
|
+
readonly Hosted: "hosted";
|
|
24
|
+
};
|
|
25
|
+
type VoiceMode = (typeof VoiceMode)[keyof typeof VoiceMode];
|
|
26
|
+
const ModelTier: {
|
|
27
|
+
readonly Turbo: "turbo";
|
|
28
|
+
readonly Balanced: "balanced";
|
|
29
|
+
readonly Max: "max";
|
|
30
|
+
};
|
|
31
|
+
type ModelTier = (typeof ModelTier)[keyof typeof ModelTier];
|
|
32
|
+
/** Speech-to-text mode. 'fast' optimizes for latency, 'accurate' optimizes for transcription accuracy (~200ms additional latency). */
|
|
33
|
+
const SttMode: {
|
|
34
|
+
readonly Fast: "fast";
|
|
35
|
+
readonly Accurate: "accurate";
|
|
36
|
+
};
|
|
37
|
+
type SttMode = (typeof SttMode)[keyof typeof SttMode];
|
|
17
38
|
}
|
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CreateAgentRequest = void 0;
|
|
5
|
+
var CreateAgentRequest;
|
|
6
|
+
(function (CreateAgentRequest) {
|
|
7
|
+
CreateAgentRequest.VoiceMode = {
|
|
8
|
+
Webhook: "webhook",
|
|
9
|
+
Hosted: "hosted",
|
|
10
|
+
};
|
|
11
|
+
CreateAgentRequest.ModelTier = {
|
|
12
|
+
Turbo: "turbo",
|
|
13
|
+
Balanced: "balanced",
|
|
14
|
+
Max: "max",
|
|
15
|
+
};
|
|
16
|
+
/** Speech-to-text mode. 'fast' optimizes for latency, 'accurate' optimizes for transcription accuracy (~200ms additional latency). */
|
|
17
|
+
CreateAgentRequest.SttMode = {
|
|
18
|
+
Fast: "fast",
|
|
19
|
+
Accurate: "accurate",
|
|
20
|
+
};
|
|
21
|
+
})(CreateAgentRequest || (exports.CreateAgentRequest = CreateAgentRequest = {}));
|
|
@@ -8,11 +8,32 @@ export interface UpdateAgentRequest {
|
|
|
8
8
|
agent_id: string;
|
|
9
9
|
name?: string | null;
|
|
10
10
|
description?: string | null;
|
|
11
|
-
voiceMode?:
|
|
12
|
-
modelTier?:
|
|
11
|
+
voiceMode?: UpdateAgentRequest.VoiceMode;
|
|
12
|
+
modelTier?: UpdateAgentRequest.ModelTier;
|
|
13
13
|
systemPrompt?: string | null;
|
|
14
14
|
beginMessage?: string | null;
|
|
15
15
|
voice?: string | null;
|
|
16
16
|
transferNumber?: string | null;
|
|
17
17
|
voicemailMessage?: string | null;
|
|
18
|
+
/** Speech-to-text mode. 'fast' optimizes for latency, 'accurate' optimizes for transcription accuracy (~200ms additional latency). */
|
|
19
|
+
sttMode?: UpdateAgentRequest.SttMode;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace UpdateAgentRequest {
|
|
22
|
+
const VoiceMode: {
|
|
23
|
+
readonly Webhook: "webhook";
|
|
24
|
+
readonly Hosted: "hosted";
|
|
25
|
+
};
|
|
26
|
+
type VoiceMode = (typeof VoiceMode)[keyof typeof VoiceMode];
|
|
27
|
+
const ModelTier: {
|
|
28
|
+
readonly Turbo: "turbo";
|
|
29
|
+
readonly Balanced: "balanced";
|
|
30
|
+
readonly Max: "max";
|
|
31
|
+
};
|
|
32
|
+
type ModelTier = (typeof ModelTier)[keyof typeof ModelTier];
|
|
33
|
+
/** Speech-to-text mode. 'fast' optimizes for latency, 'accurate' optimizes for transcription accuracy (~200ms additional latency). */
|
|
34
|
+
const SttMode: {
|
|
35
|
+
readonly Fast: "fast";
|
|
36
|
+
readonly Accurate: "accurate";
|
|
37
|
+
};
|
|
38
|
+
type SttMode = (typeof SttMode)[keyof typeof SttMode];
|
|
18
39
|
}
|
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.UpdateAgentRequest = void 0;
|
|
5
|
+
var UpdateAgentRequest;
|
|
6
|
+
(function (UpdateAgentRequest) {
|
|
7
|
+
UpdateAgentRequest.VoiceMode = {
|
|
8
|
+
Webhook: "webhook",
|
|
9
|
+
Hosted: "hosted",
|
|
10
|
+
};
|
|
11
|
+
UpdateAgentRequest.ModelTier = {
|
|
12
|
+
Turbo: "turbo",
|
|
13
|
+
Balanced: "balanced",
|
|
14
|
+
Max: "max",
|
|
15
|
+
};
|
|
16
|
+
/** Speech-to-text mode. 'fast' optimizes for latency, 'accurate' optimizes for transcription accuracy (~200ms additional latency). */
|
|
17
|
+
UpdateAgentRequest.SttMode = {
|
|
18
|
+
Fast: "fast",
|
|
19
|
+
Accurate: "accurate",
|
|
20
|
+
};
|
|
21
|
+
})(UpdateAgentRequest || (exports.UpdateAgentRequest = UpdateAgentRequest = {}));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export type { AttachNumberRequest } from "./AttachNumberRequest.js";
|
|
2
|
-
export
|
|
2
|
+
export { CreateAgentRequest } from "./CreateAgentRequest.js";
|
|
3
3
|
export type { DeleteAgentV1AgentsAgentIdDeleteRequest } from "./DeleteAgentV1AgentsAgentIdDeleteRequest.js";
|
|
4
4
|
export type { DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest } from "./DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest.js";
|
|
5
5
|
export type { GetAgentV1AgentsAgentIdGetRequest } from "./GetAgentV1AgentsAgentIdGetRequest.js";
|
|
6
6
|
export type { ListAgentCallsV1AgentsAgentIdCallsGetRequest } from "./ListAgentCallsV1AgentsAgentIdCallsGetRequest.js";
|
|
7
7
|
export type { ListAgentConversationsV1AgentsAgentIdConversationsGetRequest } from "./ListAgentConversationsV1AgentsAgentIdConversationsGetRequest.js";
|
|
8
8
|
export type { ListAgentsV1AgentsGetRequest } from "./ListAgentsV1AgentsGetRequest.js";
|
|
9
|
-
export
|
|
9
|
+
export { UpdateAgentRequest } from "./UpdateAgentRequest.js";
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateAgentRequest = exports.CreateAgentRequest = void 0;
|
|
4
|
+
var CreateAgentRequest_js_1 = require("./CreateAgentRequest.js");
|
|
5
|
+
Object.defineProperty(exports, "CreateAgentRequest", { enumerable: true, get: function () { return CreateAgentRequest_js_1.CreateAgentRequest; } });
|
|
6
|
+
var UpdateAgentRequest_js_1 = require("./UpdateAgentRequest.js");
|
|
7
|
+
Object.defineProperty(exports, "UpdateAgentRequest", { enumerable: true, get: function () { return UpdateAgentRequest_js_1.UpdateAgentRequest; } });
|
|
@@ -9,7 +9,7 @@ export declare namespace CallsClient {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class CallsClient {
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<CallsClient.Options>;
|
|
12
|
-
constructor(options
|
|
12
|
+
constructor(options?: CallsClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* List all calls for this account.
|
|
15
15
|
*
|
|
@@ -52,7 +52,7 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
|
|
|
52
52
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
53
|
const AgentPhone = __importStar(require("../../../index.js"));
|
|
54
54
|
class CallsClient {
|
|
55
|
-
constructor(options) {
|
|
55
|
+
constructor(options = {}) {
|
|
56
56
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -84,7 +84,7 @@ class CallsClient {
|
|
|
84
84
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
85
85
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
86
86
|
const _response = yield core.fetcher({
|
|
87
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
87
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "v1/calls"),
|
|
88
88
|
method: "GET",
|
|
89
89
|
headers: _headers,
|
|
90
90
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -146,7 +146,7 @@ class CallsClient {
|
|
|
146
146
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
147
147
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
148
148
|
const _response = yield core.fetcher({
|
|
149
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
149
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "v1/calls"),
|
|
150
150
|
method: "POST",
|
|
151
151
|
headers: _headers,
|
|
152
152
|
contentType: "application/json",
|
|
@@ -209,7 +209,7 @@ class CallsClient {
|
|
|
209
209
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
210
210
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
211
211
|
const _response = yield core.fetcher({
|
|
212
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
212
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "v1/calls/web"),
|
|
213
213
|
method: "POST",
|
|
214
214
|
headers: _headers,
|
|
215
215
|
contentType: "application/json",
|
|
@@ -263,7 +263,7 @@ class CallsClient {
|
|
|
263
263
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
264
264
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
265
265
|
const _response = yield core.fetcher({
|
|
266
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
266
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/calls/${core.url.encodePathParam(callId)}`),
|
|
267
267
|
method: "GET",
|
|
268
268
|
headers: _headers,
|
|
269
269
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -318,7 +318,7 @@ class CallsClient {
|
|
|
318
318
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
319
319
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
320
320
|
const _response = yield core.fetcher({
|
|
321
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
321
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/calls/${core.url.encodePathParam(callId)}/transcript`),
|
|
322
322
|
method: "GET",
|
|
323
323
|
headers: _headers,
|
|
324
324
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -378,7 +378,7 @@ class CallsClient {
|
|
|
378
378
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
379
379
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
380
380
|
const _response = yield core.fetcher({
|
|
381
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
381
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/calls/${core.url.encodePathParam(callId)}/transcript/stream`),
|
|
382
382
|
method: "GET",
|
|
383
383
|
headers: _headers,
|
|
384
384
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -433,7 +433,7 @@ class CallsClient {
|
|
|
433
433
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
434
434
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
435
435
|
const _response = yield core.fetcher({
|
|
436
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
436
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/numbers/${core.url.encodePathParam(numberId)}/calls`),
|
|
437
437
|
method: "GET",
|
|
438
438
|
headers: _headers,
|
|
439
439
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -9,7 +9,7 @@ export declare namespace ContactsClient {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class ContactsClient {
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<ContactsClient.Options>;
|
|
12
|
-
constructor(options
|
|
12
|
+
constructor(options?: ContactsClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* List all contacts for this account.
|
|
15
15
|
*
|
|
@@ -63,7 +63,7 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
|
|
|
63
63
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
64
64
|
const AgentPhone = __importStar(require("../../../index.js"));
|
|
65
65
|
class ContactsClient {
|
|
66
|
-
constructor(options) {
|
|
66
|
+
constructor(options = {}) {
|
|
67
67
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
@@ -94,7 +94,7 @@ class ContactsClient {
|
|
|
94
94
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
95
95
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
96
96
|
const _response = yield core.fetcher({
|
|
97
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
97
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "v1/contacts"),
|
|
98
98
|
method: "GET",
|
|
99
99
|
headers: _headers,
|
|
100
100
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -148,7 +148,7 @@ class ContactsClient {
|
|
|
148
148
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
149
149
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
150
150
|
const _response = yield core.fetcher({
|
|
151
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
151
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "v1/contacts"),
|
|
152
152
|
method: "POST",
|
|
153
153
|
headers: _headers,
|
|
154
154
|
contentType: "application/json",
|
|
@@ -202,7 +202,7 @@ class ContactsClient {
|
|
|
202
202
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
203
203
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
204
204
|
const _response = yield core.fetcher({
|
|
205
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
205
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/contacts/${core.url.encodePathParam(contactId)}`),
|
|
206
206
|
method: "GET",
|
|
207
207
|
headers: _headers,
|
|
208
208
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -253,7 +253,7 @@ class ContactsClient {
|
|
|
253
253
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
254
254
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
255
255
|
const _response = yield core.fetcher({
|
|
256
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
256
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/contacts/${core.url.encodePathParam(contactId)}`),
|
|
257
257
|
method: "DELETE",
|
|
258
258
|
headers: _headers,
|
|
259
259
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -306,7 +306,7 @@ class ContactsClient {
|
|
|
306
306
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
307
307
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
308
308
|
const _response = yield core.fetcher({
|
|
309
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
309
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/contacts/${core.url.encodePathParam(contactId)}`),
|
|
310
310
|
method: "PATCH",
|
|
311
311
|
headers: _headers,
|
|
312
312
|
contentType: "application/json",
|
|
@@ -9,7 +9,7 @@ export declare namespace ConversationsClient {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class ConversationsClient {
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<ConversationsClient.Options>;
|
|
12
|
-
constructor(options
|
|
12
|
+
constructor(options?: ConversationsClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* List all conversations for this account.
|
|
15
15
|
*
|
|
@@ -63,7 +63,7 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
|
|
|
63
63
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
64
64
|
const AgentPhone = __importStar(require("../../../index.js"));
|
|
65
65
|
class ConversationsClient {
|
|
66
|
-
constructor(options) {
|
|
66
|
+
constructor(options = {}) {
|
|
67
67
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
@@ -93,7 +93,7 @@ class ConversationsClient {
|
|
|
93
93
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
94
94
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
95
95
|
const _response = yield core.fetcher({
|
|
96
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
96
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "v1/conversations"),
|
|
97
97
|
method: "GET",
|
|
98
98
|
headers: _headers,
|
|
99
99
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -150,7 +150,7 @@ class ConversationsClient {
|
|
|
150
150
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
151
151
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
152
152
|
const _response = yield core.fetcher({
|
|
153
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
153
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/conversations/${core.url.encodePathParam(conversationId)}`),
|
|
154
154
|
method: "GET",
|
|
155
155
|
headers: _headers,
|
|
156
156
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -208,7 +208,7 @@ class ConversationsClient {
|
|
|
208
208
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
209
209
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
210
210
|
const _response = yield core.fetcher({
|
|
211
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
211
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/conversations/${core.url.encodePathParam(conversationId)}`),
|
|
212
212
|
method: "PATCH",
|
|
213
213
|
headers: _headers,
|
|
214
214
|
contentType: "application/json",
|
|
@@ -269,7 +269,7 @@ class ConversationsClient {
|
|
|
269
269
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
270
270
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
271
271
|
const _response = yield core.fetcher({
|
|
272
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
272
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/conversations/${core.url.encodePathParam(conversationId)}/messages`),
|
|
273
273
|
method: "GET",
|
|
274
274
|
headers: _headers,
|
|
275
275
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from "./agentSignup/client/requests/index.js";
|
|
2
|
+
export * as agentSignup from "./agentSignup/index.js";
|
|
1
3
|
export * from "./agents/client/requests/index.js";
|
|
2
4
|
export * as agents from "./agents/index.js";
|
|
3
5
|
export * from "./agentWebhooks/client/requests/index.js";
|
|
@@ -36,7 +36,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.webhooks = exports.usage = exports.numbers = exports.messages = exports.conversations = exports.contacts = exports.calls = exports.agentWebhooks = exports.agents = void 0;
|
|
39
|
+
exports.webhooks = exports.usage = exports.numbers = exports.messages = exports.conversations = exports.contacts = exports.calls = exports.agentWebhooks = exports.agents = exports.agentSignup = void 0;
|
|
40
|
+
__exportStar(require("./agentSignup/client/requests/index.js"), exports);
|
|
41
|
+
exports.agentSignup = __importStar(require("./agentSignup/index.js"));
|
|
40
42
|
__exportStar(require("./agents/client/requests/index.js"), exports);
|
|
41
43
|
exports.agents = __importStar(require("./agents/index.js"));
|
|
42
44
|
__exportStar(require("./agentWebhooks/client/requests/index.js"), exports);
|
|
@@ -9,7 +9,7 @@ export declare namespace MessagesClient {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class MessagesClient {
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<MessagesClient.Options>;
|
|
12
|
-
constructor(options
|
|
12
|
+
constructor(options?: MessagesClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* Send an outbound message (SMS or iMessage) via the provider assigned to the number.
|
|
15
15
|
*
|
|
@@ -63,7 +63,7 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
|
|
|
63
63
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
64
64
|
const AgentPhone = __importStar(require("../../../index.js"));
|
|
65
65
|
class MessagesClient {
|
|
66
|
-
constructor(options) {
|
|
66
|
+
constructor(options = {}) {
|
|
67
67
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
@@ -90,7 +90,7 @@ class MessagesClient {
|
|
|
90
90
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
91
91
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
92
92
|
const _response = yield core.fetcher({
|
|
93
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
93
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "v1/messages"),
|
|
94
94
|
method: "POST",
|
|
95
95
|
headers: _headers,
|
|
96
96
|
contentType: "application/json",
|
|
@@ -148,7 +148,7 @@ class MessagesClient {
|
|
|
148
148
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
149
149
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
150
150
|
const _response = yield core.fetcher({
|
|
151
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
151
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/messages/${core.url.encodePathParam(messageId)}/reactions`),
|
|
152
152
|
method: "POST",
|
|
153
153
|
headers: _headers,
|
|
154
154
|
contentType: "application/json",
|
|
@@ -9,7 +9,7 @@ export declare namespace NumbersClient {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class NumbersClient {
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<NumbersClient.Options>;
|
|
12
|
-
constructor(options
|
|
12
|
+
constructor(options?: NumbersClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* List all phone numbers for this account.
|
|
15
15
|
*
|
|
@@ -52,7 +52,7 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
|
|
|
52
52
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
53
|
const AgentPhone = __importStar(require("../../../index.js"));
|
|
54
54
|
class NumbersClient {
|
|
55
|
-
constructor(options) {
|
|
55
|
+
constructor(options = {}) {
|
|
56
56
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -80,7 +80,7 @@ class NumbersClient {
|
|
|
80
80
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
81
81
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
82
82
|
const _response = yield core.fetcher({
|
|
83
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
83
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "v1/numbers"),
|
|
84
84
|
method: "GET",
|
|
85
85
|
headers: _headers,
|
|
86
86
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -134,7 +134,7 @@ class NumbersClient {
|
|
|
134
134
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
135
135
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
136
136
|
const _response = yield core.fetcher({
|
|
137
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
137
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "v1/numbers"),
|
|
138
138
|
method: "POST",
|
|
139
139
|
headers: _headers,
|
|
140
140
|
contentType: "application/json",
|
|
@@ -195,7 +195,7 @@ class NumbersClient {
|
|
|
195
195
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
196
196
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
197
197
|
const _response = yield core.fetcher({
|
|
198
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
198
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/numbers/${core.url.encodePathParam(numberId)}/messages`),
|
|
199
199
|
method: "GET",
|
|
200
200
|
headers: _headers,
|
|
201
201
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -253,7 +253,7 @@ class NumbersClient {
|
|
|
253
253
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
254
254
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
255
255
|
const _response = yield core.fetcher({
|
|
256
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.
|
|
256
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/numbers/${core.url.encodePathParam(numberId)}`),
|
|
257
257
|
method: "DELETE",
|
|
258
258
|
headers: _headers,
|
|
259
259
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -9,7 +9,7 @@ export declare namespace UsageClient {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class UsageClient {
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<UsageClient.Options>;
|
|
12
|
-
constructor(options
|
|
12
|
+
constructor(options?: UsageClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* Get usage statistics for the current account.
|
|
15
15
|
*
|