twilio 3.84.0 → 3.84.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/LICENSE +1 -1
- package/lib/rest/conversations/v1/conversation/message.d.ts +6 -0
- package/lib/rest/conversations/v1/conversation/message.js +10 -1
- package/lib/rest/conversations/v1/service/conversation/message.d.ts +6 -0
- package/lib/rest/conversations/v1/service/conversation/message.js +10 -1
- package/lib/rest/messaging/v1/tollfreeVerification.d.ts +74 -1
- package/lib/rest/messaging/v1/tollfreeVerification.js +159 -0
- package/lib/rest/supersim/v1/ipCommand.d.ts +1 -1
- package/lib/rest/supersim/v1/ipCommand.js +2 -1
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (C)
|
|
3
|
+
Copyright (C) 2023, Twilio, Inc. <help@twilio.com>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
6
|
this software and associated documentation files (the "Software"), to deal in
|
|
@@ -184,6 +184,8 @@ interface MessageListInstance {
|
|
|
184
184
|
* @property attributes - A string metadata field you can use to store any data you wish.
|
|
185
185
|
* @property author - The channel specific identifier of the message's author.
|
|
186
186
|
* @property body - The content of the message.
|
|
187
|
+
* @property contentSid - The unique ID of the multi-channel Rich Content template.
|
|
188
|
+
* @property contentVariables - A structurally valid JSON string that contains values to resolve Rich Content template variables.
|
|
187
189
|
* @property dateCreated - The date that this resource was created.
|
|
188
190
|
* @property dateUpdated - The date that this resource was last updated.
|
|
189
191
|
* @property mediaSid - The Media SID to be attached to the new Message.
|
|
@@ -193,6 +195,8 @@ interface MessageListInstanceCreateOptions {
|
|
|
193
195
|
attributes?: string;
|
|
194
196
|
author?: string;
|
|
195
197
|
body?: string;
|
|
198
|
+
contentSid?: string;
|
|
199
|
+
contentVariables?: string;
|
|
196
200
|
dateCreated?: Date;
|
|
197
201
|
dateUpdated?: Date;
|
|
198
202
|
mediaSid?: string;
|
|
@@ -270,6 +274,7 @@ interface MessageResource {
|
|
|
270
274
|
attributes: string;
|
|
271
275
|
author: string;
|
|
272
276
|
body: string;
|
|
277
|
+
content_sid: string;
|
|
273
278
|
conversation_sid: string;
|
|
274
279
|
date_created: Date;
|
|
275
280
|
date_updated: Date;
|
|
@@ -353,6 +358,7 @@ declare class MessageInstance extends SerializableClass {
|
|
|
353
358
|
attributes: string;
|
|
354
359
|
author: string;
|
|
355
360
|
body: string;
|
|
361
|
+
contentSid: string;
|
|
356
362
|
conversationSid: string;
|
|
357
363
|
dateCreated: Date;
|
|
358
364
|
dateUpdated: Date;
|
|
@@ -72,6 +72,10 @@ MessageList = function MessageList(version, conversationSid) {
|
|
|
72
72
|
* A string metadata field you can use to store any data you wish.
|
|
73
73
|
* @param {string} [opts.mediaSid] -
|
|
74
74
|
* The Media SID to be attached to the new Message.
|
|
75
|
+
* @param {string} [opts.contentSid] -
|
|
76
|
+
* The unique ID of the multi-channel Rich Content template.
|
|
77
|
+
* @param {string} [opts.contentVariables] -
|
|
78
|
+
* A structurally valid JSON string that contains values to resolve Rich Content template variables.
|
|
75
79
|
* @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -
|
|
76
80
|
* The X-Twilio-Webhook-Enabled HTTP request header
|
|
77
81
|
* @param {function} [callback] - Callback to handle processed record
|
|
@@ -93,7 +97,9 @@ MessageList = function MessageList(version, conversationSid) {
|
|
|
93
97
|
'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),
|
|
94
98
|
'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),
|
|
95
99
|
'Attributes': _.get(opts, 'attributes'),
|
|
96
|
-
'MediaSid': _.get(opts, 'mediaSid')
|
|
100
|
+
'MediaSid': _.get(opts, 'mediaSid'),
|
|
101
|
+
'ContentSid': _.get(opts, 'contentSid'),
|
|
102
|
+
'ContentVariables': _.get(opts, 'contentVariables')
|
|
97
103
|
});
|
|
98
104
|
var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});
|
|
99
105
|
|
|
@@ -501,6 +507,8 @@ MessagePage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
501
507
|
* @property {object} delivery -
|
|
502
508
|
* An object that contains the summary of delivery statuses for the message to non-chat participants.
|
|
503
509
|
* @property {string} links - Absolute URL to access the receipts of this message.
|
|
510
|
+
* @property {string} contentSid -
|
|
511
|
+
* The unique ID of the multi-channel Rich Content template.
|
|
504
512
|
*
|
|
505
513
|
* @param {V1} version - Version of the resource
|
|
506
514
|
* @param {MessagePayload} payload - The instance payload
|
|
@@ -528,6 +536,7 @@ MessageInstance = function MessageInstance(version, payload, conversationSid,
|
|
|
528
536
|
this.url = payload.url; // jshint ignore:line
|
|
529
537
|
this.delivery = payload.delivery; // jshint ignore:line
|
|
530
538
|
this.links = payload.links; // jshint ignore:line
|
|
539
|
+
this.contentSid = payload.content_sid; // jshint ignore:line
|
|
531
540
|
|
|
532
541
|
// Context
|
|
533
542
|
this._context = undefined;
|
|
@@ -185,6 +185,8 @@ interface MessageListInstance {
|
|
|
185
185
|
* @property attributes - A string metadata field you can use to store any data you wish.
|
|
186
186
|
* @property author - The channel specific identifier of the message's author.
|
|
187
187
|
* @property body - The content of the message.
|
|
188
|
+
* @property contentSid - The unique ID of the multi-channel Rich Content template.
|
|
189
|
+
* @property contentVariables - A structurally valid JSON string that contains values to resolve Rich Content template variables.
|
|
188
190
|
* @property dateCreated - The date that this resource was created.
|
|
189
191
|
* @property dateUpdated - The date that this resource was last updated.
|
|
190
192
|
* @property mediaSid - The Media SID to be attached to the new Message.
|
|
@@ -194,6 +196,8 @@ interface MessageListInstanceCreateOptions {
|
|
|
194
196
|
attributes?: string;
|
|
195
197
|
author?: string;
|
|
196
198
|
body?: string;
|
|
199
|
+
contentSid?: string;
|
|
200
|
+
contentVariables?: string;
|
|
197
201
|
dateCreated?: Date;
|
|
198
202
|
dateUpdated?: Date;
|
|
199
203
|
mediaSid?: string;
|
|
@@ -272,6 +276,7 @@ interface MessageResource {
|
|
|
272
276
|
author: string;
|
|
273
277
|
body: string;
|
|
274
278
|
chat_service_sid: string;
|
|
279
|
+
content_sid: string;
|
|
275
280
|
conversation_sid: string;
|
|
276
281
|
date_created: Date;
|
|
277
282
|
date_updated: Date;
|
|
@@ -359,6 +364,7 @@ declare class MessageInstance extends SerializableClass {
|
|
|
359
364
|
author: string;
|
|
360
365
|
body: string;
|
|
361
366
|
chatServiceSid: string;
|
|
367
|
+
contentSid: string;
|
|
362
368
|
conversationSid: string;
|
|
363
369
|
dateCreated: Date;
|
|
364
370
|
dateUpdated: Date;
|
|
@@ -75,6 +75,10 @@ MessageList = function MessageList(version, chatServiceSid, conversationSid) {
|
|
|
75
75
|
* A string metadata field you can use to store any data you wish.
|
|
76
76
|
* @param {string} [opts.mediaSid] -
|
|
77
77
|
* The Media SID to be attached to the new Message.
|
|
78
|
+
* @param {string} [opts.contentSid] -
|
|
79
|
+
* The unique ID of the multi-channel Rich Content template.
|
|
80
|
+
* @param {string} [opts.contentVariables] -
|
|
81
|
+
* A structurally valid JSON string that contains values to resolve Rich Content template variables.
|
|
78
82
|
* @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -
|
|
79
83
|
* The X-Twilio-Webhook-Enabled HTTP request header
|
|
80
84
|
* @param {function} [callback] - Callback to handle processed record
|
|
@@ -96,7 +100,9 @@ MessageList = function MessageList(version, chatServiceSid, conversationSid) {
|
|
|
96
100
|
'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),
|
|
97
101
|
'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),
|
|
98
102
|
'Attributes': _.get(opts, 'attributes'),
|
|
99
|
-
'MediaSid': _.get(opts, 'mediaSid')
|
|
103
|
+
'MediaSid': _.get(opts, 'mediaSid'),
|
|
104
|
+
'ContentSid': _.get(opts, 'contentSid'),
|
|
105
|
+
'ContentVariables': _.get(opts, 'contentVariables')
|
|
100
106
|
});
|
|
101
107
|
var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});
|
|
102
108
|
|
|
@@ -517,6 +523,8 @@ MessagePage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
517
523
|
* An object that contains the summary of delivery statuses for the message to non-chat participants.
|
|
518
524
|
* @property {string} url - An absolute URL for this message.
|
|
519
525
|
* @property {string} links - Absolute URL to access the receipts of this message.
|
|
526
|
+
* @property {string} contentSid -
|
|
527
|
+
* The unique ID of the multi-channel Rich Content template.
|
|
520
528
|
*
|
|
521
529
|
* @param {V1} version - Version of the resource
|
|
522
530
|
* @param {MessagePayload} payload - The instance payload
|
|
@@ -547,6 +555,7 @@ MessageInstance = function MessageInstance(version, payload, chatServiceSid,
|
|
|
547
555
|
this.delivery = payload.delivery; // jshint ignore:line
|
|
548
556
|
this.url = payload.url; // jshint ignore:line
|
|
549
557
|
this.links = payload.links; // jshint ignore:line
|
|
558
|
+
this.contentSid = payload.content_sid; // jshint ignore:line
|
|
550
559
|
|
|
551
560
|
// Context
|
|
552
561
|
this._context = undefined;
|
|
@@ -24,6 +24,53 @@ type TollfreeVerificationStatus = 'PENDING_REVIEW'|'IN_REVIEW'|'TWILIO_APPROVED'
|
|
|
24
24
|
*/
|
|
25
25
|
declare function TollfreeVerificationList(version: V1): TollfreeVerificationListInstance;
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Options to pass to update
|
|
29
|
+
*
|
|
30
|
+
* @property additionalInformation - Additional information to be provided for verification
|
|
31
|
+
* @property businessCity - The city of the business or organization using the Tollfree number
|
|
32
|
+
* @property businessContactEmail - The email address of the contact for the business or organization using the Tollfree number
|
|
33
|
+
* @property businessContactFirstName - The first name of the contact for the business or organization using the Tollfree number
|
|
34
|
+
* @property businessContactLastName - The last name of the contact for the business or organization using the Tollfree number
|
|
35
|
+
* @property businessContactPhone - The phone number of the contact for the business or organization using the Tollfree number
|
|
36
|
+
* @property businessCountry - The country of the business or organization using the Tollfree number
|
|
37
|
+
* @property businessName - The name of the business or organization using the Tollfree number
|
|
38
|
+
* @property businessPostalCode - The postal code of the business or organization using the Tollfree number
|
|
39
|
+
* @property businessStateProvinceRegion - The state/province/region of the business or organization using the Tollfree number
|
|
40
|
+
* @property businessStreetAddress - The address of the business or organization using the Tollfree number
|
|
41
|
+
* @property businessStreetAddress2 - The address of the business or organization using the Tollfree number
|
|
42
|
+
* @property businessWebsite - The website of the business or organization using the Tollfree number
|
|
43
|
+
* @property messageVolume - Estimate monthly volume of messages from the Tollfree Number
|
|
44
|
+
* @property notificationEmail - The email address to receive the notification about the verification result.
|
|
45
|
+
* @property optInImageUrls - Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL
|
|
46
|
+
* @property optInType - Describe how a user opts-in to text messages
|
|
47
|
+
* @property productionMessageSample - An example of message content, i.e. a sample message
|
|
48
|
+
* @property useCaseCategories - The category of the use case for the Tollfree Number. List as many are applicable.
|
|
49
|
+
* @property useCaseSummary - Further explaination on how messaging is used by the business or organization
|
|
50
|
+
*/
|
|
51
|
+
interface TollfreeVerificationInstanceUpdateOptions {
|
|
52
|
+
additionalInformation?: string;
|
|
53
|
+
businessCity?: string;
|
|
54
|
+
businessContactEmail?: string;
|
|
55
|
+
businessContactFirstName?: string;
|
|
56
|
+
businessContactLastName?: string;
|
|
57
|
+
businessContactPhone?: string;
|
|
58
|
+
businessCountry?: string;
|
|
59
|
+
businessName?: string;
|
|
60
|
+
businessPostalCode?: string;
|
|
61
|
+
businessStateProvinceRegion?: string;
|
|
62
|
+
businessStreetAddress?: string;
|
|
63
|
+
businessStreetAddress2?: string;
|
|
64
|
+
businessWebsite?: string;
|
|
65
|
+
messageVolume?: string;
|
|
66
|
+
notificationEmail?: string;
|
|
67
|
+
optInImageUrls?: string | string[];
|
|
68
|
+
optInType?: TollfreeVerificationOptInType;
|
|
69
|
+
productionMessageSample?: string;
|
|
70
|
+
useCaseCategories?: string | string[];
|
|
71
|
+
useCaseSummary?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
27
74
|
interface TollfreeVerificationListInstance {
|
|
28
75
|
/**
|
|
29
76
|
* @param sid - sid of instance
|
|
@@ -329,6 +376,19 @@ declare class TollfreeVerificationContext {
|
|
|
329
376
|
* Provide a user-friendly representation
|
|
330
377
|
*/
|
|
331
378
|
toJSON(): any;
|
|
379
|
+
/**
|
|
380
|
+
* update a TollfreeVerificationInstance
|
|
381
|
+
*
|
|
382
|
+
* @param callback - Callback to handle processed record
|
|
383
|
+
*/
|
|
384
|
+
update(callback?: (error: Error | null, items: TollfreeVerificationInstance) => any): Promise<TollfreeVerificationInstance>;
|
|
385
|
+
/**
|
|
386
|
+
* update a TollfreeVerificationInstance
|
|
387
|
+
*
|
|
388
|
+
* @param opts - Options for request
|
|
389
|
+
* @param callback - Callback to handle processed record
|
|
390
|
+
*/
|
|
391
|
+
update(opts?: TollfreeVerificationInstanceUpdateOptions, callback?: (error: Error | null, items: TollfreeVerificationInstance) => any): Promise<TollfreeVerificationInstance>;
|
|
332
392
|
}
|
|
333
393
|
|
|
334
394
|
|
|
@@ -384,6 +444,19 @@ declare class TollfreeVerificationInstance extends SerializableClass {
|
|
|
384
444
|
toJSON(): any;
|
|
385
445
|
tollfreePhoneNumberSid: string;
|
|
386
446
|
trustProductSid: string;
|
|
447
|
+
/**
|
|
448
|
+
* update a TollfreeVerificationInstance
|
|
449
|
+
*
|
|
450
|
+
* @param callback - Callback to handle processed record
|
|
451
|
+
*/
|
|
452
|
+
update(callback?: (error: Error | null, items: TollfreeVerificationInstance) => any): Promise<TollfreeVerificationInstance>;
|
|
453
|
+
/**
|
|
454
|
+
* update a TollfreeVerificationInstance
|
|
455
|
+
*
|
|
456
|
+
* @param opts - Options for request
|
|
457
|
+
* @param callback - Callback to handle processed record
|
|
458
|
+
*/
|
|
459
|
+
update(opts?: TollfreeVerificationInstanceUpdateOptions, callback?: (error: Error | null, items: TollfreeVerificationInstance) => any): Promise<TollfreeVerificationInstance>;
|
|
387
460
|
url: string;
|
|
388
461
|
useCaseCategories: string[];
|
|
389
462
|
useCaseSummary: string;
|
|
@@ -415,4 +488,4 @@ declare class TollfreeVerificationPage extends Page<V1, TollfreeVerificationPayl
|
|
|
415
488
|
toJSON(): any;
|
|
416
489
|
}
|
|
417
490
|
|
|
418
|
-
export { TollfreeVerificationContext, TollfreeVerificationInstance, TollfreeVerificationList, TollfreeVerificationListInstance, TollfreeVerificationListInstanceCreateOptions, TollfreeVerificationListInstanceEachOptions, TollfreeVerificationListInstanceOptions, TollfreeVerificationListInstancePageOptions, TollfreeVerificationOptInType, TollfreeVerificationPage, TollfreeVerificationPayload, TollfreeVerificationResource, TollfreeVerificationSolution, TollfreeVerificationStatus }
|
|
491
|
+
export { TollfreeVerificationContext, TollfreeVerificationInstance, TollfreeVerificationInstanceUpdateOptions, TollfreeVerificationList, TollfreeVerificationListInstance, TollfreeVerificationListInstanceCreateOptions, TollfreeVerificationListInstanceEachOptions, TollfreeVerificationListInstanceOptions, TollfreeVerificationListInstancePageOptions, TollfreeVerificationOptInType, TollfreeVerificationPage, TollfreeVerificationPayload, TollfreeVerificationResource, TollfreeVerificationSolution, TollfreeVerificationStatus }
|
|
@@ -696,6 +696,64 @@ TollfreeVerificationInstance.prototype.fetch = function fetch(callback) {
|
|
|
696
696
|
return this._proxy.fetch(callback);
|
|
697
697
|
};
|
|
698
698
|
|
|
699
|
+
/* jshint ignore:start */
|
|
700
|
+
/**
|
|
701
|
+
* update a TollfreeVerificationInstance
|
|
702
|
+
*
|
|
703
|
+
* @function update
|
|
704
|
+
* @memberof Twilio.Messaging.V1.TollfreeVerificationInstance#
|
|
705
|
+
*
|
|
706
|
+
* @param {object} [opts] - Options for request
|
|
707
|
+
* @param {string} [opts.businessName] -
|
|
708
|
+
* The name of the business or organization using the Tollfree number
|
|
709
|
+
* @param {string} [opts.businessWebsite] -
|
|
710
|
+
* The website of the business or organization using the Tollfree number
|
|
711
|
+
* @param {string} [opts.notificationEmail] -
|
|
712
|
+
* The email address to receive the notification about the verification result.
|
|
713
|
+
* @param {string|list} [opts.useCaseCategories] -
|
|
714
|
+
* The category of the use case for the Tollfree Number. List as many are applicable.
|
|
715
|
+
* @param {string} [opts.useCaseSummary] -
|
|
716
|
+
* Further explaination on how messaging is used by the business or organization
|
|
717
|
+
* @param {string} [opts.productionMessageSample] -
|
|
718
|
+
* An example of message content, i.e. a sample message
|
|
719
|
+
* @param {string|list} [opts.optInImageUrls] -
|
|
720
|
+
* Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL
|
|
721
|
+
* @param {tollfree_verification.opt_in_type} [opts.optInType] -
|
|
722
|
+
* Describe how a user opts-in to text messages
|
|
723
|
+
* @param {string} [opts.messageVolume] -
|
|
724
|
+
* Estimate monthly volume of messages from the Tollfree Number
|
|
725
|
+
* @param {string} [opts.businessStreetAddress] -
|
|
726
|
+
* The address of the business or organization using the Tollfree number
|
|
727
|
+
* @param {string} [opts.businessStreetAddress2] -
|
|
728
|
+
* The address of the business or organization using the Tollfree number
|
|
729
|
+
* @param {string} [opts.businessCity] -
|
|
730
|
+
* The city of the business or organization using the Tollfree number
|
|
731
|
+
* @param {string} [opts.businessStateProvinceRegion] -
|
|
732
|
+
* The state/province/region of the business or organization using the Tollfree number
|
|
733
|
+
* @param {string} [opts.businessPostalCode] -
|
|
734
|
+
* The postal code of the business or organization using the Tollfree number
|
|
735
|
+
* @param {string} [opts.businessCountry] -
|
|
736
|
+
* The country of the business or organization using the Tollfree number
|
|
737
|
+
* @param {string} [opts.additionalInformation] -
|
|
738
|
+
* Additional information to be provided for verification
|
|
739
|
+
* @param {string} [opts.businessContactFirstName] -
|
|
740
|
+
* The first name of the contact for the business or organization using the Tollfree number
|
|
741
|
+
* @param {string} [opts.businessContactLastName] -
|
|
742
|
+
* The last name of the contact for the business or organization using the Tollfree number
|
|
743
|
+
* @param {string} [opts.businessContactEmail] -
|
|
744
|
+
* The email address of the contact for the business or organization using the Tollfree number
|
|
745
|
+
* @param {string} [opts.businessContactPhone] -
|
|
746
|
+
* The phone number of the contact for the business or organization using the Tollfree number
|
|
747
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
748
|
+
*
|
|
749
|
+
* @returns {Promise} Resolves to processed TollfreeVerificationInstance
|
|
750
|
+
*/
|
|
751
|
+
/* jshint ignore:end */
|
|
752
|
+
TollfreeVerificationInstance.prototype.update = function update(opts, callback)
|
|
753
|
+
{
|
|
754
|
+
return this._proxy.update(opts, callback);
|
|
755
|
+
};
|
|
756
|
+
|
|
699
757
|
/* jshint ignore:start */
|
|
700
758
|
/**
|
|
701
759
|
* Provide a user-friendly representation
|
|
@@ -775,6 +833,107 @@ TollfreeVerificationContext.prototype.fetch = function fetch(callback) {
|
|
|
775
833
|
return deferred.promise;
|
|
776
834
|
};
|
|
777
835
|
|
|
836
|
+
/* jshint ignore:start */
|
|
837
|
+
/**
|
|
838
|
+
* update a TollfreeVerificationInstance
|
|
839
|
+
*
|
|
840
|
+
* @function update
|
|
841
|
+
* @memberof Twilio.Messaging.V1.TollfreeVerificationContext#
|
|
842
|
+
*
|
|
843
|
+
* @param {object} [opts] - Options for request
|
|
844
|
+
* @param {string} [opts.businessName] -
|
|
845
|
+
* The name of the business or organization using the Tollfree number
|
|
846
|
+
* @param {string} [opts.businessWebsite] -
|
|
847
|
+
* The website of the business or organization using the Tollfree number
|
|
848
|
+
* @param {string} [opts.notificationEmail] -
|
|
849
|
+
* The email address to receive the notification about the verification result.
|
|
850
|
+
* @param {string|list} [opts.useCaseCategories] -
|
|
851
|
+
* The category of the use case for the Tollfree Number. List as many are applicable.
|
|
852
|
+
* @param {string} [opts.useCaseSummary] -
|
|
853
|
+
* Further explaination on how messaging is used by the business or organization
|
|
854
|
+
* @param {string} [opts.productionMessageSample] -
|
|
855
|
+
* An example of message content, i.e. a sample message
|
|
856
|
+
* @param {string|list} [opts.optInImageUrls] -
|
|
857
|
+
* Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL
|
|
858
|
+
* @param {tollfree_verification.opt_in_type} [opts.optInType] -
|
|
859
|
+
* Describe how a user opts-in to text messages
|
|
860
|
+
* @param {string} [opts.messageVolume] -
|
|
861
|
+
* Estimate monthly volume of messages from the Tollfree Number
|
|
862
|
+
* @param {string} [opts.businessStreetAddress] -
|
|
863
|
+
* The address of the business or organization using the Tollfree number
|
|
864
|
+
* @param {string} [opts.businessStreetAddress2] -
|
|
865
|
+
* The address of the business or organization using the Tollfree number
|
|
866
|
+
* @param {string} [opts.businessCity] -
|
|
867
|
+
* The city of the business or organization using the Tollfree number
|
|
868
|
+
* @param {string} [opts.businessStateProvinceRegion] -
|
|
869
|
+
* The state/province/region of the business or organization using the Tollfree number
|
|
870
|
+
* @param {string} [opts.businessPostalCode] -
|
|
871
|
+
* The postal code of the business or organization using the Tollfree number
|
|
872
|
+
* @param {string} [opts.businessCountry] -
|
|
873
|
+
* The country of the business or organization using the Tollfree number
|
|
874
|
+
* @param {string} [opts.additionalInformation] -
|
|
875
|
+
* Additional information to be provided for verification
|
|
876
|
+
* @param {string} [opts.businessContactFirstName] -
|
|
877
|
+
* The first name of the contact for the business or organization using the Tollfree number
|
|
878
|
+
* @param {string} [opts.businessContactLastName] -
|
|
879
|
+
* The last name of the contact for the business or organization using the Tollfree number
|
|
880
|
+
* @param {string} [opts.businessContactEmail] -
|
|
881
|
+
* The email address of the contact for the business or organization using the Tollfree number
|
|
882
|
+
* @param {string} [opts.businessContactPhone] -
|
|
883
|
+
* The phone number of the contact for the business or organization using the Tollfree number
|
|
884
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
885
|
+
*
|
|
886
|
+
* @returns {Promise} Resolves to processed TollfreeVerificationInstance
|
|
887
|
+
*/
|
|
888
|
+
/* jshint ignore:end */
|
|
889
|
+
TollfreeVerificationContext.prototype.update = function update(opts, callback) {
|
|
890
|
+
if (_.isFunction(opts)) {
|
|
891
|
+
callback = opts;
|
|
892
|
+
opts = {};
|
|
893
|
+
}
|
|
894
|
+
opts = opts || {};
|
|
895
|
+
|
|
896
|
+
var deferred = Q.defer();
|
|
897
|
+
var data = values.of({
|
|
898
|
+
'BusinessName': _.get(opts, 'businessName'),
|
|
899
|
+
'BusinessWebsite': _.get(opts, 'businessWebsite'),
|
|
900
|
+
'NotificationEmail': _.get(opts, 'notificationEmail'),
|
|
901
|
+
'UseCaseCategories': serialize.map(_.get(opts, 'useCaseCategories'), function(e) { return e; }),
|
|
902
|
+
'UseCaseSummary': _.get(opts, 'useCaseSummary'),
|
|
903
|
+
'ProductionMessageSample': _.get(opts, 'productionMessageSample'),
|
|
904
|
+
'OptInImageUrls': serialize.map(_.get(opts, 'optInImageUrls'), function(e) { return e; }),
|
|
905
|
+
'OptInType': _.get(opts, 'optInType'),
|
|
906
|
+
'MessageVolume': _.get(opts, 'messageVolume'),
|
|
907
|
+
'BusinessStreetAddress': _.get(opts, 'businessStreetAddress'),
|
|
908
|
+
'BusinessStreetAddress2': _.get(opts, 'businessStreetAddress2'),
|
|
909
|
+
'BusinessCity': _.get(opts, 'businessCity'),
|
|
910
|
+
'BusinessStateProvinceRegion': _.get(opts, 'businessStateProvinceRegion'),
|
|
911
|
+
'BusinessPostalCode': _.get(opts, 'businessPostalCode'),
|
|
912
|
+
'BusinessCountry': _.get(opts, 'businessCountry'),
|
|
913
|
+
'AdditionalInformation': _.get(opts, 'additionalInformation'),
|
|
914
|
+
'BusinessContactFirstName': _.get(opts, 'businessContactFirstName'),
|
|
915
|
+
'BusinessContactLastName': _.get(opts, 'businessContactLastName'),
|
|
916
|
+
'BusinessContactEmail': _.get(opts, 'businessContactEmail'),
|
|
917
|
+
'BusinessContactPhone': _.get(opts, 'businessContactPhone')
|
|
918
|
+
});
|
|
919
|
+
|
|
920
|
+
var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
|
|
921
|
+
|
|
922
|
+
promise = promise.then(function(payload) {
|
|
923
|
+
deferred.resolve(new TollfreeVerificationInstance(this._version, payload, this._solution.sid));
|
|
924
|
+
}.bind(this));
|
|
925
|
+
|
|
926
|
+
promise.catch(function(error) {
|
|
927
|
+
deferred.reject(error);
|
|
928
|
+
});
|
|
929
|
+
|
|
930
|
+
if (_.isFunction(callback)) {
|
|
931
|
+
deferred.promise.nodeify(callback);
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
return deferred.promise;
|
|
935
|
+
};
|
|
936
|
+
|
|
778
937
|
/* jshint ignore:start */
|
|
779
938
|
/**
|
|
780
939
|
* Provide a user-friendly representation
|
|
@@ -152,7 +152,7 @@ interface IpCommandListInstance {
|
|
|
152
152
|
* @property callbackMethod - The HTTP method we should use to call callback_url
|
|
153
153
|
* @property callbackUrl - The URL we should call after we have sent the IP Command
|
|
154
154
|
* @property devicePort - The device port to which the IP Command will be sent
|
|
155
|
-
* @property payload - The
|
|
155
|
+
* @property payload - The data to be delivered to the device. If payload_type has been specified as binary, payload should be encoded using base64 encoding. Twilio will decode the the binary payload before sending to the device.
|
|
156
156
|
* @property payloadType - Indicates how the payload is encoded
|
|
157
157
|
* @property sim - The sid or unique_name of the Super SIM to send the IP Command to
|
|
158
158
|
*/
|
|
@@ -63,7 +63,8 @@ IpCommandList = function IpCommandList(version) {
|
|
|
63
63
|
* @param {object} opts - Options for request
|
|
64
64
|
* @param {string} opts.sim -
|
|
65
65
|
* The sid or unique_name of the Super SIM to send the IP Command to
|
|
66
|
-
* @param {string} opts.payload -
|
|
66
|
+
* @param {string} opts.payload -
|
|
67
|
+
* The data to be delivered to the device. If payload_type has been specified as binary, payload should be encoded using base64 encoding. Twilio will decode the the binary payload before sending to the device.
|
|
67
68
|
* @param {number} opts.devicePort -
|
|
68
69
|
* The device port to which the IP Command will be sent
|
|
69
70
|
* @param {ip_command.payload_type} [opts.payloadType] -
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twilio",
|
|
3
3
|
"description": "A Twilio helper library",
|
|
4
|
-
"version": "3.84.
|
|
4
|
+
"version": "3.84.1",
|
|
5
5
|
"author": "API Team <api@twilio.com>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
{
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"ci": "npm run nyc && npm run nsp",
|
|
57
57
|
"coverage": "nyc npm test",
|
|
58
58
|
"jsdoc": "jsdoc -r lib -d docs",
|
|
59
|
-
"nsp": "if [ `npm --version | cut -d'.' -f1` -ge \"6\" ]; then npm audit --production; else echo \"npm audit is not available for npm < 6.0\"; fi",
|
|
59
|
+
"nsp": "if [ `npm --version | cut -d'.' -f1` -ge \"6\" ]; then npm audit --production || true; else echo \"npm audit is not available for npm < 6.0\"; fi",
|
|
60
60
|
"nyc": "if [ `node --version | cut -d'.' -f1 | cut -c2-` -ge \"8\" ]; then npm run coverage; else npm test; fi"
|
|
61
61
|
},
|
|
62
62
|
"files": [
|