twilio 3.23.0 → 3.25.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 (86) hide show
  1. package/CHANGES.md +55 -0
  2. package/lib/rest/Api.d.ts +2 -0
  3. package/lib/rest/Api.js +9 -0
  4. package/lib/rest/Authy.js +5 -5
  5. package/lib/rest/Preview.d.ts +0 -2
  6. package/lib/rest/Preview.js +12 -23
  7. package/lib/rest/Twilio.d.ts +1 -0
  8. package/lib/rest/Twilio.js +9 -0
  9. package/lib/rest/Video.js +8 -8
  10. package/lib/rest/api/V2010.d.ts +3 -0
  11. package/lib/rest/api/V2010.js +9 -0
  12. package/lib/rest/api/v2010/account/balance.d.ts +87 -0
  13. package/lib/rest/api/v2010/account/balance.js +162 -0
  14. package/lib/rest/api/v2010/account/message.d.ts +2 -0
  15. package/lib/rest/api/v2010/account/message.js +4 -1
  16. package/lib/rest/api/v2010/account/sip/ipAccessControlList.d.ts +3 -3
  17. package/lib/rest/api/v2010/account/sip/ipAccessControlList.js +3 -3
  18. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +1 -1
  19. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +1 -1
  20. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +1 -1
  21. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +1 -1
  22. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +1 -1
  23. package/lib/rest/api/v2010/account/usage/record/today.d.ts +1 -1
  24. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +1 -1
  25. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +1 -1
  26. package/lib/rest/api/v2010/account/usage/record.d.ts +1 -1
  27. package/lib/rest/api/v2010/account/usage/trigger.d.ts +1 -1
  28. package/lib/rest/api/v2010/account.d.ts +8 -0
  29. package/lib/rest/api/v2010/account.js +25 -0
  30. package/lib/rest/authy/V1.d.ts +1 -1
  31. package/lib/rest/authy/V1.js +8 -8
  32. package/lib/rest/authy/v1/form.d.ts +13 -13
  33. package/lib/rest/authy/v1/form.js +17 -17
  34. package/lib/rest/authy/v1/service/entity/factor/challenge.d.ts +12 -13
  35. package/lib/rest/authy/v1/service/entity/factor/challenge.js +4 -6
  36. package/lib/rest/authy/v1/service/entity/factor.d.ts +9 -9
  37. package/lib/rest/authy/v1/service/entity/factor.js +7 -9
  38. package/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.d.ts +5 -5
  39. package/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.js +9 -5
  40. package/lib/rest/autopilot/v1/assistant/fieldType.d.ts +5 -5
  41. package/lib/rest/autopilot/v1/assistant/fieldType.js +8 -5
  42. package/lib/rest/autopilot/v1/assistant/modelBuild.d.ts +5 -5
  43. package/lib/rest/autopilot/v1/assistant/modelBuild.js +8 -5
  44. package/lib/rest/autopilot/v1/assistant/query.d.ts +17 -17
  45. package/lib/rest/autopilot/v1/assistant/query.js +24 -18
  46. package/lib/rest/autopilot/v1/assistant/task/field.d.ts +11 -11
  47. package/lib/rest/autopilot/v1/assistant/task/field.js +15 -11
  48. package/lib/rest/autopilot/v1/assistant/task/sample.d.ts +18 -18
  49. package/lib/rest/autopilot/v1/assistant/task/sample.js +23 -21
  50. package/lib/rest/autopilot/v1/assistant/task/taskActions.d.ts +2 -2
  51. package/lib/rest/autopilot/v1/assistant/task/taskActions.js +4 -3
  52. package/lib/rest/autopilot/v1/assistant/task/taskStatistics.d.ts +6 -6
  53. package/lib/rest/autopilot/v1/assistant/task/taskStatistics.js +7 -6
  54. package/lib/rest/autopilot/v1/assistant/task.d.ts +10 -10
  55. package/lib/rest/autopilot/v1/assistant/task.js +21 -12
  56. package/lib/rest/autopilot/v1/assistant.d.ts +15 -15
  57. package/lib/rest/autopilot/v1/assistant.js +25 -20
  58. package/lib/rest/chat/v2/service/channel/member.d.ts +7 -0
  59. package/lib/rest/chat/v2/service/channel/member.js +13 -2
  60. package/lib/rest/ipMessaging/v2/service/channel/member.d.ts +7 -0
  61. package/lib/rest/ipMessaging/v2/service/channel/member.js +13 -2
  62. package/lib/rest/preview/Marketplace.d.ts +1 -1
  63. package/lib/rest/preview/Marketplace.js +9 -9
  64. package/lib/rest/proxy/v1/service.d.ts +7 -0
  65. package/lib/rest/proxy/v1/service.js +13 -2
  66. package/lib/rest/sync/v1/service/syncList/syncListItem.d.ts +10 -2
  67. package/lib/rest/sync/v1/service/syncList/syncListItem.js +24 -5
  68. package/lib/rest/sync/v1/service/syncList.d.ts +6 -2
  69. package/lib/rest/sync/v1/service/syncList.js +12 -5
  70. package/lib/rest/sync/v1/service/syncMap/syncMapItem.d.ts +10 -2
  71. package/lib/rest/sync/v1/service/syncMap/syncMapItem.js +24 -6
  72. package/lib/rest/sync/v1/service/syncMap.d.ts +6 -2
  73. package/lib/rest/sync/v1/service/syncMap.js +12 -5
  74. package/lib/rest/verify/v1/service/verification.d.ts +4 -0
  75. package/lib/rest/verify/v1/service/verification.js +5 -1
  76. package/lib/rest/video/V1.d.ts +1 -1
  77. package/lib/rest/video/V1.js +10 -10
  78. package/lib/twiml/VoiceResponse.d.ts +124 -0
  79. package/lib/twiml/VoiceResponse.js +960 -0
  80. package/package.json +1 -1
  81. package/lib/rest/preview/Authy.d.ts +0 -27
  82. package/lib/rest/preview/Authy.js +0 -44
  83. package/lib/rest/preview/authy/service/entity.d.ts +0 -250
  84. package/lib/rest/preview/authy/service/entity.js +0 -514
  85. package/lib/rest/preview/authy/service.d.ts +0 -275
  86. package/lib/rest/preview/authy/service.js +0 -578
@@ -17,6 +17,7 @@ var AuthorizedConnectAppList = require(
17
17
  './account/authorizedConnectApp').AuthorizedConnectAppList;
18
18
  var AvailablePhoneNumberCountryList = require(
19
19
  './account/availablePhoneNumber').AvailablePhoneNumberCountryList;
20
+ var BalanceList = require('./account/balance').BalanceList;
20
21
  var CallList = require('./account/call').CallList;
21
22
  var ConferenceList = require('./account/conference').ConferenceList;
22
23
  var ConnectAppList = require('./account/connectApp').ConnectAppList;
@@ -527,6 +528,17 @@ AccountInstance.prototype.availablePhoneNumbers = function
527
528
  return this._proxy.availablePhoneNumbers;
528
529
  };
529
530
 
531
+ /* jshint ignore:start */
532
+ /**
533
+ * Access the balance
534
+ *
535
+ * @returns {Twilio.Api.V2010.AccountContext.BalanceList}
536
+ */
537
+ /* jshint ignore:end */
538
+ AccountInstance.prototype.balance = function balance() {
539
+ return this._proxy.balance;
540
+ };
541
+
530
542
  /* jshint ignore:start */
531
543
  /**
532
544
  * Access the calls
@@ -768,6 +780,8 @@ AccountInstance.prototype.toJSON = function toJSON() {
768
780
  * authorizedConnectApps resource
769
781
  * @property {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryList} availablePhoneNumbers -
770
782
  * availablePhoneNumbers resource
783
+ * @property {Twilio.Api.V2010.AccountContext.BalanceList} balance -
784
+ * balance resource
771
785
  * @property {Twilio.Api.V2010.AccountContext.CallList} calls - calls resource
772
786
  * @property {Twilio.Api.V2010.AccountContext.ConferenceList} conferences -
773
787
  * conferences resource
@@ -819,6 +833,7 @@ AccountContext = function AccountContext(version, sid) {
819
833
  this._applications = undefined;
820
834
  this._authorizedConnectApps = undefined;
821
835
  this._availablePhoneNumbers = undefined;
836
+ this._balance = undefined;
822
837
  this._calls = undefined;
823
838
  this._conferences = undefined;
824
839
  this._connectApps = undefined;
@@ -953,6 +968,16 @@ Object.defineProperty(AccountContext.prototype,
953
968
  }
954
969
  });
955
970
 
971
+ Object.defineProperty(AccountContext.prototype,
972
+ 'balance', {
973
+ get: function() {
974
+ if (!this._balance) {
975
+ this._balance = new BalanceList(this._version, this._solution.sid);
976
+ }
977
+ return this._balance;
978
+ }
979
+ });
980
+
956
981
  Object.defineProperty(AccountContext.prototype,
957
982
  'calls', {
958
983
  get: function() {
@@ -17,8 +17,8 @@ declare class V1 extends Version {
17
17
  /**
18
18
  * Initialize the V1 version of Authy
19
19
  *
20
- * @property services - services resource
21
20
  * @property forms - forms resource
21
+ * @property services - services resource
22
22
  *
23
23
  * @param domain - The twilio domain
24
24
  */
@@ -19,8 +19,8 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
19
19
  /**
20
20
  * Initialize the V1 version of Authy
21
21
  *
22
- * @property {Twilio.Authy.V1.ServiceList} services - services resource
23
22
  * @property {Twilio.Authy.V1.FormList} forms - forms resource
23
+ * @property {Twilio.Authy.V1.ServiceList} services - services resource
24
24
  *
25
25
  * @param {Twilio.Authy} domain - The twilio domain
26
26
  */
@@ -29,26 +29,26 @@ function V1(domain) {
29
29
  Version.prototype.constructor.call(this, domain, 'v1');
30
30
 
31
31
  // Resources
32
- this._services = undefined;
33
32
  this._forms = undefined;
33
+ this._services = undefined;
34
34
  }
35
35
 
36
36
  _.extend(V1.prototype, Version.prototype);
37
37
  V1.prototype.constructor = V1;
38
38
 
39
39
  Object.defineProperty(V1.prototype,
40
- 'services', {
40
+ 'forms', {
41
41
  get: function() {
42
- this._services = this._services || new ServiceList(this);
43
- return this._services;
42
+ this._forms = this._forms || new FormList(this);
43
+ return this._forms;
44
44
  }
45
45
  });
46
46
 
47
47
  Object.defineProperty(V1.prototype,
48
- 'forms', {
48
+ 'services', {
49
49
  get: function() {
50
- this._forms = this._forms || new FormList(this);
51
- return this._forms;
50
+ this._services = this._services || new ServiceList(this);
51
+ return this._services;
52
52
  }
53
53
  });
54
54
 
@@ -10,7 +10,7 @@ import Response = require('../../../http/response');
10
10
  import V1 = require('../V1');
11
11
  import { SerializableClass } from '../../../interfaces';
12
12
 
13
- type FormFormType = 'form-app-push'|'form-sms'|'form-totp';
13
+ type FormFormTypes = 'form-app-push'|'form-sms'|'form-totp';
14
14
 
15
15
  /**
16
16
  * @description Initialize the FormList
@@ -28,9 +28,9 @@ interface FormListInstance {
28
28
  /**
29
29
  * Constructs a form
30
30
  *
31
- * @param formType - The Form Type of this Form
31
+ * @param type - The Type of this Form
32
32
  */
33
- get(formType: string): FormContext;
33
+ get(type: string): FormContext;
34
34
  }
35
35
 
36
36
  interface FormPayload extends FormResource, Page.TwilioResponsePayload {
@@ -38,8 +38,8 @@ interface FormPayload extends FormResource, Page.TwilioResponsePayload {
38
38
 
39
39
  interface FormResource {
40
40
  form_meta: string;
41
- form_type: FormFormType;
42
41
  forms: string;
42
+ type: FormFormTypes;
43
43
  url: string;
44
44
  }
45
45
 
@@ -52,9 +52,9 @@ declare class FormContext {
52
52
  * Initialize the FormContextPLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
53
53
  *
54
54
  * @param version - Version of the resource
55
- * @param formType - The Form Type of this Form
55
+ * @param type - The Type of this Form
56
56
  */
57
- constructor(version: V1, formType: FormFormType);
57
+ constructor(version: V1, type: FormFormTypes);
58
58
 
59
59
  /**
60
60
  * fetch a FormInstance
@@ -69,16 +69,16 @@ declare class FormInstance extends SerializableClass {
69
69
  /**
70
70
  * Initialize the FormContextPLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
71
71
  *
72
- * @property formType - The Form Type of this Form
73
- * @property forms - Object that contains the available forms for this form type.
74
- * @property formMeta - Additional information for the available forms for this form type.
75
- * @property url - The URL to access the forms for this form type.
72
+ * @property type - The Type of this Form
73
+ * @property forms - Object that contains the available forms for this type.
74
+ * @property formMeta - Additional information for the available forms for this type.
75
+ * @property url - The URL to access the forms for this type.
76
76
  *
77
77
  * @param version - Version of the resource
78
78
  * @param payload - The instance payload
79
- * @param formType - The Form Type of this Form
79
+ * @param type - The Type of this Form
80
80
  */
81
- constructor(version: V1, payload: FormPayload, formType: FormFormType);
81
+ constructor(version: V1, payload: FormPayload, type: FormFormTypes);
82
82
 
83
83
  private _proxy: FormContext;
84
84
  /**
@@ -88,13 +88,13 @@ declare class FormInstance extends SerializableClass {
88
88
  */
89
89
  fetch(callback?: (error: Error | null, items: FormInstance) => any): void;
90
90
  formMeta: string;
91
- formType: FormFormType;
92
91
  forms: string;
93
92
  /**
94
93
  * Produce a plain JSON object version of the FormInstance for serialization.
95
94
  * Removes any circular references in the object.
96
95
  */
97
96
  toJSON(): any;
97
+ type: FormFormTypes;
98
98
  url: string;
99
99
  }
100
100
 
@@ -46,13 +46,13 @@ FormList = function FormList(version) {
46
46
  /**
47
47
  * Constructs a form
48
48
  *
49
- * @param {string} formType - The Form Type of this Form
49
+ * @param {string} type - The Type of this Form
50
50
  *
51
51
  * @returns {Twilio.Authy.V1.FormContext}
52
52
  */
53
53
  /* jshint ignore:end */
54
- FormListInstance.get = function get(formType) {
55
- return new FormContext(this._version, formType);
54
+ FormListInstance.get = function get(type) {
55
+ return new FormContext(this._version, type);
56
56
  };
57
57
 
58
58
  return FormListInstance;
@@ -98,37 +98,37 @@ FormPage.prototype.getInstance = function getInstance(payload) {
98
98
  /**
99
99
  * Initialize the FormContextPLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
100
100
  *
101
- * @property {form.form_type} formType - The Form Type of this Form
101
+ * @property {form.form_types} type - The Type of this Form
102
102
  * @property {string} forms -
103
- * Object that contains the available forms for this form type.
103
+ * Object that contains the available forms for this type.
104
104
  * @property {string} formMeta -
105
- * Additional information for the available forms for this form type.
106
- * @property {string} url - The URL to access the forms for this form type.
105
+ * Additional information for the available forms for this type.
106
+ * @property {string} url - The URL to access the forms for this type.
107
107
  *
108
108
  * @param {V1} version - Version of the resource
109
109
  * @param {FormPayload} payload - The instance payload
110
- * @param {form:enum:form_type} formType - The Form Type of this Form
110
+ * @param {form:enum:form_types} type - The Type of this Form
111
111
  */
112
112
  /* jshint ignore:end */
113
- FormInstance = function FormInstance(version, payload, formType) {
113
+ FormInstance = function FormInstance(version, payload, type) {
114
114
  this._version = version;
115
115
 
116
116
  // Marshaled Properties
117
- this.formType = payload.form_type; // jshint ignore:line
117
+ this.type = payload.type; // jshint ignore:line
118
118
  this.forms = payload.forms; // jshint ignore:line
119
119
  this.formMeta = payload.form_meta; // jshint ignore:line
120
120
  this.url = payload.url; // jshint ignore:line
121
121
 
122
122
  // Context
123
123
  this._context = undefined;
124
- this._solution = {formType: formType || this.formType, };
124
+ this._solution = {type: type || this.type, };
125
125
  };
126
126
 
127
127
  Object.defineProperty(FormInstance.prototype,
128
128
  '_proxy', {
129
129
  get: function() {
130
130
  if (!this._context) {
131
- this._context = new FormContext(this._version, this._solution.formType);
131
+ this._context = new FormContext(this._version, this._solution.type);
132
132
  }
133
133
 
134
134
  return this._context;
@@ -172,16 +172,16 @@ FormInstance.prototype.toJSON = function toJSON() {
172
172
  * Initialize the FormContextPLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
173
173
  *
174
174
  * @param {V1} version - Version of the resource
175
- * @param {form:enum:form_type} formType - The Form Type of this Form
175
+ * @param {form:enum:form_types} type - The Type of this Form
176
176
  */
177
177
  /* jshint ignore:end */
178
- FormContext = function FormContext(version, formType) {
178
+ FormContext = function FormContext(version, type) {
179
179
  this._version = version;
180
180
 
181
181
  // Path Solution
182
- this._solution = {formType: formType, };
182
+ this._solution = {type: type, };
183
183
  this._uri = _.template(
184
- '/Forms/<%= formType %>' // jshint ignore:line
184
+ '/Forms/<%= type %>' // jshint ignore:line
185
185
  )(this._solution);
186
186
  };
187
187
 
@@ -199,7 +199,7 @@ FormContext.prototype.fetch = function fetch(callback) {
199
199
  var promise = this._version.fetch({uri: this._uri, method: 'GET'});
200
200
 
201
201
  promise = promise.then(function(payload) {
202
- deferred.resolve(new FormInstance(this._version, payload, this._solution.formType));
202
+ deferred.resolve(new FormInstance(this._version, payload, this._solution.type));
203
203
  }.bind(this));
204
204
 
205
205
  promise.catch(function(error) {
@@ -11,9 +11,11 @@ import V1 = require('../../../../V1');
11
11
  import serialize = require('../../../../../../base/serialize');
12
12
  import { SerializableClass } from '../../../../../../interfaces';
13
13
 
14
- type ChallengeChallengeReason = 'none'|'not_needed'|'not_requested';
14
+ type ChallengeChallengeReasons = 'none'|'not_needed'|'not_requested';
15
15
 
16
- type ChallengeChallengeStatus = 'pending'|'expired'|'approved'|'denied';
16
+ type ChallengeChallengeStatuses = 'pending'|'expired'|'approved'|'denied';
17
+
18
+ type ChallengeFactorTypes = 'app-push'|'sms'|'totp';
17
19
 
18
20
  /**
19
21
  * @description Initialize the ChallengeList
@@ -82,13 +84,12 @@ interface ChallengeResource {
82
84
  factor_sid: string;
83
85
  hidden_details: string;
84
86
  identity: string;
85
- reason: ChallengeChallengeReason;
87
+ responded_reason: ChallengeChallengeReasons;
86
88
  service_sid: string;
87
89
  sid: string;
88
- status: ChallengeChallengeStatus;
89
- type: string;
90
+ status: ChallengeChallengeStatuses;
91
+ type: ChallengeFactorTypes;
90
92
  url: string;
91
- verification_sid: string;
92
93
  }
93
94
 
94
95
  interface ChallengeSolution {
@@ -146,12 +147,11 @@ declare class ChallengeInstance extends SerializableClass {
146
147
  * @property dateUpdated - The date this Challenge was updated
147
148
  * @property dateResponded - The date this Challenge was responded
148
149
  * @property expirationDate - The date this Challenge is expired
149
- * @property verificationSid - Verification Sid.
150
150
  * @property status - The Status of this Challenge
151
- * @property reason - The Reason of this Challenge `status`
151
+ * @property respondedReason - The Reason of this Challenge `status`
152
152
  * @property details - Public details provided to contextualize the Challenge
153
153
  * @property hiddenDetails - Hidden details provided to contextualize the Challenge
154
- * @property type - The Factor Type of this Challenge
154
+ * @property type - The Type of this Challenge
155
155
  * @property url - The URL of this resource.
156
156
  *
157
157
  * @param version - Version of the resource
@@ -180,22 +180,22 @@ declare class ChallengeInstance extends SerializableClass {
180
180
  fetch(callback?: (error: Error | null, items: ChallengeInstance) => any): void;
181
181
  hiddenDetails: string;
182
182
  identity: string;
183
- reason: ChallengeChallengeReason;
184
183
  /**
185
184
  * remove a ChallengeInstance
186
185
  *
187
186
  * @param callback - Callback to handle processed record
188
187
  */
189
188
  remove(callback?: (error: Error | null, items: ChallengeInstance) => any): void;
189
+ respondedReason: ChallengeChallengeReasons;
190
190
  serviceSid: string;
191
191
  sid: string;
192
- status: ChallengeChallengeStatus;
192
+ status: ChallengeChallengeStatuses;
193
193
  /**
194
194
  * Produce a plain JSON object version of the ChallengeInstance for serialization.
195
195
  * Removes any circular references in the object.
196
196
  */
197
197
  toJSON(): any;
198
- type: string;
198
+ type: ChallengeFactorTypes;
199
199
  /**
200
200
  * update a ChallengeInstance
201
201
  *
@@ -204,7 +204,6 @@ declare class ChallengeInstance extends SerializableClass {
204
204
  */
205
205
  update(opts?: ChallengeInstanceUpdateOptions, callback?: (error: Error | null, items: ChallengeInstance) => any): void;
206
206
  url: string;
207
- verificationSid: string;
208
207
  }
209
208
 
210
209
 
@@ -190,15 +190,14 @@ ChallengePage.prototype.getInstance = function getInstance(payload) {
190
190
  * @property {Date} dateUpdated - The date this Challenge was updated
191
191
  * @property {Date} dateResponded - The date this Challenge was responded
192
192
  * @property {Date} expirationDate - The date this Challenge is expired
193
- * @property {string} verificationSid - Verification Sid.
194
- * @property {challenge.challenge_status} status - The Status of this Challenge
195
- * @property {challenge.challenge_reason} reason -
193
+ * @property {challenge.challenge_statuses} status - The Status of this Challenge
194
+ * @property {challenge.challenge_reasons} respondedReason -
196
195
  * The Reason of this Challenge `status`
197
196
  * @property {string} details -
198
197
  * Public details provided to contextualize the Challenge
199
198
  * @property {string} hiddenDetails -
200
199
  * Hidden details provided to contextualize the Challenge
201
- * @property {string} type - The Factor Type of this Challenge
200
+ * @property {challenge.factor_types} type - The Type of this Challenge
202
201
  * @property {string} url - The URL of this resource.
203
202
  *
204
203
  * @param {V1} version - Version of the resource
@@ -225,9 +224,8 @@ ChallengeInstance = function ChallengeInstance(version, payload, serviceSid,
225
224
  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
226
225
  this.dateResponded = deserialize.iso8601DateTime(payload.date_responded); // jshint ignore:line
227
226
  this.expirationDate = deserialize.iso8601DateTime(payload.expiration_date); // jshint ignore:line
228
- this.verificationSid = payload.verification_sid; // jshint ignore:line
229
227
  this.status = payload.status; // jshint ignore:line
230
- this.reason = payload.reason; // jshint ignore:line
228
+ this.respondedReason = payload.responded_reason; // jshint ignore:line
231
229
  this.details = payload.details; // jshint ignore:line
232
230
  this.hiddenDetails = payload.hidden_details; // jshint ignore:line
233
231
  this.type = payload.type; // jshint ignore:line
@@ -12,7 +12,9 @@ import { ChallengeList } from './factor/challenge';
12
12
  import { ChallengeListInstance } from './factor/challenge';
13
13
  import { SerializableClass } from '../../../../../interfaces';
14
14
 
15
- type FactorFactorStatus = 'unverified'|'verified';
15
+ type FactorFactorStatuses = 'unverified'|'verified';
16
+
17
+ type FactorFactorTypes = 'app-push'|'sms'|'totp';
16
18
 
17
19
  /**
18
20
  * @description Initialize the FactorList
@@ -100,15 +102,13 @@ interface FactorListInstance {
100
102
  * Options to pass to create
101
103
  *
102
104
  * @property binding - A unique binding for this Factor
103
- * @property config - Factor configuration
104
- * @property factorType - The Type of this Factor
105
105
  * @property friendlyName - The friendly name of this Factor
106
+ * @property type - The Type of this Factor
106
107
  */
107
108
  interface FactorListInstanceCreateOptions {
108
109
  binding: string;
109
- config?: string;
110
- factorType: string;
111
110
  friendlyName: string;
111
+ type: FactorFactorTypes;
112
112
  }
113
113
 
114
114
  /**
@@ -181,8 +181,8 @@ interface FactorResource {
181
181
  links: string;
182
182
  service_sid: string;
183
183
  sid: string;
184
- status: FactorFactorStatus;
185
- type: string;
184
+ status: FactorFactorStatuses;
185
+ type: FactorFactorTypes;
186
186
  url: string;
187
187
  }
188
188
 
@@ -279,13 +279,13 @@ declare class FactorInstance extends SerializableClass {
279
279
  remove(callback?: (error: Error | null, items: FactorInstance) => any): void;
280
280
  serviceSid: string;
281
281
  sid: string;
282
- status: FactorFactorStatus;
282
+ status: FactorFactorStatuses;
283
283
  /**
284
284
  * Produce a plain JSON object version of the FactorInstance for serialization.
285
285
  * Removes any circular references in the object.
286
286
  */
287
287
  toJSON(): any;
288
- type: string;
288
+ type: FactorFactorTypes;
289
289
  /**
290
290
  * update a FactorInstance
291
291
  *
@@ -56,9 +56,8 @@ FactorList = function FactorList(version, serviceSid, identity) {
56
56
  *
57
57
  * @param {object} opts - Options for request
58
58
  * @param {string} opts.binding - A unique binding for this Factor
59
- * @param {string} opts.factorType - The Type of this Factor
60
59
  * @param {string} opts.friendlyName - The friendly name of this Factor
61
- * @param {string} [opts.config] - Factor configuration
60
+ * @param {factor.factor_types} opts.type - The Type of this Factor
62
61
  * @param {function} [callback] - Callback to handle processed record
63
62
  *
64
63
  * @returns {Promise} Resolves to processed FactorInstance
@@ -71,19 +70,18 @@ FactorList = function FactorList(version, serviceSid, identity) {
71
70
  if (_.isUndefined(opts.binding)) {
72
71
  throw new Error('Required parameter "opts.binding" missing.');
73
72
  }
74
- if (_.isUndefined(opts.factorType)) {
75
- throw new Error('Required parameter "opts.factorType" missing.');
76
- }
77
73
  if (_.isUndefined(opts.friendlyName)) {
78
74
  throw new Error('Required parameter "opts.friendlyName" missing.');
79
75
  }
76
+ if (_.isUndefined(opts.type)) {
77
+ throw new Error('Required parameter "opts.type" missing.');
78
+ }
80
79
 
81
80
  var deferred = Q.defer();
82
81
  var data = values.of({
83
82
  'Binding': _.get(opts, 'binding'),
84
- 'FactorType': _.get(opts, 'factorType'),
85
83
  'FriendlyName': _.get(opts, 'friendlyName'),
86
- 'Config': _.get(opts, 'config')
84
+ 'Type': _.get(opts, 'type')
87
85
  });
88
86
 
89
87
  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
@@ -403,8 +401,8 @@ FactorPage.prototype.getInstance = function getInstance(payload) {
403
401
  * @property {Date} dateCreated - The date this Factor was created
404
402
  * @property {Date} dateUpdated - The date this Factor was updated
405
403
  * @property {string} friendlyName - A human readable description of this resource.
406
- * @property {factor.factor_status} status - The Status of this Factor
407
- * @property {string} type - The Type of this Factor
404
+ * @property {factor.factor_statuses} status - The Status of this Factor
405
+ * @property {factor.factor_types} type - The Type of this Factor
408
406
  * @property {string} url - The URL of this resource.
409
407
  * @property {string} links - Nested resource URLs.
410
408
  *
@@ -49,7 +49,7 @@ interface FieldValueListInstance {
49
49
  /**
50
50
  * Constructs a field_value
51
51
  *
52
- * @param sid - The sid
52
+ * @param sid - A 34 character string that uniquely identifies this resource
53
53
  */
54
54
  get(sid: string): FieldValueContext;
55
55
  /**
@@ -186,9 +186,9 @@ declare class FieldValueContext {
186
186
  * Initialize the FieldValueContextPLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
187
187
  *
188
188
  * @param version - Version of the resource
189
- * @param assistantSid - The assistant_sid
190
- * @param fieldTypeSid - The field_type_sid
191
- * @param sid - The sid
189
+ * @param assistantSid - The unique ID of the Assistant
190
+ * @param fieldTypeSid - The unique ID of the Field Type associated with this Field Value
191
+ * @param sid - A 34 character string that uniquely identifies this resource
192
192
  */
193
193
  constructor(version: V1, assistantSid: string, fieldTypeSid: string, sid: string);
194
194
 
@@ -226,7 +226,7 @@ declare class FieldValueInstance extends SerializableClass {
226
226
  * @param payload - The instance payload
227
227
  * @param assistantSid - The unique ID of the Assistant.
228
228
  * @param fieldTypeSid - The unique ID of the Field Type associated with this Field Value.
229
- * @param sid - The sid
229
+ * @param sid - A 34 character string that uniquely identifies this resource
230
230
  */
231
231
  constructor(version: V1, payload: FieldValuePayload, assistantSid: string, fieldTypeSid: string, sid: string);
232
232
 
@@ -343,7 +343,8 @@ FieldValueList = function FieldValueList(version, assistantSid, fieldTypeSid) {
343
343
  /**
344
344
  * Constructs a field_value
345
345
  *
346
- * @param {string} sid - The sid
346
+ * @param {string} sid -
347
+ * A 34 character string that uniquely identifies this resource
347
348
  *
348
349
  * @returns {Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueContext}
349
350
  */
@@ -426,7 +427,8 @@ FieldValuePage.prototype.getInstance = function getInstance(payload) {
426
427
  * @param {sid} assistantSid - The unique ID of the Assistant.
427
428
  * @param {sid} fieldTypeSid -
428
429
  * The unique ID of the Field Type associated with this Field Value.
429
- * @param {sid_like} sid - The sid
430
+ * @param {sid_like} sid -
431
+ * A 34 character string that uniquely identifies this resource
430
432
  */
431
433
  /* jshint ignore:end */
432
434
  FieldValueInstance = function FieldValueInstance(version, payload, assistantSid,
@@ -516,9 +518,11 @@ FieldValueInstance.prototype.toJSON = function toJSON() {
516
518
  * Initialize the FieldValueContextPLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
517
519
  *
518
520
  * @param {V1} version - Version of the resource
519
- * @param {sid_like} assistantSid - The assistant_sid
520
- * @param {sid_like} fieldTypeSid - The field_type_sid
521
- * @param {sid_like} sid - The sid
521
+ * @param {sid_like} assistantSid - The unique ID of the Assistant
522
+ * @param {sid_like} fieldTypeSid -
523
+ * The unique ID of the Field Type associated with this Field Value
524
+ * @param {sid_like} sid -
525
+ * A 34 character string that uniquely identifies this resource
522
526
  */
523
527
  /* jshint ignore:end */
524
528
  FieldValueContext = function FieldValueContext(version, assistantSid,
@@ -61,7 +61,7 @@ interface FieldTypeListInstance {
61
61
  /**
62
62
  * Constructs a field_type
63
63
  *
64
- * @param sid - The sid
64
+ * @param sid - A 34-character string that uniquely identifies this resource.
65
65
  */
66
66
  get(sid: string): FieldTypeContext;
67
67
  /**
@@ -190,8 +190,8 @@ declare class FieldTypeContext {
190
190
  * @property fieldValues - fieldValues resource
191
191
  *
192
192
  * @param version - Version of the resource
193
- * @param assistantSid - The assistant_sid
194
- * @param sid - The sid
193
+ * @param assistantSid - The unique ID of the Assistant.
194
+ * @param sid - A 34-character string that uniquely identifies this resource.
195
195
  */
196
196
  constructor(version: V1, assistantSid: string, sid: string);
197
197
 
@@ -228,14 +228,14 @@ declare class FieldTypeInstance extends SerializableClass {
228
228
  * @property friendlyName - A user-provided string that identifies this resource. It is non-unique and can be up to 255 characters long.
229
229
  * @property links - The links
230
230
  * @property assistantSid - The unique ID of the Assistant.
231
- * @property sid - A 34 character string that uniquely identifies this resource.
231
+ * @property sid - A 34-character string that uniquely identifies this resource.
232
232
  * @property uniqueName - A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
233
233
  * @property url - The url
234
234
  *
235
235
  * @param version - Version of the resource
236
236
  * @param payload - The instance payload
237
237
  * @param assistantSid - The unique ID of the Assistant.
238
- * @param sid - The sid
238
+ * @param sid - A 34-character string that uniquely identifies this resource.
239
239
  */
240
240
  constructor(version: V1, payload: FieldTypePayload, assistantSid: string, sid: string);
241
241
 
@@ -328,7 +328,8 @@ FieldTypeList = function FieldTypeList(version, assistantSid) {
328
328
  /**
329
329
  * Constructs a field_type
330
330
  *
331
- * @param {string} sid - The sid
331
+ * @param {string} sid -
332
+ * A 34-character string that uniquely identifies this resource.
332
333
  *
333
334
  * @returns {Twilio.Autopilot.V1.AssistantContext.FieldTypeContext}
334
335
  */
@@ -389,7 +390,7 @@ FieldTypePage.prototype.getInstance = function getInstance(payload) {
389
390
  * @property {string} links - The links
390
391
  * @property {string} assistantSid - The unique ID of the Assistant.
391
392
  * @property {string} sid -
392
- * A 34 character string that uniquely identifies this resource.
393
+ * A 34-character string that uniquely identifies this resource.
393
394
  * @property {string} uniqueName -
394
395
  * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
395
396
  * @property {string} url - The url
@@ -397,7 +398,8 @@ FieldTypePage.prototype.getInstance = function getInstance(payload) {
397
398
  * @param {V1} version - Version of the resource
398
399
  * @param {FieldTypePayload} payload - The instance payload
399
400
  * @param {sid} assistantSid - The unique ID of the Assistant.
400
- * @param {sid_like} sid - The sid
401
+ * @param {sid_like} sid -
402
+ * A 34-character string that uniquely identifies this resource.
401
403
  */
402
404
  /* jshint ignore:end */
403
405
  FieldTypeInstance = function FieldTypeInstance(version, payload, assistantSid,
@@ -517,8 +519,9 @@ FieldTypeInstance.prototype.toJSON = function toJSON() {
517
519
  * fieldValues resource
518
520
  *
519
521
  * @param {V1} version - Version of the resource
520
- * @param {sid_like} assistantSid - The assistant_sid
521
- * @param {sid_like} sid - The sid
522
+ * @param {sid_like} assistantSid - The unique ID of the Assistant.
523
+ * @param {sid_like} sid -
524
+ * A 34-character string that uniquely identifies this resource.
522
525
  */
523
526
  /* jshint ignore:end */
524
527
  FieldTypeContext = function FieldTypeContext(version, assistantSid, sid) {