twilio 3.83.3 → 3.84.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 (63) hide show
  1. package/README.md +6 -0
  2. package/lib/rest/FlexApi.d.ts +6 -0
  3. package/lib/rest/FlexApi.js +27 -0
  4. package/lib/rest/Messaging.d.ts +4 -0
  5. package/lib/rest/Messaging.js +18 -0
  6. package/lib/rest/Oauth.d.ts +2 -0
  7. package/lib/rest/Oauth.js +8 -0
  8. package/lib/rest/Preview.d.ts +0 -10
  9. package/lib/rest/Preview.js +0 -46
  10. package/lib/rest/api/v2010/account/address.d.ts +6 -0
  11. package/lib/rest/api/v2010/account/address.js +13 -2
  12. package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.d.ts +1 -1
  13. package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.js +3 -6
  14. package/lib/rest/content/v1/content/approvalFetch.d.ts +139 -0
  15. package/lib/rest/content/v1/content/approvalFetch.js +328 -0
  16. package/lib/rest/content/v1/content.d.ts +7 -6
  17. package/lib/rest/content/v1/content.js +31 -31
  18. package/lib/rest/flexApi/V1.d.ts +3 -0
  19. package/lib/rest/flexApi/V1.js +11 -0
  20. package/lib/rest/flexApi/V2.d.ts +25 -0
  21. package/lib/rest/flexApi/V2.js +46 -0
  22. package/lib/rest/flexApi/v1/assessments.d.ts +113 -0
  23. package/lib/rest/flexApi/v1/assessments.js +300 -0
  24. package/lib/rest/flexApi/v1/goodData.d.ts +2 -2
  25. package/lib/rest/flexApi/v1/goodData.js +4 -4
  26. package/lib/rest/flexApi/v1/userRoles.js +1 -1
  27. package/lib/rest/flexApi/v2/webChannels.d.ts +101 -0
  28. package/lib/rest/flexApi/v2/webChannels.js +244 -0
  29. package/lib/rest/lookups/v2/phoneNumber.d.ts +22 -0
  30. package/lib/rest/lookups/v2/phoneNumber.js +43 -1
  31. package/lib/rest/messaging/V1.d.ts +6 -0
  32. package/lib/rest/messaging/V1.js +24 -0
  33. package/lib/rest/messaging/v1/domainCert.d.ts +178 -0
  34. package/lib/rest/messaging/v1/domainCert.js +447 -0
  35. package/lib/rest/messaging/v1/domainConfig.d.ts +172 -0
  36. package/lib/rest/messaging/v1/domainConfig.js +421 -0
  37. package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +1 -1
  38. package/lib/rest/messaging/v1/service/usAppToPerson.js +5 -2
  39. package/lib/rest/microvisor/v1/device.d.ts +2 -0
  40. package/lib/rest/microvisor/v1/device.js +2 -0
  41. package/lib/rest/oauth/V1.d.ts +3 -0
  42. package/lib/rest/oauth/V1.js +11 -0
  43. package/lib/rest/oauth/v1/deviceCode.d.ts +107 -0
  44. package/lib/rest/oauth/v1/deviceCode.js +258 -0
  45. package/lib/rest/oauth/v1/openidDiscovery.js +1 -1
  46. package/lib/rest/serverless/v1/service/build.d.ts +1 -1
  47. package/lib/rest/supersim/v1/settingsUpdate.d.ts +6 -0
  48. package/lib/rest/supersim/v1/settingsUpdate.js +7 -0
  49. package/lib/twiml/VoiceResponse.d.ts +7 -7
  50. package/lib/twiml/VoiceResponse.js +14 -14
  51. package/package.json +1 -1
  52. package/lib/rest/preview/TrustedComms.d.ts +0 -34
  53. package/lib/rest/preview/TrustedComms.js +0 -84
  54. package/lib/rest/preview/trusted_comms/brandedChannel/channel.d.ts +0 -120
  55. package/lib/rest/preview/trusted_comms/brandedChannel/channel.js +0 -257
  56. package/lib/rest/preview/trusted_comms/brandedChannel.d.ts +0 -150
  57. package/lib/rest/preview/trusted_comms/brandedChannel.js +0 -362
  58. package/lib/rest/preview/trusted_comms/brandsInformation.d.ts +0 -158
  59. package/lib/rest/preview/trusted_comms/brandsInformation.js +0 -338
  60. package/lib/rest/preview/trusted_comms/cps.d.ts +0 -156
  61. package/lib/rest/preview/trusted_comms/cps.js +0 -332
  62. package/lib/rest/preview/trusted_comms/currentCall.d.ts +0 -180
  63. package/lib/rest/preview/trusted_comms/currentCall.js +0 -367
@@ -27,12 +27,32 @@ declare function PhoneNumberList(version: V2): PhoneNumberListInstance;
27
27
  /**
28
28
  * Options to pass to fetch
29
29
  *
30
+ * @property addressCountryCode - User’s country, up to two characters.
31
+ * @property addressLine1 - User’s first address line.
32
+ * @property addressLine2 - User’s second address line.
33
+ * @property city - User’s city.
30
34
  * @property countryCode - Country code for national phone number lookups
35
+ * @property dateOfBirth - User’s date of birth, in YYYYMMDD format.
31
36
  * @property fields - Fields to return
37
+ * @property firstName - User’s first name.
38
+ * @property lastName - User’s last name.
39
+ * @property nationalId - User’s national ID, such as SSN or Passport ID.
40
+ * @property postalCode - User’s postal zip code.
41
+ * @property state - User’s country subdivision, such as state, province, or locality.
32
42
  */
33
43
  interface PhoneNumberInstanceFetchOptions {
44
+ addressCountryCode?: string;
45
+ addressLine1?: string;
46
+ addressLine2?: string;
47
+ city?: string;
34
48
  countryCode?: string;
49
+ dateOfBirth?: string;
35
50
  fields?: string;
51
+ firstName?: string;
52
+ lastName?: string;
53
+ nationalId?: string;
54
+ postalCode?: string;
55
+ state?: string;
36
56
  }
37
57
 
38
58
  interface PhoneNumberListInstance {
@@ -60,6 +80,7 @@ interface PhoneNumberResource {
60
80
  caller_name: object;
61
81
  calling_country_code: string;
62
82
  country_code: string;
83
+ identity_match: object;
63
84
  line_type_intelligence: object;
64
85
  live_activity: object;
65
86
  national_format: string;
@@ -137,6 +158,7 @@ declare class PhoneNumberInstance extends SerializableClass {
137
158
  * @param callback - Callback to handle processed record
138
159
  */
139
160
  fetch(opts?: PhoneNumberInstanceFetchOptions, callback?: (error: Error | null, items: PhoneNumberInstance) => any): Promise<PhoneNumberInstance>;
161
+ identityMatch: any;
140
162
  lineTypeIntelligence: any;
141
163
  liveActivity: any;
142
164
  nationalFormat: string;
@@ -181,6 +181,8 @@ PhoneNumberPage.prototype[util.inspect.custom] = function inspect(depth,
181
181
  * An object that contains live activity information
182
182
  * @property {object} lineTypeIntelligence -
183
183
  * An object that contains line type information
184
+ * @property {object} identityMatch -
185
+ * An object that contains identity match information
184
186
  * @property {string} url - The absolute URL of the resource
185
187
  *
186
188
  * @param {V2} version - Version of the resource
@@ -204,6 +206,7 @@ PhoneNumberInstance = function PhoneNumberInstance(version, payload,
204
206
  this.callForwarding = payload.call_forwarding; // jshint ignore:line
205
207
  this.liveActivity = payload.live_activity; // jshint ignore:line
206
208
  this.lineTypeIntelligence = payload.line_type_intelligence; // jshint ignore:line
209
+ this.identityMatch = payload.identity_match; // jshint ignore:line
207
210
  this.url = payload.url; // jshint ignore:line
208
211
 
209
212
  // Context
@@ -233,6 +236,19 @@ Object.defineProperty(PhoneNumberInstance.prototype,
233
236
  * @param {string} [opts.fields] - Fields to return
234
237
  * @param {string} [opts.countryCode] -
235
238
  * Country code for national phone number lookups
239
+ * @param {string} [opts.firstName] - User’s first name.
240
+ * @param {string} [opts.lastName] - User’s last name.
241
+ * @param {string} [opts.addressLine1] - User’s first address line.
242
+ * @param {string} [opts.addressLine2] - User’s second address line.
243
+ * @param {string} [opts.city] - User’s city.
244
+ * @param {string} [opts.state] -
245
+ * User’s country subdivision, such as state, province, or locality.
246
+ * @param {string} [opts.postalCode] - User’s postal zip code.
247
+ * @param {string} [opts.addressCountryCode] -
248
+ * User’s country, up to two characters.
249
+ * @param {string} [opts.nationalId] -
250
+ * User’s national ID, such as SSN or Passport ID.
251
+ * @param {string} [opts.dateOfBirth] - User’s date of birth, in YYYYMMDD format.
236
252
  * @param {function} [callback] - Callback to handle processed record
237
253
  *
238
254
  * @returns {Promise} Resolves to processed PhoneNumberInstance
@@ -300,6 +316,19 @@ PhoneNumberContext = function PhoneNumberContext(version, phoneNumber) {
300
316
  * @param {string} [opts.fields] - Fields to return
301
317
  * @param {string} [opts.countryCode] -
302
318
  * Country code for national phone number lookups
319
+ * @param {string} [opts.firstName] - User’s first name.
320
+ * @param {string} [opts.lastName] - User’s last name.
321
+ * @param {string} [opts.addressLine1] - User’s first address line.
322
+ * @param {string} [opts.addressLine2] - User’s second address line.
323
+ * @param {string} [opts.city] - User’s city.
324
+ * @param {string} [opts.state] -
325
+ * User’s country subdivision, such as state, province, or locality.
326
+ * @param {string} [opts.postalCode] - User’s postal zip code.
327
+ * @param {string} [opts.addressCountryCode] -
328
+ * User’s country, up to two characters.
329
+ * @param {string} [opts.nationalId] -
330
+ * User’s national ID, such as SSN or Passport ID.
331
+ * @param {string} [opts.dateOfBirth] - User’s date of birth, in YYYYMMDD format.
303
332
  * @param {function} [callback] - Callback to handle processed record
304
333
  *
305
334
  * @returns {Promise} Resolves to processed PhoneNumberInstance
@@ -313,7 +342,20 @@ PhoneNumberContext.prototype.fetch = function fetch(opts, callback) {
313
342
  opts = opts || {};
314
343
 
315
344
  var deferred = Q.defer();
316
- var data = values.of({'Fields': _.get(opts, 'fields'), 'CountryCode': _.get(opts, 'countryCode')});
345
+ var data = values.of({
346
+ 'Fields': _.get(opts, 'fields'),
347
+ 'CountryCode': _.get(opts, 'countryCode'),
348
+ 'FirstName': _.get(opts, 'firstName'),
349
+ 'LastName': _.get(opts, 'lastName'),
350
+ 'AddressLine1': _.get(opts, 'addressLine1'),
351
+ 'AddressLine2': _.get(opts, 'addressLine2'),
352
+ 'City': _.get(opts, 'city'),
353
+ 'State': _.get(opts, 'state'),
354
+ 'PostalCode': _.get(opts, 'postalCode'),
355
+ 'AddressCountryCode': _.get(opts, 'addressCountryCode'),
356
+ 'NationalId': _.get(opts, 'nationalId'),
357
+ 'DateOfBirth': _.get(opts, 'dateOfBirth')
358
+ });
317
359
 
318
360
  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});
319
361
 
@@ -11,6 +11,10 @@ import { BrandRegistrationList } from './v1/brandRegistration';
11
11
  import { BrandRegistrationListInstance } from './v1/brandRegistration';
12
12
  import { DeactivationsList } from './v1/deactivation';
13
13
  import { DeactivationsListInstance } from './v1/deactivation';
14
+ import { DomainCertsList } from './v1/domainCert';
15
+ import { DomainCertsListInstance } from './v1/domainCert';
16
+ import { DomainConfigList } from './v1/domainConfig';
17
+ import { DomainConfigListInstance } from './v1/domainConfig';
14
18
  import { ExternalCampaignList } from './v1/externalCampaign';
15
19
  import { ExternalCampaignListInstance } from './v1/externalCampaign';
16
20
  import { ServiceList } from './v1/service';
@@ -31,6 +35,8 @@ declare class V1 extends Version {
31
35
 
32
36
  readonly brandRegistrations: BrandRegistrationListInstance;
33
37
  readonly deactivations: DeactivationsListInstance;
38
+ readonly domainCerts: DomainCertsListInstance;
39
+ readonly domainConfig: DomainConfigListInstance;
34
40
  readonly externalCampaign: ExternalCampaignListInstance;
35
41
  readonly services: ServiceListInstance;
36
42
  readonly tollfreeVerifications: TollfreeVerificationListInstance;
@@ -13,6 +13,8 @@ var _ = require('lodash'); /* jshint ignore:line */
13
13
  var BrandRegistrationList = require(
14
14
  './v1/brandRegistration').BrandRegistrationList;
15
15
  var DeactivationsList = require('./v1/deactivation').DeactivationsList;
16
+ var DomainCertsList = require('./v1/domainCert').DomainCertsList;
17
+ var DomainConfigList = require('./v1/domainConfig').DomainConfigList;
16
18
  var ExternalCampaignList = require(
17
19
  './v1/externalCampaign').ExternalCampaignList;
18
20
  var ServiceList = require('./v1/service').ServiceList;
@@ -32,6 +34,10 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
32
34
  * brandRegistrations resource
33
35
  * @property {Twilio.Messaging.V1.DeactivationsList} deactivations -
34
36
  * deactivations resource
37
+ * @property {Twilio.Messaging.V1.DomainCertsList} domainCerts -
38
+ * domainCerts resource
39
+ * @property {Twilio.Messaging.V1.DomainConfigList} domainConfig -
40
+ * domainConfig resource
35
41
  * @property {Twilio.Messaging.V1.ExternalCampaignList} externalCampaign -
36
42
  * externalCampaign resource
37
43
  * @property {Twilio.Messaging.V1.ServiceList} services - services resource
@@ -48,6 +54,8 @@ function V1(domain) {
48
54
  // Resources
49
55
  this._brandRegistrations = undefined;
50
56
  this._deactivations = undefined;
57
+ this._domainCerts = undefined;
58
+ this._domainConfig = undefined;
51
59
  this._externalCampaign = undefined;
52
60
  this._services = undefined;
53
61
  this._tollfreeVerifications = undefined;
@@ -73,6 +81,22 @@ Object.defineProperty(V1.prototype,
73
81
  }
74
82
  });
75
83
 
84
+ Object.defineProperty(V1.prototype,
85
+ 'domainCerts', {
86
+ get: function() {
87
+ this._domainCerts = this._domainCerts || new DomainCertsList(this);
88
+ return this._domainCerts;
89
+ }
90
+ });
91
+
92
+ Object.defineProperty(V1.prototype,
93
+ 'domainConfig', {
94
+ get: function() {
95
+ this._domainConfig = this._domainConfig || new DomainConfigList(this);
96
+ return this._domainConfig;
97
+ }
98
+ });
99
+
76
100
  Object.defineProperty(V1.prototype,
77
101
  'externalCampaign', {
78
102
  get: function() {
@@ -0,0 +1,178 @@
1
+ /**
2
+ * This code was generated by
3
+ * \ / _ _ _| _ _
4
+ * | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ * / /
6
+ */
7
+
8
+ import Page = require('../../../base/Page');
9
+ import Response = require('../../../http/response');
10
+ import V1 = require('../V1');
11
+ import { SerializableClass } from '../../../interfaces';
12
+
13
+ /**
14
+ * Initialize the DomainCertsList
15
+ *
16
+ * PLEASE NOTE that this class contains beta products that are subject to change.
17
+ * Use them with caution.
18
+ *
19
+ * @param version - Version of the resource
20
+ */
21
+ declare function DomainCertsList(version: V1): DomainCertsListInstance;
22
+
23
+ /**
24
+ * Options to pass to update
25
+ *
26
+ * @property tlsCert - Certificate and private key information for this domain.
27
+ */
28
+ interface DomainCertsInstanceUpdateOptions {
29
+ tlsCert: string;
30
+ }
31
+
32
+ interface DomainCertsListInstance {
33
+ /**
34
+ * @param sid - sid of instance
35
+ */
36
+ (sid: string): DomainCertsContext;
37
+ /**
38
+ * Constructs a domain_certs
39
+ *
40
+ * @param domainSid - Unique string used to identify the domain that this certificate should be associated with.
41
+ */
42
+ get(domainSid: string): DomainCertsContext;
43
+ /**
44
+ * Provide a user-friendly representation
45
+ */
46
+ toJSON(): any;
47
+ }
48
+
49
+ interface DomainCertsPayload extends DomainCertsResource, Page.TwilioResponsePayload {
50
+ }
51
+
52
+ interface DomainCertsResource {
53
+ certificate_sid: string;
54
+ date_created: Date;
55
+ date_expires: Date;
56
+ date_updated: Date;
57
+ domain_name: string;
58
+ domain_sid: string;
59
+ url: string;
60
+ validated: boolean;
61
+ }
62
+
63
+ interface DomainCertsSolution {
64
+ }
65
+
66
+
67
+ declare class DomainCertsContext {
68
+ /**
69
+ * Initialize the DomainCertsContext
70
+ *
71
+ * PLEASE NOTE that this class contains beta products that are subject to change.
72
+ * Use them with caution.
73
+ *
74
+ * @param version - Version of the resource
75
+ * @param domainSid - Unique string used to identify the domain that this certificate should be associated with.
76
+ */
77
+ constructor(version: V1, domainSid: string);
78
+
79
+ /**
80
+ * fetch a DomainCertsInstance
81
+ *
82
+ * @param callback - Callback to handle processed record
83
+ */
84
+ fetch(callback?: (error: Error | null, items: DomainCertsInstance) => any): Promise<DomainCertsInstance>;
85
+ /**
86
+ * remove a DomainCertsInstance
87
+ *
88
+ * @param callback - Callback to handle processed record
89
+ */
90
+ remove(callback?: (error: Error | null, items: DomainCertsInstance) => any): Promise<boolean>;
91
+ /**
92
+ * Provide a user-friendly representation
93
+ */
94
+ toJSON(): any;
95
+ /**
96
+ * update a DomainCertsInstance
97
+ *
98
+ * @param opts - Options for request
99
+ * @param callback - Callback to handle processed record
100
+ */
101
+ update(opts: DomainCertsInstanceUpdateOptions, callback?: (error: Error | null, items: DomainCertsInstance) => any): Promise<DomainCertsInstance>;
102
+ }
103
+
104
+
105
+ declare class DomainCertsInstance extends SerializableClass {
106
+ /**
107
+ * Initialize the DomainCertsContext
108
+ *
109
+ * PLEASE NOTE that this class contains beta products that are subject to change.
110
+ * Use them with caution.
111
+ *
112
+ * @param version - Version of the resource
113
+ * @param payload - The instance payload
114
+ * @param domainSid - Unique string used to identify the domain that this certificate should be associated with.
115
+ */
116
+ constructor(version: V1, payload: DomainCertsPayload, domainSid: string);
117
+
118
+ private _proxy: DomainCertsContext;
119
+ certificateSid: string;
120
+ dateCreated: Date;
121
+ dateExpires: Date;
122
+ dateUpdated: Date;
123
+ domainName: string;
124
+ domainSid: string;
125
+ /**
126
+ * fetch a DomainCertsInstance
127
+ *
128
+ * @param callback - Callback to handle processed record
129
+ */
130
+ fetch(callback?: (error: Error | null, items: DomainCertsInstance) => any): Promise<DomainCertsInstance>;
131
+ /**
132
+ * remove a DomainCertsInstance
133
+ *
134
+ * @param callback - Callback to handle processed record
135
+ */
136
+ remove(callback?: (error: Error | null, items: DomainCertsInstance) => any): Promise<boolean>;
137
+ /**
138
+ * Provide a user-friendly representation
139
+ */
140
+ toJSON(): any;
141
+ /**
142
+ * update a DomainCertsInstance
143
+ *
144
+ * @param opts - Options for request
145
+ * @param callback - Callback to handle processed record
146
+ */
147
+ update(opts: DomainCertsInstanceUpdateOptions, callback?: (error: Error | null, items: DomainCertsInstance) => any): Promise<DomainCertsInstance>;
148
+ url: string;
149
+ validated: boolean;
150
+ }
151
+
152
+
153
+ declare class DomainCertsPage extends Page<V1, DomainCertsPayload, DomainCertsResource, DomainCertsInstance> {
154
+ /**
155
+ * Initialize the DomainCertsPage
156
+ *
157
+ * PLEASE NOTE that this class contains beta products that are subject to change.
158
+ * Use them with caution.
159
+ *
160
+ * @param version - Version of the resource
161
+ * @param response - Response from the API
162
+ * @param solution - Path solution
163
+ */
164
+ constructor(version: V1, response: Response<string>, solution: DomainCertsSolution);
165
+
166
+ /**
167
+ * Build an instance of DomainCertsInstance
168
+ *
169
+ * @param payload - Payload response from the API
170
+ */
171
+ getInstance(payload: DomainCertsPayload): DomainCertsInstance;
172
+ /**
173
+ * Provide a user-friendly representation
174
+ */
175
+ toJSON(): any;
176
+ }
177
+
178
+ export { DomainCertsContext, DomainCertsInstance, DomainCertsInstanceUpdateOptions, DomainCertsList, DomainCertsListInstance, DomainCertsPage, DomainCertsPayload, DomainCertsResource, DomainCertsSolution }