agentphone 1.0.12 → 1.0.13
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +9 -4
- package/dist/cjs/api/resources/agents/client/Client.js +11 -11
- package/dist/cjs/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
- package/dist/cjs/api/resources/agents/client/requests/DeleteAgentV1AgentsAgentIdDeleteRequest.d.ts +2 -0
- package/dist/cjs/api/resources/agents/client/requests/GetAgentV1AgentsAgentIdGetRequest.d.ts +2 -0
- package/dist/cjs/api/resources/agents/client/requests/ListAgentsV1AgentsGetRequest.d.ts +2 -1
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +2 -0
- package/dist/cjs/api/resources/calls/client/Client.js +16 -5
- package/dist/cjs/api/resources/calls/client/requests/CreateOutboundCallRequest.d.ts +2 -0
- package/dist/cjs/api/resources/calls/client/requests/ListCallsV1CallsGetRequest.d.ts +2 -1
- package/dist/cjs/api/resources/contacts/client/Client.js +2 -3
- package/dist/cjs/api/resources/contacts/client/requests/ListContactsV1ContactsGetRequest.d.ts +2 -1
- package/dist/cjs/api/resources/conversations/client/Client.d.ts +5 -3
- package/dist/cjs/api/resources/conversations/client/Client.js +7 -6
- package/dist/cjs/api/resources/conversations/client/requests/ListConversationsV1ConversationsGetRequest.d.ts +2 -1
- package/dist/cjs/api/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.js +3 -1
- package/dist/cjs/api/resources/numbers/client/Client.js +18 -7
- package/dist/cjs/api/resources/numbers/client/requests/CreateNumberRequest.d.ts +2 -0
- package/dist/cjs/api/resources/numbers/client/requests/DeleteNumberV1NumbersNumberIdDeleteRequest.d.ts +2 -0
- package/dist/cjs/api/resources/numbers/client/requests/ListNumbersV1NumbersGetRequest.d.ts +2 -1
- package/dist/cjs/api/resources/subAccounts/client/Client.d.ts +61 -0
- package/dist/cjs/api/resources/subAccounts/client/Client.js +261 -0
- package/dist/cjs/api/resources/subAccounts/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/subAccounts/client/index.js +17 -0
- package/dist/cjs/api/resources/subAccounts/client/requests/CreateSubAccountRequest.d.ts +9 -0
- package/dist/cjs/api/resources/subAccounts/client/requests/CreateSubAccountRequest.js +3 -0
- package/dist/cjs/api/resources/subAccounts/client/requests/DeleteSubAccountV1SubAccountsSubAccountIdDeleteRequest.d.ts +9 -0
- package/dist/cjs/api/resources/subAccounts/client/requests/DeleteSubAccountV1SubAccountsSubAccountIdDeleteRequest.js +3 -0
- package/dist/cjs/api/resources/subAccounts/client/requests/UpdateSubAccountRequest.d.ts +11 -0
- package/dist/cjs/api/resources/subAccounts/client/requests/UpdateSubAccountRequest.js +3 -0
- package/dist/cjs/api/resources/subAccounts/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/subAccounts/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/subAccounts/index.d.ts +1 -0
- package/dist/cjs/api/resources/subAccounts/index.js +17 -0
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +7 -4
- package/dist/cjs/api/resources/webhooks/client/Client.js +14 -9
- package/dist/cjs/api/resources/webhooks/client/requests/CreateOrUpdateWebhookV1WebhooksPostRequest.d.ts +14 -0
- package/dist/cjs/api/resources/webhooks/client/requests/CreateOrUpdateWebhookV1WebhooksPostRequest.js +3 -0
- package/dist/cjs/api/resources/webhooks/client/requests/GetWebhookV1WebhooksGetRequest.d.ts +8 -0
- package/dist/cjs/api/resources/webhooks/client/requests/GetWebhookV1WebhooksGetRequest.js +3 -0
- package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/types/AppRoutesConversationsConversationSummary.d.ts +6 -0
- package/dist/cjs/api/types/ConversationDetail.d.ts +5 -0
- package/dist/cjs/api/types/GroupParticipant.d.ts +7 -0
- package/dist/cjs/api/types/GroupParticipant.js +3 -0
- package/dist/cjs/api/types/MessageInConversation.d.ts +1 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- 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 +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/resources/agents/client/Client.mjs +12 -12
- package/dist/esm/api/resources/agents/client/requests/CreateAgentRequest.d.mts +2 -0
- package/dist/esm/api/resources/agents/client/requests/DeleteAgentV1AgentsAgentIdDeleteRequest.d.mts +2 -0
- package/dist/esm/api/resources/agents/client/requests/GetAgentV1AgentsAgentIdGetRequest.d.mts +2 -0
- package/dist/esm/api/resources/agents/client/requests/ListAgentsV1AgentsGetRequest.d.mts +2 -1
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +2 -0
- package/dist/esm/api/resources/calls/client/Client.mjs +17 -6
- package/dist/esm/api/resources/calls/client/requests/CreateOutboundCallRequest.d.mts +2 -0
- package/dist/esm/api/resources/calls/client/requests/ListCallsV1CallsGetRequest.d.mts +2 -1
- package/dist/esm/api/resources/contacts/client/Client.mjs +3 -4
- package/dist/esm/api/resources/contacts/client/requests/ListContactsV1ContactsGetRequest.d.mts +2 -1
- package/dist/esm/api/resources/conversations/client/Client.d.mts +5 -3
- package/dist/esm/api/resources/conversations/client/Client.mjs +8 -7
- package/dist/esm/api/resources/conversations/client/requests/ListConversationsV1ConversationsGetRequest.d.mts +2 -1
- package/dist/esm/api/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/index.mjs +2 -0
- package/dist/esm/api/resources/numbers/client/Client.mjs +19 -8
- package/dist/esm/api/resources/numbers/client/requests/CreateNumberRequest.d.mts +2 -0
- package/dist/esm/api/resources/numbers/client/requests/DeleteNumberV1NumbersNumberIdDeleteRequest.d.mts +2 -0
- package/dist/esm/api/resources/numbers/client/requests/ListNumbersV1NumbersGetRequest.d.mts +2 -1
- package/dist/esm/api/resources/subAccounts/client/Client.d.mts +61 -0
- package/dist/esm/api/resources/subAccounts/client/Client.mjs +224 -0
- package/dist/esm/api/resources/subAccounts/client/index.d.mts +1 -0
- package/dist/esm/api/resources/subAccounts/client/index.mjs +1 -0
- package/dist/esm/api/resources/subAccounts/client/requests/CreateSubAccountRequest.d.mts +9 -0
- package/dist/esm/api/resources/subAccounts/client/requests/CreateSubAccountRequest.mjs +2 -0
- package/dist/esm/api/resources/subAccounts/client/requests/DeleteSubAccountV1SubAccountsSubAccountIdDeleteRequest.d.mts +9 -0
- package/dist/esm/api/resources/subAccounts/client/requests/DeleteSubAccountV1SubAccountsSubAccountIdDeleteRequest.mjs +2 -0
- package/dist/esm/api/resources/subAccounts/client/requests/UpdateSubAccountRequest.d.mts +11 -0
- package/dist/esm/api/resources/subAccounts/client/requests/UpdateSubAccountRequest.mjs +2 -0
- package/dist/esm/api/resources/subAccounts/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/subAccounts/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/subAccounts/index.d.mts +1 -0
- package/dist/esm/api/resources/subAccounts/index.mjs +1 -0
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +7 -4
- package/dist/esm/api/resources/webhooks/client/Client.mjs +15 -10
- package/dist/esm/api/resources/webhooks/client/requests/CreateOrUpdateWebhookV1WebhooksPostRequest.d.mts +14 -0
- package/dist/esm/api/resources/webhooks/client/requests/CreateOrUpdateWebhookV1WebhooksPostRequest.mjs +2 -0
- package/dist/esm/api/resources/webhooks/client/requests/GetWebhookV1WebhooksGetRequest.d.mts +8 -0
- package/dist/esm/api/resources/webhooks/client/requests/GetWebhookV1WebhooksGetRequest.mjs +2 -0
- package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +2 -0
- package/dist/esm/api/types/AppRoutesConversationsConversationSummary.d.mts +6 -0
- package/dist/esm/api/types/ConversationDetail.d.mts +5 -0
- package/dist/esm/api/types/GroupParticipant.d.mts +7 -0
- package/dist/esm/api/types/GroupParticipant.mjs +2 -0
- package/dist/esm/api/types/MessageInConversation.d.mts +1 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +214 -6
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
46
|
+
var t = {};
|
|
47
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
48
|
+
t[p] = s[p];
|
|
49
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
50
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
51
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
52
|
+
t[p[i]] = s[p[i]];
|
|
53
|
+
}
|
|
54
|
+
return t;
|
|
55
|
+
};
|
|
56
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
|
+
exports.SubAccountsClient = void 0;
|
|
58
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
59
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
60
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
61
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
62
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
63
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
64
|
+
const AgentPhone = __importStar(require("../../../index.js"));
|
|
65
|
+
class SubAccountsClient {
|
|
66
|
+
constructor(options = {}) {
|
|
67
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @param {SubAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* await client.subAccounts.listSubAccounts()
|
|
74
|
+
*/
|
|
75
|
+
listSubAccounts(requestOptions) {
|
|
76
|
+
return core.HttpResponsePromise.fromPromise(this.__listSubAccounts(requestOptions));
|
|
77
|
+
}
|
|
78
|
+
__listSubAccounts(requestOptions) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
81
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
82
|
+
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);
|
|
83
|
+
const _response = yield core.fetcher({
|
|
84
|
+
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/sub-accounts"),
|
|
85
|
+
method: "GET",
|
|
86
|
+
headers: _headers,
|
|
87
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
88
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
89
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
90
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
91
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
92
|
+
logging: this._options.logging,
|
|
93
|
+
});
|
|
94
|
+
if (_response.ok) {
|
|
95
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
96
|
+
}
|
|
97
|
+
if (_response.error.reason === "status-code") {
|
|
98
|
+
throw new errors.AgentPhoneError({
|
|
99
|
+
statusCode: _response.error.statusCode,
|
|
100
|
+
body: _response.error.body,
|
|
101
|
+
rawResponse: _response.rawResponse,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/sub-accounts");
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* @param {AgentPhone.CreateSubAccountRequest} request
|
|
109
|
+
* @param {SubAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
110
|
+
*
|
|
111
|
+
* @throws {@link AgentPhone.UnprocessableEntityError}
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* await client.subAccounts.createSubAccount({
|
|
115
|
+
* name: "name"
|
|
116
|
+
* })
|
|
117
|
+
*/
|
|
118
|
+
createSubAccount(request, requestOptions) {
|
|
119
|
+
return core.HttpResponsePromise.fromPromise(this.__createSubAccount(request, requestOptions));
|
|
120
|
+
}
|
|
121
|
+
__createSubAccount(request, requestOptions) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
124
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
125
|
+
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);
|
|
126
|
+
const _response = yield core.fetcher({
|
|
127
|
+
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/sub-accounts"),
|
|
128
|
+
method: "POST",
|
|
129
|
+
headers: _headers,
|
|
130
|
+
contentType: "application/json",
|
|
131
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
132
|
+
requestType: "json",
|
|
133
|
+
body: request,
|
|
134
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
135
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
136
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
137
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
138
|
+
logging: this._options.logging,
|
|
139
|
+
});
|
|
140
|
+
if (_response.ok) {
|
|
141
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
142
|
+
}
|
|
143
|
+
if (_response.error.reason === "status-code") {
|
|
144
|
+
switch (_response.error.statusCode) {
|
|
145
|
+
case 422:
|
|
146
|
+
throw new AgentPhone.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
147
|
+
default:
|
|
148
|
+
throw new errors.AgentPhoneError({
|
|
149
|
+
statusCode: _response.error.statusCode,
|
|
150
|
+
body: _response.error.body,
|
|
151
|
+
rawResponse: _response.rawResponse,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/sub-accounts");
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* @param {AgentPhone.DeleteSubAccountV1SubAccountsSubAccountIdDeleteRequest} request
|
|
160
|
+
* @param {SubAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
161
|
+
*
|
|
162
|
+
* @throws {@link AgentPhone.UnprocessableEntityError}
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* await client.subAccounts.deleteSubAccount({
|
|
166
|
+
* sub_account_id: "sub_account_id"
|
|
167
|
+
* })
|
|
168
|
+
*/
|
|
169
|
+
deleteSubAccount(request, requestOptions) {
|
|
170
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteSubAccount(request, requestOptions));
|
|
171
|
+
}
|
|
172
|
+
__deleteSubAccount(request, requestOptions) {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
174
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
175
|
+
const { sub_account_id: subAccountId } = request;
|
|
176
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
177
|
+
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);
|
|
178
|
+
const _response = yield core.fetcher({
|
|
179
|
+
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/sub-accounts/${core.url.encodePathParam(subAccountId)}`),
|
|
180
|
+
method: "DELETE",
|
|
181
|
+
headers: _headers,
|
|
182
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
183
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
184
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
185
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
186
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
187
|
+
logging: this._options.logging,
|
|
188
|
+
});
|
|
189
|
+
if (_response.ok) {
|
|
190
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
191
|
+
}
|
|
192
|
+
if (_response.error.reason === "status-code") {
|
|
193
|
+
switch (_response.error.statusCode) {
|
|
194
|
+
case 422:
|
|
195
|
+
throw new AgentPhone.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
196
|
+
default:
|
|
197
|
+
throw new errors.AgentPhoneError({
|
|
198
|
+
statusCode: _response.error.statusCode,
|
|
199
|
+
body: _response.error.body,
|
|
200
|
+
rawResponse: _response.rawResponse,
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v1/sub-accounts/{sub_account_id}");
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* @param {AgentPhone.UpdateSubAccountRequest} request
|
|
209
|
+
* @param {SubAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
210
|
+
*
|
|
211
|
+
* @throws {@link AgentPhone.UnprocessableEntityError}
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* await client.subAccounts.updateSubAccount({
|
|
215
|
+
* sub_account_id: "sub_account_id",
|
|
216
|
+
* name: "name"
|
|
217
|
+
* })
|
|
218
|
+
*/
|
|
219
|
+
updateSubAccount(request, requestOptions) {
|
|
220
|
+
return core.HttpResponsePromise.fromPromise(this.__updateSubAccount(request, requestOptions));
|
|
221
|
+
}
|
|
222
|
+
__updateSubAccount(request, requestOptions) {
|
|
223
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
225
|
+
const { sub_account_id: subAccountId } = request, _body = __rest(request, ["sub_account_id"]);
|
|
226
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
227
|
+
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);
|
|
228
|
+
const _response = yield core.fetcher({
|
|
229
|
+
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/sub-accounts/${core.url.encodePathParam(subAccountId)}`),
|
|
230
|
+
method: "PATCH",
|
|
231
|
+
headers: _headers,
|
|
232
|
+
contentType: "application/json",
|
|
233
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
234
|
+
requestType: "json",
|
|
235
|
+
body: _body,
|
|
236
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
237
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
238
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
239
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
240
|
+
logging: this._options.logging,
|
|
241
|
+
});
|
|
242
|
+
if (_response.ok) {
|
|
243
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
244
|
+
}
|
|
245
|
+
if (_response.error.reason === "status-code") {
|
|
246
|
+
switch (_response.error.statusCode) {
|
|
247
|
+
case 422:
|
|
248
|
+
throw new AgentPhone.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
249
|
+
default:
|
|
250
|
+
throw new errors.AgentPhoneError({
|
|
251
|
+
statusCode: _response.error.statusCode,
|
|
252
|
+
body: _response.error.body,
|
|
253
|
+
rawResponse: _response.rawResponse,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v1/sub-accounts/{sub_account_id}");
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
exports.SubAccountsClient = SubAccountsClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { CreateSubAccountRequest } from "./CreateSubAccountRequest.js";
|
|
2
|
+
export type { DeleteSubAccountV1SubAccountsSubAccountIdDeleteRequest } from "./DeleteSubAccountV1SubAccountsSubAccountIdDeleteRequest.js";
|
|
3
|
+
export type { UpdateSubAccountRequest } from "./UpdateSubAccountRequest.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -13,12 +13,13 @@ export declare class WebhooksClient {
|
|
|
13
13
|
/**
|
|
14
14
|
* Get the master webhook configuration for this account.
|
|
15
15
|
*
|
|
16
|
+
* @param {AgentPhone.GetWebhookV1WebhooksGetRequest} request
|
|
16
17
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
17
18
|
*
|
|
18
19
|
* @example
|
|
19
20
|
* await client.webhooks.getWebhook()
|
|
20
21
|
*/
|
|
21
|
-
getWebhook(requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<AgentPhone.WebhookResponse | null>;
|
|
22
|
+
getWebhook(request?: AgentPhone.GetWebhookV1WebhooksGetRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<AgentPhone.WebhookResponse | null>;
|
|
22
23
|
private __getWebhook;
|
|
23
24
|
/**
|
|
24
25
|
* Register or update the webhook URL for this account.
|
|
@@ -29,17 +30,19 @@ export declare class WebhooksClient {
|
|
|
29
30
|
* contextLimit: Number of recent messages to include in webhook payloads (0-50, default: 10).
|
|
30
31
|
* Set to 0 to disable history in webhooks.
|
|
31
32
|
*
|
|
32
|
-
* @param {AgentPhone.
|
|
33
|
+
* @param {AgentPhone.CreateOrUpdateWebhookV1WebhooksPostRequest} request
|
|
33
34
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
35
|
*
|
|
35
36
|
* @throws {@link AgentPhone.UnprocessableEntityError}
|
|
36
37
|
*
|
|
37
38
|
* @example
|
|
38
39
|
* await client.webhooks.createOrUpdateWebhook({
|
|
39
|
-
*
|
|
40
|
+
* body: {
|
|
41
|
+
* url: "url"
|
|
42
|
+
* }
|
|
40
43
|
* })
|
|
41
44
|
*/
|
|
42
|
-
createOrUpdateWebhook(request: AgentPhone.
|
|
45
|
+
createOrUpdateWebhook(request: AgentPhone.CreateOrUpdateWebhookV1WebhooksPostRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<AgentPhone.WebhookResponse>;
|
|
43
46
|
private __createOrUpdateWebhook;
|
|
44
47
|
/**
|
|
45
48
|
* Remove the master webhook for this account.
|
|
@@ -58,19 +58,21 @@ class WebhooksClient {
|
|
|
58
58
|
/**
|
|
59
59
|
* Get the master webhook configuration for this account.
|
|
60
60
|
*
|
|
61
|
+
* @param {AgentPhone.GetWebhookV1WebhooksGetRequest} request
|
|
61
62
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
63
|
*
|
|
63
64
|
* @example
|
|
64
65
|
* await client.webhooks.getWebhook()
|
|
65
66
|
*/
|
|
66
|
-
getWebhook(requestOptions) {
|
|
67
|
-
return core.HttpResponsePromise.fromPromise(this.__getWebhook(requestOptions));
|
|
67
|
+
getWebhook(request = {}, requestOptions) {
|
|
68
|
+
return core.HttpResponsePromise.fromPromise(this.__getWebhook(request, requestOptions));
|
|
68
69
|
}
|
|
69
|
-
__getWebhook(
|
|
70
|
-
return __awaiter(this,
|
|
70
|
+
__getWebhook() {
|
|
71
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
71
72
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
73
|
+
const { "X-Sub-Account-Id": subAccountId } = request;
|
|
72
74
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
73
|
-
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);
|
|
75
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Sub-Account-Id": subAccountId }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
74
76
|
const _response = yield core.fetcher({
|
|
75
77
|
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/webhooks"),
|
|
76
78
|
method: "GET",
|
|
@@ -104,14 +106,16 @@ class WebhooksClient {
|
|
|
104
106
|
* contextLimit: Number of recent messages to include in webhook payloads (0-50, default: 10).
|
|
105
107
|
* Set to 0 to disable history in webhooks.
|
|
106
108
|
*
|
|
107
|
-
* @param {AgentPhone.
|
|
109
|
+
* @param {AgentPhone.CreateOrUpdateWebhookV1WebhooksPostRequest} request
|
|
108
110
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
109
111
|
*
|
|
110
112
|
* @throws {@link AgentPhone.UnprocessableEntityError}
|
|
111
113
|
*
|
|
112
114
|
* @example
|
|
113
115
|
* await client.webhooks.createOrUpdateWebhook({
|
|
114
|
-
*
|
|
116
|
+
* body: {
|
|
117
|
+
* url: "url"
|
|
118
|
+
* }
|
|
115
119
|
* })
|
|
116
120
|
*/
|
|
117
121
|
createOrUpdateWebhook(request, requestOptions) {
|
|
@@ -120,8 +124,9 @@ class WebhooksClient {
|
|
|
120
124
|
__createOrUpdateWebhook(request, requestOptions) {
|
|
121
125
|
return __awaiter(this, void 0, void 0, function* () {
|
|
122
126
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
127
|
+
const { "X-Sub-Account-Id": subAccountId, body: _body } = request;
|
|
123
128
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
124
|
-
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);
|
|
129
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Sub-Account-Id": subAccountId }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
125
130
|
const _response = yield core.fetcher({
|
|
126
131
|
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/webhooks"),
|
|
127
132
|
method: "POST",
|
|
@@ -129,7 +134,7 @@ class WebhooksClient {
|
|
|
129
134
|
contentType: "application/json",
|
|
130
135
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
131
136
|
requestType: "json",
|
|
132
|
-
body:
|
|
137
|
+
body: _body,
|
|
133
138
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
134
139
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
135
140
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type * as AgentPhone from "../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* body: {
|
|
6
|
+
* url: "url"
|
|
7
|
+
* }
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface CreateOrUpdateWebhookV1WebhooksPostRequest {
|
|
11
|
+
/** Target a sub-account. Pass a sub-account ID to scope this request. Omit to use the master account. */
|
|
12
|
+
"X-Sub-Account-Id"?: string;
|
|
13
|
+
body: AgentPhone.WebhookCreateRequest;
|
|
14
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export type { CreateOrUpdateWebhookV1WebhooksPostRequest } from "./CreateOrUpdateWebhookV1WebhooksPostRequest.js";
|
|
1
2
|
export type { DeliveryStatsV1WebhooksDeliveriesStatsGetRequest } from "./DeliveryStatsV1WebhooksDeliveriesStatsGetRequest.js";
|
|
3
|
+
export type { GetWebhookV1WebhooksGetRequest } from "./GetWebhookV1WebhooksGetRequest.js";
|
|
2
4
|
export type { ListDeliveriesV1WebhooksDeliveriesGetRequest } from "./ListDeliveriesV1WebhooksDeliveriesGetRequest.js";
|
|
3
5
|
export type { TestWebhookV1WebhooksTestPostRequest } from "./TestWebhookV1WebhooksTestPostRequest.js";
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
import type * as AgentPhone from "../index.js";
|
|
1
2
|
export interface AppRoutesConversationsConversationSummary {
|
|
2
3
|
id: string;
|
|
3
4
|
agentId?: string | null;
|
|
4
5
|
phoneNumberId: string;
|
|
5
6
|
phoneNumber: string;
|
|
6
7
|
participant: string;
|
|
8
|
+
isGroup?: boolean;
|
|
9
|
+
groupId?: string | null;
|
|
10
|
+
groupName?: string | null;
|
|
11
|
+
groupIconUrl?: string | null;
|
|
12
|
+
participants?: AgentPhone.GroupParticipant[] | null;
|
|
7
13
|
lastMessageAt: string;
|
|
8
14
|
lastMessagePreview: string;
|
|
9
15
|
messageCount: number;
|
|
@@ -5,6 +5,11 @@ export interface ConversationDetail {
|
|
|
5
5
|
phoneNumberId: string;
|
|
6
6
|
phoneNumber: string;
|
|
7
7
|
participant: string;
|
|
8
|
+
isGroup?: boolean;
|
|
9
|
+
groupId?: string | null;
|
|
10
|
+
groupName?: string | null;
|
|
11
|
+
groupIconUrl?: string | null;
|
|
12
|
+
participants?: AgentPhone.GroupParticipant[] | null;
|
|
8
13
|
lastMessageAt: string;
|
|
9
14
|
messageCount: number;
|
|
10
15
|
metadata?: Record<string, unknown> | null;
|
|
@@ -21,6 +21,7 @@ export * from "./DailyUsagePoint.js";
|
|
|
21
21
|
export * from "./DailyUsageResponse.js";
|
|
22
22
|
export * from "./DeleteAgentResponse.js";
|
|
23
23
|
export * from "./FieldWarning.js";
|
|
24
|
+
export * from "./GroupParticipant.js";
|
|
24
25
|
export * from "./HttpValidationError.js";
|
|
25
26
|
export * from "./MessageInConversation.js";
|
|
26
27
|
export * from "./MessageListResponse.js";
|
|
@@ -37,6 +37,7 @@ __exportStar(require("./DailyUsagePoint.js"), exports);
|
|
|
37
37
|
__exportStar(require("./DailyUsageResponse.js"), exports);
|
|
38
38
|
__exportStar(require("./DeleteAgentResponse.js"), exports);
|
|
39
39
|
__exportStar(require("./FieldWarning.js"), exports);
|
|
40
|
+
__exportStar(require("./GroupParticipant.js"), exports);
|
|
40
41
|
__exportStar(require("./HttpValidationError.js"), exports);
|
|
41
42
|
__exportStar(require("./MessageInConversation.js"), exports);
|
|
42
43
|
__exportStar(require("./MessageListResponse.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.13";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "agentphone",
|
|
9
|
-
"X-Fern-SDK-Version": "1.0.
|
|
10
|
-
"User-Agent": "agentphone/1.0.
|
|
9
|
+
"X-Fern-SDK-Version": "1.0.13",
|
|
10
|
+
"User-Agent": "agentphone/1.0.13",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
package/dist/esm/Client.d.mts
CHANGED
|
@@ -7,6 +7,7 @@ import { ConversationsClient } from "./api/resources/conversations/client/Client
|
|
|
7
7
|
import { MessagesClient } from "./api/resources/messages/client/Client.mjs";
|
|
8
8
|
import { NumbersClient } from "./api/resources/numbers/client/Client.mjs";
|
|
9
9
|
import { RegistrationClient } from "./api/resources/registration/client/Client.mjs";
|
|
10
|
+
import { SubAccountsClient } from "./api/resources/subAccounts/client/Client.mjs";
|
|
10
11
|
import { UsageClient } from "./api/resources/usage/client/Client.mjs";
|
|
11
12
|
import { WebhooksClient } from "./api/resources/webhooks/client/Client.mjs";
|
|
12
13
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
|
|
@@ -29,6 +30,7 @@ export declare class AgentPhoneClient {
|
|
|
29
30
|
protected _messages: MessagesClient | undefined;
|
|
30
31
|
protected _contactCards: ContactCardsClient | undefined;
|
|
31
32
|
protected _registration: RegistrationClient | undefined;
|
|
33
|
+
protected _subAccounts: SubAccountsClient | undefined;
|
|
32
34
|
constructor(options?: AgentPhoneClient.Options);
|
|
33
35
|
get agents(): AgentsClient;
|
|
34
36
|
get numbers(): NumbersClient;
|
|
@@ -41,4 +43,5 @@ export declare class AgentPhoneClient {
|
|
|
41
43
|
get messages(): MessagesClient;
|
|
42
44
|
get contactCards(): ContactCardsClient;
|
|
43
45
|
get registration(): RegistrationClient;
|
|
46
|
+
get subAccounts(): SubAccountsClient;
|
|
44
47
|
}
|