twilio 5.0.3 → 5.1.0

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.
Files changed (79) hide show
  1. package/README.md +1 -0
  2. package/lib/rest/ContentBase.d.ts +3 -0
  3. package/lib/rest/ContentBase.js +5 -0
  4. package/lib/rest/Twilio.d.ts +0 -5
  5. package/lib/rest/Twilio.js +0 -6
  6. package/lib/rest/api/v2010/account/call/stream.d.ts +5 -5
  7. package/lib/rest/api/v2010/account/message.d.ts +1 -1
  8. package/lib/rest/content/V2.d.ts +20 -0
  9. package/lib/rest/content/V2.js +43 -0
  10. package/lib/rest/content/v2/content.d.ts +196 -0
  11. package/lib/rest/content/v2/content.js +136 -0
  12. package/lib/rest/content/v2/contentAndApprovals.d.ts +190 -0
  13. package/lib/rest/content/v2/contentAndApprovals.js +134 -0
  14. package/lib/rest/flexApi/V2.d.ts +5 -0
  15. package/lib/rest/flexApi/V2.js +6 -0
  16. package/lib/rest/flexApi/v1/interaction.d.ts +1 -1
  17. package/lib/rest/flexApi/v1/interaction.js +2 -4
  18. package/lib/rest/flexApi/v1/plugin/pluginVersions.d.ts +4 -1
  19. package/lib/rest/flexApi/v1/plugin/pluginVersions.js +2 -0
  20. package/lib/rest/flexApi/v2/flexUser.d.ts +170 -0
  21. package/lib/rest/flexApi/v2/flexUser.js +142 -0
  22. package/lib/rest/flexApi/v2/webChannels.d.ts +2 -0
  23. package/lib/rest/flexApi/v2/webChannels.js +2 -0
  24. package/lib/rest/intelligence/V2.d.ts +30 -0
  25. package/lib/rest/intelligence/V2.js +40 -0
  26. package/lib/rest/intelligence/v2/customOperator.d.ts +330 -0
  27. package/lib/rest/intelligence/v2/customOperator.js +279 -0
  28. package/lib/rest/intelligence/v2/operator.d.ts +263 -0
  29. package/lib/rest/intelligence/v2/operator.js +197 -0
  30. package/lib/rest/intelligence/v2/operatorAttachment.d.ts +112 -0
  31. package/lib/rest/intelligence/v2/operatorAttachment.js +135 -0
  32. package/lib/rest/intelligence/v2/operatorAttachments.d.ts +94 -0
  33. package/lib/rest/intelligence/v2/operatorAttachments.js +110 -0
  34. package/lib/rest/intelligence/v2/operatorType.d.ts +259 -0
  35. package/lib/rest/intelligence/v2/operatorType.js +197 -0
  36. package/lib/rest/intelligence/v2/prebuiltOperator.d.ts +263 -0
  37. package/lib/rest/intelligence/v2/prebuiltOperator.js +197 -0
  38. package/lib/rest/intelligence/v2/service.d.ts +8 -4
  39. package/lib/rest/intelligence/v2/service.js +3 -2
  40. package/lib/rest/messaging/v1/service.d.ts +0 -6
  41. package/lib/rest/messaging/v1/service.js +0 -2
  42. package/lib/rest/numbers/V1.d.ts +20 -10
  43. package/lib/rest/numbers/V1.js +31 -14
  44. package/lib/rest/numbers/v1/portingPortIn.d.ts +133 -14
  45. package/lib/rest/numbers/v1/portingPortIn.js +116 -24
  46. package/lib/rest/numbers/v1/portingPortInPhoneNumber.d.ts +175 -0
  47. package/lib/rest/numbers/v1/portingPortInPhoneNumber.js +157 -0
  48. package/lib/rest/numbers/v1/portingWebhookConfiguration.d.ts +79 -0
  49. package/lib/rest/{previewMessaging/v1/broadcast.js → numbers/v1/portingWebhookConfiguration.js} +19 -32
  50. package/lib/rest/numbers/v1/portingWebhookConfigurationDelete.d.ts +51 -0
  51. package/lib/rest/numbers/v1/portingWebhookConfigurationDelete.js +68 -0
  52. package/lib/rest/numbers/v1/portingWebhookConfigurationFetch.d.ts +75 -0
  53. package/lib/rest/numbers/v1/portingWebhookConfigurationFetch.js +72 -0
  54. package/lib/rest/taskrouter/v1/workspace/task.d.ts +24 -0
  55. package/lib/rest/taskrouter/v1/workspace/task.js +12 -0
  56. package/lib/rest/trusthub/v1/complianceTollfreeInquiries.d.ts +2 -0
  57. package/lib/rest/trusthub/v1/complianceTollfreeInquiries.js +2 -0
  58. package/lib/rest/trusthub/v1/customerProfiles.d.ts +6 -0
  59. package/lib/rest/trusthub/v1/customerProfiles.js +2 -0
  60. package/lib/rest/trusthub/v1/trustProducts.d.ts +6 -0
  61. package/lib/rest/trusthub/v1/trustProducts.js +2 -0
  62. package/lib/rest/verify/v2/service/verification.d.ts +1 -1
  63. package/lib/rest/verify/v2/service/verificationCheck.d.ts +1 -1
  64. package/lib/rest/verify/v2/service.d.ts +1 -1
  65. package/lib/webhooks/webhooks.js +9 -11
  66. package/package.json +4 -6
  67. package/lib/rest/PreviewMessaging.d.ts +0 -9
  68. package/lib/rest/PreviewMessaging.js +0 -15
  69. package/lib/rest/PreviewMessagingBase.d.ts +0 -13
  70. package/lib/rest/PreviewMessagingBase.js +0 -31
  71. package/lib/rest/numbers/v1/portingBulkPortability.d.ts +0 -120
  72. package/lib/rest/numbers/v1/portingBulkPortability.js +0 -136
  73. package/lib/rest/numbers/v1/portingPortInFetch.d.ts +0 -142
  74. package/lib/rest/numbers/v1/portingPortInFetch.js +0 -128
  75. package/lib/rest/previewMessaging/V1.d.ts +0 -20
  76. package/lib/rest/previewMessaging/V1.js +0 -42
  77. package/lib/rest/previewMessaging/v1/broadcast.d.ts +0 -108
  78. package/lib/rest/previewMessaging/v1/message.d.ts +0 -178
  79. package/lib/rest/previewMessaging/v1/message.js +0 -91
@@ -1,142 +0,0 @@
1
- /// <reference types="node" />
2
- import { inspect, InspectOptions } from "util";
3
- import V1 from "../V1";
4
- export interface PortingPortInFetchContext {
5
- /**
6
- * Fetch a PortingPortInFetchInstance
7
- *
8
- * @param callback - Callback to handle processed record
9
- *
10
- * @returns Resolves to processed PortingPortInFetchInstance
11
- */
12
- fetch(callback?: (error: Error | null, item?: PortingPortInFetchInstance) => any): Promise<PortingPortInFetchInstance>;
13
- /**
14
- * Provide a user-friendly representation
15
- */
16
- toJSON(): any;
17
- [inspect.custom](_depth: any, options: InspectOptions): any;
18
- }
19
- export interface PortingPortInFetchContextSolution {
20
- portInRequestSid: string;
21
- }
22
- export declare class PortingPortInFetchContextImpl implements PortingPortInFetchContext {
23
- protected _version: V1;
24
- protected _solution: PortingPortInFetchContextSolution;
25
- protected _uri: string;
26
- constructor(_version: V1, portInRequestSid: string);
27
- fetch(callback?: (error: Error | null, item?: PortingPortInFetchInstance) => any): Promise<PortingPortInFetchInstance>;
28
- /**
29
- * Provide a user-friendly representation
30
- *
31
- * @returns Object
32
- */
33
- toJSON(): PortingPortInFetchContextSolution;
34
- [inspect.custom](_depth: any, options: InspectOptions): string;
35
- }
36
- interface PortingPortInFetchResource {
37
- port_in_request_sid: string;
38
- url: string;
39
- account_sid: string;
40
- notification_emails: Array<string>;
41
- target_port_in_date: Date;
42
- target_port_in_time_range_start: string;
43
- target_port_in_time_range_end: string;
44
- port_in_request_status: string;
45
- losing_carrier_information: any;
46
- phone_numbers: Array<any>;
47
- documents: Array<string>;
48
- }
49
- export declare class PortingPortInFetchInstance {
50
- protected _version: V1;
51
- protected _solution: PortingPortInFetchContextSolution;
52
- protected _context?: PortingPortInFetchContext;
53
- constructor(_version: V1, payload: PortingPortInFetchResource, portInRequestSid?: string);
54
- /**
55
- * The SID of the Port In request. This is a unique identifier of the port in request.
56
- */
57
- portInRequestSid: string;
58
- /**
59
- * The URL of this Port In request
60
- */
61
- url: string;
62
- /**
63
- * The Account SID that the numbers will be added to after they are ported into Twilio.
64
- */
65
- accountSid: string;
66
- /**
67
- * List of emails for getting notifications about the LOA signing process. Allowed Max 10 emails.
68
- */
69
- notificationEmails: Array<string>;
70
- /**
71
- * Minimum number of days in the future (at least 2 days) needs to be established with the Ops team for validation.
72
- */
73
- targetPortInDate: Date;
74
- /**
75
- * Minimum hour in the future needs to be established with the Ops team for validation.
76
- */
77
- targetPortInTimeRangeStart: string;
78
- /**
79
- * Maximum hour in the future needs to be established with the Ops team for validation.
80
- */
81
- targetPortInTimeRangeEnd: string;
82
- /**
83
- * The status of the port in request. The possible values are: In progress, Completed, Expired, In review, Waiting for Signature, Action Required, and Canceled.
84
- */
85
- portInRequestStatus: string;
86
- /**
87
- * The information for the losing carrier.
88
- */
89
- losingCarrierInformation: any;
90
- /**
91
- * The list of phone numbers to Port in. Phone numbers are in E.164 format (e.g. +16175551212).
92
- */
93
- phoneNumbers: Array<any>;
94
- /**
95
- * The list of documents SID referencing a utility bills
96
- */
97
- documents: Array<string>;
98
- private get _proxy();
99
- /**
100
- * Fetch a PortingPortInFetchInstance
101
- *
102
- * @param callback - Callback to handle processed record
103
- *
104
- * @returns Resolves to processed PortingPortInFetchInstance
105
- */
106
- fetch(callback?: (error: Error | null, item?: PortingPortInFetchInstance) => any): Promise<PortingPortInFetchInstance>;
107
- /**
108
- * Provide a user-friendly representation
109
- *
110
- * @returns Object
111
- */
112
- toJSON(): {
113
- portInRequestSid: string;
114
- url: string;
115
- accountSid: string;
116
- notificationEmails: string[];
117
- targetPortInDate: Date;
118
- targetPortInTimeRangeStart: string;
119
- targetPortInTimeRangeEnd: string;
120
- portInRequestStatus: string;
121
- losingCarrierInformation: any;
122
- phoneNumbers: any[];
123
- documents: string[];
124
- };
125
- [inspect.custom](_depth: any, options: InspectOptions): string;
126
- }
127
- export interface PortingPortInFetchSolution {
128
- }
129
- export interface PortingPortInFetchListInstance {
130
- _version: V1;
131
- _solution: PortingPortInFetchSolution;
132
- _uri: string;
133
- (portInRequestSid: string): PortingPortInFetchContext;
134
- get(portInRequestSid: string): PortingPortInFetchContext;
135
- /**
136
- * Provide a user-friendly representation
137
- */
138
- toJSON(): any;
139
- [inspect.custom](_depth: any, options: InspectOptions): any;
140
- }
141
- export declare function PortingPortInFetchListInstance(version: V1): PortingPortInFetchListInstance;
142
- export {};
@@ -1,128 +0,0 @@
1
- "use strict";
2
- /*
3
- * This code was generated by
4
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
- *
8
- * Twilio - Numbers
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.PortingPortInFetchListInstance = exports.PortingPortInFetchInstance = exports.PortingPortInFetchContextImpl = void 0;
17
- const util_1 = require("util");
18
- const deserialize = require("../../../base/deserialize");
19
- const serialize = require("../../../base/serialize");
20
- const utility_1 = require("../../../base/utility");
21
- class PortingPortInFetchContextImpl {
22
- constructor(_version, portInRequestSid) {
23
- this._version = _version;
24
- if (!(0, utility_1.isValidPathParam)(portInRequestSid)) {
25
- throw new Error("Parameter 'portInRequestSid' is not valid.");
26
- }
27
- this._solution = { portInRequestSid };
28
- this._uri = `/Porting/PortIn/${portInRequestSid}`;
29
- }
30
- fetch(callback) {
31
- const instance = this;
32
- let operationVersion = instance._version, operationPromise = operationVersion.fetch({
33
- uri: instance._uri,
34
- method: "get",
35
- });
36
- operationPromise = operationPromise.then((payload) => new PortingPortInFetchInstance(operationVersion, payload, instance._solution.portInRequestSid));
37
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
38
- return operationPromise;
39
- }
40
- /**
41
- * Provide a user-friendly representation
42
- *
43
- * @returns Object
44
- */
45
- toJSON() {
46
- return this._solution;
47
- }
48
- [util_1.inspect.custom](_depth, options) {
49
- return (0, util_1.inspect)(this.toJSON(), options);
50
- }
51
- }
52
- exports.PortingPortInFetchContextImpl = PortingPortInFetchContextImpl;
53
- class PortingPortInFetchInstance {
54
- constructor(_version, payload, portInRequestSid) {
55
- this._version = _version;
56
- this.portInRequestSid = payload.port_in_request_sid;
57
- this.url = payload.url;
58
- this.accountSid = payload.account_sid;
59
- this.notificationEmails = payload.notification_emails;
60
- this.targetPortInDate = deserialize.iso8601Date(payload.target_port_in_date);
61
- this.targetPortInTimeRangeStart = payload.target_port_in_time_range_start;
62
- this.targetPortInTimeRangeEnd = payload.target_port_in_time_range_end;
63
- this.portInRequestStatus = payload.port_in_request_status;
64
- this.losingCarrierInformation = payload.losing_carrier_information;
65
- this.phoneNumbers = payload.phone_numbers;
66
- this.documents = payload.documents;
67
- this._solution = {
68
- portInRequestSid: portInRequestSid || this.portInRequestSid,
69
- };
70
- }
71
- get _proxy() {
72
- this._context =
73
- this._context ||
74
- new PortingPortInFetchContextImpl(this._version, this._solution.portInRequestSid);
75
- return this._context;
76
- }
77
- /**
78
- * Fetch a PortingPortInFetchInstance
79
- *
80
- * @param callback - Callback to handle processed record
81
- *
82
- * @returns Resolves to processed PortingPortInFetchInstance
83
- */
84
- fetch(callback) {
85
- return this._proxy.fetch(callback);
86
- }
87
- /**
88
- * Provide a user-friendly representation
89
- *
90
- * @returns Object
91
- */
92
- toJSON() {
93
- return {
94
- portInRequestSid: this.portInRequestSid,
95
- url: this.url,
96
- accountSid: this.accountSid,
97
- notificationEmails: this.notificationEmails,
98
- targetPortInDate: this.targetPortInDate,
99
- targetPortInTimeRangeStart: this.targetPortInTimeRangeStart,
100
- targetPortInTimeRangeEnd: this.targetPortInTimeRangeEnd,
101
- portInRequestStatus: this.portInRequestStatus,
102
- losingCarrierInformation: this.losingCarrierInformation,
103
- phoneNumbers: this.phoneNumbers,
104
- documents: this.documents,
105
- };
106
- }
107
- [util_1.inspect.custom](_depth, options) {
108
- return (0, util_1.inspect)(this.toJSON(), options);
109
- }
110
- }
111
- exports.PortingPortInFetchInstance = PortingPortInFetchInstance;
112
- function PortingPortInFetchListInstance(version) {
113
- const instance = ((portInRequestSid) => instance.get(portInRequestSid));
114
- instance.get = function get(portInRequestSid) {
115
- return new PortingPortInFetchContextImpl(version, portInRequestSid);
116
- };
117
- instance._version = version;
118
- instance._solution = {};
119
- instance._uri = ``;
120
- instance.toJSON = function toJSON() {
121
- return instance._solution;
122
- };
123
- instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
124
- return (0, util_1.inspect)(instance.toJSON(), options);
125
- };
126
- return instance;
127
- }
128
- exports.PortingPortInFetchListInstance = PortingPortInFetchListInstance;
@@ -1,20 +0,0 @@
1
- import PreviewMessagingBase from "../PreviewMessagingBase";
2
- import Version from "../../base/Version";
3
- import { BroadcastListInstance } from "./v1/broadcast";
4
- import { MessageListInstance } from "./v1/message";
5
- export default class V1 extends Version {
6
- /**
7
- * Initialize the V1 version of PreviewMessaging
8
- *
9
- * @param domain - The Twilio (Twilio.PreviewMessaging) domain
10
- */
11
- constructor(domain: PreviewMessagingBase);
12
- /** broadcasts - { Twilio.PreviewMessaging.V1.BroadcastListInstance } resource */
13
- protected _broadcasts?: BroadcastListInstance;
14
- /** messages - { Twilio.PreviewMessaging.V1.MessageListInstance } resource */
15
- protected _messages?: MessageListInstance;
16
- /** Getter for broadcasts resource */
17
- get broadcasts(): BroadcastListInstance;
18
- /** Getter for messages resource */
19
- get messages(): MessageListInstance;
20
- }
@@ -1,42 +0,0 @@
1
- "use strict";
2
- /*
3
- * This code was generated by
4
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
- *
8
- * Bulk Messaging and Broadcast
9
- * Bulk Sending is a public Twilio REST API for 1:Many Message creation up to 100 recipients. Broadcast is a public Twilio REST API for 1:Many Message creation up to 10,000 recipients via file upload.
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
- const Version_1 = __importDefault(require("../../base/Version"));
20
- const broadcast_1 = require("./v1/broadcast");
21
- const message_1 = require("./v1/message");
22
- class V1 extends Version_1.default {
23
- /**
24
- * Initialize the V1 version of PreviewMessaging
25
- *
26
- * @param domain - The Twilio (Twilio.PreviewMessaging) domain
27
- */
28
- constructor(domain) {
29
- super(domain, "v1");
30
- }
31
- /** Getter for broadcasts resource */
32
- get broadcasts() {
33
- this._broadcasts = this._broadcasts || (0, broadcast_1.BroadcastListInstance)(this);
34
- return this._broadcasts;
35
- }
36
- /** Getter for messages resource */
37
- get messages() {
38
- this._messages = this._messages || (0, message_1.MessageListInstance)(this);
39
- return this._messages;
40
- }
41
- }
42
- exports.default = V1;
@@ -1,108 +0,0 @@
1
- /// <reference types="node" />
2
- import { inspect, InspectOptions } from "util";
3
- import V1 from "../V1";
4
- /**
5
- * Details on the statuses of messages sent to recipients
6
- */
7
- export declare class MessagingV1BroadcastExecutionDetails {
8
- /**
9
- * Number of recipients in the Broadcast request
10
- */
11
- "totalRecords"?: number;
12
- /**
13
- * Number of recipients with messages successfully sent to them
14
- */
15
- "totalCompleted"?: number;
16
- /**
17
- * Number of recipients with messages unsuccessfully sent to them, producing an error
18
- */
19
- "totalErrors"?: number;
20
- }
21
- /**
22
- * Options to pass to create a BroadcastInstance
23
- */
24
- export interface BroadcastListInstanceCreateOptions {
25
- /** Idempotency key provided by the client */
26
- xTwilioRequestKey?: string;
27
- }
28
- export interface BroadcastSolution {
29
- }
30
- export interface BroadcastListInstance {
31
- _version: V1;
32
- _solution: BroadcastSolution;
33
- _uri: string;
34
- /**
35
- * Create a BroadcastInstance
36
- *
37
- * @param callback - Callback to handle processed record
38
- *
39
- * @returns Resolves to processed BroadcastInstance
40
- */
41
- create(callback?: (error: Error | null, item?: BroadcastInstance) => any): Promise<BroadcastInstance>;
42
- /**
43
- * Create a BroadcastInstance
44
- *
45
- * @param params - Parameter for request
46
- * @param callback - Callback to handle processed record
47
- *
48
- * @returns Resolves to processed BroadcastInstance
49
- */
50
- create(params: BroadcastListInstanceCreateOptions, callback?: (error: Error | null, item?: BroadcastInstance) => any): Promise<BroadcastInstance>;
51
- /**
52
- * Provide a user-friendly representation
53
- */
54
- toJSON(): any;
55
- [inspect.custom](_depth: any, options: InspectOptions): any;
56
- }
57
- export declare function BroadcastListInstance(version: V1): BroadcastListInstance;
58
- interface BroadcastResource {
59
- broadcast_sid: string;
60
- created_date: Date;
61
- updated_date: Date;
62
- broadcast_status: string;
63
- execution_details: MessagingV1BroadcastExecutionDetails;
64
- results_file: string;
65
- }
66
- /**
67
- * Details of a Broadcast
68
- */
69
- export declare class BroadcastInstance {
70
- protected _version: V1;
71
- constructor(_version: V1, payload: BroadcastResource);
72
- /**
73
- * Numeric ID indentifying individual Broadcast requests
74
- */
75
- broadcastSid: string;
76
- /**
77
- * Timestamp of when the Broadcast was created
78
- */
79
- createdDate: Date;
80
- /**
81
- * Timestamp of when the Broadcast was last updated
82
- */
83
- updatedDate: Date;
84
- /**
85
- * Status of the Broadcast request. Valid values are None, Pending-Upload, Uploaded, Queued, Executing, Execution-Failure, Execution-Completed, Cancelation-Requested, and Canceled
86
- */
87
- broadcastStatus: string;
88
- executionDetails: MessagingV1BroadcastExecutionDetails;
89
- /**
90
- * Path to a file detailing successful requests and errors from Broadcast execution
91
- */
92
- resultsFile: string;
93
- /**
94
- * Provide a user-friendly representation
95
- *
96
- * @returns Object
97
- */
98
- toJSON(): {
99
- broadcastSid: string;
100
- createdDate: Date;
101
- updatedDate: Date;
102
- broadcastStatus: string;
103
- executionDetails: MessagingV1BroadcastExecutionDetails;
104
- resultsFile: string;
105
- };
106
- [inspect.custom](_depth: any, options: InspectOptions): string;
107
- }
108
- export {};
@@ -1,178 +0,0 @@
1
- /// <reference types="node" />
2
- import { inspect, InspectOptions } from "util";
3
- import V1 from "../V1";
4
- export declare class CreateMessagesRequest {
5
- "messages"?: Array<MessagingV1Message>;
6
- /**
7
- * A Twilio phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-code) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty.
8
- */
9
- "from"?: string;
10
- /**
11
- * The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message. Set this parameter to use the [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) you have configured and leave the `from` parameter empty. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `from` phone number for delivery.
12
- */
13
- "messagingServiceSid"?: string;
14
- /**
15
- * The text of the message you want to send. Can be up to 1,600 characters in length.
16
- */
17
- "body"?: string;
18
- /**
19
- * The SID of the preconfigured [Content Template](https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template) you want to associate with the Message. Must be used in conjuction with a preconfigured [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) When this parameter is set, Twilio will use your configured content template and the provided `ContentVariables`. This Twilio product is currently in Private Beta.
20
- */
21
- "contentSid"?: string;
22
- /**
23
- * The URL of the media to send with the message. The media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on the recipient\'s device. The media size limit is 5MB for supported file types (JPEG, PNG, GIF) and 500KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message body, provide multiple `media_url` parameters in the POST request. You can include up to 10 `media_url` parameters per message. You can send images in an SMS message in only the US and Canada.
24
- */
25
- "mediaUrl"?: Array<string>;
26
- /**
27
- * The URL we should call using the \"status_callback_method\" to send status information to your application. If specified, we POST these message status changes to the URL - queued, failed, sent, delivered, or undelivered. Twilio will POST its [standard request parameters](https://www.twilio.com/docs/messaging/twiml#request-parameters) as well as some additional parameters including \"MessageSid\", \"MessageStatus\", and \"ErrorCode\". If you include this parameter with the \"messaging_service_sid\", we use this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api). URLs must contain a valid hostname and underscores are not allowed.
28
- */
29
- "statusCallback"?: string;
30
- /**
31
- * How long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds.
32
- */
33
- "validityPeriod"?: number;
34
- /**
35
- * The time at which Twilio will send the message. This parameter can be used to schedule a message to be sent at a particular time. Must be in ISO 8601 format.
36
- */
37
- "sendAt"?: string;
38
- /**
39
- * This parameter indicates your intent to schedule a message. Pass the value `fixed` to schedule a message at a fixed time. This parameter works in conjuction with the `SendAt` parameter.
40
- */
41
- "scheduleType"?: string;
42
- /**
43
- * Determines the usage of Click Tracking. Setting it to `true` will instruct Twilio to replace all links in the Message with a shortened version based on the associated Domain Sid and track clicks on them. If this parameter is not set on an API call, we will use the value set on the Messaging Service. If this parameter is not set and the value is not configured on the Messaging Service used this will default to `false`.
44
- */
45
- "shortenUrls"?: boolean;
46
- /**
47
- * If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media.
48
- */
49
- "sendAsMms"?: boolean;
50
- /**
51
- * The maximum total price in US dollars that you will pay for the message to be delivered. Can be a decimal value that has up to 4 decimal places. All messages are queued for delivery and the message cost is checked before the message is sent. If the cost exceeds max_price, the message will fail and a status of Failed is sent to the status callback. If MaxPrice is not set, the message cost is not checked.
52
- */
53
- "maxPrice"?: number;
54
- /**
55
- * Total number of attempts made ( including this ) to send out the message regardless of the provider used
56
- */
57
- "attempt"?: number;
58
- /**
59
- * This parameter indicates whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be true or false.
60
- */
61
- "smartEncoded"?: boolean;
62
- /**
63
- * This parameter allows Twilio to send SMS traffic to carriers without checking/caring whether the destination number is a mobile or a landline.
64
- */
65
- "forceDelivery"?: boolean;
66
- /**
67
- * The SID of the application that should receive message status. We POST a message_sid parameter and a message_status parameter with a value of sent or failed to the application\'s message_status_callback. If a status_callback parameter is also passed, it will be ignored and the application\'s message_status_callback parameter will be used.
68
- */
69
- "applicationSid"?: string;
70
- }
71
- export declare class MessagingV1FailedMessageReceipt {
72
- /**
73
- * The recipient phone number
74
- */
75
- "to"?: string;
76
- /**
77
- * The description of the error_code
78
- */
79
- "errorMessage"?: string;
80
- /**
81
- * The error code associated with the message creation attempt
82
- */
83
- "errorCode"?: number;
84
- }
85
- export declare class MessagingV1Message {
86
- /**
87
- * The destination phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format for SMS/MMS or [Channel user address](https://www.twilio.com/docs/sms/channels#channel-addresses) for other 3rd-party channels.
88
- */
89
- "to"?: string;
90
- /**
91
- * The text of the message you want to send. Can be up to 1,600 characters in length. Overrides the request-level body and content template if provided.
92
- */
93
- "body"?: string;
94
- /**
95
- * Key-value pairs of variable names to substitution values. Refer to the [Twilio Content API Resources](https://www.twilio.com/docs/content-api/content-api-resources#send-a-message-with-preconfigured-content) for more details.
96
- */
97
- "contentVariables"?: {
98
- [key: string]: string;
99
- };
100
- }
101
- export declare class MessagingV1MessageReceipt {
102
- /**
103
- * The recipient phone number
104
- */
105
- "to"?: string | null;
106
- /**
107
- * The unique string that identifies the resource
108
- */
109
- "sid"?: string | null;
110
- }
111
- /**
112
- * Options to pass to create a MessageInstance
113
- */
114
- export interface MessageListInstanceCreateOptions {
115
- /** */
116
- createMessagesRequest: CreateMessagesRequest;
117
- }
118
- export interface MessageSolution {
119
- }
120
- export interface MessageListInstance {
121
- _version: V1;
122
- _solution: MessageSolution;
123
- _uri: string;
124
- /**
125
- * Create a MessageInstance
126
- *
127
- * @param params - Body for request
128
- * @param callback - Callback to handle processed record
129
- *
130
- * @returns Resolves to processed MessageInstance
131
- */
132
- create(params: CreateMessagesRequest, callback?: (error: Error | null, item?: MessageInstance) => any): Promise<MessageInstance>;
133
- /**
134
- * Provide a user-friendly representation
135
- */
136
- toJSON(): any;
137
- [inspect.custom](_depth: any, options: InspectOptions): any;
138
- }
139
- export declare function MessageListInstance(version: V1): MessageListInstance;
140
- interface MessageResource {
141
- total_message_count: number;
142
- success_count: number;
143
- error_count: number;
144
- message_receipts: Array<MessagingV1MessageReceipt>;
145
- failed_message_receipts: Array<MessagingV1FailedMessageReceipt>;
146
- }
147
- export declare class MessageInstance {
148
- protected _version: V1;
149
- constructor(_version: V1, payload: MessageResource);
150
- /**
151
- * The number of Messages processed in the request, equal to the sum of success_count and error_count.
152
- */
153
- totalMessageCount: number;
154
- /**
155
- * The number of Messages successfully created.
156
- */
157
- successCount: number;
158
- /**
159
- * The number of Messages unsuccessfully processed in the request.
160
- */
161
- errorCount: number;
162
- messageReceipts: Array<MessagingV1MessageReceipt>;
163
- failedMessageReceipts: Array<MessagingV1FailedMessageReceipt>;
164
- /**
165
- * Provide a user-friendly representation
166
- *
167
- * @returns Object
168
- */
169
- toJSON(): {
170
- totalMessageCount: number;
171
- successCount: number;
172
- errorCount: number;
173
- messageReceipts: MessagingV1MessageReceipt[];
174
- failedMessageReceipts: MessagingV1FailedMessageReceipt[];
175
- };
176
- [inspect.custom](_depth: any, options: InspectOptions): string;
177
- }
178
- export {};