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/Message.js
CHANGED
|
@@ -82,109 +82,109 @@ var Message = /*#__PURE__*/(0, _createClass2.default)(function Message() {
|
|
|
82
82
|
var params,
|
|
83
83
|
response,
|
|
84
84
|
_args = arguments;
|
|
85
|
-
return _regenerator.default.wrap(function
|
|
85
|
+
return _regenerator.default.wrap(function (_context) {
|
|
86
86
|
while (1) switch (_context.prev = _context.next) {
|
|
87
87
|
case 0:
|
|
88
88
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
89
89
|
if (_this.attributes.id) {
|
|
90
|
-
_context.next =
|
|
90
|
+
_context.next = 1;
|
|
91
91
|
break;
|
|
92
92
|
}
|
|
93
93
|
throw new errors.EmptyPropertyError('Current object has no id');
|
|
94
|
-
case
|
|
94
|
+
case 1:
|
|
95
95
|
if ((0, _utils.isObject)(params)) {
|
|
96
|
-
_context.next =
|
|
96
|
+
_context.next = 2;
|
|
97
97
|
break;
|
|
98
98
|
}
|
|
99
99
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
100
|
-
case
|
|
100
|
+
case 2:
|
|
101
101
|
params.id = _this.attributes.id;
|
|
102
102
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
103
|
-
_context.next =
|
|
103
|
+
_context.next = 3;
|
|
104
104
|
break;
|
|
105
105
|
}
|
|
106
106
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
107
|
-
case
|
|
107
|
+
case 3:
|
|
108
108
|
if (!(params.project_id && !(0, _utils.isInt)(params.project_id))) {
|
|
109
|
-
_context.next =
|
|
109
|
+
_context.next = 4;
|
|
110
110
|
break;
|
|
111
111
|
}
|
|
112
112
|
throw new errors.InvalidParameterError("Bad parameter: project_id must be of type Int, received ".concat((0, _utils.getType)(params.project_id)));
|
|
113
|
-
case
|
|
113
|
+
case 4:
|
|
114
114
|
if (!(params.subject && !(0, _utils.isString)(params.subject))) {
|
|
115
|
-
_context.next =
|
|
115
|
+
_context.next = 5;
|
|
116
116
|
break;
|
|
117
117
|
}
|
|
118
118
|
throw new errors.InvalidParameterError("Bad parameter: subject must be of type String, received ".concat((0, _utils.getType)(params.subject)));
|
|
119
|
-
case
|
|
119
|
+
case 5:
|
|
120
120
|
if (!(params.body && !(0, _utils.isString)(params.body))) {
|
|
121
|
-
_context.next =
|
|
121
|
+
_context.next = 6;
|
|
122
122
|
break;
|
|
123
123
|
}
|
|
124
124
|
throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(params.body)));
|
|
125
|
-
case
|
|
125
|
+
case 6:
|
|
126
126
|
if (params.id) {
|
|
127
|
-
_context.next =
|
|
127
|
+
_context.next = 8;
|
|
128
128
|
break;
|
|
129
129
|
}
|
|
130
130
|
if (!_this.attributes.id) {
|
|
131
|
-
_context.next =
|
|
131
|
+
_context.next = 7;
|
|
132
132
|
break;
|
|
133
133
|
}
|
|
134
134
|
params.id = _this.id;
|
|
135
|
-
_context.next =
|
|
135
|
+
_context.next = 8;
|
|
136
136
|
break;
|
|
137
|
-
case
|
|
137
|
+
case 7:
|
|
138
138
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
139
|
-
case
|
|
139
|
+
case 8:
|
|
140
140
|
if (params.project_id) {
|
|
141
|
-
_context.next =
|
|
141
|
+
_context.next = 10;
|
|
142
142
|
break;
|
|
143
143
|
}
|
|
144
144
|
if (!_this.attributes.project_id) {
|
|
145
|
-
_context.next =
|
|
145
|
+
_context.next = 9;
|
|
146
146
|
break;
|
|
147
147
|
}
|
|
148
148
|
params.project_id = _this.project_id;
|
|
149
|
-
_context.next =
|
|
149
|
+
_context.next = 10;
|
|
150
150
|
break;
|
|
151
|
-
case
|
|
151
|
+
case 9:
|
|
152
152
|
throw new errors.MissingParameterError('Parameter missing: project_id');
|
|
153
|
-
case
|
|
153
|
+
case 10:
|
|
154
154
|
if (params.subject) {
|
|
155
|
-
_context.next =
|
|
155
|
+
_context.next = 12;
|
|
156
156
|
break;
|
|
157
157
|
}
|
|
158
158
|
if (!_this.attributes.subject) {
|
|
159
|
-
_context.next =
|
|
159
|
+
_context.next = 11;
|
|
160
160
|
break;
|
|
161
161
|
}
|
|
162
162
|
params.subject = _this.subject;
|
|
163
|
-
_context.next =
|
|
163
|
+
_context.next = 12;
|
|
164
164
|
break;
|
|
165
|
-
case
|
|
165
|
+
case 11:
|
|
166
166
|
throw new errors.MissingParameterError('Parameter missing: subject');
|
|
167
|
-
case
|
|
167
|
+
case 12:
|
|
168
168
|
if (params.body) {
|
|
169
|
-
_context.next =
|
|
169
|
+
_context.next = 14;
|
|
170
170
|
break;
|
|
171
171
|
}
|
|
172
172
|
if (!_this.attributes.body) {
|
|
173
|
-
_context.next =
|
|
173
|
+
_context.next = 13;
|
|
174
174
|
break;
|
|
175
175
|
}
|
|
176
176
|
params.body = _this.body;
|
|
177
|
-
_context.next =
|
|
177
|
+
_context.next = 14;
|
|
178
178
|
break;
|
|
179
|
-
case
|
|
179
|
+
case 13:
|
|
180
180
|
throw new errors.MissingParameterError('Parameter missing: body');
|
|
181
|
-
case
|
|
182
|
-
_context.next =
|
|
181
|
+
case 14:
|
|
182
|
+
_context.next = 15;
|
|
183
183
|
return _Api.default.sendRequest("/messages/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
184
|
-
case
|
|
184
|
+
case 15:
|
|
185
185
|
response = _context.sent;
|
|
186
186
|
return _context.abrupt("return", new Message(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
|
187
|
-
case
|
|
187
|
+
case 16:
|
|
188
188
|
case "end":
|
|
189
189
|
return _context.stop();
|
|
190
190
|
}
|
|
@@ -193,46 +193,46 @@ var Message = /*#__PURE__*/(0, _createClass2.default)(function Message() {
|
|
|
193
193
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
194
194
|
var params,
|
|
195
195
|
_args2 = arguments;
|
|
196
|
-
return _regenerator.default.wrap(function
|
|
196
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
197
197
|
while (1) switch (_context2.prev = _context2.next) {
|
|
198
198
|
case 0:
|
|
199
199
|
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
200
200
|
if (_this.attributes.id) {
|
|
201
|
-
_context2.next =
|
|
201
|
+
_context2.next = 1;
|
|
202
202
|
break;
|
|
203
203
|
}
|
|
204
204
|
throw new errors.EmptyPropertyError('Current object has no id');
|
|
205
|
-
case
|
|
205
|
+
case 1:
|
|
206
206
|
if ((0, _utils.isObject)(params)) {
|
|
207
|
-
_context2.next =
|
|
207
|
+
_context2.next = 2;
|
|
208
208
|
break;
|
|
209
209
|
}
|
|
210
210
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
211
|
-
case
|
|
211
|
+
case 2:
|
|
212
212
|
params.id = _this.attributes.id;
|
|
213
213
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
214
|
-
_context2.next =
|
|
214
|
+
_context2.next = 3;
|
|
215
215
|
break;
|
|
216
216
|
}
|
|
217
217
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
218
|
-
case
|
|
218
|
+
case 3:
|
|
219
219
|
if (params.id) {
|
|
220
|
-
_context2.next =
|
|
220
|
+
_context2.next = 5;
|
|
221
221
|
break;
|
|
222
222
|
}
|
|
223
223
|
if (!_this.attributes.id) {
|
|
224
|
-
_context2.next =
|
|
224
|
+
_context2.next = 4;
|
|
225
225
|
break;
|
|
226
226
|
}
|
|
227
227
|
params.id = _this.id;
|
|
228
|
-
_context2.next =
|
|
228
|
+
_context2.next = 5;
|
|
229
229
|
break;
|
|
230
|
-
case
|
|
230
|
+
case 4:
|
|
231
231
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
232
|
-
case
|
|
233
|
-
_context2.next =
|
|
232
|
+
case 5:
|
|
233
|
+
_context2.next = 6;
|
|
234
234
|
return _Api.default.sendRequest("/messages/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
|
|
235
|
-
case
|
|
235
|
+
case 6:
|
|
236
236
|
case "end":
|
|
237
237
|
return _context2.stop();
|
|
238
238
|
}
|
|
@@ -244,27 +244,27 @@ var Message = /*#__PURE__*/(0, _createClass2.default)(function Message() {
|
|
|
244
244
|
});
|
|
245
245
|
(0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
246
246
|
var _newObject, newObject;
|
|
247
|
-
return _regenerator.default.wrap(function
|
|
247
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
248
248
|
while (1) switch (_context3.prev = _context3.next) {
|
|
249
249
|
case 0:
|
|
250
250
|
if (!_this.attributes.id) {
|
|
251
|
-
_context3.next =
|
|
251
|
+
_context3.next = 2;
|
|
252
252
|
break;
|
|
253
253
|
}
|
|
254
|
-
_context3.next =
|
|
254
|
+
_context3.next = 1;
|
|
255
255
|
return _this.update(_this.attributes);
|
|
256
|
-
case
|
|
256
|
+
case 1:
|
|
257
257
|
_newObject = _context3.sent;
|
|
258
258
|
_this.attributes = _objectSpread({}, _newObject.attributes);
|
|
259
259
|
return _context3.abrupt("return", true);
|
|
260
|
-
case
|
|
261
|
-
_context3.next =
|
|
260
|
+
case 2:
|
|
261
|
+
_context3.next = 3;
|
|
262
262
|
return Message.create(_this.attributes, _this.options);
|
|
263
|
-
case
|
|
263
|
+
case 3:
|
|
264
264
|
newObject = _context3.sent;
|
|
265
265
|
_this.attributes = _objectSpread({}, newObject.attributes);
|
|
266
266
|
return _context3.abrupt("return", true);
|
|
267
|
-
case
|
|
267
|
+
case 4:
|
|
268
268
|
case "end":
|
|
269
269
|
return _context3.stop();
|
|
270
270
|
}
|
|
@@ -295,49 +295,49 @@ _Message = Message;
|
|
|
295
295
|
options,
|
|
296
296
|
response,
|
|
297
297
|
_args4 = arguments;
|
|
298
|
-
return _regenerator.default.wrap(function
|
|
298
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
299
299
|
while (1) switch (_context4.prev = _context4.next) {
|
|
300
300
|
case 0:
|
|
301
301
|
params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
302
302
|
options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
|
303
303
|
if (params.project_id) {
|
|
304
|
-
_context4.next =
|
|
304
|
+
_context4.next = 1;
|
|
305
305
|
break;
|
|
306
306
|
}
|
|
307
307
|
throw new errors.MissingParameterError('Parameter missing: project_id');
|
|
308
|
-
case
|
|
308
|
+
case 1:
|
|
309
309
|
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
|
|
310
|
-
_context4.next =
|
|
310
|
+
_context4.next = 2;
|
|
311
311
|
break;
|
|
312
312
|
}
|
|
313
313
|
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
|
314
|
-
case
|
|
314
|
+
case 2:
|
|
315
315
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
316
|
-
_context4.next =
|
|
316
|
+
_context4.next = 3;
|
|
317
317
|
break;
|
|
318
318
|
}
|
|
319
319
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
320
|
-
case
|
|
320
|
+
case 3:
|
|
321
321
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
322
|
-
_context4.next =
|
|
322
|
+
_context4.next = 4;
|
|
323
323
|
break;
|
|
324
324
|
}
|
|
325
325
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
326
|
-
case
|
|
326
|
+
case 4:
|
|
327
327
|
if (!(params.project_id && !(0, _utils.isInt)(params.project_id))) {
|
|
328
|
-
_context4.next =
|
|
328
|
+
_context4.next = 5;
|
|
329
329
|
break;
|
|
330
330
|
}
|
|
331
331
|
throw new errors.InvalidParameterError("Bad parameter: project_id must be of type Int, received ".concat((0, _utils.getType)(params.project_id)));
|
|
332
|
-
case
|
|
333
|
-
_context4.next =
|
|
332
|
+
case 5:
|
|
333
|
+
_context4.next = 6;
|
|
334
334
|
return _Api.default.sendRequest('/messages', 'GET', params, options);
|
|
335
|
-
case
|
|
335
|
+
case 6:
|
|
336
336
|
response = _context4.sent;
|
|
337
337
|
return _context4.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
338
338
|
return new _Message(obj, options);
|
|
339
339
|
})) || []);
|
|
340
|
-
case
|
|
340
|
+
case 7:
|
|
341
341
|
case "end":
|
|
342
342
|
return _context4.stop();
|
|
343
343
|
}
|
|
@@ -356,36 +356,36 @@ _Message = Message;
|
|
|
356
356
|
options,
|
|
357
357
|
response,
|
|
358
358
|
_args5 = arguments;
|
|
359
|
-
return _regenerator.default.wrap(function
|
|
359
|
+
return _regenerator.default.wrap(function (_context5) {
|
|
360
360
|
while (1) switch (_context5.prev = _context5.next) {
|
|
361
361
|
case 0:
|
|
362
362
|
params = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
|
363
363
|
options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
|
|
364
364
|
if ((0, _utils.isObject)(params)) {
|
|
365
|
-
_context5.next =
|
|
365
|
+
_context5.next = 1;
|
|
366
366
|
break;
|
|
367
367
|
}
|
|
368
368
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
369
|
-
case
|
|
369
|
+
case 1:
|
|
370
370
|
params.id = id;
|
|
371
371
|
if (params.id) {
|
|
372
|
-
_context5.next =
|
|
372
|
+
_context5.next = 2;
|
|
373
373
|
break;
|
|
374
374
|
}
|
|
375
375
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
376
|
-
case
|
|
376
|
+
case 2:
|
|
377
377
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
378
|
-
_context5.next =
|
|
378
|
+
_context5.next = 3;
|
|
379
379
|
break;
|
|
380
380
|
}
|
|
381
381
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
382
|
-
case
|
|
383
|
-
_context5.next =
|
|
382
|
+
case 3:
|
|
383
|
+
_context5.next = 4;
|
|
384
384
|
return _Api.default.sendRequest("/messages/".concat(encodeURIComponent(params.id)), 'GET', params, options);
|
|
385
|
-
case
|
|
385
|
+
case 4:
|
|
386
386
|
response = _context5.sent;
|
|
387
387
|
return _context5.abrupt("return", new _Message(response === null || response === void 0 ? void 0 : response.data, options));
|
|
388
|
-
case
|
|
388
|
+
case 5:
|
|
389
389
|
case "end":
|
|
390
390
|
return _context5.stop();
|
|
391
391
|
}
|
|
@@ -410,59 +410,59 @@ _Message = Message;
|
|
|
410
410
|
options,
|
|
411
411
|
response,
|
|
412
412
|
_args6 = arguments;
|
|
413
|
-
return _regenerator.default.wrap(function
|
|
413
|
+
return _regenerator.default.wrap(function (_context6) {
|
|
414
414
|
while (1) switch (_context6.prev = _context6.next) {
|
|
415
415
|
case 0:
|
|
416
416
|
params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
417
417
|
options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
|
|
418
418
|
if (params.project_id) {
|
|
419
|
-
_context6.next =
|
|
419
|
+
_context6.next = 1;
|
|
420
420
|
break;
|
|
421
421
|
}
|
|
422
422
|
throw new errors.MissingParameterError('Parameter missing: project_id');
|
|
423
|
-
case
|
|
423
|
+
case 1:
|
|
424
424
|
if (params.subject) {
|
|
425
|
-
_context6.next =
|
|
425
|
+
_context6.next = 2;
|
|
426
426
|
break;
|
|
427
427
|
}
|
|
428
428
|
throw new errors.MissingParameterError('Parameter missing: subject');
|
|
429
|
-
case
|
|
429
|
+
case 2:
|
|
430
430
|
if (params.body) {
|
|
431
|
-
_context6.next =
|
|
431
|
+
_context6.next = 3;
|
|
432
432
|
break;
|
|
433
433
|
}
|
|
434
434
|
throw new errors.MissingParameterError('Parameter missing: body');
|
|
435
|
-
case
|
|
435
|
+
case 3:
|
|
436
436
|
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
|
|
437
|
-
_context6.next =
|
|
437
|
+
_context6.next = 4;
|
|
438
438
|
break;
|
|
439
439
|
}
|
|
440
440
|
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
|
441
|
-
case
|
|
441
|
+
case 4:
|
|
442
442
|
if (!(params.project_id && !(0, _utils.isInt)(params.project_id))) {
|
|
443
|
-
_context6.next =
|
|
443
|
+
_context6.next = 5;
|
|
444
444
|
break;
|
|
445
445
|
}
|
|
446
446
|
throw new errors.InvalidParameterError("Bad parameter: project_id must be of type Int, received ".concat((0, _utils.getType)(params.project_id)));
|
|
447
|
-
case
|
|
447
|
+
case 5:
|
|
448
448
|
if (!(params.subject && !(0, _utils.isString)(params.subject))) {
|
|
449
|
-
_context6.next =
|
|
449
|
+
_context6.next = 6;
|
|
450
450
|
break;
|
|
451
451
|
}
|
|
452
452
|
throw new errors.InvalidParameterError("Bad parameter: subject must be of type String, received ".concat((0, _utils.getType)(params.subject)));
|
|
453
|
-
case
|
|
453
|
+
case 6:
|
|
454
454
|
if (!(params.body && !(0, _utils.isString)(params.body))) {
|
|
455
|
-
_context6.next =
|
|
455
|
+
_context6.next = 7;
|
|
456
456
|
break;
|
|
457
457
|
}
|
|
458
458
|
throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(params.body)));
|
|
459
|
-
case
|
|
460
|
-
_context6.next =
|
|
459
|
+
case 7:
|
|
460
|
+
_context6.next = 8;
|
|
461
461
|
return _Api.default.sendRequest('/messages', 'POST', params, options);
|
|
462
|
-
case
|
|
462
|
+
case 8:
|
|
463
463
|
response = _context6.sent;
|
|
464
464
|
return _context6.abrupt("return", new _Message(response === null || response === void 0 ? void 0 : response.data, options));
|
|
465
|
-
case
|
|
465
|
+
case 9:
|
|
466
466
|
case "end":
|
|
467
467
|
return _context6.stop();
|
|
468
468
|
}
|