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
@@ -86,26 +86,26 @@ _class = UserCipherUse;
|
|
86
86
|
case 0:
|
87
87
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
88
88
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
89
|
-
if (!(params
|
89
|
+
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
|
90
90
|
_context.next = 4;
|
91
91
|
break;
|
92
92
|
}
|
93
|
-
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params
|
93
|
+
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
94
94
|
case 4:
|
95
|
-
if (!(params
|
95
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
96
96
|
_context.next = 6;
|
97
97
|
break;
|
98
98
|
}
|
99
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
99
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
100
100
|
case 6:
|
101
|
-
if (!(params
|
101
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
102
102
|
_context.next = 8;
|
103
103
|
break;
|
104
104
|
}
|
105
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
105
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
106
106
|
case 8:
|
107
107
|
_context.next = 10;
|
108
|
-
return _Api.default.sendRequest(
|
108
|
+
return _Api.default.sendRequest('/user_cipher_uses', 'GET', params, options);
|
109
109
|
case 10:
|
110
110
|
response = _context.sent;
|
111
111
|
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) {
|
@@ -63,7 +63,6 @@ var UserRequest = /*#__PURE__*/(0, _createClass2.default)(function UserRequest()
|
|
63
63
|
});
|
64
64
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
65
65
|
var params,
|
66
|
-
response,
|
67
66
|
_args = arguments;
|
68
67
|
return _regenerator.default.wrap(function _callee$(_context) {
|
69
68
|
while (1) switch (_context.prev = _context.next) {
|
@@ -82,13 +81,13 @@ var UserRequest = /*#__PURE__*/(0, _createClass2.default)(function UserRequest()
|
|
82
81
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
83
82
|
case 5:
|
84
83
|
params.id = _this.attributes.id;
|
85
|
-
if (!(params
|
84
|
+
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
86
85
|
_context.next = 8;
|
87
86
|
break;
|
88
87
|
}
|
89
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params
|
88
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
90
89
|
case 8:
|
91
|
-
if (params
|
90
|
+
if (params.id) {
|
92
91
|
_context.next = 14;
|
93
92
|
break;
|
94
93
|
}
|
@@ -96,18 +95,15 @@ var UserRequest = /*#__PURE__*/(0, _createClass2.default)(function UserRequest()
|
|
96
95
|
_context.next = 13;
|
97
96
|
break;
|
98
97
|
}
|
99
|
-
params
|
98
|
+
params.id = _this.id;
|
100
99
|
_context.next = 14;
|
101
100
|
break;
|
102
101
|
case 13:
|
103
102
|
throw new errors.MissingParameterError('Parameter missing: id');
|
104
103
|
case 14:
|
105
104
|
_context.next = 16;
|
106
|
-
return _Api.default.sendRequest("/user_requests/".concat(encodeURIComponent(params
|
105
|
+
return _Api.default.sendRequest("/user_requests/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
|
107
106
|
case 16:
|
108
|
-
response = _context.sent;
|
109
|
-
return _context.abrupt("return");
|
110
|
-
case 18:
|
111
107
|
case "end":
|
112
108
|
return _context.stop();
|
113
109
|
}
|
@@ -122,7 +118,7 @@ var UserRequest = /*#__PURE__*/(0, _createClass2.default)(function UserRequest()
|
|
122
118
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
123
119
|
while (1) switch (_context2.prev = _context2.next) {
|
124
120
|
case 0:
|
125
|
-
if (!_this.attributes
|
121
|
+
if (!_this.attributes.id) {
|
126
122
|
_context2.next = 4;
|
127
123
|
break;
|
128
124
|
}
|
@@ -168,20 +164,20 @@ _class = UserRequest;
|
|
168
164
|
case 0:
|
169
165
|
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
170
166
|
options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
171
|
-
if (!(params
|
167
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
172
168
|
_context3.next = 4;
|
173
169
|
break;
|
174
170
|
}
|
175
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
171
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
176
172
|
case 4:
|
177
|
-
if (!(params
|
173
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
178
174
|
_context3.next = 6;
|
179
175
|
break;
|
180
176
|
}
|
181
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
177
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
182
178
|
case 6:
|
183
179
|
_context3.next = 8;
|
184
|
-
return _Api.default.sendRequest(
|
180
|
+
return _Api.default.sendRequest('/user_requests', 'GET', params, options);
|
185
181
|
case 8:
|
186
182
|
response = _context3.sent;
|
187
183
|
return _context3.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
@@ -217,21 +213,21 @@ _class = UserRequest;
|
|
217
213
|
}
|
218
214
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
219
215
|
case 4:
|
220
|
-
params
|
221
|
-
if (params
|
216
|
+
params.id = id;
|
217
|
+
if (params.id) {
|
222
218
|
_context4.next = 7;
|
223
219
|
break;
|
224
220
|
}
|
225
221
|
throw new errors.MissingParameterError('Parameter missing: id');
|
226
222
|
case 7:
|
227
|
-
if (!(params
|
223
|
+
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
228
224
|
_context4.next = 9;
|
229
225
|
break;
|
230
226
|
}
|
231
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params
|
227
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
232
228
|
case 9:
|
233
229
|
_context4.next = 11;
|
234
|
-
return _Api.default.sendRequest("/user_requests/".concat(encodeURIComponent(params
|
230
|
+
return _Api.default.sendRequest("/user_requests/".concat(encodeURIComponent(params.id)), 'GET', params, options);
|
235
231
|
case 11:
|
236
232
|
response = _context4.sent;
|
237
233
|
return _context4.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|
@@ -264,44 +260,44 @@ _class = UserRequest;
|
|
264
260
|
case 0:
|
265
261
|
params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
266
262
|
options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
267
|
-
if (params
|
263
|
+
if (params.name) {
|
268
264
|
_context5.next = 4;
|
269
265
|
break;
|
270
266
|
}
|
271
267
|
throw new errors.MissingParameterError('Parameter missing: name');
|
272
268
|
case 4:
|
273
|
-
if (params
|
269
|
+
if (params.email) {
|
274
270
|
_context5.next = 6;
|
275
271
|
break;
|
276
272
|
}
|
277
273
|
throw new errors.MissingParameterError('Parameter missing: email');
|
278
274
|
case 6:
|
279
|
-
if (params
|
275
|
+
if (params.details) {
|
280
276
|
_context5.next = 8;
|
281
277
|
break;
|
282
278
|
}
|
283
279
|
throw new errors.MissingParameterError('Parameter missing: details');
|
284
280
|
case 8:
|
285
|
-
if (!(params
|
281
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
286
282
|
_context5.next = 10;
|
287
283
|
break;
|
288
284
|
}
|
289
|
-
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params
|
285
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
290
286
|
case 10:
|
291
|
-
if (!(params
|
287
|
+
if (!(params.email && !(0, _utils.isString)(params.email))) {
|
292
288
|
_context5.next = 12;
|
293
289
|
break;
|
294
290
|
}
|
295
|
-
throw new errors.InvalidParameterError("Bad parameter: email must be of type String, received ".concat((0, _utils.getType)(params
|
291
|
+
throw new errors.InvalidParameterError("Bad parameter: email must be of type String, received ".concat((0, _utils.getType)(params.email)));
|
296
292
|
case 12:
|
297
|
-
if (!(params
|
293
|
+
if (!(params.details && !(0, _utils.isString)(params.details))) {
|
298
294
|
_context5.next = 14;
|
299
295
|
break;
|
300
296
|
}
|
301
|
-
throw new errors.InvalidParameterError("Bad parameter: details must be of type String, received ".concat((0, _utils.getType)(params
|
297
|
+
throw new errors.InvalidParameterError("Bad parameter: details must be of type String, received ".concat((0, _utils.getType)(params.details)));
|
302
298
|
case 14:
|
303
299
|
_context5.next = 16;
|
304
|
-
return _Api.default.sendRequest(
|
300
|
+
return _Api.default.sendRequest('/user_requests', 'POST', params, options);
|
305
301
|
case 16:
|
306
302
|
response = _context5.sent;
|
307
303
|
return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|
@@ -143,7 +143,7 @@ var WebhookTest = /*#__PURE__*/(0, _createClass2.default)(function WebhookTest()
|
|
143
143
|
return _regenerator.default.wrap(function _callee$(_context) {
|
144
144
|
while (1) switch (_context.prev = _context.next) {
|
145
145
|
case 0:
|
146
|
-
if (!_this.attributes
|
146
|
+
if (!_this.attributes.id) {
|
147
147
|
_context.next = 4;
|
148
148
|
break;
|
149
149
|
}
|
@@ -196,50 +196,50 @@ _class = WebhookTest;
|
|
196
196
|
case 0:
|
197
197
|
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
198
198
|
options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
|
199
|
-
if (params
|
199
|
+
if (params.url) {
|
200
200
|
_context2.next = 4;
|
201
201
|
break;
|
202
202
|
}
|
203
203
|
throw new errors.MissingParameterError('Parameter missing: url');
|
204
204
|
case 4:
|
205
|
-
if (!(params
|
205
|
+
if (!(params.url && !(0, _utils.isString)(params.url))) {
|
206
206
|
_context2.next = 6;
|
207
207
|
break;
|
208
208
|
}
|
209
|
-
throw new errors.InvalidParameterError("Bad parameter: url must be of type String, received ".concat((0, _utils.getType)(params
|
209
|
+
throw new errors.InvalidParameterError("Bad parameter: url must be of type String, received ".concat((0, _utils.getType)(params.url)));
|
210
210
|
case 6:
|
211
|
-
if (!(params
|
211
|
+
if (!(params.method && !(0, _utils.isString)(params.method))) {
|
212
212
|
_context2.next = 8;
|
213
213
|
break;
|
214
214
|
}
|
215
|
-
throw new errors.InvalidParameterError("Bad parameter: method must be of type String, received ".concat((0, _utils.getType)(params
|
215
|
+
throw new errors.InvalidParameterError("Bad parameter: method must be of type String, received ".concat((0, _utils.getType)(params.method)));
|
216
216
|
case 8:
|
217
|
-
if (!(params
|
217
|
+
if (!(params.encoding && !(0, _utils.isString)(params.encoding))) {
|
218
218
|
_context2.next = 10;
|
219
219
|
break;
|
220
220
|
}
|
221
|
-
throw new errors.InvalidParameterError("Bad parameter: encoding must be of type String, received ".concat((0, _utils.getType)(params
|
221
|
+
throw new errors.InvalidParameterError("Bad parameter: encoding must be of type String, received ".concat((0, _utils.getType)(params.encoding)));
|
222
222
|
case 10:
|
223
|
-
if (!(params
|
223
|
+
if (!(params.raw_body && !(0, _utils.isString)(params.raw_body))) {
|
224
224
|
_context2.next = 12;
|
225
225
|
break;
|
226
226
|
}
|
227
|
-
throw new errors.InvalidParameterError("Bad parameter: raw_body must be of type String, received ".concat((0, _utils.getType)(params
|
227
|
+
throw new errors.InvalidParameterError("Bad parameter: raw_body must be of type String, received ".concat((0, _utils.getType)(params.raw_body)));
|
228
228
|
case 12:
|
229
|
-
if (!(params
|
229
|
+
if (!(params.file_form_field && !(0, _utils.isString)(params.file_form_field))) {
|
230
230
|
_context2.next = 14;
|
231
231
|
break;
|
232
232
|
}
|
233
|
-
throw new errors.InvalidParameterError("Bad parameter: file_form_field must be of type String, received ".concat((0, _utils.getType)(params
|
233
|
+
throw new errors.InvalidParameterError("Bad parameter: file_form_field must be of type String, received ".concat((0, _utils.getType)(params.file_form_field)));
|
234
234
|
case 14:
|
235
|
-
if (!(params
|
235
|
+
if (!(params.action && !(0, _utils.isString)(params.action))) {
|
236
236
|
_context2.next = 16;
|
237
237
|
break;
|
238
238
|
}
|
239
|
-
throw new errors.InvalidParameterError("Bad parameter: action must be of type String, received ".concat((0, _utils.getType)(params
|
239
|
+
throw new errors.InvalidParameterError("Bad parameter: action must be of type String, received ".concat((0, _utils.getType)(params.action)));
|
240
240
|
case 16:
|
241
241
|
_context2.next = 18;
|
242
|
-
return _Api.default.sendRequest(
|
242
|
+
return _Api.default.sendRequest('/webhook_tests', 'POST', params, options);
|
243
243
|
case 18:
|
244
244
|
response = _context2.sent;
|
245
245
|
return _context2.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "files.com",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.2.0",
|
4
4
|
"description": "Files.com SDK for JavaScript",
|
5
5
|
"keywords": [
|
6
6
|
"files.com",
|
@@ -38,7 +38,11 @@
|
|
38
38
|
"eslint-config-airbnb": "^19.0.4",
|
39
39
|
"eslint-plugin-import": "^2.28.1",
|
40
40
|
"eslint-plugin-jest": "^27.4.2",
|
41
|
-
"
|
41
|
+
"eslint-plugin-jsx-a11y": "^6.8.0",
|
42
|
+
"eslint-plugin-react": "^7.33.2",
|
43
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
44
|
+
"jest": "^29.7.0",
|
45
|
+
"nock": "^13.4.0"
|
42
46
|
},
|
43
47
|
"scripts": {
|
44
48
|
"build": "./node_modules/.bin/babel src -d lib",
|
package/src/Api.js
CHANGED
@@ -215,12 +215,13 @@ class Api {
|
|
215
215
|
for (const [key, value] of Object.entries(params)) {
|
216
216
|
if (isObject(value)) {
|
217
217
|
for (const [key2, value2] of Object.entries(value)) {
|
218
|
-
_params[key
|
218
|
+
_params[`${key}[${key2}]`] = value2
|
219
219
|
}
|
220
220
|
} else {
|
221
221
|
_params[key] = value
|
222
222
|
}
|
223
223
|
}
|
224
|
+
|
224
225
|
const pairs = Object.entries(_params).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
|
225
226
|
requestPath += path.includes('?') ? '&' : '?'
|
226
227
|
requestPath += pairs.join('&')
|