@ama-sdk/core 10.3.0-prerelease.66 → 10.3.0-prerelease.67

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 (166) hide show
  1. package/cjs/clients/api-angular-client.js +4 -4
  2. package/cjs/clients/api-beacon-client.js +4 -4
  3. package/cjs/clients/api-fetch-client.js +4 -4
  4. package/cjs/fwk/api.helper.spec.js +20 -20
  5. package/cjs/fwk/api.helpers.js +13 -13
  6. package/cjs/fwk/core/api-client.js +1 -1
  7. package/cjs/fwk/core/base-api-constructor.js +1 -1
  8. package/cjs/fwk/date.js +9 -9
  9. package/cjs/fwk/date.spec.js +25 -25
  10. package/cjs/fwk/errors.js +3 -3
  11. package/cjs/fwk/mocks/alf-mock-adapter.js +4 -4
  12. package/cjs/fwk/mocks/base-mock-adapter.js +2 -2
  13. package/cjs/fwk/mocks/helpers.js +3 -3
  14. package/cjs/fwk/reviver.spec.js +19 -19
  15. package/cjs/plugins/additional-params/additional-params-sync.request.js +2 -2
  16. package/cjs/plugins/additional-params/additional-params.request.js +3 -3
  17. package/cjs/plugins/additional-params/additional-params.spec.js +30 -30
  18. package/cjs/plugins/api-configuration-override/api-configuration-override.request.js +2 -2
  19. package/cjs/plugins/api-configuration-override/api-configuration-override.spec.js +13 -13
  20. package/cjs/plugins/api-key/api-key.request.js +2 -2
  21. package/cjs/plugins/api-key/api-key.spec.js +11 -11
  22. package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +5 -5
  23. package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +33 -33
  24. package/cjs/plugins/client-facts/client-facts.request.js +3 -3
  25. package/cjs/plugins/client-facts/client-facts.spec.js +27 -27
  26. package/cjs/plugins/concurrent/concurrent.spec.js +4 -4
  27. package/cjs/plugins/custom-info/custom-info.spec.js +15 -15
  28. package/cjs/plugins/exception/exception.reply.js +2 -2
  29. package/cjs/plugins/exception/exception.spec.js +15 -15
  30. package/cjs/plugins/fetch-cache/fetch-cache.request.js +4 -4
  31. package/cjs/plugins/fetch-cache/fetch-cache.spec.js +20 -20
  32. package/cjs/plugins/fetch-credentials/fetch-credentials.request.js +1 -1
  33. package/cjs/plugins/fetch-credentials/fetch-credentials.spec.js +8 -8
  34. package/cjs/plugins/json-token/json-token.reply.js +5 -5
  35. package/cjs/plugins/json-token/json-token.request.js +4 -4
  36. package/cjs/plugins/json-token/json-token.spec.js +24 -24
  37. package/cjs/plugins/keepalive/keepalive.request.js +2 -2
  38. package/cjs/plugins/keepalive/keepalive.spec.js +4 -4
  39. package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +11 -11
  40. package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +25 -25
  41. package/cjs/plugins/mock-intercept/mock-intercept.fetch.js +3 -3
  42. package/cjs/plugins/mock-intercept/mock-intercept.interface.js +2 -2
  43. package/cjs/plugins/mock-intercept/mock-intercept.request.js +3 -3
  44. package/cjs/plugins/mock-intercept/mock-intercept.spec.js +28 -28
  45. package/cjs/plugins/perf-metric/perf-metric.fetch.js +1 -1
  46. package/cjs/plugins/perf-metric/perf-metric.probe.spec.js +9 -9
  47. package/cjs/plugins/pii-tokenizer/pii-tokenizer.request.js +11 -11
  48. package/cjs/plugins/pii-tokenizer/pii-tokenizer.spec.js +94 -94
  49. package/cjs/plugins/raw-response-info/raw-response-info.spec.js +12 -12
  50. package/cjs/plugins/retry/retry.spec.js +20 -20
  51. package/cjs/plugins/reviver/reviver.spec.js +4 -4
  52. package/cjs/plugins/session-id/session-id.request.js +6 -6
  53. package/cjs/plugins/session-id/session-id.spec.js +13 -13
  54. package/cjs/plugins/si-token/si-token.spec.js +9 -9
  55. package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +4 -4
  56. package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +44 -44
  57. package/cjs/plugins/timeout/timeout.fetch.js +11 -11
  58. package/cjs/plugins/timeout/timeout.spec.js +13 -13
  59. package/cjs/plugins/url-rewrite/url-rewrite.spec.js +9 -9
  60. package/cjs/plugins/wait-for/wait-for.spec.js +9 -9
  61. package/cjs/utils/crypto.js +14 -14
  62. package/cjs/utils/generic-api.js +4 -4
  63. package/cjs/utils/json-token.js +30 -30
  64. package/cjs/utils/json-token.spec.js +31 -31
  65. package/esm2015/clients/api-angular-client.js +8 -8
  66. package/esm2015/clients/api-beacon-client.js +5 -5
  67. package/esm2015/clients/api-fetch-client.js +8 -8
  68. package/esm2015/clients/index.js +2 -2
  69. package/esm2015/fwk/api.helper.spec.js +21 -21
  70. package/esm2015/fwk/api.helpers.js +13 -13
  71. package/esm2015/fwk/core/api-client.js +1 -1
  72. package/esm2015/fwk/core/base-api-constructor.js +1 -1
  73. package/esm2015/fwk/core/index.js +2 -2
  74. package/esm2015/fwk/date.js +9 -9
  75. package/esm2015/fwk/date.spec.js +26 -26
  76. package/esm2015/fwk/errors.js +3 -3
  77. package/esm2015/fwk/index.js +10 -10
  78. package/esm2015/fwk/mocks/alf-mock-adapter.js +6 -6
  79. package/esm2015/fwk/mocks/base-mock-adapter.js +3 -3
  80. package/esm2015/fwk/mocks/helpers.js +3 -3
  81. package/esm2015/fwk/mocks/index.js +10 -10
  82. package/esm2015/fwk/mocks/random-mock-adapter.js +1 -1
  83. package/esm2015/fwk/mocks/sequential-mock-adapter.js +1 -1
  84. package/esm2015/fwk/reviver.spec.js +20 -20
  85. package/esm2015/plugins/additional-params/additional-params-sync.request.js +3 -3
  86. package/esm2015/plugins/additional-params/additional-params.request.js +3 -3
  87. package/esm2015/plugins/additional-params/additional-params.spec.js +32 -32
  88. package/esm2015/plugins/additional-params/index.js +2 -2
  89. package/esm2015/plugins/api-configuration-override/api-configuration-override.request.js +2 -2
  90. package/esm2015/plugins/api-configuration-override/api-configuration-override.spec.js +14 -14
  91. package/esm2015/plugins/api-configuration-override/index.js +1 -1
  92. package/esm2015/plugins/api-key/api-key.request.js +2 -2
  93. package/esm2015/plugins/api-key/api-key.spec.js +12 -12
  94. package/esm2015/plugins/api-key/index.js +1 -1
  95. package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +5 -5
  96. package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +34 -34
  97. package/esm2015/plugins/bot-protection-fingerprint/index.js +1 -1
  98. package/esm2015/plugins/client-facts/client-facts.request.js +4 -4
  99. package/esm2015/plugins/client-facts/client-facts.spec.js +28 -28
  100. package/esm2015/plugins/client-facts/index.js +1 -1
  101. package/esm2015/plugins/concurrent/concurrent.spec.js +5 -5
  102. package/esm2015/plugins/concurrent/index.js +1 -1
  103. package/esm2015/plugins/core/index.js +4 -4
  104. package/esm2015/plugins/custom-info/custom-info.spec.js +17 -17
  105. package/esm2015/plugins/custom-info/index.js +1 -1
  106. package/esm2015/plugins/exception/exception.reply.js +4 -4
  107. package/esm2015/plugins/exception/exception.spec.js +18 -18
  108. package/esm2015/plugins/exception/index.js +1 -1
  109. package/esm2015/plugins/fetch-cache/fetch-cache.request.js +4 -4
  110. package/esm2015/plugins/fetch-cache/fetch-cache.spec.js +21 -21
  111. package/esm2015/plugins/fetch-cache/index.js +1 -1
  112. package/esm2015/plugins/fetch-credentials/fetch-credentials.request.js +1 -1
  113. package/esm2015/plugins/fetch-credentials/fetch-credentials.spec.js +9 -9
  114. package/esm2015/plugins/fetch-credentials/index.js +1 -1
  115. package/esm2015/plugins/index.js +25 -25
  116. package/esm2015/plugins/json-token/index.js +2 -2
  117. package/esm2015/plugins/json-token/json-token.reply.js +5 -5
  118. package/esm2015/plugins/json-token/json-token.request.js +4 -4
  119. package/esm2015/plugins/json-token/json-token.spec.js +27 -27
  120. package/esm2015/plugins/keepalive/index.js +1 -1
  121. package/esm2015/plugins/keepalive/keepalive.request.js +2 -2
  122. package/esm2015/plugins/keepalive/keepalive.spec.js +5 -5
  123. package/esm2015/plugins/mgw-mdw-auth/index.js +1 -1
  124. package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +13 -13
  125. package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +27 -27
  126. package/esm2015/plugins/mock-intercept/index.js +2 -2
  127. package/esm2015/plugins/mock-intercept/mock-intercept.fetch.js +5 -5
  128. package/esm2015/plugins/mock-intercept/mock-intercept.interface.js +2 -2
  129. package/esm2015/plugins/mock-intercept/mock-intercept.request.js +4 -4
  130. package/esm2015/plugins/mock-intercept/mock-intercept.spec.js +32 -32
  131. package/esm2015/plugins/perf-metric/index.js +1 -1
  132. package/esm2015/plugins/perf-metric/perf-metric.fetch.js +2 -2
  133. package/esm2015/plugins/perf-metric/perf-metric.probe.spec.js +10 -10
  134. package/esm2015/plugins/pii-tokenizer/index.js +1 -1
  135. package/esm2015/plugins/pii-tokenizer/pii-tokenizer.request.js +12 -12
  136. package/esm2015/plugins/pii-tokenizer/pii-tokenizer.spec.js +96 -96
  137. package/esm2015/plugins/raw-response-info/index.js +1 -1
  138. package/esm2015/plugins/raw-response-info/raw-response-info.spec.js +14 -14
  139. package/esm2015/plugins/retry/index.js +1 -1
  140. package/esm2015/plugins/retry/retry.fetch.js +1 -1
  141. package/esm2015/plugins/retry/retry.spec.js +21 -21
  142. package/esm2015/plugins/reviver/index.js +1 -1
  143. package/esm2015/plugins/reviver/reviver.spec.js +6 -6
  144. package/esm2015/plugins/session-id/index.js +1 -1
  145. package/esm2015/plugins/session-id/session-id.request.js +7 -7
  146. package/esm2015/plugins/session-id/session-id.spec.js +14 -14
  147. package/esm2015/plugins/si-token/index.js +1 -1
  148. package/esm2015/plugins/si-token/si-token.request.js +1 -1
  149. package/esm2015/plugins/si-token/si-token.spec.js +10 -10
  150. package/esm2015/plugins/simple-api-key-authentication/index.js +1 -1
  151. package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +5 -5
  152. package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +46 -46
  153. package/esm2015/plugins/timeout/index.js +1 -1
  154. package/esm2015/plugins/timeout/timeout.fetch.js +12 -12
  155. package/esm2015/plugins/timeout/timeout.spec.js +15 -15
  156. package/esm2015/plugins/url-rewrite/index.js +1 -1
  157. package/esm2015/plugins/url-rewrite/url-rewrite.spec.js +10 -10
  158. package/esm2015/plugins/wait-for/index.js +1 -1
  159. package/esm2015/plugins/wait-for/wait-for.spec.js +10 -10
  160. package/esm2015/public_api.js +4 -4
  161. package/esm2015/utils/crypto.js +15 -15
  162. package/esm2015/utils/generic-api.js +5 -5
  163. package/esm2015/utils/index.js +6 -6
  164. package/esm2015/utils/json-token.js +32 -32
  165. package/esm2015/utils/json-token.spec.js +32 -32
  166. package/package.json +5 -5
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  var _Reviver = require("./Reviver");
6
- describe("Revivers :", function() {
7
- it("reviveDictionarizedArray", function() {
6
+ describe('Revivers :', function() {
7
+ it('reviveDictionarizedArray', function() {
8
8
  var dictionary = {
9
9
  id1: {
10
- p1: "v1"
10
+ p1: 'v1'
11
11
  },
12
12
  id2: {
13
- p2: "v2"
13
+ p2: 'v2'
14
14
  }
15
15
  };
16
16
  expect((0, _Reviver.reviveDictionarizedArray)(undefined, {}, function(data) {
@@ -20,8 +20,8 @@ describe("Revivers :", function() {
20
20
  return data;
21
21
  })).toEqual({});
22
22
  expect((0, _Reviver.reviveDictionarizedArray)([
23
- "id1",
24
- "id2"
23
+ 'id1',
24
+ 'id2'
25
25
  ], {}, function(data) {
26
26
  return data;
27
27
  })).toEqual({
@@ -32,19 +32,19 @@ describe("Revivers :", function() {
32
32
  return data;
33
33
  })).toEqual({});
34
34
  var result = (0, _Reviver.reviveDictionarizedArray)([
35
- "id1",
36
- "id2"
35
+ 'id1',
36
+ 'id2'
37
37
  ], dictionary, function(data) {
38
38
  return data;
39
39
  });
40
40
  expect(result.id1).toEqual({
41
- p1: "v1"
41
+ p1: 'v1'
42
42
  });
43
43
  expect(result.id2).toEqual({
44
- p2: "v2"
44
+ p2: 'v2'
45
45
  });
46
46
  });
47
- it("should reviveArray propagate the options", function() {
47
+ it('should reviveArray propagate the options', function() {
48
48
  var reviver = jest.fn();
49
49
  var options = {
50
50
  logger: jest.fn()
@@ -54,30 +54,30 @@ describe("Revivers :", function() {
54
54
  ], null, reviver, options);
55
55
  expect(reviver).toHaveBeenCalledWith(1, null, options);
56
56
  });
57
- it("should reviveDictionarizedArray propagate the options", function() {
57
+ it('should reviveDictionarizedArray propagate the options', function() {
58
58
  var reviver = jest.fn();
59
59
  var options = {
60
60
  logger: jest.fn()
61
61
  };
62
62
  var dictionary = {
63
- key: "test"
63
+ key: 'test'
64
64
  };
65
65
  (0, _Reviver.reviveDictionarizedArray)([
66
- "key"
66
+ 'key'
67
67
  ], dictionary, reviver, options);
68
- expect(reviver).toHaveBeenCalledWith("test", dictionary, options);
68
+ expect(reviver).toHaveBeenCalledWith('test', dictionary, options);
69
69
  });
70
- it("should reviveMap propagate the options", function() {
70
+ it('should reviveMap propagate the options', function() {
71
71
  var reviver = jest.fn();
72
72
  var options = {
73
73
  logger: jest.fn()
74
74
  };
75
75
  var dictionary = {
76
- key: "test"
76
+ key: 'test'
77
77
  };
78
78
  (0, _Reviver.reviveMap)([
79
- "key"
79
+ 'key'
80
80
  ], dictionary, reviver, options);
81
- expect(reviver).toHaveBeenCalledWith("key", dictionary, options);
81
+ expect(reviver).toHaveBeenCalledWith('key', dictionary, options);
82
82
  });
83
83
  });
@@ -70,8 +70,8 @@ var AdditionalParamsSyncRequest = /*#__PURE__*/ function() {
70
70
  var _this = this;
71
71
  return {
72
72
  transform: function(data) {
73
- var queryParams = typeof _this.additionalParams.queryParams === "function" ? _this.additionalParams.queryParams(data.queryParams) : _this.additionalParams.queryParams;
74
- var headers = typeof _this.additionalParams.headers === "function" ? _this.additionalParams.headers(data.headers) : _this.additionalParams.headers;
73
+ var queryParams = typeof _this.additionalParams.queryParams === 'function' ? _this.additionalParams.queryParams(data.queryParams) : _this.additionalParams.queryParams;
74
+ var headers = typeof _this.additionalParams.headers === 'function' ? _this.additionalParams.headers(data.headers) : _this.additionalParams.headers;
75
75
  var body = _this.additionalParams.body && (0, _additionalparamsrequest.isStringOrUndefined)(data.body) ? _this.additionalParams.body(data.body) : undefined;
76
76
  if (queryParams) {
77
77
  data.queryParams = _object_spread({}, data.queryParams, queryParams);
@@ -193,7 +193,7 @@ function _ts_generator(thisArg, body) {
193
193
  }
194
194
  function isStringOrUndefined(value) {
195
195
  var type = typeof value === "undefined" ? "undefined" : _type_of(value);
196
- return type === "undefined" || type === "string";
196
+ return type === 'undefined' || type === 'string';
197
197
  }
198
198
  var AdditionalParamsRequest = /*#__PURE__*/ function() {
199
199
  "use strict";
@@ -214,7 +214,7 @@ var AdditionalParamsRequest = /*#__PURE__*/ function() {
214
214
  return _ts_generator(this, function(_state) {
215
215
  switch(_state.label){
216
216
  case 0:
217
- if (!(typeof _this.additionalParams.queryParams === "function")) return [
217
+ if (!(typeof _this.additionalParams.queryParams === 'function')) return [
218
218
  3,
219
219
  2
220
220
  ];
@@ -233,7 +233,7 @@ var AdditionalParamsRequest = /*#__PURE__*/ function() {
233
233
  _state.label = 3;
234
234
  case 3:
235
235
  queryParams = _tmp;
236
- if (!(typeof _this.additionalParams.headers === "function")) return [
236
+ if (!(typeof _this.additionalParams.headers === 'function')) return [
237
237
  3,
238
238
  5
239
239
  ];
@@ -128,33 +128,33 @@ function _ts_generator(thisArg, body) {
128
128
  };
129
129
  }
130
130
  }
131
- describe("Additional Params Request Plugin", function() {
131
+ describe('Additional Params Request Plugin', function() {
132
132
  var additionalGetParams = jest.fn().mockReturnValue({
133
- test: "ok"
133
+ test: 'ok'
134
134
  });
135
- var additionalBody = jest.fn().mockReturnValue("newBody");
135
+ var additionalBody = jest.fn().mockReturnValue('newBody');
136
136
  var defaultGetParams = {
137
- defaultTest: "ok"
137
+ defaultTest: 'ok'
138
138
  };
139
- var defaultBody = "default";
139
+ var defaultBody = 'default';
140
140
  var options;
141
141
  beforeEach(function() {
142
142
  options = {
143
- method: "get",
143
+ method: 'get',
144
144
  queryParams: defaultGetParams,
145
145
  headers: new Headers(),
146
146
  body: defaultBody,
147
- basePath: "http://test.com/truc"
147
+ basePath: 'http://test.com/truc'
148
148
  };
149
149
  });
150
- it("should add a specified query param", /*#__PURE__*/ _async_to_generator(function() {
150
+ it('should add a specified query param', /*#__PURE__*/ _async_to_generator(function() {
151
151
  var plugin, runner, result;
152
152
  return _ts_generator(this, function(_state) {
153
153
  switch(_state.label){
154
154
  case 0:
155
155
  plugin = new _additionalparamsrequest.AdditionalParamsRequest({
156
156
  queryParams: {
157
- test: "ok"
157
+ test: 'ok'
158
158
  }
159
159
  });
160
160
  runner = plugin.load();
@@ -164,14 +164,14 @@ describe("Additional Params Request Plugin", function() {
164
164
  ];
165
165
  case 1:
166
166
  result = _state.sent();
167
- expect(result.queryParams.test).toBe("ok");
167
+ expect(result.queryParams.test).toBe('ok');
168
168
  return [
169
169
  2
170
170
  ];
171
171
  }
172
172
  });
173
173
  }));
174
- it("should add the query params returned by a function", /*#__PURE__*/ _async_to_generator(function() {
174
+ it('should add the query params returned by a function', /*#__PURE__*/ _async_to_generator(function() {
175
175
  var plugin, runner, result;
176
176
  return _ts_generator(this, function(_state) {
177
177
  switch(_state.label){
@@ -187,14 +187,14 @@ describe("Additional Params Request Plugin", function() {
187
187
  case 1:
188
188
  result = _state.sent();
189
189
  expect(additionalGetParams).toHaveBeenCalledWith(defaultGetParams);
190
- expect(result.queryParams.test).toBe("ok");
190
+ expect(result.queryParams.test).toBe('ok');
191
191
  return [
192
192
  2
193
193
  ];
194
194
  }
195
195
  });
196
196
  }));
197
- it("should modify body", /*#__PURE__*/ _async_to_generator(function() {
197
+ it('should modify body', /*#__PURE__*/ _async_to_generator(function() {
198
198
  var plugin, runner, result;
199
199
  return _ts_generator(this, function(_state) {
200
200
  switch(_state.label){
@@ -210,9 +210,9 @@ describe("Additional Params Request Plugin", function() {
210
210
  case 1:
211
211
  result = _state.sent();
212
212
  expect(result.queryParams.test).toBeUndefined();
213
- expect(result.queryParams.defaultTest).toBe("ok");
213
+ expect(result.queryParams.defaultTest).toBe('ok');
214
214
  expect(additionalBody).toHaveBeenCalledWith(defaultBody);
215
- expect(result.body).toBe("newBody");
215
+ expect(result.body).toBe('newBody');
216
216
  return [
217
217
  2
218
218
  ];
@@ -220,53 +220,53 @@ describe("Additional Params Request Plugin", function() {
220
220
  });
221
221
  }));
222
222
  });
223
- describe("Additional Params Request Sync Plugin", function() {
223
+ describe('Additional Params Request Sync Plugin', function() {
224
224
  var additionalGetParams = jest.fn().mockReturnValue({
225
- test: "ok"
225
+ test: 'ok'
226
226
  });
227
- var additionalBody = jest.fn().mockReturnValue("newBody");
227
+ var additionalBody = jest.fn().mockReturnValue('newBody');
228
228
  var defaultGetParams = {
229
- defaultTest: "ok"
229
+ defaultTest: 'ok'
230
230
  };
231
- var defaultBody = "default";
231
+ var defaultBody = 'default';
232
232
  var options;
233
233
  beforeEach(function() {
234
234
  options = {
235
- method: "get",
235
+ method: 'get',
236
236
  queryParams: defaultGetParams,
237
237
  headers: new Headers(),
238
238
  body: defaultBody,
239
- basePath: "http://test.com/truc"
239
+ basePath: 'http://test.com/truc'
240
240
  };
241
241
  });
242
- it("should add a specified query param", function() {
242
+ it('should add a specified query param', function() {
243
243
  var plugin = new _additionalparamssyncrequest.AdditionalParamsSyncRequest({
244
244
  queryParams: {
245
- test: "ok"
245
+ test: 'ok'
246
246
  }
247
247
  });
248
248
  var runner = plugin.load();
249
249
  var result = runner.transform(options);
250
- expect(result.queryParams.test).toBe("ok");
250
+ expect(result.queryParams.test).toBe('ok');
251
251
  });
252
- it("should add the query params returned by a function", function() {
252
+ it('should add the query params returned by a function', function() {
253
253
  var plugin = new _additionalparamssyncrequest.AdditionalParamsSyncRequest({
254
254
  queryParams: additionalGetParams
255
255
  });
256
256
  var runner = plugin.load();
257
257
  var result = runner.transform(options);
258
258
  expect(additionalGetParams).toHaveBeenCalledWith(defaultGetParams);
259
- expect(result.queryParams.test).toBe("ok");
259
+ expect(result.queryParams.test).toBe('ok');
260
260
  });
261
- it("should modify body", function() {
261
+ it('should modify body', function() {
262
262
  var plugin = new _additionalparamssyncrequest.AdditionalParamsSyncRequest({
263
263
  body: additionalBody
264
264
  });
265
265
  var runner = plugin.load();
266
266
  var result = runner.transform(options);
267
267
  expect(result.queryParams.test).toBeUndefined();
268
- expect(result.queryParams.defaultTest).toBe("ok");
268
+ expect(result.queryParams.defaultTest).toBe('ok');
269
269
  expect(additionalBody).toHaveBeenCalledWith(defaultBody);
270
- expect(result.body).toBe("newBody");
270
+ expect(result.body).toBe('newBody');
271
271
  });
272
272
  });
@@ -167,7 +167,7 @@ function _ts_generator(thisArg, body) {
167
167
  var ApiConfigurationOverride = /*#__PURE__*/ function() {
168
168
  "use strict";
169
169
  function ApiConfigurationOverride(jws) {
170
- var headerName = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "ama-client-facts";
170
+ var headerName = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 'ama-client-facts';
171
171
  _class_call_check(this, ApiConfigurationOverride);
172
172
  _define_property(this, "jws", void 0);
173
173
  _define_property(this, "headerName", void 0);
@@ -188,7 +188,7 @@ var ApiConfigurationOverride = /*#__PURE__*/ function() {
188
188
  case 0:
189
189
  return [
190
190
  4,
191
- typeof _this.jws === "function" ? _this.jws() : _this.jws
191
+ typeof _this.jws === 'function' ? _this.jws() : _this.jws
192
192
  ];
193
193
  case 1:
194
194
  jws = _state.sent();
@@ -145,7 +145,7 @@ function _ts_generator(thisArg, body) {
145
145
  };
146
146
  }
147
147
  }
148
- describe("ApiConfigurationOverride Plugin", function() {
148
+ describe('ApiConfigurationOverride Plugin', function() {
149
149
  var options;
150
150
  var FakeHeader = function FakeHeader() {
151
151
  "use strict";
@@ -164,17 +164,17 @@ describe("ApiConfigurationOverride Plugin", function() {
164
164
  };
165
165
  beforeEach(function() {
166
166
  options = {
167
- method: "get",
167
+ method: 'get',
168
168
  headers: new FakeHeader(),
169
- basePath: "http://test.com/api"
169
+ basePath: 'http://test.com/api'
170
170
  };
171
171
  });
172
- it("should add a specified string JWS", /*#__PURE__*/ _async_to_generator(function() {
172
+ it('should add a specified string JWS', /*#__PURE__*/ _async_to_generator(function() {
173
173
  var plugin, runner, result;
174
174
  return _ts_generator(this, function(_state) {
175
175
  switch(_state.label){
176
176
  case 0:
177
- plugin = new _apiconfigurationoverriderequest.ApiConfigurationOverride("fakeJWS");
177
+ plugin = new _apiconfigurationoverriderequest.ApiConfigurationOverride('fakeJWS');
178
178
  runner = plugin.load();
179
179
  return [
180
180
  4,
@@ -182,19 +182,19 @@ describe("ApiConfigurationOverride Plugin", function() {
182
182
  ];
183
183
  case 1:
184
184
  result = _state.sent();
185
- expect(result.headers.get("ama-client-facts")).toBe("fakeJWS");
185
+ expect(result.headers.get('ama-client-facts')).toBe('fakeJWS');
186
186
  return [
187
187
  2
188
188
  ];
189
189
  }
190
190
  });
191
191
  }));
192
- it("should add a specified string JWS with a custom header name", /*#__PURE__*/ _async_to_generator(function() {
192
+ it('should add a specified string JWS with a custom header name', /*#__PURE__*/ _async_to_generator(function() {
193
193
  var plugin, runner, result;
194
194
  return _ts_generator(this, function(_state) {
195
195
  switch(_state.label){
196
196
  case 0:
197
- plugin = new _apiconfigurationoverriderequest.ApiConfigurationOverride("fakeJWS", "my-header");
197
+ plugin = new _apiconfigurationoverriderequest.ApiConfigurationOverride('fakeJWS', 'my-header');
198
198
  runner = plugin.load();
199
199
  return [
200
200
  4,
@@ -202,21 +202,21 @@ describe("ApiConfigurationOverride Plugin", function() {
202
202
  ];
203
203
  case 1:
204
204
  result = _state.sent();
205
- expect(result.headers.get("my-header")).toBe("fakeJWS");
205
+ expect(result.headers.get('my-header')).toBe('fakeJWS');
206
206
  return [
207
207
  2
208
208
  ];
209
209
  }
210
210
  });
211
211
  }));
212
- it("should add a specified dynamic JWS", /*#__PURE__*/ _async_to_generator(function() {
212
+ it('should add a specified dynamic JWS', /*#__PURE__*/ _async_to_generator(function() {
213
213
  var counter, dynamicJws, plugin, runner, result;
214
214
  return _ts_generator(this, function(_state) {
215
215
  switch(_state.label){
216
216
  case 0:
217
217
  counter = 0;
218
218
  dynamicJws = function() {
219
- return Promise.resolve("dynamicJWS" + counter.toString());
219
+ return Promise.resolve('dynamicJWS' + counter.toString());
220
220
  };
221
221
  plugin = new _apiconfigurationoverriderequest.ApiConfigurationOverride(dynamicJws);
222
222
  runner = plugin.load();
@@ -226,7 +226,7 @@ describe("ApiConfigurationOverride Plugin", function() {
226
226
  ];
227
227
  case 1:
228
228
  result = _state.sent();
229
- expect(result.headers.get("ama-client-facts")).toBe("dynamicJWS0");
229
+ expect(result.headers.get('ama-client-facts')).toBe('dynamicJWS0');
230
230
  counter++;
231
231
  runner = plugin.load();
232
232
  return [
@@ -235,7 +235,7 @@ describe("ApiConfigurationOverride Plugin", function() {
235
235
  ];
236
236
  case 2:
237
237
  result = _state.sent();
238
- expect(result.headers.get("ama-client-facts")).toContain("dynamicJWS1");
238
+ expect(result.headers.get('ama-client-facts')).toContain('dynamicJWS1');
239
239
  return [
240
240
  2
241
241
  ];
@@ -167,7 +167,7 @@ function _ts_generator(thisArg, body) {
167
167
  var ApiKeyRequest = /*#__PURE__*/ function() {
168
168
  "use strict";
169
169
  function ApiKeyRequest(apiKey) {
170
- var apiKeyHeader = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "apiKey";
170
+ var apiKeyHeader = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 'apiKey';
171
171
  _class_call_check(this, ApiKeyRequest);
172
172
  _define_property(this, "apiKey", void 0);
173
173
  _define_property(this, "apiKeyHeader", void 0);
@@ -186,7 +186,7 @@ var ApiKeyRequest = /*#__PURE__*/ function() {
186
186
  return _ts_generator(this, function(_state) {
187
187
  switch(_state.label){
188
188
  case 0:
189
- if (!(typeof _this.apiKey === "string")) return [
189
+ if (!(typeof _this.apiKey === 'string')) return [
190
190
  3,
191
191
  1
192
192
  ];
@@ -127,23 +127,23 @@ function _ts_generator(thisArg, body) {
127
127
  };
128
128
  }
129
129
  }
130
- describe("Api Key Request Plugin", function() {
130
+ describe('Api Key Request Plugin', function() {
131
131
  var options;
132
132
  beforeEach(function() {
133
133
  var headers = new Headers();
134
- jest.spyOn(headers, "append");
134
+ jest.spyOn(headers, 'append');
135
135
  options = {
136
136
  headers: headers,
137
- basePath: "http://test.com/truc",
138
- method: "get"
137
+ basePath: 'http://test.com/truc',
138
+ method: 'get'
139
139
  };
140
140
  });
141
- it("should add the API Key to the headers", /*#__PURE__*/ _async_to_generator(function() {
141
+ it('should add the API Key to the headers', /*#__PURE__*/ _async_to_generator(function() {
142
142
  var plugin, runner;
143
143
  return _ts_generator(this, function(_state) {
144
144
  switch(_state.label){
145
145
  case 0:
146
- plugin = new _apikeyrequest.ApiKeyRequest("test", "testKey");
146
+ plugin = new _apikeyrequest.ApiKeyRequest('test', 'testKey');
147
147
  runner = plugin.load();
148
148
  return [
149
149
  4,
@@ -151,21 +151,21 @@ describe("Api Key Request Plugin", function() {
151
151
  ];
152
152
  case 1:
153
153
  _state.sent();
154
- expect(options.headers.append).toHaveBeenCalledWith("testKey", "test");
154
+ expect(options.headers.append).toHaveBeenCalledWith('testKey', 'test');
155
155
  return [
156
156
  2
157
157
  ];
158
158
  }
159
159
  });
160
160
  }));
161
- it("should execute the function to add the API Key to the headers", /*#__PURE__*/ _async_to_generator(function() {
161
+ it('should execute the function to add the API Key to the headers', /*#__PURE__*/ _async_to_generator(function() {
162
162
  var plugin, runner;
163
163
  return _ts_generator(this, function(_state) {
164
164
  switch(_state.label){
165
165
  case 0:
166
166
  plugin = new _apikeyrequest.ApiKeyRequest(function() {
167
- return Promise.resolve("test");
168
- }, "testKey");
167
+ return Promise.resolve('test');
168
+ }, 'testKey');
169
169
  runner = plugin.load();
170
170
  return [
171
171
  4,
@@ -173,7 +173,7 @@ describe("Api Key Request Plugin", function() {
173
173
  ];
174
174
  case 1:
175
175
  _state.sent();
176
- expect(options.headers.append).toHaveBeenCalledWith("testKey", "test");
176
+ expect(options.headers.append).toHaveBeenCalledWith('testKey', 'test');
177
177
  return [
178
178
  2
179
179
  ];
@@ -177,8 +177,8 @@ function _ts_generator(thisArg, body) {
177
177
  }
178
178
  function impervaProtectionRetrieverFactory(protectionTimeout, tokenTimeout) {
179
179
  var protection;
180
- if (typeof window === "undefined") {
181
- throw new Error("impervaProtectionRetrieverFactory should be used in a browser context.");
180
+ if (typeof window === 'undefined') {
181
+ throw new Error('impervaProtectionRetrieverFactory should be used in a browser context.');
182
182
  }
183
183
  var getProtection = function() {
184
184
  return new Promise(function(resolve, reject) {
@@ -244,7 +244,7 @@ function impervaProtectionRetrieverFactory(protectionTimeout, tokenTimeout) {
244
244
  ];
245
245
  case 6:
246
246
  e1 = _state.sent();
247
- (logger || console).error("[SDK][Plug-in][BotProtectionFingerprintRequest] Timeout: no Token was received in time.");
247
+ (logger || console).error('[SDK][Plug-in][BotProtectionFingerprintRequest] Timeout: no Token was received in time.');
248
248
  return [
249
249
  2
250
250
  ];
@@ -261,9 +261,9 @@ function impervaProtectionRetrieverFactory(protectionTimeout, tokenTimeout) {
261
261
  }();
262
262
  }
263
263
  function akamaiTelemetryRetrieverFactory(bmakOpt) {
264
- var bmak = bmakOpt || (typeof window !== "undefined" ? window.bmak : undefined);
264
+ var bmak = bmakOpt || (typeof window !== 'undefined' ? window.bmak : undefined);
265
265
  return function() {
266
- if (!bmak || !(typeof bmak.get_telemetry === "function")) {
266
+ if (!bmak || !(typeof bmak.get_telemetry === 'function')) {
267
267
  return;
268
268
  }
269
269
  return bmak.get_telemetry();