@ama-sdk/core 12.3.0-prerelease.7 → 12.3.0-prerelease.70

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 (151) hide show
  1. package/cjs/clients/api-angular-client.js +6 -9
  2. package/cjs/clients/api-beacon-client.js +2 -1
  3. package/cjs/clients/api-fetch-client.js +6 -9
  4. package/cjs/fwk/api.helpers.js +2 -1
  5. package/cjs/fwk/mocks/alf-mock-adapter.js +4 -8
  6. package/cjs/fwk/mocks/base-mock-adapter.js +4 -8
  7. package/cjs/fwk/param-serialization.js +37 -10
  8. package/cjs/plugins/abort/abort.spec.js +4 -8
  9. package/cjs/plugins/additional-params/additional-params-sync.request.js +71 -2
  10. package/cjs/plugins/additional-params/additional-params.request.js +76 -11
  11. package/cjs/plugins/additional-params/additional-params.spec.js +183 -9
  12. package/cjs/plugins/api-configuration-override/api-configuration-override.request.js +4 -8
  13. package/cjs/plugins/api-configuration-override/api-configuration-override.spec.js +4 -8
  14. package/cjs/plugins/api-key/api-key.request.js +4 -8
  15. package/cjs/plugins/api-key/api-key.spec.js +4 -8
  16. package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +4 -8
  17. package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +4 -8
  18. package/cjs/plugins/client-facts/client-facts.request.js +4 -8
  19. package/cjs/plugins/client-facts/client-facts.spec.js +4 -8
  20. package/cjs/plugins/concurrent/concurrent.fetch.js +4 -8
  21. package/cjs/plugins/concurrent/concurrent.spec.js +4 -8
  22. package/cjs/plugins/custom-info/custom-info.spec.js +4 -8
  23. package/cjs/plugins/fetch-cache/fetch-cache.spec.js +4 -8
  24. package/cjs/plugins/fetch-credentials/fetch-credentials.spec.js +4 -8
  25. package/cjs/plugins/json-token/json-token.spec.js +4 -8
  26. package/cjs/plugins/keepalive/keepalive.request.js +4 -8
  27. package/cjs/plugins/keepalive/keepalive.spec.js +4 -8
  28. package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.helpers.js +4 -8
  29. package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +4 -8
  30. package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +4 -8
  31. package/cjs/plugins/mock-intercept/mock-intercept.angular.js +4 -8
  32. package/cjs/plugins/mock-intercept/mock-intercept.fetch.js +4 -8
  33. package/cjs/plugins/mock-intercept/mock-intercept.request.js +4 -8
  34. package/cjs/plugins/mock-intercept/mock-intercept.spec.js +4 -8
  35. package/cjs/plugins/perf-metric/perf-metric.fetch.js +4 -8
  36. package/cjs/plugins/pii-tokenizer/pii-tokenizer.request.js +4 -8
  37. package/cjs/plugins/pii-tokenizer/pii-tokenizer.spec.js +4 -8
  38. package/cjs/plugins/raw-response-info/raw-response-info.spec.js +4 -8
  39. package/cjs/plugins/retry/retry.fetch.js +4 -8
  40. package/cjs/plugins/retry/retry.spec.js +4 -8
  41. package/cjs/plugins/reviver/reviver.spec.js +4 -8
  42. package/cjs/plugins/session-id/session-id.spec.js +4 -8
  43. package/cjs/plugins/si-token/si-token.spec.js +4 -8
  44. package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +4 -8
  45. package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +4 -8
  46. package/cjs/plugins/timeout/timeout.fetch.js +4 -8
  47. package/cjs/plugins/timeout/timeout.spec.js +4 -8
  48. package/cjs/plugins/url-rewrite/url-rewrite.request.js +4 -8
  49. package/cjs/plugins/url-rewrite/url-rewrite.spec.js +4 -8
  50. package/cjs/plugins/wait-for/wait-for.fetch.js +4 -8
  51. package/cjs/plugins/wait-for/wait-for.spec.js +4 -8
  52. package/cjs/utils/crypto.js +4 -8
  53. package/cjs/utils/generic-api.js +4 -8
  54. package/cjs/utils/json-token.js +4 -8
  55. package/cjs/utils/json-token.spec.js +4 -8
  56. package/esm2015/clients/api-angular-client.js +6 -9
  57. package/esm2015/clients/api-beacon-client.js +2 -1
  58. package/esm2015/clients/api-fetch-client.js +6 -9
  59. package/esm2015/fwk/api.helpers.js +2 -2
  60. package/esm2015/fwk/mocks/alf-mock-adapter.js +4 -8
  61. package/esm2015/fwk/mocks/base-mock-adapter.js +4 -8
  62. package/esm2015/fwk/param-serialization.js +37 -10
  63. package/esm2015/plugins/abort/abort.spec.js +4 -8
  64. package/esm2015/plugins/additional-params/additional-params-sync.request.js +71 -2
  65. package/esm2015/plugins/additional-params/additional-params.request.js +76 -11
  66. package/esm2015/plugins/additional-params/additional-params.spec.js +183 -9
  67. package/esm2015/plugins/api-configuration-override/api-configuration-override.request.js +4 -8
  68. package/esm2015/plugins/api-configuration-override/api-configuration-override.spec.js +4 -8
  69. package/esm2015/plugins/api-key/api-key.request.js +4 -8
  70. package/esm2015/plugins/api-key/api-key.spec.js +4 -8
  71. package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +4 -8
  72. package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +4 -8
  73. package/esm2015/plugins/client-facts/client-facts.request.js +4 -8
  74. package/esm2015/plugins/client-facts/client-facts.spec.js +4 -8
  75. package/esm2015/plugins/concurrent/concurrent.fetch.js +4 -8
  76. package/esm2015/plugins/concurrent/concurrent.spec.js +4 -8
  77. package/esm2015/plugins/custom-info/custom-info.spec.js +4 -8
  78. package/esm2015/plugins/fetch-cache/fetch-cache.spec.js +4 -8
  79. package/esm2015/plugins/fetch-credentials/fetch-credentials.spec.js +4 -8
  80. package/esm2015/plugins/json-token/json-token.spec.js +4 -8
  81. package/esm2015/plugins/keepalive/keepalive.request.js +4 -8
  82. package/esm2015/plugins/keepalive/keepalive.spec.js +4 -8
  83. package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.helpers.js +4 -8
  84. package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +4 -8
  85. package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +4 -8
  86. package/esm2015/plugins/mock-intercept/mock-intercept.angular.js +4 -8
  87. package/esm2015/plugins/mock-intercept/mock-intercept.fetch.js +4 -8
  88. package/esm2015/plugins/mock-intercept/mock-intercept.request.js +4 -8
  89. package/esm2015/plugins/mock-intercept/mock-intercept.spec.js +4 -8
  90. package/esm2015/plugins/perf-metric/perf-metric.fetch.js +4 -8
  91. package/esm2015/plugins/pii-tokenizer/pii-tokenizer.request.js +4 -8
  92. package/esm2015/plugins/pii-tokenizer/pii-tokenizer.spec.js +4 -8
  93. package/esm2015/plugins/raw-response-info/raw-response-info.spec.js +4 -8
  94. package/esm2015/plugins/retry/retry.fetch.js +4 -8
  95. package/esm2015/plugins/retry/retry.spec.js +4 -8
  96. package/esm2015/plugins/reviver/reviver.spec.js +4 -8
  97. package/esm2015/plugins/session-id/session-id.spec.js +4 -8
  98. package/esm2015/plugins/si-token/si-token.spec.js +4 -8
  99. package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +4 -8
  100. package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +4 -8
  101. package/esm2015/plugins/timeout/timeout.fetch.js +4 -8
  102. package/esm2015/plugins/timeout/timeout.spec.js +4 -8
  103. package/esm2015/plugins/url-rewrite/url-rewrite.request.js +4 -8
  104. package/esm2015/plugins/url-rewrite/url-rewrite.spec.js +4 -8
  105. package/esm2015/plugins/wait-for/wait-for.fetch.js +4 -8
  106. package/esm2015/plugins/wait-for/wait-for.spec.js +4 -8
  107. package/esm2015/utils/crypto.js +4 -8
  108. package/esm2015/utils/generic-api.js +4 -8
  109. package/esm2015/utils/json-token.js +4 -8
  110. package/esm2015/utils/json-token.spec.js +4 -8
  111. package/package.json +13 -13
  112. package/schematics/ng-add/index.d.ts.map +1 -1
  113. package/schematics/ng-add/index.js +8 -21
  114. package/src/clients/api-angular-client.d.ts +1 -1
  115. package/src/clients/api-angular-client.d.ts.map +1 -1
  116. package/src/clients/api-angular-client.js +2 -1
  117. package/src/clients/api-angular-client.js.map +1 -1
  118. package/src/clients/api-beacon-client.d.ts +1 -1
  119. package/src/clients/api-beacon-client.d.ts.map +1 -1
  120. package/src/clients/api-beacon-client.js +2 -1
  121. package/src/clients/api-beacon-client.js.map +1 -1
  122. package/src/clients/api-fetch-client.d.ts +1 -1
  123. package/src/clients/api-fetch-client.d.ts.map +1 -1
  124. package/src/clients/api-fetch-client.js +2 -1
  125. package/src/clients/api-fetch-client.js.map +1 -1
  126. package/src/fwk/api.helpers.d.ts +1 -2
  127. package/src/fwk/api.helpers.d.ts.map +1 -1
  128. package/src/fwk/api.helpers.js +1 -2
  129. package/src/fwk/api.helpers.js.map +1 -1
  130. package/src/fwk/core/api-client.d.ts +4 -2
  131. package/src/fwk/core/api-client.d.ts.map +1 -1
  132. package/src/fwk/core/api-client.js.map +1 -1
  133. package/src/fwk/core/base-api-constructor.d.ts +2 -0
  134. package/src/fwk/core/base-api-constructor.d.ts.map +1 -1
  135. package/src/fwk/core/base-api-constructor.js.map +1 -1
  136. package/src/fwk/param-serialization.d.ts +20 -0
  137. package/src/fwk/param-serialization.d.ts.map +1 -1
  138. package/src/fwk/param-serialization.js +36 -8
  139. package/src/fwk/param-serialization.js.map +1 -1
  140. package/src/plugins/additional-params/additional-params-sync.request.d.ts +9 -2
  141. package/src/plugins/additional-params/additional-params-sync.request.d.ts.map +1 -1
  142. package/src/plugins/additional-params/additional-params-sync.request.js +21 -2
  143. package/src/plugins/additional-params/additional-params-sync.request.js.map +1 -1
  144. package/src/plugins/additional-params/additional-params.request.d.ts +11 -2
  145. package/src/plugins/additional-params/additional-params.request.d.ts.map +1 -1
  146. package/src/plugins/additional-params/additional-params.request.js +21 -2
  147. package/src/plugins/additional-params/additional-params.request.js.map +1 -1
  148. package/src/plugins/core/request-plugin.d.ts +14 -1
  149. package/src/plugins/core/request-plugin.d.ts.map +1 -1
  150. package/src/plugins/si-token/si-token.request.d.ts.map +1 -1
  151. package/src/plugins/si-token/si-token.request.js.map +1 -1
@@ -146,7 +146,7 @@ function _unsupported_iterable_to_array(o, minLen) {
146
146
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
147
147
  }
148
148
  function _ts_generator(thisArg, body) {
149
- var f, y, t, g, _ = {
149
+ var f, y, t, _ = {
150
150
  label: 0,
151
151
  sent: function() {
152
152
  if (t[0] & 1) throw t[1];
@@ -154,12 +154,8 @@ function _ts_generator(thisArg, body) {
154
154
  },
155
155
  trys: [],
156
156
  ops: []
157
- };
158
- return g = {
159
- next: verb(0),
160
- "throw": verb(1),
161
- "return": verb(2)
162
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
157
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
158
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
163
159
  return this;
164
160
  }), g;
165
161
  function verb(n) {
@@ -172,7 +168,7 @@ function _ts_generator(thisArg, body) {
172
168
  }
173
169
  function step(op) {
174
170
  if (f) throw new TypeError("Generator is already executing.");
175
- while(_)try {
171
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
176
172
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
177
173
  if (y = 0, t) op = [
178
174
  op[0] & 2,
@@ -248,7 +244,8 @@ var DEFAULT_OPTIONS = {
248
244
  angularPlugins: [],
249
245
  requestPlugins: [],
250
246
  enableTokenization: false,
251
- disableFallback: false
247
+ disableFallback: false,
248
+ enableParameterSerialization: false
252
249
  };
253
250
  var ApiAngularClient = /*#__PURE__*/ function() {
254
251
  "use strict";
@@ -91,7 +91,8 @@ function _object_spread_props(target, source) {
91
91
  var DEFAULT_OPTIONS = {
92
92
  replyPlugins: [],
93
93
  requestPlugins: [],
94
- enableTokenization: false
94
+ enableTokenization: false,
95
+ enableParameterSerialization: false
95
96
  };
96
97
  /**
97
98
  * Determine if the given value is a promise
@@ -146,7 +146,7 @@ function _unsupported_iterable_to_array(o, minLen) {
146
146
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
147
147
  }
148
148
  function _ts_generator(thisArg, body) {
149
- var f, y, t, g, _ = {
149
+ var f, y, t, _ = {
150
150
  label: 0,
151
151
  sent: function() {
152
152
  if (t[0] & 1) throw t[1];
@@ -154,12 +154,8 @@ function _ts_generator(thisArg, body) {
154
154
  },
155
155
  trys: [],
156
156
  ops: []
157
- };
158
- return g = {
159
- next: verb(0),
160
- "throw": verb(1),
161
- "return": verb(2)
162
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
157
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
158
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
163
159
  return this;
164
160
  }), g;
165
161
  function verb(n) {
@@ -172,7 +168,7 @@ function _ts_generator(thisArg, body) {
172
168
  }
173
169
  function step(op) {
174
170
  if (f) throw new TypeError("Generator is already executing.");
175
- while(_)try {
171
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
176
172
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
177
173
  if (y = 0, t) op = [
178
174
  op[0] & 2,
@@ -248,7 +244,8 @@ var DEFAULT_OPTIONS = {
248
244
  fetchPlugins: [],
249
245
  requestPlugins: [],
250
246
  enableTokenization: false,
251
- disableFallback: false
247
+ disableFallback: false,
248
+ enableParameterSerialization: false
252
249
  };
253
250
  var ApiFetchClient = /*#__PURE__*/ function() {
254
251
  "use strict";
@@ -129,7 +129,8 @@ function prepareUrl(url) {
129
129
  var paramsPrefix = url.includes('?') ? '&' : '?';
130
130
  return url + (queryPart ? paramsPrefix + queryPart : '');
131
131
  }
132
- function prepareUrlWithQueryParams(url, serializedQueryParams) {
132
+ function prepareUrlWithQueryParams(url) {
133
+ var serializedQueryParams = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
133
134
  var paramsPrefix = url.includes('?') ? '&' : '?';
134
135
  var queryPart = Object.values(serializedQueryParams).join('&');
135
136
  return url + (queryPart ? paramsPrefix + queryPart : '');
@@ -92,7 +92,7 @@ function _object_spread_props(target, source) {
92
92
  return target;
93
93
  }
94
94
  function _ts_generator(thisArg, body) {
95
- var f, y, t, g, _ = {
95
+ var f, y, t, _ = {
96
96
  label: 0,
97
97
  sent: function() {
98
98
  if (t[0] & 1) throw t[1];
@@ -100,12 +100,8 @@ function _ts_generator(thisArg, body) {
100
100
  },
101
101
  trys: [],
102
102
  ops: []
103
- };
104
- return g = {
105
- next: verb(0),
106
- "throw": verb(1),
107
- "return": verb(2)
108
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
103
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
104
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
109
105
  return this;
110
106
  }), g;
111
107
  function verb(n) {
@@ -118,7 +114,7 @@ function _ts_generator(thisArg, body) {
118
114
  }
119
115
  function step(op) {
120
116
  if (f) throw new TypeError("Generator is already executing.");
121
- while(_)try {
117
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
122
118
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
123
119
  if (y = 0, t) op = [
124
120
  op[0] & 2,
@@ -71,7 +71,7 @@ function _define_property(obj, key, value) {
71
71
  return obj;
72
72
  }
73
73
  function _ts_generator(thisArg, body) {
74
- var f, y, t, g, _ = {
74
+ var f, y, t, _ = {
75
75
  label: 0,
76
76
  sent: function() {
77
77
  if (t[0] & 1) throw t[1];
@@ -79,12 +79,8 @@ function _ts_generator(thisArg, body) {
79
79
  },
80
80
  trys: [],
81
81
  ops: []
82
- };
83
- return g = {
84
- next: verb(0),
85
- "throw": verb(1),
86
- "return": verb(2)
87
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
82
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
83
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
88
84
  return this;
89
85
  }), g;
90
86
  function verb(n) {
@@ -97,7 +93,7 @@ function _ts_generator(thisArg, body) {
97
93
  }
98
94
  function step(op) {
99
95
  if (f) throw new TypeError("Generator is already executing.");
100
- while(_)try {
96
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
101
97
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
102
98
  if (y = 0, t) op = [
103
99
  op[0] & 2,
@@ -12,11 +12,17 @@ _export(exports, {
12
12
  isDateType: function() {
13
13
  return isDateType;
14
14
  },
15
+ isParamValueRecord: function() {
16
+ return isParamValueRecord;
17
+ },
15
18
  serializePathParams: function() {
16
19
  return serializePathParams;
17
20
  },
18
21
  serializeQueryParams: function() {
19
22
  return serializeQueryParams;
23
+ },
24
+ serializeRequestPluginQueryParams: function() {
25
+ return serializeRequestPluginQueryParams;
20
26
  }
21
27
  });
22
28
  var _date = require("./date");
@@ -77,9 +83,31 @@ function _unsupported_iterable_to_array(o, minLen) {
77
83
  if (n === "Map" || n === "Set") return Array.from(n);
78
84
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
79
85
  }
86
+ /** URL encoding of space character, delimiter for spaceDelimited style */ var SPACE_URL_CODE = encodeURIComponent(' ');
87
+ /** URL encoding of pipe character, delimiter for pipeDelimited style */ var PIPE_URL_CODE = encodeURIComponent('|');
88
+ /** URL encoding of opening square bracket, used in deepObject style */ var OPENING_SQUARE_BRACKET_URL_CODE = encodeURIComponent('[');
89
+ /** URL encoding of closing square bracket, used in deepObject style */ var CLOSING_SQUARE_BRACKET_URL_CODE = encodeURIComponent(']');
80
90
  function isDateType(prop) {
81
91
  return _instanceof(prop, Date) || _instanceof(prop, _date.utils.Date) || _instanceof(prop, _date.utils.DateTime);
82
92
  }
93
+ function isParamValueRecord(param) {
94
+ return (typeof param === "undefined" ? "undefined" : _type_of(param)) === 'object' && Object.values(param).every(function(item) {
95
+ return typeof item === 'string';
96
+ });
97
+ }
98
+ function serializeRequestPluginQueryParams(queryParams) {
99
+ var queryParamsValues = {};
100
+ var queryParamSerialization = {};
101
+ Object.entries(queryParams).forEach(function(param) {
102
+ var _param = _sliced_to_array(param, 2), paramKey = _param[0], paramValue = _param[1];
103
+ queryParamsValues[paramKey] = paramValue.value;
104
+ queryParamSerialization[paramKey] = {
105
+ explode: paramValue.explode,
106
+ style: paramValue.style
107
+ };
108
+ });
109
+ return serializeQueryParams(queryParamsValues, queryParamSerialization);
110
+ }
83
111
  /**
84
112
  * Serialize query parameters of type array
85
113
  * OpenAPI Parameter Serialization {@link https://swagger.io/specification | documentation}
@@ -110,7 +138,7 @@ function isDateType(prop) {
110
138
  }
111
139
  return encodeURIComponent(queryParamName) + '=' + filteredArray.map(function(v) {
112
140
  return isDateType(v) ? v.toJSON() : encodeURIComponent(v.toString());
113
- }).join('%20');
141
+ }).join(SPACE_URL_CODE);
114
142
  }
115
143
  case 'pipeDelimited':
116
144
  {
@@ -119,7 +147,7 @@ function isDateType(prop) {
119
147
  }
120
148
  return encodeURIComponent(queryParamName) + '=' + filteredArray.map(function(v) {
121
149
  return isDateType(v) ? v.toJSON() : encodeURIComponent(v.toString());
122
- }).join('%7C');
150
+ }).join(PIPE_URL_CODE);
123
151
  }
124
152
  }
125
153
  }
@@ -150,17 +178,17 @@ function isDateType(prop) {
150
178
  } else if (paramSerialization.style === 'spaceDelimited' && !paramSerialization.explode && !emptyObject) {
151
179
  return encodeURIComponent(queryParamName) + '=' + Object.entries(filteredObject).map(function(param) {
152
180
  var _param = _sliced_to_array(param, 2), propName = _param[0], propValue = _param[1];
153
- return encodeURIComponent(propName) + '%20' + (isDateType(propValue) ? propValue.toJSON() : encodeURIComponent(propValue.toString()));
154
- }).join('%20');
181
+ return encodeURIComponent(propName) + SPACE_URL_CODE + (isDateType(propValue) ? propValue.toJSON() : encodeURIComponent(propValue.toString()));
182
+ }).join(SPACE_URL_CODE);
155
183
  } else if (paramSerialization.style === 'pipeDelimited' && !paramSerialization.explode && !emptyObject) {
156
184
  return encodeURIComponent(queryParamName) + '=' + Object.entries(filteredObject).map(function(param) {
157
185
  var _param = _sliced_to_array(param, 2), propName = _param[0], propValue = _param[1];
158
- return encodeURIComponent(propName) + '%7C' + (isDateType(propValue) ? propValue.toJSON() : encodeURIComponent(propValue.toString()));
159
- }).join('%7C');
186
+ return encodeURIComponent(propName) + PIPE_URL_CODE + (isDateType(propValue) ? propValue.toJSON() : encodeURIComponent(propValue.toString()));
187
+ }).join(PIPE_URL_CODE);
160
188
  } else if (paramSerialization.style === 'deepObject' && paramSerialization.explode && !emptyObject) {
161
189
  return Object.entries(filteredObject).map(function(param) {
162
190
  var _param = _sliced_to_array(param, 2), propName = _param[0], propValue = _param[1];
163
- return encodeURIComponent(queryParamName) + '%5B' + encodeURIComponent(propName) + '%5D=' + (isDateType(propValue) ? propValue.toJSON() : encodeURIComponent(propValue.toString()));
191
+ return encodeURIComponent(queryParamName) + OPENING_SQUARE_BRACKET_URL_CODE + encodeURIComponent(propName) + CLOSING_SQUARE_BRACKET_URL_CODE + '=' + (isDateType(propValue) ? propValue.toJSON() : encodeURIComponent(propValue.toString()));
164
192
  }).join('&');
165
193
  }
166
194
  }
@@ -175,9 +203,8 @@ function serializeQueryParams(queryParams, queryParamSerialization) {
175
203
  } else if ((typeof queryParamValue === "undefined" ? "undefined" : _type_of(queryParamValue)) === 'object' && !isDateType(queryParamValue)) {
176
204
  serializedValue = serializeObjectQueryParams(queryParamName, queryParamValue, paramSerialization);
177
205
  } else {
178
- if (paramSerialization.style === 'form') {
179
- serializedValue = encodeURIComponent(queryParamName) + '=' + (isDateType(queryParamValue) ? queryParamValue.toJSON() : encodeURIComponent(queryParamValue.toString()));
180
- }
206
+ // NOTE: 'form' style is the default value for primitive types
207
+ serializedValue = encodeURIComponent(queryParamName) + '=' + (isDateType(queryParamValue) ? queryParamValue.toJSON() : encodeURIComponent(queryParamValue.toString()));
181
208
  }
182
209
  if (serializedValue) {
183
210
  acc[queryParamName] = serializedValue;
@@ -33,7 +33,7 @@ function _async_to_generator(fn) {
33
33
  };
34
34
  }
35
35
  function _ts_generator(thisArg, body) {
36
- var f, y, t, g, _ = {
36
+ var f, y, t, _ = {
37
37
  label: 0,
38
38
  sent: function() {
39
39
  if (t[0] & 1) throw t[1];
@@ -41,12 +41,8 @@ function _ts_generator(thisArg, body) {
41
41
  },
42
42
  trys: [],
43
43
  ops: []
44
- };
45
- return g = {
46
- next: verb(0),
47
- "throw": verb(1),
48
- "return": verb(2)
49
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
44
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
45
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
50
46
  return this;
51
47
  }), g;
52
48
  function verb(n) {
@@ -59,7 +55,7 @@ function _ts_generator(thisArg, body) {
59
55
  }
60
56
  function step(op) {
61
57
  if (f) throw new TypeError("Generator is already executing.");
62
- while(_)try {
58
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
63
59
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
64
60
  if (y = 0, t) op = [
65
61
  op[0] & 2,
@@ -8,7 +8,17 @@ Object.defineProperty(exports, "AdditionalParamsSyncRequest", {
8
8
  return AdditionalParamsSyncRequest;
9
9
  }
10
10
  });
11
+ var _apihelpers = require("../../fwk/api.helpers");
12
+ var _paramserialization = require("../../fwk/param-serialization");
11
13
  var _additionalparamsrequest = require("./additional-params.request");
14
+ function _array_like_to_array(arr, len) {
15
+ if (len == null || len > arr.length) len = arr.length;
16
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
17
+ return arr2;
18
+ }
19
+ function _array_with_holes(arr) {
20
+ if (Array.isArray(arr)) return arr;
21
+ }
12
22
  function _class_call_check(instance, Constructor) {
13
23
  if (!(instance instanceof Constructor)) {
14
24
  throw new TypeError("Cannot call a class as a function");
@@ -41,6 +51,33 @@ function _define_property(obj, key, value) {
41
51
  }
42
52
  return obj;
43
53
  }
54
+ function _iterable_to_array_limit(arr, i) {
55
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
56
+ if (_i == null) return;
57
+ var _arr = [];
58
+ var _n = true;
59
+ var _d = false;
60
+ var _s, _e;
61
+ try {
62
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
63
+ _arr.push(_s.value);
64
+ if (i && _arr.length === i) break;
65
+ }
66
+ } catch (err) {
67
+ _d = true;
68
+ _e = err;
69
+ } finally{
70
+ try {
71
+ if (!_n && _i["return"] != null) _i["return"]();
72
+ } finally{
73
+ if (_d) throw _e;
74
+ }
75
+ }
76
+ return _arr;
77
+ }
78
+ function _non_iterable_rest() {
79
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
80
+ }
44
81
  function _object_spread(target) {
45
82
  for(var i = 1; i < arguments.length; i++){
46
83
  var source = arguments[i] != null ? arguments[i] : {};
@@ -56,6 +93,17 @@ function _object_spread(target) {
56
93
  }
57
94
  return target;
58
95
  }
96
+ function _sliced_to_array(arr, i) {
97
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
98
+ }
99
+ function _unsupported_iterable_to_array(o, minLen) {
100
+ if (!o) return;
101
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
102
+ var n = Object.prototype.toString.call(o).slice(8, -1);
103
+ if (n === "Object" && o.constructor) n = o.constructor.name;
104
+ if (n === "Map" || n === "Set") return Array.from(n);
105
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
106
+ }
59
107
  var AdditionalParamsSyncRequest = /*#__PURE__*/ function() {
60
108
  "use strict";
61
109
  function AdditionalParamsSyncRequest(additionalParams) {
@@ -66,7 +114,7 @@ var AdditionalParamsSyncRequest = /*#__PURE__*/ function() {
66
114
  _create_class(AdditionalParamsSyncRequest, [
67
115
  {
68
116
  key: "load",
69
- value: function load() {
117
+ value: function load(context) {
70
118
  var _this = this;
71
119
  return {
72
120
  transform: function(data) {
@@ -74,7 +122,28 @@ var AdditionalParamsSyncRequest = /*#__PURE__*/ function() {
74
122
  var headers = typeof _this.additionalParams.headers === 'function' ? _this.additionalParams.headers(data.headers) : _this.additionalParams.headers;
75
123
  var body = _this.additionalParams.body && (0, _additionalparamsrequest.isStringOrUndefined)(data.body) ? _this.additionalParams.body(data.body) : undefined;
76
124
  if (queryParams) {
77
- data.queryParams = _object_spread({}, data.queryParams, queryParams);
125
+ var _data_paramSerializationOptions;
126
+ if ((_data_paramSerializationOptions = data.paramSerializationOptions) === null || _data_paramSerializationOptions === void 0 ? void 0 : _data_paramSerializationOptions.enableParameterSerialization) {
127
+ if ((0, _paramserialization.isParamValueRecord)(queryParams)) {
128
+ throw new Error('It is not possible to serialize additional query parameters without their serialization properties `value`, `explode`, and `style`.');
129
+ } else {
130
+ data.queryParams = _object_spread({}, data.queryParams, (0, _paramserialization.serializeRequestPluginQueryParams)(queryParams));
131
+ }
132
+ } else {
133
+ if ((0, _paramserialization.isParamValueRecord)(queryParams)) {
134
+ data.queryParams = _object_spread({}, data.queryParams, queryParams);
135
+ } else {
136
+ var queryParamsValues = Object.fromEntries(Object.entries(queryParams).map(function(param) {
137
+ var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
138
+ return [
139
+ key,
140
+ value.value
141
+ ];
142
+ }));
143
+ data.queryParams = _object_spread({}, data.queryParams, (0, _apihelpers.stringifyQueryParams)(queryParamsValues));
144
+ ((context === null || context === void 0 ? void 0 : context.logger) || console).log('The serialization of additional query parameters has been ignored since parameter serialization is not enabled.');
145
+ }
146
+ }
78
147
  }
79
148
  if (body !== undefined) {
80
149
  data.body = body === null ? undefined : body;
@@ -16,6 +16,16 @@ _export(exports, {
16
16
  return isStringOrUndefined;
17
17
  }
18
18
  });
19
+ var _apihelpers = require("../../fwk/api.helpers");
20
+ var _paramserialization = require("../../fwk/param-serialization");
21
+ function _array_like_to_array(arr, len) {
22
+ if (len == null || len > arr.length) len = arr.length;
23
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
24
+ return arr2;
25
+ }
26
+ function _array_with_holes(arr) {
27
+ if (Array.isArray(arr)) return arr;
28
+ }
19
29
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
20
30
  try {
21
31
  var info = gen[key](arg);
@@ -77,6 +87,33 @@ function _define_property(obj, key, value) {
77
87
  }
78
88
  return obj;
79
89
  }
90
+ function _iterable_to_array_limit(arr, i) {
91
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
92
+ if (_i == null) return;
93
+ var _arr = [];
94
+ var _n = true;
95
+ var _d = false;
96
+ var _s, _e;
97
+ try {
98
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
99
+ _arr.push(_s.value);
100
+ if (i && _arr.length === i) break;
101
+ }
102
+ } catch (err) {
103
+ _d = true;
104
+ _e = err;
105
+ } finally{
106
+ try {
107
+ if (!_n && _i["return"] != null) _i["return"]();
108
+ } finally{
109
+ if (_d) throw _e;
110
+ }
111
+ }
112
+ return _arr;
113
+ }
114
+ function _non_iterable_rest() {
115
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
116
+ }
80
117
  function _object_spread(target) {
81
118
  for(var i = 1; i < arguments.length; i++){
82
119
  var source = arguments[i] != null ? arguments[i] : {};
@@ -92,12 +129,23 @@ function _object_spread(target) {
92
129
  }
93
130
  return target;
94
131
  }
132
+ function _sliced_to_array(arr, i) {
133
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
134
+ }
95
135
  function _type_of(obj) {
96
136
  "@swc/helpers - typeof";
97
137
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
98
138
  }
139
+ function _unsupported_iterable_to_array(o, minLen) {
140
+ if (!o) return;
141
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
142
+ var n = Object.prototype.toString.call(o).slice(8, -1);
143
+ if (n === "Object" && o.constructor) n = o.constructor.name;
144
+ if (n === "Map" || n === "Set") return Array.from(n);
145
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
146
+ }
99
147
  function _ts_generator(thisArg, body) {
100
- var f, y, t, g, _ = {
148
+ var f, y, t, _ = {
101
149
  label: 0,
102
150
  sent: function() {
103
151
  if (t[0] & 1) throw t[1];
@@ -105,12 +153,8 @@ function _ts_generator(thisArg, body) {
105
153
  },
106
154
  trys: [],
107
155
  ops: []
108
- };
109
- return g = {
110
- next: verb(0),
111
- "throw": verb(1),
112
- "return": verb(2)
113
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
156
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
157
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
114
158
  return this;
115
159
  }), g;
116
160
  function verb(n) {
@@ -123,7 +167,7 @@ function _ts_generator(thisArg, body) {
123
167
  }
124
168
  function step(op) {
125
169
  if (f) throw new TypeError("Generator is already executing.");
126
- while(_)try {
170
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
127
171
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
128
172
  if (y = 0, t) op = [
129
173
  op[0] & 2,
@@ -205,12 +249,12 @@ var AdditionalParamsRequest = /*#__PURE__*/ function() {
205
249
  _create_class(AdditionalParamsRequest, [
206
250
  {
207
251
  key: "load",
208
- value: function load() {
252
+ value: function load(context) {
209
253
  var _this = this;
210
254
  return {
211
255
  transform: /*#__PURE__*/ function() {
212
256
  var _ref = _async_to_generator(function(data) {
213
- var queryParams, _tmp, headers, _tmp1, body, _tmp2;
257
+ var queryParams, _tmp, headers, _tmp1, body, _data_paramSerializationOptions, queryParamsValues, _tmp2;
214
258
  return _ts_generator(this, function(_state) {
215
259
  switch(_state.label){
216
260
  case 0:
@@ -254,7 +298,28 @@ var AdditionalParamsRequest = /*#__PURE__*/ function() {
254
298
  headers = _tmp1;
255
299
  body = _this.additionalParams.body && isStringOrUndefined(data.body) ? _this.additionalParams.body(data.body) : undefined;
256
300
  if (queryParams) {
257
- data.queryParams = _object_spread({}, data.queryParams, queryParams);
301
+ ;
302
+ if ((_data_paramSerializationOptions = data.paramSerializationOptions) === null || _data_paramSerializationOptions === void 0 ? void 0 : _data_paramSerializationOptions.enableParameterSerialization) {
303
+ if ((0, _paramserialization.isParamValueRecord)(queryParams)) {
304
+ throw new Error('It is not possible to serialize additional query parameters without their serialization properties `value`, `explode`, and `style`.');
305
+ } else {
306
+ data.queryParams = _object_spread({}, data.queryParams, (0, _paramserialization.serializeRequestPluginQueryParams)(queryParams));
307
+ }
308
+ } else {
309
+ if ((0, _paramserialization.isParamValueRecord)(queryParams)) {
310
+ data.queryParams = _object_spread({}, data.queryParams, queryParams);
311
+ } else {
312
+ queryParamsValues = Object.fromEntries(Object.entries(queryParams).map(function(param) {
313
+ var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
314
+ return [
315
+ key,
316
+ value.value
317
+ ];
318
+ }));
319
+ data.queryParams = _object_spread({}, data.queryParams, (0, _apihelpers.stringifyQueryParams)(queryParamsValues));
320
+ ((context === null || context === void 0 ? void 0 : context.logger) || console).log('The serialization of additional query parameters has been ignored since parameter serialization is not enabled.');
321
+ }
322
+ }
258
323
  }
259
324
  if (!(body !== undefined)) return [
260
325
  3,