@ama-sdk/core 11.0.0-next.0 → 11.0.0-next.2

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 (268) hide show
  1. package/README.md +4 -1
  2. package/cjs/clients/api-angular-client.js +45 -23
  3. package/cjs/clients/api-beacon-client.js +64 -20
  4. package/cjs/clients/api-fetch-client.js +66 -21
  5. package/cjs/fwk/Reviver.js +7 -7
  6. package/cjs/fwk/api.helper.spec.js +20 -20
  7. package/cjs/fwk/api.helpers.js +14 -14
  8. package/cjs/fwk/core/api-client.js +1 -1
  9. package/cjs/fwk/core/base-api-constructor.js +1 -1
  10. package/cjs/fwk/date.js +9 -9
  11. package/cjs/fwk/date.spec.js +25 -25
  12. package/cjs/fwk/errors.js +3 -3
  13. package/cjs/fwk/mocks/alf-mock-adapter.js +4 -4
  14. package/cjs/fwk/mocks/base-mock-adapter.js +2 -2
  15. package/cjs/fwk/mocks/helpers.js +3 -3
  16. package/cjs/fwk/reviver.spec.js +46 -10
  17. package/cjs/plugins/additional-params/additional-params-sync.request.js +2 -2
  18. package/cjs/plugins/additional-params/additional-params.request.js +3 -3
  19. package/cjs/plugins/additional-params/additional-params.spec.js +30 -30
  20. package/cjs/plugins/api-configuration-override/api-configuration-override.request.js +2 -2
  21. package/cjs/plugins/api-configuration-override/api-configuration-override.spec.js +13 -13
  22. package/cjs/plugins/api-key/api-key.request.js +2 -2
  23. package/cjs/plugins/api-key/api-key.spec.js +11 -11
  24. package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +6 -5
  25. package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +33 -33
  26. package/cjs/plugins/client-facts/client-facts.request.js +3 -3
  27. package/cjs/plugins/client-facts/client-facts.spec.js +27 -27
  28. package/cjs/plugins/concurrent/concurrent.fetch.js +1 -0
  29. package/cjs/plugins/concurrent/concurrent.spec.js +4 -4
  30. package/cjs/plugins/custom-info/custom-info.spec.js +15 -15
  31. package/cjs/plugins/exception/exception.reply.js +2 -2
  32. package/cjs/plugins/exception/exception.spec.js +15 -15
  33. package/cjs/plugins/fetch-cache/fetch-cache.request.js +4 -4
  34. package/cjs/plugins/fetch-cache/fetch-cache.spec.js +20 -20
  35. package/cjs/plugins/fetch-credentials/fetch-credentials.request.js +1 -1
  36. package/cjs/plugins/fetch-credentials/fetch-credentials.spec.js +8 -8
  37. package/cjs/plugins/json-token/json-token.reply.js +5 -5
  38. package/cjs/plugins/json-token/json-token.request.js +4 -4
  39. package/cjs/plugins/json-token/json-token.spec.js +24 -24
  40. package/cjs/plugins/keepalive/keepalive.request.js +2 -2
  41. package/cjs/plugins/keepalive/keepalive.spec.js +4 -4
  42. package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +32 -40
  43. package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +30 -26
  44. package/cjs/plugins/mock-intercept/mock-intercept.fetch.js +3 -3
  45. package/cjs/plugins/mock-intercept/mock-intercept.interface.js +2 -2
  46. package/cjs/plugins/mock-intercept/mock-intercept.request.js +3 -3
  47. package/cjs/plugins/mock-intercept/mock-intercept.spec.js +28 -28
  48. package/cjs/plugins/perf-metric/perf-metric.fetch.js +1 -1
  49. package/cjs/plugins/perf-metric/perf-metric.probe.spec.js +9 -9
  50. package/cjs/plugins/pii-tokenizer/pii-tokenizer.request.js +11 -11
  51. package/cjs/plugins/pii-tokenizer/pii-tokenizer.spec.js +94 -94
  52. package/cjs/plugins/raw-response-info/raw-response-info.spec.js +12 -12
  53. package/cjs/plugins/retry/retry.spec.js +20 -20
  54. package/cjs/plugins/reviver/reviver.reply.js +35 -2
  55. package/cjs/plugins/reviver/reviver.spec.js +6 -6
  56. package/cjs/plugins/session-id/session-id.request.js +7 -6
  57. package/cjs/plugins/session-id/session-id.spec.js +13 -13
  58. package/cjs/plugins/si-token/si-token.spec.js +9 -9
  59. package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +4 -4
  60. package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +44 -44
  61. package/cjs/plugins/timeout/timeout.fetch.js +12 -10
  62. package/cjs/plugins/timeout/timeout.spec.js +13 -13
  63. package/cjs/plugins/url-rewrite/url-rewrite.spec.js +9 -9
  64. package/cjs/plugins/wait-for/wait-for.spec.js +9 -9
  65. package/cjs/utils/crypto.js +14 -14
  66. package/cjs/utils/generic-api.js +253 -0
  67. package/cjs/utils/index.js +1 -0
  68. package/cjs/utils/json-token.js +30 -30
  69. package/cjs/utils/json-token.spec.js +31 -31
  70. package/cli/files-pack.cjs +12 -12
  71. package/cli/files-pack.cjs.map +1 -1
  72. package/esm2015/clients/api-angular-client.js +49 -27
  73. package/esm2015/clients/api-beacon-client.js +65 -21
  74. package/esm2015/clients/api-fetch-client.js +70 -25
  75. package/esm2015/clients/index.js +2 -2
  76. package/esm2015/fwk/Reviver.js +10 -7
  77. package/esm2015/fwk/api.helper.spec.js +21 -21
  78. package/esm2015/fwk/api.helpers.js +14 -14
  79. package/esm2015/fwk/core/api-client.js +1 -1
  80. package/esm2015/fwk/core/base-api-constructor.js +1 -1
  81. package/esm2015/fwk/core/index.js +2 -2
  82. package/esm2015/fwk/date.js +9 -9
  83. package/esm2015/fwk/date.spec.js +26 -26
  84. package/esm2015/fwk/errors.js +3 -3
  85. package/esm2015/fwk/index.js +10 -10
  86. package/esm2015/fwk/mocks/alf-mock-adapter.js +6 -6
  87. package/esm2015/fwk/mocks/base-mock-adapter.js +3 -3
  88. package/esm2015/fwk/mocks/helpers.js +3 -3
  89. package/esm2015/fwk/mocks/index.js +10 -10
  90. package/esm2015/fwk/mocks/random-mock-adapter.js +1 -1
  91. package/esm2015/fwk/mocks/sequential-mock-adapter.js +1 -1
  92. package/esm2015/fwk/reviver.spec.js +47 -11
  93. package/esm2015/plugins/additional-params/additional-params-sync.request.js +3 -3
  94. package/esm2015/plugins/additional-params/additional-params.request.js +3 -3
  95. package/esm2015/plugins/additional-params/additional-params.spec.js +32 -32
  96. package/esm2015/plugins/additional-params/index.js +2 -2
  97. package/esm2015/plugins/api-configuration-override/api-configuration-override.request.js +2 -2
  98. package/esm2015/plugins/api-configuration-override/api-configuration-override.spec.js +14 -14
  99. package/esm2015/plugins/api-configuration-override/index.js +1 -1
  100. package/esm2015/plugins/api-key/api-key.request.js +2 -2
  101. package/esm2015/plugins/api-key/api-key.spec.js +12 -12
  102. package/esm2015/plugins/api-key/index.js +1 -1
  103. package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +6 -6
  104. package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +34 -34
  105. package/esm2015/plugins/bot-protection-fingerprint/index.js +1 -1
  106. package/esm2015/plugins/client-facts/client-facts.request.js +4 -4
  107. package/esm2015/plugins/client-facts/client-facts.spec.js +28 -28
  108. package/esm2015/plugins/client-facts/index.js +1 -1
  109. package/esm2015/plugins/concurrent/concurrent.fetch.js +1 -0
  110. package/esm2015/plugins/concurrent/concurrent.spec.js +5 -5
  111. package/esm2015/plugins/concurrent/index.js +1 -1
  112. package/esm2015/plugins/core/index.js +4 -4
  113. package/esm2015/plugins/custom-info/custom-info.spec.js +17 -17
  114. package/esm2015/plugins/custom-info/index.js +1 -1
  115. package/esm2015/plugins/exception/exception.reply.js +4 -4
  116. package/esm2015/plugins/exception/exception.spec.js +18 -18
  117. package/esm2015/plugins/exception/index.js +1 -1
  118. package/esm2015/plugins/fetch-cache/fetch-cache.request.js +4 -4
  119. package/esm2015/plugins/fetch-cache/fetch-cache.spec.js +21 -21
  120. package/esm2015/plugins/fetch-cache/index.js +1 -1
  121. package/esm2015/plugins/fetch-credentials/fetch-credentials.request.js +1 -1
  122. package/esm2015/plugins/fetch-credentials/fetch-credentials.spec.js +9 -9
  123. package/esm2015/plugins/fetch-credentials/index.js +1 -1
  124. package/esm2015/plugins/index.js +25 -25
  125. package/esm2015/plugins/json-token/index.js +2 -2
  126. package/esm2015/plugins/json-token/json-token.reply.js +5 -5
  127. package/esm2015/plugins/json-token/json-token.request.js +4 -4
  128. package/esm2015/plugins/json-token/json-token.spec.js +27 -27
  129. package/esm2015/plugins/keepalive/index.js +1 -1
  130. package/esm2015/plugins/keepalive/keepalive.request.js +2 -2
  131. package/esm2015/plugins/keepalive/keepalive.spec.js +5 -5
  132. package/esm2015/plugins/mgw-mdw-auth/index.js +1 -1
  133. package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +34 -42
  134. package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +32 -28
  135. package/esm2015/plugins/mock-intercept/index.js +2 -2
  136. package/esm2015/plugins/mock-intercept/mock-intercept.fetch.js +5 -5
  137. package/esm2015/plugins/mock-intercept/mock-intercept.interface.js +2 -2
  138. package/esm2015/plugins/mock-intercept/mock-intercept.request.js +4 -4
  139. package/esm2015/plugins/mock-intercept/mock-intercept.spec.js +32 -32
  140. package/esm2015/plugins/perf-metric/index.js +1 -1
  141. package/esm2015/plugins/perf-metric/perf-metric.fetch.js +2 -2
  142. package/esm2015/plugins/perf-metric/perf-metric.probe.spec.js +10 -10
  143. package/esm2015/plugins/pii-tokenizer/index.js +1 -1
  144. package/esm2015/plugins/pii-tokenizer/pii-tokenizer.request.js +12 -12
  145. package/esm2015/plugins/pii-tokenizer/pii-tokenizer.spec.js +96 -96
  146. package/esm2015/plugins/raw-response-info/index.js +1 -1
  147. package/esm2015/plugins/raw-response-info/raw-response-info.spec.js +14 -14
  148. package/esm2015/plugins/retry/index.js +1 -1
  149. package/esm2015/plugins/retry/retry.fetch.js +1 -1
  150. package/esm2015/plugins/retry/retry.spec.js +21 -21
  151. package/esm2015/plugins/reviver/index.js +1 -1
  152. package/esm2015/plugins/reviver/reviver.reply.js +35 -2
  153. package/esm2015/plugins/reviver/reviver.spec.js +8 -8
  154. package/esm2015/plugins/session-id/index.js +1 -1
  155. package/esm2015/plugins/session-id/session-id.request.js +8 -7
  156. package/esm2015/plugins/session-id/session-id.spec.js +14 -14
  157. package/esm2015/plugins/si-token/index.js +1 -1
  158. package/esm2015/plugins/si-token/si-token.request.js +1 -1
  159. package/esm2015/plugins/si-token/si-token.spec.js +10 -10
  160. package/esm2015/plugins/simple-api-key-authentication/index.js +1 -1
  161. package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +5 -5
  162. package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +46 -46
  163. package/esm2015/plugins/timeout/index.js +1 -1
  164. package/esm2015/plugins/timeout/timeout.fetch.js +13 -11
  165. package/esm2015/plugins/timeout/timeout.spec.js +15 -15
  166. package/esm2015/plugins/url-rewrite/index.js +1 -1
  167. package/esm2015/plugins/url-rewrite/url-rewrite.spec.js +10 -10
  168. package/esm2015/plugins/wait-for/index.js +1 -1
  169. package/esm2015/plugins/wait-for/wait-for.spec.js +10 -10
  170. package/esm2015/public_api.js +4 -4
  171. package/esm2015/utils/crypto.js +15 -15
  172. package/esm2015/utils/generic-api.js +245 -0
  173. package/esm2015/utils/index.js +6 -5
  174. package/esm2015/utils/json-token.js +32 -32
  175. package/esm2015/utils/json-token.spec.js +32 -32
  176. package/package.json +67 -40
  177. package/schematics/ng-add/index.d.ts +4 -2
  178. package/schematics/ng-add/index.d.ts.map +1 -1
  179. package/schematics/ng-add/index.js +58 -40
  180. package/schematics/ng-add/index.js.map +1 -1
  181. package/src/clients/api-angular-client.d.ts +6 -3
  182. package/src/clients/api-angular-client.d.ts.map +1 -1
  183. package/src/clients/api-angular-client.js +31 -16
  184. package/src/clients/api-angular-client.js.map +1 -1
  185. package/src/clients/api-beacon-client.d.ts +7 -5
  186. package/src/clients/api-beacon-client.d.ts.map +1 -1
  187. package/src/clients/api-beacon-client.js +24 -14
  188. package/src/clients/api-beacon-client.js.map +1 -1
  189. package/src/clients/api-fetch-client.d.ts +5 -3
  190. package/src/clients/api-fetch-client.d.ts.map +1 -1
  191. package/src/clients/api-fetch-client.js +26 -14
  192. package/src/clients/api-fetch-client.js.map +1 -1
  193. package/src/fwk/Reviver.d.ts +16 -4
  194. package/src/fwk/Reviver.d.ts.map +1 -1
  195. package/src/fwk/Reviver.js +9 -6
  196. package/src/fwk/Reviver.js.map +1 -1
  197. package/src/fwk/api.helpers.d.ts +1 -1
  198. package/src/fwk/api.helpers.d.ts.map +1 -1
  199. package/src/fwk/api.helpers.js +1 -1
  200. package/src/fwk/api.helpers.js.map +1 -1
  201. package/src/fwk/core/api-client.d.ts +36 -1
  202. package/src/fwk/core/api-client.d.ts.map +1 -1
  203. package/src/fwk/core/api-client.js.map +1 -1
  204. package/src/fwk/date.js.map +1 -1
  205. package/src/fwk/mocks/alf-mock-adapter.js.map +1 -1
  206. package/src/fwk/mocks/base-mock-adapter.js.map +1 -1
  207. package/src/fwk/mocks/helpers.js.map +1 -1
  208. package/src/fwk/mocks/random-mock-adapter.js.map +1 -1
  209. package/src/fwk/mocks/sequential-mock-adapter.js.map +1 -1
  210. package/src/plugins/additional-params/additional-params-sync.request.js.map +1 -1
  211. package/src/plugins/additional-params/additional-params.request.js.map +1 -1
  212. package/src/plugins/api-configuration-override/api-configuration-override.request.js.map +1 -1
  213. package/src/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.d.ts +1 -1
  214. package/src/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.d.ts.map +1 -1
  215. package/src/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +1 -1
  216. package/src/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js.map +1 -1
  217. package/src/plugins/client-facts/client-facts.request.js.map +1 -1
  218. package/src/plugins/concurrent/concurrent.fetch.d.ts.map +1 -1
  219. package/src/plugins/concurrent/concurrent.fetch.js +1 -0
  220. package/src/plugins/concurrent/concurrent.fetch.js.map +1 -1
  221. package/src/plugins/core/plugin.d.ts +6 -1
  222. package/src/plugins/core/plugin.d.ts.map +1 -1
  223. package/src/plugins/core/reply-plugin.d.ts +0 -2
  224. package/src/plugins/core/reply-plugin.d.ts.map +1 -1
  225. package/src/plugins/core/request-plugin.d.ts +2 -0
  226. package/src/plugins/core/request-plugin.d.ts.map +1 -1
  227. package/src/plugins/exception/exception.reply.js.map +1 -1
  228. package/src/plugins/fetch-cache/fetch-cache.request.js.map +1 -1
  229. package/src/plugins/json-token/json-token.reply.js.map +1 -1
  230. package/src/plugins/json-token/json-token.request.js.map +1 -1
  231. package/src/plugins/keepalive/keepalive.request.js.map +1 -1
  232. package/src/plugins/mgw-mdw-auth/mgw-mdw-auth.request.d.ts +2 -2
  233. package/src/plugins/mgw-mdw-auth/mgw-mdw-auth.request.d.ts.map +1 -1
  234. package/src/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +26 -28
  235. package/src/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js.map +1 -1
  236. package/src/plugins/mock-intercept/mock-intercept.fetch.js.map +1 -1
  237. package/src/plugins/mock-intercept/mock-intercept.request.js.map +1 -1
  238. package/src/plugins/perf-metric/perf-metric.fetch.js.map +1 -1
  239. package/src/plugins/pii-tokenizer/pii-tokenizer.request.d.ts.map +1 -1
  240. package/src/plugins/pii-tokenizer/pii-tokenizer.request.js.map +1 -1
  241. package/src/plugins/raw-response-info/raw-response-info.reply.js.map +1 -1
  242. package/src/plugins/retry/retry.fetch.js.map +1 -1
  243. package/src/plugins/reviver/reviver.reply.d.ts +7 -0
  244. package/src/plugins/reviver/reviver.reply.d.ts.map +1 -1
  245. package/src/plugins/reviver/reviver.reply.js +12 -1
  246. package/src/plugins/reviver/reviver.reply.js.map +1 -1
  247. package/src/plugins/session-id/session-id.request.d.ts +1 -0
  248. package/src/plugins/session-id/session-id.request.d.ts.map +1 -1
  249. package/src/plugins/session-id/session-id.request.js +1 -0
  250. package/src/plugins/session-id/session-id.request.js.map +1 -1
  251. package/src/plugins/si-token/si-token.request.js.map +1 -1
  252. package/src/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js.map +1 -1
  253. package/src/plugins/timeout/timeout.fetch.d.ts.map +1 -1
  254. package/src/plugins/timeout/timeout.fetch.js +2 -0
  255. package/src/plugins/timeout/timeout.fetch.js.map +1 -1
  256. package/src/plugins/wait-for/wait-for.fetch.js.map +1 -1
  257. package/src/utils/crypto.js.map +1 -1
  258. package/src/utils/encoder.js.map +1 -1
  259. package/src/utils/generic-api.d.ts +39 -0
  260. package/src/utils/generic-api.d.ts.map +1 -0
  261. package/src/utils/generic-api.js +43 -0
  262. package/src/utils/generic-api.js.map +1 -0
  263. package/src/utils/index.d.ts +1 -0
  264. package/src/utils/index.d.ts.map +1 -1
  265. package/src/utils/index.js +1 -0
  266. package/src/utils/index.js.map +1 -1
  267. package/src/utils/json-token.d.ts.map +1 -1
  268. package/src/utils/json-token.js.map +1 -1
@@ -79,12 +79,12 @@ function _unsupported_iterable_to_array(o, minLen) {
79
79
  */ export function prepareUrl(url) {
80
80
  var queryParameters = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
81
81
  var queryPart = Object.keys(queryParameters).filter(function(name) {
82
- return typeof queryParameters[name] !== "undefined";
82
+ return typeof queryParameters[name] !== 'undefined';
83
83
  }).map(function(name) {
84
84
  return "".concat(name, "=").concat(queryParameters[name]);
85
- }).join("&");
86
- var paramsPrefix = url.indexOf("?") > -1 ? "&" : "?";
87
- return url + (!queryPart ? "" : paramsPrefix + queryPart);
85
+ }).join('&');
86
+ var paramsPrefix = url.indexOf('?') > -1 ? '&' : '?';
87
+ return url + (!queryPart ? '' : paramsPrefix + queryPart);
88
88
  }
89
89
  /**
90
90
  * Returns a map containing the query parameters
@@ -92,10 +92,10 @@ function _unsupported_iterable_to_array(o, minLen) {
92
92
  * @param names
93
93
  */ export function extractQueryParams(data, names) {
94
94
  return names.filter(function(name) {
95
- return typeof data[name] !== "undefined" && data[name] !== null;
95
+ return typeof data[name] !== 'undefined' && data[name] !== null;
96
96
  }).reduce(function(acc, name) {
97
97
  var prop = data[name];
98
- acc[name] = typeof prop.toJSON === "function" ? prop.toJSON() : prop.toString();
98
+ acc[name] = typeof prop.toJSON === 'function' ? prop.toJSON() : prop.toString();
99
99
  return acc;
100
100
  }, {});
101
101
  }
@@ -104,8 +104,8 @@ function _unsupported_iterable_to_array(o, minLen) {
104
104
  * @param object JSON object to filter
105
105
  * @returns an object without undefined values
106
106
  */ export function filterUndefinedValues(object) {
107
- return Object.keys(object).filter(function(objectKey) {
108
- return typeof object[objectKey] !== "undefined";
107
+ return !object ? {} : Object.keys(object).filter(function(objectKey) {
108
+ return typeof object[objectKey] !== 'undefined';
109
109
  }).reduce(function(acc, objectKey) {
110
110
  acc[objectKey] = object[objectKey];
111
111
  return acc;
@@ -120,7 +120,7 @@ function _unsupported_iterable_to_array(o, minLen) {
120
120
  * @param type
121
121
  */ export function processFormData(data, type) {
122
122
  var encodedData;
123
- /* eslint-disable guard-for-in */ if (type === "multipart/form-data") {
123
+ /* eslint-disable guard-for-in */ if (type === 'multipart/form-data') {
124
124
  var formData = new FormData();
125
125
  for(var i in data){
126
126
  formData.append(i, data[i]);
@@ -131,7 +131,7 @@ function _unsupported_iterable_to_array(o, minLen) {
131
131
  for(var i1 in data){
132
132
  formData1.push("".concat(i1, "=").concat(encodeURIComponent(data[i1])));
133
133
  }
134
- encodedData = formData1.join("&");
134
+ encodedData = formData1.join('&');
135
135
  }
136
136
  /* eslint-enable guard-for-in */ return encodedData;
137
137
  }
@@ -188,12 +188,12 @@ endpoint) {
188
188
  disableFallback: false,
189
189
  log: console.error
190
190
  };
191
- var logPrefix = "API status code error for ".concat(endpoint || "unknown", " endpoint");
191
+ var logPrefix = "API status code error for ".concat(endpoint || 'unknown', " endpoint");
192
192
  var logMsg = options.log || function() {};
193
193
  if (!response || !response.ok) {
194
194
  return undefined;
195
195
  }
196
- if (typeof revivers === "function" || typeof revivers === "undefined") {
196
+ if (typeof revivers === 'function' || typeof revivers === 'undefined') {
197
197
  return revivers;
198
198
  }
199
199
  if (response.status && revivers[response.status]) {
@@ -219,7 +219,7 @@ endpoint) {
219
219
  statusCode: Number.MAX_SAFE_INTEGER,
220
220
  reviver: undefined
221
221
  });
222
- var fallbackLog = Number.MAX_SAFE_INTEGER !== fallback.statusCode ? "Fallback to ".concat(fallback.statusCode, "'s reviver") : "No fallback found";
223
- logMsg("".concat(logPrefix, " - Unknown ").concat(response.status || "undefined", " code returned by the API - ").concat(fallbackLog));
222
+ var fallbackLog = Number.MAX_SAFE_INTEGER !== fallback.statusCode ? "Fallback to ".concat(fallback.statusCode, "'s reviver") : 'No fallback found';
223
+ logMsg("".concat(logPrefix, " - Unknown ").concat(response.status || 'undefined', " code returned by the API - ").concat(fallbackLog));
224
224
  return fallback.reviver;
225
225
  }
@@ -2,5 +2,5 @@
2
2
  * Check if the object is an Api Client object
3
3
  * @param client object to check
4
4
  */ export function isApiClient(client) {
5
- return client && !!client.options && typeof client.extractQueryParams === "function" && typeof client.prepareOptions === "function" && typeof client.prepareUrl === "function" && typeof client.processFormData === "function" && typeof client.processCall === "function";
5
+ return client && !!client.options && typeof client.extractQueryParams === 'function' && typeof client.prepareOptions === 'function' && typeof client.prepareUrl === 'function' && typeof client.processFormData === 'function' && typeof client.processCall === 'function';
6
6
  }
@@ -2,5 +2,5 @@
2
2
  * Determine if object passed to the constructor is valid
3
3
  * @param args
4
4
  */ export function isConstructorObject(args) {
5
- return !!args && args.length === 1 && !!args[0] && typeof args[0] === "object";
5
+ return !!args && args.length === 1 && !!args[0] && typeof args[0] === 'object';
6
6
  }
@@ -1,2 +1,2 @@
1
- export * from "./base-api-constructor";
2
- export * from "./api-client";
1
+ export * from './base-api-constructor';
2
+ export * from './api-client';
@@ -170,7 +170,7 @@ export var _NativeDateClass = Date;
170
170
  */ export function pad(val) {
171
171
  var digits = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2;
172
172
  var str = "".concat(val);
173
- return "0".repeat(Math.max(0, digits - str.length)) + str;
173
+ return '0'.repeat(Math.max(0, digits - str.length)) + str;
174
174
  }
175
175
  export var CommonDate = /*#__PURE__*/ function(Date1) {
176
176
  "use strict";
@@ -182,15 +182,15 @@ export var CommonDate = /*#__PURE__*/ function(Date1) {
182
182
  }
183
183
  _class_call_check(this, CommonDate);
184
184
  if (args) {
185
- if (typeof args[0] === "string") {
186
- var idxT = args[0].lastIndexOf("T");
185
+ if (typeof args[0] === 'string') {
186
+ var idxT = args[0].lastIndexOf('T');
187
187
  // TZD = time zone designator (Z or +hh:mm or -hh:mm)
188
- var idx = args[0].lastIndexOf("Z");
188
+ var idx = args[0].lastIndexOf('Z');
189
189
  if (idx < 0) {
190
- idx = args[0].lastIndexOf("+");
190
+ idx = args[0].lastIndexOf('+');
191
191
  }
192
192
  if (idx < 0 && idxT > 0) {
193
- var relativeIdx = args[0].substring(idxT).lastIndexOf("-");
193
+ var relativeIdx = args[0].substring(idxT).lastIndexOf('-');
194
194
  idx = relativeIdx > 0 ? relativeIdx + idxT : relativeIdx;
195
195
  }
196
196
  if (idx > 0) {
@@ -198,7 +198,7 @@ export var CommonDate = /*#__PURE__*/ function(Date1) {
198
198
  }
199
199
  var TIME_ZONE_OFFSET = _construct(Date, _to_consumable_array(args)).getTimezoneOffset();
200
200
  if (idxT > 0) {
201
- args[0] += "".concat(TIME_ZONE_OFFSET < 0 ? "+" : "-").concat(pad(Math.floor(Math.abs(TIME_ZONE_OFFSET / 60))), ":").concat(pad(Math.abs(TIME_ZONE_OFFSET % 60)));
201
+ args[0] += "".concat(TIME_ZONE_OFFSET < 0 ? '+' : '-').concat(pad(Math.floor(Math.abs(TIME_ZONE_OFFSET / 60))), ":").concat(pad(Math.abs(TIME_ZONE_OFFSET % 60)));
202
202
  }
203
203
  } else if (_instanceof(args[0], CommonDate)) {
204
204
  args[0] = args[0];
@@ -222,7 +222,7 @@ export var CommonDate = /*#__PURE__*/ function(Date1) {
222
222
  }(_wrap_native_super(Date));
223
223
  export var utils;
224
224
  (function(utils) {
225
- "use strict";
225
+ 'use strict';
226
226
  var _$Date = /*#__PURE__*/ function(CommonDate) {
227
227
  _inherits(Date1, CommonDate);
228
228
  var _super = _create_super(Date1);
@@ -231,7 +231,7 @@ export var utils;
231
231
  args[_key] = arguments[_key];
232
232
  }
233
233
  _class_call_check(this, Date1);
234
- if (args && typeof args[0] === "string" && args[0].lastIndexOf("T") < 0) {
234
+ if (args && typeof args[0] === 'string' && args[0].lastIndexOf('T') < 0) {
235
235
  args[0] = "".concat(args[0], "T00:00:00Z");
236
236
  } else if (_instanceof(args[0], _NativeDateClass)) {
237
237
  args[0] = "".concat(args[0].getFullYear(), "-").concat(pad(args[0].getMonth() + 1), "-").concat(pad(args[0].getDate()), "T00:00:00Z");
@@ -1,48 +1,48 @@
1
- import { utils } from "./date";
2
- describe("DateTime", function() {
3
- it("should support timestamp", function() {
1
+ import { utils } from './date';
2
+ describe('DateTime', function() {
3
+ it('should support timestamp', function() {
4
4
  var ts = new Date().getTime();
5
5
  var dateUtils = new utils.DateTime(ts);
6
6
  expect(dateUtils.getTime()).toEqual(ts);
7
7
  });
8
- it("should support DateTime Utils", function() {
8
+ it('should support DateTime Utils', function() {
9
9
  var originalDate = new utils.DateTime(new Date());
10
10
  expect(new utils.DateTime(originalDate)).toEqual(originalDate);
11
11
  });
12
- it("should support a copy constructor", function() {
12
+ it('should support a copy constructor', function() {
13
13
  var originalDate = new utils.DateTime(new Date());
14
14
  expect(new utils.DateTime(originalDate)).toEqual(originalDate);
15
15
  });
16
- it("should support json conversions", function() {
16
+ it('should support json conversions', function() {
17
17
  var originalDate = new utils.DateTime(new Date());
18
18
  var jsonDate = JSON.parse(JSON.stringify(originalDate));
19
19
  expect(new utils.DateTime(jsonDate)).toEqual(originalDate);
20
20
  });
21
- it("should support date without time", function() {
22
- var date1 = "1988-06-07";
21
+ it('should support date without time', function() {
22
+ var date1 = '1988-06-07';
23
23
  var dateCompare = new Date(date1);
24
24
  expect(new utils.DateTime(date1)).toEqual(dateCompare);
25
25
  });
26
- it("should support datetime without timezone", function() {
27
- var date1 = "2015-03-25T12:00:00Z";
28
- var dateCompare = new Date("2015-03-25");
26
+ it('should support datetime without timezone', function() {
27
+ var date1 = '2015-03-25T12:00:00Z';
28
+ var dateCompare = new Date('2015-03-25');
29
29
  dateCompare.setHours(12);
30
30
  dateCompare.setMinutes(0);
31
31
  var dateUtils = new utils.DateTime(date1);
32
32
  expect(dateUtils).toEqual(dateCompare);
33
33
  });
34
- it("should ignore timezone of datetime", function() {
35
- var date1 = "2015-03-25T12:00:00-02:00";
36
- var date2 = "2015-03-25T12:00:00+05:00";
37
- var dateCompare = new Date("2015-03-25T12:00:00Z");
34
+ it('should ignore timezone of datetime', function() {
35
+ var date1 = '2015-03-25T12:00:00-02:00';
36
+ var date2 = '2015-03-25T12:00:00+05:00';
37
+ var dateCompare = new Date('2015-03-25T12:00:00Z');
38
38
  dateCompare.setHours(12);
39
39
  dateCompare.setMinutes(0);
40
40
  expect(new utils.DateTime(date1)).toEqual(dateCompare);
41
41
  expect(new utils.DateTime(date2)).toEqual(dateCompare);
42
42
  });
43
- it("should handle daylight change", function() {
44
- var dateStr1 = "2017-03-23T12:00:00Z";
45
- var dateStr2 = "2017-04-01T12:00:00Z";
43
+ it('should handle daylight change', function() {
44
+ var dateStr1 = '2017-03-23T12:00:00Z';
45
+ var dateStr2 = '2017-04-01T12:00:00Z';
46
46
  var date1 = new utils.DateTime(dateStr1);
47
47
  var date2 = new utils.DateTime(dateStr2);
48
48
  var compareDate1 = new Date(dateStr1);
@@ -50,28 +50,28 @@ describe("DateTime", function() {
50
50
  expect(date1.getTimezoneOffset() - date2.getTimezoneOffset()).toBe(compareDate1.getTimezoneOffset() - compareDate2.getTimezoneOffset());
51
51
  });
52
52
  });
53
- describe("Date", function() {
54
- it("should support timestamp", function() {
53
+ describe('Date', function() {
54
+ it('should support timestamp', function() {
55
55
  var ts = new Date().getTime();
56
56
  var dateUtils = new utils.Date(ts);
57
57
  expect(dateUtils.getTime()).toEqual(ts);
58
58
  });
59
- it("should support Date Utils", function() {
59
+ it('should support Date Utils', function() {
60
60
  var originalDate = new utils.Date(new Date());
61
61
  expect(new utils.Date(originalDate)).toEqual(originalDate);
62
62
  });
63
- it("should support a copy constructor", function() {
63
+ it('should support a copy constructor', function() {
64
64
  var originalDate = new utils.Date(new Date());
65
65
  expect(new utils.Date(originalDate)).toEqual(originalDate);
66
66
  });
67
- it("should support json conversions", function() {
67
+ it('should support json conversions', function() {
68
68
  var originalDate = new utils.Date(new Date());
69
69
  var jsonDate = JSON.parse(JSON.stringify(originalDate));
70
70
  expect(new utils.Date(jsonDate)).toEqual(originalDate);
71
71
  });
72
- it("should be converted to a Js DateTime", function() {
73
- var date1 = "1988-06-07";
74
- var dateCompare = new utils.DateTime("1988-06-07T00:00:00Z");
72
+ it('should be converted to a Js DateTime', function() {
73
+ var date1 = '1988-06-07';
74
+ var dateCompare = new utils.DateTime('1988-06-07T00:00:00Z');
75
75
  expect(new utils.Date(date1)).toEqual(dateCompare);
76
76
  });
77
77
  });
@@ -139,9 +139,9 @@ function _create_super(Derived) {
139
139
  function GenericError(message, context) {
140
140
  _class_call_check(this, GenericError);
141
141
  var httpRegexp = /^https?:\/\//;
142
- var baseUrl = (context === null || context === void 0 ? void 0 : context.url) ? context.url.replace(httpRegexp, "") : "unknown";
143
- var origin = (context === null || context === void 0 ? void 0 : context.origin) ? context.origin.replace(httpRegexp, "") : "unknown";
144
- return _super.call(this, context ? "[SDK] [apiName: ".concat(context.apiName || "unknown", "] [operationId: ").concat(context.operationId || "unknown", "] [baseUrl: ").concat(baseUrl, "] [origin: ").concat(origin, "] [errorType: SDK] ").concat(message) : "[SDK] ".concat(message));
142
+ var baseUrl = (context === null || context === void 0 ? void 0 : context.url) ? context.url.replace(httpRegexp, '') : 'unknown';
143
+ var origin = (context === null || context === void 0 ? void 0 : context.origin) ? context.origin.replace(httpRegexp, '') : 'unknown';
144
+ return _super.call(this, context ? "[SDK] [apiName: ".concat(context.apiName || 'unknown', "] [operationId: ").concat(context.operationId || 'unknown', "] [baseUrl: ").concat(baseUrl, "] [origin: ").concat(origin, "] [errorType: SDK] ").concat(message) : "[SDK] ".concat(message));
145
145
  }
146
146
  return GenericError;
147
147
  }(_wrap_native_super(Error));
@@ -1,10 +1,10 @@
1
- export * from "./api";
2
- export * from "./api.helpers";
3
- export * from "./api.interface";
4
- export * from "./core/index";
5
- export * from "./date";
6
- export * from "./errors";
7
- export * from "./ignore-enum.type";
8
- export * from "./logger";
9
- export * from "./mocks/index";
10
- export * from "./Reviver";
1
+ export * from './api';
2
+ export * from './api.helpers';
3
+ export * from './api.interface';
4
+ export * from './core/index';
5
+ export * from './date';
6
+ export * from './errors';
7
+ export * from './ignore-enum.type';
8
+ export * from './logger';
9
+ export * from './mocks/index';
10
+ export * from './Reviver';
@@ -174,8 +174,8 @@ function _ts_generator(thisArg, body) {
174
174
  };
175
175
  }
176
176
  }
177
- import { getOperationId, getPath } from "./helpers";
178
- import { SequentialMockAdapter } from "./sequential-mock-adapter";
177
+ import { getOperationId, getPath } from './helpers';
178
+ import { SequentialMockAdapter } from './sequential-mock-adapter';
179
179
  /**
180
180
  * a new call is detected thanks to the timestamp printed by ALF on a new line, ex: "2021/12/16 18:21:28.312472 "
181
181
  */ var logNewCallRegex = RegExp(/^\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}\.\d{6}\b/gm);
@@ -210,7 +210,7 @@ import { SequentialMockAdapter } from "./sequential-mock-adapter";
210
210
  if (match && match[1] && match[2]) {
211
211
  // the match looks like this 1ASIUAIRFAC/v2/shopping/carts/19DXNCKB931CYX3S?refresh=true
212
212
  // so we remove the SAP information at the beginning and URL parameters at the end if any
213
- var requestUrl = match[2].substring(match[2].indexOf("/"), match[2].indexOf("?") > -1 ? match[2].indexOf("?") : match[2].length);
213
+ var requestUrl = match[2].substring(match[2].indexOf('/'), match[2].indexOf('?') > -1 ? match[2].indexOf('?') : match[2].length);
214
214
  var method = match[1];
215
215
  var pathObject = getPath(requestUrl, operationAdapter, method);
216
216
  if (pathObject) {
@@ -237,7 +237,7 @@ import { SequentialMockAdapter } from "./sequential-mock-adapter";
237
237
  * @returns JSON data that can be either the request or the response
238
238
  */ function getData(log) {
239
239
  var match = log.match(requestResponseJsonRegexp);
240
- return match && match[1] || "";
240
+ return match && match[1] || '';
241
241
  }
242
242
  /**
243
243
  * Retrieve path from logPath and parse it to find all the calls.
@@ -317,7 +317,7 @@ import { SequentialMockAdapter } from "./sequential-mock-adapter";
317
317
  mockMap[alfCall.operationId] = [];
318
318
  }
319
319
  mockMap[alfCall.operationId].push({
320
- mockData: alfCall.response ? JSON.parse(alfCall.response) : ""
320
+ mockData: alfCall.response ? JSON.parse(alfCall.response) : ''
321
321
  });
322
322
  return mockMap;
323
323
  }, {});
@@ -350,7 +350,7 @@ import { SequentialMockAdapter } from "./sequential-mock-adapter";
350
350
  ];
351
351
  case 2:
352
352
  content = _state.sent();
353
- if (!(typeof operationAdapter === "function")) return [
353
+ if (!(typeof operationAdapter === 'function')) return [
354
354
  3,
355
355
  4
356
356
  ];
@@ -154,7 +154,7 @@ function _ts_generator(thisArg, body) {
154
154
  };
155
155
  }
156
156
  }
157
- import { getOperationId, getPath } from "./helpers";
157
+ import { getOperationId, getPath } from './helpers';
158
158
  /**
159
159
  * Base implementation of a mock adapter
160
160
  */ export var BaseMockAdapter = /*#__PURE__*/ function() {
@@ -166,7 +166,7 @@ import { getOperationId, getPath } from "./helpers";
166
166
  _define_property(this, "mockFactory", void 0);
167
167
  this.pathObjects = pathObjects;
168
168
  this.mocks = {};
169
- if (typeof mockMap !== "function") {
169
+ if (typeof mockMap !== 'function') {
170
170
  this.mocks = mockMap;
171
171
  } else {
172
172
  this.mockFactory = mockMap;
@@ -197,7 +197,7 @@ import { getOperationId, getPath } from "./helpers";
197
197
  return _ts_generator(this, function(_state) {
198
198
  switch(_state.label){
199
199
  case 0:
200
- if (!(typeof _this.pathObjects === "function")) return [
200
+ if (!(typeof _this.pathObjects === 'function')) return [
201
201
  3,
202
202
  2
203
203
  ];
@@ -18,7 +18,7 @@
18
18
  * @param pathObjects the list of available path objects
19
19
  * @param method the optional HTTP method used in case of several matches
20
20
  */ export function getPath(requestUrl, pathObjects, method) {
21
- var pathName = new URL(requestUrl, requestUrl.startsWith("/") ? "http://example.com" : undefined).pathname;
21
+ var pathName = new URL(requestUrl, requestUrl.startsWith('/') ? 'http://example.com' : undefined).pathname;
22
22
  if (!pathName) {
23
23
  throw new Error("Couldn't parse url ".concat(requestUrl));
24
24
  }
@@ -27,7 +27,7 @@
27
27
  if (pathObject.regexp.test(pathName)) {
28
28
  newMatches.push({
29
29
  index: index,
30
- segments: pathObject.path.split("/"),
30
+ segments: pathObject.path.split('/'),
31
31
  methods: pathObject.operations.map(function(operation) {
32
32
  return operation.method;
33
33
  })
@@ -40,7 +40,7 @@
40
40
  while(matches.length > 1){
41
41
  matches = matches.reduce(function(newMatches, match) {
42
42
  var newIndex = match.segments.findIndex(function(segment) {
43
- return segment.startsWith("{") && segment.endsWith("}");
43
+ return segment.startsWith('{') && segment.endsWith('}');
44
44
  }, lastIndex + 1);
45
45
  // Complete static match so use some value that can't be exceeded
46
46
  if (newIndex === -1) {
@@ -1,10 +1,10 @@
1
- export * from "./alf-mock-adapter";
2
- export * from "./encoded-api-request";
3
- export * from "./mock-adapter";
4
- export * from "./mock";
5
- export * from "./operation";
6
- export * from "./path-object";
7
- export * from "./base-mock-adapter";
8
- export * from "./helpers";
9
- export * from "./random-mock-adapter";
10
- export * from "./sequential-mock-adapter";
1
+ export * from './alf-mock-adapter';
2
+ export * from './encoded-api-request';
3
+ export * from './mock-adapter';
4
+ export * from './mock';
5
+ export * from './operation';
6
+ export * from './path-object';
7
+ export * from './base-mock-adapter';
8
+ export * from './helpers';
9
+ export * from './random-mock-adapter';
10
+ export * from './sequential-mock-adapter';
@@ -96,7 +96,7 @@ function _create_super(Derived) {
96
96
  return _possible_constructor_return(this, result);
97
97
  };
98
98
  }
99
- import { BaseMockAdapter } from "./base-mock-adapter";
99
+ import { BaseMockAdapter } from './base-mock-adapter';
100
100
  /**
101
101
  * Mock adapter that, for each operation, runs through the list of mocks randomly
102
102
  */ export var RandomMockAdapter = /*#__PURE__*/ function(BaseMockAdapter) {
@@ -96,7 +96,7 @@ function _create_super(Derived) {
96
96
  return _possible_constructor_return(this, result);
97
97
  };
98
98
  }
99
- import { BaseMockAdapter } from "./base-mock-adapter";
99
+ import { BaseMockAdapter } from './base-mock-adapter';
100
100
  /**
101
101
  * Mock adapter that, for each operation, runs through the list of mocks sequentially.
102
102
  * Once reaching the end of the list, the counter resets to the beginning.
@@ -1,12 +1,12 @@
1
- import { reviveDictionarizedArray } from "./Reviver";
2
- describe("Revivers :", function() {
3
- it("reviveDictionarizedArray", function() {
1
+ import { reviveArray, reviveDictionarizedArray, reviveMap } from './Reviver';
2
+ describe('Revivers :', function() {
3
+ it('reviveDictionarizedArray', function() {
4
4
  var dictionary = {
5
5
  id1: {
6
- p1: "v1"
6
+ p1: 'v1'
7
7
  },
8
8
  id2: {
9
- p2: "v2"
9
+ p2: 'v2'
10
10
  }
11
11
  };
12
12
  expect(reviveDictionarizedArray(undefined, {}, function(data) {
@@ -16,8 +16,8 @@ describe("Revivers :", function() {
16
16
  return data;
17
17
  })).toEqual({});
18
18
  expect(reviveDictionarizedArray([
19
- "id1",
20
- "id2"
19
+ 'id1',
20
+ 'id2'
21
21
  ], {}, function(data) {
22
22
  return data;
23
23
  })).toEqual({
@@ -28,16 +28,52 @@ describe("Revivers :", function() {
28
28
  return data;
29
29
  })).toEqual({});
30
30
  var result = reviveDictionarizedArray([
31
- "id1",
32
- "id2"
31
+ 'id1',
32
+ 'id2'
33
33
  ], dictionary, function(data) {
34
34
  return data;
35
35
  });
36
36
  expect(result.id1).toEqual({
37
- p1: "v1"
37
+ p1: 'v1'
38
38
  });
39
39
  expect(result.id2).toEqual({
40
- p2: "v2"
40
+ p2: 'v2'
41
41
  });
42
42
  });
43
+ it('should reviveArray propagate the options', function() {
44
+ var reviver = jest.fn();
45
+ var options = {
46
+ logger: jest.fn()
47
+ };
48
+ reviveArray([
49
+ 1
50
+ ], null, reviver, options);
51
+ expect(reviver).toHaveBeenCalledWith(1, null, options);
52
+ });
53
+ it('should reviveDictionarizedArray propagate the options', function() {
54
+ var reviver = jest.fn();
55
+ var options = {
56
+ logger: jest.fn()
57
+ };
58
+ var dictionary = {
59
+ key: 'test'
60
+ };
61
+ reviveDictionarizedArray([
62
+ 'key'
63
+ ], dictionary, reviver, options);
64
+ expect(reviver).toHaveBeenCalledWith('test', dictionary, options);
65
+ });
66
+ it('should reviveMap propagate the options', function() {
67
+ var reviver = jest.fn();
68
+ var options = {
69
+ logger: jest.fn()
70
+ };
71
+ var dictionary = {
72
+ key: 'test'
73
+ };
74
+ reviveMap([
75
+ 'key'
76
+ ], dictionary, reviver, options);
77
+ expect(reviver).toHaveBeenCalledWith('key', dictionary, options);
78
+ });
43
79
  });
@@ -45,7 +45,7 @@ function _object_spread(target) {
45
45
  }
46
46
  return target;
47
47
  }
48
- import { isStringOrUndefined } from "./additional-params.request";
48
+ import { isStringOrUndefined } from './additional-params.request';
49
49
  /**
50
50
  * Plugin to add (or change) the request parameters
51
51
  */ export var AdditionalParamsSyncRequest = /*#__PURE__*/ function() {
@@ -62,8 +62,8 @@ import { isStringOrUndefined } from "./additional-params.request";
62
62
  var _this = this;
63
63
  return {
64
64
  transform: function(data) {
65
- var queryParams = typeof _this.additionalParams.queryParams === "function" ? _this.additionalParams.queryParams(data.queryParams) : _this.additionalParams.queryParams;
66
- var headers = typeof _this.additionalParams.headers === "function" ? _this.additionalParams.headers(data.headers) : _this.additionalParams.headers;
65
+ var queryParams = typeof _this.additionalParams.queryParams === 'function' ? _this.additionalParams.queryParams(data.queryParams) : _this.additionalParams.queryParams;
66
+ var headers = typeof _this.additionalParams.headers === 'function' ? _this.additionalParams.headers(data.headers) : _this.additionalParams.headers;
67
67
  var body = _this.additionalParams.body && isStringOrUndefined(data.body) ? _this.additionalParams.body(data.body) : undefined;
68
68
  if (queryParams) {
69
69
  data.queryParams = _object_spread({}, data.queryParams, queryParams);
@@ -179,7 +179,7 @@ function _ts_generator(thisArg, body) {
179
179
  * @param value
180
180
  */ export function isStringOrUndefined(value) {
181
181
  var type = typeof value === "undefined" ? "undefined" : _type_of(value);
182
- return type === "undefined" || type === "string";
182
+ return type === 'undefined' || type === 'string';
183
183
  }
184
184
  /**
185
185
  * Plugin to add (or change) the request parameters
@@ -202,7 +202,7 @@ function _ts_generator(thisArg, body) {
202
202
  return _ts_generator(this, function(_state) {
203
203
  switch(_state.label){
204
204
  case 0:
205
- if (!(typeof _this.additionalParams.queryParams === "function")) return [
205
+ if (!(typeof _this.additionalParams.queryParams === 'function')) return [
206
206
  3,
207
207
  2
208
208
  ];
@@ -221,7 +221,7 @@ function _ts_generator(thisArg, body) {
221
221
  _state.label = 3;
222
222
  case 3:
223
223
  queryParams = _tmp;
224
- if (!(typeof _this.additionalParams.headers === "function")) return [
224
+ if (!(typeof _this.additionalParams.headers === 'function')) return [
225
225
  3,
226
226
  5
227
227
  ];