files.com 1.2.249 → 1.2.251
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/User.md +4 -1
- package/lib/Api.js +72 -71
- package/lib/Files.js +1 -1
- package/lib/isomorphic/File.node.js +5 -5
- package/lib/models/ActionNotificationExport.js +38 -38
- package/lib/models/ActionNotificationExportResult.js +14 -14
- package/lib/models/ApiKey.js +100 -100
- package/lib/models/ApiRequestLog.js +8 -8
- package/lib/models/App.js +8 -8
- package/lib/models/As2IncomingMessage.js +10 -10
- package/lib/models/As2OutgoingMessage.js +10 -10
- package/lib/models/As2Partner.js +101 -101
- package/lib/models/As2Station.js +81 -81
- package/lib/models/Automation.js +167 -167
- package/lib/models/AutomationLog.js +8 -8
- package/lib/models/AutomationRun.js +24 -24
- package/lib/models/BandwidthSnapshot.js +8 -8
- package/lib/models/Behavior.js +106 -106
- package/lib/models/Bundle.js +143 -143
- package/lib/models/BundleAction.js +10 -10
- package/lib/models/BundleDownload.js +12 -12
- package/lib/models/BundleNotification.js +69 -69
- package/lib/models/BundleRecipient.js +40 -40
- package/lib/models/BundleRegistration.js +12 -12
- package/lib/models/Clickwrap.js +79 -79
- package/lib/models/DnsRecord.js +8 -8
- package/lib/models/EmailIncomingMessage.js +8 -8
- package/lib/models/EmailLog.js +8 -8
- package/lib/models/ExavaultApiRequestLog.js +8 -8
- package/lib/models/ExternalEvent.js +36 -36
- package/lib/models/File.js +269 -269
- package/lib/models/FileComment.js +70 -70
- package/lib/models/FileCommentReaction.js +34 -34
- package/lib/models/FileMigration.js +10 -10
- package/lib/models/FileMigrationLog.js +8 -8
- package/lib/models/Folder.js +36 -36
- package/lib/models/FormFieldSet.js +71 -71
- package/lib/models/FtpActionLog.js +8 -8
- package/lib/models/GpgKey.js +81 -81
- package/lib/models/Group.js +83 -83
- package/lib/models/GroupUser.js +89 -89
- package/lib/models/History.js +88 -88
- package/lib/models/HistoryExport.js +64 -64
- package/lib/models/HistoryExportResult.js +14 -14
- package/lib/models/InboxRecipient.js +36 -36
- package/lib/models/InboxRegistration.js +10 -10
- package/lib/models/InboxUpload.js +8 -8
- package/lib/models/Invoice.js +18 -18
- package/lib/models/IpAddress.js +32 -32
- package/lib/models/Lock.js +51 -51
- package/lib/models/Message.js +100 -100
- package/lib/models/MessageComment.js +78 -78
- package/lib/models/MessageCommentReaction.js +54 -54
- package/lib/models/MessageReaction.js +54 -54
- package/lib/models/Notification.js +91 -91
- package/lib/models/OutboundConnectionLog.js +8 -8
- package/lib/models/Payment.js +18 -18
- package/lib/models/Permission.js +54 -54
- package/lib/models/Priority.js +14 -14
- package/lib/models/Project.js +70 -70
- package/lib/models/PublicHostingRequestLog.js +8 -8
- package/lib/models/PublicKey.js +78 -78
- package/lib/models/RemoteBandwidthSnapshot.js +8 -8
- package/lib/models/RemoteServer.js +362 -362
- package/lib/models/Request.js +60 -60
- package/lib/models/Restore.js +24 -24
- package/lib/models/Session.js +21 -21
- package/lib/models/SettingsChange.js +8 -8
- package/lib/models/SftpActionLog.js +8 -8
- package/lib/models/SftpHostKey.js +67 -67
- package/lib/models/ShareGroup.js +79 -79
- package/lib/models/SiemHttpDestination.js +158 -158
- package/lib/models/Site.js +150 -150
- package/lib/models/Snapshot.js +85 -85
- package/lib/models/SsoStrategy.js +32 -32
- package/lib/models/Style.js +48 -48
- package/lib/models/SyncLog.js +8 -8
- package/lib/models/UsageDailySnapshot.js +8 -8
- package/lib/models/UsageSnapshot.js +8 -8
- package/lib/models/User.js +223 -215
- package/lib/models/UserCipherUse.js +10 -10
- package/lib/models/UserLifecycleRule.js +92 -92
- package/lib/models/UserRequest.js +56 -56
- package/lib/models/UserSftpClientUse.js +10 -10
- package/lib/models/WebDavActionLog.js +8 -8
- package/lib/models/WebhookTest.js +24 -24
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/User.js +6 -0
package/lib/models/Invoice.js
CHANGED
|
@@ -108,32 +108,32 @@ _Invoice = Invoice;
|
|
|
108
108
|
response,
|
|
109
109
|
AccountLineItem,
|
|
110
110
|
_args = arguments;
|
|
111
|
-
return _regenerator.default.wrap(function
|
|
111
|
+
return _regenerator.default.wrap(function (_context) {
|
|
112
112
|
while (1) switch (_context.prev = _context.next) {
|
|
113
113
|
case 0:
|
|
114
114
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
115
115
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
116
116
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
117
|
-
_context.next =
|
|
117
|
+
_context.next = 1;
|
|
118
118
|
break;
|
|
119
119
|
}
|
|
120
120
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
121
|
-
case
|
|
121
|
+
case 1:
|
|
122
122
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
123
|
-
_context.next =
|
|
123
|
+
_context.next = 2;
|
|
124
124
|
break;
|
|
125
125
|
}
|
|
126
126
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
127
|
-
case
|
|
128
|
-
_context.next =
|
|
127
|
+
case 2:
|
|
128
|
+
_context.next = 3;
|
|
129
129
|
return _Api.default.sendRequest('/invoices', 'GET', params, options);
|
|
130
|
-
case
|
|
130
|
+
case 3:
|
|
131
131
|
response = _context.sent;
|
|
132
132
|
AccountLineItem = require('./AccountLineItem.js').default;
|
|
133
133
|
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) {
|
|
134
134
|
return new AccountLineItem(obj, options);
|
|
135
135
|
})) || []);
|
|
136
|
-
case
|
|
136
|
+
case 4:
|
|
137
137
|
case "end":
|
|
138
138
|
return _context.stop();
|
|
139
139
|
}
|
|
@@ -153,37 +153,37 @@ _Invoice = Invoice;
|
|
|
153
153
|
response,
|
|
154
154
|
AccountLineItem,
|
|
155
155
|
_args2 = arguments;
|
|
156
|
-
return _regenerator.default.wrap(function
|
|
156
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
157
157
|
while (1) switch (_context2.prev = _context2.next) {
|
|
158
158
|
case 0:
|
|
159
159
|
params = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
|
|
160
160
|
options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
|
|
161
161
|
if ((0, _utils.isObject)(params)) {
|
|
162
|
-
_context2.next =
|
|
162
|
+
_context2.next = 1;
|
|
163
163
|
break;
|
|
164
164
|
}
|
|
165
165
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
166
|
-
case
|
|
166
|
+
case 1:
|
|
167
167
|
params.id = id;
|
|
168
168
|
if (params.id) {
|
|
169
|
-
_context2.next =
|
|
169
|
+
_context2.next = 2;
|
|
170
170
|
break;
|
|
171
171
|
}
|
|
172
172
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
173
|
-
case
|
|
173
|
+
case 2:
|
|
174
174
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
175
|
-
_context2.next =
|
|
175
|
+
_context2.next = 3;
|
|
176
176
|
break;
|
|
177
177
|
}
|
|
178
178
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
179
|
-
case
|
|
180
|
-
_context2.next =
|
|
179
|
+
case 3:
|
|
180
|
+
_context2.next = 4;
|
|
181
181
|
return _Api.default.sendRequest("/invoices/".concat(encodeURIComponent(params.id)), 'GET', params, options);
|
|
182
|
-
case
|
|
182
|
+
case 4:
|
|
183
183
|
response = _context2.sent;
|
|
184
184
|
AccountLineItem = require('./AccountLineItem.js').default;
|
|
185
185
|
return _context2.abrupt("return", new AccountLineItem(response === null || response === void 0 ? void 0 : response.data, options));
|
|
186
|
-
case
|
|
186
|
+
case 5:
|
|
187
187
|
case "end":
|
|
188
188
|
return _context2.stop();
|
|
189
189
|
}
|
package/lib/models/IpAddress.js
CHANGED
|
@@ -71,31 +71,31 @@ _IpAddress = IpAddress;
|
|
|
71
71
|
options,
|
|
72
72
|
response,
|
|
73
73
|
_args = arguments;
|
|
74
|
-
return _regenerator.default.wrap(function
|
|
74
|
+
return _regenerator.default.wrap(function (_context) {
|
|
75
75
|
while (1) switch (_context.prev = _context.next) {
|
|
76
76
|
case 0:
|
|
77
77
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
78
78
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
79
79
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
80
|
-
_context.next =
|
|
80
|
+
_context.next = 1;
|
|
81
81
|
break;
|
|
82
82
|
}
|
|
83
83
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
84
|
-
case
|
|
84
|
+
case 1:
|
|
85
85
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
86
|
-
_context.next =
|
|
86
|
+
_context.next = 2;
|
|
87
87
|
break;
|
|
88
88
|
}
|
|
89
89
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
90
|
-
case
|
|
91
|
-
_context.next =
|
|
90
|
+
case 2:
|
|
91
|
+
_context.next = 3;
|
|
92
92
|
return _Api.default.sendRequest('/ip_addresses', 'GET', params, options);
|
|
93
|
-
case
|
|
93
|
+
case 3:
|
|
94
94
|
response = _context.sent;
|
|
95
95
|
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) {
|
|
96
96
|
return new _IpAddress(obj, options);
|
|
97
97
|
})) || []);
|
|
98
|
-
case
|
|
98
|
+
case 4:
|
|
99
99
|
case "end":
|
|
100
100
|
return _context.stop();
|
|
101
101
|
}
|
|
@@ -116,32 +116,32 @@ _IpAddress = IpAddress;
|
|
|
116
116
|
response,
|
|
117
117
|
PublicIpAddress,
|
|
118
118
|
_args2 = arguments;
|
|
119
|
-
return _regenerator.default.wrap(function
|
|
119
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
120
120
|
while (1) switch (_context2.prev = _context2.next) {
|
|
121
121
|
case 0:
|
|
122
122
|
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
123
123
|
options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
|
|
124
124
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
125
|
-
_context2.next =
|
|
125
|
+
_context2.next = 1;
|
|
126
126
|
break;
|
|
127
127
|
}
|
|
128
128
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
129
|
-
case
|
|
129
|
+
case 1:
|
|
130
130
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
131
|
-
_context2.next =
|
|
131
|
+
_context2.next = 2;
|
|
132
132
|
break;
|
|
133
133
|
}
|
|
134
134
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
135
|
-
case
|
|
136
|
-
_context2.next =
|
|
135
|
+
case 2:
|
|
136
|
+
_context2.next = 3;
|
|
137
137
|
return _Api.default.sendRequest('/ip_addresses/smartfile-reserved', 'GET', params, options);
|
|
138
|
-
case
|
|
138
|
+
case 3:
|
|
139
139
|
response = _context2.sent;
|
|
140
140
|
PublicIpAddress = require('./PublicIpAddress.js').default;
|
|
141
141
|
return _context2.abrupt("return", (response === null || response === void 0 || (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.map(function (obj) {
|
|
142
142
|
return new PublicIpAddress(obj, options);
|
|
143
143
|
})) || []);
|
|
144
|
-
case
|
|
144
|
+
case 4:
|
|
145
145
|
case "end":
|
|
146
146
|
return _context2.stop();
|
|
147
147
|
}
|
|
@@ -157,32 +157,32 @@ _IpAddress = IpAddress;
|
|
|
157
157
|
response,
|
|
158
158
|
PublicIpAddress,
|
|
159
159
|
_args3 = arguments;
|
|
160
|
-
return _regenerator.default.wrap(function
|
|
160
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
161
161
|
while (1) switch (_context3.prev = _context3.next) {
|
|
162
162
|
case 0:
|
|
163
163
|
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
164
164
|
options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
|
165
165
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
166
|
-
_context3.next =
|
|
166
|
+
_context3.next = 1;
|
|
167
167
|
break;
|
|
168
168
|
}
|
|
169
169
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
170
|
-
case
|
|
170
|
+
case 1:
|
|
171
171
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
172
|
-
_context3.next =
|
|
172
|
+
_context3.next = 2;
|
|
173
173
|
break;
|
|
174
174
|
}
|
|
175
175
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
176
|
-
case
|
|
177
|
-
_context3.next =
|
|
176
|
+
case 2:
|
|
177
|
+
_context3.next = 3;
|
|
178
178
|
return _Api.default.sendRequest('/ip_addresses/exavault-reserved', 'GET', params, options);
|
|
179
|
-
case
|
|
179
|
+
case 3:
|
|
180
180
|
response = _context3.sent;
|
|
181
181
|
PublicIpAddress = require('./PublicIpAddress.js').default;
|
|
182
182
|
return _context3.abrupt("return", (response === null || response === void 0 || (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : _response$data3.map(function (obj) {
|
|
183
183
|
return new PublicIpAddress(obj, options);
|
|
184
184
|
})) || []);
|
|
185
|
-
case
|
|
185
|
+
case 4:
|
|
186
186
|
case "end":
|
|
187
187
|
return _context3.stop();
|
|
188
188
|
}
|
|
@@ -198,32 +198,32 @@ _IpAddress = IpAddress;
|
|
|
198
198
|
response,
|
|
199
199
|
PublicIpAddress,
|
|
200
200
|
_args4 = arguments;
|
|
201
|
-
return _regenerator.default.wrap(function
|
|
201
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
202
202
|
while (1) switch (_context4.prev = _context4.next) {
|
|
203
203
|
case 0:
|
|
204
204
|
params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
205
205
|
options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
|
206
206
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
207
|
-
_context4.next =
|
|
207
|
+
_context4.next = 1;
|
|
208
208
|
break;
|
|
209
209
|
}
|
|
210
210
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
211
|
-
case
|
|
211
|
+
case 1:
|
|
212
212
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
213
|
-
_context4.next =
|
|
213
|
+
_context4.next = 2;
|
|
214
214
|
break;
|
|
215
215
|
}
|
|
216
216
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
217
|
-
case
|
|
218
|
-
_context4.next =
|
|
217
|
+
case 2:
|
|
218
|
+
_context4.next = 3;
|
|
219
219
|
return _Api.default.sendRequest('/ip_addresses/reserved', 'GET', params, options);
|
|
220
|
-
case
|
|
220
|
+
case 3:
|
|
221
221
|
response = _context4.sent;
|
|
222
222
|
PublicIpAddress = require('./PublicIpAddress.js').default;
|
|
223
223
|
return _context4.abrupt("return", (response === null || response === void 0 || (_response$data4 = response.data) === null || _response$data4 === void 0 ? void 0 : _response$data4.map(function (obj) {
|
|
224
224
|
return new PublicIpAddress(obj, options);
|
|
225
225
|
})) || []);
|
|
226
|
-
case
|
|
226
|
+
case 4:
|
|
227
227
|
case "end":
|
|
228
228
|
return _context4.stop();
|
|
229
229
|
}
|
package/lib/models/Lock.js
CHANGED
|
@@ -121,66 +121,66 @@ var Lock = /*#__PURE__*/(0, _createClass2.default)(function Lock() {
|
|
|
121
121
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
122
122
|
var params,
|
|
123
123
|
_args = arguments;
|
|
124
|
-
return _regenerator.default.wrap(function
|
|
124
|
+
return _regenerator.default.wrap(function (_context) {
|
|
125
125
|
while (1) switch (_context.prev = _context.next) {
|
|
126
126
|
case 0:
|
|
127
127
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
128
128
|
if (_this.attributes.path) {
|
|
129
|
-
_context.next =
|
|
129
|
+
_context.next = 1;
|
|
130
130
|
break;
|
|
131
131
|
}
|
|
132
132
|
throw new errors.EmptyPropertyError('Current object has no path');
|
|
133
|
-
case
|
|
133
|
+
case 1:
|
|
134
134
|
if ((0, _utils.isObject)(params)) {
|
|
135
|
-
_context.next =
|
|
135
|
+
_context.next = 2;
|
|
136
136
|
break;
|
|
137
137
|
}
|
|
138
138
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
139
|
-
case
|
|
139
|
+
case 2:
|
|
140
140
|
params.path = _this.attributes.path;
|
|
141
141
|
if (!(params.path && !(0, _utils.isString)(params.path))) {
|
|
142
|
-
_context.next =
|
|
142
|
+
_context.next = 3;
|
|
143
143
|
break;
|
|
144
144
|
}
|
|
145
145
|
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
|
146
|
-
case
|
|
146
|
+
case 3:
|
|
147
147
|
if (!(params.token && !(0, _utils.isString)(params.token))) {
|
|
148
|
-
_context.next =
|
|
148
|
+
_context.next = 4;
|
|
149
149
|
break;
|
|
150
150
|
}
|
|
151
151
|
throw new errors.InvalidParameterError("Bad parameter: token must be of type String, received ".concat((0, _utils.getType)(params.token)));
|
|
152
|
-
case
|
|
152
|
+
case 4:
|
|
153
153
|
if (params.path) {
|
|
154
|
-
_context.next =
|
|
154
|
+
_context.next = 6;
|
|
155
155
|
break;
|
|
156
156
|
}
|
|
157
157
|
if (!_this.attributes.path) {
|
|
158
|
-
_context.next =
|
|
158
|
+
_context.next = 5;
|
|
159
159
|
break;
|
|
160
160
|
}
|
|
161
161
|
params.path = _this.path;
|
|
162
|
-
_context.next =
|
|
162
|
+
_context.next = 6;
|
|
163
163
|
break;
|
|
164
|
-
case
|
|
164
|
+
case 5:
|
|
165
165
|
throw new errors.MissingParameterError('Parameter missing: path');
|
|
166
|
-
case
|
|
166
|
+
case 6:
|
|
167
167
|
if (params.token) {
|
|
168
|
-
_context.next =
|
|
168
|
+
_context.next = 8;
|
|
169
169
|
break;
|
|
170
170
|
}
|
|
171
171
|
if (!_this.attributes.token) {
|
|
172
|
-
_context.next =
|
|
172
|
+
_context.next = 7;
|
|
173
173
|
break;
|
|
174
174
|
}
|
|
175
175
|
params.token = _this.token;
|
|
176
|
-
_context.next =
|
|
176
|
+
_context.next = 8;
|
|
177
177
|
break;
|
|
178
|
-
case
|
|
178
|
+
case 7:
|
|
179
179
|
throw new errors.MissingParameterError('Parameter missing: token');
|
|
180
|
-
case
|
|
181
|
-
_context.next =
|
|
180
|
+
case 8:
|
|
181
|
+
_context.next = 9;
|
|
182
182
|
return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params.path)), 'DELETE', params, _this.options);
|
|
183
|
-
case
|
|
183
|
+
case 9:
|
|
184
184
|
case "end":
|
|
185
185
|
return _context.stop();
|
|
186
186
|
}
|
|
@@ -192,16 +192,16 @@ var Lock = /*#__PURE__*/(0, _createClass2.default)(function Lock() {
|
|
|
192
192
|
});
|
|
193
193
|
(0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
194
194
|
var newObject;
|
|
195
|
-
return _regenerator.default.wrap(function
|
|
195
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
196
196
|
while (1) switch (_context2.prev = _context2.next) {
|
|
197
197
|
case 0:
|
|
198
|
-
_context2.next =
|
|
198
|
+
_context2.next = 1;
|
|
199
199
|
return Lock.create(_this.attributes.path, _this.attributes, _this.options);
|
|
200
|
-
case
|
|
200
|
+
case 1:
|
|
201
201
|
newObject = _context2.sent;
|
|
202
202
|
_this.attributes = _objectSpread({}, newObject.attributes);
|
|
203
203
|
return _context2.abrupt("return", true);
|
|
204
|
-
case
|
|
204
|
+
case 2:
|
|
205
205
|
case "end":
|
|
206
206
|
return _context2.stop();
|
|
207
207
|
}
|
|
@@ -233,50 +233,50 @@ _Lock = Lock;
|
|
|
233
233
|
options,
|
|
234
234
|
response,
|
|
235
235
|
_args3 = arguments;
|
|
236
|
-
return _regenerator.default.wrap(function
|
|
236
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
237
237
|
while (1) switch (_context3.prev = _context3.next) {
|
|
238
238
|
case 0:
|
|
239
239
|
params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
|
240
240
|
options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
|
|
241
241
|
if ((0, _utils.isObject)(params)) {
|
|
242
|
-
_context3.next =
|
|
242
|
+
_context3.next = 1;
|
|
243
243
|
break;
|
|
244
244
|
}
|
|
245
245
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
246
|
-
case
|
|
246
|
+
case 1:
|
|
247
247
|
params.path = path;
|
|
248
248
|
if (params.path) {
|
|
249
|
-
_context3.next =
|
|
249
|
+
_context3.next = 2;
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
252
|
throw new errors.MissingParameterError('Parameter missing: path');
|
|
253
|
-
case
|
|
253
|
+
case 2:
|
|
254
254
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
255
|
-
_context3.next =
|
|
255
|
+
_context3.next = 3;
|
|
256
256
|
break;
|
|
257
257
|
}
|
|
258
258
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
259
|
-
case
|
|
259
|
+
case 3:
|
|
260
260
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
261
|
-
_context3.next =
|
|
261
|
+
_context3.next = 4;
|
|
262
262
|
break;
|
|
263
263
|
}
|
|
264
264
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
265
|
-
case
|
|
265
|
+
case 4:
|
|
266
266
|
if (!(params.path && !(0, _utils.isString)(params.path))) {
|
|
267
|
-
_context3.next =
|
|
267
|
+
_context3.next = 5;
|
|
268
268
|
break;
|
|
269
269
|
}
|
|
270
270
|
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
|
271
|
-
case
|
|
272
|
-
_context3.next =
|
|
271
|
+
case 5:
|
|
272
|
+
_context3.next = 6;
|
|
273
273
|
return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params.path)), 'GET', params, options);
|
|
274
|
-
case
|
|
274
|
+
case 6:
|
|
275
275
|
response = _context3.sent;
|
|
276
276
|
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) {
|
|
277
277
|
return new _Lock(obj, options);
|
|
278
278
|
})) || []);
|
|
279
|
-
case
|
|
279
|
+
case 7:
|
|
280
280
|
case "end":
|
|
281
281
|
return _context3.stop();
|
|
282
282
|
}
|
|
@@ -298,42 +298,42 @@ _Lock = Lock;
|
|
|
298
298
|
options,
|
|
299
299
|
response,
|
|
300
300
|
_args4 = arguments;
|
|
301
|
-
return _regenerator.default.wrap(function
|
|
301
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
302
302
|
while (1) switch (_context4.prev = _context4.next) {
|
|
303
303
|
case 0:
|
|
304
304
|
params = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
|
305
305
|
options = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
|
|
306
306
|
if ((0, _utils.isObject)(params)) {
|
|
307
|
-
_context4.next =
|
|
307
|
+
_context4.next = 1;
|
|
308
308
|
break;
|
|
309
309
|
}
|
|
310
310
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
311
|
-
case
|
|
311
|
+
case 1:
|
|
312
312
|
params.path = path;
|
|
313
313
|
if (params.path) {
|
|
314
|
-
_context4.next =
|
|
314
|
+
_context4.next = 2;
|
|
315
315
|
break;
|
|
316
316
|
}
|
|
317
317
|
throw new errors.MissingParameterError('Parameter missing: path');
|
|
318
|
-
case
|
|
318
|
+
case 2:
|
|
319
319
|
if (!(params.path && !(0, _utils.isString)(params.path))) {
|
|
320
|
-
_context4.next =
|
|
320
|
+
_context4.next = 3;
|
|
321
321
|
break;
|
|
322
322
|
}
|
|
323
323
|
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
|
324
|
-
case
|
|
324
|
+
case 3:
|
|
325
325
|
if (!(params.timeout && !(0, _utils.isInt)(params.timeout))) {
|
|
326
|
-
_context4.next =
|
|
326
|
+
_context4.next = 4;
|
|
327
327
|
break;
|
|
328
328
|
}
|
|
329
329
|
throw new errors.InvalidParameterError("Bad parameter: timeout must be of type Int, received ".concat((0, _utils.getType)(params.timeout)));
|
|
330
|
-
case
|
|
331
|
-
_context4.next =
|
|
330
|
+
case 4:
|
|
331
|
+
_context4.next = 5;
|
|
332
332
|
return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params.path)), 'POST', params, options);
|
|
333
|
-
case
|
|
333
|
+
case 5:
|
|
334
334
|
response = _context4.sent;
|
|
335
335
|
return _context4.abrupt("return", new _Lock(response === null || response === void 0 ? void 0 : response.data, options));
|
|
336
|
-
case
|
|
336
|
+
case 6:
|
|
337
337
|
case "end":
|
|
338
338
|
return _context4.stop();
|
|
339
339
|
}
|