files.com 1.0.236 → 1.0.238

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 (72) hide show
  1. package/_VERSION +1 -1
  2. package/docs/Errors.md +1 -0
  3. package/docs/models/BundleNotification.md +35 -0
  4. package/lib/Api.js +153 -159
  5. package/lib/Errors.js +680 -666
  6. package/lib/isomorphic/File.node.js +24 -28
  7. package/lib/models/ActionNotificationExport.js +97 -101
  8. package/lib/models/ActionNotificationExportResult.js +44 -46
  9. package/lib/models/ActionWebhookFailure.js +42 -44
  10. package/lib/models/ApiKey.js +271 -287
  11. package/lib/models/App.js +26 -28
  12. package/lib/models/As2IncomingMessage.js +32 -34
  13. package/lib/models/As2OutgoingMessage.js +32 -34
  14. package/lib/models/As2Partner.js +231 -241
  15. package/lib/models/As2Station.js +219 -229
  16. package/lib/models/Automation.js +333 -343
  17. package/lib/models/AutomationRun.js +75 -79
  18. package/lib/models/BandwidthSnapshot.js +26 -28
  19. package/lib/models/Behavior.js +323 -337
  20. package/lib/models/Bundle.js +375 -387
  21. package/lib/models/BundleDownload.js +38 -40
  22. package/lib/models/BundleNotification.js +223 -173
  23. package/lib/models/BundleRecipient.js +104 -108
  24. package/lib/models/BundleRegistration.js +38 -40
  25. package/lib/models/Clickwrap.js +213 -223
  26. package/lib/models/DnsRecord.js +26 -28
  27. package/lib/models/ExternalEvent.js +93 -99
  28. package/lib/models/File.js +726 -766
  29. package/lib/models/FileComment.js +180 -188
  30. package/lib/models/FileCommentReaction.js +84 -88
  31. package/lib/models/FileMigration.js +31 -33
  32. package/lib/models/Folder.js +94 -98
  33. package/lib/models/FormFieldSet.js +189 -199
  34. package/lib/models/Group.js +207 -217
  35. package/lib/models/GroupUser.js +230 -238
  36. package/lib/models/History.js +266 -276
  37. package/lib/models/HistoryExport.js +175 -179
  38. package/lib/models/HistoryExportResult.js +44 -46
  39. package/lib/models/InboxRecipient.js +104 -108
  40. package/lib/models/InboxRegistration.js +32 -34
  41. package/lib/models/InboxUpload.js +38 -40
  42. package/lib/models/Invoice.js +57 -61
  43. package/lib/models/IpAddress.js +78 -84
  44. package/lib/models/Lock.js +148 -154
  45. package/lib/models/Message.js +267 -277
  46. package/lib/models/MessageComment.js +207 -217
  47. package/lib/models/MessageCommentReaction.js +147 -155
  48. package/lib/models/MessageReaction.js +147 -155
  49. package/lib/models/Notification.js +255 -265
  50. package/lib/models/Payment.js +57 -61
  51. package/lib/models/Permission.js +128 -134
  52. package/lib/models/Priority.js +45 -47
  53. package/lib/models/Project.js +183 -193
  54. package/lib/models/PublicKey.js +207 -217
  55. package/lib/models/RemoteBandwidthSnapshot.js +26 -28
  56. package/lib/models/RemoteServer.js +805 -819
  57. package/lib/models/Request.js +166 -174
  58. package/lib/models/Session.js +47 -51
  59. package/lib/models/SettingsChange.js +26 -28
  60. package/lib/models/SftpHostKey.js +177 -187
  61. package/lib/models/Site.js +412 -418
  62. package/lib/models/SsoStrategy.js +99 -105
  63. package/lib/models/Style.js +127 -133
  64. package/lib/models/UsageDailySnapshot.js +26 -28
  65. package/lib/models/UsageSnapshot.js +26 -28
  66. package/lib/models/User.js +587 -603
  67. package/lib/models/UserCipherUse.js +32 -34
  68. package/lib/models/UserRequest.js +147 -155
  69. package/lib/models/WebhookTest.js +54 -56
  70. package/package.json +1 -1
  71. package/src/Errors.js +1 -0
  72. package/src/models/BundleNotification.js +39 -1
@@ -165,52 +165,50 @@ var SsoStrategy = /*#__PURE__*/(0, _createClass2.default)(function SsoStrategy()
165
165
  response,
166
166
  _args = arguments;
167
167
  return _regenerator.default.wrap(function _callee$(_context) {
168
- while (1) {
169
- switch (_context.prev = _context.next) {
170
- case 0:
171
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
172
- if (_this.attributes.id) {
173
- _context.next = 3;
174
- break;
175
- }
176
- throw new errors.EmptyPropertyError('Current object has no id');
177
- case 3:
178
- if ((0, _utils.isObject)(params)) {
179
- _context.next = 5;
180
- break;
181
- }
182
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
183
- case 5:
184
- params.id = _this.attributes.id;
185
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
186
- _context.next = 8;
187
- break;
188
- }
189
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
190
- case 8:
191
- if (params['id']) {
192
- _context.next = 14;
193
- break;
194
- }
195
- if (!_this.attributes.id) {
196
- _context.next = 13;
197
- break;
198
- }
199
- params['id'] = _this.id;
168
+ while (1) switch (_context.prev = _context.next) {
169
+ case 0:
170
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
171
+ if (_this.attributes.id) {
172
+ _context.next = 3;
173
+ break;
174
+ }
175
+ throw new errors.EmptyPropertyError('Current object has no id');
176
+ case 3:
177
+ if ((0, _utils.isObject)(params)) {
178
+ _context.next = 5;
179
+ break;
180
+ }
181
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
182
+ case 5:
183
+ params.id = _this.attributes.id;
184
+ if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
185
+ _context.next = 8;
186
+ break;
187
+ }
188
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
189
+ case 8:
190
+ if (params['id']) {
200
191
  _context.next = 14;
201
192
  break;
202
- case 13:
203
- throw new errors.MissingParameterError('Parameter missing: id');
204
- case 14:
205
- _context.next = 16;
206
- return _Api.default.sendRequest("/sso_strategies/".concat(encodeURIComponent(params['id']), "/sync"), 'POST', params, _this.options);
207
- case 16:
208
- response = _context.sent;
209
- return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
210
- case 18:
211
- case "end":
212
- return _context.stop();
213
- }
193
+ }
194
+ if (!_this.attributes.id) {
195
+ _context.next = 13;
196
+ break;
197
+ }
198
+ params['id'] = _this.id;
199
+ _context.next = 14;
200
+ break;
201
+ case 13:
202
+ throw new errors.MissingParameterError('Parameter missing: id');
203
+ case 14:
204
+ _context.next = 16;
205
+ return _Api.default.sendRequest("/sso_strategies/".concat(encodeURIComponent(params['id']), "/sync"), 'POST', params, _this.options);
206
+ case 16:
207
+ response = _context.sent;
208
+ return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
209
+ case 18:
210
+ case "end":
211
+ return _context.stop();
214
212
  }
215
213
  }, _callee);
216
214
  })));
@@ -234,34 +232,32 @@ var SsoStrategy = /*#__PURE__*/(0, _createClass2.default)(function SsoStrategy()
234
232
  response,
235
233
  _args2 = arguments;
236
234
  return _regenerator.default.wrap(function _callee2$(_context2) {
237
- while (1) {
238
- switch (_context2.prev = _context2.next) {
239
- case 0:
240
- params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
241
- options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
242
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
243
- _context2.next = 4;
244
- break;
245
- }
246
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
247
- case 4:
248
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
249
- _context2.next = 6;
250
- break;
251
- }
252
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
253
- case 6:
254
- _context2.next = 8;
255
- return _Api.default.sendRequest("/sso_strategies", 'GET', params, options);
256
- case 8:
257
- response = _context2.sent;
258
- return _context2.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
259
- return new SsoStrategy(obj, options);
260
- })) || []);
261
- case 10:
262
- case "end":
263
- return _context2.stop();
264
- }
235
+ while (1) switch (_context2.prev = _context2.next) {
236
+ case 0:
237
+ params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
238
+ options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
239
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
240
+ _context2.next = 4;
241
+ break;
242
+ }
243
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
244
+ case 4:
245
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
246
+ _context2.next = 6;
247
+ break;
248
+ }
249
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
250
+ case 6:
251
+ _context2.next = 8;
252
+ return _Api.default.sendRequest("/sso_strategies", 'GET', params, options);
253
+ case 8:
254
+ response = _context2.sent;
255
+ return _context2.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
256
+ return new SsoStrategy(obj, options);
257
+ })) || []);
258
+ case 10:
259
+ case "end":
260
+ return _context2.stop();
265
261
  }
266
262
  }, _callee2);
267
263
  })));
@@ -277,39 +273,37 @@ var SsoStrategy = /*#__PURE__*/(0, _createClass2.default)(function SsoStrategy()
277
273
  response,
278
274
  _args3 = arguments;
279
275
  return _regenerator.default.wrap(function _callee3$(_context3) {
280
- while (1) {
281
- switch (_context3.prev = _context3.next) {
282
- case 0:
283
- params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
284
- options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
285
- if ((0, _utils.isObject)(params)) {
286
- _context3.next = 4;
287
- break;
288
- }
289
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
290
- case 4:
291
- params['id'] = id;
292
- if (params['id']) {
293
- _context3.next = 7;
294
- break;
295
- }
296
- throw new errors.MissingParameterError('Parameter missing: id');
297
- case 7:
298
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
299
- _context3.next = 9;
300
- break;
301
- }
302
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
303
- case 9:
304
- _context3.next = 11;
305
- return _Api.default.sendRequest("/sso_strategies/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
306
- case 11:
307
- response = _context3.sent;
308
- return _context3.abrupt("return", new SsoStrategy(response === null || response === void 0 ? void 0 : response.data, options));
309
- case 13:
310
- case "end":
311
- return _context3.stop();
312
- }
276
+ while (1) switch (_context3.prev = _context3.next) {
277
+ case 0:
278
+ params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
279
+ options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
280
+ if ((0, _utils.isObject)(params)) {
281
+ _context3.next = 4;
282
+ break;
283
+ }
284
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
285
+ case 4:
286
+ params['id'] = id;
287
+ if (params['id']) {
288
+ _context3.next = 7;
289
+ break;
290
+ }
291
+ throw new errors.MissingParameterError('Parameter missing: id');
292
+ case 7:
293
+ if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
294
+ _context3.next = 9;
295
+ break;
296
+ }
297
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
298
+ case 9:
299
+ _context3.next = 11;
300
+ return _Api.default.sendRequest("/sso_strategies/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
301
+ case 11:
302
+ response = _context3.sent;
303
+ return _context3.abrupt("return", new SsoStrategy(response === null || response === void 0 ? void 0 : response.data, options));
304
+ case 13:
305
+ case "end":
306
+ return _context3.stop();
313
307
  }
314
308
  }, _callee3);
315
309
  }));
@@ -66,66 +66,64 @@ var Style = /*#__PURE__*/(0, _createClass2.default)(function Style() {
66
66
  response,
67
67
  _args = arguments;
68
68
  return _regenerator.default.wrap(function _callee$(_context) {
69
- while (1) {
70
- switch (_context.prev = _context.next) {
71
- case 0:
72
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
73
- if (_this.attributes.path) {
74
- _context.next = 3;
75
- break;
76
- }
77
- throw new errors.EmptyPropertyError('Current object has no path');
78
- case 3:
79
- if ((0, _utils.isObject)(params)) {
80
- _context.next = 5;
81
- break;
82
- }
83
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
84
- case 5:
85
- params.path = _this.attributes.path;
86
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
87
- _context.next = 8;
88
- break;
89
- }
90
- throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(path)));
91
- case 8:
92
- if (params['path']) {
93
- _context.next = 14;
94
- break;
95
- }
96
- if (!_this.attributes.path) {
97
- _context.next = 13;
98
- break;
99
- }
100
- params['path'] = _this.path;
69
+ while (1) switch (_context.prev = _context.next) {
70
+ case 0:
71
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
72
+ if (_this.attributes.path) {
73
+ _context.next = 3;
74
+ break;
75
+ }
76
+ throw new errors.EmptyPropertyError('Current object has no path');
77
+ case 3:
78
+ if ((0, _utils.isObject)(params)) {
79
+ _context.next = 5;
80
+ break;
81
+ }
82
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
83
+ case 5:
84
+ params.path = _this.attributes.path;
85
+ if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
86
+ _context.next = 8;
87
+ break;
88
+ }
89
+ throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(path)));
90
+ case 8:
91
+ if (params['path']) {
101
92
  _context.next = 14;
102
93
  break;
103
- case 13:
104
- throw new errors.MissingParameterError('Parameter missing: path');
105
- case 14:
106
- if (params['file']) {
107
- _context.next = 20;
108
- break;
109
- }
110
- if (!_this.attributes.file) {
111
- _context.next = 19;
112
- break;
113
- }
114
- params['file'] = _this.file;
94
+ }
95
+ if (!_this.attributes.path) {
96
+ _context.next = 13;
97
+ break;
98
+ }
99
+ params['path'] = _this.path;
100
+ _context.next = 14;
101
+ break;
102
+ case 13:
103
+ throw new errors.MissingParameterError('Parameter missing: path');
104
+ case 14:
105
+ if (params['file']) {
115
106
  _context.next = 20;
116
107
  break;
117
- case 19:
118
- throw new errors.MissingParameterError('Parameter missing: file');
119
- case 20:
120
- _context.next = 22;
121
- return _Api.default.sendRequest("/styles/".concat(encodeURIComponent(params['path'])), 'PATCH', params, _this.options);
122
- case 22:
123
- response = _context.sent;
124
- return _context.abrupt("return", new Style(response === null || response === void 0 ? void 0 : response.data, _this.options));
125
- case 24:
126
- case "end":
127
- return _context.stop();
128
- }
108
+ }
109
+ if (!_this.attributes.file) {
110
+ _context.next = 19;
111
+ break;
112
+ }
113
+ params['file'] = _this.file;
114
+ _context.next = 20;
115
+ break;
116
+ case 19:
117
+ throw new errors.MissingParameterError('Parameter missing: file');
118
+ case 20:
119
+ _context.next = 22;
120
+ return _Api.default.sendRequest("/styles/".concat(encodeURIComponent(params['path'])), 'PATCH', params, _this.options);
121
+ case 22:
122
+ response = _context.sent;
123
+ return _context.abrupt("return", new Style(response === null || response === void 0 ? void 0 : response.data, _this.options));
124
+ case 24:
125
+ case "end":
126
+ return _context.stop();
129
127
  }
130
128
  }, _callee);
131
129
  })));
@@ -134,52 +132,50 @@ var Style = /*#__PURE__*/(0, _createClass2.default)(function Style() {
134
132
  response,
135
133
  _args2 = arguments;
136
134
  return _regenerator.default.wrap(function _callee2$(_context2) {
137
- while (1) {
138
- switch (_context2.prev = _context2.next) {
139
- case 0:
140
- params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
141
- if (_this.attributes.path) {
142
- _context2.next = 3;
143
- break;
144
- }
145
- throw new errors.EmptyPropertyError('Current object has no path');
146
- case 3:
147
- if ((0, _utils.isObject)(params)) {
148
- _context2.next = 5;
149
- break;
150
- }
151
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
152
- case 5:
153
- params.path = _this.attributes.path;
154
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
155
- _context2.next = 8;
156
- break;
157
- }
158
- throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(path)));
159
- case 8:
160
- if (params['path']) {
161
- _context2.next = 14;
162
- break;
163
- }
164
- if (!_this.attributes.path) {
165
- _context2.next = 13;
166
- break;
167
- }
168
- params['path'] = _this.path;
135
+ while (1) switch (_context2.prev = _context2.next) {
136
+ case 0:
137
+ params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
138
+ if (_this.attributes.path) {
139
+ _context2.next = 3;
140
+ break;
141
+ }
142
+ throw new errors.EmptyPropertyError('Current object has no path');
143
+ case 3:
144
+ if ((0, _utils.isObject)(params)) {
145
+ _context2.next = 5;
146
+ break;
147
+ }
148
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
149
+ case 5:
150
+ params.path = _this.attributes.path;
151
+ if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
152
+ _context2.next = 8;
153
+ break;
154
+ }
155
+ throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(path)));
156
+ case 8:
157
+ if (params['path']) {
169
158
  _context2.next = 14;
170
159
  break;
171
- case 13:
172
- throw new errors.MissingParameterError('Parameter missing: path');
173
- case 14:
174
- _context2.next = 16;
175
- return _Api.default.sendRequest("/styles/".concat(encodeURIComponent(params['path'])), 'DELETE', params, _this.options);
176
- case 16:
177
- response = _context2.sent;
178
- return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
179
- case 18:
180
- case "end":
181
- return _context2.stop();
182
- }
160
+ }
161
+ if (!_this.attributes.path) {
162
+ _context2.next = 13;
163
+ break;
164
+ }
165
+ params['path'] = _this.path;
166
+ _context2.next = 14;
167
+ break;
168
+ case 13:
169
+ throw new errors.MissingParameterError('Parameter missing: path');
170
+ case 14:
171
+ _context2.next = 16;
172
+ return _Api.default.sendRequest("/styles/".concat(encodeURIComponent(params['path'])), 'DELETE', params, _this.options);
173
+ case 16:
174
+ response = _context2.sent;
175
+ return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
176
+ case 18:
177
+ case "end":
178
+ return _context2.stop();
183
179
  }
184
180
  }, _callee2);
185
181
  })));
@@ -210,39 +206,37 @@ var Style = /*#__PURE__*/(0, _createClass2.default)(function Style() {
210
206
  response,
211
207
  _args3 = arguments;
212
208
  return _regenerator.default.wrap(function _callee3$(_context3) {
213
- while (1) {
214
- switch (_context3.prev = _context3.next) {
215
- case 0:
216
- params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
217
- options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
218
- if ((0, _utils.isObject)(params)) {
219
- _context3.next = 4;
220
- break;
221
- }
222
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
223
- case 4:
224
- params['path'] = path;
225
- if (params['path']) {
226
- _context3.next = 7;
227
- break;
228
- }
229
- throw new errors.MissingParameterError('Parameter missing: path');
230
- case 7:
231
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
232
- _context3.next = 9;
233
- break;
234
- }
235
- throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
236
- case 9:
237
- _context3.next = 11;
238
- return _Api.default.sendRequest("/styles/".concat(encodeURIComponent(params['path'])), 'GET', params, options);
239
- case 11:
240
- response = _context3.sent;
241
- return _context3.abrupt("return", new Style(response === null || response === void 0 ? void 0 : response.data, options));
242
- case 13:
243
- case "end":
244
- return _context3.stop();
245
- }
209
+ while (1) switch (_context3.prev = _context3.next) {
210
+ case 0:
211
+ params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
212
+ options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
213
+ if ((0, _utils.isObject)(params)) {
214
+ _context3.next = 4;
215
+ break;
216
+ }
217
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
218
+ case 4:
219
+ params['path'] = path;
220
+ if (params['path']) {
221
+ _context3.next = 7;
222
+ break;
223
+ }
224
+ throw new errors.MissingParameterError('Parameter missing: path');
225
+ case 7:
226
+ if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
227
+ _context3.next = 9;
228
+ break;
229
+ }
230
+ throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
231
+ case 9:
232
+ _context3.next = 11;
233
+ return _Api.default.sendRequest("/styles/".concat(encodeURIComponent(params['path'])), 'GET', params, options);
234
+ case 11:
235
+ response = _context3.sent;
236
+ return _context3.abrupt("return", new Style(response === null || response === void 0 ? void 0 : response.data, options));
237
+ case 13:
238
+ case "end":
239
+ return _context3.stop();
246
240
  }
247
241
  }, _callee3);
248
242
  }));
@@ -84,34 +84,32 @@ var UsageDailySnapshot = /*#__PURE__*/(0, _createClass2.default)(function UsageD
84
84
  response,
85
85
  _args = arguments;
86
86
  return _regenerator.default.wrap(function _callee$(_context) {
87
- while (1) {
88
- switch (_context.prev = _context.next) {
89
- case 0:
90
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
91
- options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
92
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
93
- _context.next = 4;
94
- break;
95
- }
96
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
97
- case 4:
98
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
99
- _context.next = 6;
100
- break;
101
- }
102
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
103
- case 6:
104
- _context.next = 8;
105
- return _Api.default.sendRequest("/usage_daily_snapshots", 'GET', params, options);
106
- case 8:
107
- response = _context.sent;
108
- return _context.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
109
- return new UsageDailySnapshot(obj, options);
110
- })) || []);
111
- case 10:
112
- case "end":
113
- return _context.stop();
114
- }
87
+ while (1) switch (_context.prev = _context.next) {
88
+ case 0:
89
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
90
+ options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
91
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
92
+ _context.next = 4;
93
+ break;
94
+ }
95
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
96
+ case 4:
97
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
98
+ _context.next = 6;
99
+ break;
100
+ }
101
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
102
+ case 6:
103
+ _context.next = 8;
104
+ return _Api.default.sendRequest("/usage_daily_snapshots", 'GET', params, options);
105
+ case 8:
106
+ response = _context.sent;
107
+ return _context.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
108
+ return new UsageDailySnapshot(obj, options);
109
+ })) || []);
110
+ case 10:
111
+ case "end":
112
+ return _context.stop();
115
113
  }
116
114
  }, _callee);
117
115
  })));