twilio 3.70.0 → 3.72.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 (60) hide show
  1. package/CHANGES.md +100 -0
  2. package/README.md +1 -1
  3. package/lib/jwt/ClientCapability.d.ts +1 -1
  4. package/lib/rest/Insights.d.ts +2 -0
  5. package/lib/rest/Insights.js +8 -0
  6. package/lib/rest/Supersim.d.ts +2 -0
  7. package/lib/rest/Supersim.js +8 -0
  8. package/lib/rest/Voice.d.ts +2 -0
  9. package/lib/rest/Voice.js +9 -0
  10. package/lib/rest/api/v2010/account/call.d.ts +1 -1
  11. package/lib/rest/api/v2010/account/call.js +1 -1
  12. package/lib/rest/api/v2010/account/message.d.ts +2 -0
  13. package/lib/rest/api/v2010/account/message.js +4 -1
  14. package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +172 -0
  15. package/lib/rest/conversations/v1/service/configuration/webhook.js +400 -0
  16. package/lib/rest/conversations/v1/service/configuration.d.ts +2 -0
  17. package/lib/rest/conversations/v1/service/configuration.js +13 -0
  18. package/lib/rest/flexApi/v1/configuration.d.ts +4 -0
  19. package/lib/rest/flexApi/v1/configuration.js +5 -0
  20. package/lib/rest/frontlineApi/v1/user.d.ts +4 -0
  21. package/lib/rest/frontlineApi/v1/user.js +10 -1
  22. package/lib/rest/insights/V1.d.ts +3 -0
  23. package/lib/rest/insights/V1.js +11 -0
  24. package/lib/rest/insights/v1/setting.d.ts +181 -0
  25. package/lib/rest/insights/v1/setting.js +384 -0
  26. package/lib/rest/media/v1/mediaProcessor.d.ts +4 -0
  27. package/lib/rest/media/v1/mediaProcessor.js +5 -1
  28. package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +46 -2
  29. package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +139 -5
  30. package/lib/rest/messaging/v1/brandRegistration.d.ts +1 -1
  31. package/lib/rest/messaging/v1/brandRegistration.js +1 -1
  32. package/lib/rest/serverless/v1/service/build.d.ts +1 -1
  33. package/lib/rest/supersim/V1.d.ts +3 -0
  34. package/lib/rest/supersim/V1.js +11 -0
  35. package/lib/rest/supersim/v1/ipCommand.d.ts +362 -0
  36. package/lib/rest/supersim/v1/ipCommand.js +679 -0
  37. package/lib/rest/verify/v2/service/accessToken.d.ts +2 -0
  38. package/lib/rest/verify/v2/service/accessToken.js +3 -1
  39. package/lib/rest/verify/v2/service/entity/factor.d.ts +4 -2
  40. package/lib/rest/verify/v2/service/entity/factor.js +8 -3
  41. package/lib/rest/verify/v2/service/entity/newFactor.d.ts +2 -2
  42. package/lib/rest/verify/v2/service/entity/newFactor.js +1 -1
  43. package/lib/rest/verify/v2/service/verification.d.ts +4 -0
  44. package/lib/rest/verify/v2/service/verification.js +6 -1
  45. package/lib/rest/verify/v2/service.d.ts +6 -0
  46. package/lib/rest/verify/v2/service.js +12 -2
  47. package/lib/rest/verify/v2/verificationAttempt.d.ts +1 -1
  48. package/lib/rest/video/v1/room.d.ts +12 -0
  49. package/lib/rest/video/v1/room.js +19 -1
  50. package/lib/rest/voice/V1.d.ts +3 -0
  51. package/lib/rest/voice/V1.js +12 -0
  52. package/lib/rest/voice/v1/archivedCall.d.ts +136 -0
  53. package/lib/rest/voice/v1/archivedCall.js +325 -0
  54. package/lib/rest/wireless/v1/ratePlan.d.ts +1 -1
  55. package/lib/rest/wireless/v1/ratePlan.js +3 -3
  56. package/lib/rest/wireless/v1/sim.d.ts +4 -4
  57. package/lib/rest/wireless/v1/sim.js +17 -27
  58. package/lib/twiml/VoiceResponse.d.ts +1296 -24
  59. package/lib/twiml/VoiceResponse.js +2170 -82
  60. package/package.json +1 -1
@@ -20,6 +20,7 @@ var values = require('../../../../base/values'); /* jshint ignore:line */
20
20
  var BrandVettingList;
21
21
  var BrandVettingPage;
22
22
  var BrandVettingInstance;
23
+ var BrandVettingContext;
23
24
 
24
25
  /* jshint ignore:start */
25
26
  /**
@@ -86,7 +87,12 @@ BrandVettingList = function BrandVettingList(version, brandSid) {
86
87
  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
87
88
 
88
89
  promise = promise.then(function(payload) {
89
- deferred.resolve(new BrandVettingInstance(this._version, payload));
90
+ deferred.resolve(new BrandVettingInstance(
91
+ this._version,
92
+ payload,
93
+ this._solution.brandSid,
94
+ this._solution.brandVettingSid
95
+ ));
90
96
  }.bind(this));
91
97
 
92
98
  promise.catch(function(error) {
@@ -349,6 +355,22 @@ BrandVettingList = function BrandVettingList(version, brandSid) {
349
355
  return deferred.promise;
350
356
  };
351
357
 
358
+ /* jshint ignore:start */
359
+ /**
360
+ * Constructs a brand_vetting
361
+ *
362
+ * @function get
363
+ * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingList#
364
+ *
365
+ * @param {string} brandVettingSid - SID for third-party vetting record
366
+ *
367
+ * @returns {Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingContext}
368
+ */
369
+ /* jshint ignore:end */
370
+ BrandVettingListInstance.get = function get(brandVettingSid) {
371
+ return new BrandVettingContext(this._version, this._solution.brandSid, brandVettingSid);
372
+ };
373
+
352
374
  /* jshint ignore:start */
353
375
  /**
354
376
  * Provide a user-friendly representation
@@ -466,10 +488,11 @@ BrandVettingPage.prototype[util.inspect.custom] = function inspect(depth,
466
488
  * @param {V1} version - Version of the resource
467
489
  * @param {BrandVettingPayload} payload - The instance payload
468
490
  * @param {sid} brandSid - A2P BrandRegistration Sid
491
+ * @param {sid} brandVettingSid - SID for third-party vetting record
469
492
  */
470
493
  /* jshint ignore:end */
471
- BrandVettingInstance = function BrandVettingInstance(version, payload, brandSid)
472
- {
494
+ BrandVettingInstance = function BrandVettingInstance(version, payload, brandSid,
495
+ brandVettingSid) {
473
496
  this._version = version;
474
497
 
475
498
  // Marshaled Properties
@@ -486,7 +509,38 @@ BrandVettingInstance = function BrandVettingInstance(version, payload, brandSid)
486
509
 
487
510
  // Context
488
511
  this._context = undefined;
489
- this._solution = {brandSid: brandSid, };
512
+ this._solution = {brandSid: brandSid, brandVettingSid: brandVettingSid || this.brandVettingSid, };
513
+ };
514
+
515
+ Object.defineProperty(BrandVettingInstance.prototype,
516
+ '_proxy', {
517
+ get: function() {
518
+ if (!this._context) {
519
+ this._context = new BrandVettingContext(
520
+ this._version,
521
+ this._solution.brandSid,
522
+ this._solution.brandVettingSid
523
+ );
524
+ }
525
+
526
+ return this._context;
527
+ }
528
+ });
529
+
530
+ /* jshint ignore:start */
531
+ /**
532
+ * fetch a BrandVettingInstance
533
+ *
534
+ * @function fetch
535
+ * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingInstance#
536
+ *
537
+ * @param {function} [callback] - Callback to handle processed record
538
+ *
539
+ * @returns {Promise} Resolves to processed BrandVettingInstance
540
+ */
541
+ /* jshint ignore:end */
542
+ BrandVettingInstance.prototype.fetch = function fetch(callback) {
543
+ return this._proxy.fetch(callback);
490
544
  };
491
545
 
492
546
  /* jshint ignore:start */
@@ -514,8 +568,88 @@ BrandVettingInstance.prototype[util.inspect.custom] = function inspect(depth,
514
568
  return util.inspect(this.toJSON(), options);
515
569
  };
516
570
 
571
+
572
+ /* jshint ignore:start */
573
+ /**
574
+ * Initialize the BrandVettingContext
575
+ *
576
+ * PLEASE NOTE that this class contains beta products that are subject to change.
577
+ * Use them with caution.
578
+ *
579
+ * @constructor Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingContext
580
+ *
581
+ * @param {V1} version - Version of the resource
582
+ * @param {sid} brandSid - A2P BrandRegistration Sid
583
+ * @param {sid} brandVettingSid - SID for third-party vetting record
584
+ */
585
+ /* jshint ignore:end */
586
+ BrandVettingContext = function BrandVettingContext(version, brandSid,
587
+ brandVettingSid) {
588
+ this._version = version;
589
+
590
+ // Path Solution
591
+ this._solution = {brandSid: brandSid, brandVettingSid: brandVettingSid, };
592
+ this._uri = `/a2p/BrandRegistrations/${brandSid}/Vettings/${brandVettingSid}`;
593
+ };
594
+
595
+ /* jshint ignore:start */
596
+ /**
597
+ * fetch a BrandVettingInstance
598
+ *
599
+ * @function fetch
600
+ * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingContext#
601
+ *
602
+ * @param {function} [callback] - Callback to handle processed record
603
+ *
604
+ * @returns {Promise} Resolves to processed BrandVettingInstance
605
+ */
606
+ /* jshint ignore:end */
607
+ BrandVettingContext.prototype.fetch = function fetch(callback) {
608
+ var deferred = Q.defer();
609
+ var promise = this._version.fetch({uri: this._uri, method: 'GET'});
610
+
611
+ promise = promise.then(function(payload) {
612
+ deferred.resolve(new BrandVettingInstance(
613
+ this._version,
614
+ payload,
615
+ this._solution.brandSid,
616
+ this._solution.brandVettingSid
617
+ ));
618
+ }.bind(this));
619
+
620
+ promise.catch(function(error) {
621
+ deferred.reject(error);
622
+ });
623
+
624
+ if (_.isFunction(callback)) {
625
+ deferred.promise.nodeify(callback);
626
+ }
627
+
628
+ return deferred.promise;
629
+ };
630
+
631
+ /* jshint ignore:start */
632
+ /**
633
+ * Provide a user-friendly representation
634
+ *
635
+ * @function toJSON
636
+ * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingContext#
637
+ *
638
+ * @returns Object
639
+ */
640
+ /* jshint ignore:end */
641
+ BrandVettingContext.prototype.toJSON = function toJSON() {
642
+ return this._solution;
643
+ };
644
+
645
+ BrandVettingContext.prototype[util.inspect.custom] = function inspect(depth,
646
+ options) {
647
+ return util.inspect(this.toJSON(), options);
648
+ };
649
+
517
650
  module.exports = {
518
651
  BrandVettingList: BrandVettingList,
519
652
  BrandVettingPage: BrandVettingPage,
520
- BrandVettingInstance: BrandVettingInstance
653
+ BrandVettingInstance: BrandVettingInstance,
654
+ BrandVettingContext: BrandVettingContext
521
655
  };
@@ -16,7 +16,7 @@ type BrandRegistrationBrandFeedback = 'TAX_ID'|'STOCK_SYMBOL'|'NONPROFIT'|'GOVER
16
16
 
17
17
  type BrandRegistrationIdentityStatus = 'SELF_DECLARED'|'UNVERIFIED'|'VERIFIED'|'VETTED_VERIFIED';
18
18
 
19
- type BrandRegistrationStatus = 'PENDING'|'APPROVED'|'FAILED';
19
+ type BrandRegistrationStatus = 'PENDING'|'APPROVED'|'FAILED'|'IN_REVIEW'|'DELETED';
20
20
 
21
21
  /**
22
22
  * Initialize the BrandRegistrationList
@@ -482,7 +482,7 @@ BrandRegistrationPage.prototype[util.inspect.custom] = function inspect(depth,
482
482
  * @property {Date} dateUpdated -
483
483
  * The ISO 8601 date and time in GMT when the resource was last updated
484
484
  * @property {string} brandType - Type of brand. One of: "STANDARD", "STARTER".
485
- * @property {brand_registration.status} status - Brand Registration status
485
+ * @property {brand_registration.status} status - Brand Registration status.
486
486
  * @property {string} tcrId - Campaign Registry (TCR) Brand ID
487
487
  * @property {string} failureReason - A reason why brand registration has failed
488
488
  * @property {string} url - The absolute URL of the Brand Registration
@@ -12,7 +12,7 @@ import { BuildStatusList } from './build/buildStatus';
12
12
  import { BuildStatusListInstance } from './build/buildStatus';
13
13
  import { SerializableClass } from '../../../../interfaces';
14
14
 
15
- type BuildRuntime = 'node8'|'node10'|'node12';
15
+ type BuildRuntime = 'node8'|'node10'|'node12'|'node14';
16
16
 
17
17
  type BuildStatus = 'building'|'completed'|'failed';
18
18
 
@@ -11,6 +11,8 @@ import { CommandList } from './v1/command';
11
11
  import { CommandListInstance } from './v1/command';
12
12
  import { FleetList } from './v1/fleet';
13
13
  import { FleetListInstance } from './v1/fleet';
14
+ import { IpCommandList } from './v1/ipCommand';
15
+ import { IpCommandListInstance } from './v1/ipCommand';
14
16
  import { NetworkAccessProfileList } from './v1/networkAccessProfile';
15
17
  import { NetworkAccessProfileListInstance } from './v1/networkAccessProfile';
16
18
  import { NetworkList } from './v1/network';
@@ -33,6 +35,7 @@ declare class V1 extends Version {
33
35
 
34
36
  readonly commands: CommandListInstance;
35
37
  readonly fleets: FleetListInstance;
38
+ readonly ipCommands: IpCommandListInstance;
36
39
  readonly networkAccessProfiles: NetworkAccessProfileListInstance;
37
40
  readonly networks: NetworkListInstance;
38
41
  readonly sims: SimListInstance;
@@ -12,6 +12,7 @@
12
12
  var _ = require('lodash'); /* jshint ignore:line */
13
13
  var CommandList = require('./v1/command').CommandList;
14
14
  var FleetList = require('./v1/fleet').FleetList;
15
+ var IpCommandList = require('./v1/ipCommand').IpCommandList;
15
16
  var NetworkAccessProfileList = require(
16
17
  './v1/networkAccessProfile').NetworkAccessProfileList;
17
18
  var NetworkList = require('./v1/network').NetworkList;
@@ -29,6 +30,7 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
29
30
  *
30
31
  * @property {Twilio.Supersim.V1.CommandList} commands - commands resource
31
32
  * @property {Twilio.Supersim.V1.FleetList} fleets - fleets resource
33
+ * @property {Twilio.Supersim.V1.IpCommandList} ipCommands - ipCommands resource
32
34
  * @property {Twilio.Supersim.V1.NetworkList} networks - networks resource
33
35
  * @property {Twilio.Supersim.V1.NetworkAccessProfileList} networkAccessProfiles -
34
36
  * networkAccessProfiles resource
@@ -46,6 +48,7 @@ function V1(domain) {
46
48
  // Resources
47
49
  this._commands = undefined;
48
50
  this._fleets = undefined;
51
+ this._ipCommands = undefined;
49
52
  this._networks = undefined;
50
53
  this._networkAccessProfiles = undefined;
51
54
  this._sims = undefined;
@@ -72,6 +75,14 @@ Object.defineProperty(V1.prototype,
72
75
  }
73
76
  });
74
77
 
78
+ Object.defineProperty(V1.prototype,
79
+ 'ipCommands', {
80
+ get: function() {
81
+ this._ipCommands = this._ipCommands || new IpCommandList(this);
82
+ return this._ipCommands;
83
+ }
84
+ });
85
+
75
86
  Object.defineProperty(V1.prototype,
76
87
  'networks', {
77
88
  get: function() {
@@ -0,0 +1,362 @@
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
+ type IpCommandDirection = 'to_sim'|'from_sim';
14
+
15
+ type IpCommandPayloadType = 'text'|'binary';
16
+
17
+ type IpCommandStatus = 'queued'|'sent'|'received'|'failed';
18
+
19
+ /**
20
+ * Initialize the IpCommandList
21
+ *
22
+ * PLEASE NOTE that this class contains beta products that are subject to change.
23
+ * Use them with caution.
24
+ *
25
+ * @param version - Version of the resource
26
+ */
27
+ declare function IpCommandList(version: V1): IpCommandListInstance;
28
+
29
+ interface IpCommandListInstance {
30
+ /**
31
+ * @param sid - sid of instance
32
+ */
33
+ (sid: string): IpCommandContext;
34
+ /**
35
+ * create a IpCommandInstance
36
+ *
37
+ * @param opts - Options for request
38
+ * @param callback - Callback to handle processed record
39
+ */
40
+ create(opts: IpCommandListInstanceCreateOptions, callback?: (error: Error | null, item: IpCommandInstance) => any): Promise<IpCommandInstance>;
41
+ /**
42
+ * Streams IpCommandInstance records from the API.
43
+ *
44
+ * This operation lazily loads records as efficiently as possible until the limit
45
+ * is reached.
46
+ *
47
+ * The results are passed into the callback function, so this operation is memory
48
+ * efficient.
49
+ *
50
+ * If a function is passed as the first argument, it will be used as the callback
51
+ * function.
52
+ *
53
+ * @param callback - Function to process each record
54
+ */
55
+ each(callback?: (item: IpCommandInstance, done: (err?: Error) => void) => void): void;
56
+ /**
57
+ * Streams IpCommandInstance records from the API.
58
+ *
59
+ * This operation lazily loads records as efficiently as possible until the limit
60
+ * is reached.
61
+ *
62
+ * The results are passed into the callback function, so this operation is memory
63
+ * efficient.
64
+ *
65
+ * If a function is passed as the first argument, it will be used as the callback
66
+ * function.
67
+ *
68
+ * @param opts - Options for request
69
+ * @param callback - Function to process each record
70
+ */
71
+ each(opts?: IpCommandListInstanceEachOptions, callback?: (item: IpCommandInstance, done: (err?: Error) => void) => void): void;
72
+ /**
73
+ * Constructs a ip_command
74
+ *
75
+ * @param sid - The SID that identifies the resource to fetch
76
+ */
77
+ get(sid: string): IpCommandContext;
78
+ /**
79
+ * Retrieve a single target page of IpCommandInstance records from the API.
80
+ *
81
+ * The request is executed immediately.
82
+ *
83
+ * If a function is passed as the first argument, it will be used as the callback
84
+ * function.
85
+ *
86
+ * @param callback - Callback to handle list of records
87
+ */
88
+ getPage(callback?: (error: Error | null, items: IpCommandPage) => any): Promise<IpCommandPage>;
89
+ /**
90
+ * Retrieve a single target page of IpCommandInstance records from the API.
91
+ *
92
+ * The request is executed immediately.
93
+ *
94
+ * If a function is passed as the first argument, it will be used as the callback
95
+ * function.
96
+ *
97
+ * @param targetUrl - API-generated URL for the requested results page
98
+ * @param callback - Callback to handle list of records
99
+ */
100
+ getPage(targetUrl?: string, callback?: (error: Error | null, items: IpCommandPage) => any): Promise<IpCommandPage>;
101
+ /**
102
+ * Lists IpCommandInstance records from the API as a list.
103
+ *
104
+ * If a function is passed as the first argument, it will be used as the callback
105
+ * function.
106
+ *
107
+ * @param callback - Callback to handle list of records
108
+ */
109
+ list(callback?: (error: Error | null, items: IpCommandInstance[]) => any): Promise<IpCommandInstance[]>;
110
+ /**
111
+ * Lists IpCommandInstance records from the API as a list.
112
+ *
113
+ * If a function is passed as the first argument, it will be used as the callback
114
+ * function.
115
+ *
116
+ * @param opts - Options for request
117
+ * @param callback - Callback to handle list of records
118
+ */
119
+ list(opts?: IpCommandListInstanceOptions, callback?: (error: Error | null, items: IpCommandInstance[]) => any): Promise<IpCommandInstance[]>;
120
+ /**
121
+ * Retrieve a single page of IpCommandInstance records from the API.
122
+ *
123
+ * The request is executed immediately.
124
+ *
125
+ * If a function is passed as the first argument, it will be used as the callback
126
+ * function.
127
+ *
128
+ * @param callback - Callback to handle list of records
129
+ */
130
+ page(callback?: (error: Error | null, items: IpCommandPage) => any): Promise<IpCommandPage>;
131
+ /**
132
+ * Retrieve a single page of IpCommandInstance records from the API.
133
+ *
134
+ * The request is executed immediately.
135
+ *
136
+ * If a function is passed as the first argument, it will be used as the callback
137
+ * function.
138
+ *
139
+ * @param opts - Options for request
140
+ * @param callback - Callback to handle list of records
141
+ */
142
+ page(opts?: IpCommandListInstancePageOptions, callback?: (error: Error | null, items: IpCommandPage) => any): Promise<IpCommandPage>;
143
+ /**
144
+ * Provide a user-friendly representation
145
+ */
146
+ toJSON(): any;
147
+ }
148
+
149
+ /**
150
+ * Options to pass to create
151
+ *
152
+ * @property callbackMethod - The HTTP method we should use to call callback_url
153
+ * @property callbackUrl - The URL we should call after we have sent the IP Command
154
+ * @property devicePort - The device port to which the IP Command will be sent
155
+ * @property payload - The payload to be delivered to the device
156
+ * @property payloadType - Indicates how the payload is encoded
157
+ * @property sim - The sid or unique_name of the Super SIM to send the IP Command to
158
+ */
159
+ interface IpCommandListInstanceCreateOptions {
160
+ callbackMethod?: string;
161
+ callbackUrl?: string;
162
+ devicePort: number;
163
+ payload: string;
164
+ payloadType?: IpCommandPayloadType;
165
+ sim: string;
166
+ }
167
+
168
+ /**
169
+ * Options to pass to each
170
+ *
171
+ * @property callback -
172
+ * Function to process each record. If this and a positional
173
+ * callback are passed, this one will be used
174
+ * @property direction - The direction of the IP Command
175
+ * @property done - Function to be called upon completion of streaming
176
+ * @property limit -
177
+ * Upper limit for the number of records to return.
178
+ * each() guarantees never to return more than limit.
179
+ * Default is no limit
180
+ * @property pageSize -
181
+ * Number of records to fetch per request,
182
+ * when not set will use the default value of 50 records.
183
+ * If no pageSize is defined but a limit is defined,
184
+ * each() will attempt to read the limit with the most efficient
185
+ * page size, i.e. min(limit, 1000)
186
+ * @property sim - The SID or unique name of the Sim resource that IP Command was sent to or from.
187
+ * @property simIccid - The ICCID of the Sim resource that IP Command was sent to or from.
188
+ * @property status - The status of the IP Command
189
+ */
190
+ interface IpCommandListInstanceEachOptions {
191
+ callback?: (item: IpCommandInstance, done: (err?: Error) => void) => void;
192
+ direction?: IpCommandDirection;
193
+ done?: Function;
194
+ limit?: number;
195
+ pageSize?: number;
196
+ sim?: string;
197
+ simIccid?: string;
198
+ status?: IpCommandStatus;
199
+ }
200
+
201
+ /**
202
+ * Options to pass to list
203
+ *
204
+ * @property direction - The direction of the IP Command
205
+ * @property limit -
206
+ * Upper limit for the number of records to return.
207
+ * list() guarantees never to return more than limit.
208
+ * Default is no limit
209
+ * @property pageSize -
210
+ * Number of records to fetch per request,
211
+ * when not set will use the default value of 50 records.
212
+ * If no page_size is defined but a limit is defined,
213
+ * list() will attempt to read the limit with the most
214
+ * efficient page size, i.e. min(limit, 1000)
215
+ * @property sim - The SID or unique name of the Sim resource that IP Command was sent to or from.
216
+ * @property simIccid - The ICCID of the Sim resource that IP Command was sent to or from.
217
+ * @property status - The status of the IP Command
218
+ */
219
+ interface IpCommandListInstanceOptions {
220
+ direction?: IpCommandDirection;
221
+ limit?: number;
222
+ pageSize?: number;
223
+ sim?: string;
224
+ simIccid?: string;
225
+ status?: IpCommandStatus;
226
+ }
227
+
228
+ /**
229
+ * Options to pass to page
230
+ *
231
+ * @property direction - The direction of the IP Command
232
+ * @property pageNumber - Page Number, this value is simply for client state
233
+ * @property pageSize - Number of records to return, defaults to 50
234
+ * @property pageToken - PageToken provided by the API
235
+ * @property sim - The SID or unique name of the Sim resource that IP Command was sent to or from.
236
+ * @property simIccid - The ICCID of the Sim resource that IP Command was sent to or from.
237
+ * @property status - The status of the IP Command
238
+ */
239
+ interface IpCommandListInstancePageOptions {
240
+ direction?: IpCommandDirection;
241
+ pageNumber?: number;
242
+ pageSize?: number;
243
+ pageToken?: string;
244
+ sim?: string;
245
+ simIccid?: string;
246
+ status?: IpCommandStatus;
247
+ }
248
+
249
+ interface IpCommandPayload extends IpCommandResource, Page.TwilioResponsePayload {
250
+ }
251
+
252
+ interface IpCommandResource {
253
+ account_sid: string;
254
+ date_created: Date;
255
+ date_updated: Date;
256
+ device_ip: string;
257
+ device_port: number;
258
+ direction: IpCommandDirection;
259
+ payload: string;
260
+ payload_type: IpCommandPayloadType;
261
+ sid: string;
262
+ sim_iccid: string;
263
+ sim_sid: string;
264
+ status: IpCommandStatus;
265
+ url: string;
266
+ }
267
+
268
+ interface IpCommandSolution {
269
+ }
270
+
271
+
272
+ declare class IpCommandContext {
273
+ /**
274
+ * Initialize the IpCommandContext
275
+ *
276
+ * PLEASE NOTE that this class contains beta products that are subject to change.
277
+ * Use them with caution.
278
+ *
279
+ * @param version - Version of the resource
280
+ * @param sid - The SID that identifies the resource to fetch
281
+ */
282
+ constructor(version: V1, sid: string);
283
+
284
+ /**
285
+ * fetch a IpCommandInstance
286
+ *
287
+ * @param callback - Callback to handle processed record
288
+ */
289
+ fetch(callback?: (error: Error | null, items: IpCommandInstance) => any): Promise<IpCommandInstance>;
290
+ /**
291
+ * Provide a user-friendly representation
292
+ */
293
+ toJSON(): any;
294
+ }
295
+
296
+
297
+ declare class IpCommandInstance extends SerializableClass {
298
+ /**
299
+ * Initialize the IpCommandContext
300
+ *
301
+ * PLEASE NOTE that this class contains beta products that are subject to change.
302
+ * Use them with caution.
303
+ *
304
+ * @param version - Version of the resource
305
+ * @param payload - The instance payload
306
+ * @param sid - The SID that identifies the resource to fetch
307
+ */
308
+ constructor(version: V1, payload: IpCommandPayload, sid: string);
309
+
310
+ private _proxy: IpCommandContext;
311
+ accountSid: string;
312
+ dateCreated: Date;
313
+ dateUpdated: Date;
314
+ deviceIp: string;
315
+ devicePort: number;
316
+ direction: IpCommandDirection;
317
+ /**
318
+ * fetch a IpCommandInstance
319
+ *
320
+ * @param callback - Callback to handle processed record
321
+ */
322
+ fetch(callback?: (error: Error | null, items: IpCommandInstance) => any): Promise<IpCommandInstance>;
323
+ payload: string;
324
+ payloadType: IpCommandPayloadType;
325
+ sid: string;
326
+ simIccid: string;
327
+ simSid: string;
328
+ status: IpCommandStatus;
329
+ /**
330
+ * Provide a user-friendly representation
331
+ */
332
+ toJSON(): any;
333
+ url: string;
334
+ }
335
+
336
+
337
+ declare class IpCommandPage extends Page<V1, IpCommandPayload, IpCommandResource, IpCommandInstance> {
338
+ /**
339
+ * Initialize the IpCommandPage
340
+ *
341
+ * PLEASE NOTE that this class contains beta products that are subject to change.
342
+ * Use them with caution.
343
+ *
344
+ * @param version - Version of the resource
345
+ * @param response - Response from the API
346
+ * @param solution - Path solution
347
+ */
348
+ constructor(version: V1, response: Response<string>, solution: IpCommandSolution);
349
+
350
+ /**
351
+ * Build an instance of IpCommandInstance
352
+ *
353
+ * @param payload - Payload response from the API
354
+ */
355
+ getInstance(payload: IpCommandPayload): IpCommandInstance;
356
+ /**
357
+ * Provide a user-friendly representation
358
+ */
359
+ toJSON(): any;
360
+ }
361
+
362
+ export { IpCommandContext, IpCommandDirection, IpCommandInstance, IpCommandList, IpCommandListInstance, IpCommandListInstanceCreateOptions, IpCommandListInstanceEachOptions, IpCommandListInstanceOptions, IpCommandListInstancePageOptions, IpCommandPage, IpCommandPayload, IpCommandPayloadType, IpCommandResource, IpCommandSolution, IpCommandStatus }