files.com 1.0.149 → 1.0.150
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/lib/models/As2IncomingMessage.js +160 -0
- package/lib/models/As2OutgoingMessage.js +151 -0
- package/lib/models/{As2Key.js → As2Partner.js} +104 -87
- package/lib/models/As2Station.js +504 -0
- package/package.json +1 -1
- package/src/models/As2IncomingMessage.js +94 -0
- package/src/models/As2OutgoingMessage.js +85 -0
- package/src/models/As2Partner.js +233 -0
- package/src/models/As2Station.js +264 -0
- package/src/models/HistoryExport.js +2 -2
- package/src/models/HistoryExportResult.js +1 -1
- package/src/models/As2Key.js +0 -221
@@ -28,14 +28,14 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
28
28
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
29
29
|
|
30
30
|
/**
|
31
|
-
* Class
|
31
|
+
* Class As2Partner
|
32
32
|
*/
|
33
|
-
var
|
33
|
+
var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
|
34
34
|
var _this = this;
|
35
35
|
|
36
36
|
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
37
37
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
38
|
-
(0, _classCallCheck2.default)(this,
|
38
|
+
(0, _classCallCheck2.default)(this, As2Partner);
|
39
39
|
(0, _defineProperty2.default)(this, "attributes", {});
|
40
40
|
(0, _defineProperty2.default)(this, "options", {});
|
41
41
|
(0, _defineProperty2.default)(this, "isLoaded", function () {
|
@@ -47,32 +47,35 @@ var As2Key = /*#__PURE__*/(0, _createClass2.default)(function As2Key() {
|
|
47
47
|
(0, _defineProperty2.default)(this, "setId", function (value) {
|
48
48
|
_this.attributes.id = value;
|
49
49
|
});
|
50
|
-
(0, _defineProperty2.default)(this, "
|
51
|
-
return _this.attributes.
|
50
|
+
(0, _defineProperty2.default)(this, "getAs2StationId", function () {
|
51
|
+
return _this.attributes.as2_station_id;
|
52
52
|
});
|
53
|
-
(0, _defineProperty2.default)(this, "
|
54
|
-
_this.attributes.
|
53
|
+
(0, _defineProperty2.default)(this, "setAs2StationId", function (value) {
|
54
|
+
_this.attributes.as2_station_id = value;
|
55
55
|
});
|
56
|
-
(0, _defineProperty2.default)(this, "
|
57
|
-
return _this.attributes.
|
56
|
+
(0, _defineProperty2.default)(this, "getName", function () {
|
57
|
+
return _this.attributes.name;
|
58
58
|
});
|
59
|
-
(0, _defineProperty2.default)(this, "
|
60
|
-
|
59
|
+
(0, _defineProperty2.default)(this, "setName", function (value) {
|
60
|
+
_this.attributes.name = value;
|
61
61
|
});
|
62
|
-
(0, _defineProperty2.default)(this, "
|
63
|
-
_this.attributes.
|
62
|
+
(0, _defineProperty2.default)(this, "getUri", function () {
|
63
|
+
return _this.attributes.uri;
|
64
64
|
});
|
65
|
-
(0, _defineProperty2.default)(this, "
|
66
|
-
|
65
|
+
(0, _defineProperty2.default)(this, "setUri", function (value) {
|
66
|
+
_this.attributes.uri = value;
|
67
67
|
});
|
68
|
-
(0, _defineProperty2.default)(this, "
|
69
|
-
_this.attributes.
|
68
|
+
(0, _defineProperty2.default)(this, "getPublicCertificateMd5", function () {
|
69
|
+
return _this.attributes.public_certificate_md5;
|
70
70
|
});
|
71
|
-
(0, _defineProperty2.default)(this, "
|
72
|
-
|
71
|
+
(0, _defineProperty2.default)(this, "setPublicCertificateMd5", function (value) {
|
72
|
+
_this.attributes.public_certificate_md5 = value;
|
73
73
|
});
|
74
|
-
(0, _defineProperty2.default)(this, "
|
75
|
-
_this.attributes.
|
74
|
+
(0, _defineProperty2.default)(this, "getPublicCertificate", function () {
|
75
|
+
return _this.attributes.public_certificate;
|
76
|
+
});
|
77
|
+
(0, _defineProperty2.default)(this, "setPublicCertificate", function (value) {
|
78
|
+
_this.attributes.public_certificate = value;
|
76
79
|
});
|
77
80
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
78
81
|
var params,
|
@@ -109,53 +112,51 @@ var As2Key = /*#__PURE__*/(0, _createClass2.default)(function As2Key() {
|
|
109
112
|
throw new Error("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
110
113
|
|
111
114
|
case 8:
|
112
|
-
if (!(params['
|
115
|
+
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
|
113
116
|
_context.next = 10;
|
114
117
|
break;
|
115
118
|
}
|
116
119
|
|
117
|
-
throw new Error("Bad parameter:
|
120
|
+
throw new Error("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(name)));
|
118
121
|
|
119
122
|
case 10:
|
120
|
-
if (params['
|
121
|
-
_context.next =
|
123
|
+
if (!(params['uri'] && !(0, _utils.isString)(params['uri']))) {
|
124
|
+
_context.next = 12;
|
122
125
|
break;
|
123
126
|
}
|
124
127
|
|
125
|
-
|
126
|
-
|
128
|
+
throw new Error("Bad parameter: uri must be of type String, received ".concat((0, _utils.getType)(uri)));
|
129
|
+
|
130
|
+
case 12:
|
131
|
+
if (!(params['public_certificate'] && !(0, _utils.isString)(params['public_certificate']))) {
|
132
|
+
_context.next = 14;
|
127
133
|
break;
|
128
134
|
}
|
129
135
|
|
130
|
-
|
131
|
-
_context.next = 16;
|
132
|
-
break;
|
133
|
-
|
134
|
-
case 15:
|
135
|
-
throw new Error('Parameter missing: id');
|
136
|
+
throw new Error("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(public_certificate)));
|
136
137
|
|
137
|
-
case
|
138
|
-
if (params['
|
139
|
-
_context.next =
|
138
|
+
case 14:
|
139
|
+
if (params['id']) {
|
140
|
+
_context.next = 20;
|
140
141
|
break;
|
141
142
|
}
|
142
143
|
|
143
|
-
if (!_this.attributes.
|
144
|
-
_context.next =
|
144
|
+
if (!_this.attributes.id) {
|
145
|
+
_context.next = 19;
|
145
146
|
break;
|
146
147
|
}
|
147
148
|
|
148
|
-
params['
|
149
|
-
_context.next =
|
149
|
+
params['id'] = _this.id;
|
150
|
+
_context.next = 20;
|
150
151
|
break;
|
151
152
|
|
152
|
-
case
|
153
|
-
throw new Error('Parameter missing:
|
153
|
+
case 19:
|
154
|
+
throw new Error('Parameter missing: id');
|
154
155
|
|
155
|
-
case
|
156
|
-
return _context.abrupt("return", _Api.default.sendRequest("/
|
156
|
+
case 20:
|
157
|
+
return _context.abrupt("return", _Api.default.sendRequest("/as2_partners/".concat(params['id']), 'PATCH', params, _this.options));
|
157
158
|
|
158
|
-
case
|
159
|
+
case 21:
|
159
160
|
case "end":
|
160
161
|
return _context.stop();
|
161
162
|
}
|
@@ -215,7 +216,7 @@ var As2Key = /*#__PURE__*/(0, _createClass2.default)(function As2Key() {
|
|
215
216
|
throw new Error('Parameter missing: id');
|
216
217
|
|
217
218
|
case 14:
|
218
|
-
return _context2.abrupt("return", _Api.default.sendRequest("/
|
219
|
+
return _context2.abrupt("return", _Api.default.sendRequest("/as2_partners/".concat(params['id']), 'DELETE', params, _this.options));
|
219
220
|
|
220
221
|
case 15:
|
221
222
|
case "end":
|
@@ -232,7 +233,7 @@ var As2Key = /*#__PURE__*/(0, _createClass2.default)(function As2Key() {
|
|
232
233
|
if (_this.attributes['id']) {
|
233
234
|
return _this.update(_this.attributes);
|
234
235
|
} else {
|
235
|
-
var newObject =
|
236
|
+
var newObject = As2Partner.create(_this.attributes, _this.options);
|
236
237
|
_this.attributes = _objectSpread({}, newObject.attributes);
|
237
238
|
return true;
|
238
239
|
}
|
@@ -251,7 +252,7 @@ var As2Key = /*#__PURE__*/(0, _createClass2.default)(function As2Key() {
|
|
251
252
|
});
|
252
253
|
this.options = _objectSpread({}, options);
|
253
254
|
});
|
254
|
-
(0, _defineProperty2.default)(
|
255
|
+
(0, _defineProperty2.default)(As2Partner, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
255
256
|
var _response$data;
|
256
257
|
|
257
258
|
var params,
|
@@ -265,52 +266,44 @@ var As2Key = /*#__PURE__*/(0, _createClass2.default)(function As2Key() {
|
|
265
266
|
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
266
267
|
options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
267
268
|
|
268
|
-
if (!(params['
|
269
|
+
if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
|
269
270
|
_context3.next = 4;
|
270
271
|
break;
|
271
272
|
}
|
272
273
|
|
273
|
-
throw new Error("Bad parameter:
|
274
|
+
throw new Error("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(cursor)));
|
274
275
|
|
275
276
|
case 4:
|
276
|
-
if (!(params['
|
277
|
+
if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
|
277
278
|
_context3.next = 6;
|
278
279
|
break;
|
279
280
|
}
|
280
281
|
|
281
|
-
throw new Error("Bad parameter:
|
282
|
+
throw new Error("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(per_page)));
|
282
283
|
|
283
284
|
case 6:
|
284
|
-
|
285
|
-
|
286
|
-
break;
|
287
|
-
}
|
288
|
-
|
289
|
-
throw new Error("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(per_page)));
|
285
|
+
_context3.next = 8;
|
286
|
+
return _Api.default.sendRequest("/as2_partners", 'GET', params, options);
|
290
287
|
|
291
288
|
case 8:
|
292
|
-
_context3.next = 10;
|
293
|
-
return _Api.default.sendRequest("/as2_keys", 'GET', params, options);
|
294
|
-
|
295
|
-
case 10:
|
296
289
|
response = _context3.sent;
|
297
290
|
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) {
|
298
|
-
return new
|
291
|
+
return new As2Partner(obj, options);
|
299
292
|
})) || []);
|
300
293
|
|
301
|
-
case
|
294
|
+
case 10:
|
302
295
|
case "end":
|
303
296
|
return _context3.stop();
|
304
297
|
}
|
305
298
|
}
|
306
299
|
}, _callee3);
|
307
300
|
})));
|
308
|
-
(0, _defineProperty2.default)(
|
301
|
+
(0, _defineProperty2.default)(As2Partner, "all", function () {
|
309
302
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
310
303
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
311
|
-
return
|
304
|
+
return As2Partner.list(params, options);
|
312
305
|
});
|
313
|
-
(0, _defineProperty2.default)(
|
306
|
+
(0, _defineProperty2.default)(As2Partner, "find", /*#__PURE__*/function () {
|
314
307
|
var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(id) {
|
315
308
|
var params,
|
316
309
|
options,
|
@@ -350,11 +343,11 @@ var As2Key = /*#__PURE__*/(0, _createClass2.default)(function As2Key() {
|
|
350
343
|
|
351
344
|
case 9:
|
352
345
|
_context4.next = 11;
|
353
|
-
return _Api.default.sendRequest("/
|
346
|
+
return _Api.default.sendRequest("/as2_partners/".concat(params['id']), 'GET', params, options);
|
354
347
|
|
355
348
|
case 11:
|
356
349
|
response = _context4.sent;
|
357
|
-
return _context4.abrupt("return", new
|
350
|
+
return _context4.abrupt("return", new As2Partner(response === null || response === void 0 ? void 0 : response.data, options));
|
358
351
|
|
359
352
|
case 13:
|
360
353
|
case "end":
|
@@ -368,12 +361,12 @@ var As2Key = /*#__PURE__*/(0, _createClass2.default)(function As2Key() {
|
|
368
361
|
return _ref6.apply(this, arguments);
|
369
362
|
};
|
370
363
|
}());
|
371
|
-
(0, _defineProperty2.default)(
|
364
|
+
(0, _defineProperty2.default)(As2Partner, "get", function (id) {
|
372
365
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
373
366
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
374
|
-
return
|
367
|
+
return As2Partner.find(id, params, options);
|
375
368
|
});
|
376
|
-
(0, _defineProperty2.default)(
|
369
|
+
(0, _defineProperty2.default)(As2Partner, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
377
370
|
var params,
|
378
371
|
options,
|
379
372
|
response,
|
@@ -385,59 +378,83 @@ var As2Key = /*#__PURE__*/(0, _createClass2.default)(function As2Key() {
|
|
385
378
|
params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
386
379
|
options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
387
380
|
|
388
|
-
if (params['
|
381
|
+
if (params['name']) {
|
389
382
|
_context5.next = 4;
|
390
383
|
break;
|
391
384
|
}
|
392
385
|
|
393
|
-
throw new Error('Parameter missing:
|
386
|
+
throw new Error('Parameter missing: name');
|
394
387
|
|
395
388
|
case 4:
|
396
|
-
if (params['
|
389
|
+
if (params['uri']) {
|
397
390
|
_context5.next = 6;
|
398
391
|
break;
|
399
392
|
}
|
400
393
|
|
401
|
-
throw new Error('Parameter missing:
|
394
|
+
throw new Error('Parameter missing: uri');
|
402
395
|
|
403
396
|
case 6:
|
404
|
-
if (
|
397
|
+
if (params['public_certificate']) {
|
405
398
|
_context5.next = 8;
|
406
399
|
break;
|
407
400
|
}
|
408
401
|
|
409
|
-
throw new Error(
|
402
|
+
throw new Error('Parameter missing: public_certificate');
|
410
403
|
|
411
404
|
case 8:
|
412
|
-
if (
|
405
|
+
if (params['as2_station_id']) {
|
413
406
|
_context5.next = 10;
|
414
407
|
break;
|
415
408
|
}
|
416
409
|
|
417
|
-
throw new Error(
|
410
|
+
throw new Error('Parameter missing: as2_station_id');
|
418
411
|
|
419
412
|
case 10:
|
420
|
-
if (!(params['
|
413
|
+
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
|
421
414
|
_context5.next = 12;
|
422
415
|
break;
|
423
416
|
}
|
424
417
|
|
425
|
-
throw new Error("Bad parameter:
|
418
|
+
throw new Error("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(name)));
|
426
419
|
|
427
420
|
case 12:
|
428
|
-
|
429
|
-
|
421
|
+
if (!(params['uri'] && !(0, _utils.isString)(params['uri']))) {
|
422
|
+
_context5.next = 14;
|
423
|
+
break;
|
424
|
+
}
|
425
|
+
|
426
|
+
throw new Error("Bad parameter: uri must be of type String, received ".concat((0, _utils.getType)(uri)));
|
430
427
|
|
431
428
|
case 14:
|
432
|
-
|
433
|
-
|
429
|
+
if (!(params['public_certificate'] && !(0, _utils.isString)(params['public_certificate']))) {
|
430
|
+
_context5.next = 16;
|
431
|
+
break;
|
432
|
+
}
|
433
|
+
|
434
|
+
throw new Error("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(public_certificate)));
|
434
435
|
|
435
436
|
case 16:
|
437
|
+
if (!(params['as2_station_id'] && !(0, _utils.isInt)(params['as2_station_id']))) {
|
438
|
+
_context5.next = 18;
|
439
|
+
break;
|
440
|
+
}
|
441
|
+
|
442
|
+
throw new Error("Bad parameter: as2_station_id must be of type Int, received ".concat((0, _utils.getType)(as2_station_id)));
|
443
|
+
|
444
|
+
case 18:
|
445
|
+
_context5.next = 20;
|
446
|
+
return _Api.default.sendRequest("/as2_partners", 'POST', params, options);
|
447
|
+
|
448
|
+
case 20:
|
449
|
+
response = _context5.sent;
|
450
|
+
return _context5.abrupt("return", new As2Partner(response === null || response === void 0 ? void 0 : response.data, options));
|
451
|
+
|
452
|
+
case 22:
|
436
453
|
case "end":
|
437
454
|
return _context5.stop();
|
438
455
|
}
|
439
456
|
}
|
440
457
|
}, _callee5);
|
441
458
|
})));
|
442
|
-
var _default =
|
459
|
+
var _default = As2Partner;
|
443
460
|
exports.default = _default;
|