@ama-sdk/core 12.1.10 → 12.1.12
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/cjs/clients/api-angular-client.js +13 -18
- package/cjs/clients/api-fetch-client.js +16 -21
- package/cjs/fwk/api.helpers.js +11 -11
- package/cjs/fwk/date.js +5 -5
- package/cjs/fwk/errors.js +7 -7
- package/cjs/fwk/mocks/alf-mock-adapter.js +58 -60
- package/cjs/fwk/mocks/base-mock-adapter.js +15 -19
- package/cjs/fwk/mocks/helpers.js +3 -3
- package/cjs/fwk/param-serialization.js +6 -6
- package/cjs/fwk/reviver.js +4 -4
- package/cjs/plugins/abort/abort.spec.js +83 -81
- package/cjs/plugins/additional-params/additional-params.request.js +18 -25
- package/cjs/plugins/additional-params/additional-params.spec.js +194 -186
- package/cjs/plugins/api-configuration-override/api-configuration-override.request.js +10 -17
- package/cjs/plugins/api-configuration-override/api-configuration-override.spec.js +83 -81
- package/cjs/plugins/api-key/api-key.request.js +12 -19
- package/cjs/plugins/api-key/api-key.spec.js +50 -50
- package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +25 -36
- package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +343 -327
- package/cjs/plugins/client-facts/client-facts.request.js +18 -25
- package/cjs/plugins/client-facts/client-facts.spec.js +218 -208
- package/cjs/plugins/concurrent/concurrent.fetch.js +12 -20
- package/cjs/plugins/concurrent/concurrent.spec.js +99 -99
- package/cjs/plugins/custom-info/custom-info.spec.js +90 -90
- package/cjs/plugins/fetch-cache/fetch-cache.spec.js +100 -98
- package/cjs/plugins/fetch-credentials/fetch-credentials.spec.js +60 -60
- package/cjs/plugins/json-token/json-token.spec.js +109 -107
- package/cjs/plugins/keepalive/keepalive.request.js +7 -12
- package/cjs/plugins/keepalive/keepalive.spec.js +32 -34
- package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.helpers.js +11 -23
- package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +18 -28
- package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +212 -204
- package/cjs/plugins/mock-intercept/mock-intercept.angular.js +94 -100
- package/cjs/plugins/mock-intercept/mock-intercept.fetch.js +15 -22
- package/cjs/plugins/mock-intercept/mock-intercept.interface.js +3 -3
- package/cjs/plugins/mock-intercept/mock-intercept.request.js +12 -19
- package/cjs/plugins/mock-intercept/mock-intercept.spec.js +245 -237
- package/cjs/plugins/perf-metric/perf-metric.fetch.js +11 -18
- package/cjs/plugins/pii-tokenizer/pii-tokenizer.request.js +19 -27
- package/cjs/plugins/pii-tokenizer/pii-tokenizer.spec.js +404 -386
- package/cjs/plugins/raw-response-info/raw-response-info.spec.js +67 -67
- package/cjs/plugins/retry/retry.fetch.js +18 -27
- package/cjs/plugins/retry/retry.spec.js +233 -225
- package/cjs/plugins/reviver/reviver.spec.js +88 -86
- package/cjs/plugins/session-id/session-id.spec.js +98 -94
- package/cjs/plugins/si-token/si-token.spec.js +27 -29
- package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +17 -24
- package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +199 -191
- package/cjs/plugins/timeout/timeout.fetch.js +16 -22
- package/cjs/plugins/timeout/timeout.spec.js +211 -205
- package/cjs/plugins/url-rewrite/url-rewrite.request.js +9 -16
- package/cjs/plugins/url-rewrite/url-rewrite.spec.js +48 -48
- package/cjs/plugins/wait-for/wait-for.fetch.js +19 -29
- package/cjs/plugins/wait-for/wait-for.spec.js +211 -203
- package/cjs/utils/crypto.js +15 -27
- package/cjs/utils/generic-api.js +9 -14
- package/cjs/utils/json-token.js +19 -26
- package/cjs/utils/json-token.spec.js +495 -497
- package/cjs/utils/mime-types.js +3 -3
- package/esm2015/clients/api-angular-client.js +13 -18
- package/esm2015/clients/api-fetch-client.js +16 -21
- package/esm2015/fwk/mocks/alf-mock-adapter.js +58 -60
- package/esm2015/fwk/mocks/base-mock-adapter.js +15 -19
- package/esm2015/plugins/abort/abort.spec.js +83 -81
- package/esm2015/plugins/additional-params/additional-params.request.js +15 -22
- package/esm2015/plugins/additional-params/additional-params.spec.js +194 -186
- package/esm2015/plugins/api-configuration-override/api-configuration-override.request.js +10 -17
- package/esm2015/plugins/api-configuration-override/api-configuration-override.spec.js +83 -81
- package/esm2015/plugins/api-key/api-key.request.js +12 -19
- package/esm2015/plugins/api-key/api-key.spec.js +50 -50
- package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +21 -32
- package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +343 -327
- package/esm2015/plugins/client-facts/client-facts.request.js +15 -22
- package/esm2015/plugins/client-facts/client-facts.spec.js +218 -208
- package/esm2015/plugins/concurrent/concurrent.fetch.js +12 -20
- package/esm2015/plugins/concurrent/concurrent.spec.js +99 -99
- package/esm2015/plugins/custom-info/custom-info.spec.js +90 -90
- package/esm2015/plugins/fetch-cache/fetch-cache.spec.js +100 -98
- package/esm2015/plugins/fetch-credentials/fetch-credentials.spec.js +60 -60
- package/esm2015/plugins/json-token/json-token.spec.js +109 -107
- package/esm2015/plugins/keepalive/keepalive.request.js +7 -12
- package/esm2015/plugins/keepalive/keepalive.spec.js +32 -34
- package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.helpers.js +8 -20
- package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +18 -28
- package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +212 -204
- package/esm2015/plugins/mock-intercept/mock-intercept.angular.js +94 -100
- package/esm2015/plugins/mock-intercept/mock-intercept.fetch.js +15 -22
- package/esm2015/plugins/mock-intercept/mock-intercept.request.js +12 -19
- package/esm2015/plugins/mock-intercept/mock-intercept.spec.js +245 -237
- package/esm2015/plugins/perf-metric/perf-metric.fetch.js +11 -18
- package/esm2015/plugins/pii-tokenizer/pii-tokenizer.request.js +15 -23
- package/esm2015/plugins/pii-tokenizer/pii-tokenizer.spec.js +404 -386
- package/esm2015/plugins/raw-response-info/raw-response-info.spec.js +67 -67
- package/esm2015/plugins/retry/retry.fetch.js +18 -27
- package/esm2015/plugins/retry/retry.spec.js +233 -225
- package/esm2015/plugins/reviver/reviver.spec.js +88 -86
- package/esm2015/plugins/session-id/session-id.spec.js +98 -94
- package/esm2015/plugins/si-token/si-token.spec.js +27 -29
- package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +17 -24
- package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +199 -191
- package/esm2015/plugins/timeout/timeout.fetch.js +13 -19
- package/esm2015/plugins/timeout/timeout.spec.js +211 -205
- package/esm2015/plugins/url-rewrite/url-rewrite.request.js +9 -16
- package/esm2015/plugins/url-rewrite/url-rewrite.spec.js +48 -48
- package/esm2015/plugins/wait-for/wait-for.fetch.js +19 -29
- package/esm2015/plugins/wait-for/wait-for.spec.js +211 -203
- package/esm2015/utils/crypto.js +8 -20
- package/esm2015/utils/generic-api.js +9 -14
- package/esm2015/utils/json-token.js +10 -17
- package/esm2015/utils/json-token.spec.js +495 -497
- package/package.json +6 -6
|
@@ -146,7 +146,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
146
146
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
147
147
|
}
|
|
148
148
|
function _ts_generator(thisArg, body) {
|
|
149
|
-
var f, y, t,
|
|
149
|
+
var f, y, t, _ = {
|
|
150
150
|
label: 0,
|
|
151
151
|
sent: function() {
|
|
152
152
|
if (t[0] & 1) throw t[1];
|
|
@@ -154,12 +154,8 @@ function _ts_generator(thisArg, body) {
|
|
|
154
154
|
},
|
|
155
155
|
trys: [],
|
|
156
156
|
ops: []
|
|
157
|
-
};
|
|
158
|
-
return g = {
|
|
159
|
-
next: verb(0),
|
|
160
|
-
"throw": verb(1),
|
|
161
|
-
"return": verb(2)
|
|
162
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
157
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
158
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
163
159
|
return this;
|
|
164
160
|
}), g;
|
|
165
161
|
function verb(n) {
|
|
@@ -172,7 +168,7 @@ function _ts_generator(thisArg, body) {
|
|
|
172
168
|
}
|
|
173
169
|
function step(op) {
|
|
174
170
|
if (f) throw new TypeError("Generator is already executing.");
|
|
175
|
-
while(_)try {
|
|
171
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
176
172
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
177
173
|
if (y = 0, t) op = [
|
|
178
174
|
op[0] & 2,
|
|
@@ -280,7 +276,6 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
280
276
|
{
|
|
281
277
|
key: "getRequestOptions",
|
|
282
278
|
value: /** @inheritdoc */ function getRequestOptions(requestOptionsParameters) {
|
|
283
|
-
var _this = this;
|
|
284
279
|
return _async_to_generator(function() {
|
|
285
280
|
var opts, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, plugin, _requestOptionsParameters_api, err;
|
|
286
281
|
return _ts_generator(this, function(_state) {
|
|
@@ -290,7 +285,7 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
290
285
|
headers: new Headers((0, _apihelpers.filterUndefinedValues)(requestOptionsParameters.headers)),
|
|
291
286
|
queryParams: (0, _apihelpers.filterUndefinedValues)(requestOptionsParameters.queryParams)
|
|
292
287
|
});
|
|
293
|
-
if (!
|
|
288
|
+
if (!this.options.requestPlugins) return [
|
|
294
289
|
3,
|
|
295
290
|
8
|
|
296
291
|
];
|
|
@@ -303,7 +298,7 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
303
298
|
7,
|
|
304
299
|
8
|
|
305
300
|
]);
|
|
306
|
-
_iterator =
|
|
301
|
+
_iterator = this.options.requestPlugins[Symbol.iterator]();
|
|
307
302
|
_state.label = 2;
|
|
308
303
|
case 2:
|
|
309
304
|
if (!!(_iteratorNormalCompletion = (_step = _iterator.next()).done)) return [
|
|
@@ -314,7 +309,7 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
314
309
|
return [
|
|
315
310
|
4,
|
|
316
311
|
plugin.load({
|
|
317
|
-
logger:
|
|
312
|
+
logger: this.options.logger,
|
|
318
313
|
apiName: (_requestOptionsParameters_api = requestOptionsParameters.api) === null || _requestOptionsParameters_api === void 0 ? void 0 : _requestOptionsParameters_api.apiName
|
|
319
314
|
}).transform(opts)
|
|
320
315
|
];
|
|
@@ -360,7 +355,7 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
360
355
|
];
|
|
361
356
|
}
|
|
362
357
|
});
|
|
363
|
-
})();
|
|
358
|
+
}).call(this);
|
|
364
359
|
}
|
|
365
360
|
},
|
|
366
361
|
{
|
|
@@ -409,12 +404,12 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
409
404
|
{
|
|
410
405
|
key: "processCall",
|
|
411
406
|
value: function processCall(url, options, apiType, apiName, revivers, operationId) {
|
|
412
|
-
var _this = this;
|
|
413
407
|
return _async_to_generator(function() {
|
|
414
|
-
var response, root, exception, origin, headers, asyncResponse, e, reviver, replyPlugins, parsedData, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, pluginRunner, err;
|
|
408
|
+
var _this, response, root, exception, origin, headers, asyncResponse, e, reviver, replyPlugins, parsedData, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, pluginRunner, err;
|
|
415
409
|
return _ts_generator(this, function(_state) {
|
|
416
410
|
switch(_state.label){
|
|
417
411
|
case 0:
|
|
412
|
+
_this = this;
|
|
418
413
|
origin = options.headers.get('Origin');
|
|
419
414
|
_state.label = 1;
|
|
420
415
|
case 1:
|
|
@@ -522,9 +517,9 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
522
517
|
];
|
|
523
518
|
case 4:
|
|
524
519
|
reviver = (0, _apihelpers.getResponseReviver)(revivers, response, operationId, {
|
|
525
|
-
disableFallback:
|
|
520
|
+
disableFallback: this.options.disableFallback
|
|
526
521
|
});
|
|
527
|
-
replyPlugins =
|
|
522
|
+
replyPlugins = this.options.replyPlugins ? this.options.replyPlugins.map(function(plugin) {
|
|
528
523
|
return plugin.load({
|
|
529
524
|
dictionaries: root && root.dictionaries,
|
|
530
525
|
response: response && _object_spread_props(_object_spread({}, response), {
|
|
@@ -612,7 +607,7 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
612
607
|
];
|
|
613
608
|
}
|
|
614
609
|
});
|
|
615
|
-
})();
|
|
610
|
+
}).call(this);
|
|
616
611
|
}
|
|
617
612
|
}
|
|
618
613
|
]);
|
|
@@ -146,7 +146,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
146
146
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
147
147
|
}
|
|
148
148
|
function _ts_generator(thisArg, body) {
|
|
149
|
-
var f, y, t,
|
|
149
|
+
var f, y, t, _ = {
|
|
150
150
|
label: 0,
|
|
151
151
|
sent: function() {
|
|
152
152
|
if (t[0] & 1) throw t[1];
|
|
@@ -154,12 +154,8 @@ function _ts_generator(thisArg, body) {
|
|
|
154
154
|
},
|
|
155
155
|
trys: [],
|
|
156
156
|
ops: []
|
|
157
|
-
};
|
|
158
|
-
return g = {
|
|
159
|
-
next: verb(0),
|
|
160
|
-
"throw": verb(1),
|
|
161
|
-
"return": verb(2)
|
|
162
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
157
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
158
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
163
159
|
return this;
|
|
164
160
|
}), g;
|
|
165
161
|
function verb(n) {
|
|
@@ -172,7 +168,7 @@ function _ts_generator(thisArg, body) {
|
|
|
172
168
|
}
|
|
173
169
|
function step(op) {
|
|
174
170
|
if (f) throw new TypeError("Generator is already executing.");
|
|
175
|
-
while(_)try {
|
|
171
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
176
172
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
177
173
|
if (y = 0, t) op = [
|
|
178
174
|
op[0] & 2,
|
|
@@ -286,7 +282,6 @@ var ApiFetchClient = /*#__PURE__*/ function() {
|
|
|
286
282
|
{
|
|
287
283
|
key: "getRequestOptions",
|
|
288
284
|
value: /** @inheritdoc */ function getRequestOptions(requestOptionsParameters) {
|
|
289
|
-
var _this = this;
|
|
290
285
|
return _async_to_generator(function() {
|
|
291
286
|
var opts, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, plugin, _requestOptionsParameters_api, err;
|
|
292
287
|
return _ts_generator(this, function(_state) {
|
|
@@ -296,7 +291,7 @@ var ApiFetchClient = /*#__PURE__*/ function() {
|
|
|
296
291
|
headers: new Headers((0, _apihelpers.filterUndefinedValues)(requestOptionsParameters.headers)),
|
|
297
292
|
queryParams: (0, _apihelpers.filterUndefinedValues)(requestOptionsParameters.queryParams)
|
|
298
293
|
});
|
|
299
|
-
if (!
|
|
294
|
+
if (!this.options.requestPlugins) return [
|
|
300
295
|
3,
|
|
301
296
|
8
|
|
302
297
|
];
|
|
@@ -309,7 +304,7 @@ var ApiFetchClient = /*#__PURE__*/ function() {
|
|
|
309
304
|
7,
|
|
310
305
|
8
|
|
311
306
|
]);
|
|
312
|
-
_iterator =
|
|
307
|
+
_iterator = this.options.requestPlugins[Symbol.iterator]();
|
|
313
308
|
_state.label = 2;
|
|
314
309
|
case 2:
|
|
315
310
|
if (!!(_iteratorNormalCompletion = (_step = _iterator.next()).done)) return [
|
|
@@ -320,7 +315,7 @@ var ApiFetchClient = /*#__PURE__*/ function() {
|
|
|
320
315
|
return [
|
|
321
316
|
4,
|
|
322
317
|
plugin.load({
|
|
323
|
-
logger:
|
|
318
|
+
logger: this.options.logger,
|
|
324
319
|
apiName: (_requestOptionsParameters_api = requestOptionsParameters.api) === null || _requestOptionsParameters_api === void 0 ? void 0 : _requestOptionsParameters_api.apiName
|
|
325
320
|
}).transform(opts)
|
|
326
321
|
];
|
|
@@ -366,7 +361,7 @@ var ApiFetchClient = /*#__PURE__*/ function() {
|
|
|
366
361
|
];
|
|
367
362
|
}
|
|
368
363
|
});
|
|
369
|
-
})();
|
|
364
|
+
}).call(this);
|
|
370
365
|
}
|
|
371
366
|
},
|
|
372
367
|
{
|
|
@@ -409,12 +404,12 @@ var ApiFetchClient = /*#__PURE__*/ function() {
|
|
|
409
404
|
{
|
|
410
405
|
key: "processCall",
|
|
411
406
|
value: function processCall(url, options, apiType, apiName, revivers, operationId) {
|
|
412
|
-
var _this = this;
|
|
413
407
|
return _async_to_generator(function() {
|
|
414
|
-
var response, asyncResponse, root, body, exception, origin, _options_metadata, metadataSignal, controller, loadedPlugins, _loadedPlugins, canStart, isCanceledBy, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, plugin, e, reviver, replyPlugins, parsedData, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1, _iterator1, _step1, pluginRunner, err;
|
|
408
|
+
var _this, response, asyncResponse, root, body, exception, origin, _options_metadata, metadataSignal, controller, loadedPlugins, _loadedPlugins, canStart, isCanceledBy, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, plugin, e, reviver, replyPlugins, parsedData, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1, _iterator1, _step1, pluginRunner, err;
|
|
415
409
|
return _ts_generator(this, function(_state) {
|
|
416
410
|
switch(_state.label){
|
|
417
411
|
case 0:
|
|
412
|
+
_this = this;
|
|
418
413
|
origin = options.headers.get('Origin');
|
|
419
414
|
_state.label = 1;
|
|
420
415
|
case 1:
|
|
@@ -432,9 +427,9 @@ var ApiFetchClient = /*#__PURE__*/ function() {
|
|
|
432
427
|
return controller.abort();
|
|
433
428
|
});
|
|
434
429
|
loadedPlugins = [];
|
|
435
|
-
if (
|
|
430
|
+
if (this.options.fetchPlugins) {
|
|
436
431
|
;
|
|
437
|
-
(_loadedPlugins = loadedPlugins).push.apply(_loadedPlugins, _to_consumable_array(
|
|
432
|
+
(_loadedPlugins = loadedPlugins).push.apply(_loadedPlugins, _to_consumable_array(this.options.fetchPlugins.map(function(plugin) {
|
|
438
433
|
return plugin.load({
|
|
439
434
|
url: url,
|
|
440
435
|
options: options,
|
|
@@ -455,7 +450,7 @@ var ApiFetchClient = /*#__PURE__*/ function() {
|
|
|
455
450
|
case 2:
|
|
456
451
|
canStart = _state.sent();
|
|
457
452
|
isCanceledBy = canStart.indexOf(false);
|
|
458
|
-
asyncResponse = isCanceledBy === -1 ? fetch(url, options) : Promise.reject(new _errors.CanceledCallError("Is canceled by the plugin ".concat(isCanceledBy), isCanceledBy,
|
|
453
|
+
asyncResponse = isCanceledBy === -1 ? fetch(url, options) : Promise.reject(new _errors.CanceledCallError("Is canceled by the plugin ".concat(isCanceledBy), isCanceledBy, this.options.fetchPlugins[isCanceledBy], {
|
|
459
454
|
apiName: apiName,
|
|
460
455
|
operationId: operationId,
|
|
461
456
|
url: url,
|
|
@@ -532,9 +527,9 @@ var ApiFetchClient = /*#__PURE__*/ function() {
|
|
|
532
527
|
});
|
|
533
528
|
}
|
|
534
529
|
reviver = (0, _apihelpers.getResponseReviver)(revivers, response, operationId, {
|
|
535
|
-
disableFallback:
|
|
530
|
+
disableFallback: this.options.disableFallback
|
|
536
531
|
});
|
|
537
|
-
replyPlugins =
|
|
532
|
+
replyPlugins = this.options.replyPlugins ? this.options.replyPlugins.map(function(plugin) {
|
|
538
533
|
return plugin.load({
|
|
539
534
|
dictionaries: root && root.dictionaries,
|
|
540
535
|
response: response,
|
|
@@ -615,7 +610,7 @@ var ApiFetchClient = /*#__PURE__*/ function() {
|
|
|
615
610
|
];
|
|
616
611
|
}
|
|
617
612
|
});
|
|
618
|
-
})();
|
|
613
|
+
}).call(this);
|
|
619
614
|
}
|
|
620
615
|
}
|
|
621
616
|
]);
|
package/cjs/fwk/api.helpers.js
CHANGED
|
@@ -5,38 +5,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
computePiiParameterTokens
|
|
12
|
+
get computePiiParameterTokens () {
|
|
13
13
|
return computePiiParameterTokens;
|
|
14
14
|
},
|
|
15
|
-
extractQueryParams
|
|
15
|
+
get extractQueryParams () {
|
|
16
16
|
return extractQueryParams;
|
|
17
17
|
},
|
|
18
|
-
filterUndefinedValues
|
|
18
|
+
get filterUndefinedValues () {
|
|
19
19
|
return filterUndefinedValues;
|
|
20
20
|
},
|
|
21
|
-
getPropertiesFromData
|
|
21
|
+
get getPropertiesFromData () {
|
|
22
22
|
return getPropertiesFromData;
|
|
23
23
|
},
|
|
24
|
-
getResponseReviver
|
|
24
|
+
get getResponseReviver () {
|
|
25
25
|
return getResponseReviver;
|
|
26
26
|
},
|
|
27
|
-
prepareUrl
|
|
27
|
+
get prepareUrl () {
|
|
28
28
|
return prepareUrl;
|
|
29
29
|
},
|
|
30
|
-
prepareUrlWithQueryParams
|
|
30
|
+
get prepareUrlWithQueryParams () {
|
|
31
31
|
return prepareUrlWithQueryParams;
|
|
32
32
|
},
|
|
33
|
-
processFormData
|
|
33
|
+
get processFormData () {
|
|
34
34
|
return processFormData;
|
|
35
35
|
},
|
|
36
|
-
stringifyQueryParams
|
|
36
|
+
get stringifyQueryParams () {
|
|
37
37
|
return stringifyQueryParams;
|
|
38
38
|
},
|
|
39
|
-
tokenizeRequestOptions
|
|
39
|
+
get tokenizeRequestOptions () {
|
|
40
40
|
return tokenizeRequestOptions;
|
|
41
41
|
}
|
|
42
42
|
});
|
package/cjs/fwk/date.js
CHANGED
|
@@ -6,20 +6,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
CommonDate
|
|
13
|
+
get CommonDate () {
|
|
14
14
|
return CommonDate;
|
|
15
15
|
},
|
|
16
|
-
_NativeDateClass
|
|
16
|
+
get _NativeDateClass () {
|
|
17
17
|
return _NativeDateClass;
|
|
18
18
|
},
|
|
19
|
-
pad
|
|
19
|
+
get pad () {
|
|
20
20
|
return pad;
|
|
21
21
|
},
|
|
22
|
-
utils
|
|
22
|
+
get utils () {
|
|
23
23
|
return utils;
|
|
24
24
|
}
|
|
25
25
|
});
|
package/cjs/fwk/errors.js
CHANGED
|
@@ -7,26 +7,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
function _export(target, all) {
|
|
8
8
|
for(var name in all)Object.defineProperty(target, name, {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: all
|
|
10
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
_export(exports, {
|
|
14
|
-
CanceledCallError
|
|
14
|
+
get CanceledCallError () {
|
|
15
15
|
return CanceledCallError;
|
|
16
16
|
},
|
|
17
|
-
EmptyResponseError
|
|
17
|
+
get EmptyResponseError () {
|
|
18
18
|
return EmptyResponseError;
|
|
19
19
|
},
|
|
20
|
-
GenericError
|
|
20
|
+
get GenericError () {
|
|
21
21
|
return GenericError;
|
|
22
22
|
},
|
|
23
|
-
RequestFailedError
|
|
23
|
+
get RequestFailedError () {
|
|
24
24
|
return RequestFailedError;
|
|
25
25
|
},
|
|
26
|
-
ResponseJSONParseError
|
|
26
|
+
get ResponseJSONParseError () {
|
|
27
27
|
return ResponseJSONParseError;
|
|
28
28
|
},
|
|
29
|
-
ResponseTimeoutError
|
|
29
|
+
get ResponseTimeoutError () {
|
|
30
30
|
return ResponseTimeoutError;
|
|
31
31
|
}
|
|
32
32
|
});
|
|
@@ -92,7 +92,7 @@ function _object_spread_props(target, source) {
|
|
|
92
92
|
return target;
|
|
93
93
|
}
|
|
94
94
|
function _ts_generator(thisArg, body) {
|
|
95
|
-
var f, y, t,
|
|
95
|
+
var f, y, t, _ = {
|
|
96
96
|
label: 0,
|
|
97
97
|
sent: function() {
|
|
98
98
|
if (t[0] & 1) throw t[1];
|
|
@@ -100,12 +100,8 @@ function _ts_generator(thisArg, body) {
|
|
|
100
100
|
},
|
|
101
101
|
trys: [],
|
|
102
102
|
ops: []
|
|
103
|
-
};
|
|
104
|
-
return g = {
|
|
105
|
-
next: verb(0),
|
|
106
|
-
"throw": verb(1),
|
|
107
|
-
"return": verb(2)
|
|
108
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
103
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
104
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
109
105
|
return this;
|
|
110
106
|
}), g;
|
|
111
107
|
function verb(n) {
|
|
@@ -118,7 +114,7 @@ function _ts_generator(thisArg, body) {
|
|
|
118
114
|
}
|
|
119
115
|
function step(op) {
|
|
120
116
|
if (f) throw new TypeError("Generator is already executing.");
|
|
121
|
-
while(_)try {
|
|
117
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
122
118
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
123
119
|
if (y = 0, t) op = [
|
|
124
120
|
op[0] & 2,
|
|
@@ -335,56 +331,58 @@ function _ts_generator(thisArg, body) {
|
|
|
335
331
|
return mock;
|
|
336
332
|
}
|
|
337
333
|
function getAlfMockAdapter(binFilePath, operationAdapter) {
|
|
338
|
-
return new _sequentialmockadapter.SequentialMockAdapter(operationAdapter,
|
|
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
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
334
|
+
return new _sequentialmockadapter.SequentialMockAdapter(operationAdapter, function() {
|
|
335
|
+
return _async_to_generator(function() {
|
|
336
|
+
var response, content, adapter, _tmp;
|
|
337
|
+
return _ts_generator(this, function(_state) {
|
|
338
|
+
switch(_state.label){
|
|
339
|
+
case 0:
|
|
340
|
+
return [
|
|
341
|
+
4,
|
|
342
|
+
fetch(binFilePath)
|
|
343
|
+
];
|
|
344
|
+
case 1:
|
|
345
|
+
response = _state.sent();
|
|
346
|
+
if (!response.ok) return [
|
|
347
|
+
3,
|
|
348
|
+
6
|
|
349
|
+
];
|
|
350
|
+
return [
|
|
351
|
+
4,
|
|
352
|
+
response.text()
|
|
353
|
+
];
|
|
354
|
+
case 2:
|
|
355
|
+
content = _state.sent();
|
|
356
|
+
if (!(typeof operationAdapter === 'function')) return [
|
|
357
|
+
3,
|
|
358
|
+
4
|
|
359
|
+
];
|
|
360
|
+
return [
|
|
361
|
+
4,
|
|
362
|
+
operationAdapter()
|
|
363
|
+
];
|
|
364
|
+
case 3:
|
|
365
|
+
_tmp = _state.sent();
|
|
366
|
+
return [
|
|
367
|
+
3,
|
|
368
|
+
5
|
|
369
|
+
];
|
|
370
|
+
case 4:
|
|
371
|
+
_tmp = operationAdapter;
|
|
372
|
+
_state.label = 5;
|
|
373
|
+
case 5:
|
|
374
|
+
adapter = _tmp;
|
|
375
|
+
return [
|
|
376
|
+
2,
|
|
377
|
+
buildMockMap(content, adapter)
|
|
378
|
+
];
|
|
379
|
+
case 6:
|
|
380
|
+
return [
|
|
381
|
+
2,
|
|
382
|
+
{}
|
|
383
|
+
];
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
})();
|
|
387
|
+
});
|
|
390
388
|
}
|
|
@@ -71,7 +71,7 @@ function _define_property(obj, key, value) {
|
|
|
71
71
|
return obj;
|
|
72
72
|
}
|
|
73
73
|
function _ts_generator(thisArg, body) {
|
|
74
|
-
var f, y, t,
|
|
74
|
+
var f, y, t, _ = {
|
|
75
75
|
label: 0,
|
|
76
76
|
sent: function() {
|
|
77
77
|
if (t[0] & 1) throw t[1];
|
|
@@ -79,12 +79,8 @@ function _ts_generator(thisArg, body) {
|
|
|
79
79
|
},
|
|
80
80
|
trys: [],
|
|
81
81
|
ops: []
|
|
82
|
-
};
|
|
83
|
-
return g = {
|
|
84
|
-
next: verb(0),
|
|
85
|
-
"throw": verb(1),
|
|
86
|
-
"return": verb(2)
|
|
87
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
82
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
83
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
88
84
|
return this;
|
|
89
85
|
}), g;
|
|
90
86
|
function verb(n) {
|
|
@@ -97,7 +93,7 @@ function _ts_generator(thisArg, body) {
|
|
|
97
93
|
}
|
|
98
94
|
function step(op) {
|
|
99
95
|
if (f) throw new TypeError("Generator is already executing.");
|
|
100
|
-
while(_)try {
|
|
96
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
101
97
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
102
98
|
if (y = 0, t) op = [
|
|
103
99
|
op[0] & 2,
|
|
@@ -199,19 +195,18 @@ var BaseMockAdapter = /*#__PURE__*/ function() {
|
|
|
199
195
|
value: /**
|
|
200
196
|
* @inheritDoc
|
|
201
197
|
*/ function retrieveOperationId(request) {
|
|
202
|
-
var _this = this;
|
|
203
198
|
return _async_to_generator(function() {
|
|
204
199
|
var pathObjects, _tmp, object;
|
|
205
200
|
return _ts_generator(this, function(_state) {
|
|
206
201
|
switch(_state.label){
|
|
207
202
|
case 0:
|
|
208
|
-
if (!(typeof
|
|
203
|
+
if (!(typeof this.pathObjects === 'function')) return [
|
|
209
204
|
3,
|
|
210
205
|
2
|
|
211
206
|
];
|
|
212
207
|
return [
|
|
213
208
|
4,
|
|
214
|
-
|
|
209
|
+
this.pathObjects()
|
|
215
210
|
];
|
|
216
211
|
case 1:
|
|
217
212
|
_tmp = _state.sent();
|
|
@@ -220,18 +215,18 @@ var BaseMockAdapter = /*#__PURE__*/ function() {
|
|
|
220
215
|
3
|
|
221
216
|
];
|
|
222
217
|
case 2:
|
|
223
|
-
_tmp =
|
|
218
|
+
_tmp = this.pathObjects;
|
|
224
219
|
_state.label = 3;
|
|
225
220
|
case 3:
|
|
226
221
|
pathObjects = _tmp;
|
|
227
222
|
object = (0, _helpers.getPath)(request.basePath, pathObjects, request.method);
|
|
228
223
|
return [
|
|
229
224
|
2,
|
|
230
|
-
|
|
225
|
+
this.extractOperationIdFromPath(request, object)
|
|
231
226
|
];
|
|
232
227
|
}
|
|
233
228
|
});
|
|
234
|
-
})();
|
|
229
|
+
}).call(this);
|
|
235
230
|
}
|
|
236
231
|
},
|
|
237
232
|
{
|
|
@@ -239,28 +234,29 @@ var BaseMockAdapter = /*#__PURE__*/ function() {
|
|
|
239
234
|
value: /**
|
|
240
235
|
* @inheritDoc
|
|
241
236
|
*/ function initialize() {
|
|
242
|
-
var _this = this;
|
|
243
237
|
return _async_to_generator(function() {
|
|
238
|
+
var _;
|
|
244
239
|
return _ts_generator(this, function(_state) {
|
|
245
240
|
switch(_state.label){
|
|
246
241
|
case 0:
|
|
247
|
-
if (!
|
|
242
|
+
if (!this.mockFactory || Object.keys(this.mocks).length > 0) {
|
|
248
243
|
return [
|
|
249
244
|
2
|
|
250
245
|
];
|
|
251
246
|
}
|
|
247
|
+
_ = this;
|
|
252
248
|
return [
|
|
253
249
|
4,
|
|
254
|
-
|
|
250
|
+
this.mockFactory()
|
|
255
251
|
];
|
|
256
252
|
case 1:
|
|
257
|
-
|
|
253
|
+
_.mocks = _state.sent();
|
|
258
254
|
return [
|
|
259
255
|
2
|
|
260
256
|
];
|
|
261
257
|
}
|
|
262
258
|
});
|
|
263
|
-
})();
|
|
259
|
+
}).call(this);
|
|
264
260
|
}
|
|
265
261
|
}
|
|
266
262
|
]);
|
package/cjs/fwk/mocks/helpers.js
CHANGED
|
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
getOperationId
|
|
12
|
+
get getOperationId () {
|
|
13
13
|
return getOperationId;
|
|
14
14
|
},
|
|
15
|
-
getPath
|
|
15
|
+
get getPath () {
|
|
16
16
|
return getPath;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
@@ -5,23 +5,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
isDateType
|
|
12
|
+
get isDateType () {
|
|
13
13
|
return isDateType;
|
|
14
14
|
},
|
|
15
|
-
isParamValueRecord
|
|
15
|
+
get isParamValueRecord () {
|
|
16
16
|
return isParamValueRecord;
|
|
17
17
|
},
|
|
18
|
-
serializePathParams
|
|
18
|
+
get serializePathParams () {
|
|
19
19
|
return serializePathParams;
|
|
20
20
|
},
|
|
21
|
-
serializeQueryParams
|
|
21
|
+
get serializeQueryParams () {
|
|
22
22
|
return serializeQueryParams;
|
|
23
23
|
},
|
|
24
|
-
serializeRequestPluginQueryParams
|
|
24
|
+
get serializeRequestPluginQueryParams () {
|
|
25
25
|
return serializeRequestPluginQueryParams;
|
|
26
26
|
}
|
|
27
27
|
});
|