@ama-sdk/core 14.0.0-prerelease.26 → 14.0.0-prerelease.28

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.
Files changed (61) hide show
  1. package/cjs/fwk/server.js +1 -1
  2. package/cjs/plugins/additional-params/additional-params-request.js +1 -1
  3. package/cjs/plugins/additional-params/additional-params-sync-request.js +1 -1
  4. package/cjs/plugins/api-configuration-override/api-configuration-override-request.js +1 -1
  5. package/cjs/plugins/api-configuration-override/api-configuration-override.spec.js +1 -1
  6. package/cjs/plugins/api-key/api-key-request.js +1 -1
  7. package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint-request.js +2 -2
  8. package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +6 -6
  9. package/cjs/plugins/client-facts/client-facts-request.js +2 -2
  10. package/cjs/plugins/client-facts/client-facts.spec.js +3 -3
  11. package/cjs/plugins/custom-info/custom-info-reply.js +1 -1
  12. package/cjs/plugins/exception/exception-reply.js +1 -1
  13. package/cjs/plugins/fetch-cache/fetch-cache-request.js +1 -1
  14. package/cjs/plugins/fetch-credentials/fetch-credentials-request.js +1 -1
  15. package/cjs/plugins/json-token/json-token-reply.js +1 -1
  16. package/cjs/plugins/json-token/json-token-request.js +1 -1
  17. package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth-request.js +1 -1
  18. package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +1 -1
  19. package/cjs/plugins/mock-intercept/mock-intercept-request.js +2 -2
  20. package/cjs/plugins/open-telemetry/traceparent/open-telemetry-traceparent-reply.js +3 -3
  21. package/cjs/plugins/open-telemetry/traceparent/open-telemetry-traceparent-request.js +1 -1
  22. package/cjs/plugins/open-telemetry/traceparent/open-telemetry-traceparent-request.spec.js +1 -1
  23. package/cjs/plugins/pii-tokenizer/pii-tokenizer-request.js +3 -3
  24. package/cjs/plugins/raw-response-info/raw-response-info-reply.js +1 -1
  25. package/cjs/plugins/reviver/reviver-reply.js +1 -1
  26. package/cjs/plugins/session-id/session-id-request.js +1 -1
  27. package/cjs/plugins/si-token/si-token-request.js +1 -1
  28. package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication-request.js +1 -1
  29. package/cjs/plugins/url-rewrite/url-rewrite-request.js +1 -1
  30. package/cjs/utils/json-token.spec.js +1 -1
  31. package/esm2015/fwk/server.js +1 -1
  32. package/esm2015/plugins/additional-params/additional-params-request.js +1 -1
  33. package/esm2015/plugins/additional-params/additional-params-sync-request.js +1 -1
  34. package/esm2015/plugins/api-configuration-override/api-configuration-override-request.js +1 -1
  35. package/esm2015/plugins/api-configuration-override/api-configuration-override.spec.js +1 -1
  36. package/esm2015/plugins/api-key/api-key-request.js +1 -1
  37. package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint-request.js +2 -2
  38. package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +6 -6
  39. package/esm2015/plugins/client-facts/client-facts-request.js +2 -2
  40. package/esm2015/plugins/client-facts/client-facts.spec.js +3 -3
  41. package/esm2015/plugins/custom-info/custom-info-reply.js +1 -1
  42. package/esm2015/plugins/exception/exception-reply.js +1 -1
  43. package/esm2015/plugins/fetch-cache/fetch-cache-request.js +1 -1
  44. package/esm2015/plugins/fetch-credentials/fetch-credentials-request.js +1 -1
  45. package/esm2015/plugins/json-token/json-token-reply.js +1 -1
  46. package/esm2015/plugins/json-token/json-token-request.js +1 -1
  47. package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth-request.js +1 -1
  48. package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +1 -1
  49. package/esm2015/plugins/mock-intercept/mock-intercept-request.js +2 -2
  50. package/esm2015/plugins/open-telemetry/traceparent/open-telemetry-traceparent-reply.js +3 -3
  51. package/esm2015/plugins/open-telemetry/traceparent/open-telemetry-traceparent-request.js +1 -1
  52. package/esm2015/plugins/open-telemetry/traceparent/open-telemetry-traceparent-request.spec.js +1 -1
  53. package/esm2015/plugins/pii-tokenizer/pii-tokenizer-request.js +3 -3
  54. package/esm2015/plugins/raw-response-info/raw-response-info-reply.js +1 -1
  55. package/esm2015/plugins/reviver/reviver-reply.js +1 -1
  56. package/esm2015/plugins/session-id/session-id-request.js +1 -1
  57. package/esm2015/plugins/si-token/si-token-request.js +1 -1
  58. package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication-request.js +1 -1
  59. package/esm2015/plugins/url-rewrite/url-rewrite-request.js +1 -1
  60. package/esm2015/utils/json-token.spec.js +1 -1
  61. package/package.json +6 -6
package/cjs/fwk/server.js CHANGED
@@ -54,7 +54,7 @@ function _unsupported_iterable_to_array(o, minLen) {
54
54
  if (n === "Map" || n === "Set") return Array.from(n);
55
55
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
56
56
  }
57
- var selectServerBasePath = function(clientServerConfigurations, servers, logger) {
57
+ var selectServerBasePath = function selectServerBasePath(clientServerConfigurations, servers, logger) {
58
58
  var basePath = clientServerConfigurations.basePath, server = clientServerConfigurations.server, defaultBasePath = clientServerConfigurations.defaultBasePath;
59
59
  if (basePath) {
60
60
  var _logger_debug;
@@ -260,7 +260,7 @@ var AdditionalParamsRequest = /*#__PURE__*/ function() {
260
260
  value: function load(context) {
261
261
  var _this = this;
262
262
  return {
263
- transform: function(data) {
263
+ transform: function transform(data) {
264
264
  return _async_to_generator(function() {
265
265
  var queryParams, _tmp, headers, _tmp1, body, _data_paramSerializationOptions, queryParamsValues, _tmp2;
266
266
  return _ts_generator(this, function(_state) {
@@ -117,7 +117,7 @@ var AdditionalParamsSyncRequest = /*#__PURE__*/ function() {
117
117
  value: function load(context) {
118
118
  var _this = this;
119
119
  return {
120
- transform: function(data) {
120
+ transform: function transform(data) {
121
121
  var queryParams = typeof _this.additionalParams.queryParams === 'function' ? _this.additionalParams.queryParams(data.queryParams) : _this.additionalParams.queryParams;
122
122
  var headers = typeof _this.additionalParams.headers === 'function' ? _this.additionalParams.headers(data.headers) : _this.additionalParams.headers;
123
123
  var body = _this.additionalParams.body && (0, _additionalparamsrequest.isStringOrUndefined)(data.body) ? _this.additionalParams.body(data.body) : undefined;
@@ -184,7 +184,7 @@ var ApiConfigurationOverride = /*#__PURE__*/ function() {
184
184
  value: function load() {
185
185
  var _this = this;
186
186
  return {
187
- transform: function(data) {
187
+ transform: function transform(data) {
188
188
  return _async_to_generator(function() {
189
189
  var jws;
190
190
  return _ts_generator(this, function(_state) {
@@ -224,7 +224,7 @@ describe('ApiConfigurationOverride Plugin', function() {
224
224
  switch(_state.label){
225
225
  case 0:
226
226
  counter = 0;
227
- dynamicJws = function() {
227
+ dynamicJws = function dynamicJws() {
228
228
  return Promise.resolve('dynamicJWS' + counter.toString());
229
229
  };
230
230
  plugin = new _apiconfigurationoverriderequest.ApiConfigurationOverride(dynamicJws);
@@ -184,7 +184,7 @@ var ApiKeyRequest = /*#__PURE__*/ function() {
184
184
  value: function load() {
185
185
  var _this = this;
186
186
  return {
187
- transform: function(data) {
187
+ transform: function transform(data) {
188
188
  return _async_to_generator(function() {
189
189
  var apiKey, _tmp;
190
190
  return _ts_generator(this, function(_state) {
@@ -184,7 +184,7 @@ function impervaProtectionRetrieverFactory(protectionTimeout, tokenTimeout) {
184
184
  if (typeof window === 'undefined') {
185
185
  throw new Error('impervaProtectionRetrieverFactory should be used in a browser context.');
186
186
  }
187
- var getProtection = function() {
187
+ var getProtection = function getProtection() {
188
188
  return new Promise(function(resolve, reject) {
189
189
  var timeout = setTimeout(function() {
190
190
  return reject(new Error("[SDK][Plug-in][BotProtectionFingerprintRequest] Timeout: no Protection object was received in time.\nIf the application runs on a domain that is not protected by Imperva, this plugin should be disabled."));
@@ -358,7 +358,7 @@ var BotProtectionFingerprintRequest = /*#__PURE__*/ function() {
358
358
  value: /** @inheritdoc */ function load(context) {
359
359
  var _this = this;
360
360
  return {
361
- transform: function(requestOptions) {
361
+ transform: function transform(requestOptions) {
362
362
  return _async_to_generator(function() {
363
363
  var fingerprint;
364
364
  return _ts_generator(this, function(_state) {
@@ -139,19 +139,19 @@ describe('BotProtectionFingerprint', function() {
139
139
  var tokenValue;
140
140
  var retriever;
141
141
  var protectionResolve = {
142
- token: function() {
142
+ token: function token() {
143
143
  return Promise.resolve(tokenValue);
144
144
  }
145
145
  };
146
146
  var protectionReject = {
147
- token: function() {
147
+ token: function token() {
148
148
  return Promise.reject(new Error('error'));
149
149
  }
150
150
  };
151
- var registerEvent = function(protection) {
151
+ var registerEvent = function registerEvent(protection) {
152
152
  var delay = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
153
153
  Object.defineProperty(global.window, 'protectionLoaded', {
154
- set: function(handler) {
154
+ set: function set(handler) {
155
155
  setTimeout(function() {
156
156
  return handler(protection || protectionResolve);
157
157
  }, delay);
@@ -321,14 +321,14 @@ describe('BotProtectionFingerprint', function() {
321
321
  it('Should return telemetry', function() {
322
322
  // eslint-disable-next-line @typescript-eslint/naming-convention -- naming convention imposed by Akamai
323
323
  expect((0, _botprotectionfingerprintrequest.akamaiTelemetryRetrieverFactory)({
324
- get_telemetry: function() {
324
+ get_telemetry: function get_telemetry() {
325
325
  return 'telemetryValue';
326
326
  }
327
327
  })()).toBe('telemetryValue');
328
328
  global.window = {};
329
329
  // eslint-disable-next-line @typescript-eslint/naming-convention -- naming convention imposed by Akamai
330
330
  global.window.bmak = {
331
- get_telemetry: function() {
331
+ get_telemetry: function get_telemetry() {
332
332
  return 'telemetryValue2';
333
333
  }
334
334
  };
@@ -192,7 +192,7 @@ function _ts_generator(thisArg, body) {
192
192
  };
193
193
  }
194
194
  }
195
- var jwtPayload = function(data) {
195
+ var jwtPayload = function jwtPayload(data) {
196
196
  return _object_spread({
197
197
  sub: 'fact'
198
198
  }, data);
@@ -241,7 +241,7 @@ var ClientFactsRequestPlugin = /*#__PURE__*/ function() {
241
241
  value: function load() {
242
242
  var _this = this;
243
243
  return {
244
- transform: function(data) {
244
+ transform: function transform(data) {
245
245
  return _async_to_generator(function() {
246
246
  var publicFacts, _tmp, _tmp1;
247
247
  return _ts_generator(this, function(_state) {
@@ -282,7 +282,7 @@ describe('Client Facts request plugin', function() {
282
282
  switch(_state.label){
283
283
  case 0:
284
284
  plugin = new _clientfactsrequest.ClientFactsRequestPlugin({
285
- factsFactory: function(request) {
285
+ factsFactory: function factsFactory(request) {
286
286
  if (request.basePath.includes('/order') && request.method !== 'GET') {
287
287
  return specificFacts;
288
288
  }
@@ -343,7 +343,7 @@ describe('Client Facts request plugin', function() {
343
343
  case 0:
344
344
  plugin = new _clientfactsrequest.ClientFactsRequestPlugin({
345
345
  initialGlobalFacts: defaultFacts,
346
- factsFactory: function(request) {
346
+ factsFactory: function factsFactory(request) {
347
347
  if (request.basePath.includes('/order') && request.method !== 'GET') {
348
348
  return specificFacts;
349
349
  }
@@ -372,7 +372,7 @@ describe('Client Facts request plugin', function() {
372
372
  switch(_state.label){
373
373
  case 0:
374
374
  plugin = new _clientfactsrequest.ClientFactsRequestPlugin({
375
- factsFactory: function(request) {
375
+ factsFactory: function factsFactory(request) {
376
376
  if (request.basePath.includes('/order') && request.method !== 'GET') {
377
377
  return new Promise(function(resolve) {
378
378
  return setTimeout(function() {
@@ -62,7 +62,7 @@ var CustomInfoReply = /*#__PURE__*/ function() {
62
62
  value: function load(_context) {
63
63
  var _this = this;
64
64
  return {
65
- transform: function(data) {
65
+ transform: function transform(data) {
66
66
  return Object.assign(data || Object.assign({}, data), {
67
67
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- explicit `any`
68
68
  customInfo: data && data.customInfo ? Object.assign(data.customInfo, _this.customInfo) : _this.customInfo
@@ -55,7 +55,7 @@ var ExceptionReply = /*#__PURE__*/ function() {
55
55
  value: function load(context) {
56
56
  var _this = this;
57
57
  return {
58
- transform: function(res) {
58
+ transform: function transform(res) {
59
59
  if (context.exception) {
60
60
  return res;
61
61
  }
@@ -102,7 +102,7 @@ var FetchCacheRequest = /*#__PURE__*/ function() {
102
102
  value: function load() {
103
103
  var _this = this;
104
104
  return {
105
- transform: function(data) {
105
+ transform: function transform(data) {
106
106
  if (_this.cacheControl && _this.shouldAddCacheControlHeaders) {
107
107
  data.headers.set('Cache-Control', "".concat(_this.cacheControl));
108
108
  if (_this.cacheControl === 'no-cache') {
@@ -57,7 +57,7 @@ var FetchCredentialsRequest = /*#__PURE__*/ function() {
57
57
  value: function load() {
58
58
  var _this = this;
59
59
  return {
60
- transform: function(data) {
60
+ transform: function transform(data) {
61
61
  data.credentials = _this.credentialsValue;
62
62
  return data;
63
63
  }
@@ -56,7 +56,7 @@ var JsonTokenReply = /*#__PURE__*/ function() {
56
56
  value: function load(context) {
57
57
  var _this = this;
58
58
  return {
59
- transform: function(data) {
59
+ transform: function transform(data) {
60
60
  if (!context.response) {
61
61
  return data;
62
62
  }
@@ -56,7 +56,7 @@ var JsonTokenRequest = /*#__PURE__*/ function() {
56
56
  value: function load() {
57
57
  var _this = this;
58
58
  return {
59
- transform: function(data) {
59
+ transform: function transform(data) {
60
60
  // Handle Authorization Tokens
61
61
  var token = typeof sessionStorage === 'undefined' ? _this.sharedMemory[_this.storageTokenKey] : sessionStorage.getItem(_this.storageTokenKey);
62
62
  if (token) {
@@ -330,7 +330,7 @@ var MicroGatewayMiddlewareAuthenticationRequest = /*#__PURE__*/ function() {
330
330
  value: function load() {
331
331
  var _this = this;
332
332
  return {
333
- transform: function(data) {
333
+ transform: function transform(data) {
334
334
  return _async_to_generator(function() {
335
335
  var url, token;
336
336
  return _ts_generator(this, function(_state) {
@@ -180,7 +180,7 @@ var jsonAuthTokenOptions = {
180
180
  oid: 'NCE1A0955'
181
181
  }
182
182
  };
183
- var hmacSHA256NodeImplementation = function(value, secretKey) {
183
+ var hmacSHA256NodeImplementation = function hmacSHA256NodeImplementation(value, secretKey) {
184
184
  var createHmac = require('node:crypto').createHmac;
185
185
  return createHmac('sha256', secretKey).update(value, 'latin1').digest('base64');
186
186
  };
@@ -215,7 +215,7 @@ var MockInterceptRequest = /*#__PURE__*/ function() {
215
215
  _define_property(this, "options", void 0);
216
216
  this.options = _object_spread({
217
217
  disabled: false,
218
- filter: function() {
218
+ filter: function filter() {
219
219
  return true;
220
220
  }
221
221
  }, options);
@@ -226,7 +226,7 @@ var MockInterceptRequest = /*#__PURE__*/ function() {
226
226
  value: /** @inheritdoc */ function load() {
227
227
  var _this = this;
228
228
  return {
229
- transform: function(data) {
229
+ transform: function transform(data) {
230
230
  return _async_to_generator(function() {
231
231
  var requestOption, operationId, mock, text, blob, basePath, headers;
232
232
  return _ts_generator(this, function(_state) {
@@ -145,10 +145,10 @@ var TRACE_ID_LENGTH = 32;
145
145
  var PARENT_ID_LENGTH = 16;
146
146
  var TRACE_ID_REGEXP = new RegExp("^[a-f0-9]{".concat(TRACE_ID_LENGTH, "}$"));
147
147
  var PARENT_ID_REGEXP = new RegExp("^[a-f0-9]{".concat(PARENT_ID_LENGTH, "}$"));
148
- var decodeTraceparentHeader = function(traceparent, options) {
148
+ var decodeTraceparentHeader = function decodeTraceparentHeader(traceparent, options) {
149
149
  var content = traceparent.split('-');
150
150
  var dataField = {};
151
- var logWarning = function() {
151
+ var logWarning = function logWarning() {
152
152
  var _options_logger;
153
153
  return options === null || options === void 0 ? void 0 : (_options_logger = options.logger) === null || _options_logger === void 0 ? void 0 : _options_logger.warn("Invalid traceparent header ".concat(traceparent, ", will be ignored"));
154
154
  };
@@ -208,7 +208,7 @@ var OpenTelemetryTraceparentReply = /*#__PURE__*/ function() {
208
208
  value: /** @inheritdoc */ function load(context) {
209
209
  var _this = this;
210
210
  return {
211
- transform: function(data) {
211
+ transform: function transform(data) {
212
212
  if (!context.response) {
213
213
  return data;
214
214
  }
@@ -119,7 +119,7 @@ var OpenTelemetryTraceparentRequest = /*#__PURE__*/ function() {
119
119
  return _this.options.traceFlags || '';
120
120
  };
121
121
  return {
122
- transform: function(data) {
122
+ transform: function transform(data) {
123
123
  var version = _this.options.version > 0 ? "".concat(_this.options.version.toString(16).toLowerCase().padStart(2, '0'), "-") : '';
124
124
  var traceId = _this.options.generateTraceId ? _this.generateTraceId() : '0'.repeat(32);
125
125
  var content = "".concat(version).concat(traceId, "-").concat(parentId, "-").concat(getTraceFlag().padStart(2, '0')).toLowerCase();
@@ -254,7 +254,7 @@ describe('OpenTelemetry Traceparent Request Plugin', function() {
254
254
  append = jest.fn();
255
255
  plugin = new _opentelemetrytraceparentrequest.OpenTelemetryTraceparentRequest({
256
256
  storage: storage,
257
- traceFlags: function() {
257
+ traceFlags: function traceFlags() {
258
258
  return 'A';
259
259
  },
260
260
  traceparentHeader: 'test header',
@@ -198,7 +198,7 @@ function _ts_generator(thisArg, body) {
198
198
  function createJwtPiiEncoder(applicationId) {
199
199
  var expirationDelay = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 3600;
200
200
  var jwtEncoder = (0, _jsontoken.createJwtEncoder)();
201
- var jwtPayload = function(values) {
201
+ var jwtPayload = function jwtPayload(values) {
202
202
  var timestamp = Math.floor(Date.now() / 1000);
203
203
  return {
204
204
  sub: 'pii',
@@ -215,7 +215,7 @@ function createJwtPiiEncoder(applicationId) {
215
215
  function createJwePiiEncoder(applicationId) {
216
216
  var expirationDelay = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 3600, key = arguments.length > 2 ? arguments[2] : void 0, publicProperties = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : [], useHeaderAsAAD = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
217
217
  var jweEncoder = (0, _jsontoken.createJweEncoder)(128, useHeaderAsAAD);
218
- var jwePayload = function(values) {
218
+ var jwePayload = function jwePayload(values) {
219
219
  var timestamp = Math.floor(Date.now() / 1000);
220
220
  return {
221
221
  sub: 'pii',
@@ -298,7 +298,7 @@ var PiiTokenizerRequest = /*#__PURE__*/ function() {
298
298
  value: /** @inheritdoc */ function load(context) {
299
299
  var _this = this;
300
300
  return {
301
- transform: function(data) {
301
+ transform: function transform(data) {
302
302
  return _async_to_generator(function() {
303
303
  var _data_metadata, _data_metadata_deepLinkOptions, token, challengeAnswers, token1;
304
304
  return _ts_generator(this, function(_state) {
@@ -89,7 +89,7 @@ var RawResponseInfoReply = /*#__PURE__*/ function() {
89
89
  key: "load",
90
90
  value: function load(context) {
91
91
  return {
92
- transform: function(data) {
92
+ transform: function transform(data) {
93
93
  if (!context.response) {
94
94
  return data;
95
95
  }
@@ -70,7 +70,7 @@ var ReviverReply = /*#__PURE__*/ function() {
70
70
  logger: context.logger
71
71
  }, this.options);
72
72
  return {
73
- transform: function(data) {
73
+ transform: function transform(data) {
74
74
  var ret = context.reviver && data ? context.reviver(data, context.dictionaries, options) : data || {};
75
75
  return ret;
76
76
  }
@@ -75,7 +75,7 @@ var SessionIdRequest = /*#__PURE__*/ function() {
75
75
  var _this = this;
76
76
  var sessionId = this.sessionId || (this.sessionId = this.generateSessionId(context === null || context === void 0 ? void 0 : context.logger));
77
77
  return {
78
- transform: function(data) {
78
+ transform: function transform(data) {
79
79
  data.headers.append(_this.sessionIdHeader, _this.requestIdActivated ? "".concat(sessionId, ":").concat(_this.generateRequestId()) : sessionId);
80
80
  return data;
81
81
  }
@@ -89,7 +89,7 @@ var SiTokenRequest = /*#__PURE__*/ function(AdditionalParamsRequest) {
89
89
  var _this;
90
90
  _this = _call_super(this, SiTokenRequest, [
91
91
  {
92
- queryParams: function(queryParams) {
92
+ queryParams: function queryParams(queryParams) {
93
93
  var ret = queryParams || {};
94
94
  if (_assert_this_initialized(_this).siToken) {
95
95
  ret.SITK = _assert_this_initialized(_this).siToken;
@@ -225,7 +225,7 @@ var SimpleApiKeyAuthenticationRequest = /*#__PURE__*/ function() {
225
225
  value: function load() {
226
226
  var _this = this;
227
227
  return {
228
- transform: function(data) {
228
+ transform: function transform(data) {
229
229
  return _async_to_generator(function() {
230
230
  var _, _1, _tmp, _tmp1, officeId, _tmp2;
231
231
  return _ts_generator(this, function(_state) {
@@ -181,7 +181,7 @@ var UrlRewriteRequest = /*#__PURE__*/ function() {
181
181
  value: function load() {
182
182
  var _this = this;
183
183
  return {
184
- transform: function(data) {
184
+ transform: function transform(data) {
185
185
  return _async_to_generator(function() {
186
186
  return _ts_generator(this, function(_state) {
187
187
  switch(_state.label){
@@ -651,7 +651,7 @@ describe('JSON Web Encryption Token', function() {
651
651
  8
652
652
  ]);
653
653
  /* eslint-enable @stylistic/max-len */ global.window = {
654
- btoa: function(data) {
654
+ btoa: function btoa(data) {
655
655
  return Buffer.from(data, 'ascii').toString('base64');
656
656
  },
657
657
  crypto: {
@@ -50,7 +50,7 @@ function _unsupported_iterable_to_array(o, minLen) {
50
50
  * @param servers List of servers defined in the specification
51
51
  * @param logger Logger to use to report messages
52
52
  * @returns The selected server URL
53
- */ export var selectServerBasePath = function(clientServerConfigurations, servers, logger) {
53
+ */ export var selectServerBasePath = function selectServerBasePath(clientServerConfigurations, servers, logger) {
54
54
  var basePath = clientServerConfigurations.basePath, server = clientServerConfigurations.server, defaultBasePath = clientServerConfigurations.defaultBasePath;
55
55
  if (basePath) {
56
56
  var _logger_debug;
@@ -248,7 +248,7 @@ import { isParamValueRecord, serializeRequestPluginQueryParams } from '../../fwk
248
248
  value: function load(context) {
249
249
  var _this = this;
250
250
  return {
251
- transform: function(data) {
251
+ transform: function transform(data) {
252
252
  return _async_to_generator(function() {
253
253
  var queryParams, _tmp, headers, _tmp1, body, _data_paramSerializationOptions, queryParamsValues, _tmp2;
254
254
  return _ts_generator(this, function(_state) {
@@ -109,7 +109,7 @@ import { isStringOrUndefined } from './additional-params-request';
109
109
  value: function load(context) {
110
110
  var _this = this;
111
111
  return {
112
- transform: function(data) {
112
+ transform: function transform(data) {
113
113
  var queryParams = typeof _this.additionalParams.queryParams === 'function' ? _this.additionalParams.queryParams(data.queryParams) : _this.additionalParams.queryParams;
114
114
  var headers = typeof _this.additionalParams.headers === 'function' ? _this.additionalParams.headers(data.headers) : _this.additionalParams.headers;
115
115
  var body = _this.additionalParams.body && isStringOrUndefined(data.body) ? _this.additionalParams.body(data.body) : undefined;
@@ -178,7 +178,7 @@ function _ts_generator(thisArg, body) {
178
178
  value: function load() {
179
179
  var _this = this;
180
180
  return {
181
- transform: function(data) {
181
+ transform: function transform(data) {
182
182
  return _async_to_generator(function() {
183
183
  var jws;
184
184
  return _ts_generator(this, function(_state) {
@@ -220,7 +220,7 @@ describe('ApiConfigurationOverride Plugin', function() {
220
220
  switch(_state.label){
221
221
  case 0:
222
222
  counter = 0;
223
- dynamicJws = function() {
223
+ dynamicJws = function dynamicJws() {
224
224
  return Promise.resolve('dynamicJWS' + counter.toString());
225
225
  };
226
226
  plugin = new ApiConfigurationOverride(dynamicJws);
@@ -176,7 +176,7 @@ function _ts_generator(thisArg, body) {
176
176
  value: function load() {
177
177
  var _this = this;
178
178
  return {
179
- transform: function(data) {
179
+ transform: function transform(data) {
180
180
  return _async_to_generator(function() {
181
181
  var apiKey, _tmp;
182
182
  return _ts_generator(this, function(_state) {
@@ -169,7 +169,7 @@ function _ts_generator(thisArg, body) {
169
169
  if (typeof window === 'undefined') {
170
170
  throw new Error('impervaProtectionRetrieverFactory should be used in a browser context.');
171
171
  }
172
- var getProtection = function() {
172
+ var getProtection = function getProtection() {
173
173
  return new Promise(function(resolve, reject) {
174
174
  var timeout = setTimeout(function() {
175
175
  return reject(new Error("[SDK][Plug-in][BotProtectionFingerprintRequest] Timeout: no Protection object was received in time.\nIf the application runs on a domain that is not protected by Imperva, this plugin should be disabled."));
@@ -409,7 +409,7 @@ function _ts_generator(thisArg, body) {
409
409
  value: /** @inheritdoc */ function load(context) {
410
410
  var _this = this;
411
411
  return {
412
- transform: function(requestOptions) {
412
+ transform: function transform(requestOptions) {
413
413
  return _async_to_generator(function() {
414
414
  var fingerprint;
415
415
  return _ts_generator(this, function(_state) {
@@ -135,19 +135,19 @@ describe('BotProtectionFingerprint', function() {
135
135
  var tokenValue;
136
136
  var retriever;
137
137
  var protectionResolve = {
138
- token: function() {
138
+ token: function token() {
139
139
  return Promise.resolve(tokenValue);
140
140
  }
141
141
  };
142
142
  var protectionReject = {
143
- token: function() {
143
+ token: function token() {
144
144
  return Promise.reject(new Error('error'));
145
145
  }
146
146
  };
147
- var registerEvent = function(protection) {
147
+ var registerEvent = function registerEvent(protection) {
148
148
  var delay = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
149
149
  Object.defineProperty(global.window, 'protectionLoaded', {
150
- set: function(handler) {
150
+ set: function set(handler) {
151
151
  setTimeout(function() {
152
152
  return handler(protection || protectionResolve);
153
153
  }, delay);
@@ -317,14 +317,14 @@ describe('BotProtectionFingerprint', function() {
317
317
  it('Should return telemetry', function() {
318
318
  // eslint-disable-next-line @typescript-eslint/naming-convention -- naming convention imposed by Akamai
319
319
  expect(akamaiTelemetryRetrieverFactory({
320
- get_telemetry: function() {
320
+ get_telemetry: function get_telemetry() {
321
321
  return 'telemetryValue';
322
322
  }
323
323
  })()).toBe('telemetryValue');
324
324
  global.window = {};
325
325
  // eslint-disable-next-line @typescript-eslint/naming-convention -- naming convention imposed by Akamai
326
326
  global.window.bmak = {
327
- get_telemetry: function() {
327
+ get_telemetry: function get_telemetry() {
328
328
  return 'telemetryValue2';
329
329
  }
330
330
  };
@@ -174,7 +174,7 @@ function _ts_generator(thisArg, body) {
174
174
  }
175
175
  }
176
176
  import { createJwtEncoder } from '../../utils/json-token';
177
- var jwtPayload = function(data) {
177
+ var jwtPayload = function jwtPayload(data) {
178
178
  return _object_spread({
179
179
  sub: 'fact'
180
180
  }, data);
@@ -290,7 +290,7 @@ var jwtPayload = function(data) {
290
290
  value: function load() {
291
291
  var _this = this;
292
292
  return {
293
- transform: function(data) {
293
+ transform: function transform(data) {
294
294
  return _async_to_generator(function() {
295
295
  var publicFacts, _tmp, _tmp1;
296
296
  return _ts_generator(this, function(_state) {
@@ -278,7 +278,7 @@ describe('Client Facts request plugin', function() {
278
278
  switch(_state.label){
279
279
  case 0:
280
280
  plugin = new ClientFactsRequestPlugin({
281
- factsFactory: function(request) {
281
+ factsFactory: function factsFactory(request) {
282
282
  if (request.basePath.includes('/order') && request.method !== 'GET') {
283
283
  return specificFacts;
284
284
  }
@@ -339,7 +339,7 @@ describe('Client Facts request plugin', function() {
339
339
  case 0:
340
340
  plugin = new ClientFactsRequestPlugin({
341
341
  initialGlobalFacts: defaultFacts,
342
- factsFactory: function(request) {
342
+ factsFactory: function factsFactory(request) {
343
343
  if (request.basePath.includes('/order') && request.method !== 'GET') {
344
344
  return specificFacts;
345
345
  }
@@ -368,7 +368,7 @@ describe('Client Facts request plugin', function() {
368
368
  switch(_state.label){
369
369
  case 0:
370
370
  plugin = new ClientFactsRequestPlugin({
371
- factsFactory: function(request) {
371
+ factsFactory: function factsFactory(request) {
372
372
  if (request.basePath.includes('/order') && request.method !== 'GET') {
373
373
  return new Promise(function(resolve) {
374
374
  return setTimeout(function() {
@@ -54,7 +54,7 @@ function _define_property(obj, key, value) {
54
54
  value: function load(_context) {
55
55
  var _this = this;
56
56
  return {
57
- transform: function(data) {
57
+ transform: function transform(data) {
58
58
  return Object.assign(data || Object.assign({}, data), {
59
59
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- explicit `any`
60
60
  customInfo: data && data.customInfo ? Object.assign(data.customInfo, _this.customInfo) : _this.customInfo
@@ -47,7 +47,7 @@ import { EmptyResponseError, RequestFailedError } from '../../fwk/errors';
47
47
  value: function load(context) {
48
48
  var _this = this;
49
49
  return {
50
- transform: function(res) {
50
+ transform: function transform(res) {
51
51
  if (context.exception) {
52
52
  return res;
53
53
  }
@@ -101,7 +101,7 @@ function _object_spread_props(target, source) {
101
101
  value: function load() {
102
102
  var _this = this;
103
103
  return {
104
- transform: function(data) {
104
+ transform: function transform(data) {
105
105
  if (_this.cacheControl && _this.shouldAddCacheControlHeaders) {
106
106
  data.headers.set('Cache-Control', "".concat(_this.cacheControl));
107
107
  if (_this.cacheControl === 'no-cache') {
@@ -49,7 +49,7 @@ function _define_property(obj, key, value) {
49
49
  value: function load() {
50
50
  var _this = this;
51
51
  return {
52
- transform: function(data) {
52
+ transform: function transform(data) {
53
53
  data.credentials = _this.credentialsValue;
54
54
  return data;
55
55
  }
@@ -48,7 +48,7 @@ function _define_property(obj, key, value) {
48
48
  value: function load(context) {
49
49
  var _this = this;
50
50
  return {
51
- transform: function(data) {
51
+ transform: function transform(data) {
52
52
  if (!context.response) {
53
53
  return data;
54
54
  }
@@ -48,7 +48,7 @@ function _define_property(obj, key, value) {
48
48
  value: function load() {
49
49
  var _this = this;
50
50
  return {
51
- transform: function(data) {
51
+ transform: function transform(data) {
52
52
  // Handle Authorization Tokens
53
53
  var token = typeof sessionStorage === 'undefined' ? _this.sharedMemory[_this.storageTokenKey] : sessionStorage.getItem(_this.storageTokenKey);
54
54
  if (token) {
@@ -323,7 +323,7 @@ import { hmacSHA256, sha256 } from './mgw-mdw-auth-helpers';
323
323
  value: function load() {
324
324
  var _this = this;
325
325
  return {
326
- transform: function(data) {
326
+ transform: function transform(data) {
327
327
  return _async_to_generator(function() {
328
328
  var url, token;
329
329
  return _ts_generator(this, function(_state) {
@@ -176,7 +176,7 @@ var jsonAuthTokenOptions = {
176
176
  oid: 'NCE1A0955'
177
177
  }
178
178
  };
179
- var hmacSHA256NodeImplementation = function(value, secretKey) {
179
+ var hmacSHA256NodeImplementation = function hmacSHA256NodeImplementation(value, secretKey) {
180
180
  var createHmac = require('node:crypto').createHmac;
181
181
  return createHmac('sha256', secretKey).update(value, 'latin1').digest('base64');
182
182
  };
@@ -207,7 +207,7 @@ import { CUSTOM_MOCK_OPERATION_ID_HEADER, CUSTOM_MOCK_REQUEST_HEADER } from './m
207
207
  _define_property(this, "options", void 0);
208
208
  this.options = _object_spread({
209
209
  disabled: false,
210
- filter: function() {
210
+ filter: function filter() {
211
211
  return true;
212
212
  }
213
213
  }, options);
@@ -218,7 +218,7 @@ import { CUSTOM_MOCK_OPERATION_ID_HEADER, CUSTOM_MOCK_REQUEST_HEADER } from './m
218
218
  value: /** @inheritdoc */ function load() {
219
219
  var _this = this;
220
220
  return {
221
- transform: function(data) {
221
+ transform: function transform(data) {
222
222
  return _async_to_generator(function() {
223
223
  var requestOption, operationId, mock, text, blob, basePath, headers;
224
224
  return _ts_generator(this, function(_state) {
@@ -133,10 +133,10 @@ var PARENT_ID_REGEXP = new RegExp("^[a-f0-9]{".concat(PARENT_ID_LENGTH, "}$"));
133
133
  * @param traceparent content of the header
134
134
  * @param options additional options for the function
135
135
  * @param options.logger
136
- */ export var decodeTraceparentHeader = function(traceparent, options) {
136
+ */ export var decodeTraceparentHeader = function decodeTraceparentHeader(traceparent, options) {
137
137
  var content = traceparent.split('-');
138
138
  var dataField = {};
139
- var logWarning = function() {
139
+ var logWarning = function logWarning() {
140
140
  var _options_logger;
141
141
  return options === null || options === void 0 ? void 0 : (_options_logger = options.logger) === null || _options_logger === void 0 ? void 0 : _options_logger.warn("Invalid traceparent header ".concat(traceparent, ", will be ignored"));
142
142
  };
@@ -199,7 +199,7 @@ var PARENT_ID_REGEXP = new RegExp("^[a-f0-9]{".concat(PARENT_ID_LENGTH, "}$"));
199
199
  value: /** @inheritdoc */ function load(context) {
200
200
  var _this = this;
201
201
  return {
202
- transform: function(data) {
202
+ transform: function transform(data) {
203
203
  if (!context.response) {
204
204
  return data;
205
205
  }
@@ -112,7 +112,7 @@ var DEFAULT_OPTIONS = _object_spread_props(_object_spread({}, DEFAULT_COMMON_OPT
112
112
  return _this.options.traceFlags || '';
113
113
  };
114
114
  return {
115
- transform: function(data) {
115
+ transform: function transform(data) {
116
116
  var version = _this.options.version > 0 ? "".concat(_this.options.version.toString(16).toLowerCase().padStart(2, '0'), "-") : '';
117
117
  var traceId = _this.options.generateTraceId ? _this.generateTraceId() : '0'.repeat(32);
118
118
  var content = "".concat(version).concat(traceId, "-").concat(parentId, "-").concat(getTraceFlag().padStart(2, '0')).toLowerCase();
@@ -250,7 +250,7 @@ describe('OpenTelemetry Traceparent Request Plugin', function() {
250
250
  append = jest.fn();
251
251
  plugin = new OpenTelemetryTraceparentRequest({
252
252
  storage: storage,
253
- traceFlags: function() {
253
+ traceFlags: function traceFlags() {
254
254
  return 'A';
255
255
  },
256
256
  traceparentHeader: 'test header',
@@ -181,7 +181,7 @@ import { createJweEncoder, createJwtEncoder } from '../../utils/json-token';
181
181
  */ export function createJwtPiiEncoder(applicationId) {
182
182
  var expirationDelay = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 3600;
183
183
  var jwtEncoder = createJwtEncoder();
184
- var jwtPayload = function(values) {
184
+ var jwtPayload = function jwtPayload(values) {
185
185
  var timestamp = Math.floor(Date.now() / 1000);
186
186
  return {
187
187
  sub: 'pii',
@@ -207,7 +207,7 @@ import { createJweEncoder, createJwtEncoder } from '../../utils/json-token';
207
207
  */ export function createJwePiiEncoder(applicationId) {
208
208
  var expirationDelay = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 3600, key = arguments.length > 2 ? arguments[2] : void 0, publicProperties = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : [], useHeaderAsAAD = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
209
209
  var jweEncoder = createJweEncoder(128, useHeaderAsAAD);
210
- var jwePayload = function(values) {
210
+ var jwePayload = function jwePayload(values) {
211
211
  var timestamp = Math.floor(Date.now() / 1000);
212
212
  return {
213
213
  sub: 'pii',
@@ -348,7 +348,7 @@ import { createJweEncoder, createJwtEncoder } from '../../utils/json-token';
348
348
  value: /** @inheritdoc */ function load(context) {
349
349
  var _this = this;
350
350
  return {
351
- transform: function(data) {
351
+ transform: function transform(data) {
352
352
  return _async_to_generator(function() {
353
353
  var _data_metadata, _data_metadata_deepLinkOptions, token, challengeAnswers, token1;
354
354
  return _ts_generator(this, function(_state) {
@@ -81,7 +81,7 @@ function _object_spread_props(target, source) {
81
81
  key: "load",
82
82
  value: function load(context) {
83
83
  return {
84
- transform: function(data) {
84
+ transform: function transform(data) {
85
85
  if (!context.response) {
86
86
  return data;
87
87
  }
@@ -62,7 +62,7 @@ function _object_spread(target) {
62
62
  logger: context.logger
63
63
  }, this.options);
64
64
  return {
65
- transform: function(data) {
65
+ transform: function transform(data) {
66
66
  var ret = context.reviver && data ? context.reviver(data, context.dictionaries, options) : data || {};
67
67
  return ret;
68
68
  }
@@ -74,7 +74,7 @@ import { v4 } from 'uuid';
74
74
  var _this = this;
75
75
  var sessionId = this.sessionId || (this.sessionId = this.generateSessionId(context === null || context === void 0 ? void 0 : context.logger));
76
76
  return {
77
- transform: function(data) {
77
+ transform: function transform(data) {
78
78
  data.headers.append(_this.sessionIdHeader, _this.requestIdActivated ? "".concat(sessionId, ":").concat(_this.generateRequestId()) : sessionId);
79
79
  return data;
80
80
  }
@@ -81,7 +81,7 @@ import { AdditionalParamsRequest } from '../additional-params';
81
81
  var _this;
82
82
  _this = _call_super(this, SiTokenRequest, [
83
83
  {
84
- queryParams: function(queryParams) {
84
+ queryParams: function queryParams(queryParams) {
85
85
  var ret = queryParams || {};
86
86
  if (_assert_this_initialized(_this).siToken) {
87
87
  ret.SITK = _assert_this_initialized(_this).siToken;
@@ -260,7 +260,7 @@ import { createJwtEncoder } from '../../utils/json-token';
260
260
  value: function load() {
261
261
  var _this = this;
262
262
  return {
263
- transform: function(data) {
263
+ transform: function transform(data) {
264
264
  return _async_to_generator(function() {
265
265
  var _, _1, _tmp, _tmp1, officeId, _tmp2;
266
266
  return _ts_generator(this, function(_state) {
@@ -173,7 +173,7 @@ function _ts_generator(thisArg, body) {
173
173
  value: function load() {
174
174
  var _this = this;
175
175
  return {
176
- transform: function(data) {
176
+ transform: function transform(data) {
177
177
  return _async_to_generator(function() {
178
178
  return _ts_generator(this, function(_state) {
179
179
  switch(_state.label){
@@ -642,7 +642,7 @@ describe('JSON Web Encryption Token', function() {
642
642
  8
643
643
  ]);
644
644
  /* eslint-enable @stylistic/max-len */ global.window = {
645
- btoa: function(data) {
645
+ btoa: function btoa(data) {
646
646
  return Buffer.from(data, 'ascii').toString('base64');
647
647
  },
648
648
  crypto: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ama-sdk/core",
3
- "version": "14.0.0-prerelease.26",
3
+ "version": "14.0.0-prerelease.28",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -43,7 +43,7 @@
43
43
  "build:builders": "tsc -b tsconfig.builders.json --pretty && yarn generate-cjs-manifest"
44
44
  },
45
45
  "dependencies": {
46
- "@o3r/schematics": "~14.0.0-prerelease.26",
46
+ "@o3r/schematics": "~14.0.0-prerelease.28",
47
47
  "@swc/helpers": "~0.5.17",
48
48
  "tslib": "^2.6.2",
49
49
  "uuid": "~13.0.0"
@@ -51,7 +51,7 @@
51
51
  "peerDependencies": {
52
52
  "@angular-devkit/schematics": "^21.0.0",
53
53
  "@angular/cli": "^21.0.0",
54
- "@o3r/schematics": "~14.0.0-prerelease.26",
54
+ "@o3r/schematics": "~14.0.0-prerelease.28",
55
55
  "@schematics/angular": "^21.0.0",
56
56
  "typescript": "^5.9.0"
57
57
  },
@@ -80,9 +80,9 @@
80
80
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
81
81
  "@nx/eslint-plugin": "~22.3.3",
82
82
  "@nx/jest": "~22.3.3",
83
- "@o3r/build-helpers": "~14.0.0-prerelease.26",
84
- "@o3r/eslint-plugin": "~14.0.0-prerelease.26",
85
- "@o3r/test-helpers": "~14.0.0-prerelease.26",
83
+ "@o3r/build-helpers": "~14.0.0-prerelease.28",
84
+ "@o3r/eslint-plugin": "~14.0.0-prerelease.28",
85
+ "@o3r/test-helpers": "~14.0.0-prerelease.28",
86
86
  "@schematics/angular": "~21.0.2",
87
87
  "@stylistic/eslint-plugin": "~5.6.0",
88
88
  "@swc/cli": "~0.7.9",