twilio 5.1.0 → 5.1.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/Marketplace.d.ts +4 -0
- package/lib/rest/Marketplace.js +8 -0
- package/lib/rest/MarketplaceBase.d.ts +13 -0
- package/lib/rest/MarketplaceBase.js +31 -0
- package/lib/rest/Twilio.d.ts +5 -0
- package/lib/rest/Twilio.js +6 -0
- package/lib/rest/api/v2010/account/message.d.ts +2 -2
- package/lib/rest/content/v1/content/approvalCreate.d.ts +13 -18
- package/lib/rest/content/v1/content/approvalCreate.js +14 -16
- 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 +11 -159
- package/lib/rest/content/v1/content.js +7 -93
- package/lib/rest/content/v1/contentAndApprovals.d.ts +1 -1
- package/lib/rest/content/v1/legacyContent.d.ts +1 -1
- package/lib/rest/content/v2/content.d.ts +54 -0
- package/lib/rest/content/v2/content.js +18 -0
- package/lib/rest/content/v2/contentAndApprovals.d.ts +54 -0
- package/lib/rest/content/v2/contentAndApprovals.js +18 -0
- package/lib/rest/marketplace/V1.d.ts +25 -0
- package/lib/rest/marketplace/V1.js +51 -0
- package/lib/rest/marketplace/v1/availableAddOn/availableAddOnExtension.d.ts +219 -0
- package/lib/rest/marketplace/v1/availableAddOn/availableAddOnExtension.js +187 -0
- package/lib/rest/marketplace/v1/availableAddOn.d.ts +231 -0
- package/lib/rest/marketplace/v1/availableAddOn.js +196 -0
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnExtension.d.ts +251 -0
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnExtension.js +214 -0
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.d.ts +84 -0
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.js +86 -0
- package/lib/rest/marketplace/v1/installedAddOn.d.ts +340 -0
- package/lib/rest/marketplace/v1/installedAddOn.js +294 -0
- package/lib/rest/marketplace/v1/moduleDataManagement.d.ts +147 -0
- package/lib/rest/marketplace/v1/moduleDataManagement.js +153 -0
- package/lib/rest/messaging/v1/tollfreeVerification.d.ts +13 -1
- package/lib/rest/messaging/v1/tollfreeVerification.js +4 -0
- package/lib/rest/numbers/V1.d.ts +5 -0
- package/lib/rest/numbers/V1.js +8 -0
- package/lib/rest/numbers/v1/signingRequestConfiguration.d.ts +100 -0
- package/lib/rest/numbers/v1/signingRequestConfiguration.js +89 -0
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
const MarketplaceBase_1 = __importDefault(require("./MarketplaceBase"));
|
|
6
|
+
class Marketplace extends MarketplaceBase_1.default {
|
|
7
|
+
}
|
|
8
|
+
module.exports = Marketplace;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Domain from "../base/Domain";
|
|
2
|
+
import V1 from "./marketplace/V1";
|
|
3
|
+
declare class MarketplaceBase extends Domain {
|
|
4
|
+
_v1?: V1;
|
|
5
|
+
/**
|
|
6
|
+
* Initialize marketplace domain
|
|
7
|
+
*
|
|
8
|
+
* @param twilio - The twilio client
|
|
9
|
+
*/
|
|
10
|
+
constructor(twilio: any);
|
|
11
|
+
get v1(): V1;
|
|
12
|
+
}
|
|
13
|
+
export = MarketplaceBase;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator.
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
+
};
|
|
15
|
+
const Domain_1 = __importDefault(require("../base/Domain"));
|
|
16
|
+
const V1_1 = __importDefault(require("./marketplace/V1"));
|
|
17
|
+
class MarketplaceBase extends Domain_1.default {
|
|
18
|
+
/**
|
|
19
|
+
* Initialize marketplace domain
|
|
20
|
+
*
|
|
21
|
+
* @param twilio - The twilio client
|
|
22
|
+
*/
|
|
23
|
+
constructor(twilio) {
|
|
24
|
+
super(twilio, "https://marketplace.twilio.com");
|
|
25
|
+
}
|
|
26
|
+
get v1() {
|
|
27
|
+
this._v1 = this._v1 || new V1_1.default(this);
|
|
28
|
+
return this._v1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
module.exports = MarketplaceBase;
|
package/lib/rest/Twilio.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import Insights from "./Insights";
|
|
|
12
12
|
import Intelligence from "./Intelligence";
|
|
13
13
|
import IpMessaging from "./IpMessaging";
|
|
14
14
|
import Lookups from "./Lookups";
|
|
15
|
+
import Marketplace from "./Marketplace";
|
|
15
16
|
import Messaging from "./Messaging";
|
|
16
17
|
import Microvisor from "./Microvisor";
|
|
17
18
|
import Monitor from "./Monitor";
|
|
@@ -87,6 +88,8 @@ declare class Twilio extends Client {
|
|
|
87
88
|
_ipMessaging?: IpMessaging;
|
|
88
89
|
/** (Twilio.Lookups) - lookups domain */
|
|
89
90
|
_lookups?: Lookups;
|
|
91
|
+
/** (Twilio.Marketplace) - marketplace domain */
|
|
92
|
+
_marketplace?: Marketplace;
|
|
90
93
|
/** (Twilio.Messaging) - messaging domain */
|
|
91
94
|
_messaging?: Messaging;
|
|
92
95
|
/** (Twilio.Microvisor) - microvisor domain */
|
|
@@ -167,6 +170,8 @@ declare class Twilio extends Client {
|
|
|
167
170
|
get ipMessaging(): IpMessaging;
|
|
168
171
|
/** Getter for (Twilio.Lookups) domain */
|
|
169
172
|
get lookups(): Lookups;
|
|
173
|
+
/** Getter for (Twilio.Marketplace) domain */
|
|
174
|
+
get marketplace(): Marketplace;
|
|
170
175
|
/** Getter for (Twilio.Messaging) domain */
|
|
171
176
|
get messaging(): Messaging;
|
|
172
177
|
/** Getter for (Twilio.Microvisor) domain */
|
package/lib/rest/Twilio.js
CHANGED
|
@@ -45,6 +45,7 @@ class Twilio extends BaseTwilio_1.Client {
|
|
|
45
45
|
this.intelligence;
|
|
46
46
|
this.ipMessaging;
|
|
47
47
|
this.lookups;
|
|
48
|
+
this.marketplace;
|
|
48
49
|
this.messaging;
|
|
49
50
|
this.microvisor;
|
|
50
51
|
this.monitor;
|
|
@@ -126,6 +127,11 @@ class Twilio extends BaseTwilio_1.Client {
|
|
|
126
127
|
get lookups() {
|
|
127
128
|
return this._lookups ?? (this._lookups = new (require("./Lookups"))(this));
|
|
128
129
|
}
|
|
130
|
+
/** Getter for (Twilio.Marketplace) domain */
|
|
131
|
+
get marketplace() {
|
|
132
|
+
return (this._marketplace ??
|
|
133
|
+
(this._marketplace = new (require("./Marketplace"))(this)));
|
|
134
|
+
}
|
|
129
135
|
/** Getter for (Twilio.Messaging) domain */
|
|
130
136
|
get messaging() {
|
|
131
137
|
return (this._messaging ?? (this._messaging = new (require("./Messaging"))(this)));
|
|
@@ -31,13 +31,13 @@ export interface MessageListInstanceCreateOptions {
|
|
|
31
31
|
statusCallback?: string;
|
|
32
32
|
/** The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App\\\'s `message_status_callback` URL. Note that the `status_callback` parameter of a request takes priority over the `application_sid` parameter; if both are included `application_sid` is ignored. */
|
|
33
33
|
applicationSid?: string;
|
|
34
|
-
/** [
|
|
34
|
+
/** [OBSOLETE] This parameter will no longer have any effect as of 2024-06-03. */
|
|
35
35
|
maxPrice?: number;
|
|
36
36
|
/** Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`. */
|
|
37
37
|
provideFeedback?: boolean;
|
|
38
38
|
/** Total number of attempts made (including this request) to send the message regardless of the provider used */
|
|
39
39
|
attempt?: number;
|
|
40
|
-
/** The maximum length in seconds that the Message can remain in Twilio\\\'s outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `
|
|
40
|
+
/** The maximum length in seconds that the Message can remain in Twilio\\\'s outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `36000`. Default value is `36000`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html) */
|
|
41
41
|
validityPeriod?: number;
|
|
42
42
|
/** Reserved */
|
|
43
43
|
forceDelivery?: boolean;
|
|
@@ -1,33 +1,28 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { inspect, InspectOptions } from "util";
|
|
3
3
|
import V1 from "../../V1";
|
|
4
|
-
/**
|
|
5
|
-
* Content approval request body
|
|
6
|
-
*/
|
|
7
|
-
export declare class ContentApprovalRequest {
|
|
8
|
-
/**
|
|
9
|
-
* Name of the template.
|
|
10
|
-
*/
|
|
11
|
-
"name": string;
|
|
12
|
-
/**
|
|
13
|
-
* A WhatsApp recognized template category.
|
|
14
|
-
*/
|
|
15
|
-
"category": string;
|
|
16
|
-
}
|
|
17
4
|
/**
|
|
18
5
|
* Options to pass to create a ApprovalCreateInstance
|
|
19
6
|
*/
|
|
20
7
|
export interface ApprovalCreateListInstanceCreateOptions {
|
|
21
8
|
/** */
|
|
22
|
-
|
|
9
|
+
body?: object;
|
|
23
10
|
}
|
|
24
11
|
export interface ApprovalCreateSolution {
|
|
25
|
-
|
|
12
|
+
sid: string;
|
|
26
13
|
}
|
|
27
14
|
export interface ApprovalCreateListInstance {
|
|
28
15
|
_version: V1;
|
|
29
16
|
_solution: ApprovalCreateSolution;
|
|
30
17
|
_uri: string;
|
|
18
|
+
/**
|
|
19
|
+
* Create a ApprovalCreateInstance
|
|
20
|
+
*
|
|
21
|
+
* @param callback - Callback to handle processed record
|
|
22
|
+
*
|
|
23
|
+
* @returns Resolves to processed ApprovalCreateInstance
|
|
24
|
+
*/
|
|
25
|
+
create(callback?: (error: Error | null, item?: ApprovalCreateInstance) => any): Promise<ApprovalCreateInstance>;
|
|
31
26
|
/**
|
|
32
27
|
* Create a ApprovalCreateInstance
|
|
33
28
|
*
|
|
@@ -36,14 +31,14 @@ export interface ApprovalCreateListInstance {
|
|
|
36
31
|
*
|
|
37
32
|
* @returns Resolves to processed ApprovalCreateInstance
|
|
38
33
|
*/
|
|
39
|
-
create(params:
|
|
34
|
+
create(params: object, callback?: (error: Error | null, item?: ApprovalCreateInstance) => any): Promise<ApprovalCreateInstance>;
|
|
40
35
|
/**
|
|
41
36
|
* Provide a user-friendly representation
|
|
42
37
|
*/
|
|
43
38
|
toJSON(): any;
|
|
44
39
|
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
45
40
|
}
|
|
46
|
-
export declare function ApprovalCreateListInstance(version: V1,
|
|
41
|
+
export declare function ApprovalCreateListInstance(version: V1, sid: string): ApprovalCreateListInstance;
|
|
47
42
|
interface ApprovalCreateResource {
|
|
48
43
|
name: string;
|
|
49
44
|
category: string;
|
|
@@ -54,7 +49,7 @@ interface ApprovalCreateResource {
|
|
|
54
49
|
}
|
|
55
50
|
export declare class ApprovalCreateInstance {
|
|
56
51
|
protected _version: V1;
|
|
57
|
-
constructor(_version: V1, payload: ApprovalCreateResource,
|
|
52
|
+
constructor(_version: V1, payload: ApprovalCreateResource, sid: string);
|
|
58
53
|
name: string;
|
|
59
54
|
category: string;
|
|
60
55
|
contentType: string;
|
|
@@ -13,28 +13,26 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.ApprovalCreateInstance = exports.ApprovalCreateListInstance =
|
|
16
|
+
exports.ApprovalCreateInstance = exports.ApprovalCreateListInstance = 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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class ContentApprovalRequest {
|
|
25
|
-
}
|
|
26
|
-
exports.ContentApprovalRequest = ContentApprovalRequest;
|
|
27
|
-
function ApprovalCreateListInstance(version, contentSid) {
|
|
28
|
-
if (!(0, utility_1.isValidPathParam)(contentSid)) {
|
|
29
|
-
throw new Error("Parameter 'contentSid' is not valid.");
|
|
21
|
+
function ApprovalCreateListInstance(version, sid) {
|
|
22
|
+
if (!(0, utility_1.isValidPathParam)(sid)) {
|
|
23
|
+
throw new Error("Parameter 'sid' is not valid.");
|
|
30
24
|
}
|
|
31
25
|
const instance = {};
|
|
32
26
|
instance._version = version;
|
|
33
|
-
instance._solution = {
|
|
34
|
-
instance._uri = `/Content/${
|
|
27
|
+
instance._solution = { sid };
|
|
28
|
+
instance._uri = `/Content/${sid}/ApprovalRequests/whatsapp`;
|
|
35
29
|
instance.create = function create(params, callback) {
|
|
36
|
-
if (params
|
|
37
|
-
|
|
30
|
+
if (params instanceof Function) {
|
|
31
|
+
callback = params;
|
|
32
|
+
params = {};
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
params = params || {};
|
|
38
36
|
}
|
|
39
37
|
let data = {};
|
|
40
38
|
data = params;
|
|
@@ -46,7 +44,7 @@ function ApprovalCreateListInstance(version, contentSid) {
|
|
|
46
44
|
data,
|
|
47
45
|
headers,
|
|
48
46
|
});
|
|
49
|
-
operationPromise = operationPromise.then((payload) => new ApprovalCreateInstance(operationVersion, payload, instance._solution.
|
|
47
|
+
operationPromise = operationPromise.then((payload) => new ApprovalCreateInstance(operationVersion, payload, instance._solution.sid));
|
|
50
48
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
51
49
|
return operationPromise;
|
|
52
50
|
};
|
|
@@ -60,7 +58,7 @@ function ApprovalCreateListInstance(version, contentSid) {
|
|
|
60
58
|
}
|
|
61
59
|
exports.ApprovalCreateListInstance = ApprovalCreateListInstance;
|
|
62
60
|
class ApprovalCreateInstance {
|
|
63
|
-
constructor(_version, payload,
|
|
61
|
+
constructor(_version, payload, sid) {
|
|
64
62
|
this._version = _version;
|
|
65
63
|
this.name = payload.name;
|
|
66
64
|
this.category = payload.category;
|
|
@@ -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;
|
|
@@ -5,168 +5,12 @@ import Response from "../../../http/response";
|
|
|
5
5
|
import V1 from "../V1";
|
|
6
6
|
import { ApprovalCreateListInstance } from "./content/approvalCreate";
|
|
7
7
|
import { ApprovalFetchListInstance } from "./content/approvalFetch";
|
|
8
|
-
export declare class AuthenticationAction {
|
|
9
|
-
"type": AuthenticationActionType;
|
|
10
|
-
"copyCodeText": string;
|
|
11
|
-
}
|
|
12
|
-
export type AuthenticationActionType = "COPY_CODE";
|
|
13
|
-
export declare class CallToActionAction {
|
|
14
|
-
"type": CallToActionActionType;
|
|
15
|
-
"title": string;
|
|
16
|
-
"url"?: string;
|
|
17
|
-
"phone"?: string;
|
|
18
|
-
"id"?: string;
|
|
19
|
-
}
|
|
20
|
-
export type CallToActionActionType = "URL" | "PHONE_NUMBER";
|
|
21
|
-
export declare class CardAction {
|
|
22
|
-
"type": CardActionType;
|
|
23
|
-
"title": string;
|
|
24
|
-
"url"?: string;
|
|
25
|
-
"phone"?: string;
|
|
26
|
-
"id"?: string;
|
|
27
|
-
}
|
|
28
|
-
export type CardActionType = "URL" | "PHONE_NUMBER" | "QUICK_REPLY";
|
|
29
|
-
export declare class CatalogItem {
|
|
30
|
-
"id"?: string;
|
|
31
|
-
"sectionTitle"?: string;
|
|
32
|
-
"name"?: string;
|
|
33
|
-
"mediaUrl"?: string;
|
|
34
|
-
"price"?: number;
|
|
35
|
-
"description"?: string;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Content creation request body
|
|
39
|
-
*/
|
|
40
|
-
export declare class ContentCreateRequest {
|
|
41
|
-
/**
|
|
42
|
-
* User defined name of the content
|
|
43
|
-
*/
|
|
44
|
-
"friendlyName"?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Key value pairs of variable name to value
|
|
47
|
-
*/
|
|
48
|
-
"variables"?: {
|
|
49
|
-
[key: string]: string;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Language code for the content
|
|
53
|
-
*/
|
|
54
|
-
"language": string;
|
|
55
|
-
"types": Types;
|
|
56
|
-
}
|
|
57
|
-
export declare class ListItem {
|
|
58
|
-
"id": string;
|
|
59
|
-
"item": string;
|
|
60
|
-
"description"?: string;
|
|
61
|
-
}
|
|
62
|
-
export declare class QuickReplyAction {
|
|
63
|
-
"type": QuickReplyActionType;
|
|
64
|
-
"title": string;
|
|
65
|
-
"id"?: string;
|
|
66
|
-
}
|
|
67
|
-
export type QuickReplyActionType = "QUICK_REPLY";
|
|
68
|
-
/**
|
|
69
|
-
* twilio/call-to-action buttons let recipients tap to trigger actions such as launching a website or making a phone call.
|
|
70
|
-
*/
|
|
71
|
-
export declare class TwilioCallToAction {
|
|
72
|
-
"body"?: string;
|
|
73
|
-
"actions"?: Array<CallToActionAction>;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* twilio/card is a structured template which can be used to send a series of related information. It must include a title and at least one additional field.
|
|
77
|
-
*/
|
|
78
|
-
export declare class TwilioCard {
|
|
79
|
-
"title": string;
|
|
80
|
-
"subtitle"?: string;
|
|
81
|
-
"media"?: Array<string>;
|
|
82
|
-
"actions"?: Array<CardAction>;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* twilio/catalog type lets recipients view list of catalog products, ask questions about products, order products.
|
|
86
|
-
*/
|
|
87
|
-
export declare class TwilioCatalog {
|
|
88
|
-
"title"?: string;
|
|
89
|
-
"body": string;
|
|
90
|
-
"subtitle"?: string;
|
|
91
|
-
"id"?: string;
|
|
92
|
-
"items"?: Array<CatalogItem>;
|
|
93
|
-
"dynamicItems"?: string;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* twilio/list-picker includes a menu of up to 10 options, which offers a simple way for users to make a selection.
|
|
97
|
-
*/
|
|
98
|
-
export declare class TwilioListPicker {
|
|
99
|
-
"body": string;
|
|
100
|
-
"button": string;
|
|
101
|
-
"items": Array<ListItem>;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* twilio/location type contains a location pin and an optional label, which can be used to enhance delivery notifications or connect recipients to physical experiences you offer.
|
|
105
|
-
*/
|
|
106
|
-
export declare class TwilioLocation {
|
|
107
|
-
"latitude": number;
|
|
108
|
-
"longitude": number;
|
|
109
|
-
"label"?: string;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* twilio/media is used to send file attachments, or to send long text via MMS in the US and Canada. As such, the twilio/media type must contain at least ONE of text or media content.
|
|
113
|
-
*/
|
|
114
|
-
export declare class TwilioMedia {
|
|
115
|
-
"body"?: string;
|
|
116
|
-
"media": Array<string>;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* twilio/quick-reply templates let recipients tap, rather than type, to respond to the message.
|
|
120
|
-
*/
|
|
121
|
-
export declare class TwilioQuickReply {
|
|
122
|
-
"body": string;
|
|
123
|
-
"actions": Array<QuickReplyAction>;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Type containing only plain text-based content
|
|
127
|
-
*/
|
|
128
|
-
export declare class TwilioText {
|
|
129
|
-
"body": string;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Content types
|
|
133
|
-
*/
|
|
134
|
-
export declare class Types {
|
|
135
|
-
"twilioText"?: TwilioText | null;
|
|
136
|
-
"twilioMedia"?: TwilioMedia | null;
|
|
137
|
-
"twilioLocation"?: TwilioLocation | null;
|
|
138
|
-
"twilioListPicker"?: TwilioListPicker | null;
|
|
139
|
-
"twilioCallToAction"?: TwilioCallToAction | null;
|
|
140
|
-
"twilioQuickReply"?: TwilioQuickReply | null;
|
|
141
|
-
"twilioCard"?: TwilioCard | null;
|
|
142
|
-
"twilioCatalog"?: TwilioCatalog | null;
|
|
143
|
-
"whatsappCard"?: WhatsappCard | null;
|
|
144
|
-
"whatsappAuthentication"?: WhatsappAuthentication | null;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* whatsApp/authentication templates let companies deliver WA approved one-time-password button.
|
|
148
|
-
*/
|
|
149
|
-
export declare class WhatsappAuthentication {
|
|
150
|
-
"addSecurityRecommendation"?: boolean;
|
|
151
|
-
"codeExpirationMinutes"?: number;
|
|
152
|
-
"actions": Array<AuthenticationAction>;
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* whatsapp/card is a structured template which can be used to send a series of related information. It must include a body and at least one additional field.
|
|
156
|
-
*/
|
|
157
|
-
export declare class WhatsappCard {
|
|
158
|
-
"body": string;
|
|
159
|
-
"footer"?: string;
|
|
160
|
-
"media"?: Array<string>;
|
|
161
|
-
"headerText"?: string;
|
|
162
|
-
"actions"?: Array<CardAction>;
|
|
163
|
-
}
|
|
164
8
|
/**
|
|
165
9
|
* Options to pass to create a ContentInstance
|
|
166
10
|
*/
|
|
167
11
|
export interface ContentListInstanceCreateOptions {
|
|
168
12
|
/** */
|
|
169
|
-
|
|
13
|
+
body?: object;
|
|
170
14
|
}
|
|
171
15
|
/**
|
|
172
16
|
* Options to pass to each
|
|
@@ -297,7 +141,7 @@ export declare class ContentInstance {
|
|
|
297
141
|
*/
|
|
298
142
|
variables: any;
|
|
299
143
|
/**
|
|
300
|
-
* The [Content types](https://www.twilio.com/docs/content
|
|
144
|
+
* The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
|
|
301
145
|
*/
|
|
302
146
|
types: any;
|
|
303
147
|
/**
|
|
@@ -360,6 +204,14 @@ export interface ContentListInstance {
|
|
|
360
204
|
_uri: string;
|
|
361
205
|
(sid: string): ContentContext;
|
|
362
206
|
get(sid: string): ContentContext;
|
|
207
|
+
/**
|
|
208
|
+
* Create a ContentInstance
|
|
209
|
+
*
|
|
210
|
+
* @param callback - Callback to handle processed record
|
|
211
|
+
*
|
|
212
|
+
* @returns Resolves to processed ContentInstance
|
|
213
|
+
*/
|
|
214
|
+
create(callback?: (error: Error | null, item?: ContentInstance) => any): Promise<ContentInstance>;
|
|
363
215
|
/**
|
|
364
216
|
* Create a ContentInstance
|
|
365
217
|
*
|
|
@@ -368,7 +220,7 @@ export interface ContentListInstance {
|
|
|
368
220
|
*
|
|
369
221
|
* @returns Resolves to processed ContentInstance
|
|
370
222
|
*/
|
|
371
|
-
create(params:
|
|
223
|
+
create(params: object, callback?: (error: Error | null, item?: ContentInstance) => any): Promise<ContentInstance>;
|
|
372
224
|
/**
|
|
373
225
|
* Streams ContentInstance records from the API.
|
|
374
226
|
*
|