files.com 1.0.166 → 1.0.167
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +9 -5
- package/_VERSION +1 -1
- package/lib/models/ActionWebhookFailure.js +8 -2
- package/lib/models/ApiKey.js +16 -4
- package/lib/models/As2Partner.js +16 -4
- package/lib/models/As2Station.js +16 -4
- package/lib/models/Automation.js +16 -4
- package/lib/models/Behavior.js +16 -4
- package/lib/models/Bundle.js +24 -6
- package/lib/models/Clickwrap.js +16 -4
- package/lib/models/File.js +309 -311
- package/lib/models/FileComment.js +16 -4
- package/lib/models/FileCommentReaction.js +8 -2
- package/lib/models/FormFieldSet.js +16 -4
- package/lib/models/Group.js +16 -4
- package/lib/models/GroupUser.js +16 -4
- package/lib/models/Lock.js +8 -2
- package/lib/models/Message.js +16 -4
- package/lib/models/MessageComment.js +16 -4
- package/lib/models/MessageCommentReaction.js +8 -2
- package/lib/models/MessageReaction.js +8 -2
- package/lib/models/Notification.js +16 -4
- package/lib/models/Permission.js +8 -2
- package/lib/models/Project.js +16 -4
- package/lib/models/PublicKey.js +16 -4
- package/lib/models/RemoteServer.js +16 -4
- package/lib/models/Request.js +8 -2
- package/lib/models/SsoStrategy.js +8 -2
- package/lib/models/Style.js +16 -4
- package/lib/models/User.js +40 -10
- package/lib/models/UserRequest.js +8 -2
- package/package.json +1 -1
- package/src/models/ActionWebhookFailure.js +3 -1
- package/src/models/ApiKey.js +6 -2
- package/src/models/As2Partner.js +6 -2
- package/src/models/As2Station.js +6 -2
- package/src/models/Automation.js +6 -2
- package/src/models/Behavior.js +6 -2
- package/src/models/Bundle.js +9 -3
- package/src/models/Clickwrap.js +6 -2
- package/src/models/File.js +26 -19
- package/src/models/FileComment.js +6 -2
- package/src/models/FileCommentReaction.js +3 -1
- package/src/models/FormFieldSet.js +6 -2
- package/src/models/Group.js +6 -2
- package/src/models/GroupUser.js +6 -2
- package/src/models/Lock.js +3 -1
- package/src/models/Message.js +6 -2
- package/src/models/MessageComment.js +6 -2
- package/src/models/MessageCommentReaction.js +3 -1
- package/src/models/MessageReaction.js +3 -1
- package/src/models/Notification.js +6 -2
- package/src/models/Permission.js +3 -1
- package/src/models/Project.js +6 -2
- package/src/models/PublicKey.js +6 -2
- package/src/models/RemoteServer.js +6 -2
- package/src/models/Request.js +3 -1
- package/src/models/SsoStrategy.js +3 -1
- package/src/models/Style.js +6 -2
- package/src/models/User.js +15 -5
- package/src/models/UserRequest.js +3 -1
- package/test/src/index.js +7 -3
@@ -172,6 +172,7 @@ var SsoStrategy = /*#__PURE__*/(0, _createClass2.default)(function SsoStrategy()
|
|
172
172
|
});
|
173
173
|
(0, _defineProperty2.default)(this, "sync", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
174
174
|
var params,
|
175
|
+
response,
|
175
176
|
_args = arguments;
|
176
177
|
return _regenerator.default.wrap(function _callee$(_context) {
|
177
178
|
while (1) {
|
@@ -223,9 +224,14 @@ var SsoStrategy = /*#__PURE__*/(0, _createClass2.default)(function SsoStrategy()
|
|
223
224
|
throw new Error('Parameter missing: id');
|
224
225
|
|
225
226
|
case 14:
|
226
|
-
|
227
|
+
_context.next = 16;
|
228
|
+
return _Api.default.sendRequest("/sso_strategies/".concat(params['id'], "/sync"), 'POST', params, _this.options);
|
229
|
+
|
230
|
+
case 16:
|
231
|
+
response = _context.sent;
|
232
|
+
return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
227
233
|
|
228
|
-
case
|
234
|
+
case 18:
|
229
235
|
case "end":
|
230
236
|
return _context.stop();
|
231
237
|
}
|
package/lib/models/Style.js
CHANGED
@@ -73,6 +73,7 @@ var Style = /*#__PURE__*/(0, _createClass2.default)(function Style() {
|
|
73
73
|
});
|
74
74
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
75
75
|
var params,
|
76
|
+
response,
|
76
77
|
_args = arguments;
|
77
78
|
return _regenerator.default.wrap(function _callee$(_context) {
|
78
79
|
while (1) {
|
@@ -142,9 +143,14 @@ var Style = /*#__PURE__*/(0, _createClass2.default)(function Style() {
|
|
142
143
|
throw new Error('Parameter missing: file');
|
143
144
|
|
144
145
|
case 20:
|
145
|
-
|
146
|
+
_context.next = 22;
|
147
|
+
return _Api.default.sendRequest("/styles/".concat(params['path']), 'PATCH', params, _this.options);
|
148
|
+
|
149
|
+
case 22:
|
150
|
+
response = _context.sent;
|
151
|
+
return _context.abrupt("return", new Style(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
146
152
|
|
147
|
-
case
|
153
|
+
case 24:
|
148
154
|
case "end":
|
149
155
|
return _context.stop();
|
150
156
|
}
|
@@ -153,6 +159,7 @@ var Style = /*#__PURE__*/(0, _createClass2.default)(function Style() {
|
|
153
159
|
})));
|
154
160
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
155
161
|
var params,
|
162
|
+
response,
|
156
163
|
_args2 = arguments;
|
157
164
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
158
165
|
while (1) {
|
@@ -204,9 +211,14 @@ var Style = /*#__PURE__*/(0, _createClass2.default)(function Style() {
|
|
204
211
|
throw new Error('Parameter missing: path');
|
205
212
|
|
206
213
|
case 14:
|
207
|
-
|
214
|
+
_context2.next = 16;
|
215
|
+
return _Api.default.sendRequest("/styles/".concat(params['path']), 'DELETE', params, _this.options);
|
216
|
+
|
217
|
+
case 16:
|
218
|
+
response = _context2.sent;
|
219
|
+
return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
208
220
|
|
209
|
-
case
|
221
|
+
case 18:
|
210
222
|
case "end":
|
211
223
|
return _context2.stop();
|
212
224
|
}
|
package/lib/models/User.js
CHANGED
@@ -388,6 +388,7 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
388
388
|
});
|
389
389
|
(0, _defineProperty2.default)(this, "unlock", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
390
390
|
var params,
|
391
|
+
response,
|
391
392
|
_args = arguments;
|
392
393
|
return _regenerator.default.wrap(function _callee$(_context) {
|
393
394
|
while (1) {
|
@@ -439,9 +440,14 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
439
440
|
throw new Error('Parameter missing: id');
|
440
441
|
|
441
442
|
case 14:
|
442
|
-
|
443
|
+
_context.next = 16;
|
444
|
+
return _Api.default.sendRequest("/users/".concat(params['id'], "/unlock"), 'POST', params, _this.options);
|
445
|
+
|
446
|
+
case 16:
|
447
|
+
response = _context.sent;
|
448
|
+
return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
443
449
|
|
444
|
-
case
|
450
|
+
case 18:
|
445
451
|
case "end":
|
446
452
|
return _context.stop();
|
447
453
|
}
|
@@ -450,6 +456,7 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
450
456
|
})));
|
451
457
|
(0, _defineProperty2.default)(this, "resendWelcomeEmail", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
452
458
|
var params,
|
459
|
+
response,
|
453
460
|
_args2 = arguments;
|
454
461
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
455
462
|
while (1) {
|
@@ -501,9 +508,14 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
501
508
|
throw new Error('Parameter missing: id');
|
502
509
|
|
503
510
|
case 14:
|
504
|
-
|
511
|
+
_context2.next = 16;
|
512
|
+
return _Api.default.sendRequest("/users/".concat(params['id'], "/resend_welcome_email"), 'POST', params, _this.options);
|
505
513
|
|
506
|
-
case
|
514
|
+
case 16:
|
515
|
+
response = _context2.sent;
|
516
|
+
return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
517
|
+
|
518
|
+
case 18:
|
507
519
|
case "end":
|
508
520
|
return _context2.stop();
|
509
521
|
}
|
@@ -512,6 +524,7 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
512
524
|
})));
|
513
525
|
(0, _defineProperty2.default)(this, "user2faReset", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
514
526
|
var params,
|
527
|
+
response,
|
515
528
|
_args3 = arguments;
|
516
529
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
517
530
|
while (1) {
|
@@ -563,9 +576,14 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
563
576
|
throw new Error('Parameter missing: id');
|
564
577
|
|
565
578
|
case 14:
|
566
|
-
|
579
|
+
_context3.next = 16;
|
580
|
+
return _Api.default.sendRequest("/users/".concat(params['id'], "/2fa/reset"), 'POST', params, _this.options);
|
567
581
|
|
568
|
-
case
|
582
|
+
case 16:
|
583
|
+
response = _context3.sent;
|
584
|
+
return _context3.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
585
|
+
|
586
|
+
case 18:
|
569
587
|
case "end":
|
570
588
|
return _context3.stop();
|
571
589
|
}
|
@@ -574,6 +592,7 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
574
592
|
})));
|
575
593
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
576
594
|
var params,
|
595
|
+
response,
|
577
596
|
_args4 = arguments;
|
578
597
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
579
598
|
while (1) {
|
@@ -825,9 +844,14 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
825
844
|
throw new Error('Parameter missing: id');
|
826
845
|
|
827
846
|
case 64:
|
828
|
-
|
847
|
+
_context4.next = 66;
|
848
|
+
return _Api.default.sendRequest("/users/".concat(params['id']), 'PATCH', params, _this.options);
|
849
|
+
|
850
|
+
case 66:
|
851
|
+
response = _context4.sent;
|
852
|
+
return _context4.abrupt("return", new User(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
829
853
|
|
830
|
-
case
|
854
|
+
case 68:
|
831
855
|
case "end":
|
832
856
|
return _context4.stop();
|
833
857
|
}
|
@@ -836,6 +860,7 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
836
860
|
})));
|
837
861
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
838
862
|
var params,
|
863
|
+
response,
|
839
864
|
_args5 = arguments;
|
840
865
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
841
866
|
while (1) {
|
@@ -887,9 +912,14 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
887
912
|
throw new Error('Parameter missing: id');
|
888
913
|
|
889
914
|
case 14:
|
890
|
-
|
915
|
+
_context5.next = 16;
|
916
|
+
return _Api.default.sendRequest("/users/".concat(params['id']), 'DELETE', params, _this.options);
|
917
|
+
|
918
|
+
case 16:
|
919
|
+
response = _context5.sent;
|
920
|
+
return _context5.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
891
921
|
|
892
|
-
case
|
922
|
+
case 18:
|
893
923
|
case "end":
|
894
924
|
return _context5.stop();
|
895
925
|
}
|
@@ -67,6 +67,7 @@ var UserRequest = /*#__PURE__*/(0, _createClass2.default)(function UserRequest()
|
|
67
67
|
});
|
68
68
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
69
69
|
var params,
|
70
|
+
response,
|
70
71
|
_args = arguments;
|
71
72
|
return _regenerator.default.wrap(function _callee$(_context) {
|
72
73
|
while (1) {
|
@@ -118,9 +119,14 @@ var UserRequest = /*#__PURE__*/(0, _createClass2.default)(function UserRequest()
|
|
118
119
|
throw new Error('Parameter missing: id');
|
119
120
|
|
120
121
|
case 14:
|
121
|
-
|
122
|
+
_context.next = 16;
|
123
|
+
return _Api.default.sendRequest("/user_requests/".concat(params['id']), 'DELETE', params, _this.options);
|
124
|
+
|
125
|
+
case 16:
|
126
|
+
response = _context.sent;
|
127
|
+
return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
122
128
|
|
123
|
-
case
|
129
|
+
case 18:
|
124
130
|
case "end":
|
125
131
|
return _context.stop();
|
126
132
|
}
|
package/package.json
CHANGED
@@ -46,7 +46,9 @@ class ActionWebhookFailure {
|
|
46
46
|
}
|
47
47
|
}
|
48
48
|
|
49
|
-
|
49
|
+
const response = await Api.sendRequest(`/action_webhook_failures/${params['id']}/retry`, 'POST', params, this.options)
|
50
|
+
|
51
|
+
return response?.data
|
50
52
|
}
|
51
53
|
}
|
52
54
|
|
package/src/models/ApiKey.js
CHANGED
@@ -131,7 +131,9 @@ class ApiKey {
|
|
131
131
|
}
|
132
132
|
}
|
133
133
|
|
134
|
-
|
134
|
+
const response = await Api.sendRequest(`/api_keys/${params['id']}`, 'PATCH', params, this.options)
|
135
|
+
|
136
|
+
return new ApiKey(response?.data, this.options)
|
135
137
|
}
|
136
138
|
|
137
139
|
delete = async (params = {}) => {
|
@@ -156,7 +158,9 @@ class ApiKey {
|
|
156
158
|
}
|
157
159
|
}
|
158
160
|
|
159
|
-
|
161
|
+
const response = await Api.sendRequest(`/api_keys/${params['id']}`, 'DELETE', params, this.options)
|
162
|
+
|
163
|
+
return response?.data
|
160
164
|
}
|
161
165
|
|
162
166
|
destroy = (params = {}) =>
|
package/src/models/As2Partner.js
CHANGED
@@ -135,7 +135,9 @@ class As2Partner {
|
|
135
135
|
}
|
136
136
|
}
|
137
137
|
|
138
|
-
|
138
|
+
const response = await Api.sendRequest(`/as2_partners/${params['id']}`, 'PATCH', params, this.options)
|
139
|
+
|
140
|
+
return new As2Partner(response?.data, this.options)
|
139
141
|
}
|
140
142
|
|
141
143
|
delete = async (params = {}) => {
|
@@ -160,7 +162,9 @@ class As2Partner {
|
|
160
162
|
}
|
161
163
|
}
|
162
164
|
|
163
|
-
|
165
|
+
const response = await Api.sendRequest(`/as2_partners/${params['id']}`, 'DELETE', params, this.options)
|
166
|
+
|
167
|
+
return response?.data
|
164
168
|
}
|
165
169
|
|
166
170
|
destroy = (params = {}) =>
|
package/src/models/As2Station.js
CHANGED
@@ -149,7 +149,9 @@ class As2Station {
|
|
149
149
|
}
|
150
150
|
}
|
151
151
|
|
152
|
-
|
152
|
+
const response = await Api.sendRequest(`/as2_stations/${params['id']}`, 'PATCH', params, this.options)
|
153
|
+
|
154
|
+
return new As2Station(response?.data, this.options)
|
153
155
|
}
|
154
156
|
|
155
157
|
delete = async (params = {}) => {
|
@@ -174,7 +176,9 @@ class As2Station {
|
|
174
176
|
}
|
175
177
|
}
|
176
178
|
|
177
|
-
|
179
|
+
const response = await Api.sendRequest(`/as2_stations/${params['id']}`, 'DELETE', params, this.options)
|
180
|
+
|
181
|
+
return response?.data
|
178
182
|
}
|
179
183
|
|
180
184
|
destroy = (params = {}) =>
|
package/src/models/Automation.js
CHANGED
@@ -245,7 +245,9 @@ class Automation {
|
|
245
245
|
}
|
246
246
|
}
|
247
247
|
|
248
|
-
|
248
|
+
const response = await Api.sendRequest(`/automations/${params['id']}`, 'PATCH', params, this.options)
|
249
|
+
|
250
|
+
return new Automation(response?.data, this.options)
|
249
251
|
}
|
250
252
|
|
251
253
|
delete = async (params = {}) => {
|
@@ -270,7 +272,9 @@ class Automation {
|
|
270
272
|
}
|
271
273
|
}
|
272
274
|
|
273
|
-
|
275
|
+
const response = await Api.sendRequest(`/automations/${params['id']}`, 'DELETE', params, this.options)
|
276
|
+
|
277
|
+
return response?.data
|
274
278
|
}
|
275
279
|
|
276
280
|
destroy = (params = {}) =>
|
package/src/models/Behavior.js
CHANGED
@@ -131,7 +131,9 @@ class Behavior {
|
|
131
131
|
}
|
132
132
|
}
|
133
133
|
|
134
|
-
|
134
|
+
const response = await Api.sendRequest(`/behaviors/${params['id']}`, 'PATCH', params, this.options)
|
135
|
+
|
136
|
+
return new Behavior(response?.data, this.options)
|
135
137
|
}
|
136
138
|
|
137
139
|
delete = async (params = {}) => {
|
@@ -156,7 +158,9 @@ class Behavior {
|
|
156
158
|
}
|
157
159
|
}
|
158
160
|
|
159
|
-
|
161
|
+
const response = await Api.sendRequest(`/behaviors/${params['id']}`, 'DELETE', params, this.options)
|
162
|
+
|
163
|
+
return response?.data
|
160
164
|
}
|
161
165
|
|
162
166
|
destroy = (params = {}) =>
|
package/src/models/Bundle.js
CHANGED
@@ -238,7 +238,9 @@ class Bundle {
|
|
238
238
|
}
|
239
239
|
}
|
240
240
|
|
241
|
-
|
241
|
+
const response = await Api.sendRequest(`/bundles/${params['id']}/share`, 'POST', params, this.options)
|
242
|
+
|
243
|
+
return response?.data
|
242
244
|
}
|
243
245
|
|
244
246
|
// Parameters:
|
@@ -309,7 +311,9 @@ class Bundle {
|
|
309
311
|
}
|
310
312
|
}
|
311
313
|
|
312
|
-
|
314
|
+
const response = await Api.sendRequest(`/bundles/${params['id']}`, 'PATCH', params, this.options)
|
315
|
+
|
316
|
+
return new Bundle(response?.data, this.options)
|
313
317
|
}
|
314
318
|
|
315
319
|
delete = async (params = {}) => {
|
@@ -334,7 +338,9 @@ class Bundle {
|
|
334
338
|
}
|
335
339
|
}
|
336
340
|
|
337
|
-
|
341
|
+
const response = await Api.sendRequest(`/bundles/${params['id']}`, 'DELETE', params, this.options)
|
342
|
+
|
343
|
+
return response?.data
|
338
344
|
}
|
339
345
|
|
340
346
|
destroy = (params = {}) =>
|
package/src/models/Clickwrap.js
CHANGED
@@ -108,7 +108,9 @@ class Clickwrap {
|
|
108
108
|
}
|
109
109
|
}
|
110
110
|
|
111
|
-
|
111
|
+
const response = await Api.sendRequest(`/clickwraps/${params['id']}`, 'PATCH', params, this.options)
|
112
|
+
|
113
|
+
return new Clickwrap(response?.data, this.options)
|
112
114
|
}
|
113
115
|
|
114
116
|
delete = async (params = {}) => {
|
@@ -133,7 +135,9 @@ class Clickwrap {
|
|
133
135
|
}
|
134
136
|
}
|
135
137
|
|
136
|
-
|
138
|
+
const response = await Api.sendRequest(`/clickwraps/${params['id']}`, 'DELETE', params, this.options)
|
139
|
+
|
140
|
+
return response?.data
|
137
141
|
}
|
138
142
|
|
139
143
|
destroy = (params = {}) =>
|
package/src/models/File.js
CHANGED
@@ -157,12 +157,14 @@ class File {
|
|
157
157
|
throw new Error('Stream downloads are only available in a NodeJS environment')
|
158
158
|
}
|
159
159
|
|
160
|
-
|
160
|
+
const downloadUri = this.getDownloadUri()
|
161
|
+
|
162
|
+
if (!downloadUri) {
|
161
163
|
throw new Error('Current object has no download URI')
|
162
164
|
}
|
163
165
|
|
164
166
|
const { saveUrlToStream } = require('../isomorphic/File.node.js')
|
165
|
-
return saveUrlToStream(
|
167
|
+
return saveUrlToStream(downloadUri, writableStream)
|
166
168
|
}
|
167
169
|
|
168
170
|
downloadToFile = async destinationPath => {
|
@@ -170,21 +172,14 @@ class File {
|
|
170
172
|
throw new Error('Disk file downloads are only available in a NodeJS environment')
|
171
173
|
}
|
172
174
|
|
173
|
-
|
175
|
+
const downloadUri = this.getDownloadUri()
|
176
|
+
|
177
|
+
if (!downloadUri) {
|
174
178
|
throw new Error('Current object has no download URI')
|
175
179
|
}
|
176
180
|
|
177
181
|
const { saveUrlToFile } = require('../isomorphic/File.node.js')
|
178
|
-
return saveUrlToFile(
|
179
|
-
}
|
180
|
-
|
181
|
-
static findDownload = async path => {
|
182
|
-
const response = await Api.sendRequest(`/files/${encodeURIComponent(path)}`, 'GET')
|
183
|
-
return new File(response.data)
|
184
|
-
}
|
185
|
-
|
186
|
-
get = async path => {
|
187
|
-
return File.find(path)
|
182
|
+
return saveUrlToFile(downloadUri, destinationPath)
|
188
183
|
}
|
189
184
|
|
190
185
|
copyTo = async destinationFilePath => {
|
@@ -408,7 +403,9 @@ class File {
|
|
408
403
|
}
|
409
404
|
}
|
410
405
|
|
411
|
-
|
406
|
+
const response = await Api.sendRequest(`/files/${params['path']}`, 'GET', params, this.options)
|
407
|
+
|
408
|
+
return new File(response?.data, this.options)
|
412
409
|
}
|
413
410
|
|
414
411
|
// Parameters:
|
@@ -442,7 +439,9 @@ class File {
|
|
442
439
|
}
|
443
440
|
}
|
444
441
|
|
445
|
-
|
442
|
+
const response = await Api.sendRequest(`/files/${params['path']}`, 'PATCH', params, this.options)
|
443
|
+
|
444
|
+
return new File(response?.data, this.options)
|
446
445
|
}
|
447
446
|
|
448
447
|
// Parameters:
|
@@ -469,7 +468,9 @@ class File {
|
|
469
468
|
}
|
470
469
|
}
|
471
470
|
|
472
|
-
|
471
|
+
const response = await Api.sendRequest(`/files/${params['path']}`, 'DELETE', params, this.options)
|
472
|
+
|
473
|
+
return response?.data
|
473
474
|
}
|
474
475
|
|
475
476
|
destroy = (params = {}) =>
|
@@ -513,7 +514,9 @@ class File {
|
|
513
514
|
}
|
514
515
|
}
|
515
516
|
|
516
|
-
|
517
|
+
const response = await Api.sendRequest(`/file_actions/copy/${params['path']}`, 'POST', params, this.options)
|
518
|
+
|
519
|
+
return new FileAction(response?.data, this.options)
|
517
520
|
}
|
518
521
|
|
519
522
|
// Move file/folder
|
@@ -553,7 +556,9 @@ class File {
|
|
553
556
|
}
|
554
557
|
}
|
555
558
|
|
556
|
-
|
559
|
+
const response = await Api.sendRequest(`/file_actions/move/${params['path']}`, 'POST', params, this.options)
|
560
|
+
|
561
|
+
return new FileAction(response?.data, this.options)
|
557
562
|
}
|
558
563
|
|
559
564
|
// Begin file upload
|
@@ -603,7 +608,9 @@ class File {
|
|
603
608
|
}
|
604
609
|
}
|
605
610
|
|
606
|
-
|
611
|
+
const response = await Api.sendRequest(`/file_actions/begin_upload/${params['path']}`, 'POST', params, this.options)
|
612
|
+
|
613
|
+
return response?.data?.map(obj => new FileUploadPart(obj, this.options)) || []
|
607
614
|
}
|
608
615
|
|
609
616
|
save = () => {
|
@@ -86,7 +86,9 @@ class FileComment {
|
|
86
86
|
}
|
87
87
|
}
|
88
88
|
|
89
|
-
|
89
|
+
const response = await Api.sendRequest(`/file_comments/${params['id']}`, 'PATCH', params, this.options)
|
90
|
+
|
91
|
+
return new FileComment(response?.data, this.options)
|
90
92
|
}
|
91
93
|
|
92
94
|
delete = async (params = {}) => {
|
@@ -111,7 +113,9 @@ class FileComment {
|
|
111
113
|
}
|
112
114
|
}
|
113
115
|
|
114
|
-
|
116
|
+
const response = await Api.sendRequest(`/file_comments/${params['id']}`, 'DELETE', params, this.options)
|
117
|
+
|
118
|
+
return response?.data
|
115
119
|
}
|
116
120
|
|
117
121
|
destroy = (params = {}) =>
|
@@ -73,7 +73,9 @@ class FileCommentReaction {
|
|
73
73
|
}
|
74
74
|
}
|
75
75
|
|
76
|
-
|
76
|
+
const response = await Api.sendRequest(`/file_comment_reactions/${params['id']}`, 'DELETE', params, this.options)
|
77
|
+
|
78
|
+
return response?.data
|
77
79
|
}
|
78
80
|
|
79
81
|
destroy = (params = {}) =>
|
@@ -113,7 +113,9 @@ class FormFieldSet {
|
|
113
113
|
}
|
114
114
|
}
|
115
115
|
|
116
|
-
|
116
|
+
const response = await Api.sendRequest(`/form_field_sets/${params['id']}`, 'PATCH', params, this.options)
|
117
|
+
|
118
|
+
return new FormFieldSet(response?.data, this.options)
|
117
119
|
}
|
118
120
|
|
119
121
|
delete = async (params = {}) => {
|
@@ -138,7 +140,9 @@ class FormFieldSet {
|
|
138
140
|
}
|
139
141
|
}
|
140
142
|
|
141
|
-
|
143
|
+
const response = await Api.sendRequest(`/form_field_sets/${params['id']}`, 'DELETE', params, this.options)
|
144
|
+
|
145
|
+
return response?.data
|
142
146
|
}
|
143
147
|
|
144
148
|
destroy = (params = {}) =>
|
package/src/models/Group.js
CHANGED
@@ -104,7 +104,9 @@ class Group {
|
|
104
104
|
}
|
105
105
|
}
|
106
106
|
|
107
|
-
|
107
|
+
const response = await Api.sendRequest(`/groups/${params['id']}`, 'PATCH', params, this.options)
|
108
|
+
|
109
|
+
return new Group(response?.data, this.options)
|
108
110
|
}
|
109
111
|
|
110
112
|
delete = async (params = {}) => {
|
@@ -129,7 +131,9 @@ class Group {
|
|
129
131
|
}
|
130
132
|
}
|
131
133
|
|
132
|
-
|
134
|
+
const response = await Api.sendRequest(`/groups/${params['id']}`, 'DELETE', params, this.options)
|
135
|
+
|
136
|
+
return response?.data
|
133
137
|
}
|
134
138
|
|
135
139
|
destroy = (params = {}) =>
|
package/src/models/GroupUser.js
CHANGED
@@ -113,7 +113,9 @@ class GroupUser {
|
|
113
113
|
}
|
114
114
|
}
|
115
115
|
|
116
|
-
|
116
|
+
const response = await Api.sendRequest(`/group_users/${params['id']}`, 'PATCH', params, this.options)
|
117
|
+
|
118
|
+
return new GroupUser(response?.data, this.options)
|
117
119
|
}
|
118
120
|
|
119
121
|
// Parameters:
|
@@ -163,7 +165,9 @@ class GroupUser {
|
|
163
165
|
}
|
164
166
|
}
|
165
167
|
|
166
|
-
|
168
|
+
const response = await Api.sendRequest(`/group_users/${params['id']}`, 'DELETE', params, this.options)
|
169
|
+
|
170
|
+
return response?.data
|
167
171
|
}
|
168
172
|
|
169
173
|
destroy = (params = {}) =>
|
package/src/models/Lock.js
CHANGED
@@ -142,7 +142,9 @@ class Lock {
|
|
142
142
|
}
|
143
143
|
}
|
144
144
|
|
145
|
-
|
145
|
+
const response = await Api.sendRequest(`/locks/${params['path']}`, 'DELETE', params, this.options)
|
146
|
+
|
147
|
+
return response?.data
|
146
148
|
}
|
147
149
|
|
148
150
|
destroy = (params = {}) =>
|
package/src/models/Message.js
CHANGED
@@ -124,7 +124,9 @@ class Message {
|
|
124
124
|
}
|
125
125
|
}
|
126
126
|
|
127
|
-
|
127
|
+
const response = await Api.sendRequest(`/messages/${params['id']}`, 'PATCH', params, this.options)
|
128
|
+
|
129
|
+
return new Message(response?.data, this.options)
|
128
130
|
}
|
129
131
|
|
130
132
|
delete = async (params = {}) => {
|
@@ -149,7 +151,9 @@ class Message {
|
|
149
151
|
}
|
150
152
|
}
|
151
153
|
|
152
|
-
|
154
|
+
const response = await Api.sendRequest(`/messages/${params['id']}`, 'DELETE', params, this.options)
|
155
|
+
|
156
|
+
return response?.data
|
153
157
|
}
|
154
158
|
|
155
159
|
destroy = (params = {}) =>
|