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.
- package/.eslintrc.js +0 -3
- package/_VERSION +1 -1
- package/lib/Api.js +1 -1
- package/lib/Errors.js +345 -334
- package/lib/Files.js +1 -1
- package/lib/models/ActionNotificationExport.js +25 -25
- package/lib/models/ActionNotificationExportResult.js +10 -10
- package/lib/models/ActionWebhookFailure.js +5 -9
- package/lib/models/ApiKey.js +62 -70
- package/lib/models/App.js +5 -5
- package/lib/models/As2IncomingMessage.js +7 -7
- package/lib/models/As2OutgoingMessage.js +7 -7
- package/lib/models/As2Partner.js +54 -58
- package/lib/models/As2Station.js +51 -55
- package/lib/models/Automation.js +102 -110
- package/lib/models/AutomationRun.js +13 -13
- package/lib/models/BandwidthSnapshot.js +5 -5
- package/lib/models/Behavior.js +77 -85
- package/lib/models/Bundle.js +102 -110
- package/lib/models/BundleDownload.js +9 -9
- package/lib/models/BundleNotification.js +37 -41
- package/lib/models/BundleRecipient.js +22 -22
- package/lib/models/BundleRegistration.js +7 -7
- package/lib/models/Clickwrap.js +52 -56
- package/lib/models/DnsRecord.js +5 -5
- package/lib/models/EmailIncomingMessage.js +5 -5
- package/lib/models/ExternalEvent.js +18 -18
- package/lib/models/File.js +89 -93
- package/lib/models/FileComment.js +41 -45
- package/lib/models/FileCommentReaction.js +15 -19
- package/lib/models/FileMigration.js +5 -5
- package/lib/models/Folder.js +24 -24
- package/lib/models/FormFieldSet.js +44 -48
- package/lib/models/GpgKey.js +53 -57
- package/lib/models/Group.js +51 -55
- package/lib/models/GroupUser.js +53 -57
- package/lib/models/History.js +72 -72
- package/lib/models/HistoryExport.js +51 -51
- package/lib/models/HistoryExportResult.js +10 -10
- package/lib/models/InboxRecipient.js +22 -22
- package/lib/models/InboxRegistration.js +7 -7
- package/lib/models/InboxUpload.js +9 -9
- package/lib/models/Invoice.js +12 -12
- package/lib/models/IpAddress.js +17 -17
- package/lib/models/Lock.js +27 -31
- package/lib/models/Message.js +60 -64
- package/lib/models/MessageComment.js +46 -50
- package/lib/models/MessageCommentReaction.js +27 -31
- package/lib/models/MessageReaction.js +27 -31
- package/lib/models/Notification.js +66 -70
- package/lib/models/Payment.js +12 -12
- package/lib/models/Permission.js +28 -32
- package/lib/models/Priority.js +9 -9
- package/lib/models/Project.js +39 -43
- package/lib/models/PublicKey.js +46 -50
- package/lib/models/RemoteBandwidthSnapshot.js +5 -5
- package/lib/models/RemoteServer.js +306 -310
- package/lib/models/Request.js +33 -37
- package/lib/models/Session.js +11 -15
- package/lib/models/SettingsChange.js +5 -5
- package/lib/models/SftpHostKey.js +40 -44
- package/lib/models/ShareGroup.js +50 -54
- package/lib/models/Site.js +138 -138
- package/lib/models/Snapshot.js +44 -48
- package/lib/models/SsoStrategy.js +15 -19
- package/lib/models/Style.js +17 -21
- package/lib/models/UsageDailySnapshot.js +5 -5
- package/lib/models/UsageSnapshot.js +5 -5
- package/lib/models/User.js +156 -172
- package/lib/models/UserCipherUse.js +7 -7
- package/lib/models/UserRequest.js +26 -30
- package/lib/models/WebhookTest.js +15 -15
- package/package.json +6 -2
- package/src/Api.js +2 -1
- package/src/Errors.js +189 -178
- package/src/Files.js +1 -1
- package/src/models/AccountLineItem.js +5 -2
- package/src/models/Action.js +5 -2
- package/src/models/ActionNotificationExport.js +36 -35
- package/src/models/ActionNotificationExportResult.js +15 -13
- package/src/models/ActionWebhookFailure.js +9 -8
- package/src/models/ApiKey.js +69 -72
- package/src/models/App.js +10 -8
- package/src/models/As2IncomingMessage.js +12 -10
- package/src/models/As2OutgoingMessage.js +12 -10
- package/src/models/As2Partner.js +61 -60
- package/src/models/As2Station.js +58 -57
- package/src/models/Auto.js +5 -2
- package/src/models/Automation.js +121 -110
- package/src/models/AutomationRun.js +18 -17
- package/src/models/BandwidthSnapshot.js +10 -8
- package/src/models/Behavior.js +85 -86
- package/src/models/Bundle.js +121 -110
- package/src/models/BundleDownload.js +14 -12
- package/src/models/BundleNotification.js +40 -43
- package/src/models/BundleRecipient.js +33 -32
- package/src/models/BundleRegistration.js +12 -10
- package/src/models/Clickwrap.js +60 -58
- package/src/models/DnsRecord.js +10 -8
- package/src/models/EmailIncomingMessage.js +10 -8
- package/src/models/Errors.js +5 -2
- package/src/models/ExternalEvent.js +29 -29
- package/src/models/File.js +116 -108
- package/src/models/FileAction.js +5 -2
- package/src/models/FileComment.js +45 -46
- package/src/models/FileCommentReaction.js +26 -26
- package/src/models/FileMigration.js +10 -8
- package/src/models/FileUploadPart.js +5 -2
- package/src/models/Folder.js +32 -29
- package/src/models/FormField.js +5 -2
- package/src/models/FormFieldSet.js +49 -50
- package/src/models/GpgKey.js +60 -59
- package/src/models/Group.js +58 -57
- package/src/models/GroupUser.js +60 -58
- package/src/models/History.js +77 -74
- package/src/models/HistoryExport.js +62 -61
- package/src/models/HistoryExportResult.js +15 -13
- package/src/models/Image.js +5 -2
- package/src/models/InboxRecipient.js +33 -32
- package/src/models/InboxRegistration.js +12 -10
- package/src/models/InboxUpload.js +14 -12
- package/src/models/Invoice.js +17 -14
- package/src/models/InvoiceLineItem.js +5 -2
- package/src/models/IpAddress.js +22 -20
- package/src/models/Lock.js +36 -36
- package/src/models/Message.js +66 -66
- package/src/models/MessageComment.js +50 -52
- package/src/models/MessageCommentReaction.js +38 -40
- package/src/models/MessageReaction.js +38 -40
- package/src/models/Notification.js +74 -72
- package/src/models/Payment.js +17 -14
- package/src/models/PaymentLineItem.js +5 -2
- package/src/models/Permission.js +39 -40
- package/src/models/Preview.js +5 -2
- package/src/models/Priority.js +14 -12
- package/src/models/Project.js +43 -45
- package/src/models/PublicIpAddress.js +5 -2
- package/src/models/PublicKey.js +50 -52
- package/src/models/RemoteBandwidthSnapshot.js +10 -8
- package/src/models/RemoteServer.js +380 -312
- package/src/models/RemoteServerConfigurationFile.js +5 -2
- package/src/models/Request.js +44 -46
- package/src/models/Session.js +22 -22
- package/src/models/SettingsChange.js +10 -8
- package/src/models/SftpHostKey.js +45 -46
- package/src/models/ShareGroup.js +56 -56
- package/src/models/ShareGroupMember.js +5 -2
- package/src/models/Site.js +143 -142
- package/src/models/Snapshot.js +50 -50
- package/src/models/SsoStrategy.js +20 -21
- package/src/models/Status.js +5 -2
- package/src/models/Style.js +22 -23
- package/src/models/UsageDailySnapshot.js +10 -8
- package/src/models/UsageSnapshot.js +10 -8
- package/src/models/User.js +185 -168
- package/src/models/UserCipherUse.js +12 -10
- package/src/models/UserRequest.js +37 -39
- package/src/models/WebhookTest.js +26 -24
- package/test/Api.test.js +163 -0
- package/test/{package.json → integration/package.json} +1 -1
- package/test/{src → integration/src}/index.js +1 -1
- package/test.sh +2 -1
- /package/test/{.babelrc → integration/.babelrc} +0 -0
- /package/test/{index.js → integration/index.js} +0 -0
package/lib/models/Snapshot.js
CHANGED
@@ -107,31 +107,31 @@ var Snapshot = /*#__PURE__*/(0, _createClass2.default)(function Snapshot() {
|
|
107
107
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
108
108
|
case 5:
|
109
109
|
params.id = _this.attributes.id;
|
110
|
-
if (!(params
|
110
|
+
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
111
111
|
_context.next = 8;
|
112
112
|
break;
|
113
113
|
}
|
114
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params
|
114
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
115
115
|
case 8:
|
116
|
-
if (!(params
|
116
|
+
if (!(params.expires_at && !(0, _utils.isString)(params.expires_at))) {
|
117
117
|
_context.next = 10;
|
118
118
|
break;
|
119
119
|
}
|
120
|
-
throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params
|
120
|
+
throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params.expires_at)));
|
121
121
|
case 10:
|
122
|
-
if (!(params
|
122
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
123
123
|
_context.next = 12;
|
124
124
|
break;
|
125
125
|
}
|
126
|
-
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params
|
126
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
127
127
|
case 12:
|
128
|
-
if (!(params
|
128
|
+
if (!(params.paths && !(0, _utils.isArray)(params.paths))) {
|
129
129
|
_context.next = 14;
|
130
130
|
break;
|
131
131
|
}
|
132
|
-
throw new errors.InvalidParameterError("Bad parameter: paths must be of type Array, received ".concat((0, _utils.getType)(params
|
132
|
+
throw new errors.InvalidParameterError("Bad parameter: paths must be of type Array, received ".concat((0, _utils.getType)(params.paths)));
|
133
133
|
case 14:
|
134
|
-
if (params
|
134
|
+
if (params.id) {
|
135
135
|
_context.next = 20;
|
136
136
|
break;
|
137
137
|
}
|
@@ -139,14 +139,14 @@ var Snapshot = /*#__PURE__*/(0, _createClass2.default)(function Snapshot() {
|
|
139
139
|
_context.next = 19;
|
140
140
|
break;
|
141
141
|
}
|
142
|
-
params
|
142
|
+
params.id = _this.id;
|
143
143
|
_context.next = 20;
|
144
144
|
break;
|
145
145
|
case 19:
|
146
146
|
throw new errors.MissingParameterError('Parameter missing: id');
|
147
147
|
case 20:
|
148
148
|
_context.next = 22;
|
149
|
-
return _Api.default.sendRequest("/snapshots/".concat(encodeURIComponent(params
|
149
|
+
return _Api.default.sendRequest("/snapshots/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
150
150
|
case 22:
|
151
151
|
response = _context.sent;
|
152
152
|
return _context.abrupt("return", new Snapshot(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
@@ -158,7 +158,6 @@ var Snapshot = /*#__PURE__*/(0, _createClass2.default)(function Snapshot() {
|
|
158
158
|
})));
|
159
159
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
160
160
|
var params,
|
161
|
-
response,
|
162
161
|
_args2 = arguments;
|
163
162
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
164
163
|
while (1) switch (_context2.prev = _context2.next) {
|
@@ -177,13 +176,13 @@ var Snapshot = /*#__PURE__*/(0, _createClass2.default)(function Snapshot() {
|
|
177
176
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
178
177
|
case 5:
|
179
178
|
params.id = _this.attributes.id;
|
180
|
-
if (!(params
|
179
|
+
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
181
180
|
_context2.next = 8;
|
182
181
|
break;
|
183
182
|
}
|
184
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params
|
183
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
185
184
|
case 8:
|
186
|
-
if (params
|
185
|
+
if (params.id) {
|
187
186
|
_context2.next = 14;
|
188
187
|
break;
|
189
188
|
}
|
@@ -191,18 +190,15 @@ var Snapshot = /*#__PURE__*/(0, _createClass2.default)(function Snapshot() {
|
|
191
190
|
_context2.next = 13;
|
192
191
|
break;
|
193
192
|
}
|
194
|
-
params
|
193
|
+
params.id = _this.id;
|
195
194
|
_context2.next = 14;
|
196
195
|
break;
|
197
196
|
case 13:
|
198
197
|
throw new errors.MissingParameterError('Parameter missing: id');
|
199
198
|
case 14:
|
200
199
|
_context2.next = 16;
|
201
|
-
return _Api.default.sendRequest("/snapshots/".concat(encodeURIComponent(params
|
200
|
+
return _Api.default.sendRequest("/snapshots/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
|
202
201
|
case 16:
|
203
|
-
response = _context2.sent;
|
204
|
-
return _context2.abrupt("return");
|
205
|
-
case 18:
|
206
202
|
case "end":
|
207
203
|
return _context2.stop();
|
208
204
|
}
|
@@ -213,28 +209,28 @@ var Snapshot = /*#__PURE__*/(0, _createClass2.default)(function Snapshot() {
|
|
213
209
|
return _this.delete(params);
|
214
210
|
});
|
215
211
|
(0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
216
|
-
var
|
212
|
+
var _newObject, newObject;
|
217
213
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
218
214
|
while (1) switch (_context3.prev = _context3.next) {
|
219
215
|
case 0:
|
220
|
-
if (!_this.attributes
|
221
|
-
_context3.next =
|
216
|
+
if (!_this.attributes.id) {
|
217
|
+
_context3.next = 6;
|
222
218
|
break;
|
223
219
|
}
|
224
220
|
_context3.next = 3;
|
225
221
|
return _this.update(_this.attributes);
|
226
222
|
case 3:
|
227
|
-
newObject = _context3.sent;
|
228
|
-
_this.attributes = _objectSpread({}, newObject.attributes);
|
229
|
-
return _context3.abrupt("return", true);
|
230
|
-
case 8:
|
231
|
-
_context3.next = 10;
|
232
|
-
return Snapshot.create(_this.attributes, _this.options);
|
233
|
-
case 10:
|
234
223
|
_newObject = _context3.sent;
|
235
224
|
_this.attributes = _objectSpread({}, _newObject.attributes);
|
236
225
|
return _context3.abrupt("return", true);
|
237
|
-
case
|
226
|
+
case 6:
|
227
|
+
_context3.next = 8;
|
228
|
+
return Snapshot.create(_this.attributes, _this.options);
|
229
|
+
case 8:
|
230
|
+
newObject = _context3.sent;
|
231
|
+
_this.attributes = _objectSpread({}, newObject.attributes);
|
232
|
+
return _context3.abrupt("return", true);
|
233
|
+
case 11:
|
238
234
|
case "end":
|
239
235
|
return _context3.stop();
|
240
236
|
}
|
@@ -268,20 +264,20 @@ _class = Snapshot;
|
|
268
264
|
case 0:
|
269
265
|
params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
270
266
|
options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
271
|
-
if (!(params
|
267
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
272
268
|
_context4.next = 4;
|
273
269
|
break;
|
274
270
|
}
|
275
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
271
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
276
272
|
case 4:
|
277
|
-
if (!(params
|
273
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
278
274
|
_context4.next = 6;
|
279
275
|
break;
|
280
276
|
}
|
281
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
277
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
282
278
|
case 6:
|
283
279
|
_context4.next = 8;
|
284
|
-
return _Api.default.sendRequest(
|
280
|
+
return _Api.default.sendRequest('/snapshots', 'GET', params, options);
|
285
281
|
case 8:
|
286
282
|
response = _context4.sent;
|
287
283
|
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) {
|
@@ -317,21 +313,21 @@ _class = Snapshot;
|
|
317
313
|
}
|
318
314
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
319
315
|
case 4:
|
320
|
-
params
|
321
|
-
if (params
|
316
|
+
params.id = id;
|
317
|
+
if (params.id) {
|
322
318
|
_context5.next = 7;
|
323
319
|
break;
|
324
320
|
}
|
325
321
|
throw new errors.MissingParameterError('Parameter missing: id');
|
326
322
|
case 7:
|
327
|
-
if (!(params
|
323
|
+
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
328
324
|
_context5.next = 9;
|
329
325
|
break;
|
330
326
|
}
|
331
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params
|
327
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
332
328
|
case 9:
|
333
329
|
_context5.next = 11;
|
334
|
-
return _Api.default.sendRequest("/snapshots/".concat(encodeURIComponent(params
|
330
|
+
return _Api.default.sendRequest("/snapshots/".concat(encodeURIComponent(params.id)), 'GET', params, options);
|
335
331
|
case 11:
|
336
332
|
response = _context5.sent;
|
337
333
|
return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|
@@ -364,26 +360,26 @@ _class = Snapshot;
|
|
364
360
|
case 0:
|
365
361
|
params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
366
362
|
options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
|
367
|
-
if (!(params
|
363
|
+
if (!(params.expires_at && !(0, _utils.isString)(params.expires_at))) {
|
368
364
|
_context6.next = 4;
|
369
365
|
break;
|
370
366
|
}
|
371
|
-
throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params
|
367
|
+
throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params.expires_at)));
|
372
368
|
case 4:
|
373
|
-
if (!(params
|
369
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
374
370
|
_context6.next = 6;
|
375
371
|
break;
|
376
372
|
}
|
377
|
-
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params
|
373
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
378
374
|
case 6:
|
379
|
-
if (!(params
|
375
|
+
if (!(params.paths && !(0, _utils.isArray)(params.paths))) {
|
380
376
|
_context6.next = 8;
|
381
377
|
break;
|
382
378
|
}
|
383
|
-
throw new errors.InvalidParameterError("Bad parameter: paths must be of type Array, received ".concat((0, _utils.getType)(params
|
379
|
+
throw new errors.InvalidParameterError("Bad parameter: paths must be of type Array, received ".concat((0, _utils.getType)(params.paths)));
|
384
380
|
case 8:
|
385
381
|
_context6.next = 10;
|
386
|
-
return _Api.default.sendRequest(
|
382
|
+
return _Api.default.sendRequest('/snapshots', 'POST', params, options);
|
387
383
|
case 10:
|
388
384
|
response = _context6.sent;
|
389
385
|
return _context6.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|
@@ -216,7 +216,6 @@ var SsoStrategy = /*#__PURE__*/(0, _createClass2.default)(function SsoStrategy()
|
|
216
216
|
// Synchronize provisioning data with the SSO remote server
|
217
217
|
(0, _defineProperty2.default)(this, "sync", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
218
218
|
var params,
|
219
|
-
response,
|
220
219
|
_args = arguments;
|
221
220
|
return _regenerator.default.wrap(function _callee$(_context) {
|
222
221
|
while (1) switch (_context.prev = _context.next) {
|
@@ -235,13 +234,13 @@ var SsoStrategy = /*#__PURE__*/(0, _createClass2.default)(function SsoStrategy()
|
|
235
234
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
236
235
|
case 5:
|
237
236
|
params.id = _this.attributes.id;
|
238
|
-
if (!(params
|
237
|
+
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
239
238
|
_context.next = 8;
|
240
239
|
break;
|
241
240
|
}
|
242
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params
|
241
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
243
242
|
case 8:
|
244
|
-
if (params
|
243
|
+
if (params.id) {
|
245
244
|
_context.next = 14;
|
246
245
|
break;
|
247
246
|
}
|
@@ -249,18 +248,15 @@ var SsoStrategy = /*#__PURE__*/(0, _createClass2.default)(function SsoStrategy()
|
|
249
248
|
_context.next = 13;
|
250
249
|
break;
|
251
250
|
}
|
252
|
-
params
|
251
|
+
params.id = _this.id;
|
253
252
|
_context.next = 14;
|
254
253
|
break;
|
255
254
|
case 13:
|
256
255
|
throw new errors.MissingParameterError('Parameter missing: id');
|
257
256
|
case 14:
|
258
257
|
_context.next = 16;
|
259
|
-
return _Api.default.sendRequest("/sso_strategies/".concat(encodeURIComponent(params
|
258
|
+
return _Api.default.sendRequest("/sso_strategies/".concat(encodeURIComponent(params.id), "/sync"), 'POST', params, _this.options);
|
260
259
|
case 16:
|
261
|
-
response = _context.sent;
|
262
|
-
return _context.abrupt("return");
|
263
|
-
case 18:
|
264
260
|
case "end":
|
265
261
|
return _context.stop();
|
266
262
|
}
|
@@ -294,20 +290,20 @@ _class = SsoStrategy;
|
|
294
290
|
case 0:
|
295
291
|
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
296
292
|
options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
|
297
|
-
if (!(params
|
293
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
298
294
|
_context2.next = 4;
|
299
295
|
break;
|
300
296
|
}
|
301
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
297
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
302
298
|
case 4:
|
303
|
-
if (!(params
|
299
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
304
300
|
_context2.next = 6;
|
305
301
|
break;
|
306
302
|
}
|
307
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
303
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
308
304
|
case 6:
|
309
305
|
_context2.next = 8;
|
310
|
-
return _Api.default.sendRequest(
|
306
|
+
return _Api.default.sendRequest('/sso_strategies', 'GET', params, options);
|
311
307
|
case 8:
|
312
308
|
response = _context2.sent;
|
313
309
|
return _context2.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
@@ -343,21 +339,21 @@ _class = SsoStrategy;
|
|
343
339
|
}
|
344
340
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
345
341
|
case 4:
|
346
|
-
params
|
347
|
-
if (params
|
342
|
+
params.id = id;
|
343
|
+
if (params.id) {
|
348
344
|
_context3.next = 7;
|
349
345
|
break;
|
350
346
|
}
|
351
347
|
throw new errors.MissingParameterError('Parameter missing: id');
|
352
348
|
case 7:
|
353
|
-
if (!(params
|
349
|
+
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
354
350
|
_context3.next = 9;
|
355
351
|
break;
|
356
352
|
}
|
357
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params
|
353
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
358
354
|
case 9:
|
359
355
|
_context3.next = 11;
|
360
|
-
return _Api.default.sendRequest("/sso_strategies/".concat(encodeURIComponent(params
|
356
|
+
return _Api.default.sendRequest("/sso_strategies/".concat(encodeURIComponent(params.id)), 'GET', params, options);
|
361
357
|
case 11:
|
362
358
|
response = _context3.sent;
|
363
359
|
return _context3.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|
package/lib/models/Style.js
CHANGED
@@ -91,13 +91,13 @@ var Style = /*#__PURE__*/(0, _createClass2.default)(function Style() {
|
|
91
91
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
92
92
|
case 5:
|
93
93
|
params.path = _this.attributes.path;
|
94
|
-
if (!(params
|
94
|
+
if (!(params.path && !(0, _utils.isString)(params.path))) {
|
95
95
|
_context.next = 8;
|
96
96
|
break;
|
97
97
|
}
|
98
|
-
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params
|
98
|
+
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
99
99
|
case 8:
|
100
|
-
if (params
|
100
|
+
if (params.path) {
|
101
101
|
_context.next = 14;
|
102
102
|
break;
|
103
103
|
}
|
@@ -105,13 +105,13 @@ var Style = /*#__PURE__*/(0, _createClass2.default)(function Style() {
|
|
105
105
|
_context.next = 13;
|
106
106
|
break;
|
107
107
|
}
|
108
|
-
params
|
108
|
+
params.path = _this.path;
|
109
109
|
_context.next = 14;
|
110
110
|
break;
|
111
111
|
case 13:
|
112
112
|
throw new errors.MissingParameterError('Parameter missing: path');
|
113
113
|
case 14:
|
114
|
-
if (params
|
114
|
+
if (params.file) {
|
115
115
|
_context.next = 20;
|
116
116
|
break;
|
117
117
|
}
|
@@ -119,14 +119,14 @@ var Style = /*#__PURE__*/(0, _createClass2.default)(function Style() {
|
|
119
119
|
_context.next = 19;
|
120
120
|
break;
|
121
121
|
}
|
122
|
-
params
|
122
|
+
params.file = _this.file;
|
123
123
|
_context.next = 20;
|
124
124
|
break;
|
125
125
|
case 19:
|
126
126
|
throw new errors.MissingParameterError('Parameter missing: file');
|
127
127
|
case 20:
|
128
128
|
_context.next = 22;
|
129
|
-
return _Api.default.sendRequest("/styles/".concat(encodeURIComponent(params
|
129
|
+
return _Api.default.sendRequest("/styles/".concat(encodeURIComponent(params.path)), 'PATCH', params, _this.options);
|
130
130
|
case 22:
|
131
131
|
response = _context.sent;
|
132
132
|
return _context.abrupt("return", new Style(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
@@ -138,7 +138,6 @@ var Style = /*#__PURE__*/(0, _createClass2.default)(function Style() {
|
|
138
138
|
})));
|
139
139
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
140
140
|
var params,
|
141
|
-
response,
|
142
141
|
_args2 = arguments;
|
143
142
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
144
143
|
while (1) switch (_context2.prev = _context2.next) {
|
@@ -157,13 +156,13 @@ var Style = /*#__PURE__*/(0, _createClass2.default)(function Style() {
|
|
157
156
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
158
157
|
case 5:
|
159
158
|
params.path = _this.attributes.path;
|
160
|
-
if (!(params
|
159
|
+
if (!(params.path && !(0, _utils.isString)(params.path))) {
|
161
160
|
_context2.next = 8;
|
162
161
|
break;
|
163
162
|
}
|
164
|
-
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params
|
163
|
+
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
165
164
|
case 8:
|
166
|
-
if (params
|
165
|
+
if (params.path) {
|
167
166
|
_context2.next = 14;
|
168
167
|
break;
|
169
168
|
}
|
@@ -171,18 +170,15 @@ var Style = /*#__PURE__*/(0, _createClass2.default)(function Style() {
|
|
171
170
|
_context2.next = 13;
|
172
171
|
break;
|
173
172
|
}
|
174
|
-
params
|
173
|
+
params.path = _this.path;
|
175
174
|
_context2.next = 14;
|
176
175
|
break;
|
177
176
|
case 13:
|
178
177
|
throw new errors.MissingParameterError('Parameter missing: path');
|
179
178
|
case 14:
|
180
179
|
_context2.next = 16;
|
181
|
-
return _Api.default.sendRequest("/styles/".concat(encodeURIComponent(params
|
180
|
+
return _Api.default.sendRequest("/styles/".concat(encodeURIComponent(params.path)), 'DELETE', params, _this.options);
|
182
181
|
case 16:
|
183
|
-
response = _context2.sent;
|
184
|
-
return _context2.abrupt("return");
|
185
|
-
case 18:
|
186
182
|
case "end":
|
187
183
|
return _context2.stop();
|
188
184
|
}
|
@@ -242,21 +238,21 @@ _class = Style;
|
|
242
238
|
}
|
243
239
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
244
240
|
case 4:
|
245
|
-
params
|
246
|
-
if (params
|
241
|
+
params.path = path;
|
242
|
+
if (params.path) {
|
247
243
|
_context4.next = 7;
|
248
244
|
break;
|
249
245
|
}
|
250
246
|
throw new errors.MissingParameterError('Parameter missing: path');
|
251
247
|
case 7:
|
252
|
-
if (!(params
|
248
|
+
if (!(params.path && !(0, _utils.isString)(params.path))) {
|
253
249
|
_context4.next = 9;
|
254
250
|
break;
|
255
251
|
}
|
256
|
-
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params
|
252
|
+
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
257
253
|
case 9:
|
258
254
|
_context4.next = 11;
|
259
|
-
return _Api.default.sendRequest("/styles/".concat(encodeURIComponent(params
|
255
|
+
return _Api.default.sendRequest("/styles/".concat(encodeURIComponent(params.path)), 'GET', params, options);
|
260
256
|
case 11:
|
261
257
|
response = _context4.sent;
|
262
258
|
return _context4.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|
@@ -111,20 +111,20 @@ _class = UsageDailySnapshot;
|
|
111
111
|
case 0:
|
112
112
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
113
113
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
114
|
-
if (!(params
|
114
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
115
115
|
_context.next = 4;
|
116
116
|
break;
|
117
117
|
}
|
118
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
118
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
119
119
|
case 4:
|
120
|
-
if (!(params
|
120
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
121
121
|
_context.next = 6;
|
122
122
|
break;
|
123
123
|
}
|
124
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
124
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
125
125
|
case 6:
|
126
126
|
_context.next = 8;
|
127
|
-
return _Api.default.sendRequest(
|
127
|
+
return _Api.default.sendRequest('/usage_daily_snapshots', 'GET', params, options);
|
128
128
|
case 8:
|
129
129
|
response = _context.sent;
|
130
130
|
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) {
|
@@ -121,20 +121,20 @@ _class = UsageSnapshot;
|
|
121
121
|
case 0:
|
122
122
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
123
123
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
124
|
-
if (!(params
|
124
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
125
125
|
_context.next = 4;
|
126
126
|
break;
|
127
127
|
}
|
128
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
128
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
129
129
|
case 4:
|
130
|
-
if (!(params
|
130
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
131
131
|
_context.next = 6;
|
132
132
|
break;
|
133
133
|
}
|
134
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
134
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
135
135
|
case 6:
|
136
136
|
_context.next = 8;
|
137
|
-
return _Api.default.sendRequest(
|
137
|
+
return _Api.default.sendRequest('/usage_snapshots', 'GET', params, options);
|
138
138
|
case 8:
|
139
139
|
response = _context.sent;
|
140
140
|
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) {
|