files.com 1.1.19 → 1.2.0

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