files.com 1.0.235 → 1.0.237
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/Bundle.md +9 -2
- package/docs/models/BundleNotification.md +35 -0
- package/docs/models/BundleRegistration.md +3 -1
- package/docs/models/InboxRegistration.md +3 -1
- package/docs/models/Site.md +2 -0
- package/lib/Api.js +153 -159
- package/lib/isomorphic/File.node.js +24 -28
- package/lib/models/ActionNotificationExport.js +97 -101
- package/lib/models/ActionNotificationExportResult.js +44 -46
- package/lib/models/ActionWebhookFailure.js +42 -44
- package/lib/models/ApiKey.js +271 -287
- package/lib/models/App.js +26 -28
- package/lib/models/As2IncomingMessage.js +32 -34
- package/lib/models/As2OutgoingMessage.js +32 -34
- package/lib/models/As2Partner.js +231 -241
- package/lib/models/As2Station.js +219 -229
- package/lib/models/Automation.js +333 -343
- package/lib/models/AutomationRun.js +75 -79
- package/lib/models/BandwidthSnapshot.js +26 -28
- package/lib/models/Behavior.js +323 -337
- package/lib/models/Bundle.js +381 -387
- package/lib/models/BundleDownload.js +38 -40
- package/lib/models/BundleNotification.js +223 -173
- package/lib/models/BundleRecipient.js +104 -108
- package/lib/models/BundleRegistration.js +41 -40
- package/lib/models/Clickwrap.js +213 -223
- package/lib/models/DnsRecord.js +26 -28
- package/lib/models/ExternalEvent.js +93 -99
- package/lib/models/File.js +726 -766
- package/lib/models/FileComment.js +180 -188
- package/lib/models/FileCommentReaction.js +84 -88
- package/lib/models/FileMigration.js +31 -33
- package/lib/models/Folder.js +94 -98
- package/lib/models/FormFieldSet.js +189 -199
- package/lib/models/Group.js +207 -217
- package/lib/models/GroupUser.js +230 -238
- package/lib/models/History.js +266 -276
- package/lib/models/HistoryExport.js +175 -179
- package/lib/models/HistoryExportResult.js +44 -46
- package/lib/models/InboxRecipient.js +104 -108
- package/lib/models/InboxRegistration.js +35 -34
- package/lib/models/InboxUpload.js +38 -40
- package/lib/models/Invoice.js +57 -61
- package/lib/models/IpAddress.js +78 -84
- package/lib/models/Lock.js +148 -154
- package/lib/models/Message.js +267 -277
- package/lib/models/MessageComment.js +207 -217
- package/lib/models/MessageCommentReaction.js +147 -155
- package/lib/models/MessageReaction.js +147 -155
- package/lib/models/Notification.js +255 -265
- package/lib/models/Payment.js +57 -61
- package/lib/models/Permission.js +128 -134
- package/lib/models/Priority.js +45 -47
- package/lib/models/Project.js +183 -193
- package/lib/models/PublicKey.js +207 -217
- package/lib/models/RemoteBandwidthSnapshot.js +26 -28
- package/lib/models/RemoteServer.js +805 -819
- package/lib/models/Request.js +166 -174
- package/lib/models/Session.js +47 -51
- package/lib/models/SettingsChange.js +26 -28
- package/lib/models/SftpHostKey.js +177 -187
- package/lib/models/Site.js +415 -418
- package/lib/models/SsoStrategy.js +99 -105
- package/lib/models/Style.js +127 -133
- package/lib/models/UsageDailySnapshot.js +26 -28
- package/lib/models/UsageSnapshot.js +26 -28
- package/lib/models/User.js +587 -603
- package/lib/models/UserCipherUse.js +32 -34
- package/lib/models/UserRequest.js +147 -155
- package/lib/models/WebhookTest.js +54 -56
- package/package.json +1 -1
- package/src/models/Bundle.js +10 -1
- package/src/models/BundleNotification.js +39 -1
- package/src/models/BundleRegistration.js +3 -0
- package/src/models/InboxRegistration.js +3 -0
- package/src/models/Site.js +3 -0
package/lib/models/Message.js
CHANGED
@@ -72,112 +72,110 @@ var Message = /*#__PURE__*/(0, _createClass2.default)(function Message() {
|
|
72
72
|
response,
|
73
73
|
_args = arguments;
|
74
74
|
return _regenerator.default.wrap(function _callee$(_context) {
|
75
|
-
while (1) {
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
if (params['id']) {
|
117
|
-
_context.next = 20;
|
118
|
-
break;
|
119
|
-
}
|
120
|
-
if (!_this.attributes.id) {
|
121
|
-
_context.next = 19;
|
122
|
-
break;
|
123
|
-
}
|
124
|
-
params['id'] = _this.id;
|
75
|
+
while (1) switch (_context.prev = _context.next) {
|
76
|
+
case 0:
|
77
|
+
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
78
|
+
if (_this.attributes.id) {
|
79
|
+
_context.next = 3;
|
80
|
+
break;
|
81
|
+
}
|
82
|
+
throw new errors.EmptyPropertyError('Current object has no id');
|
83
|
+
case 3:
|
84
|
+
if ((0, _utils.isObject)(params)) {
|
85
|
+
_context.next = 5;
|
86
|
+
break;
|
87
|
+
}
|
88
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
89
|
+
case 5:
|
90
|
+
params.id = _this.attributes.id;
|
91
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
92
|
+
_context.next = 8;
|
93
|
+
break;
|
94
|
+
}
|
95
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
96
|
+
case 8:
|
97
|
+
if (!(params['project_id'] && !(0, _utils.isInt)(params['project_id']))) {
|
98
|
+
_context.next = 10;
|
99
|
+
break;
|
100
|
+
}
|
101
|
+
throw new errors.InvalidParameterError("Bad parameter: project_id must be of type Int, received ".concat((0, _utils.getType)(project_id)));
|
102
|
+
case 10:
|
103
|
+
if (!(params['subject'] && !(0, _utils.isString)(params['subject']))) {
|
104
|
+
_context.next = 12;
|
105
|
+
break;
|
106
|
+
}
|
107
|
+
throw new errors.InvalidParameterError("Bad parameter: subject must be of type String, received ".concat((0, _utils.getType)(subject)));
|
108
|
+
case 12:
|
109
|
+
if (!(params['body'] && !(0, _utils.isString)(params['body']))) {
|
110
|
+
_context.next = 14;
|
111
|
+
break;
|
112
|
+
}
|
113
|
+
throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(body)));
|
114
|
+
case 14:
|
115
|
+
if (params['id']) {
|
125
116
|
_context.next = 20;
|
126
117
|
break;
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
118
|
+
}
|
119
|
+
if (!_this.attributes.id) {
|
120
|
+
_context.next = 19;
|
121
|
+
break;
|
122
|
+
}
|
123
|
+
params['id'] = _this.id;
|
124
|
+
_context.next = 20;
|
125
|
+
break;
|
126
|
+
case 19:
|
127
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
128
|
+
case 20:
|
129
|
+
if (params['project_id']) {
|
139
130
|
_context.next = 26;
|
140
131
|
break;
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
132
|
+
}
|
133
|
+
if (!_this.attributes.project_id) {
|
134
|
+
_context.next = 25;
|
135
|
+
break;
|
136
|
+
}
|
137
|
+
params['project_id'] = _this.project_id;
|
138
|
+
_context.next = 26;
|
139
|
+
break;
|
140
|
+
case 25:
|
141
|
+
throw new errors.MissingParameterError('Parameter missing: project_id');
|
142
|
+
case 26:
|
143
|
+
if (params['subject']) {
|
153
144
|
_context.next = 32;
|
154
145
|
break;
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
146
|
+
}
|
147
|
+
if (!_this.attributes.subject) {
|
148
|
+
_context.next = 31;
|
149
|
+
break;
|
150
|
+
}
|
151
|
+
params['subject'] = _this.subject;
|
152
|
+
_context.next = 32;
|
153
|
+
break;
|
154
|
+
case 31:
|
155
|
+
throw new errors.MissingParameterError('Parameter missing: subject');
|
156
|
+
case 32:
|
157
|
+
if (params['body']) {
|
167
158
|
_context.next = 38;
|
168
159
|
break;
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
160
|
+
}
|
161
|
+
if (!_this.attributes.body) {
|
162
|
+
_context.next = 37;
|
163
|
+
break;
|
164
|
+
}
|
165
|
+
params['body'] = _this.body;
|
166
|
+
_context.next = 38;
|
167
|
+
break;
|
168
|
+
case 37:
|
169
|
+
throw new errors.MissingParameterError('Parameter missing: body');
|
170
|
+
case 38:
|
171
|
+
_context.next = 40;
|
172
|
+
return _Api.default.sendRequest("/messages/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
|
173
|
+
case 40:
|
174
|
+
response = _context.sent;
|
175
|
+
return _context.abrupt("return", new Message(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
176
|
+
case 42:
|
177
|
+
case "end":
|
178
|
+
return _context.stop();
|
181
179
|
}
|
182
180
|
}, _callee);
|
183
181
|
})));
|
@@ -186,52 +184,50 @@ var Message = /*#__PURE__*/(0, _createClass2.default)(function Message() {
|
|
186
184
|
response,
|
187
185
|
_args2 = arguments;
|
188
186
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
189
|
-
while (1) {
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
if (params['id']) {
|
213
|
-
_context2.next = 14;
|
214
|
-
break;
|
215
|
-
}
|
216
|
-
if (!_this.attributes.id) {
|
217
|
-
_context2.next = 13;
|
218
|
-
break;
|
219
|
-
}
|
220
|
-
params['id'] = _this.id;
|
187
|
+
while (1) switch (_context2.prev = _context2.next) {
|
188
|
+
case 0:
|
189
|
+
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
190
|
+
if (_this.attributes.id) {
|
191
|
+
_context2.next = 3;
|
192
|
+
break;
|
193
|
+
}
|
194
|
+
throw new errors.EmptyPropertyError('Current object has no id');
|
195
|
+
case 3:
|
196
|
+
if ((0, _utils.isObject)(params)) {
|
197
|
+
_context2.next = 5;
|
198
|
+
break;
|
199
|
+
}
|
200
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
201
|
+
case 5:
|
202
|
+
params.id = _this.attributes.id;
|
203
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
204
|
+
_context2.next = 8;
|
205
|
+
break;
|
206
|
+
}
|
207
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
208
|
+
case 8:
|
209
|
+
if (params['id']) {
|
221
210
|
_context2.next = 14;
|
222
211
|
break;
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
212
|
+
}
|
213
|
+
if (!_this.attributes.id) {
|
214
|
+
_context2.next = 13;
|
215
|
+
break;
|
216
|
+
}
|
217
|
+
params['id'] = _this.id;
|
218
|
+
_context2.next = 14;
|
219
|
+
break;
|
220
|
+
case 13:
|
221
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
222
|
+
case 14:
|
223
|
+
_context2.next = 16;
|
224
|
+
return _Api.default.sendRequest("/messages/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
|
225
|
+
case 16:
|
226
|
+
response = _context2.sent;
|
227
|
+
return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
228
|
+
case 18:
|
229
|
+
case "end":
|
230
|
+
return _context2.stop();
|
235
231
|
}
|
236
232
|
}, _callee2);
|
237
233
|
})));
|
@@ -268,52 +264,50 @@ var Message = /*#__PURE__*/(0, _createClass2.default)(function Message() {
|
|
268
264
|
response,
|
269
265
|
_args3 = arguments;
|
270
266
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
271
|
-
while (1) {
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
return
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
return _context3.stop();
|
316
|
-
}
|
267
|
+
while (1) switch (_context3.prev = _context3.next) {
|
268
|
+
case 0:
|
269
|
+
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
270
|
+
options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
271
|
+
if (params['project_id']) {
|
272
|
+
_context3.next = 4;
|
273
|
+
break;
|
274
|
+
}
|
275
|
+
throw new errors.MissingParameterError('Parameter missing: project_id');
|
276
|
+
case 4:
|
277
|
+
if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
|
278
|
+
_context3.next = 6;
|
279
|
+
break;
|
280
|
+
}
|
281
|
+
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
|
282
|
+
case 6:
|
283
|
+
if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
|
284
|
+
_context3.next = 8;
|
285
|
+
break;
|
286
|
+
}
|
287
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
|
288
|
+
case 8:
|
289
|
+
if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
|
290
|
+
_context3.next = 10;
|
291
|
+
break;
|
292
|
+
}
|
293
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
|
294
|
+
case 10:
|
295
|
+
if (!(params['project_id'] && !(0, _utils.isInt)(params['project_id']))) {
|
296
|
+
_context3.next = 12;
|
297
|
+
break;
|
298
|
+
}
|
299
|
+
throw new errors.InvalidParameterError("Bad parameter: project_id must be of type Int, received ".concat((0, _utils.getType)(params['project_id'])));
|
300
|
+
case 12:
|
301
|
+
_context3.next = 14;
|
302
|
+
return _Api.default.sendRequest("/messages", 'GET', params, options);
|
303
|
+
case 14:
|
304
|
+
response = _context3.sent;
|
305
|
+
return _context3.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
306
|
+
return new Message(obj, options);
|
307
|
+
})) || []);
|
308
|
+
case 16:
|
309
|
+
case "end":
|
310
|
+
return _context3.stop();
|
317
311
|
}
|
318
312
|
}, _callee3);
|
319
313
|
})));
|
@@ -329,39 +323,37 @@ var Message = /*#__PURE__*/(0, _createClass2.default)(function Message() {
|
|
329
323
|
response,
|
330
324
|
_args4 = arguments;
|
331
325
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
332
|
-
while (1) {
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
return _context4.stop();
|
364
|
-
}
|
326
|
+
while (1) switch (_context4.prev = _context4.next) {
|
327
|
+
case 0:
|
328
|
+
params = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
329
|
+
options = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
|
330
|
+
if ((0, _utils.isObject)(params)) {
|
331
|
+
_context4.next = 4;
|
332
|
+
break;
|
333
|
+
}
|
334
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
335
|
+
case 4:
|
336
|
+
params['id'] = id;
|
337
|
+
if (params['id']) {
|
338
|
+
_context4.next = 7;
|
339
|
+
break;
|
340
|
+
}
|
341
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
342
|
+
case 7:
|
343
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
344
|
+
_context4.next = 9;
|
345
|
+
break;
|
346
|
+
}
|
347
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
|
348
|
+
case 9:
|
349
|
+
_context4.next = 11;
|
350
|
+
return _Api.default.sendRequest("/messages/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
|
351
|
+
case 11:
|
352
|
+
response = _context4.sent;
|
353
|
+
return _context4.abrupt("return", new Message(response === null || response === void 0 ? void 0 : response.data, options));
|
354
|
+
case 13:
|
355
|
+
case "end":
|
356
|
+
return _context4.stop();
|
365
357
|
}
|
366
358
|
}, _callee4);
|
367
359
|
}));
|
@@ -380,62 +372,60 @@ var Message = /*#__PURE__*/(0, _createClass2.default)(function Message() {
|
|
380
372
|
response,
|
381
373
|
_args5 = arguments;
|
382
374
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
383
|
-
while (1) {
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
return _context5.stop();
|
438
|
-
}
|
375
|
+
while (1) switch (_context5.prev = _context5.next) {
|
376
|
+
case 0:
|
377
|
+
params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
378
|
+
options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
379
|
+
if (params['project_id']) {
|
380
|
+
_context5.next = 4;
|
381
|
+
break;
|
382
|
+
}
|
383
|
+
throw new errors.MissingParameterError('Parameter missing: project_id');
|
384
|
+
case 4:
|
385
|
+
if (params['subject']) {
|
386
|
+
_context5.next = 6;
|
387
|
+
break;
|
388
|
+
}
|
389
|
+
throw new errors.MissingParameterError('Parameter missing: subject');
|
390
|
+
case 6:
|
391
|
+
if (params['body']) {
|
392
|
+
_context5.next = 8;
|
393
|
+
break;
|
394
|
+
}
|
395
|
+
throw new errors.MissingParameterError('Parameter missing: body');
|
396
|
+
case 8:
|
397
|
+
if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
|
398
|
+
_context5.next = 10;
|
399
|
+
break;
|
400
|
+
}
|
401
|
+
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
|
402
|
+
case 10:
|
403
|
+
if (!(params['project_id'] && !(0, _utils.isInt)(params['project_id']))) {
|
404
|
+
_context5.next = 12;
|
405
|
+
break;
|
406
|
+
}
|
407
|
+
throw new errors.InvalidParameterError("Bad parameter: project_id must be of type Int, received ".concat((0, _utils.getType)(params['project_id'])));
|
408
|
+
case 12:
|
409
|
+
if (!(params['subject'] && !(0, _utils.isString)(params['subject']))) {
|
410
|
+
_context5.next = 14;
|
411
|
+
break;
|
412
|
+
}
|
413
|
+
throw new errors.InvalidParameterError("Bad parameter: subject must be of type String, received ".concat((0, _utils.getType)(params['subject'])));
|
414
|
+
case 14:
|
415
|
+
if (!(params['body'] && !(0, _utils.isString)(params['body']))) {
|
416
|
+
_context5.next = 16;
|
417
|
+
break;
|
418
|
+
}
|
419
|
+
throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(params['body'])));
|
420
|
+
case 16:
|
421
|
+
_context5.next = 18;
|
422
|
+
return _Api.default.sendRequest("/messages", 'POST', params, options);
|
423
|
+
case 18:
|
424
|
+
response = _context5.sent;
|
425
|
+
return _context5.abrupt("return", new Message(response === null || response === void 0 ? void 0 : response.data, options));
|
426
|
+
case 20:
|
427
|
+
case "end":
|
428
|
+
return _context5.stop();
|
439
429
|
}
|
440
430
|
}, _callee5);
|
441
431
|
})));
|