@ama-sdk/core 12.1.8 → 12.1.11
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
|
@@ -5,17 +5,17 @@ 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
|
-
PiiTokenizerRequest
|
|
12
|
+
get PiiTokenizerRequest () {
|
|
13
13
|
return PiiTokenizerRequest;
|
|
14
14
|
},
|
|
15
|
-
createJwePiiEncoder
|
|
15
|
+
get createJwePiiEncoder () {
|
|
16
16
|
return createJwePiiEncoder;
|
|
17
17
|
},
|
|
18
|
-
createJwtPiiEncoder
|
|
18
|
+
get createJwtPiiEncoder () {
|
|
19
19
|
return createJwtPiiEncoder;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
@@ -97,7 +97,7 @@ function _object_spread(target) {
|
|
|
97
97
|
return target;
|
|
98
98
|
}
|
|
99
99
|
function _ts_generator(thisArg, body) {
|
|
100
|
-
var f, y, t,
|
|
100
|
+
var f, y, t, _ = {
|
|
101
101
|
label: 0,
|
|
102
102
|
sent: function() {
|
|
103
103
|
if (t[0] & 1) throw t[1];
|
|
@@ -105,12 +105,8 @@ function _ts_generator(thisArg, body) {
|
|
|
105
105
|
},
|
|
106
106
|
trys: [],
|
|
107
107
|
ops: []
|
|
108
|
-
};
|
|
109
|
-
return g = {
|
|
110
|
-
next: verb(0),
|
|
111
|
-
"throw": verb(1),
|
|
112
|
-
"return": verb(2)
|
|
113
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
108
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
109
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
114
110
|
return this;
|
|
115
111
|
}), g;
|
|
116
112
|
function verb(n) {
|
|
@@ -123,7 +119,7 @@ function _ts_generator(thisArg, body) {
|
|
|
123
119
|
}
|
|
124
120
|
function step(op) {
|
|
125
121
|
if (f) throw new TypeError("Generator is already executing.");
|
|
126
|
-
while(_)try {
|
|
122
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
127
123
|
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;
|
|
128
124
|
if (y = 0, t) op = [
|
|
129
125
|
op[0] & 2,
|
|
@@ -249,7 +245,6 @@ var PiiTokenizerRequest = /*#__PURE__*/ function() {
|
|
|
249
245
|
* @param requestOptions Request options to generate the token
|
|
250
246
|
* @param logger Logger (optional, fallback to console logger if undefined)
|
|
251
247
|
*/ function appendEncodedToken(requestOptions, logger) {
|
|
252
|
-
var _this = this;
|
|
253
248
|
return _async_to_generator(function() {
|
|
254
249
|
var e;
|
|
255
250
|
return _ts_generator(this, function(_state) {
|
|
@@ -263,7 +258,7 @@ var PiiTokenizerRequest = /*#__PURE__*/ function() {
|
|
|
263
258
|
]);
|
|
264
259
|
return [
|
|
265
260
|
4,
|
|
266
|
-
|
|
261
|
+
this.tokenEncoder(requestOptions.tokenizedOptions.values)
|
|
267
262
|
];
|
|
268
263
|
case 1:
|
|
269
264
|
return [
|
|
@@ -272,7 +267,7 @@ var PiiTokenizerRequest = /*#__PURE__*/ function() {
|
|
|
272
267
|
];
|
|
273
268
|
case 2:
|
|
274
269
|
e = _state.sent();
|
|
275
|
-
if (
|
|
270
|
+
if (this.silent) {
|
|
276
271
|
(logger || console).error('Couldn\'t encode the token', e);
|
|
277
272
|
} else {
|
|
278
273
|
throw new Error('Couldn\'t encode the token');
|
|
@@ -287,7 +282,7 @@ var PiiTokenizerRequest = /*#__PURE__*/ function() {
|
|
|
287
282
|
];
|
|
288
283
|
}
|
|
289
284
|
});
|
|
290
|
-
})();
|
|
285
|
+
}).call(this);
|
|
291
286
|
}
|
|
292
287
|
},
|
|
293
288
|
{
|
|
@@ -295,8 +290,8 @@ var PiiTokenizerRequest = /*#__PURE__*/ function() {
|
|
|
295
290
|
value: /** @inheritdoc */ function load(context) {
|
|
296
291
|
var _this = this;
|
|
297
292
|
return {
|
|
298
|
-
transform:
|
|
299
|
-
|
|
293
|
+
transform: function(data) {
|
|
294
|
+
return _async_to_generator(function() {
|
|
300
295
|
var _data_metadata, _data_metadata_deepLinkOptions, token, challengeAnswers, token1;
|
|
301
296
|
return _ts_generator(this, function(_state) {
|
|
302
297
|
switch(_state.label){
|
|
@@ -306,9 +301,9 @@ var PiiTokenizerRequest = /*#__PURE__*/ function() {
|
|
|
306
301
|
1
|
|
307
302
|
];
|
|
308
303
|
_data_metadata_deepLinkOptions = data.metadata.deepLinkOptions, token = _data_metadata_deepLinkOptions.token, challengeAnswers = _data_metadata_deepLinkOptions.challengeAnswers;
|
|
309
|
-
data.headers.append(
|
|
304
|
+
data.headers.append(this.tokensHeader, token);
|
|
310
305
|
if (challengeAnswers) {
|
|
311
|
-
data.headers.append(
|
|
306
|
+
data.headers.append(this.challengeHeader, JSON.stringify(challengeAnswers));
|
|
312
307
|
}
|
|
313
308
|
return [
|
|
314
309
|
3,
|
|
@@ -333,12 +328,12 @@ var PiiTokenizerRequest = /*#__PURE__*/ function() {
|
|
|
333
328
|
data.queryParams = _object_spread({}, data.queryParams, data.tokenizedOptions.queryParams);
|
|
334
329
|
return [
|
|
335
330
|
4,
|
|
336
|
-
|
|
331
|
+
this.appendEncodedToken(data, context === null || context === void 0 ? void 0 : context.logger)
|
|
337
332
|
];
|
|
338
333
|
case 3:
|
|
339
334
|
token1 = _state.sent();
|
|
340
335
|
if (token1) {
|
|
341
|
-
data.headers.append(
|
|
336
|
+
data.headers.append(this.tokensHeader, token1);
|
|
342
337
|
}
|
|
343
338
|
_state.label = 4;
|
|
344
339
|
case 4:
|
|
@@ -348,11 +343,8 @@ var PiiTokenizerRequest = /*#__PURE__*/ function() {
|
|
|
348
343
|
];
|
|
349
344
|
}
|
|
350
345
|
});
|
|
351
|
-
});
|
|
352
|
-
|
|
353
|
-
return _ref.apply(this, arguments);
|
|
354
|
-
};
|
|
355
|
-
}()
|
|
346
|
+
}).call(_this);
|
|
347
|
+
}
|
|
356
348
|
};
|
|
357
349
|
}
|
|
358
350
|
}
|