twilio 5.3.0 → 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/Twilio.d.ts +5 -0
- package/lib/rest/Twilio.js +6 -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/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/v2/bundleClone.d.ts +1 -1
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +4 -4
- package/package.json +1 -1
|
@@ -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) {
|
|
@@ -8,7 +8,7 @@ export type BundleCloneStatus = "draft" | "pending-review" | "in-review" | "twil
|
|
|
8
8
|
export interface BundleCloneContextCreateOptions {
|
|
9
9
|
/** The SID of the [Account](https://www.twilio.com/docs/iam/api/account) where the bundle needs to be cloned. */
|
|
10
10
|
targetAccountSid: string;
|
|
11
|
-
/**
|
|
11
|
+
/** If set to true, the cloned bundle will be in the DRAFT state, else it will be twilio-approved */
|
|
12
12
|
moveToDraft?: boolean;
|
|
13
13
|
/** The string that you assigned to describe the cloned bundle. */
|
|
14
14
|
friendlyName?: string;
|
|
@@ -40,7 +40,7 @@ export interface BundleListInstanceCreateOptions {
|
|
|
40
40
|
isoCountry?: string;
|
|
41
41
|
/** */
|
|
42
42
|
endUserType?: BundleEndUserType;
|
|
43
|
-
/** The type of phone number of the Bundle\\\'s ownership request. Can be `local`, `mobile`, `national`, or `toll
|
|
43
|
+
/** The type of phone number of the Bundle\\\'s ownership request. Can be `local`, `mobile`, `national`, or `toll-free`. */
|
|
44
44
|
numberType?: string;
|
|
45
45
|
/** Indicates that Bundle is a Test Bundle and will be Auto-Rejected */
|
|
46
46
|
isTest?: boolean;
|
|
@@ -57,7 +57,7 @@ export interface BundleListInstanceEachOptions {
|
|
|
57
57
|
regulationSid?: string;
|
|
58
58
|
/** The 2-digit [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Bundle\'s phone number country ownership request. */
|
|
59
59
|
isoCountry?: string;
|
|
60
|
-
/** The type of phone number of the Bundle\'s ownership request. Can be `local`, `mobile`, `national`, or `
|
|
60
|
+
/** The type of phone number of the Bundle\'s ownership request. Can be `local`, `mobile`, `national`, or `toll-free`. */
|
|
61
61
|
numberType?: string;
|
|
62
62
|
/** Indicates that the Bundle is a valid Bundle until a specified expiration date. */
|
|
63
63
|
hasValidUntilDate?: boolean;
|
|
@@ -92,7 +92,7 @@ export interface BundleListInstanceOptions {
|
|
|
92
92
|
regulationSid?: string;
|
|
93
93
|
/** The 2-digit [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Bundle\'s phone number country ownership request. */
|
|
94
94
|
isoCountry?: string;
|
|
95
|
-
/** The type of phone number of the Bundle\'s ownership request. Can be `local`, `mobile`, `national`, or `
|
|
95
|
+
/** The type of phone number of the Bundle\'s ownership request. Can be `local`, `mobile`, `national`, or `toll-free`. */
|
|
96
96
|
numberType?: string;
|
|
97
97
|
/** Indicates that the Bundle is a valid Bundle until a specified expiration date. */
|
|
98
98
|
hasValidUntilDate?: boolean;
|
|
@@ -123,7 +123,7 @@ export interface BundleListInstancePageOptions {
|
|
|
123
123
|
regulationSid?: string;
|
|
124
124
|
/** The 2-digit [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Bundle\'s phone number country ownership request. */
|
|
125
125
|
isoCountry?: string;
|
|
126
|
-
/** The type of phone number of the Bundle\'s ownership request. Can be `local`, `mobile`, `national`, or `
|
|
126
|
+
/** The type of phone number of the Bundle\'s ownership request. Can be `local`, `mobile`, `national`, or `toll-free`. */
|
|
127
127
|
numberType?: string;
|
|
128
128
|
/** Indicates that the Bundle is a valid Bundle until a specified expiration date. */
|
|
129
129
|
hasValidUntilDate?: boolean;
|