twilio 3.83.4 → 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/README.md +6 -0
- package/lib/rest/FlexApi.d.ts +4 -0
- package/lib/rest/FlexApi.js +19 -0
- package/lib/rest/Oauth.d.ts +2 -0
- package/lib/rest/Oauth.js +8 -0
- package/lib/rest/api/v2010/account/address.d.ts +6 -0
- package/lib/rest/api/v2010/account/address.js +13 -2
- package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.d.ts +1 -1
- package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.js +3 -6
- 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/flexApi/V2.d.ts +25 -0
- package/lib/rest/flexApi/V2.js +46 -0
- package/lib/rest/flexApi/v1/goodData.d.ts +2 -2
- package/lib/rest/flexApi/v1/goodData.js +4 -4
- package/lib/rest/flexApi/v1/userRoles.js +1 -1
- package/lib/rest/flexApi/v2/webChannels.d.ts +101 -0
- package/lib/rest/flexApi/v2/webChannels.js +244 -0
- package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +1 -1
- package/lib/rest/messaging/v1/service/usAppToPerson.js +5 -2
- package/lib/rest/messaging/v1/tollfreeVerification.d.ts +74 -1
- package/lib/rest/messaging/v1/tollfreeVerification.js +159 -0
- package/lib/rest/oauth/V1.d.ts +3 -0
- package/lib/rest/oauth/V1.js +11 -0
- package/lib/rest/oauth/v1/deviceCode.d.ts +107 -0
- package/lib/rest/oauth/v1/deviceCode.js +258 -0
- package/lib/rest/oauth/v1/openidDiscovery.js +1 -1
- package/lib/rest/supersim/v1/ipCommand.d.ts +1 -1
- package/lib/rest/supersim/v1/ipCommand.js +2 -1
- package/lib/rest/supersim/v1/settingsUpdate.d.ts +6 -0
- package/lib/rest/supersim/v1/settingsUpdate.js +7 -0
- package/lib/twiml/VoiceResponse.d.ts +7 -7
- package/lib/twiml/VoiceResponse.js +14 -14
- 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
|
package/README.md
CHANGED
|
@@ -32,6 +32,12 @@ TypeScript is supported for TypeScript version 2.9 and above.
|
|
|
32
32
|
|
|
33
33
|
`npm install twilio` or `yarn add twilio`
|
|
34
34
|
|
|
35
|
+
### Installing Release Candidates
|
|
36
|
+
|
|
37
|
+
Or, if you're wanting to install the latest release candidate use:
|
|
38
|
+
|
|
39
|
+
`npm install twilio@rc` or `yarn add twilio@rc`
|
|
40
|
+
|
|
35
41
|
## Sample Usage
|
|
36
42
|
|
|
37
43
|
Check out these [code examples](examples) in JavaScript and TypeScript to get up and running quickly.
|
package/lib/rest/FlexApi.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import Domain = require('../base/Domain');
|
|
9
9
|
import Twilio = require('./Twilio');
|
|
10
10
|
import V1 = require('./flexApi/V1');
|
|
11
|
+
import V2 = require('./flexApi/V2');
|
|
11
12
|
import { AssessmentsListInstance } from './flexApi/v1/assessments';
|
|
12
13
|
import { ChannelListInstance } from './flexApi/v1/channel';
|
|
13
14
|
import { ConfigurationListInstance } from './flexApi/v1/configuration';
|
|
@@ -16,6 +17,7 @@ import { GoodDataListInstance } from './flexApi/v1/goodData';
|
|
|
16
17
|
import { InteractionListInstance } from './flexApi/v1/interaction';
|
|
17
18
|
import { UserRolesListInstance } from './flexApi/v1/userRoles';
|
|
18
19
|
import { WebChannelListInstance } from './flexApi/v1/webChannel';
|
|
20
|
+
import { WebChannelsListInstance } from './flexApi/v2/webChannels';
|
|
19
21
|
|
|
20
22
|
|
|
21
23
|
declare class FlexApi extends Domain {
|
|
@@ -34,7 +36,9 @@ declare class FlexApi extends Domain {
|
|
|
34
36
|
readonly interaction: InteractionListInstance;
|
|
35
37
|
readonly userRoles: UserRolesListInstance;
|
|
36
38
|
readonly v1: V1;
|
|
39
|
+
readonly v2: V2;
|
|
37
40
|
readonly webChannel: WebChannelListInstance;
|
|
41
|
+
readonly webChannels: WebChannelsListInstance;
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
export = FlexApi;
|
package/lib/rest/FlexApi.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
var _ = require('lodash'); /* jshint ignore:line */
|
|
13
13
|
var Domain = require('../base/Domain'); /* jshint ignore:line */
|
|
14
14
|
var V1 = require('./flexApi/V1'); /* jshint ignore:line */
|
|
15
|
+
var V2 = require('./flexApi/V2'); /* jshint ignore:line */
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
/* jshint ignore:start */
|
|
@@ -21,6 +22,7 @@ var V1 = require('./flexApi/V1'); /* jshint ignore:line */
|
|
|
21
22
|
* @constructor Twilio.FlexApi
|
|
22
23
|
*
|
|
23
24
|
* @property {Twilio.FlexApi.V1} v1 - v1 version
|
|
25
|
+
* @property {Twilio.FlexApi.V2} v2 - v2 version
|
|
24
26
|
* @property {Twilio.FlexApi.V1.AssessmentsList} assessments - assessments resource
|
|
25
27
|
* @property {Twilio.FlexApi.V1.ChannelList} channel - channel resource
|
|
26
28
|
* @property {Twilio.FlexApi.V1.ConfigurationList} configuration -
|
|
@@ -30,6 +32,7 @@ var V1 = require('./flexApi/V1'); /* jshint ignore:line */
|
|
|
30
32
|
* @property {Twilio.FlexApi.V1.InteractionList} interaction - interaction resource
|
|
31
33
|
* @property {Twilio.FlexApi.V1.UserRolesList} userRoles - userRoles resource
|
|
32
34
|
* @property {Twilio.FlexApi.V1.WebChannelList} webChannel - webChannel resource
|
|
35
|
+
* @property {Twilio.FlexApi.V2.WebChannelsList} webChannels - webChannels resource
|
|
33
36
|
*
|
|
34
37
|
* @param {Twilio} twilio - The twilio client
|
|
35
38
|
*/
|
|
@@ -39,6 +42,7 @@ function FlexApi(twilio) {
|
|
|
39
42
|
|
|
40
43
|
// Versions
|
|
41
44
|
this._v1 = undefined;
|
|
45
|
+
this._v2 = undefined;
|
|
42
46
|
}
|
|
43
47
|
|
|
44
48
|
_.extend(FlexApi.prototype, Domain.prototype);
|
|
@@ -52,6 +56,14 @@ Object.defineProperty(FlexApi.prototype,
|
|
|
52
56
|
}
|
|
53
57
|
});
|
|
54
58
|
|
|
59
|
+
Object.defineProperty(FlexApi.prototype,
|
|
60
|
+
'v2', {
|
|
61
|
+
get: function() {
|
|
62
|
+
this._v2 = this._v2 || new V2(this);
|
|
63
|
+
return this._v2;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
55
67
|
Object.defineProperty(FlexApi.prototype,
|
|
56
68
|
'assessments', {
|
|
57
69
|
get: function() {
|
|
@@ -108,4 +120,11 @@ Object.defineProperty(FlexApi.prototype,
|
|
|
108
120
|
}
|
|
109
121
|
});
|
|
110
122
|
|
|
123
|
+
Object.defineProperty(FlexApi.prototype,
|
|
124
|
+
'webChannels', {
|
|
125
|
+
get: function() {
|
|
126
|
+
return this.v2.webChannels;
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
|
|
111
130
|
module.exports = FlexApi;
|
package/lib/rest/Oauth.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import Domain = require('../base/Domain');
|
|
9
9
|
import Twilio = require('./Twilio');
|
|
10
10
|
import V1 = require('./oauth/V1');
|
|
11
|
+
import { DeviceCodeListInstance } from './oauth/v1/deviceCode';
|
|
11
12
|
import { OauthListInstance } from './oauth/v1/oauth';
|
|
12
13
|
import { OpenidDiscoveryListInstance } from './oauth/v1/openidDiscovery';
|
|
13
14
|
import { TokenListInstance } from './oauth/v1/token';
|
|
@@ -22,6 +23,7 @@ declare class Oauth extends Domain {
|
|
|
22
23
|
*/
|
|
23
24
|
constructor(twilio: Twilio);
|
|
24
25
|
|
|
26
|
+
readonly deviceCode: DeviceCodeListInstance;
|
|
25
27
|
readonly oauth: OauthListInstance;
|
|
26
28
|
readonly openidDiscovery: OpenidDiscoveryListInstance;
|
|
27
29
|
readonly token: TokenListInstance;
|
package/lib/rest/Oauth.js
CHANGED
|
@@ -22,6 +22,7 @@ var V1 = require('./oauth/V1'); /* jshint ignore:line */
|
|
|
22
22
|
*
|
|
23
23
|
* @property {Twilio.Oauth.V1} v1 - v1 version
|
|
24
24
|
* @property {Twilio.Oauth.V1.OauthList} oauth - oauth resource
|
|
25
|
+
* @property {Twilio.Oauth.V1.DeviceCodeList} deviceCode - deviceCode resource
|
|
25
26
|
* @property {Twilio.Oauth.V1.OpenidDiscoveryList} openidDiscovery -
|
|
26
27
|
* openidDiscovery resource
|
|
27
28
|
* @property {Twilio.Oauth.V1.TokenList} token - token resource
|
|
@@ -55,6 +56,13 @@ Object.defineProperty(Oauth.prototype,
|
|
|
55
56
|
}
|
|
56
57
|
});
|
|
57
58
|
|
|
59
|
+
Object.defineProperty(Oauth.prototype,
|
|
60
|
+
'deviceCode', {
|
|
61
|
+
get: function() {
|
|
62
|
+
return this.v1.deviceCode;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
58
66
|
Object.defineProperty(Oauth.prototype,
|
|
59
67
|
'openidDiscovery', {
|
|
60
68
|
get: function() {
|
|
@@ -31,6 +31,7 @@ declare function AddressList(version: V2010, accountSid: string): AddressListIns
|
|
|
31
31
|
* @property postalCode - The postal code of the address
|
|
32
32
|
* @property region - The state or region of the address
|
|
33
33
|
* @property street - The number and street address of the address
|
|
34
|
+
* @property streetSecondary - The additional number and street address of the address
|
|
34
35
|
*/
|
|
35
36
|
interface AddressInstanceUpdateOptions {
|
|
36
37
|
autoCorrectAddress?: boolean;
|
|
@@ -41,6 +42,7 @@ interface AddressInstanceUpdateOptions {
|
|
|
41
42
|
postalCode?: string;
|
|
42
43
|
region?: string;
|
|
43
44
|
street?: string;
|
|
45
|
+
streetSecondary?: string;
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
interface AddressListInstance {
|
|
@@ -175,6 +177,7 @@ interface AddressListInstance {
|
|
|
175
177
|
* @property postalCode - The postal code of the new address
|
|
176
178
|
* @property region - The state or region of the new address
|
|
177
179
|
* @property street - The number and street address of the new address
|
|
180
|
+
* @property streetSecondary - The additional number and street address of the address
|
|
178
181
|
*/
|
|
179
182
|
interface AddressListInstanceCreateOptions {
|
|
180
183
|
autoCorrectAddress?: boolean;
|
|
@@ -186,6 +189,7 @@ interface AddressListInstanceCreateOptions {
|
|
|
186
189
|
postalCode: string;
|
|
187
190
|
region: string;
|
|
188
191
|
street: string;
|
|
192
|
+
streetSecondary?: string;
|
|
189
193
|
}
|
|
190
194
|
|
|
191
195
|
/**
|
|
@@ -279,6 +283,7 @@ interface AddressResource {
|
|
|
279
283
|
region: string;
|
|
280
284
|
sid: string;
|
|
281
285
|
street: string;
|
|
286
|
+
street_secondary: string;
|
|
282
287
|
uri: string;
|
|
283
288
|
validated: boolean;
|
|
284
289
|
verified: boolean;
|
|
@@ -372,6 +377,7 @@ declare class AddressInstance extends SerializableClass {
|
|
|
372
377
|
remove(callback?: (error: Error | null, items: AddressInstance) => any): Promise<boolean>;
|
|
373
378
|
sid: string;
|
|
374
379
|
street: string;
|
|
380
|
+
streetSecondary: string;
|
|
375
381
|
/**
|
|
376
382
|
* Provide a user-friendly representation
|
|
377
383
|
*/
|
|
@@ -74,6 +74,8 @@ AddressList = function AddressList(version, accountSid) {
|
|
|
74
74
|
* Whether to enable emergency calling on the new address
|
|
75
75
|
* @param {boolean} [opts.autoCorrectAddress] -
|
|
76
76
|
* Whether we should automatically correct the address
|
|
77
|
+
* @param {string} [opts.streetSecondary] -
|
|
78
|
+
* The additional number and street address of the address
|
|
77
79
|
* @param {function} [callback] - Callback to handle processed record
|
|
78
80
|
*
|
|
79
81
|
* @returns {Promise} Resolves to processed AddressInstance
|
|
@@ -112,7 +114,8 @@ AddressList = function AddressList(version, accountSid) {
|
|
|
112
114
|
'IsoCountry': _.get(opts, 'isoCountry'),
|
|
113
115
|
'FriendlyName': _.get(opts, 'friendlyName'),
|
|
114
116
|
'EmergencyEnabled': serialize.bool(_.get(opts, 'emergencyEnabled')),
|
|
115
|
-
'AutoCorrectAddress': serialize.bool(_.get(opts, 'autoCorrectAddress'))
|
|
117
|
+
'AutoCorrectAddress': serialize.bool(_.get(opts, 'autoCorrectAddress')),
|
|
118
|
+
'StreetSecondary': _.get(opts, 'streetSecondary')
|
|
116
119
|
});
|
|
117
120
|
|
|
118
121
|
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
@@ -533,6 +536,8 @@ AddressPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
533
536
|
* Whether the address has been validated to comply with local regulation
|
|
534
537
|
* @property {boolean} verified -
|
|
535
538
|
* Whether the address has been verified to comply with regulation
|
|
539
|
+
* @property {string} streetSecondary -
|
|
540
|
+
* The additional number and street address of the address
|
|
536
541
|
*
|
|
537
542
|
* @param {V2010} version - Version of the resource
|
|
538
543
|
* @param {AddressPayload} payload - The instance payload
|
|
@@ -560,6 +565,7 @@ AddressInstance = function AddressInstance(version, payload, accountSid, sid) {
|
|
|
560
565
|
this.emergencyEnabled = payload.emergency_enabled; // jshint ignore:line
|
|
561
566
|
this.validated = payload.validated; // jshint ignore:line
|
|
562
567
|
this.verified = payload.verified; // jshint ignore:line
|
|
568
|
+
this.streetSecondary = payload.street_secondary; // jshint ignore:line
|
|
563
569
|
|
|
564
570
|
// Context
|
|
565
571
|
this._context = undefined;
|
|
@@ -627,6 +633,8 @@ AddressInstance.prototype.fetch = function fetch(callback) {
|
|
|
627
633
|
* Whether to enable emergency calling on the address
|
|
628
634
|
* @param {boolean} [opts.autoCorrectAddress] -
|
|
629
635
|
* Whether we should automatically correct the address
|
|
636
|
+
* @param {string} [opts.streetSecondary] -
|
|
637
|
+
* The additional number and street address of the address
|
|
630
638
|
* @param {function} [callback] - Callback to handle processed record
|
|
631
639
|
*
|
|
632
640
|
* @returns {Promise} Resolves to processed AddressInstance
|
|
@@ -788,6 +796,8 @@ AddressContext.prototype.fetch = function fetch(callback) {
|
|
|
788
796
|
* Whether to enable emergency calling on the address
|
|
789
797
|
* @param {boolean} [opts.autoCorrectAddress] -
|
|
790
798
|
* Whether we should automatically correct the address
|
|
799
|
+
* @param {string} [opts.streetSecondary] -
|
|
800
|
+
* The additional number and street address of the address
|
|
791
801
|
* @param {function} [callback] - Callback to handle processed record
|
|
792
802
|
*
|
|
793
803
|
* @returns {Promise} Resolves to processed AddressInstance
|
|
@@ -809,7 +819,8 @@ AddressContext.prototype.update = function update(opts, callback) {
|
|
|
809
819
|
'Region': _.get(opts, 'region'),
|
|
810
820
|
'PostalCode': _.get(opts, 'postalCode'),
|
|
811
821
|
'EmergencyEnabled': serialize.bool(_.get(opts, 'emergencyEnabled')),
|
|
812
|
-
'AutoCorrectAddress': serialize.bool(_.get(opts, 'autoCorrectAddress'))
|
|
822
|
+
'AutoCorrectAddress': serialize.bool(_.get(opts, 'autoCorrectAddress')),
|
|
823
|
+
'StreetSecondary': _.get(opts, 'streetSecondary')
|
|
813
824
|
});
|
|
814
825
|
|
|
815
826
|
var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
|
|
@@ -53,7 +53,7 @@ interface UserDefinedMessageSubscriptionListInstance {
|
|
|
53
53
|
interface UserDefinedMessageSubscriptionListInstanceCreateOptions {
|
|
54
54
|
callback: string;
|
|
55
55
|
idempotencyKey?: string;
|
|
56
|
-
method
|
|
56
|
+
method?: string;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
interface UserDefinedMessageSubscriptionPayload extends UserDefinedMessageSubscriptionResource, Page.TwilioResponsePayload {
|
|
@@ -63,9 +63,9 @@ UserDefinedMessageSubscriptionList = function
|
|
|
63
63
|
* @param {object} opts - Options for request
|
|
64
64
|
* @param {string} opts.callback -
|
|
65
65
|
* The URL we should call to send user defined messages.
|
|
66
|
-
* @param {string} opts.method - HTTP method used with the callback.
|
|
67
66
|
* @param {string} [opts.idempotencyKey] -
|
|
68
67
|
* A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated.
|
|
68
|
+
* @param {string} [opts.method] - HTTP method used with the callback.
|
|
69
69
|
* @param {function} [callback] - Callback to handle processed record
|
|
70
70
|
*
|
|
71
71
|
* @returns {Promise} Resolves to processed UserDefinedMessageSubscriptionInstance
|
|
@@ -79,15 +79,12 @@ UserDefinedMessageSubscriptionList = function
|
|
|
79
79
|
if (_.isUndefined(opts['callback'])) {
|
|
80
80
|
throw new Error('Required parameter "opts[\'callback\']" missing.');
|
|
81
81
|
}
|
|
82
|
-
if (_.isUndefined(opts['method'])) {
|
|
83
|
-
throw new Error('Required parameter "opts[\'method\']" missing.');
|
|
84
|
-
}
|
|
85
82
|
|
|
86
83
|
var deferred = Q.defer();
|
|
87
84
|
var data = values.of({
|
|
88
85
|
'Callback': _.get(opts, 'callback'),
|
|
89
|
-
'
|
|
90
|
-
'
|
|
86
|
+
'IdempotencyKey': _.get(opts, 'idempotencyKey'),
|
|
87
|
+
'Method': _.get(opts, 'method')
|
|
91
88
|
});
|
|
92
89
|
|
|
93
90
|
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
@@ -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;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by
|
|
3
|
+
* \ / _ _ _| _ _
|
|
4
|
+
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
* / /
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import FlexApi = require('../FlexApi');
|
|
9
|
+
import Version = require('../../base/Version');
|
|
10
|
+
import { WebChannelsList } from './v2/webChannels';
|
|
11
|
+
import { WebChannelsListInstance } from './v2/webChannels';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
declare class V2 extends Version {
|
|
15
|
+
/**
|
|
16
|
+
* Initialize the V2 version of FlexApi
|
|
17
|
+
*
|
|
18
|
+
* @param domain - The twilio domain
|
|
19
|
+
*/
|
|
20
|
+
constructor(domain: FlexApi);
|
|
21
|
+
|
|
22
|
+
readonly webChannels: WebChannelsListInstance;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export = V2;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* jshint ignore:start */
|
|
4
|
+
/**
|
|
5
|
+
* This code was generated by
|
|
6
|
+
* \ / _ _ _| _ _
|
|
7
|
+
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
8
|
+
* / /
|
|
9
|
+
*/
|
|
10
|
+
/* jshint ignore:end */
|
|
11
|
+
|
|
12
|
+
var _ = require('lodash'); /* jshint ignore:line */
|
|
13
|
+
var Version = require('../../base/Version'); /* jshint ignore:line */
|
|
14
|
+
var WebChannelsList = require('./v2/webChannels').WebChannelsList;
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/* jshint ignore:start */
|
|
18
|
+
/**
|
|
19
|
+
* Initialize the V2 version of FlexApi
|
|
20
|
+
*
|
|
21
|
+
* @constructor Twilio.FlexApi.V2
|
|
22
|
+
*
|
|
23
|
+
* @property {Twilio.FlexApi.V2.WebChannelsList} webChannels - webChannels resource
|
|
24
|
+
*
|
|
25
|
+
* @param {Twilio.FlexApi} domain - The twilio domain
|
|
26
|
+
*/
|
|
27
|
+
/* jshint ignore:end */
|
|
28
|
+
function V2(domain) {
|
|
29
|
+
Version.prototype.constructor.call(this, domain, 'v2');
|
|
30
|
+
|
|
31
|
+
// Resources
|
|
32
|
+
this._webChannels = undefined;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
_.extend(V2.prototype, Version.prototype);
|
|
36
|
+
V2.prototype.constructor = V2;
|
|
37
|
+
|
|
38
|
+
Object.defineProperty(V2.prototype,
|
|
39
|
+
'webChannels', {
|
|
40
|
+
get: function() {
|
|
41
|
+
this._webChannels = this._webChannels || new WebChannelsList(this);
|
|
42
|
+
return this._webChannels;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
module.exports = V2;
|
|
@@ -45,7 +45,7 @@ interface GoodDataPayload extends GoodDataResource, Page.TwilioResponsePayload {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
interface GoodDataResource {
|
|
48
|
-
|
|
48
|
+
base_url: string;
|
|
49
49
|
session_expiry: string;
|
|
50
50
|
session_id: string;
|
|
51
51
|
url: string;
|
|
@@ -94,6 +94,7 @@ declare class GoodDataInstance extends SerializableClass {
|
|
|
94
94
|
constructor(version: V1, payload: GoodDataPayload);
|
|
95
95
|
|
|
96
96
|
private _proxy: GoodDataContext;
|
|
97
|
+
baseUrl: string;
|
|
97
98
|
/**
|
|
98
99
|
* create a GoodDataInstance
|
|
99
100
|
*
|
|
@@ -107,7 +108,6 @@ declare class GoodDataInstance extends SerializableClass {
|
|
|
107
108
|
* @param callback - Callback to handle processed record
|
|
108
109
|
*/
|
|
109
110
|
create(opts?: GoodDataInstanceCreateOptions, callback?: (error: Error | null, items: GoodDataInstance) => any): Promise<GoodDataInstance>;
|
|
110
|
-
gdBaseUrl: string;
|
|
111
111
|
sessionExpiry: string;
|
|
112
112
|
sessionId: string;
|
|
113
113
|
/**
|
|
@@ -153,10 +153,10 @@ GoodDataPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
153
153
|
*
|
|
154
154
|
* @constructor Twilio.FlexApi.V1.GoodDataInstance
|
|
155
155
|
*
|
|
156
|
-
* @property {string} workspaceId - Unique
|
|
156
|
+
* @property {string} workspaceId - Unique ID to identify the user's workspace
|
|
157
157
|
* @property {string} sessionExpiry - The session expiry date and time
|
|
158
158
|
* @property {string} sessionId - Unique session ID
|
|
159
|
-
* @property {string}
|
|
159
|
+
* @property {string} baseUrl - Base URL to fetch reports and dashboards
|
|
160
160
|
* @property {string} url - The URL of this resource.
|
|
161
161
|
*
|
|
162
162
|
* @param {V1} version - Version of the resource
|
|
@@ -170,7 +170,7 @@ GoodDataInstance = function GoodDataInstance(version, payload) {
|
|
|
170
170
|
this.workspaceId = payload.workspace_id; // jshint ignore:line
|
|
171
171
|
this.sessionExpiry = payload.session_expiry; // jshint ignore:line
|
|
172
172
|
this.sessionId = payload.session_id; // jshint ignore:line
|
|
173
|
-
this.
|
|
173
|
+
this.baseUrl = payload.base_url; // jshint ignore:line
|
|
174
174
|
this.url = payload.url; // jshint ignore:line
|
|
175
175
|
|
|
176
176
|
// Context
|
|
@@ -247,7 +247,7 @@ GoodDataContext = function GoodDataContext(version) {
|
|
|
247
247
|
|
|
248
248
|
// Path Solution
|
|
249
249
|
this._solution = {};
|
|
250
|
-
this._uri = `/
|
|
250
|
+
this._uri = `/Insights/Session`;
|
|
251
251
|
};
|
|
252
252
|
|
|
253
253
|
/* jshint ignore:start */
|