twilio 5.2.3 → 5.3.1
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/Iam.d.ts +4 -0
- package/lib/rest/Iam.js +8 -0
- package/lib/rest/IamBase.d.ts +13 -0
- package/lib/rest/IamBase.js +31 -0
- package/lib/rest/Twilio.d.ts +10 -0
- package/lib/rest/Twilio.js +11 -0
- package/lib/rest/assistants/V1.d.ts +35 -0
- package/lib/rest/assistants/V1.js +60 -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.d.ts +466 -0
- package/lib/rest/assistants/v1/assistant.js +284 -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.d.ts +385 -0
- package/lib/rest/assistants/v1/knowledge.js +273 -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 +378 -0
- package/lib/rest/assistants/v1/tool.js +242 -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/content/v1/content.d.ts +33 -3
- package/lib/rest/content/v1/content.js +16 -1
- package/lib/rest/iam/V1.d.ts +25 -0
- package/lib/rest/iam/V1.js +48 -0
- package/lib/rest/iam/v1/apiKey.d.ts +167 -0
- package/lib/rest/iam/v1/apiKey.js +161 -0
- package/lib/rest/iam/v1/getApiKeys.d.ts +163 -0
- package/lib/rest/iam/v1/getApiKeys.js +124 -0
- package/lib/rest/iam/v1/newApiKey.d.ts +90 -0
- package/lib/rest/iam/v1/newApiKey.js +90 -0
- 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/portingPortIn.js +1 -1
- package/lib/rest/numbers/v2/bundleClone.d.ts +1 -1
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +4 -4
- package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +6 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js +2 -0
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.d.ts +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { inspect, InspectOptions } from "util";
|
|
3
|
+
import Page, { TwilioResponsePayload } from "../../../base/Page";
|
|
4
|
+
import Response from "../../../http/response";
|
|
5
|
+
import V1 from "../V1";
|
|
6
|
+
/**
|
|
7
|
+
* Options to pass to each
|
|
8
|
+
*/
|
|
9
|
+
export interface GetApiKeysListInstanceEachOptions {
|
|
10
|
+
/** The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. */
|
|
11
|
+
accountSid: string;
|
|
12
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
13
|
+
pageSize?: number;
|
|
14
|
+
/** Function to process each record. If this and a positional callback are passed, this one will be used */
|
|
15
|
+
callback?: (item: GetApiKeysInstance, done: (err?: Error) => void) => void;
|
|
16
|
+
/** Function to be called upon completion of streaming */
|
|
17
|
+
done?: Function;
|
|
18
|
+
/** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
|
|
19
|
+
limit?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Options to pass to list
|
|
23
|
+
*/
|
|
24
|
+
export interface GetApiKeysListInstanceOptions {
|
|
25
|
+
/** The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. */
|
|
26
|
+
accountSid: string;
|
|
27
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
28
|
+
pageSize?: number;
|
|
29
|
+
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
|
|
30
|
+
limit?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Options to pass to page
|
|
34
|
+
*/
|
|
35
|
+
export interface GetApiKeysListInstancePageOptions {
|
|
36
|
+
/** The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. */
|
|
37
|
+
accountSid: string;
|
|
38
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
39
|
+
pageSize?: number;
|
|
40
|
+
/** Page Number, this value is simply for client state */
|
|
41
|
+
pageNumber?: number;
|
|
42
|
+
/** PageToken provided by the API */
|
|
43
|
+
pageToken?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface GetApiKeysSolution {
|
|
46
|
+
}
|
|
47
|
+
export interface GetApiKeysListInstance {
|
|
48
|
+
_version: V1;
|
|
49
|
+
_solution: GetApiKeysSolution;
|
|
50
|
+
_uri: string;
|
|
51
|
+
/**
|
|
52
|
+
* Streams GetApiKeysInstance records from the API.
|
|
53
|
+
*
|
|
54
|
+
* This operation lazily loads records as efficiently as possible until the limit
|
|
55
|
+
* is reached.
|
|
56
|
+
*
|
|
57
|
+
* The results are passed into the callback function, so this operation is memory
|
|
58
|
+
* efficient.
|
|
59
|
+
*
|
|
60
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
61
|
+
* function.
|
|
62
|
+
*
|
|
63
|
+
* @param { GetApiKeysListInstanceEachOptions } [params] - Options for request
|
|
64
|
+
* @param { function } [callback] - Function to process each record
|
|
65
|
+
*/
|
|
66
|
+
each(params: GetApiKeysListInstanceEachOptions, callback?: (item: GetApiKeysInstance, done: (err?: Error) => void) => void): void;
|
|
67
|
+
/**
|
|
68
|
+
* Retrieve a single target page of GetApiKeysInstance records from the API.
|
|
69
|
+
*
|
|
70
|
+
* The request is executed immediately.
|
|
71
|
+
*
|
|
72
|
+
* @param { string } [targetUrl] - API-generated URL for the requested results page
|
|
73
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
74
|
+
*/
|
|
75
|
+
getPage(targetUrl: string, callback?: (error: Error | null, items: GetApiKeysPage) => any): Promise<GetApiKeysPage>;
|
|
76
|
+
/**
|
|
77
|
+
* Lists GetApiKeysInstance records from the API as a list.
|
|
78
|
+
*
|
|
79
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
80
|
+
* function.
|
|
81
|
+
*
|
|
82
|
+
* @param { GetApiKeysListInstanceOptions } [params] - Options for request
|
|
83
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
84
|
+
*/
|
|
85
|
+
list(params: GetApiKeysListInstanceOptions, callback?: (error: Error | null, items: GetApiKeysInstance[]) => any): Promise<GetApiKeysInstance[]>;
|
|
86
|
+
/**
|
|
87
|
+
* Retrieve a single page of GetApiKeysInstance records from the API.
|
|
88
|
+
*
|
|
89
|
+
* The request is executed immediately.
|
|
90
|
+
*
|
|
91
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
92
|
+
* function.
|
|
93
|
+
*
|
|
94
|
+
* @param { GetApiKeysListInstancePageOptions } [params] - Options for request
|
|
95
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
96
|
+
*/
|
|
97
|
+
page(params: GetApiKeysListInstancePageOptions, callback?: (error: Error | null, items: GetApiKeysPage) => any): Promise<GetApiKeysPage>;
|
|
98
|
+
/**
|
|
99
|
+
* Provide a user-friendly representation
|
|
100
|
+
*/
|
|
101
|
+
toJSON(): any;
|
|
102
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
103
|
+
}
|
|
104
|
+
export declare function GetApiKeysListInstance(version: V1): GetApiKeysListInstance;
|
|
105
|
+
interface GetApiKeysPayload extends TwilioResponsePayload {
|
|
106
|
+
keys: GetApiKeysResource[];
|
|
107
|
+
}
|
|
108
|
+
interface GetApiKeysResource {
|
|
109
|
+
sid: string;
|
|
110
|
+
friendly_name: string;
|
|
111
|
+
date_created: Date;
|
|
112
|
+
date_updated: Date;
|
|
113
|
+
}
|
|
114
|
+
export declare class GetApiKeysInstance {
|
|
115
|
+
protected _version: V1;
|
|
116
|
+
constructor(_version: V1, payload: GetApiKeysResource);
|
|
117
|
+
/**
|
|
118
|
+
* The unique string that we created to identify the Key resource.
|
|
119
|
+
*/
|
|
120
|
+
sid: string;
|
|
121
|
+
/**
|
|
122
|
+
* The string that you assigned to describe the resource.
|
|
123
|
+
*/
|
|
124
|
+
friendlyName: string;
|
|
125
|
+
/**
|
|
126
|
+
* The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
127
|
+
*/
|
|
128
|
+
dateCreated: Date;
|
|
129
|
+
/**
|
|
130
|
+
* The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
131
|
+
*/
|
|
132
|
+
dateUpdated: Date;
|
|
133
|
+
/**
|
|
134
|
+
* Provide a user-friendly representation
|
|
135
|
+
*
|
|
136
|
+
* @returns Object
|
|
137
|
+
*/
|
|
138
|
+
toJSON(): {
|
|
139
|
+
sid: string;
|
|
140
|
+
friendlyName: string;
|
|
141
|
+
dateCreated: Date;
|
|
142
|
+
dateUpdated: Date;
|
|
143
|
+
};
|
|
144
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
145
|
+
}
|
|
146
|
+
export declare class GetApiKeysPage extends Page<V1, GetApiKeysPayload, GetApiKeysResource, GetApiKeysInstance> {
|
|
147
|
+
/**
|
|
148
|
+
* Initialize the GetApiKeysPage
|
|
149
|
+
*
|
|
150
|
+
* @param version - Version of the resource
|
|
151
|
+
* @param response - Response from the API
|
|
152
|
+
* @param solution - Path solution
|
|
153
|
+
*/
|
|
154
|
+
constructor(version: V1, response: Response<string>, solution: GetApiKeysSolution);
|
|
155
|
+
/**
|
|
156
|
+
* Build an instance of GetApiKeysInstance
|
|
157
|
+
*
|
|
158
|
+
* @param payload - Payload response from the API
|
|
159
|
+
*/
|
|
160
|
+
getInstance(payload: GetApiKeysResource): GetApiKeysInstance;
|
|
161
|
+
[inspect.custom](depth: any, options: InspectOptions): string;
|
|
162
|
+
}
|
|
163
|
+
export {};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio - Iam
|
|
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.GetApiKeysPage = exports.GetApiKeysInstance = exports.GetApiKeysListInstance = 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
|
+
function GetApiKeysListInstance(version) {
|
|
25
|
+
const instance = {};
|
|
26
|
+
instance._version = version;
|
|
27
|
+
instance._solution = {};
|
|
28
|
+
instance._uri = `/Keys`;
|
|
29
|
+
instance.page = function page(params, callback) {
|
|
30
|
+
if (params === null || params === undefined) {
|
|
31
|
+
throw new Error('Required parameter "params" missing.');
|
|
32
|
+
}
|
|
33
|
+
if (params["accountSid"] === null || params["accountSid"] === undefined) {
|
|
34
|
+
throw new Error("Required parameter \"params['accountSid']\" missing.");
|
|
35
|
+
}
|
|
36
|
+
let data = {};
|
|
37
|
+
data["AccountSid"] = params["accountSid"];
|
|
38
|
+
if (params["pageSize"] !== undefined)
|
|
39
|
+
data["PageSize"] = params["pageSize"];
|
|
40
|
+
if (params.pageNumber !== undefined)
|
|
41
|
+
data["Page"] = params.pageNumber;
|
|
42
|
+
if (params.pageToken !== undefined)
|
|
43
|
+
data["PageToken"] = params.pageToken;
|
|
44
|
+
const headers = {};
|
|
45
|
+
let operationVersion = version, operationPromise = operationVersion.page({
|
|
46
|
+
uri: instance._uri,
|
|
47
|
+
method: "get",
|
|
48
|
+
params: data,
|
|
49
|
+
headers,
|
|
50
|
+
});
|
|
51
|
+
operationPromise = operationPromise.then((payload) => new GetApiKeysPage(operationVersion, payload, instance._solution));
|
|
52
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
53
|
+
return operationPromise;
|
|
54
|
+
};
|
|
55
|
+
instance.each = instance._version.each;
|
|
56
|
+
instance.list = instance._version.list;
|
|
57
|
+
instance.getPage = function getPage(targetUrl, callback) {
|
|
58
|
+
const operationPromise = instance._version._domain.twilio.request({
|
|
59
|
+
method: "get",
|
|
60
|
+
uri: targetUrl,
|
|
61
|
+
});
|
|
62
|
+
let pagePromise = operationPromise.then((payload) => new GetApiKeysPage(instance._version, payload, instance._solution));
|
|
63
|
+
pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
|
|
64
|
+
return pagePromise;
|
|
65
|
+
};
|
|
66
|
+
instance.toJSON = function toJSON() {
|
|
67
|
+
return instance._solution;
|
|
68
|
+
};
|
|
69
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
70
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
71
|
+
};
|
|
72
|
+
return instance;
|
|
73
|
+
}
|
|
74
|
+
exports.GetApiKeysListInstance = GetApiKeysListInstance;
|
|
75
|
+
class GetApiKeysInstance {
|
|
76
|
+
constructor(_version, payload) {
|
|
77
|
+
this._version = _version;
|
|
78
|
+
this.sid = payload.sid;
|
|
79
|
+
this.friendlyName = payload.friendly_name;
|
|
80
|
+
this.dateCreated = deserialize.rfc2822DateTime(payload.date_created);
|
|
81
|
+
this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Provide a user-friendly representation
|
|
85
|
+
*
|
|
86
|
+
* @returns Object
|
|
87
|
+
*/
|
|
88
|
+
toJSON() {
|
|
89
|
+
return {
|
|
90
|
+
sid: this.sid,
|
|
91
|
+
friendlyName: this.friendlyName,
|
|
92
|
+
dateCreated: this.dateCreated,
|
|
93
|
+
dateUpdated: this.dateUpdated,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
[util_1.inspect.custom](_depth, options) {
|
|
97
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.GetApiKeysInstance = GetApiKeysInstance;
|
|
101
|
+
class GetApiKeysPage extends Page_1.default {
|
|
102
|
+
/**
|
|
103
|
+
* Initialize the GetApiKeysPage
|
|
104
|
+
*
|
|
105
|
+
* @param version - Version of the resource
|
|
106
|
+
* @param response - Response from the API
|
|
107
|
+
* @param solution - Path solution
|
|
108
|
+
*/
|
|
109
|
+
constructor(version, response, solution) {
|
|
110
|
+
super(version, response, solution);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Build an instance of GetApiKeysInstance
|
|
114
|
+
*
|
|
115
|
+
* @param payload - Payload response from the API
|
|
116
|
+
*/
|
|
117
|
+
getInstance(payload) {
|
|
118
|
+
return new GetApiKeysInstance(this._version, payload);
|
|
119
|
+
}
|
|
120
|
+
[util_1.inspect.custom](depth, options) {
|
|
121
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.GetApiKeysPage = GetApiKeysPage;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { inspect, InspectOptions } from "util";
|
|
3
|
+
import V1 from "../V1";
|
|
4
|
+
export type NewApiKeyKeytype = "restricted";
|
|
5
|
+
/**
|
|
6
|
+
* Options to pass to create a NewApiKeyInstance
|
|
7
|
+
*/
|
|
8
|
+
export interface NewApiKeyListInstanceCreateOptions {
|
|
9
|
+
/** The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. */
|
|
10
|
+
accountSid: string;
|
|
11
|
+
/** A descriptive string that you create to describe the resource. It can be up to 64 characters long. */
|
|
12
|
+
friendlyName?: string;
|
|
13
|
+
/** */
|
|
14
|
+
keyType?: NewApiKeyKeytype;
|
|
15
|
+
/** The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys). */
|
|
16
|
+
policy?: any;
|
|
17
|
+
}
|
|
18
|
+
export interface NewApiKeySolution {
|
|
19
|
+
}
|
|
20
|
+
export interface NewApiKeyListInstance {
|
|
21
|
+
_version: V1;
|
|
22
|
+
_solution: NewApiKeySolution;
|
|
23
|
+
_uri: string;
|
|
24
|
+
/**
|
|
25
|
+
* Create a NewApiKeyInstance
|
|
26
|
+
*
|
|
27
|
+
* @param params - Parameter for request
|
|
28
|
+
* @param callback - Callback to handle processed record
|
|
29
|
+
*
|
|
30
|
+
* @returns Resolves to processed NewApiKeyInstance
|
|
31
|
+
*/
|
|
32
|
+
create(params: NewApiKeyListInstanceCreateOptions, callback?: (error: Error | null, item?: NewApiKeyInstance) => any): Promise<NewApiKeyInstance>;
|
|
33
|
+
/**
|
|
34
|
+
* Provide a user-friendly representation
|
|
35
|
+
*/
|
|
36
|
+
toJSON(): any;
|
|
37
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
38
|
+
}
|
|
39
|
+
export declare function NewApiKeyListInstance(version: V1): NewApiKeyListInstance;
|
|
40
|
+
interface NewApiKeyResource {
|
|
41
|
+
sid: string;
|
|
42
|
+
friendly_name: string;
|
|
43
|
+
date_created: Date;
|
|
44
|
+
date_updated: Date;
|
|
45
|
+
secret: string;
|
|
46
|
+
policy: any;
|
|
47
|
+
}
|
|
48
|
+
export declare class NewApiKeyInstance {
|
|
49
|
+
protected _version: V1;
|
|
50
|
+
constructor(_version: V1, payload: NewApiKeyResource);
|
|
51
|
+
/**
|
|
52
|
+
* The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API.
|
|
53
|
+
*/
|
|
54
|
+
sid: string;
|
|
55
|
+
/**
|
|
56
|
+
* The string that you assigned to describe the resource.
|
|
57
|
+
*/
|
|
58
|
+
friendlyName: string;
|
|
59
|
+
/**
|
|
60
|
+
* The date and time in GMT that the API Key was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
61
|
+
*/
|
|
62
|
+
dateCreated: Date;
|
|
63
|
+
/**
|
|
64
|
+
* The date and time in GMT that the new API Key was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
65
|
+
*/
|
|
66
|
+
dateUpdated: Date;
|
|
67
|
+
/**
|
|
68
|
+
* The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.**
|
|
69
|
+
*/
|
|
70
|
+
secret: string;
|
|
71
|
+
/**
|
|
72
|
+
* Collection of allow assertions.
|
|
73
|
+
*/
|
|
74
|
+
policy: any;
|
|
75
|
+
/**
|
|
76
|
+
* Provide a user-friendly representation
|
|
77
|
+
*
|
|
78
|
+
* @returns Object
|
|
79
|
+
*/
|
|
80
|
+
toJSON(): {
|
|
81
|
+
sid: string;
|
|
82
|
+
friendlyName: string;
|
|
83
|
+
dateCreated: Date;
|
|
84
|
+
dateUpdated: Date;
|
|
85
|
+
secret: string;
|
|
86
|
+
policy: any;
|
|
87
|
+
};
|
|
88
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
89
|
+
}
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio - Iam
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.NewApiKeyInstance = exports.NewApiKeyListInstance = void 0;
|
|
17
|
+
const util_1 = require("util");
|
|
18
|
+
const deserialize = require("../../../base/deserialize");
|
|
19
|
+
const serialize = require("../../../base/serialize");
|
|
20
|
+
function NewApiKeyListInstance(version) {
|
|
21
|
+
const instance = {};
|
|
22
|
+
instance._version = version;
|
|
23
|
+
instance._solution = {};
|
|
24
|
+
instance._uri = `/Keys`;
|
|
25
|
+
instance.create = function create(params, callback) {
|
|
26
|
+
if (params === null || params === undefined) {
|
|
27
|
+
throw new Error('Required parameter "params" missing.');
|
|
28
|
+
}
|
|
29
|
+
if (params["accountSid"] === null || params["accountSid"] === undefined) {
|
|
30
|
+
throw new Error("Required parameter \"params['accountSid']\" missing.");
|
|
31
|
+
}
|
|
32
|
+
let data = {};
|
|
33
|
+
data["AccountSid"] = params["accountSid"];
|
|
34
|
+
if (params["friendlyName"] !== undefined)
|
|
35
|
+
data["FriendlyName"] = params["friendlyName"];
|
|
36
|
+
if (params["keyType"] !== undefined)
|
|
37
|
+
data["KeyType"] = params["keyType"];
|
|
38
|
+
if (params["policy"] !== undefined)
|
|
39
|
+
data["Policy"] = serialize.object(params["policy"]);
|
|
40
|
+
const headers = {};
|
|
41
|
+
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
42
|
+
let operationVersion = version, operationPromise = operationVersion.create({
|
|
43
|
+
uri: instance._uri,
|
|
44
|
+
method: "post",
|
|
45
|
+
data,
|
|
46
|
+
headers,
|
|
47
|
+
});
|
|
48
|
+
operationPromise = operationPromise.then((payload) => new NewApiKeyInstance(operationVersion, payload));
|
|
49
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
50
|
+
return operationPromise;
|
|
51
|
+
};
|
|
52
|
+
instance.toJSON = function toJSON() {
|
|
53
|
+
return instance._solution;
|
|
54
|
+
};
|
|
55
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
56
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
57
|
+
};
|
|
58
|
+
return instance;
|
|
59
|
+
}
|
|
60
|
+
exports.NewApiKeyListInstance = NewApiKeyListInstance;
|
|
61
|
+
class NewApiKeyInstance {
|
|
62
|
+
constructor(_version, payload) {
|
|
63
|
+
this._version = _version;
|
|
64
|
+
this.sid = payload.sid;
|
|
65
|
+
this.friendlyName = payload.friendly_name;
|
|
66
|
+
this.dateCreated = deserialize.rfc2822DateTime(payload.date_created);
|
|
67
|
+
this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated);
|
|
68
|
+
this.secret = payload.secret;
|
|
69
|
+
this.policy = payload.policy;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Provide a user-friendly representation
|
|
73
|
+
*
|
|
74
|
+
* @returns Object
|
|
75
|
+
*/
|
|
76
|
+
toJSON() {
|
|
77
|
+
return {
|
|
78
|
+
sid: this.sid,
|
|
79
|
+
friendlyName: this.friendlyName,
|
|
80
|
+
dateCreated: this.dateCreated,
|
|
81
|
+
dateUpdated: this.dateUpdated,
|
|
82
|
+
secret: this.secret,
|
|
83
|
+
policy: this.policy,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
[util_1.inspect.custom](_depth, options) {
|
|
87
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.NewApiKeyInstance = NewApiKeyInstance;
|
|
@@ -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) {
|
|
@@ -73,7 +73,7 @@ class PortingPortInInstance {
|
|
|
73
73
|
this.losingCarrierInformation = payload.losing_carrier_information;
|
|
74
74
|
this.phoneNumbers = payload.phone_numbers;
|
|
75
75
|
this.documents = payload.documents;
|
|
76
|
-
this.dateCreated = deserialize.
|
|
76
|
+
this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
|
|
77
77
|
this._solution = {
|
|
78
78
|
portInRequestSid: portInRequestSid || this.portInRequestSid,
|
|
79
79
|
};
|