files.com 1.0.165 → 1.0.166
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/lib/models/As2Partner.js +30 -0
- package/lib/models/As2Station.js +59 -77
- package/package.json +1 -1
- package/src/models/As2Partner.js +35 -0
- package/src/models/As2Station.js +42 -33
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.166
|
package/lib/models/As2Partner.js
CHANGED
@@ -71,6 +71,36 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
|
|
71
71
|
(0, _defineProperty2.default)(this, "setPublicCertificateMd5", function (value) {
|
72
72
|
_this.attributes.public_certificate_md5 = value;
|
73
73
|
});
|
74
|
+
(0, _defineProperty2.default)(this, "getPublicCertificateSubject", function () {
|
75
|
+
return _this.attributes.public_certificate_subject;
|
76
|
+
});
|
77
|
+
(0, _defineProperty2.default)(this, "setPublicCertificateSubject", function (value) {
|
78
|
+
_this.attributes.public_certificate_subject = value;
|
79
|
+
});
|
80
|
+
(0, _defineProperty2.default)(this, "getPublicCertificateIssuer", function () {
|
81
|
+
return _this.attributes.public_certificate_issuer;
|
82
|
+
});
|
83
|
+
(0, _defineProperty2.default)(this, "setPublicCertificateIssuer", function (value) {
|
84
|
+
_this.attributes.public_certificate_issuer = value;
|
85
|
+
});
|
86
|
+
(0, _defineProperty2.default)(this, "getPublicCertificateSerial", function () {
|
87
|
+
return _this.attributes.public_certificate_serial;
|
88
|
+
});
|
89
|
+
(0, _defineProperty2.default)(this, "setPublicCertificateSerial", function (value) {
|
90
|
+
_this.attributes.public_certificate_serial = value;
|
91
|
+
});
|
92
|
+
(0, _defineProperty2.default)(this, "getPublicCertificateNotBefore", function () {
|
93
|
+
return _this.attributes.public_certificate_not_before;
|
94
|
+
});
|
95
|
+
(0, _defineProperty2.default)(this, "setPublicCertificateNotBefore", function (value) {
|
96
|
+
_this.attributes.public_certificate_not_before = value;
|
97
|
+
});
|
98
|
+
(0, _defineProperty2.default)(this, "getPublicCertificateNotAfter", function () {
|
99
|
+
return _this.attributes.public_certificate_not_after;
|
100
|
+
});
|
101
|
+
(0, _defineProperty2.default)(this, "setPublicCertificateNotAfter", function (value) {
|
102
|
+
_this.attributes.public_certificate_not_after = value;
|
103
|
+
});
|
74
104
|
(0, _defineProperty2.default)(this, "getPublicCertificate", function () {
|
75
105
|
return _this.attributes.public_certificate;
|
76
106
|
});
|
package/lib/models/As2Station.js
CHANGED
@@ -65,12 +65,6 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
|
|
65
65
|
(0, _defineProperty2.default)(this, "setDomain", function (value) {
|
66
66
|
_this.attributes.domain = value;
|
67
67
|
});
|
68
|
-
(0, _defineProperty2.default)(this, "getPublicCertificate", function () {
|
69
|
-
return _this.attributes.public_certificate;
|
70
|
-
});
|
71
|
-
(0, _defineProperty2.default)(this, "setPublicCertificate", function (value) {
|
72
|
-
_this.attributes.public_certificate = value;
|
73
|
-
});
|
74
68
|
(0, _defineProperty2.default)(this, "getPublicCertificateMd5", function () {
|
75
69
|
return _this.attributes.public_certificate_md5;
|
76
70
|
});
|
@@ -83,6 +77,42 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
|
|
83
77
|
(0, _defineProperty2.default)(this, "setPrivateKeyMd5", function (value) {
|
84
78
|
_this.attributes.private_key_md5 = value;
|
85
79
|
});
|
80
|
+
(0, _defineProperty2.default)(this, "getPublicCertificateSubject", function () {
|
81
|
+
return _this.attributes.public_certificate_subject;
|
82
|
+
});
|
83
|
+
(0, _defineProperty2.default)(this, "setPublicCertificateSubject", function (value) {
|
84
|
+
_this.attributes.public_certificate_subject = value;
|
85
|
+
});
|
86
|
+
(0, _defineProperty2.default)(this, "getPublicCertificateIssuer", function () {
|
87
|
+
return _this.attributes.public_certificate_issuer;
|
88
|
+
});
|
89
|
+
(0, _defineProperty2.default)(this, "setPublicCertificateIssuer", function (value) {
|
90
|
+
_this.attributes.public_certificate_issuer = value;
|
91
|
+
});
|
92
|
+
(0, _defineProperty2.default)(this, "getPublicCertificateSerial", function () {
|
93
|
+
return _this.attributes.public_certificate_serial;
|
94
|
+
});
|
95
|
+
(0, _defineProperty2.default)(this, "setPublicCertificateSerial", function (value) {
|
96
|
+
_this.attributes.public_certificate_serial = value;
|
97
|
+
});
|
98
|
+
(0, _defineProperty2.default)(this, "getPublicCertificateNotBefore", function () {
|
99
|
+
return _this.attributes.public_certificate_not_before;
|
100
|
+
});
|
101
|
+
(0, _defineProperty2.default)(this, "setPublicCertificateNotBefore", function (value) {
|
102
|
+
_this.attributes.public_certificate_not_before = value;
|
103
|
+
});
|
104
|
+
(0, _defineProperty2.default)(this, "getPublicCertificateNotAfter", function () {
|
105
|
+
return _this.attributes.public_certificate_not_after;
|
106
|
+
});
|
107
|
+
(0, _defineProperty2.default)(this, "setPublicCertificateNotAfter", function (value) {
|
108
|
+
_this.attributes.public_certificate_not_after = value;
|
109
|
+
});
|
110
|
+
(0, _defineProperty2.default)(this, "getPublicCertificate", function () {
|
111
|
+
return _this.attributes.public_certificate;
|
112
|
+
});
|
113
|
+
(0, _defineProperty2.default)(this, "setPublicCertificate", function (value) {
|
114
|
+
_this.attributes.public_certificate = value;
|
115
|
+
});
|
86
116
|
(0, _defineProperty2.default)(this, "getPrivateKey", function () {
|
87
117
|
return _this.attributes.private_key;
|
88
118
|
});
|
@@ -132,59 +162,43 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
|
|
132
162
|
throw new Error("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(name)));
|
133
163
|
|
134
164
|
case 10:
|
135
|
-
if (!(params['domain'] && !(0, _utils.isString)(params['domain']))) {
|
136
|
-
_context.next = 12;
|
137
|
-
break;
|
138
|
-
}
|
139
|
-
|
140
|
-
throw new Error("Bad parameter: domain must be of type String, received ".concat((0, _utils.getType)(domain)));
|
141
|
-
|
142
|
-
case 12:
|
143
|
-
if (!(params['uri'] && !(0, _utils.isString)(params['uri']))) {
|
144
|
-
_context.next = 14;
|
145
|
-
break;
|
146
|
-
}
|
147
|
-
|
148
|
-
throw new Error("Bad parameter: uri must be of type String, received ".concat((0, _utils.getType)(uri)));
|
149
|
-
|
150
|
-
case 14:
|
151
165
|
if (!(params['public_certificate'] && !(0, _utils.isString)(params['public_certificate']))) {
|
152
|
-
_context.next =
|
166
|
+
_context.next = 12;
|
153
167
|
break;
|
154
168
|
}
|
155
169
|
|
156
170
|
throw new Error("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(public_certificate)));
|
157
171
|
|
158
|
-
case
|
172
|
+
case 12:
|
159
173
|
if (!(params['private_key'] && !(0, _utils.isString)(params['private_key']))) {
|
160
|
-
_context.next =
|
174
|
+
_context.next = 14;
|
161
175
|
break;
|
162
176
|
}
|
163
177
|
|
164
178
|
throw new Error("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(private_key)));
|
165
179
|
|
166
|
-
case
|
180
|
+
case 14:
|
167
181
|
if (params['id']) {
|
168
|
-
_context.next =
|
182
|
+
_context.next = 20;
|
169
183
|
break;
|
170
184
|
}
|
171
185
|
|
172
186
|
if (!_this.attributes.id) {
|
173
|
-
_context.next =
|
187
|
+
_context.next = 19;
|
174
188
|
break;
|
175
189
|
}
|
176
190
|
|
177
191
|
params['id'] = _this.id;
|
178
|
-
_context.next =
|
192
|
+
_context.next = 20;
|
179
193
|
break;
|
180
194
|
|
181
|
-
case
|
195
|
+
case 19:
|
182
196
|
throw new Error('Parameter missing: id');
|
183
197
|
|
184
|
-
case
|
198
|
+
case 20:
|
185
199
|
return _context.abrupt("return", _Api.default.sendRequest("/as2_stations/".concat(params['id']), 'PATCH', params, _this.options));
|
186
200
|
|
187
|
-
case
|
201
|
+
case 21:
|
188
202
|
case "end":
|
189
203
|
return _context.stop();
|
190
204
|
}
|
@@ -414,86 +428,54 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
|
|
414
428
|
throw new Error('Parameter missing: name');
|
415
429
|
|
416
430
|
case 4:
|
417
|
-
if (params['domain']) {
|
418
|
-
_context5.next = 6;
|
419
|
-
break;
|
420
|
-
}
|
421
|
-
|
422
|
-
throw new Error('Parameter missing: domain');
|
423
|
-
|
424
|
-
case 6:
|
425
|
-
if (params['uri']) {
|
426
|
-
_context5.next = 8;
|
427
|
-
break;
|
428
|
-
}
|
429
|
-
|
430
|
-
throw new Error('Parameter missing: uri');
|
431
|
-
|
432
|
-
case 8:
|
433
431
|
if (params['public_certificate']) {
|
434
|
-
_context5.next =
|
432
|
+
_context5.next = 6;
|
435
433
|
break;
|
436
434
|
}
|
437
435
|
|
438
436
|
throw new Error('Parameter missing: public_certificate');
|
439
437
|
|
440
|
-
case
|
438
|
+
case 6:
|
441
439
|
if (params['private_key']) {
|
442
|
-
_context5.next =
|
440
|
+
_context5.next = 8;
|
443
441
|
break;
|
444
442
|
}
|
445
443
|
|
446
444
|
throw new Error('Parameter missing: private_key');
|
447
445
|
|
448
|
-
case
|
446
|
+
case 8:
|
449
447
|
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
|
450
|
-
_context5.next =
|
448
|
+
_context5.next = 10;
|
451
449
|
break;
|
452
450
|
}
|
453
451
|
|
454
452
|
throw new Error("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(name)));
|
455
453
|
|
456
|
-
case
|
457
|
-
if (!(params['domain'] && !(0, _utils.isString)(params['domain']))) {
|
458
|
-
_context5.next = 16;
|
459
|
-
break;
|
460
|
-
}
|
461
|
-
|
462
|
-
throw new Error("Bad parameter: domain must be of type String, received ".concat((0, _utils.getType)(domain)));
|
463
|
-
|
464
|
-
case 16:
|
465
|
-
if (!(params['uri'] && !(0, _utils.isString)(params['uri']))) {
|
466
|
-
_context5.next = 18;
|
467
|
-
break;
|
468
|
-
}
|
469
|
-
|
470
|
-
throw new Error("Bad parameter: uri must be of type String, received ".concat((0, _utils.getType)(uri)));
|
471
|
-
|
472
|
-
case 18:
|
454
|
+
case 10:
|
473
455
|
if (!(params['public_certificate'] && !(0, _utils.isString)(params['public_certificate']))) {
|
474
|
-
_context5.next =
|
456
|
+
_context5.next = 12;
|
475
457
|
break;
|
476
458
|
}
|
477
459
|
|
478
460
|
throw new Error("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(public_certificate)));
|
479
461
|
|
480
|
-
case
|
462
|
+
case 12:
|
481
463
|
if (!(params['private_key'] && !(0, _utils.isString)(params['private_key']))) {
|
482
|
-
_context5.next =
|
464
|
+
_context5.next = 14;
|
483
465
|
break;
|
484
466
|
}
|
485
467
|
|
486
468
|
throw new Error("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(private_key)));
|
487
469
|
|
488
|
-
case
|
489
|
-
_context5.next =
|
470
|
+
case 14:
|
471
|
+
_context5.next = 16;
|
490
472
|
return _Api.default.sendRequest("/as2_stations", 'POST', params, options);
|
491
473
|
|
492
|
-
case
|
474
|
+
case 16:
|
493
475
|
response = _context5.sent;
|
494
476
|
return _context5.abrupt("return", new As2Station(response === null || response === void 0 ? void 0 : response.data, options));
|
495
477
|
|
496
|
-
case
|
478
|
+
case 18:
|
497
479
|
case "end":
|
498
480
|
return _context5.stop();
|
499
481
|
}
|
package/package.json
CHANGED
package/src/models/As2Partner.js
CHANGED
@@ -57,6 +57,41 @@ class As2Partner {
|
|
57
57
|
this.attributes.public_certificate_md5 = value
|
58
58
|
}
|
59
59
|
|
60
|
+
// string # Subject of public certificate used for message security.
|
61
|
+
getPublicCertificateSubject = () => this.attributes.public_certificate_subject
|
62
|
+
|
63
|
+
setPublicCertificateSubject = value => {
|
64
|
+
this.attributes.public_certificate_subject = value
|
65
|
+
}
|
66
|
+
|
67
|
+
// string # Issuer of public certificate used for message security.
|
68
|
+
getPublicCertificateIssuer = () => this.attributes.public_certificate_issuer
|
69
|
+
|
70
|
+
setPublicCertificateIssuer = value => {
|
71
|
+
this.attributes.public_certificate_issuer = value
|
72
|
+
}
|
73
|
+
|
74
|
+
// string # Serial of public certificate used for message security.
|
75
|
+
getPublicCertificateSerial = () => this.attributes.public_certificate_serial
|
76
|
+
|
77
|
+
setPublicCertificateSerial = value => {
|
78
|
+
this.attributes.public_certificate_serial = value
|
79
|
+
}
|
80
|
+
|
81
|
+
// string # Not before value of public certificate used for message security.
|
82
|
+
getPublicCertificateNotBefore = () => this.attributes.public_certificate_not_before
|
83
|
+
|
84
|
+
setPublicCertificateNotBefore = value => {
|
85
|
+
this.attributes.public_certificate_not_before = value
|
86
|
+
}
|
87
|
+
|
88
|
+
// string # Not after value of public certificate used for message security.
|
89
|
+
getPublicCertificateNotAfter = () => this.attributes.public_certificate_not_after
|
90
|
+
|
91
|
+
setPublicCertificateNotAfter = value => {
|
92
|
+
this.attributes.public_certificate_not_after = value
|
93
|
+
}
|
94
|
+
|
60
95
|
// string
|
61
96
|
getPublicCertificate = () => this.attributes.public_certificate
|
62
97
|
|
package/src/models/As2Station.js
CHANGED
@@ -50,13 +50,6 @@ class As2Station {
|
|
50
50
|
this.attributes.domain = value
|
51
51
|
}
|
52
52
|
|
53
|
-
// string # Public certificate used for message security.
|
54
|
-
getPublicCertificate = () => this.attributes.public_certificate
|
55
|
-
|
56
|
-
setPublicCertificate = value => {
|
57
|
-
this.attributes.public_certificate = value
|
58
|
-
}
|
59
|
-
|
60
53
|
// string # MD5 hash of public certificate used for message security.
|
61
54
|
getPublicCertificateMd5 = () => this.attributes.public_certificate_md5
|
62
55
|
|
@@ -71,6 +64,48 @@ class As2Station {
|
|
71
64
|
this.attributes.private_key_md5 = value
|
72
65
|
}
|
73
66
|
|
67
|
+
// string # Subject of public certificate used for message security.
|
68
|
+
getPublicCertificateSubject = () => this.attributes.public_certificate_subject
|
69
|
+
|
70
|
+
setPublicCertificateSubject = value => {
|
71
|
+
this.attributes.public_certificate_subject = value
|
72
|
+
}
|
73
|
+
|
74
|
+
// string # Issuer of public certificate used for message security.
|
75
|
+
getPublicCertificateIssuer = () => this.attributes.public_certificate_issuer
|
76
|
+
|
77
|
+
setPublicCertificateIssuer = value => {
|
78
|
+
this.attributes.public_certificate_issuer = value
|
79
|
+
}
|
80
|
+
|
81
|
+
// string # Serial of public certificate used for message security.
|
82
|
+
getPublicCertificateSerial = () => this.attributes.public_certificate_serial
|
83
|
+
|
84
|
+
setPublicCertificateSerial = value => {
|
85
|
+
this.attributes.public_certificate_serial = value
|
86
|
+
}
|
87
|
+
|
88
|
+
// string # Not before value of public certificate used for message security.
|
89
|
+
getPublicCertificateNotBefore = () => this.attributes.public_certificate_not_before
|
90
|
+
|
91
|
+
setPublicCertificateNotBefore = value => {
|
92
|
+
this.attributes.public_certificate_not_before = value
|
93
|
+
}
|
94
|
+
|
95
|
+
// string # Not after value of public certificate used for message security.
|
96
|
+
getPublicCertificateNotAfter = () => this.attributes.public_certificate_not_after
|
97
|
+
|
98
|
+
setPublicCertificateNotAfter = value => {
|
99
|
+
this.attributes.public_certificate_not_after = value
|
100
|
+
}
|
101
|
+
|
102
|
+
// string
|
103
|
+
getPublicCertificate = () => this.attributes.public_certificate
|
104
|
+
|
105
|
+
setPublicCertificate = value => {
|
106
|
+
this.attributes.public_certificate = value
|
107
|
+
}
|
108
|
+
|
74
109
|
// string
|
75
110
|
getPrivateKey = () => this.attributes.private_key
|
76
111
|
|
@@ -81,8 +116,6 @@ class As2Station {
|
|
81
116
|
|
82
117
|
// Parameters:
|
83
118
|
// name - string - AS2 Name
|
84
|
-
// domain - string - AS2 Domain
|
85
|
-
// uri - string - URL base for AS2 responses
|
86
119
|
// public_certificate - string
|
87
120
|
// private_key - string
|
88
121
|
update = async (params = {}) => {
|
@@ -101,12 +134,6 @@ class As2Station {
|
|
101
134
|
if (params['name'] && !isString(params['name'])) {
|
102
135
|
throw new Error(`Bad parameter: name must be of type String, received ${getType(name)}`)
|
103
136
|
}
|
104
|
-
if (params['domain'] && !isString(params['domain'])) {
|
105
|
-
throw new Error(`Bad parameter: domain must be of type String, received ${getType(domain)}`)
|
106
|
-
}
|
107
|
-
if (params['uri'] && !isString(params['uri'])) {
|
108
|
-
throw new Error(`Bad parameter: uri must be of type String, received ${getType(uri)}`)
|
109
|
-
}
|
110
137
|
if (params['public_certificate'] && !isString(params['public_certificate'])) {
|
111
138
|
throw new Error(`Bad parameter: public_certificate must be of type String, received ${getType(public_certificate)}`)
|
112
139
|
}
|
@@ -210,8 +237,6 @@ class As2Station {
|
|
210
237
|
|
211
238
|
// Parameters:
|
212
239
|
// name (required) - string - AS2 Name
|
213
|
-
// domain (required) - string - AS2 Domain
|
214
|
-
// uri (required) - string - URL base for AS2 responses
|
215
240
|
// public_certificate (required) - string
|
216
241
|
// private_key (required) - string
|
217
242
|
static create = async (params = {}, options = {}) => {
|
@@ -219,14 +244,6 @@ class As2Station {
|
|
219
244
|
throw new Error('Parameter missing: name')
|
220
245
|
}
|
221
246
|
|
222
|
-
if (!params['domain']) {
|
223
|
-
throw new Error('Parameter missing: domain')
|
224
|
-
}
|
225
|
-
|
226
|
-
if (!params['uri']) {
|
227
|
-
throw new Error('Parameter missing: uri')
|
228
|
-
}
|
229
|
-
|
230
247
|
if (!params['public_certificate']) {
|
231
248
|
throw new Error('Parameter missing: public_certificate')
|
232
249
|
}
|
@@ -239,14 +256,6 @@ class As2Station {
|
|
239
256
|
throw new Error(`Bad parameter: name must be of type String, received ${getType(name)}`)
|
240
257
|
}
|
241
258
|
|
242
|
-
if (params['domain'] && !isString(params['domain'])) {
|
243
|
-
throw new Error(`Bad parameter: domain must be of type String, received ${getType(domain)}`)
|
244
|
-
}
|
245
|
-
|
246
|
-
if (params['uri'] && !isString(params['uri'])) {
|
247
|
-
throw new Error(`Bad parameter: uri must be of type String, received ${getType(uri)}`)
|
248
|
-
}
|
249
|
-
|
250
259
|
if (params['public_certificate'] && !isString(params['public_certificate'])) {
|
251
260
|
throw new Error(`Bad parameter: public_certificate must be of type String, received ${getType(public_certificate)}`)
|
252
261
|
}
|