twilio 5.3.0 → 5.3.2
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/lib/rest/Assistants.d.ts +4 -0
- package/lib/rest/Assistants.js +8 -0
- package/lib/rest/AssistantsBase.d.ts +13 -0
- package/lib/rest/AssistantsBase.js +31 -0
- package/lib/rest/Preview.d.ts +0 -5
- package/lib/rest/Preview.js +0 -7
- package/lib/rest/Twilio.d.ts +5 -0
- package/lib/rest/Twilio.js +6 -0
- package/lib/rest/accounts/V1.d.ts +10 -0
- package/lib/rest/accounts/V1.js +12 -0
- package/lib/rest/accounts/v1/bulkConsents.d.ts +53 -0
- package/lib/rest/accounts/v1/bulkConsents.js +74 -0
- package/lib/rest/accounts/v1/bulkContacts.d.ts +53 -0
- package/lib/rest/accounts/v1/bulkContacts.js +74 -0
- package/lib/rest/assistants/V1.d.ts +35 -0
- package/lib/rest/assistants/V1.js +60 -0
- package/lib/rest/assistants/v1/assistant/assistantsKnowledge.d.ts +260 -0
- package/lib/rest/assistants/v1/assistant/assistantsKnowledge.js +214 -0
- package/lib/rest/assistants/v1/assistant/assistantsTool.d.ts +266 -0
- package/lib/rest/assistants/v1/assistant/assistantsTool.js +216 -0
- package/lib/rest/assistants/v1/assistant/feedback.d.ts +231 -0
- package/lib/rest/assistants/v1/assistant/feedback.js +161 -0
- package/lib/rest/assistants/v1/assistant/message.d.ts +112 -0
- package/lib/rest/assistants/v1/assistant/message.js +90 -0
- package/lib/rest/assistants/v1/assistant.d.ts +504 -0
- package/lib/rest/assistants/v1/assistant.js +324 -0
- package/lib/rest/assistants/v1/knowledge/chunk.d.ts +167 -0
- package/lib/rest/assistants/v1/knowledge/chunk.js +130 -0
- package/lib/rest/assistants/v1/knowledge/knowledgeStatus.d.ts +101 -0
- package/lib/rest/assistants/v1/knowledge/knowledgeStatus.js +115 -0
- package/lib/rest/assistants/v1/knowledge.d.ts +399 -0
- package/lib/rest/assistants/v1/knowledge.js +288 -0
- package/lib/rest/assistants/v1/policy.d.ts +202 -0
- package/lib/rest/assistants/v1/policy.js +138 -0
- package/lib/rest/assistants/v1/session/message.d.ts +197 -0
- package/lib/rest/assistants/v1/session/message.js +140 -0
- package/lib/rest/assistants/v1/session.d.ts +231 -0
- package/lib/rest/assistants/v1/session.js +194 -0
- package/lib/rest/assistants/v1/tool.d.ts +445 -0
- package/lib/rest/assistants/v1/tool.js +269 -0
- package/lib/rest/content/v1/content/approvalFetch.d.ts +5 -5
- package/lib/rest/content/v1/content/approvalFetch.js +14 -14
- package/lib/rest/intelligence/v2/operatorType.d.ts +1 -1
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.d.ts +12 -18
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.js +3 -6
- package/lib/rest/marketplace/v1/moduleDataManagement.d.ts +14 -6
- package/lib/rest/marketplace/v1/moduleDataManagement.js +4 -0
- package/lib/rest/numbers/V1.d.ts +5 -5
- package/lib/rest/numbers/V1.js +6 -8
- package/lib/rest/numbers/v1/{portingWebhookConfigurationFetch.d.ts → webhook.d.ts} +10 -10
- package/lib/rest/numbers/v1/{portingWebhookConfigurationFetch.js → webhook.js} +6 -6
- package/lib/rest/numbers/v2/bundleClone.d.ts +1 -1
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +4 -4
- package/lib/rest/serverless/v1/service/environment/deployment.d.ts +2 -0
- package/lib/rest/serverless/v1/service/environment/deployment.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio - Assistants
|
|
9
|
+
* This is the public Twilio REST API.
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator.
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.ToolPage = exports.ToolListInstance = exports.ToolInstance = exports.ToolContextImpl = exports.AssistantsV1ServiceUpdateToolRequest = exports.AssistantsV1ServicePolicy = exports.AssistantsV1ServiceCreateToolRequest = exports.AssistantsV1ServiceCreatePolicyRequest = void 0;
|
|
20
|
+
const util_1 = require("util");
|
|
21
|
+
const Page_1 = __importDefault(require("../../../base/Page"));
|
|
22
|
+
const deserialize = require("../../../base/deserialize");
|
|
23
|
+
const serialize = require("../../../base/serialize");
|
|
24
|
+
const utility_1 = require("../../../base/utility");
|
|
25
|
+
class AssistantsV1ServiceCreatePolicyRequest {
|
|
26
|
+
}
|
|
27
|
+
exports.AssistantsV1ServiceCreatePolicyRequest = AssistantsV1ServiceCreatePolicyRequest;
|
|
28
|
+
class AssistantsV1ServiceCreateToolRequest {
|
|
29
|
+
}
|
|
30
|
+
exports.AssistantsV1ServiceCreateToolRequest = AssistantsV1ServiceCreateToolRequest;
|
|
31
|
+
class AssistantsV1ServicePolicy {
|
|
32
|
+
}
|
|
33
|
+
exports.AssistantsV1ServicePolicy = AssistantsV1ServicePolicy;
|
|
34
|
+
class AssistantsV1ServiceUpdateToolRequest {
|
|
35
|
+
}
|
|
36
|
+
exports.AssistantsV1ServiceUpdateToolRequest = AssistantsV1ServiceUpdateToolRequest;
|
|
37
|
+
class ToolContextImpl {
|
|
38
|
+
constructor(_version, id) {
|
|
39
|
+
this._version = _version;
|
|
40
|
+
if (!(0, utility_1.isValidPathParam)(id)) {
|
|
41
|
+
throw new Error("Parameter 'id' is not valid.");
|
|
42
|
+
}
|
|
43
|
+
this._solution = { id };
|
|
44
|
+
this._uri = `/Tools/${id}`;
|
|
45
|
+
}
|
|
46
|
+
remove(callback) {
|
|
47
|
+
const instance = this;
|
|
48
|
+
let operationVersion = instance._version, operationPromise = operationVersion.remove({
|
|
49
|
+
uri: instance._uri,
|
|
50
|
+
method: "delete",
|
|
51
|
+
});
|
|
52
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
53
|
+
return operationPromise;
|
|
54
|
+
}
|
|
55
|
+
fetch(callback) {
|
|
56
|
+
const instance = this;
|
|
57
|
+
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
58
|
+
uri: instance._uri,
|
|
59
|
+
method: "get",
|
|
60
|
+
});
|
|
61
|
+
operationPromise = operationPromise.then((payload) => new ToolInstance(operationVersion, payload, instance._solution.id));
|
|
62
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
63
|
+
return operationPromise;
|
|
64
|
+
}
|
|
65
|
+
update(params, callback) {
|
|
66
|
+
if (params instanceof Function) {
|
|
67
|
+
callback = params;
|
|
68
|
+
params = {};
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
params = params || {};
|
|
72
|
+
}
|
|
73
|
+
let data = {};
|
|
74
|
+
data = params;
|
|
75
|
+
const headers = {};
|
|
76
|
+
headers["Content-Type"] = "application/json";
|
|
77
|
+
const instance = this;
|
|
78
|
+
let operationVersion = instance._version, operationPromise = operationVersion.update({
|
|
79
|
+
uri: instance._uri,
|
|
80
|
+
method: "put",
|
|
81
|
+
data,
|
|
82
|
+
headers,
|
|
83
|
+
});
|
|
84
|
+
operationPromise = operationPromise.then((payload) => new ToolInstance(operationVersion, payload, instance._solution.id));
|
|
85
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
86
|
+
return operationPromise;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Provide a user-friendly representation
|
|
90
|
+
*
|
|
91
|
+
* @returns Object
|
|
92
|
+
*/
|
|
93
|
+
toJSON() {
|
|
94
|
+
return this._solution;
|
|
95
|
+
}
|
|
96
|
+
[util_1.inspect.custom](_depth, options) {
|
|
97
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.ToolContextImpl = ToolContextImpl;
|
|
101
|
+
class ToolInstance {
|
|
102
|
+
constructor(_version, payload, id) {
|
|
103
|
+
this._version = _version;
|
|
104
|
+
this.accountSid = payload.account_sid;
|
|
105
|
+
this.description = payload.description;
|
|
106
|
+
this.enabled = payload.enabled;
|
|
107
|
+
this.id = payload.id;
|
|
108
|
+
this.meta = payload.meta;
|
|
109
|
+
this.name = payload.name;
|
|
110
|
+
this.requiresAuth = payload.requires_auth;
|
|
111
|
+
this.type = payload.type;
|
|
112
|
+
this.url = payload.url;
|
|
113
|
+
this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
|
|
114
|
+
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
|
|
115
|
+
this.policies = payload.policies;
|
|
116
|
+
this._solution = { id: id || this.id };
|
|
117
|
+
}
|
|
118
|
+
get _proxy() {
|
|
119
|
+
this._context =
|
|
120
|
+
this._context || new ToolContextImpl(this._version, this._solution.id);
|
|
121
|
+
return this._context;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Remove a ToolInstance
|
|
125
|
+
*
|
|
126
|
+
* @param callback - Callback to handle processed record
|
|
127
|
+
*
|
|
128
|
+
* @returns Resolves to processed boolean
|
|
129
|
+
*/
|
|
130
|
+
remove(callback) {
|
|
131
|
+
return this._proxy.remove(callback);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Fetch a ToolInstance
|
|
135
|
+
*
|
|
136
|
+
* @param callback - Callback to handle processed record
|
|
137
|
+
*
|
|
138
|
+
* @returns Resolves to processed ToolInstance
|
|
139
|
+
*/
|
|
140
|
+
fetch(callback) {
|
|
141
|
+
return this._proxy.fetch(callback);
|
|
142
|
+
}
|
|
143
|
+
update(params, callback) {
|
|
144
|
+
return this._proxy.update(params, callback);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Provide a user-friendly representation
|
|
148
|
+
*
|
|
149
|
+
* @returns Object
|
|
150
|
+
*/
|
|
151
|
+
toJSON() {
|
|
152
|
+
return {
|
|
153
|
+
accountSid: this.accountSid,
|
|
154
|
+
description: this.description,
|
|
155
|
+
enabled: this.enabled,
|
|
156
|
+
id: this.id,
|
|
157
|
+
meta: this.meta,
|
|
158
|
+
name: this.name,
|
|
159
|
+
requiresAuth: this.requiresAuth,
|
|
160
|
+
type: this.type,
|
|
161
|
+
url: this.url,
|
|
162
|
+
dateCreated: this.dateCreated,
|
|
163
|
+
dateUpdated: this.dateUpdated,
|
|
164
|
+
policies: this.policies,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
[util_1.inspect.custom](_depth, options) {
|
|
168
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
exports.ToolInstance = ToolInstance;
|
|
172
|
+
function ToolListInstance(version) {
|
|
173
|
+
const instance = ((id) => instance.get(id));
|
|
174
|
+
instance.get = function get(id) {
|
|
175
|
+
return new ToolContextImpl(version, id);
|
|
176
|
+
};
|
|
177
|
+
instance._version = version;
|
|
178
|
+
instance._solution = {};
|
|
179
|
+
instance._uri = `/Tools`;
|
|
180
|
+
instance.create = function create(params, callback) {
|
|
181
|
+
if (params === null || params === undefined) {
|
|
182
|
+
throw new Error('Required parameter "params" missing.');
|
|
183
|
+
}
|
|
184
|
+
let data = {};
|
|
185
|
+
data = params;
|
|
186
|
+
const headers = {};
|
|
187
|
+
headers["Content-Type"] = "application/json";
|
|
188
|
+
let operationVersion = version, operationPromise = operationVersion.create({
|
|
189
|
+
uri: instance._uri,
|
|
190
|
+
method: "post",
|
|
191
|
+
data,
|
|
192
|
+
headers,
|
|
193
|
+
});
|
|
194
|
+
operationPromise = operationPromise.then((payload) => new ToolInstance(operationVersion, payload));
|
|
195
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
196
|
+
return operationPromise;
|
|
197
|
+
};
|
|
198
|
+
instance.page = function page(params, callback) {
|
|
199
|
+
if (params instanceof Function) {
|
|
200
|
+
callback = params;
|
|
201
|
+
params = {};
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
params = params || {};
|
|
205
|
+
}
|
|
206
|
+
let data = {};
|
|
207
|
+
if (params["assistantId"] !== undefined)
|
|
208
|
+
data["AssistantId"] = params["assistantId"];
|
|
209
|
+
if (params["pageSize"] !== undefined)
|
|
210
|
+
data["PageSize"] = params["pageSize"];
|
|
211
|
+
if (params.pageNumber !== undefined)
|
|
212
|
+
data["Page"] = params.pageNumber;
|
|
213
|
+
if (params.pageToken !== undefined)
|
|
214
|
+
data["PageToken"] = params.pageToken;
|
|
215
|
+
const headers = {};
|
|
216
|
+
let operationVersion = version, operationPromise = operationVersion.page({
|
|
217
|
+
uri: instance._uri,
|
|
218
|
+
method: "get",
|
|
219
|
+
params: data,
|
|
220
|
+
headers,
|
|
221
|
+
});
|
|
222
|
+
operationPromise = operationPromise.then((payload) => new ToolPage(operationVersion, payload, instance._solution));
|
|
223
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
224
|
+
return operationPromise;
|
|
225
|
+
};
|
|
226
|
+
instance.each = instance._version.each;
|
|
227
|
+
instance.list = instance._version.list;
|
|
228
|
+
instance.getPage = function getPage(targetUrl, callback) {
|
|
229
|
+
const operationPromise = instance._version._domain.twilio.request({
|
|
230
|
+
method: "get",
|
|
231
|
+
uri: targetUrl,
|
|
232
|
+
});
|
|
233
|
+
let pagePromise = operationPromise.then((payload) => new ToolPage(instance._version, payload, instance._solution));
|
|
234
|
+
pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
|
|
235
|
+
return pagePromise;
|
|
236
|
+
};
|
|
237
|
+
instance.toJSON = function toJSON() {
|
|
238
|
+
return instance._solution;
|
|
239
|
+
};
|
|
240
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
241
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
242
|
+
};
|
|
243
|
+
return instance;
|
|
244
|
+
}
|
|
245
|
+
exports.ToolListInstance = ToolListInstance;
|
|
246
|
+
class ToolPage extends Page_1.default {
|
|
247
|
+
/**
|
|
248
|
+
* Initialize the ToolPage
|
|
249
|
+
*
|
|
250
|
+
* @param version - Version of the resource
|
|
251
|
+
* @param response - Response from the API
|
|
252
|
+
* @param solution - Path solution
|
|
253
|
+
*/
|
|
254
|
+
constructor(version, response, solution) {
|
|
255
|
+
super(version, response, solution);
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Build an instance of ToolInstance
|
|
259
|
+
*
|
|
260
|
+
* @param payload - Payload response from the API
|
|
261
|
+
*/
|
|
262
|
+
getInstance(payload) {
|
|
263
|
+
return new ToolInstance(this._version, payload);
|
|
264
|
+
}
|
|
265
|
+
[util_1.inspect.custom](depth, options) {
|
|
266
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
exports.ToolPage = ToolPage;
|
|
@@ -17,13 +17,13 @@ export interface ApprovalFetchContext {
|
|
|
17
17
|
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
18
18
|
}
|
|
19
19
|
export interface ApprovalFetchContextSolution {
|
|
20
|
-
|
|
20
|
+
sid: string;
|
|
21
21
|
}
|
|
22
22
|
export declare class ApprovalFetchContextImpl implements ApprovalFetchContext {
|
|
23
23
|
protected _version: V1;
|
|
24
24
|
protected _solution: ApprovalFetchContextSolution;
|
|
25
25
|
protected _uri: string;
|
|
26
|
-
constructor(_version: V1,
|
|
26
|
+
constructor(_version: V1, sid: string);
|
|
27
27
|
fetch(callback?: (error: Error | null, item?: ApprovalFetchInstance) => any): Promise<ApprovalFetchInstance>;
|
|
28
28
|
/**
|
|
29
29
|
* Provide a user-friendly representation
|
|
@@ -43,7 +43,7 @@ export declare class ApprovalFetchInstance {
|
|
|
43
43
|
protected _version: V1;
|
|
44
44
|
protected _solution: ApprovalFetchContextSolution;
|
|
45
45
|
protected _context?: ApprovalFetchContext;
|
|
46
|
-
constructor(_version: V1, payload: ApprovalFetchResource,
|
|
46
|
+
constructor(_version: V1, payload: ApprovalFetchResource, sid: string);
|
|
47
47
|
/**
|
|
48
48
|
* The unique string that that we created to identify the Content resource.
|
|
49
49
|
*/
|
|
@@ -83,7 +83,7 @@ export declare class ApprovalFetchInstance {
|
|
|
83
83
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
84
84
|
}
|
|
85
85
|
export interface ApprovalFetchSolution {
|
|
86
|
-
|
|
86
|
+
sid: string;
|
|
87
87
|
}
|
|
88
88
|
export interface ApprovalFetchListInstance {
|
|
89
89
|
_version: V1;
|
|
@@ -97,5 +97,5 @@ export interface ApprovalFetchListInstance {
|
|
|
97
97
|
toJSON(): any;
|
|
98
98
|
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
99
99
|
}
|
|
100
|
-
export declare function ApprovalFetchListInstance(version: V1,
|
|
100
|
+
export declare function ApprovalFetchListInstance(version: V1, sid: string): ApprovalFetchListInstance;
|
|
101
101
|
export {};
|
|
@@ -19,13 +19,13 @@ const deserialize = require("../../../../base/deserialize");
|
|
|
19
19
|
const serialize = require("../../../../base/serialize");
|
|
20
20
|
const utility_1 = require("../../../../base/utility");
|
|
21
21
|
class ApprovalFetchContextImpl {
|
|
22
|
-
constructor(_version,
|
|
22
|
+
constructor(_version, sid) {
|
|
23
23
|
this._version = _version;
|
|
24
|
-
if (!(0, utility_1.isValidPathParam)(
|
|
25
|
-
throw new Error("Parameter '
|
|
24
|
+
if (!(0, utility_1.isValidPathParam)(sid)) {
|
|
25
|
+
throw new Error("Parameter 'sid' is not valid.");
|
|
26
26
|
}
|
|
27
|
-
this._solution = {
|
|
28
|
-
this._uri = `/Content/${
|
|
27
|
+
this._solution = { sid };
|
|
28
|
+
this._uri = `/Content/${sid}/ApprovalRequests`;
|
|
29
29
|
}
|
|
30
30
|
fetch(callback) {
|
|
31
31
|
const instance = this;
|
|
@@ -33,7 +33,7 @@ class ApprovalFetchContextImpl {
|
|
|
33
33
|
uri: instance._uri,
|
|
34
34
|
method: "get",
|
|
35
35
|
});
|
|
36
|
-
operationPromise = operationPromise.then((payload) => new ApprovalFetchInstance(operationVersion, payload, instance._solution.
|
|
36
|
+
operationPromise = operationPromise.then((payload) => new ApprovalFetchInstance(operationVersion, payload, instance._solution.sid));
|
|
37
37
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
38
38
|
return operationPromise;
|
|
39
39
|
}
|
|
@@ -51,18 +51,18 @@ class ApprovalFetchContextImpl {
|
|
|
51
51
|
}
|
|
52
52
|
exports.ApprovalFetchContextImpl = ApprovalFetchContextImpl;
|
|
53
53
|
class ApprovalFetchInstance {
|
|
54
|
-
constructor(_version, payload,
|
|
54
|
+
constructor(_version, payload, sid) {
|
|
55
55
|
this._version = _version;
|
|
56
56
|
this.sid = payload.sid;
|
|
57
57
|
this.accountSid = payload.account_sid;
|
|
58
58
|
this.whatsapp = payload.whatsapp;
|
|
59
59
|
this.url = payload.url;
|
|
60
|
-
this._solution = {
|
|
60
|
+
this._solution = { sid };
|
|
61
61
|
}
|
|
62
62
|
get _proxy() {
|
|
63
63
|
this._context =
|
|
64
64
|
this._context ||
|
|
65
|
-
new ApprovalFetchContextImpl(this._version, this._solution.
|
|
65
|
+
new ApprovalFetchContextImpl(this._version, this._solution.sid);
|
|
66
66
|
return this._context;
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
@@ -93,16 +93,16 @@ class ApprovalFetchInstance {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
exports.ApprovalFetchInstance = ApprovalFetchInstance;
|
|
96
|
-
function ApprovalFetchListInstance(version,
|
|
97
|
-
if (!(0, utility_1.isValidPathParam)(
|
|
98
|
-
throw new Error("Parameter '
|
|
96
|
+
function ApprovalFetchListInstance(version, sid) {
|
|
97
|
+
if (!(0, utility_1.isValidPathParam)(sid)) {
|
|
98
|
+
throw new Error("Parameter 'sid' is not valid.");
|
|
99
99
|
}
|
|
100
100
|
const instance = (() => instance.get());
|
|
101
101
|
instance.get = function get() {
|
|
102
|
-
return new ApprovalFetchContextImpl(version,
|
|
102
|
+
return new ApprovalFetchContextImpl(version, sid);
|
|
103
103
|
};
|
|
104
104
|
instance._version = version;
|
|
105
|
-
instance._solution = {
|
|
105
|
+
instance._solution = { sid };
|
|
106
106
|
instance._uri = ``;
|
|
107
107
|
instance.toJSON = function toJSON() {
|
|
108
108
|
return instance._solution;
|
|
@@ -3,7 +3,7 @@ import { inspect, InspectOptions } from "util";
|
|
|
3
3
|
import Page, { TwilioResponsePayload } from "../../../base/Page";
|
|
4
4
|
import Response from "../../../http/response";
|
|
5
5
|
import V2 from "../V2";
|
|
6
|
-
export type OperatorTypeAvailability = "internal" | "beta" | "
|
|
6
|
+
export type OperatorTypeAvailability = "internal" | "beta" | "general-availability" | "retired" | "deprecated";
|
|
7
7
|
export type OperatorTypeOutputType = "text-classification" | "text-extraction" | "text-extraction-normalized" | "text-generation";
|
|
8
8
|
export type OperatorTypeProvider = "twilio" | "amazon" | "openai";
|
|
9
9
|
/**
|
|
@@ -1,32 +1,26 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { inspect, InspectOptions } from "util";
|
|
3
3
|
import V1 from "../../V1";
|
|
4
|
-
export declare class
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
"quantity"?: number;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
"sid"?: string;
|
|
4
|
+
export declare class MarketplaceV1InstalledAddOnInstalledAddOnUsage {
|
|
13
5
|
/**
|
|
14
|
-
*
|
|
6
|
+
* Total amount in local currency that was billed in this request. Aggregates all billable_items that were successfully submitted.
|
|
15
7
|
*/
|
|
16
|
-
"
|
|
17
|
-
}
|
|
18
|
-
export declare class MarketplaceV1InstalledAddOnInstalledAddOnUsage {
|
|
8
|
+
"totalSubmitted"?: number;
|
|
19
9
|
"billableItems": Array<MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems>;
|
|
20
10
|
}
|
|
21
11
|
export declare class MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems {
|
|
22
12
|
/**
|
|
23
|
-
*
|
|
13
|
+
* Total amount in local currency that was billed for this Billing Item. Can be any floating number greater than 0.
|
|
24
14
|
*/
|
|
25
15
|
"quantity": number;
|
|
26
16
|
/**
|
|
27
17
|
* BillingSid to use for billing.
|
|
28
18
|
*/
|
|
29
19
|
"sid": string;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the billing event was successfully generated for this Billable Item.
|
|
22
|
+
*/
|
|
23
|
+
"submitted"?: boolean;
|
|
30
24
|
}
|
|
31
25
|
/**
|
|
32
26
|
* Options to pass to create a InstalledAddOnUsageInstance
|
|
@@ -59,25 +53,25 @@ export interface InstalledAddOnUsageListInstance {
|
|
|
59
53
|
}
|
|
60
54
|
export declare function InstalledAddOnUsageListInstance(version: V1, installedAddOnSid: string): InstalledAddOnUsageListInstance;
|
|
61
55
|
interface InstalledAddOnUsageResource {
|
|
62
|
-
billable_items: Array<MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems>;
|
|
63
56
|
total_submitted: number;
|
|
57
|
+
billable_items: Array<MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems>;
|
|
64
58
|
}
|
|
65
59
|
export declare class InstalledAddOnUsageInstance {
|
|
66
60
|
protected _version: V1;
|
|
67
61
|
constructor(_version: V1, payload: InstalledAddOnUsageResource, installedAddOnSid: string);
|
|
68
|
-
billableItems: Array<MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems>;
|
|
69
62
|
/**
|
|
70
|
-
*
|
|
63
|
+
* Total amount in local currency that was billed in this request. Aggregates all billable_items that were successfully submitted.
|
|
71
64
|
*/
|
|
72
65
|
totalSubmitted: number;
|
|
66
|
+
billableItems: Array<MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems>;
|
|
73
67
|
/**
|
|
74
68
|
* Provide a user-friendly representation
|
|
75
69
|
*
|
|
76
70
|
* @returns Object
|
|
77
71
|
*/
|
|
78
72
|
toJSON(): {
|
|
79
|
-
billableItems: MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems[];
|
|
80
73
|
totalSubmitted: number;
|
|
74
|
+
billableItems: MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems[];
|
|
81
75
|
};
|
|
82
76
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
83
77
|
}
|
|
@@ -13,14 +13,11 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.InstalledAddOnUsageInstance = exports.InstalledAddOnUsageListInstance = exports.MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems = exports.MarketplaceV1InstalledAddOnInstalledAddOnUsage =
|
|
16
|
+
exports.InstalledAddOnUsageInstance = exports.InstalledAddOnUsageListInstance = exports.MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems = exports.MarketplaceV1InstalledAddOnInstalledAddOnUsage = void 0;
|
|
17
17
|
const util_1 = require("util");
|
|
18
18
|
const deserialize = require("../../../../base/deserialize");
|
|
19
19
|
const serialize = require("../../../../base/serialize");
|
|
20
20
|
const utility_1 = require("../../../../base/utility");
|
|
21
|
-
class MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems {
|
|
22
|
-
}
|
|
23
|
-
exports.MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems = MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems;
|
|
24
21
|
class MarketplaceV1InstalledAddOnInstalledAddOnUsage {
|
|
25
22
|
}
|
|
26
23
|
exports.MarketplaceV1InstalledAddOnInstalledAddOnUsage = MarketplaceV1InstalledAddOnInstalledAddOnUsage;
|
|
@@ -65,8 +62,8 @@ exports.InstalledAddOnUsageListInstance = InstalledAddOnUsageListInstance;
|
|
|
65
62
|
class InstalledAddOnUsageInstance {
|
|
66
63
|
constructor(_version, payload, installedAddOnSid) {
|
|
67
64
|
this._version = _version;
|
|
68
|
-
this.billableItems = payload.billable_items;
|
|
69
65
|
this.totalSubmitted = payload.total_submitted;
|
|
66
|
+
this.billableItems = payload.billable_items;
|
|
70
67
|
}
|
|
71
68
|
/**
|
|
72
69
|
* Provide a user-friendly representation
|
|
@@ -75,8 +72,8 @@ class InstalledAddOnUsageInstance {
|
|
|
75
72
|
*/
|
|
76
73
|
toJSON() {
|
|
77
74
|
return {
|
|
78
|
-
billableItems: this.billableItems,
|
|
79
75
|
totalSubmitted: this.totalSubmitted,
|
|
76
|
+
billableItems: this.billableItems,
|
|
80
77
|
};
|
|
81
78
|
}
|
|
82
79
|
[util_1.inspect.custom](_depth, options) {
|
|
@@ -5,18 +5,20 @@ import V1 from "../V1";
|
|
|
5
5
|
* Options to pass to update a ModuleDataManagementInstance
|
|
6
6
|
*/
|
|
7
7
|
export interface ModuleDataManagementContextUpdateOptions {
|
|
8
|
-
/**
|
|
8
|
+
/** A JSON object containing essential attributes that define a Listing. */
|
|
9
9
|
moduleInfo?: string;
|
|
10
|
-
/**
|
|
10
|
+
/** A JSON object describing the Listing. You can define the main body of the description, highlight key features or aspects of the Listing, and provide code samples for developers if applicable. */
|
|
11
11
|
description?: string;
|
|
12
|
-
/**
|
|
12
|
+
/** A JSON object for providing comprehensive information, instructions, and resources related to the Listing. */
|
|
13
13
|
documentation?: string;
|
|
14
|
-
/**
|
|
14
|
+
/** A JSON object describing the Listing\\\'s privacy and legal policies. The maximum file size for Policies is 5MB. */
|
|
15
15
|
policies?: string;
|
|
16
|
-
/**
|
|
16
|
+
/** A JSON object containing information on how Marketplace users can obtain support for the Listing. Use this parameter to provide details such as contact information and support description. */
|
|
17
17
|
support?: string;
|
|
18
|
-
/**
|
|
18
|
+
/** A JSON object for providing Listing-specific configuration. Contains button setup, notification URL, and more. */
|
|
19
19
|
configuration?: string;
|
|
20
|
+
/** A JSON object for providing Listing\\\'s purchase options. */
|
|
21
|
+
pricing?: string;
|
|
20
22
|
}
|
|
21
23
|
export interface ModuleDataManagementContext {
|
|
22
24
|
/**
|
|
@@ -77,6 +79,7 @@ interface ModuleDataManagementResource {
|
|
|
77
79
|
module_info: any;
|
|
78
80
|
documentation: any;
|
|
79
81
|
configuration: any;
|
|
82
|
+
pricing: any;
|
|
80
83
|
}
|
|
81
84
|
export declare class ModuleDataManagementInstance {
|
|
82
85
|
protected _version: V1;
|
|
@@ -115,6 +118,10 @@ export declare class ModuleDataManagementInstance {
|
|
|
115
118
|
* A JSON object for providing listing specific configuration. Contains button setup, notification url, among others.
|
|
116
119
|
*/
|
|
117
120
|
configuration: any;
|
|
121
|
+
/**
|
|
122
|
+
* A JSON object for providing Listing specific pricing information.
|
|
123
|
+
*/
|
|
124
|
+
pricing: any;
|
|
118
125
|
private get _proxy();
|
|
119
126
|
/**
|
|
120
127
|
* Fetch a ModuleDataManagementInstance
|
|
@@ -155,6 +162,7 @@ export declare class ModuleDataManagementInstance {
|
|
|
155
162
|
moduleInfo: any;
|
|
156
163
|
documentation: any;
|
|
157
164
|
configuration: any;
|
|
165
|
+
pricing: any;
|
|
158
166
|
};
|
|
159
167
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
160
168
|
}
|
|
@@ -58,6 +58,8 @@ class ModuleDataManagementContextImpl {
|
|
|
58
58
|
data["Support"] = params["support"];
|
|
59
59
|
if (params["configuration"] !== undefined)
|
|
60
60
|
data["Configuration"] = params["configuration"];
|
|
61
|
+
if (params["pricing"] !== undefined)
|
|
62
|
+
data["Pricing"] = params["pricing"];
|
|
61
63
|
const headers = {};
|
|
62
64
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
63
65
|
const instance = this;
|
|
@@ -95,6 +97,7 @@ class ModuleDataManagementInstance {
|
|
|
95
97
|
this.moduleInfo = payload.module_info;
|
|
96
98
|
this.documentation = payload.documentation;
|
|
97
99
|
this.configuration = payload.configuration;
|
|
100
|
+
this.pricing = payload.pricing;
|
|
98
101
|
this._solution = { sid: sid || this.sid };
|
|
99
102
|
}
|
|
100
103
|
get _proxy() {
|
|
@@ -131,6 +134,7 @@ class ModuleDataManagementInstance {
|
|
|
131
134
|
moduleInfo: this.moduleInfo,
|
|
132
135
|
documentation: this.documentation,
|
|
133
136
|
configuration: this.configuration,
|
|
137
|
+
pricing: this.pricing,
|
|
134
138
|
};
|
|
135
139
|
}
|
|
136
140
|
[util_1.inspect.custom](_depth, options) {
|
package/lib/rest/numbers/V1.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import { PortingPortInPhoneNumberListInstance } from "./v1/portingPortInPhoneNum
|
|
|
7
7
|
import { PortingPortabilityListInstance } from "./v1/portingPortability";
|
|
8
8
|
import { PortingWebhookConfigurationListInstance } from "./v1/portingWebhookConfiguration";
|
|
9
9
|
import { PortingWebhookConfigurationDeleteListInstance } from "./v1/portingWebhookConfigurationDelete";
|
|
10
|
-
import { PortingWebhookConfigurationFetchListInstance } from "./v1/portingWebhookConfigurationFetch";
|
|
11
10
|
import { SigningRequestConfigurationListInstance } from "./v1/signingRequestConfiguration";
|
|
11
|
+
import { WebhookListInstance } from "./v1/webhook";
|
|
12
12
|
export default class V1 extends Version {
|
|
13
13
|
/**
|
|
14
14
|
* Initialize the V1 version of Numbers
|
|
@@ -30,10 +30,10 @@ export default class V1 extends Version {
|
|
|
30
30
|
protected _portingWebhookConfigurations?: PortingWebhookConfigurationListInstance;
|
|
31
31
|
/** portingWebhookConfigurationsDelete - { Twilio.Numbers.V1.PortingWebhookConfigurationDeleteListInstance } resource */
|
|
32
32
|
protected _portingWebhookConfigurationsDelete?: PortingWebhookConfigurationDeleteListInstance;
|
|
33
|
-
/** portingWebhookConfigurationFetch - { Twilio.Numbers.V1.PortingWebhookConfigurationFetchListInstance } resource */
|
|
34
|
-
protected _portingWebhookConfigurationFetch?: PortingWebhookConfigurationFetchListInstance;
|
|
35
33
|
/** signingRequestConfigurations - { Twilio.Numbers.V1.SigningRequestConfigurationListInstance } resource */
|
|
36
34
|
protected _signingRequestConfigurations?: SigningRequestConfigurationListInstance;
|
|
35
|
+
/** webhook - { Twilio.Numbers.V1.WebhookListInstance } resource */
|
|
36
|
+
protected _webhook?: WebhookListInstance;
|
|
37
37
|
/** Getter for bulkEligibilities resource */
|
|
38
38
|
get bulkEligibilities(): BulkEligibilityListInstance;
|
|
39
39
|
/** Getter for eligibilities resource */
|
|
@@ -48,8 +48,8 @@ export default class V1 extends Version {
|
|
|
48
48
|
get portingWebhookConfigurations(): PortingWebhookConfigurationListInstance;
|
|
49
49
|
/** Getter for portingWebhookConfigurationsDelete resource */
|
|
50
50
|
get portingWebhookConfigurationsDelete(): PortingWebhookConfigurationDeleteListInstance;
|
|
51
|
-
/** Getter for portingWebhookConfigurationFetch resource */
|
|
52
|
-
get portingWebhookConfigurationFetch(): PortingWebhookConfigurationFetchListInstance;
|
|
53
51
|
/** Getter for signingRequestConfigurations resource */
|
|
54
52
|
get signingRequestConfigurations(): SigningRequestConfigurationListInstance;
|
|
53
|
+
/** Getter for webhook resource */
|
|
54
|
+
get webhook(): WebhookListInstance;
|
|
55
55
|
}
|
package/lib/rest/numbers/V1.js
CHANGED
|
@@ -24,8 +24,8 @@ const portingPortInPhoneNumber_1 = require("./v1/portingPortInPhoneNumber");
|
|
|
24
24
|
const portingPortability_1 = require("./v1/portingPortability");
|
|
25
25
|
const portingWebhookConfiguration_1 = require("./v1/portingWebhookConfiguration");
|
|
26
26
|
const portingWebhookConfigurationDelete_1 = require("./v1/portingWebhookConfigurationDelete");
|
|
27
|
-
const portingWebhookConfigurationFetch_1 = require("./v1/portingWebhookConfigurationFetch");
|
|
28
27
|
const signingRequestConfiguration_1 = require("./v1/signingRequestConfiguration");
|
|
28
|
+
const webhook_1 = require("./v1/webhook");
|
|
29
29
|
class V1 extends Version_1.default {
|
|
30
30
|
/**
|
|
31
31
|
* Initialize the V1 version of Numbers
|
|
@@ -79,13 +79,6 @@ class V1 extends Version_1.default {
|
|
|
79
79
|
(0, portingWebhookConfigurationDelete_1.PortingWebhookConfigurationDeleteListInstance)(this);
|
|
80
80
|
return this._portingWebhookConfigurationsDelete;
|
|
81
81
|
}
|
|
82
|
-
/** Getter for portingWebhookConfigurationFetch resource */
|
|
83
|
-
get portingWebhookConfigurationFetch() {
|
|
84
|
-
this._portingWebhookConfigurationFetch =
|
|
85
|
-
this._portingWebhookConfigurationFetch ||
|
|
86
|
-
(0, portingWebhookConfigurationFetch_1.PortingWebhookConfigurationFetchListInstance)(this);
|
|
87
|
-
return this._portingWebhookConfigurationFetch;
|
|
88
|
-
}
|
|
89
82
|
/** Getter for signingRequestConfigurations resource */
|
|
90
83
|
get signingRequestConfigurations() {
|
|
91
84
|
this._signingRequestConfigurations =
|
|
@@ -93,5 +86,10 @@ class V1 extends Version_1.default {
|
|
|
93
86
|
(0, signingRequestConfiguration_1.SigningRequestConfigurationListInstance)(this);
|
|
94
87
|
return this._signingRequestConfigurations;
|
|
95
88
|
}
|
|
89
|
+
/** Getter for webhook resource */
|
|
90
|
+
get webhook() {
|
|
91
|
+
this._webhook = this._webhook || (0, webhook_1.WebhookListInstance)(this);
|
|
92
|
+
return this._webhook;
|
|
93
|
+
}
|
|
96
94
|
}
|
|
97
95
|
exports.default = V1;
|