files.com 1.0.166 → 1.0.169
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 +48 -14
- package/lib/models/As2Station.js +52 -12
- 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/As2OutgoingMessage.js +1 -1
- package/src/models/As2Partner.js +22 -2
- package/src/models/As2Station.js +29 -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
package/README.md
CHANGED
@@ -133,21 +133,25 @@ You can set the following global properties using static methods on the `Files`
|
|
133
133
|
await File.uploadFile(destinationFileName, sourceFilePath)
|
134
134
|
}
|
135
135
|
|
136
|
-
####
|
136
|
+
#### Downloading a file
|
137
|
+
|
138
|
+
##### Get a downloadable file object by path
|
137
139
|
|
138
140
|
import File from 'files.com/lib/models/File'
|
139
|
-
const foundFile = await File.findDownload(remoteFilePath)
|
140
141
|
|
141
|
-
|
142
|
+
const foundFile = await File.find(remoteFilePath)
|
143
|
+
const downloadableFile = await foundFile.download()
|
144
|
+
|
145
|
+
##### Download a file (not available in browser)
|
142
146
|
|
143
147
|
import { isBrowser } from 'files.com/lib/utils'
|
144
148
|
|
145
149
|
if (!isBrowser()) {
|
146
150
|
// download to a file on disk
|
147
|
-
await
|
151
|
+
await downloadableFile.downloadToFile(localFilePath)
|
148
152
|
|
149
153
|
// download to a writable stream
|
150
|
-
await
|
154
|
+
await downloadableFile.downloadToStream(stream)
|
151
155
|
}
|
152
156
|
|
153
157
|
### Additional Object Documentation
|
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.169
|
@@ -43,6 +43,7 @@ var ActionWebhookFailure = /*#__PURE__*/(0, _createClass2.default)(function Acti
|
|
43
43
|
});
|
44
44
|
(0, _defineProperty2.default)(this, "retry", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
45
45
|
var params,
|
46
|
+
response,
|
46
47
|
_args = arguments;
|
47
48
|
return _regenerator.default.wrap(function _callee$(_context) {
|
48
49
|
while (1) {
|
@@ -94,9 +95,14 @@ var ActionWebhookFailure = /*#__PURE__*/(0, _createClass2.default)(function Acti
|
|
94
95
|
throw new Error('Parameter missing: id');
|
95
96
|
|
96
97
|
case 14:
|
97
|
-
|
98
|
+
_context.next = 16;
|
99
|
+
return _Api.default.sendRequest("/action_webhook_failures/".concat(params['id'], "/retry"), 'POST', params, _this.options);
|
98
100
|
|
99
|
-
case
|
101
|
+
case 16:
|
102
|
+
response = _context.sent;
|
103
|
+
return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
104
|
+
|
105
|
+
case 18:
|
100
106
|
case "end":
|
101
107
|
return _context.stop();
|
102
108
|
}
|
package/lib/models/ApiKey.js
CHANGED
@@ -106,6 +106,7 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
106
106
|
});
|
107
107
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
108
108
|
var params,
|
109
|
+
response,
|
109
110
|
_args = arguments;
|
110
111
|
return _regenerator.default.wrap(function _callee$(_context) {
|
111
112
|
while (1) {
|
@@ -181,9 +182,14 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
181
182
|
throw new Error('Parameter missing: id');
|
182
183
|
|
183
184
|
case 20:
|
184
|
-
|
185
|
+
_context.next = 22;
|
186
|
+
return _Api.default.sendRequest("/api_keys/".concat(params['id']), 'PATCH', params, _this.options);
|
187
|
+
|
188
|
+
case 22:
|
189
|
+
response = _context.sent;
|
190
|
+
return _context.abrupt("return", new ApiKey(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
185
191
|
|
186
|
-
case
|
192
|
+
case 24:
|
187
193
|
case "end":
|
188
194
|
return _context.stop();
|
189
195
|
}
|
@@ -192,6 +198,7 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
192
198
|
})));
|
193
199
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
194
200
|
var params,
|
201
|
+
response,
|
195
202
|
_args2 = arguments;
|
196
203
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
197
204
|
while (1) {
|
@@ -243,9 +250,14 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
243
250
|
throw new Error('Parameter missing: id');
|
244
251
|
|
245
252
|
case 14:
|
246
|
-
|
253
|
+
_context2.next = 16;
|
254
|
+
return _Api.default.sendRequest("/api_keys/".concat(params['id']), 'DELETE', params, _this.options);
|
255
|
+
|
256
|
+
case 16:
|
257
|
+
response = _context2.sent;
|
258
|
+
return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
247
259
|
|
248
|
-
case
|
260
|
+
case 18:
|
249
261
|
case "end":
|
250
262
|
return _context2.stop();
|
251
263
|
}
|
package/lib/models/As2Partner.js
CHANGED
@@ -65,6 +65,12 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
|
|
65
65
|
(0, _defineProperty2.default)(this, "setUri", function (value) {
|
66
66
|
_this.attributes.uri = value;
|
67
67
|
});
|
68
|
+
(0, _defineProperty2.default)(this, "getServerCertificate", function () {
|
69
|
+
return _this.attributes.server_certificate;
|
70
|
+
});
|
71
|
+
(0, _defineProperty2.default)(this, "setServerCertificate", function (value) {
|
72
|
+
_this.attributes.server_certificate = value;
|
73
|
+
});
|
68
74
|
(0, _defineProperty2.default)(this, "getPublicCertificateMd5", function () {
|
69
75
|
return _this.attributes.public_certificate_md5;
|
70
76
|
});
|
@@ -109,6 +115,7 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
|
|
109
115
|
});
|
110
116
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
111
117
|
var params,
|
118
|
+
response,
|
112
119
|
_args = arguments;
|
113
120
|
return _regenerator.default.wrap(function _callee$(_context) {
|
114
121
|
while (1) {
|
@@ -158,35 +165,48 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
|
|
158
165
|
throw new Error("Bad parameter: uri must be of type String, received ".concat((0, _utils.getType)(uri)));
|
159
166
|
|
160
167
|
case 12:
|
161
|
-
if (!(params['
|
168
|
+
if (!(params['server_certificate'] && !(0, _utils.isString)(params['server_certificate']))) {
|
162
169
|
_context.next = 14;
|
163
170
|
break;
|
164
171
|
}
|
165
172
|
|
166
|
-
throw new Error("Bad parameter:
|
173
|
+
throw new Error("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(server_certificate)));
|
167
174
|
|
168
175
|
case 14:
|
176
|
+
if (!(params['public_certificate'] && !(0, _utils.isString)(params['public_certificate']))) {
|
177
|
+
_context.next = 16;
|
178
|
+
break;
|
179
|
+
}
|
180
|
+
|
181
|
+
throw new Error("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(public_certificate)));
|
182
|
+
|
183
|
+
case 16:
|
169
184
|
if (params['id']) {
|
170
|
-
_context.next =
|
185
|
+
_context.next = 22;
|
171
186
|
break;
|
172
187
|
}
|
173
188
|
|
174
189
|
if (!_this.attributes.id) {
|
175
|
-
_context.next =
|
190
|
+
_context.next = 21;
|
176
191
|
break;
|
177
192
|
}
|
178
193
|
|
179
194
|
params['id'] = _this.id;
|
180
|
-
_context.next =
|
195
|
+
_context.next = 22;
|
181
196
|
break;
|
182
197
|
|
183
|
-
case
|
198
|
+
case 21:
|
184
199
|
throw new Error('Parameter missing: id');
|
185
200
|
|
186
|
-
case
|
187
|
-
|
201
|
+
case 22:
|
202
|
+
_context.next = 24;
|
203
|
+
return _Api.default.sendRequest("/as2_partners/".concat(params['id']), 'PATCH', params, _this.options);
|
188
204
|
|
189
|
-
case
|
205
|
+
case 24:
|
206
|
+
response = _context.sent;
|
207
|
+
return _context.abrupt("return", new As2Partner(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
208
|
+
|
209
|
+
case 26:
|
190
210
|
case "end":
|
191
211
|
return _context.stop();
|
192
212
|
}
|
@@ -195,6 +215,7 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
|
|
195
215
|
})));
|
196
216
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
197
217
|
var params,
|
218
|
+
response,
|
198
219
|
_args2 = arguments;
|
199
220
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
200
221
|
while (1) {
|
@@ -246,9 +267,14 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
|
|
246
267
|
throw new Error('Parameter missing: id');
|
247
268
|
|
248
269
|
case 14:
|
249
|
-
|
270
|
+
_context2.next = 16;
|
271
|
+
return _Api.default.sendRequest("/as2_partners/".concat(params['id']), 'DELETE', params, _this.options);
|
250
272
|
|
251
|
-
case
|
273
|
+
case 16:
|
274
|
+
response = _context2.sent;
|
275
|
+
return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
276
|
+
|
277
|
+
case 18:
|
252
278
|
case "end":
|
253
279
|
return _context2.stop();
|
254
280
|
}
|
@@ -472,14 +498,22 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
|
|
472
498
|
throw new Error("Bad parameter: as2_station_id must be of type Int, received ".concat((0, _utils.getType)(as2_station_id)));
|
473
499
|
|
474
500
|
case 18:
|
475
|
-
|
476
|
-
|
501
|
+
if (!(params['server_certificate'] && !(0, _utils.isString)(params['server_certificate']))) {
|
502
|
+
_context5.next = 20;
|
503
|
+
break;
|
504
|
+
}
|
505
|
+
|
506
|
+
throw new Error("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(server_certificate)));
|
477
507
|
|
478
508
|
case 20:
|
509
|
+
_context5.next = 22;
|
510
|
+
return _Api.default.sendRequest("/as2_partners", 'POST', params, options);
|
511
|
+
|
512
|
+
case 22:
|
479
513
|
response = _context5.sent;
|
480
514
|
return _context5.abrupt("return", new As2Partner(response === null || response === void 0 ? void 0 : response.data, options));
|
481
515
|
|
482
|
-
case
|
516
|
+
case 24:
|
483
517
|
case "end":
|
484
518
|
return _context5.stop();
|
485
519
|
}
|
package/lib/models/As2Station.js
CHANGED
@@ -107,6 +107,12 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
|
|
107
107
|
(0, _defineProperty2.default)(this, "setPublicCertificateNotAfter", function (value) {
|
108
108
|
_this.attributes.public_certificate_not_after = value;
|
109
109
|
});
|
110
|
+
(0, _defineProperty2.default)(this, "getPrivateKeyPasswordMd5", function () {
|
111
|
+
return _this.attributes.private_key_password_md5;
|
112
|
+
});
|
113
|
+
(0, _defineProperty2.default)(this, "setPrivateKeyPasswordMd5", function (value) {
|
114
|
+
_this.attributes.private_key_password_md5 = value;
|
115
|
+
});
|
110
116
|
(0, _defineProperty2.default)(this, "getPublicCertificate", function () {
|
111
117
|
return _this.attributes.public_certificate;
|
112
118
|
});
|
@@ -119,8 +125,15 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
|
|
119
125
|
(0, _defineProperty2.default)(this, "setPrivateKey", function (value) {
|
120
126
|
_this.attributes.private_key = value;
|
121
127
|
});
|
128
|
+
(0, _defineProperty2.default)(this, "getPrivateKeyPassword", function () {
|
129
|
+
return _this.attributes.private_key_password;
|
130
|
+
});
|
131
|
+
(0, _defineProperty2.default)(this, "setPrivateKeyPassword", function (value) {
|
132
|
+
_this.attributes.private_key_password = value;
|
133
|
+
});
|
122
134
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
123
135
|
var params,
|
136
|
+
response,
|
124
137
|
_args = arguments;
|
125
138
|
return _regenerator.default.wrap(function _callee$(_context) {
|
126
139
|
while (1) {
|
@@ -178,27 +191,40 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
|
|
178
191
|
throw new Error("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(private_key)));
|
179
192
|
|
180
193
|
case 14:
|
194
|
+
if (!(params['private_key_password'] && !(0, _utils.isString)(params['private_key_password']))) {
|
195
|
+
_context.next = 16;
|
196
|
+
break;
|
197
|
+
}
|
198
|
+
|
199
|
+
throw new Error("Bad parameter: private_key_password must be of type String, received ".concat((0, _utils.getType)(private_key_password)));
|
200
|
+
|
201
|
+
case 16:
|
181
202
|
if (params['id']) {
|
182
|
-
_context.next =
|
203
|
+
_context.next = 22;
|
183
204
|
break;
|
184
205
|
}
|
185
206
|
|
186
207
|
if (!_this.attributes.id) {
|
187
|
-
_context.next =
|
208
|
+
_context.next = 21;
|
188
209
|
break;
|
189
210
|
}
|
190
211
|
|
191
212
|
params['id'] = _this.id;
|
192
|
-
_context.next =
|
213
|
+
_context.next = 22;
|
193
214
|
break;
|
194
215
|
|
195
|
-
case
|
216
|
+
case 21:
|
196
217
|
throw new Error('Parameter missing: id');
|
197
218
|
|
198
|
-
case
|
199
|
-
|
219
|
+
case 22:
|
220
|
+
_context.next = 24;
|
221
|
+
return _Api.default.sendRequest("/as2_stations/".concat(params['id']), 'PATCH', params, _this.options);
|
200
222
|
|
201
|
-
case
|
223
|
+
case 24:
|
224
|
+
response = _context.sent;
|
225
|
+
return _context.abrupt("return", new As2Station(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
226
|
+
|
227
|
+
case 26:
|
202
228
|
case "end":
|
203
229
|
return _context.stop();
|
204
230
|
}
|
@@ -207,6 +233,7 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
|
|
207
233
|
})));
|
208
234
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
209
235
|
var params,
|
236
|
+
response,
|
210
237
|
_args2 = arguments;
|
211
238
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
212
239
|
while (1) {
|
@@ -258,9 +285,14 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
|
|
258
285
|
throw new Error('Parameter missing: id');
|
259
286
|
|
260
287
|
case 14:
|
261
|
-
|
288
|
+
_context2.next = 16;
|
289
|
+
return _Api.default.sendRequest("/as2_stations/".concat(params['id']), 'DELETE', params, _this.options);
|
290
|
+
|
291
|
+
case 16:
|
292
|
+
response = _context2.sent;
|
293
|
+
return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
262
294
|
|
263
|
-
case
|
295
|
+
case 18:
|
264
296
|
case "end":
|
265
297
|
return _context2.stop();
|
266
298
|
}
|
@@ -468,14 +500,22 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
|
|
468
500
|
throw new Error("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(private_key)));
|
469
501
|
|
470
502
|
case 14:
|
471
|
-
|
472
|
-
|
503
|
+
if (!(params['private_key_password'] && !(0, _utils.isString)(params['private_key_password']))) {
|
504
|
+
_context5.next = 16;
|
505
|
+
break;
|
506
|
+
}
|
507
|
+
|
508
|
+
throw new Error("Bad parameter: private_key_password must be of type String, received ".concat((0, _utils.getType)(private_key_password)));
|
473
509
|
|
474
510
|
case 16:
|
511
|
+
_context5.next = 18;
|
512
|
+
return _Api.default.sendRequest("/as2_stations", 'POST', params, options);
|
513
|
+
|
514
|
+
case 18:
|
475
515
|
response = _context5.sent;
|
476
516
|
return _context5.abrupt("return", new As2Station(response === null || response === void 0 ? void 0 : response.data, options));
|
477
517
|
|
478
|
-
case
|
518
|
+
case 20:
|
479
519
|
case "end":
|
480
520
|
return _context5.stop();
|
481
521
|
}
|
package/lib/models/Automation.js
CHANGED
@@ -157,6 +157,7 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
157
157
|
});
|
158
158
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
159
159
|
var params,
|
160
|
+
response,
|
160
161
|
_args = arguments;
|
161
162
|
return _regenerator.default.wrap(function _callee$(_context) {
|
162
163
|
while (1) {
|
@@ -338,9 +339,14 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
338
339
|
throw new Error('Parameter missing: automation');
|
339
340
|
|
340
341
|
case 48:
|
341
|
-
|
342
|
+
_context.next = 50;
|
343
|
+
return _Api.default.sendRequest("/automations/".concat(params['id']), 'PATCH', params, _this.options);
|
344
|
+
|
345
|
+
case 50:
|
346
|
+
response = _context.sent;
|
347
|
+
return _context.abrupt("return", new Automation(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
342
348
|
|
343
|
-
case
|
349
|
+
case 52:
|
344
350
|
case "end":
|
345
351
|
return _context.stop();
|
346
352
|
}
|
@@ -349,6 +355,7 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
349
355
|
})));
|
350
356
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
351
357
|
var params,
|
358
|
+
response,
|
352
359
|
_args2 = arguments;
|
353
360
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
354
361
|
while (1) {
|
@@ -400,9 +407,14 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
400
407
|
throw new Error('Parameter missing: id');
|
401
408
|
|
402
409
|
case 14:
|
403
|
-
|
410
|
+
_context2.next = 16;
|
411
|
+
return _Api.default.sendRequest("/automations/".concat(params['id']), 'DELETE', params, _this.options);
|
404
412
|
|
405
|
-
case
|
413
|
+
case 16:
|
414
|
+
response = _context2.sent;
|
415
|
+
return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
416
|
+
|
417
|
+
case 18:
|
406
418
|
case "end":
|
407
419
|
return _context2.stop();
|
408
420
|
}
|
package/lib/models/Behavior.js
CHANGED
@@ -97,6 +97,7 @@ var Behavior = /*#__PURE__*/(0, _createClass2.default)(function Behavior() {
|
|
97
97
|
});
|
98
98
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
99
99
|
var params,
|
100
|
+
response,
|
100
101
|
_args = arguments;
|
101
102
|
return _regenerator.default.wrap(function _callee$(_context) {
|
102
103
|
while (1) {
|
@@ -188,9 +189,14 @@ var Behavior = /*#__PURE__*/(0, _createClass2.default)(function Behavior() {
|
|
188
189
|
throw new Error('Parameter missing: id');
|
189
190
|
|
190
191
|
case 24:
|
191
|
-
|
192
|
+
_context.next = 26;
|
193
|
+
return _Api.default.sendRequest("/behaviors/".concat(params['id']), 'PATCH', params, _this.options);
|
194
|
+
|
195
|
+
case 26:
|
196
|
+
response = _context.sent;
|
197
|
+
return _context.abrupt("return", new Behavior(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
192
198
|
|
193
|
-
case
|
199
|
+
case 28:
|
194
200
|
case "end":
|
195
201
|
return _context.stop();
|
196
202
|
}
|
@@ -199,6 +205,7 @@ var Behavior = /*#__PURE__*/(0, _createClass2.default)(function Behavior() {
|
|
199
205
|
})));
|
200
206
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
201
207
|
var params,
|
208
|
+
response,
|
202
209
|
_args2 = arguments;
|
203
210
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
204
211
|
while (1) {
|
@@ -250,9 +257,14 @@ var Behavior = /*#__PURE__*/(0, _createClass2.default)(function Behavior() {
|
|
250
257
|
throw new Error('Parameter missing: id');
|
251
258
|
|
252
259
|
case 14:
|
253
|
-
|
260
|
+
_context2.next = 16;
|
261
|
+
return _Api.default.sendRequest("/behaviors/".concat(params['id']), 'DELETE', params, _this.options);
|
254
262
|
|
255
|
-
case
|
263
|
+
case 16:
|
264
|
+
response = _context2.sent;
|
265
|
+
return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
266
|
+
|
267
|
+
case 18:
|
256
268
|
case "end":
|
257
269
|
return _context2.stop();
|
258
270
|
}
|
package/lib/models/Bundle.js
CHANGED
@@ -196,6 +196,7 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
196
196
|
});
|
197
197
|
(0, _defineProperty2.default)(this, "share", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
198
198
|
var params,
|
199
|
+
response,
|
199
200
|
_args = arguments;
|
200
201
|
return _regenerator.default.wrap(function _callee$(_context) {
|
201
202
|
while (1) {
|
@@ -271,9 +272,14 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
271
272
|
throw new Error('Parameter missing: id');
|
272
273
|
|
273
274
|
case 20:
|
274
|
-
|
275
|
+
_context.next = 22;
|
276
|
+
return _Api.default.sendRequest("/bundles/".concat(params['id'], "/share"), 'POST', params, _this.options);
|
277
|
+
|
278
|
+
case 22:
|
279
|
+
response = _context.sent;
|
280
|
+
return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
275
281
|
|
276
|
-
case
|
282
|
+
case 24:
|
277
283
|
case "end":
|
278
284
|
return _context.stop();
|
279
285
|
}
|
@@ -282,6 +288,7 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
282
288
|
})));
|
283
289
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
284
290
|
var params,
|
291
|
+
response,
|
285
292
|
_args2 = arguments;
|
286
293
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
287
294
|
while (1) {
|
@@ -413,9 +420,14 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
413
420
|
throw new Error('Parameter missing: id');
|
414
421
|
|
415
422
|
case 34:
|
416
|
-
|
423
|
+
_context2.next = 36;
|
424
|
+
return _Api.default.sendRequest("/bundles/".concat(params['id']), 'PATCH', params, _this.options);
|
417
425
|
|
418
|
-
case
|
426
|
+
case 36:
|
427
|
+
response = _context2.sent;
|
428
|
+
return _context2.abrupt("return", new Bundle(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
429
|
+
|
430
|
+
case 38:
|
419
431
|
case "end":
|
420
432
|
return _context2.stop();
|
421
433
|
}
|
@@ -424,6 +436,7 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
424
436
|
})));
|
425
437
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
426
438
|
var params,
|
439
|
+
response,
|
427
440
|
_args3 = arguments;
|
428
441
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
429
442
|
while (1) {
|
@@ -475,9 +488,14 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
475
488
|
throw new Error('Parameter missing: id');
|
476
489
|
|
477
490
|
case 14:
|
478
|
-
|
491
|
+
_context3.next = 16;
|
492
|
+
return _Api.default.sendRequest("/bundles/".concat(params['id']), 'DELETE', params, _this.options);
|
479
493
|
|
480
|
-
case
|
494
|
+
case 16:
|
495
|
+
response = _context3.sent;
|
496
|
+
return _context3.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
497
|
+
|
498
|
+
case 18:
|
481
499
|
case "end":
|
482
500
|
return _context3.stop();
|
483
501
|
}
|
package/lib/models/Clickwrap.js
CHANGED
@@ -79,6 +79,7 @@ var Clickwrap = /*#__PURE__*/(0, _createClass2.default)(function Clickwrap() {
|
|
79
79
|
});
|
80
80
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
81
81
|
var params,
|
82
|
+
response,
|
82
83
|
_args = arguments;
|
83
84
|
return _regenerator.default.wrap(function _callee$(_context) {
|
84
85
|
while (1) {
|
@@ -170,9 +171,14 @@ var Clickwrap = /*#__PURE__*/(0, _createClass2.default)(function Clickwrap() {
|
|
170
171
|
throw new Error('Parameter missing: id');
|
171
172
|
|
172
173
|
case 24:
|
173
|
-
|
174
|
+
_context.next = 26;
|
175
|
+
return _Api.default.sendRequest("/clickwraps/".concat(params['id']), 'PATCH', params, _this.options);
|
176
|
+
|
177
|
+
case 26:
|
178
|
+
response = _context.sent;
|
179
|
+
return _context.abrupt("return", new Clickwrap(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
174
180
|
|
175
|
-
case
|
181
|
+
case 28:
|
176
182
|
case "end":
|
177
183
|
return _context.stop();
|
178
184
|
}
|
@@ -181,6 +187,7 @@ var Clickwrap = /*#__PURE__*/(0, _createClass2.default)(function Clickwrap() {
|
|
181
187
|
})));
|
182
188
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
183
189
|
var params,
|
190
|
+
response,
|
184
191
|
_args2 = arguments;
|
185
192
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
186
193
|
while (1) {
|
@@ -232,9 +239,14 @@ var Clickwrap = /*#__PURE__*/(0, _createClass2.default)(function Clickwrap() {
|
|
232
239
|
throw new Error('Parameter missing: id');
|
233
240
|
|
234
241
|
case 14:
|
235
|
-
|
242
|
+
_context2.next = 16;
|
243
|
+
return _Api.default.sendRequest("/clickwraps/".concat(params['id']), 'DELETE', params, _this.options);
|
236
244
|
|
237
|
-
case
|
245
|
+
case 16:
|
246
|
+
response = _context2.sent;
|
247
|
+
return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
248
|
+
|
249
|
+
case 18:
|
238
250
|
case "end":
|
239
251
|
return _context2.stop();
|
240
252
|
}
|