files.com 1.0.235 → 1.0.237
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.
- package/_VERSION +1 -1
- package/docs/models/Bundle.md +9 -2
- package/docs/models/BundleNotification.md +35 -0
- package/docs/models/BundleRegistration.md +3 -1
- package/docs/models/InboxRegistration.md +3 -1
- package/docs/models/Site.md +2 -0
- package/lib/Api.js +153 -159
- package/lib/isomorphic/File.node.js +24 -28
- package/lib/models/ActionNotificationExport.js +97 -101
- package/lib/models/ActionNotificationExportResult.js +44 -46
- package/lib/models/ActionWebhookFailure.js +42 -44
- package/lib/models/ApiKey.js +271 -287
- package/lib/models/App.js +26 -28
- package/lib/models/As2IncomingMessage.js +32 -34
- package/lib/models/As2OutgoingMessage.js +32 -34
- package/lib/models/As2Partner.js +231 -241
- package/lib/models/As2Station.js +219 -229
- package/lib/models/Automation.js +333 -343
- package/lib/models/AutomationRun.js +75 -79
- package/lib/models/BandwidthSnapshot.js +26 -28
- package/lib/models/Behavior.js +323 -337
- package/lib/models/Bundle.js +381 -387
- package/lib/models/BundleDownload.js +38 -40
- package/lib/models/BundleNotification.js +223 -173
- package/lib/models/BundleRecipient.js +104 -108
- package/lib/models/BundleRegistration.js +41 -40
- package/lib/models/Clickwrap.js +213 -223
- package/lib/models/DnsRecord.js +26 -28
- package/lib/models/ExternalEvent.js +93 -99
- package/lib/models/File.js +726 -766
- package/lib/models/FileComment.js +180 -188
- package/lib/models/FileCommentReaction.js +84 -88
- package/lib/models/FileMigration.js +31 -33
- package/lib/models/Folder.js +94 -98
- package/lib/models/FormFieldSet.js +189 -199
- package/lib/models/Group.js +207 -217
- package/lib/models/GroupUser.js +230 -238
- package/lib/models/History.js +266 -276
- package/lib/models/HistoryExport.js +175 -179
- package/lib/models/HistoryExportResult.js +44 -46
- package/lib/models/InboxRecipient.js +104 -108
- package/lib/models/InboxRegistration.js +35 -34
- package/lib/models/InboxUpload.js +38 -40
- package/lib/models/Invoice.js +57 -61
- package/lib/models/IpAddress.js +78 -84
- package/lib/models/Lock.js +148 -154
- package/lib/models/Message.js +267 -277
- package/lib/models/MessageComment.js +207 -217
- package/lib/models/MessageCommentReaction.js +147 -155
- package/lib/models/MessageReaction.js +147 -155
- package/lib/models/Notification.js +255 -265
- package/lib/models/Payment.js +57 -61
- package/lib/models/Permission.js +128 -134
- package/lib/models/Priority.js +45 -47
- package/lib/models/Project.js +183 -193
- package/lib/models/PublicKey.js +207 -217
- package/lib/models/RemoteBandwidthSnapshot.js +26 -28
- package/lib/models/RemoteServer.js +805 -819
- package/lib/models/Request.js +166 -174
- package/lib/models/Session.js +47 -51
- package/lib/models/SettingsChange.js +26 -28
- package/lib/models/SftpHostKey.js +177 -187
- package/lib/models/Site.js +415 -418
- package/lib/models/SsoStrategy.js +99 -105
- package/lib/models/Style.js +127 -133
- package/lib/models/UsageDailySnapshot.js +26 -28
- package/lib/models/UsageSnapshot.js +26 -28
- package/lib/models/User.js +587 -603
- package/lib/models/UserCipherUse.js +32 -34
- package/lib/models/UserRequest.js +147 -155
- package/lib/models/WebhookTest.js +54 -56
- package/package.json +1 -1
- package/src/models/Bundle.js +10 -1
- package/src/models/BundleNotification.js +39 -1
- package/src/models/BundleRegistration.js +3 -0
- package/src/models/InboxRegistration.js +3 -0
- package/src/models/Site.js +3 -0
package/lib/models/ApiKey.js
CHANGED
@@ -111,76 +111,74 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
111
111
|
response,
|
112
112
|
_args = arguments;
|
113
113
|
return _regenerator.default.wrap(function _callee$(_context) {
|
114
|
-
while (1) {
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
if (params['id']) {
|
162
|
-
_context.next = 22;
|
163
|
-
break;
|
164
|
-
}
|
165
|
-
if (!_this.attributes.id) {
|
166
|
-
_context.next = 21;
|
167
|
-
break;
|
168
|
-
}
|
169
|
-
params['id'] = _this.id;
|
114
|
+
while (1) switch (_context.prev = _context.next) {
|
115
|
+
case 0:
|
116
|
+
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
117
|
+
if (_this.attributes.id) {
|
118
|
+
_context.next = 3;
|
119
|
+
break;
|
120
|
+
}
|
121
|
+
throw new errors.EmptyPropertyError('Current object has no id');
|
122
|
+
case 3:
|
123
|
+
if ((0, _utils.isObject)(params)) {
|
124
|
+
_context.next = 5;
|
125
|
+
break;
|
126
|
+
}
|
127
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
128
|
+
case 5:
|
129
|
+
params.id = _this.attributes.id;
|
130
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
131
|
+
_context.next = 8;
|
132
|
+
break;
|
133
|
+
}
|
134
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
135
|
+
case 8:
|
136
|
+
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
|
137
|
+
_context.next = 10;
|
138
|
+
break;
|
139
|
+
}
|
140
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(name)));
|
141
|
+
case 10:
|
142
|
+
if (!(params['description'] && !(0, _utils.isString)(params['description']))) {
|
143
|
+
_context.next = 12;
|
144
|
+
break;
|
145
|
+
}
|
146
|
+
throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(description)));
|
147
|
+
case 12:
|
148
|
+
if (!(params['expires_at'] && !(0, _utils.isString)(params['expires_at']))) {
|
149
|
+
_context.next = 14;
|
150
|
+
break;
|
151
|
+
}
|
152
|
+
throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(expires_at)));
|
153
|
+
case 14:
|
154
|
+
if (!(params['permission_set'] && !(0, _utils.isString)(params['permission_set']))) {
|
155
|
+
_context.next = 16;
|
156
|
+
break;
|
157
|
+
}
|
158
|
+
throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(permission_set)));
|
159
|
+
case 16:
|
160
|
+
if (params['id']) {
|
170
161
|
_context.next = 22;
|
171
162
|
break;
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
163
|
+
}
|
164
|
+
if (!_this.attributes.id) {
|
165
|
+
_context.next = 21;
|
166
|
+
break;
|
167
|
+
}
|
168
|
+
params['id'] = _this.id;
|
169
|
+
_context.next = 22;
|
170
|
+
break;
|
171
|
+
case 21:
|
172
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
173
|
+
case 22:
|
174
|
+
_context.next = 24;
|
175
|
+
return _Api.default.sendRequest("/api_keys/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
|
176
|
+
case 24:
|
177
|
+
response = _context.sent;
|
178
|
+
return _context.abrupt("return", new ApiKey(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
179
|
+
case 26:
|
180
|
+
case "end":
|
181
|
+
return _context.stop();
|
184
182
|
}
|
185
183
|
}, _callee);
|
186
184
|
})));
|
@@ -189,52 +187,50 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
189
187
|
response,
|
190
188
|
_args2 = arguments;
|
191
189
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
192
|
-
while (1) {
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
if (params['id']) {
|
216
|
-
_context2.next = 14;
|
217
|
-
break;
|
218
|
-
}
|
219
|
-
if (!_this.attributes.id) {
|
220
|
-
_context2.next = 13;
|
221
|
-
break;
|
222
|
-
}
|
223
|
-
params['id'] = _this.id;
|
190
|
+
while (1) switch (_context2.prev = _context2.next) {
|
191
|
+
case 0:
|
192
|
+
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
193
|
+
if (_this.attributes.id) {
|
194
|
+
_context2.next = 3;
|
195
|
+
break;
|
196
|
+
}
|
197
|
+
throw new errors.EmptyPropertyError('Current object has no id');
|
198
|
+
case 3:
|
199
|
+
if ((0, _utils.isObject)(params)) {
|
200
|
+
_context2.next = 5;
|
201
|
+
break;
|
202
|
+
}
|
203
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
204
|
+
case 5:
|
205
|
+
params.id = _this.attributes.id;
|
206
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
207
|
+
_context2.next = 8;
|
208
|
+
break;
|
209
|
+
}
|
210
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
211
|
+
case 8:
|
212
|
+
if (params['id']) {
|
224
213
|
_context2.next = 14;
|
225
214
|
break;
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
215
|
+
}
|
216
|
+
if (!_this.attributes.id) {
|
217
|
+
_context2.next = 13;
|
218
|
+
break;
|
219
|
+
}
|
220
|
+
params['id'] = _this.id;
|
221
|
+
_context2.next = 14;
|
222
|
+
break;
|
223
|
+
case 13:
|
224
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
225
|
+
case 14:
|
226
|
+
_context2.next = 16;
|
227
|
+
return _Api.default.sendRequest("/api_keys/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
|
228
|
+
case 16:
|
229
|
+
response = _context2.sent;
|
230
|
+
return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
231
|
+
case 18:
|
232
|
+
case "end":
|
233
|
+
return _context2.stop();
|
238
234
|
}
|
239
235
|
}, _callee2);
|
240
236
|
})));
|
@@ -271,40 +267,38 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
271
267
|
response,
|
272
268
|
_args3 = arguments;
|
273
269
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
274
|
-
while (1) {
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
return
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
return _context3.stop();
|
307
|
-
}
|
270
|
+
while (1) switch (_context3.prev = _context3.next) {
|
271
|
+
case 0:
|
272
|
+
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
273
|
+
options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
274
|
+
if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
|
275
|
+
_context3.next = 4;
|
276
|
+
break;
|
277
|
+
}
|
278
|
+
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
|
279
|
+
case 4:
|
280
|
+
if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
|
281
|
+
_context3.next = 6;
|
282
|
+
break;
|
283
|
+
}
|
284
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
|
285
|
+
case 6:
|
286
|
+
if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
|
287
|
+
_context3.next = 8;
|
288
|
+
break;
|
289
|
+
}
|
290
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
|
291
|
+
case 8:
|
292
|
+
_context3.next = 10;
|
293
|
+
return _Api.default.sendRequest("/api_keys", 'GET', params, options);
|
294
|
+
case 10:
|
295
|
+
response = _context3.sent;
|
296
|
+
return _context3.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) {
|
297
|
+
return new ApiKey(obj, options);
|
298
|
+
})) || []);
|
299
|
+
case 12:
|
300
|
+
case "end":
|
301
|
+
return _context3.stop();
|
308
302
|
}
|
309
303
|
}, _callee3);
|
310
304
|
})));
|
@@ -318,19 +312,17 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
318
312
|
response,
|
319
313
|
_args4 = arguments;
|
320
314
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
321
|
-
while (1) {
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
return _context4.stop();
|
333
|
-
}
|
315
|
+
while (1) switch (_context4.prev = _context4.next) {
|
316
|
+
case 0:
|
317
|
+
options = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
318
|
+
_context4.next = 3;
|
319
|
+
return _Api.default.sendRequest("/api_key", 'GET', {}, options);
|
320
|
+
case 3:
|
321
|
+
response = _context4.sent;
|
322
|
+
return _context4.abrupt("return", new ApiKey(response === null || response === void 0 ? void 0 : response.data, options));
|
323
|
+
case 5:
|
324
|
+
case "end":
|
325
|
+
return _context4.stop();
|
334
326
|
}
|
335
327
|
}, _callee4);
|
336
328
|
})));
|
@@ -341,39 +333,37 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
341
333
|
response,
|
342
334
|
_args5 = arguments;
|
343
335
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
344
|
-
while (1) {
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
return _context5.stop();
|
376
|
-
}
|
336
|
+
while (1) switch (_context5.prev = _context5.next) {
|
337
|
+
case 0:
|
338
|
+
params = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
339
|
+
options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
|
340
|
+
if ((0, _utils.isObject)(params)) {
|
341
|
+
_context5.next = 4;
|
342
|
+
break;
|
343
|
+
}
|
344
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
345
|
+
case 4:
|
346
|
+
params['id'] = id;
|
347
|
+
if (params['id']) {
|
348
|
+
_context5.next = 7;
|
349
|
+
break;
|
350
|
+
}
|
351
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
352
|
+
case 7:
|
353
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
354
|
+
_context5.next = 9;
|
355
|
+
break;
|
356
|
+
}
|
357
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
|
358
|
+
case 9:
|
359
|
+
_context5.next = 11;
|
360
|
+
return _Api.default.sendRequest("/api_keys/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
|
361
|
+
case 11:
|
362
|
+
response = _context5.sent;
|
363
|
+
return _context5.abrupt("return", new ApiKey(response === null || response === void 0 ? void 0 : response.data, options));
|
364
|
+
case 13:
|
365
|
+
case "end":
|
366
|
+
return _context5.stop();
|
377
367
|
}
|
378
368
|
}, _callee5);
|
379
369
|
}));
|
@@ -392,56 +382,54 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
392
382
|
response,
|
393
383
|
_args6 = arguments;
|
394
384
|
return _regenerator.default.wrap(function _callee6$(_context6) {
|
395
|
-
while (1) {
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
return _context6.stop();
|
444
|
-
}
|
385
|
+
while (1) switch (_context6.prev = _context6.next) {
|
386
|
+
case 0:
|
387
|
+
params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
388
|
+
options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
|
389
|
+
if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
|
390
|
+
_context6.next = 4;
|
391
|
+
break;
|
392
|
+
}
|
393
|
+
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
|
394
|
+
case 4:
|
395
|
+
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
|
396
|
+
_context6.next = 6;
|
397
|
+
break;
|
398
|
+
}
|
399
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
|
400
|
+
case 6:
|
401
|
+
if (!(params['description'] && !(0, _utils.isString)(params['description']))) {
|
402
|
+
_context6.next = 8;
|
403
|
+
break;
|
404
|
+
}
|
405
|
+
throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params['description'])));
|
406
|
+
case 8:
|
407
|
+
if (!(params['expires_at'] && !(0, _utils.isString)(params['expires_at']))) {
|
408
|
+
_context6.next = 10;
|
409
|
+
break;
|
410
|
+
}
|
411
|
+
throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params['expires_at'])));
|
412
|
+
case 10:
|
413
|
+
if (!(params['permission_set'] && !(0, _utils.isString)(params['permission_set']))) {
|
414
|
+
_context6.next = 12;
|
415
|
+
break;
|
416
|
+
}
|
417
|
+
throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(params['permission_set'])));
|
418
|
+
case 12:
|
419
|
+
if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
|
420
|
+
_context6.next = 14;
|
421
|
+
break;
|
422
|
+
}
|
423
|
+
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
|
424
|
+
case 14:
|
425
|
+
_context6.next = 16;
|
426
|
+
return _Api.default.sendRequest("/api_keys", 'POST', params, options);
|
427
|
+
case 16:
|
428
|
+
response = _context6.sent;
|
429
|
+
return _context6.abrupt("return", new ApiKey(response === null || response === void 0 ? void 0 : response.data, options));
|
430
|
+
case 18:
|
431
|
+
case "end":
|
432
|
+
return _context6.stop();
|
445
433
|
}
|
446
434
|
}, _callee6);
|
447
435
|
})));
|
@@ -451,38 +439,36 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
451
439
|
response,
|
452
440
|
_args7 = arguments;
|
453
441
|
return _regenerator.default.wrap(function _callee7$(_context7) {
|
454
|
-
while (1) {
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
return _context7.stop();
|
485
|
-
}
|
442
|
+
while (1) switch (_context7.prev = _context7.next) {
|
443
|
+
case 0:
|
444
|
+
params = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
|
445
|
+
options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
|
446
|
+
if (!(params['expires_at'] && !(0, _utils.isString)(params['expires_at']))) {
|
447
|
+
_context7.next = 4;
|
448
|
+
break;
|
449
|
+
}
|
450
|
+
throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params['expires_at'])));
|
451
|
+
case 4:
|
452
|
+
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
|
453
|
+
_context7.next = 6;
|
454
|
+
break;
|
455
|
+
}
|
456
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
|
457
|
+
case 6:
|
458
|
+
if (!(params['permission_set'] && !(0, _utils.isString)(params['permission_set']))) {
|
459
|
+
_context7.next = 8;
|
460
|
+
break;
|
461
|
+
}
|
462
|
+
throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(params['permission_set'])));
|
463
|
+
case 8:
|
464
|
+
_context7.next = 10;
|
465
|
+
return _Api.default.sendRequest("/api_key", 'PATCH', params, options);
|
466
|
+
case 10:
|
467
|
+
response = _context7.sent;
|
468
|
+
return _context7.abrupt("return", new ApiKey(response === null || response === void 0 ? void 0 : response.data, options));
|
469
|
+
case 12:
|
470
|
+
case "end":
|
471
|
+
return _context7.stop();
|
486
472
|
}
|
487
473
|
}, _callee7);
|
488
474
|
})));
|
@@ -491,19 +477,17 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
491
477
|
response,
|
492
478
|
_args8 = arguments;
|
493
479
|
return _regenerator.default.wrap(function _callee8$(_context8) {
|
494
|
-
while (1) {
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
return _context8.stop();
|
506
|
-
}
|
480
|
+
while (1) switch (_context8.prev = _context8.next) {
|
481
|
+
case 0:
|
482
|
+
options = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
483
|
+
_context8.next = 3;
|
484
|
+
return _Api.default.sendRequest("/api_key", 'DELETE', {}, options);
|
485
|
+
case 3:
|
486
|
+
response = _context8.sent;
|
487
|
+
return _context8.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
488
|
+
case 5:
|
489
|
+
case "end":
|
490
|
+
return _context8.stop();
|
507
491
|
}
|
508
492
|
}, _callee8);
|
509
493
|
})));
|