files.com 1.1.18 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. package/.eslintrc.js +0 -3
  2. package/_VERSION +1 -1
  3. package/docs/Errors.md +1 -0
  4. package/lib/Api.js +1 -1
  5. package/lib/Errors.js +957 -933
  6. package/lib/Files.js +1 -1
  7. package/lib/models/ActionNotificationExport.js +25 -25
  8. package/lib/models/ActionNotificationExportResult.js +10 -10
  9. package/lib/models/ActionWebhookFailure.js +5 -9
  10. package/lib/models/ApiKey.js +62 -70
  11. package/lib/models/App.js +5 -5
  12. package/lib/models/As2IncomingMessage.js +7 -7
  13. package/lib/models/As2OutgoingMessage.js +7 -7
  14. package/lib/models/As2Partner.js +54 -58
  15. package/lib/models/As2Station.js +51 -55
  16. package/lib/models/Automation.js +102 -110
  17. package/lib/models/AutomationRun.js +13 -13
  18. package/lib/models/BandwidthSnapshot.js +5 -5
  19. package/lib/models/Behavior.js +77 -85
  20. package/lib/models/Bundle.js +102 -110
  21. package/lib/models/BundleDownload.js +9 -9
  22. package/lib/models/BundleNotification.js +37 -41
  23. package/lib/models/BundleRecipient.js +22 -22
  24. package/lib/models/BundleRegistration.js +7 -7
  25. package/lib/models/Clickwrap.js +52 -56
  26. package/lib/models/DnsRecord.js +5 -5
  27. package/lib/models/EmailIncomingMessage.js +5 -5
  28. package/lib/models/ExternalEvent.js +18 -18
  29. package/lib/models/File.js +89 -93
  30. package/lib/models/FileComment.js +41 -45
  31. package/lib/models/FileCommentReaction.js +15 -19
  32. package/lib/models/FileMigration.js +5 -5
  33. package/lib/models/Folder.js +24 -24
  34. package/lib/models/FormFieldSet.js +44 -48
  35. package/lib/models/GpgKey.js +53 -57
  36. package/lib/models/Group.js +51 -55
  37. package/lib/models/GroupUser.js +53 -57
  38. package/lib/models/History.js +72 -72
  39. package/lib/models/HistoryExport.js +51 -51
  40. package/lib/models/HistoryExportResult.js +10 -10
  41. package/lib/models/InboxRecipient.js +22 -22
  42. package/lib/models/InboxRegistration.js +7 -7
  43. package/lib/models/InboxUpload.js +9 -9
  44. package/lib/models/Invoice.js +12 -12
  45. package/lib/models/IpAddress.js +17 -17
  46. package/lib/models/Lock.js +27 -31
  47. package/lib/models/Message.js +60 -64
  48. package/lib/models/MessageComment.js +46 -50
  49. package/lib/models/MessageCommentReaction.js +27 -31
  50. package/lib/models/MessageReaction.js +27 -31
  51. package/lib/models/Notification.js +66 -70
  52. package/lib/models/Payment.js +12 -12
  53. package/lib/models/Permission.js +28 -32
  54. package/lib/models/Priority.js +9 -9
  55. package/lib/models/Project.js +39 -43
  56. package/lib/models/PublicKey.js +46 -50
  57. package/lib/models/RemoteBandwidthSnapshot.js +5 -5
  58. package/lib/models/RemoteServer.js +306 -310
  59. package/lib/models/Request.js +33 -37
  60. package/lib/models/Session.js +11 -15
  61. package/lib/models/SettingsChange.js +5 -5
  62. package/lib/models/SftpHostKey.js +40 -44
  63. package/lib/models/ShareGroup.js +50 -54
  64. package/lib/models/Site.js +138 -138
  65. package/lib/models/Snapshot.js +44 -48
  66. package/lib/models/SsoStrategy.js +15 -19
  67. package/lib/models/Style.js +17 -21
  68. package/lib/models/UsageDailySnapshot.js +5 -5
  69. package/lib/models/UsageSnapshot.js +5 -5
  70. package/lib/models/User.js +156 -172
  71. package/lib/models/UserCipherUse.js +7 -7
  72. package/lib/models/UserRequest.js +26 -30
  73. package/lib/models/WebhookTest.js +15 -15
  74. package/package.json +6 -2
  75. package/src/Api.js +2 -1
  76. package/src/Errors.js +189 -177
  77. package/src/Files.js +1 -1
  78. package/src/models/AccountLineItem.js +5 -2
  79. package/src/models/Action.js +5 -2
  80. package/src/models/ActionNotificationExport.js +36 -35
  81. package/src/models/ActionNotificationExportResult.js +15 -13
  82. package/src/models/ActionWebhookFailure.js +9 -8
  83. package/src/models/ApiKey.js +69 -72
  84. package/src/models/App.js +10 -8
  85. package/src/models/As2IncomingMessage.js +12 -10
  86. package/src/models/As2OutgoingMessage.js +12 -10
  87. package/src/models/As2Partner.js +61 -60
  88. package/src/models/As2Station.js +58 -57
  89. package/src/models/Auto.js +5 -2
  90. package/src/models/Automation.js +121 -110
  91. package/src/models/AutomationRun.js +18 -17
  92. package/src/models/BandwidthSnapshot.js +10 -8
  93. package/src/models/Behavior.js +85 -86
  94. package/src/models/Bundle.js +121 -110
  95. package/src/models/BundleDownload.js +14 -12
  96. package/src/models/BundleNotification.js +40 -43
  97. package/src/models/BundleRecipient.js +33 -32
  98. package/src/models/BundleRegistration.js +12 -10
  99. package/src/models/Clickwrap.js +60 -58
  100. package/src/models/DnsRecord.js +10 -8
  101. package/src/models/EmailIncomingMessage.js +10 -8
  102. package/src/models/Errors.js +5 -2
  103. package/src/models/ExternalEvent.js +29 -29
  104. package/src/models/File.js +116 -108
  105. package/src/models/FileAction.js +5 -2
  106. package/src/models/FileComment.js +45 -46
  107. package/src/models/FileCommentReaction.js +26 -26
  108. package/src/models/FileMigration.js +10 -8
  109. package/src/models/FileUploadPart.js +5 -2
  110. package/src/models/Folder.js +32 -29
  111. package/src/models/FormField.js +5 -2
  112. package/src/models/FormFieldSet.js +49 -50
  113. package/src/models/GpgKey.js +60 -59
  114. package/src/models/Group.js +58 -57
  115. package/src/models/GroupUser.js +60 -58
  116. package/src/models/History.js +77 -74
  117. package/src/models/HistoryExport.js +62 -61
  118. package/src/models/HistoryExportResult.js +15 -13
  119. package/src/models/Image.js +5 -2
  120. package/src/models/InboxRecipient.js +33 -32
  121. package/src/models/InboxRegistration.js +12 -10
  122. package/src/models/InboxUpload.js +14 -12
  123. package/src/models/Invoice.js +17 -14
  124. package/src/models/InvoiceLineItem.js +5 -2
  125. package/src/models/IpAddress.js +22 -20
  126. package/src/models/Lock.js +36 -36
  127. package/src/models/Message.js +66 -66
  128. package/src/models/MessageComment.js +50 -52
  129. package/src/models/MessageCommentReaction.js +38 -40
  130. package/src/models/MessageReaction.js +38 -40
  131. package/src/models/Notification.js +74 -72
  132. package/src/models/Payment.js +17 -14
  133. package/src/models/PaymentLineItem.js +5 -2
  134. package/src/models/Permission.js +39 -40
  135. package/src/models/Preview.js +5 -2
  136. package/src/models/Priority.js +14 -12
  137. package/src/models/Project.js +43 -45
  138. package/src/models/PublicIpAddress.js +5 -2
  139. package/src/models/PublicKey.js +50 -52
  140. package/src/models/RemoteBandwidthSnapshot.js +10 -8
  141. package/src/models/RemoteServer.js +380 -312
  142. package/src/models/RemoteServerConfigurationFile.js +5 -2
  143. package/src/models/Request.js +44 -46
  144. package/src/models/Session.js +22 -22
  145. package/src/models/SettingsChange.js +10 -8
  146. package/src/models/SftpHostKey.js +45 -46
  147. package/src/models/ShareGroup.js +56 -56
  148. package/src/models/ShareGroupMember.js +5 -2
  149. package/src/models/Site.js +143 -142
  150. package/src/models/Snapshot.js +50 -50
  151. package/src/models/SsoStrategy.js +20 -21
  152. package/src/models/Status.js +5 -2
  153. package/src/models/Style.js +22 -23
  154. package/src/models/UsageDailySnapshot.js +10 -8
  155. package/src/models/UsageSnapshot.js +10 -8
  156. package/src/models/User.js +185 -168
  157. package/src/models/UserCipherUse.js +12 -10
  158. package/src/models/UserRequest.js +37 -39
  159. package/src/models/WebhookTest.js +26 -24
  160. package/test/Api.test.js +163 -0
  161. package/test/{package.json → integration/package.json} +1 -1
  162. package/test/{src → integration/src}/index.js +1 -1
  163. package/test.sh +2 -1
  164. /package/test/{.babelrc → integration/.babelrc} +0 -0
  165. /package/test/{index.js → integration/index.js} +0 -0
@@ -116,25 +116,25 @@ var FormFieldSet = /*#__PURE__*/(0, _createClass2.default)(function FormFieldSet
116
116
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
117
117
  case 5:
118
118
  params.id = _this.attributes.id;
119
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
119
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
120
120
  _context.next = 8;
121
121
  break;
122
122
  }
123
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
123
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
124
124
  case 8:
125
- if (!(params['title'] && !(0, _utils.isString)(params['title']))) {
125
+ if (!(params.title && !(0, _utils.isString)(params.title))) {
126
126
  _context.next = 10;
127
127
  break;
128
128
  }
129
- throw new errors.InvalidParameterError("Bad parameter: title must be of type String, received ".concat((0, _utils.getType)(params['title'])));
129
+ throw new errors.InvalidParameterError("Bad parameter: title must be of type String, received ".concat((0, _utils.getType)(params.title)));
130
130
  case 10:
131
- if (!(params['form_fields'] && !(0, _utils.isArray)(params['form_fields']))) {
131
+ if (!(params.form_fields && !(0, _utils.isArray)(params.form_fields))) {
132
132
  _context.next = 12;
133
133
  break;
134
134
  }
135
- throw new errors.InvalidParameterError("Bad parameter: form_fields must be of type Array, received ".concat((0, _utils.getType)(params['form_fields'])));
135
+ throw new errors.InvalidParameterError("Bad parameter: form_fields must be of type Array, received ".concat((0, _utils.getType)(params.form_fields)));
136
136
  case 12:
137
- if (params['id']) {
137
+ if (params.id) {
138
138
  _context.next = 18;
139
139
  break;
140
140
  }
@@ -142,14 +142,14 @@ var FormFieldSet = /*#__PURE__*/(0, _createClass2.default)(function FormFieldSet
142
142
  _context.next = 17;
143
143
  break;
144
144
  }
145
- params['id'] = _this.id;
145
+ params.id = _this.id;
146
146
  _context.next = 18;
147
147
  break;
148
148
  case 17:
149
149
  throw new errors.MissingParameterError('Parameter missing: id');
150
150
  case 18:
151
151
  _context.next = 20;
152
- return _Api.default.sendRequest("/form_field_sets/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
152
+ return _Api.default.sendRequest("/form_field_sets/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
153
153
  case 20:
154
154
  response = _context.sent;
155
155
  return _context.abrupt("return", new FormFieldSet(response === null || response === void 0 ? void 0 : response.data, _this.options));
@@ -161,7 +161,6 @@ var FormFieldSet = /*#__PURE__*/(0, _createClass2.default)(function FormFieldSet
161
161
  })));
162
162
  (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
163
163
  var params,
164
- response,
165
164
  _args2 = arguments;
166
165
  return _regenerator.default.wrap(function _callee2$(_context2) {
167
166
  while (1) switch (_context2.prev = _context2.next) {
@@ -180,13 +179,13 @@ var FormFieldSet = /*#__PURE__*/(0, _createClass2.default)(function FormFieldSet
180
179
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
181
180
  case 5:
182
181
  params.id = _this.attributes.id;
183
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
182
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
184
183
  _context2.next = 8;
185
184
  break;
186
185
  }
187
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
186
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
188
187
  case 8:
189
- if (params['id']) {
188
+ if (params.id) {
190
189
  _context2.next = 14;
191
190
  break;
192
191
  }
@@ -194,18 +193,15 @@ var FormFieldSet = /*#__PURE__*/(0, _createClass2.default)(function FormFieldSet
194
193
  _context2.next = 13;
195
194
  break;
196
195
  }
197
- params['id'] = _this.id;
196
+ params.id = _this.id;
198
197
  _context2.next = 14;
199
198
  break;
200
199
  case 13:
201
200
  throw new errors.MissingParameterError('Parameter missing: id');
202
201
  case 14:
203
202
  _context2.next = 16;
204
- return _Api.default.sendRequest("/form_field_sets/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
203
+ return _Api.default.sendRequest("/form_field_sets/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
205
204
  case 16:
206
- response = _context2.sent;
207
- return _context2.abrupt("return");
208
- case 18:
209
205
  case "end":
210
206
  return _context2.stop();
211
207
  }
@@ -216,28 +212,28 @@ var FormFieldSet = /*#__PURE__*/(0, _createClass2.default)(function FormFieldSet
216
212
  return _this.delete(params);
217
213
  });
218
214
  (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
219
- var newObject, _newObject;
215
+ var _newObject, newObject;
220
216
  return _regenerator.default.wrap(function _callee3$(_context3) {
221
217
  while (1) switch (_context3.prev = _context3.next) {
222
218
  case 0:
223
- if (!_this.attributes['id']) {
224
- _context3.next = 8;
219
+ if (!_this.attributes.id) {
220
+ _context3.next = 6;
225
221
  break;
226
222
  }
227
223
  _context3.next = 3;
228
224
  return _this.update(_this.attributes);
229
225
  case 3:
230
- newObject = _context3.sent;
231
- _this.attributes = _objectSpread({}, newObject.attributes);
232
- return _context3.abrupt("return", true);
233
- case 8:
234
- _context3.next = 10;
235
- return FormFieldSet.create(_this.attributes, _this.options);
236
- case 10:
237
226
  _newObject = _context3.sent;
238
227
  _this.attributes = _objectSpread({}, _newObject.attributes);
239
228
  return _context3.abrupt("return", true);
240
- case 13:
229
+ case 6:
230
+ _context3.next = 8;
231
+ return FormFieldSet.create(_this.attributes, _this.options);
232
+ case 8:
233
+ newObject = _context3.sent;
234
+ _this.attributes = _objectSpread({}, newObject.attributes);
235
+ return _context3.abrupt("return", true);
236
+ case 11:
241
237
  case "end":
242
238
  return _context3.stop();
243
239
  }
@@ -272,26 +268,26 @@ _class = FormFieldSet;
272
268
  case 0:
273
269
  params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
274
270
  options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
275
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
271
+ if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
276
272
  _context4.next = 4;
277
273
  break;
278
274
  }
279
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
275
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
280
276
  case 4:
281
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
277
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
282
278
  _context4.next = 6;
283
279
  break;
284
280
  }
285
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
281
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
286
282
  case 6:
287
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
283
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
288
284
  _context4.next = 8;
289
285
  break;
290
286
  }
291
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
287
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
292
288
  case 8:
293
289
  _context4.next = 10;
294
- return _Api.default.sendRequest("/form_field_sets", 'GET', params, options);
290
+ return _Api.default.sendRequest('/form_field_sets', 'GET', params, options);
295
291
  case 10:
296
292
  response = _context4.sent;
297
293
  return _context4.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
@@ -327,21 +323,21 @@ _class = FormFieldSet;
327
323
  }
328
324
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
329
325
  case 4:
330
- params['id'] = id;
331
- if (params['id']) {
326
+ params.id = id;
327
+ if (params.id) {
332
328
  _context5.next = 7;
333
329
  break;
334
330
  }
335
331
  throw new errors.MissingParameterError('Parameter missing: id');
336
332
  case 7:
337
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
333
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
338
334
  _context5.next = 9;
339
335
  break;
340
336
  }
341
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
337
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
342
338
  case 9:
343
339
  _context5.next = 11;
344
- return _Api.default.sendRequest("/form_field_sets/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
340
+ return _Api.default.sendRequest("/form_field_sets/".concat(encodeURIComponent(params.id)), 'GET', params, options);
345
341
  case 11:
346
342
  response = _context5.sent;
347
343
  return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -377,26 +373,26 @@ _class = FormFieldSet;
377
373
  case 0:
378
374
  params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
379
375
  options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
380
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
376
+ if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
381
377
  _context6.next = 4;
382
378
  break;
383
379
  }
384
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
380
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
385
381
  case 4:
386
- if (!(params['title'] && !(0, _utils.isString)(params['title']))) {
382
+ if (!(params.title && !(0, _utils.isString)(params.title))) {
387
383
  _context6.next = 6;
388
384
  break;
389
385
  }
390
- throw new errors.InvalidParameterError("Bad parameter: title must be of type String, received ".concat((0, _utils.getType)(params['title'])));
386
+ throw new errors.InvalidParameterError("Bad parameter: title must be of type String, received ".concat((0, _utils.getType)(params.title)));
391
387
  case 6:
392
- if (!(params['form_fields'] && !(0, _utils.isArray)(params['form_fields']))) {
388
+ if (!(params.form_fields && !(0, _utils.isArray)(params.form_fields))) {
393
389
  _context6.next = 8;
394
390
  break;
395
391
  }
396
- throw new errors.InvalidParameterError("Bad parameter: form_fields must be of type Array, received ".concat((0, _utils.getType)(params['form_fields'])));
392
+ throw new errors.InvalidParameterError("Bad parameter: form_fields must be of type Array, received ".concat((0, _utils.getType)(params.form_fields)));
397
393
  case 8:
398
394
  _context6.next = 10;
399
- return _Api.default.sendRequest("/form_field_sets", 'POST', params, options);
395
+ return _Api.default.sendRequest('/form_field_sets', 'POST', params, options);
400
396
  case 10:
401
397
  response = _context6.sent;
402
398
  return _context6.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -108,37 +108,37 @@ var GpgKey = /*#__PURE__*/(0, _createClass2.default)(function GpgKey() {
108
108
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
109
109
  case 5:
110
110
  params.id = _this.attributes.id;
111
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
111
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
112
112
  _context.next = 8;
113
113
  break;
114
114
  }
115
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
115
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
116
116
  case 8:
117
- if (!(params['public_key'] && !(0, _utils.isString)(params['public_key']))) {
117
+ if (!(params.public_key && !(0, _utils.isString)(params.public_key))) {
118
118
  _context.next = 10;
119
119
  break;
120
120
  }
121
- throw new errors.InvalidParameterError("Bad parameter: public_key must be of type String, received ".concat((0, _utils.getType)(params['public_key'])));
121
+ throw new errors.InvalidParameterError("Bad parameter: public_key must be of type String, received ".concat((0, _utils.getType)(params.public_key)));
122
122
  case 10:
123
- if (!(params['private_key'] && !(0, _utils.isString)(params['private_key']))) {
123
+ if (!(params.private_key && !(0, _utils.isString)(params.private_key))) {
124
124
  _context.next = 12;
125
125
  break;
126
126
  }
127
- throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(params['private_key'])));
127
+ throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(params.private_key)));
128
128
  case 12:
129
- if (!(params['private_key_password'] && !(0, _utils.isString)(params['private_key_password']))) {
129
+ if (!(params.private_key_password && !(0, _utils.isString)(params.private_key_password))) {
130
130
  _context.next = 14;
131
131
  break;
132
132
  }
133
- throw new errors.InvalidParameterError("Bad parameter: private_key_password must be of type String, received ".concat((0, _utils.getType)(params['private_key_password'])));
133
+ throw new errors.InvalidParameterError("Bad parameter: private_key_password must be of type String, received ".concat((0, _utils.getType)(params.private_key_password)));
134
134
  case 14:
135
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
135
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
136
136
  _context.next = 16;
137
137
  break;
138
138
  }
139
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
139
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
140
140
  case 16:
141
- if (params['id']) {
141
+ if (params.id) {
142
142
  _context.next = 22;
143
143
  break;
144
144
  }
@@ -146,14 +146,14 @@ var GpgKey = /*#__PURE__*/(0, _createClass2.default)(function GpgKey() {
146
146
  _context.next = 21;
147
147
  break;
148
148
  }
149
- params['id'] = _this.id;
149
+ params.id = _this.id;
150
150
  _context.next = 22;
151
151
  break;
152
152
  case 21:
153
153
  throw new errors.MissingParameterError('Parameter missing: id');
154
154
  case 22:
155
155
  _context.next = 24;
156
- return _Api.default.sendRequest("/gpg_keys/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
156
+ return _Api.default.sendRequest("/gpg_keys/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
157
157
  case 24:
158
158
  response = _context.sent;
159
159
  return _context.abrupt("return", new GpgKey(response === null || response === void 0 ? void 0 : response.data, _this.options));
@@ -165,7 +165,6 @@ var GpgKey = /*#__PURE__*/(0, _createClass2.default)(function GpgKey() {
165
165
  })));
166
166
  (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
167
167
  var params,
168
- response,
169
168
  _args2 = arguments;
170
169
  return _regenerator.default.wrap(function _callee2$(_context2) {
171
170
  while (1) switch (_context2.prev = _context2.next) {
@@ -184,13 +183,13 @@ var GpgKey = /*#__PURE__*/(0, _createClass2.default)(function GpgKey() {
184
183
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
185
184
  case 5:
186
185
  params.id = _this.attributes.id;
187
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
186
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
188
187
  _context2.next = 8;
189
188
  break;
190
189
  }
191
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
190
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
192
191
  case 8:
193
- if (params['id']) {
192
+ if (params.id) {
194
193
  _context2.next = 14;
195
194
  break;
196
195
  }
@@ -198,18 +197,15 @@ var GpgKey = /*#__PURE__*/(0, _createClass2.default)(function GpgKey() {
198
197
  _context2.next = 13;
199
198
  break;
200
199
  }
201
- params['id'] = _this.id;
200
+ params.id = _this.id;
202
201
  _context2.next = 14;
203
202
  break;
204
203
  case 13:
205
204
  throw new errors.MissingParameterError('Parameter missing: id');
206
205
  case 14:
207
206
  _context2.next = 16;
208
- return _Api.default.sendRequest("/gpg_keys/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
207
+ return _Api.default.sendRequest("/gpg_keys/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
209
208
  case 16:
210
- response = _context2.sent;
211
- return _context2.abrupt("return");
212
- case 18:
213
209
  case "end":
214
210
  return _context2.stop();
215
211
  }
@@ -220,28 +216,28 @@ var GpgKey = /*#__PURE__*/(0, _createClass2.default)(function GpgKey() {
220
216
  return _this.delete(params);
221
217
  });
222
218
  (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
223
- var newObject, _newObject;
219
+ var _newObject, newObject;
224
220
  return _regenerator.default.wrap(function _callee3$(_context3) {
225
221
  while (1) switch (_context3.prev = _context3.next) {
226
222
  case 0:
227
- if (!_this.attributes['id']) {
228
- _context3.next = 8;
223
+ if (!_this.attributes.id) {
224
+ _context3.next = 6;
229
225
  break;
230
226
  }
231
227
  _context3.next = 3;
232
228
  return _this.update(_this.attributes);
233
229
  case 3:
234
- newObject = _context3.sent;
235
- _this.attributes = _objectSpread({}, newObject.attributes);
236
- return _context3.abrupt("return", true);
237
- case 8:
238
- _context3.next = 10;
239
- return GpgKey.create(_this.attributes, _this.options);
240
- case 10:
241
230
  _newObject = _context3.sent;
242
231
  _this.attributes = _objectSpread({}, _newObject.attributes);
243
232
  return _context3.abrupt("return", true);
244
- case 13:
233
+ case 6:
234
+ _context3.next = 8;
235
+ return GpgKey.create(_this.attributes, _this.options);
236
+ case 8:
237
+ newObject = _context3.sent;
238
+ _this.attributes = _objectSpread({}, newObject.attributes);
239
+ return _context3.abrupt("return", true);
240
+ case 11:
245
241
  case "end":
246
242
  return _context3.stop();
247
243
  }
@@ -277,26 +273,26 @@ _class = GpgKey;
277
273
  case 0:
278
274
  params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
279
275
  options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
280
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
276
+ if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
281
277
  _context4.next = 4;
282
278
  break;
283
279
  }
284
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
280
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
285
281
  case 4:
286
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
282
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
287
283
  _context4.next = 6;
288
284
  break;
289
285
  }
290
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
286
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
291
287
  case 6:
292
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
288
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
293
289
  _context4.next = 8;
294
290
  break;
295
291
  }
296
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
292
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
297
293
  case 8:
298
294
  _context4.next = 10;
299
- return _Api.default.sendRequest("/gpg_keys", 'GET', params, options);
295
+ return _Api.default.sendRequest('/gpg_keys', 'GET', params, options);
300
296
  case 10:
301
297
  response = _context4.sent;
302
298
  return _context4.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
@@ -332,21 +328,21 @@ _class = GpgKey;
332
328
  }
333
329
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
334
330
  case 4:
335
- params['id'] = id;
336
- if (params['id']) {
331
+ params.id = id;
332
+ if (params.id) {
337
333
  _context5.next = 7;
338
334
  break;
339
335
  }
340
336
  throw new errors.MissingParameterError('Parameter missing: id');
341
337
  case 7:
342
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
338
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
343
339
  _context5.next = 9;
344
340
  break;
345
341
  }
346
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
342
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
347
343
  case 9:
348
344
  _context5.next = 11;
349
- return _Api.default.sendRequest("/gpg_keys/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
345
+ return _Api.default.sendRequest("/gpg_keys/".concat(encodeURIComponent(params.id)), 'GET', params, options);
350
346
  case 11:
351
347
  response = _context5.sent;
352
348
  return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -381,44 +377,44 @@ _class = GpgKey;
381
377
  case 0:
382
378
  params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
383
379
  options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
384
- if (params['name']) {
380
+ if (params.name) {
385
381
  _context6.next = 4;
386
382
  break;
387
383
  }
388
384
  throw new errors.MissingParameterError('Parameter missing: name');
389
385
  case 4:
390
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
386
+ if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
391
387
  _context6.next = 6;
392
388
  break;
393
389
  }
394
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
390
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
395
391
  case 6:
396
- if (!(params['public_key'] && !(0, _utils.isString)(params['public_key']))) {
392
+ if (!(params.public_key && !(0, _utils.isString)(params.public_key))) {
397
393
  _context6.next = 8;
398
394
  break;
399
395
  }
400
- throw new errors.InvalidParameterError("Bad parameter: public_key must be of type String, received ".concat((0, _utils.getType)(params['public_key'])));
396
+ throw new errors.InvalidParameterError("Bad parameter: public_key must be of type String, received ".concat((0, _utils.getType)(params.public_key)));
401
397
  case 8:
402
- if (!(params['private_key'] && !(0, _utils.isString)(params['private_key']))) {
398
+ if (!(params.private_key && !(0, _utils.isString)(params.private_key))) {
403
399
  _context6.next = 10;
404
400
  break;
405
401
  }
406
- throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(params['private_key'])));
402
+ throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(params.private_key)));
407
403
  case 10:
408
- if (!(params['private_key_password'] && !(0, _utils.isString)(params['private_key_password']))) {
404
+ if (!(params.private_key_password && !(0, _utils.isString)(params.private_key_password))) {
409
405
  _context6.next = 12;
410
406
  break;
411
407
  }
412
- throw new errors.InvalidParameterError("Bad parameter: private_key_password must be of type String, received ".concat((0, _utils.getType)(params['private_key_password'])));
408
+ throw new errors.InvalidParameterError("Bad parameter: private_key_password must be of type String, received ".concat((0, _utils.getType)(params.private_key_password)));
413
409
  case 12:
414
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
410
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
415
411
  _context6.next = 14;
416
412
  break;
417
413
  }
418
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
414
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
419
415
  case 14:
420
416
  _context6.next = 16;
421
- return _Api.default.sendRequest("/gpg_keys", 'POST', params, options);
417
+ return _Api.default.sendRequest('/gpg_keys', 'POST', params, options);
422
418
  case 16:
423
419
  response = _context6.sent;
424
420
  return _context6.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));