@ama-sdk/core 14.0.0-prerelease.9 → 14.1.0-prerelease.0

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 (91) hide show
  1. package/cjs/fwk/api-helpers.js +0 -12
  2. package/cjs/fwk/core/api-client.js +1 -1
  3. package/cjs/fwk/core/base-api-constructor.js +0 -13
  4. package/cjs/fwk/date.js +0 -14
  5. package/cjs/fwk/server.js +1 -1
  6. package/cjs/plugins/additional-params/additional-params-request.js +1 -1
  7. package/cjs/plugins/additional-params/additional-params-sync-request.js +1 -1
  8. package/cjs/plugins/api-configuration-override/api-configuration-override-request.js +1 -1
  9. package/cjs/plugins/api-configuration-override/api-configuration-override.spec.js +1 -1
  10. package/cjs/plugins/api-key/api-key-request.js +1 -1
  11. package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint-request.js +2 -2
  12. package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +6 -6
  13. package/cjs/plugins/client-facts/client-facts-request.js +2 -2
  14. package/cjs/plugins/client-facts/client-facts.spec.js +3 -3
  15. package/cjs/plugins/custom-info/custom-info-reply.js +1 -1
  16. package/cjs/plugins/exception/exception-reply.js +1 -1
  17. package/cjs/plugins/fetch-cache/fetch-cache-request.js +1 -1
  18. package/cjs/plugins/fetch-credentials/fetch-credentials-request.js +1 -1
  19. package/cjs/plugins/json-token/json-token-reply.js +1 -1
  20. package/cjs/plugins/json-token/json-token-request.js +1 -1
  21. package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth-request.js +1 -1
  22. package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +1 -1
  23. package/cjs/plugins/mock-intercept/mock-intercept-request.js +2 -2
  24. package/cjs/plugins/open-telemetry/traceparent/open-telemetry-traceparent-reply.js +3 -3
  25. package/cjs/plugins/open-telemetry/traceparent/open-telemetry-traceparent-request.js +1 -1
  26. package/cjs/plugins/open-telemetry/traceparent/open-telemetry-traceparent-request.spec.js +1 -1
  27. package/cjs/plugins/pii-tokenizer/pii-tokenizer-request.js +3 -3
  28. package/cjs/plugins/raw-response-info/raw-response-info-reply.js +1 -1
  29. package/cjs/plugins/reviver/reviver-reply.js +1 -1
  30. package/cjs/plugins/session-id/session-id-request.js +1 -1
  31. package/cjs/plugins/si-token/si-token-request.js +1 -1
  32. package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication-request.js +1 -1
  33. package/cjs/plugins/url-rewrite/url-rewrite-request.js +1 -1
  34. package/cjs/utils/generic-api.js +1 -1
  35. package/cjs/utils/json-token.spec.js +1 -1
  36. package/esm2015/fwk/api-helpers.js +1 -14
  37. package/esm2015/fwk/core/api-client.js +1 -1
  38. package/esm2015/fwk/core/base-api-constructor.js +1 -11
  39. package/esm2015/fwk/date.js +0 -14
  40. package/esm2015/fwk/server.js +1 -1
  41. package/esm2015/plugins/additional-params/additional-params-request.js +1 -1
  42. package/esm2015/plugins/additional-params/additional-params-sync-request.js +1 -1
  43. package/esm2015/plugins/api-configuration-override/api-configuration-override-request.js +1 -1
  44. package/esm2015/plugins/api-configuration-override/api-configuration-override.spec.js +1 -1
  45. package/esm2015/plugins/api-key/api-key-request.js +1 -1
  46. package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint-request.js +3 -3
  47. package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +6 -6
  48. package/esm2015/plugins/client-facts/client-facts-request.js +2 -2
  49. package/esm2015/plugins/client-facts/client-facts.spec.js +3 -3
  50. package/esm2015/plugins/custom-info/custom-info-reply.js +1 -1
  51. package/esm2015/plugins/exception/exception-reply.js +1 -1
  52. package/esm2015/plugins/fetch-cache/fetch-cache-request.js +1 -1
  53. package/esm2015/plugins/fetch-credentials/fetch-credentials-request.js +1 -1
  54. package/esm2015/plugins/json-token/json-token-reply.js +1 -1
  55. package/esm2015/plugins/json-token/json-token-request.js +1 -1
  56. package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth-request.js +1 -1
  57. package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +1 -1
  58. package/esm2015/plugins/mock-intercept/mock-intercept-request.js +2 -2
  59. package/esm2015/plugins/open-telemetry/traceparent/open-telemetry-traceparent-reply.js +3 -3
  60. package/esm2015/plugins/open-telemetry/traceparent/open-telemetry-traceparent-request.js +1 -1
  61. package/esm2015/plugins/open-telemetry/traceparent/open-telemetry-traceparent-request.spec.js +1 -1
  62. package/esm2015/plugins/pii-tokenizer/pii-tokenizer-request.js +3 -3
  63. package/esm2015/plugins/raw-response-info/raw-response-info-reply.js +1 -1
  64. package/esm2015/plugins/reviver/reviver-reply.js +1 -1
  65. package/esm2015/plugins/session-id/session-id-request.js +1 -1
  66. package/esm2015/plugins/si-token/si-token-request.js +1 -1
  67. package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication-request.js +1 -1
  68. package/esm2015/plugins/url-rewrite/url-rewrite-request.js +1 -1
  69. package/esm2015/utils/generic-api.js +1 -1
  70. package/esm2015/utils/json-token.spec.js +1 -1
  71. package/package.json +6 -6
  72. package/src/fwk/api-helpers.d.ts +1 -11
  73. package/src/fwk/api-helpers.d.ts.map +1 -1
  74. package/src/fwk/api-helpers.js +1 -17
  75. package/src/fwk/api-helpers.js.map +1 -1
  76. package/src/fwk/core/api-client.d.ts +1 -12
  77. package/src/fwk/core/api-client.d.ts.map +1 -1
  78. package/src/fwk/core/api-client.js +2 -2
  79. package/src/fwk/core/api-client.js.map +1 -1
  80. package/src/fwk/core/base-api-constructor.d.ts +0 -12
  81. package/src/fwk/core/base-api-constructor.d.ts.map +1 -1
  82. package/src/fwk/core/base-api-constructor.js +1 -8
  83. package/src/fwk/core/base-api-constructor.js.map +1 -1
  84. package/src/fwk/date.d.ts +0 -7
  85. package/src/fwk/date.d.ts.map +1 -1
  86. package/src/fwk/date.js +0 -12
  87. package/src/fwk/date.js.map +1 -1
  88. package/src/plugins/bot-protection-fingerprint/bot-protection-fingerprint-request.d.ts +1 -1
  89. package/src/plugins/bot-protection-fingerprint/bot-protection-fingerprint-request.js +1 -1
  90. package/src/utils/generic-api.js +1 -1
  91. package/src/utils/generic-api.js.map +1 -1
@@ -12,9 +12,6 @@ _export(exports, {
12
12
  get computePiiParameterTokens () {
13
13
  return computePiiParameterTokens;
14
14
  },
15
- get extractQueryParams () {
16
- return extractQueryParams;
17
- },
18
15
  get filterUndefinedValues () {
19
16
  return filterUndefinedValues;
20
17
  },
@@ -135,15 +132,6 @@ function prepareUrlWithQueryParams(url) {
135
132
  var queryPart = Object.values(serializedQueryParams).join('&');
136
133
  return url + (queryPart ? paramsPrefix + queryPart : '');
137
134
  }
138
- function extractQueryParams(data, names) {
139
- return names.filter(function(name) {
140
- return typeof data[name] !== 'undefined' && data[name] !== null;
141
- }).reduce(function(acc, name) {
142
- var prop = data[name];
143
- acc[name] = typeof prop.toJSON === 'function' ? prop.toJSON() : (typeof prop === "undefined" ? "undefined" : _type_of(prop)) === 'object' && !Array.isArray(prop) ? JSON.stringify(prop) : prop.toString();
144
- return acc;
145
- }, {});
146
- }
147
135
  function getPropertiesFromData(data, keys) {
148
136
  return keys.reduce(function(acc, key) {
149
137
  acc[key] = data[key];
@@ -10,5 +10,5 @@ Object.defineProperty(exports, "isApiClient", {
10
10
  });
11
11
  function isApiClient(client) {
12
12
  var apiClient = client;
13
- return !!apiClient && !!apiClient.options && typeof apiClient.extractQueryParams === 'function' && typeof apiClient.getRequestOptions === 'function' && typeof apiClient.prepareUrl === 'function' && typeof apiClient.processFormData === 'function' && typeof apiClient.processCall === 'function';
13
+ return !!apiClient && !!apiClient.options && typeof apiClient.stringifyQueryParams === 'function' && typeof apiClient.getRequestOptions === 'function' && (typeof apiClient.prepareUrl === 'function' || typeof apiClient.prepareUrlWithQueryParams === 'function') && typeof apiClient.processFormData === 'function' && typeof apiClient.processCall === 'function';
14
14
  }
@@ -2,16 +2,3 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- Object.defineProperty(exports, "isConstructorObject", {
6
- enumerable: true,
7
- get: function() {
8
- return isConstructorObject;
9
- }
10
- });
11
- function _type_of(obj) {
12
- "@swc/helpers - typeof";
13
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
14
- }
15
- function isConstructorObject(args) {
16
- return !!args && args.length === 1 && !!args[0] && _type_of(args[0]) === 'object';
17
- }
package/cjs/fwk/date.js CHANGED
@@ -271,20 +271,6 @@ var CommonDate = /*#__PURE__*/ function(Date1) {
271
271
  */ function toJSON() {
272
272
  return "".concat(this.getFullYear(), "-").concat(pad(this.getMonth() + 1), "-").concat(pad(this.getDate()));
273
273
  }
274
- },
275
- {
276
- key: "equals",
277
- value: /**
278
- * Compare if two dates are equals.
279
- * @deprecated this will be removed in v14, please use {@link compareDates} instead
280
- * @param {Date} date the date to compare
281
- * @returns {boolean} true if the dates are equals.
282
- */ function equals(date) {
283
- if (!date) {
284
- return false;
285
- }
286
- return this.getFullYear() === date.getFullYear() && this.getMonth() === date.getMonth() && this.getDate() === date.getDate();
287
- }
288
274
  }
289
275
  ]);
290
276
  return Date1;
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){
@@ -220,7 +220,7 @@ var GenericApi = /*#__PURE__*/ function() {
220
220
  ];
221
221
  case 1:
222
222
  options = _state.sent();
223
- url = this.client.prepareUrl(options.basePath, options.queryParams);
223
+ url = this.client.prepareUrlWithQueryParams(options.basePath, options.queryParams);
224
224
  ret = this.client.processCall(url, options, _fwk.ApiTypes.DEFAULT, requestOptions.api.apiName, requestOptions.revivers, requestOptions.operationId);
225
225
  return [
226
226
  2,
@@ -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: {
@@ -81,6 +81,7 @@ import { isDateType } from './param-serialization';
81
81
  * Prepares the url to be called
82
82
  * @param url Base url to be used
83
83
  * @param queryParameters Key value pair with the parameters. If the value is undefined, the key is dropped
84
+ * @deprecated use {@link prepareUrlWithQueryParams} with query parameter serialization, will be removed in v15.
84
85
  */ export function prepareUrl(url) {
85
86
  var queryParameters = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
86
87
  var queryPart = Object.keys(queryParameters).filter(function(name) {
@@ -101,20 +102,6 @@ import { isDateType } from './param-serialization';
101
102
  var queryPart = Object.values(serializedQueryParams).join('&');
102
103
  return url + (queryPart ? paramsPrefix + queryPart : '');
103
104
  }
104
- /**
105
- * Returns a map containing the query parameters
106
- * @param data
107
- * @param names
108
- * @deprecated use {@link stringifyQueryParams} which accepts only supported types, will be removed in v14.
109
- */ export function extractQueryParams(data, names) {
110
- return names.filter(function(name) {
111
- return typeof data[name] !== 'undefined' && data[name] !== null;
112
- }).reduce(function(acc, name) {
113
- var prop = data[name];
114
- acc[name] = typeof prop.toJSON === 'function' ? prop.toJSON() : (typeof prop === "undefined" ? "undefined" : _type_of(prop)) === 'object' && !Array.isArray(prop) ? JSON.stringify(prop) : prop.toString();
115
- return acc;
116
- }, {});
117
- }
118
105
  /**
119
106
  * Get requested properties from data
120
107
  * @param data Data to get properties from
@@ -3,5 +3,5 @@
3
3
  * @param client object to check
4
4
  */ export function isApiClient(client) {
5
5
  var apiClient = client;
6
- return !!apiClient && !!apiClient.options && typeof apiClient.extractQueryParams === 'function' && typeof apiClient.getRequestOptions === 'function' && typeof apiClient.prepareUrl === 'function' && typeof apiClient.processFormData === 'function' && typeof apiClient.processCall === 'function';
6
+ return !!apiClient && !!apiClient.options && typeof apiClient.stringifyQueryParams === 'function' && typeof apiClient.getRequestOptions === 'function' && (typeof apiClient.prepareUrl === 'function' || typeof apiClient.prepareUrlWithQueryParams === 'function') && typeof apiClient.processFormData === 'function' && typeof apiClient.processCall === 'function';
7
7
  }
@@ -1,11 +1 @@
1
- function _type_of(obj) {
2
- "@swc/helpers - typeof";
3
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
4
- }
5
- /**
6
- * Determine if object passed to the constructor is valid
7
- * @deprecated Not used any more as each ApiClient should redefine their constructor options. Will be removed in V14.
8
- * @param args
9
- */ export function isConstructorObject(args) {
10
- return !!args && args.length === 1 && !!args[0] && _type_of(args[0]) === 'object';
11
- }
1
+ /** Interface of the constructor configuration object */ export { };
@@ -256,20 +256,6 @@ export var _NativeDateClass = Date;
256
256
  */ function toJSON() {
257
257
  return "".concat(this.getFullYear(), "-").concat(pad(this.getMonth() + 1), "-").concat(pad(this.getDate()));
258
258
  }
259
- },
260
- {
261
- key: "equals",
262
- value: /**
263
- * Compare if two dates are equals.
264
- * @deprecated this will be removed in v14, please use {@link compareDates} instead
265
- * @param {Date} date the date to compare
266
- * @returns {boolean} true if the dates are equals.
267
- */ function equals(date) {
268
- if (!date) {
269
- return false;
270
- }
271
- return this.getFullYear() === date.getFullYear() && this.getMonth() === date.getMonth() && this.getDate() === date.getDate();
272
- }
273
259
  }
274
260
  ]);
275
261
  return Date1;
@@ -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) {