@emilgroup/public-api-sdk 1.40.1-beta.28 → 1.40.1-beta.29

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 (47) hide show
  1. package/README.md +2 -2
  2. package/api/address-completions-validations-api.ts +16 -6
  3. package/api/booking-funnels-api.ts +8 -3
  4. package/api/documents-api.ts +56 -21
  5. package/api/health-api.ts +1 -1
  6. package/api/ibanvalidator-api.ts +8 -3
  7. package/api/leads-api.ts +64 -24
  8. package/api/named-ranges-api.ts +8 -3
  9. package/api/notifications-api.ts +24 -9
  10. package/api/partners-api.ts +8 -3
  11. package/api/payments-setup-api.ts +60 -20
  12. package/api/product-versions-api.ts +32 -12
  13. package/api/products-api.ts +72 -27
  14. package/base.ts +239 -43
  15. package/common.ts +3 -2
  16. package/configuration.ts +20 -0
  17. package/dist/api/address-completions-validations-api.d.ts +2 -2
  18. package/dist/api/address-completions-validations-api.js +22 -14
  19. package/dist/api/booking-funnels-api.d.ts +1 -1
  20. package/dist/api/booking-funnels-api.js +11 -7
  21. package/dist/api/documents-api.d.ts +7 -7
  22. package/dist/api/documents-api.js +93 -53
  23. package/dist/api/health-api.d.ts +1 -1
  24. package/dist/api/health-api.js +1 -1
  25. package/dist/api/ibanvalidator-api.d.ts +1 -1
  26. package/dist/api/ibanvalidator-api.js +15 -8
  27. package/dist/api/leads-api.d.ts +8 -8
  28. package/dist/api/leads-api.js +120 -64
  29. package/dist/api/named-ranges-api.d.ts +1 -1
  30. package/dist/api/named-ranges-api.js +11 -7
  31. package/dist/api/notifications-api.d.ts +3 -3
  32. package/dist/api/notifications-api.js +45 -24
  33. package/dist/api/partners-api.d.ts +1 -1
  34. package/dist/api/partners-api.js +15 -8
  35. package/dist/api/payments-setup-api.d.ts +4 -4
  36. package/dist/api/payments-setup-api.js +80 -40
  37. package/dist/api/product-versions-api.d.ts +4 -4
  38. package/dist/api/product-versions-api.js +56 -31
  39. package/dist/api/products-api.d.ts +9 -9
  40. package/dist/api/products-api.js +119 -68
  41. package/dist/base.d.ts +26 -0
  42. package/dist/base.js +243 -60
  43. package/dist/common.d.ts +1 -1
  44. package/dist/common.js +1 -0
  45. package/dist/configuration.d.ts +17 -0
  46. package/dist/configuration.js +2 -0
  47. package/package.json +2 -2
@@ -93,5 +93,5 @@ export declare class PartnersApi extends BaseAPI {
93
93
  * @throws {RequiredError}
94
94
  * @memberof PartnersApi
95
95
  */
96
- validatePartner(requestParameters: PartnersApiValidatePartnerRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ValidatePartnerResponseClass, any, {}>>;
96
+ validatePartner(requestParameters: PartnersApiValidatePartnerRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ValidatePartnerResponseClass, any, {}, any>>;
97
97
  }
@@ -103,9 +103,10 @@ var PartnersApiAxiosParamCreator = function (configuration) {
103
103
  validatePartner: function (validatePartnerRequestDto, authorization, options) {
104
104
  if (options === void 0) { options = {}; }
105
105
  return __awaiter(_this, void 0, void 0, function () {
106
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
- return __generator(this, function (_a) {
108
- switch (_a.label) {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
107
+ var _a;
108
+ return __generator(this, function (_b) {
109
+ switch (_b.label) {
109
110
  case 0:
110
111
  // verify required parameter 'validatePartnerRequestDto' is not null or undefined
111
112
  (0, common_1.assertParamExists)('validatePartner', 'validatePartnerRequestDto', validatePartnerRequestDto);
@@ -120,13 +121,19 @@ var PartnersApiAxiosParamCreator = function (configuration) {
120
121
  localVarQueryParameter = {};
121
122
  // authentication bearer required
122
123
  // http bearer authentication required
123
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
125
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
126
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
127
+ ];
124
128
  case 1:
125
129
  // authentication bearer required
126
130
  // http bearer authentication required
127
- _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ _b.sent();
132
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
133
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
134
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
135
+ if (authorizationValue || authorizationKeepEmpty) {
136
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
130
137
  }
131
138
  localVarHeaderParameter['Content-Type'] = 'application/json';
132
139
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -217,7 +224,7 @@ var PartnersApi = /** @class */ (function (_super) {
217
224
  */
218
225
  PartnersApi.prototype.validatePartner = function (requestParameters, options) {
219
226
  var _this = this;
220
- return (0, exports.PartnersApiFp)(this.configuration).validatePartner(requestParameters.validatePartnerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
227
+ return (0, exports.PartnersApiFp)(this.configuration).validatePartner(requestParameters.validatePartnerRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
221
228
  };
222
229
  return PartnersApi;
223
230
  }(base_1.BaseAPI));
@@ -261,7 +261,7 @@ export declare class PaymentsSetupApi extends BaseAPI {
261
261
  * @throws {RequiredError}
262
262
  * @memberof PaymentsSetupApi
263
263
  */
264
- completePaymentSetup(requestParameters: PaymentsSetupApiCompletePaymentSetupRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CompletePaymentSetupResponseClass, any, {}>>;
264
+ completePaymentSetup(requestParameters: PaymentsSetupApiCompletePaymentSetupRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CompletePaymentSetupResponseClass, any, {}, any>>;
265
265
  /**
266
266
  * This will send the customer the public key to load the payment form and complete the payment setup.
267
267
  * @summary Get public key and psp
@@ -270,7 +270,7 @@ export declare class PaymentsSetupApi extends BaseAPI {
270
270
  * @throws {RequiredError}
271
271
  * @memberof PaymentsSetupApi
272
272
  */
273
- getPublicPSPConfig(requestParameters?: PaymentsSetupApiGetPublicPSPConfigRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetPublicPspSettingsResponseClass, any, {}>>;
273
+ getPublicPSPConfig(requestParameters?: PaymentsSetupApiGetPublicPSPConfigRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetPublicPspSettingsResponseClass, any, {}, any>>;
274
274
  /**
275
275
  * Retrieves the details of the psp-settings that was previously created. Supply the unique psp-settings code that was returned when you created it and Emil Api will return the corresponding psp-settings information.
276
276
  * @summary Retrieve the psp-settings
@@ -279,7 +279,7 @@ export declare class PaymentsSetupApi extends BaseAPI {
279
279
  * @throws {RequiredError}
280
280
  * @memberof PaymentsSetupApi
281
281
  */
282
- getPublicPSPConfigForProduct(requestParameters: PaymentsSetupApiGetPublicPSPConfigForProductRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetPublicPspSettingsResponseClass, any, {}>>;
282
+ getPublicPSPConfigForProduct(requestParameters: PaymentsSetupApiGetPublicPSPConfigForProductRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetPublicPspSettingsResponseClass, any, {}, any>>;
283
283
  /**
284
284
  * This will Initiate an account inside the payment service providers and they will generate a secret token which is allow user add its payment information.
285
285
  * @summary Initiate a payment setup
@@ -288,5 +288,5 @@ export declare class PaymentsSetupApi extends BaseAPI {
288
288
  * @throws {RequiredError}
289
289
  * @memberof PaymentsSetupApi
290
290
  */
291
- initiatePaymentSetup(requestParameters: PaymentsSetupApiInitiatePaymentSetupRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InitiatePaymentSetupResponseClass, any, {}>>;
291
+ initiatePaymentSetup(requestParameters: PaymentsSetupApiInitiatePaymentSetupRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InitiatePaymentSetupResponseClass, any, {}, any>>;
292
292
  }
@@ -104,9 +104,10 @@ var PaymentsSetupApiAxiosParamCreator = function (configuration) {
104
104
  completePaymentSetup: function (completePaymentSetupRequestDto, idempotencyKey, authorization, options) {
105
105
  if (options === void 0) { options = {}; }
106
106
  return __awaiter(_this, void 0, void 0, function () {
107
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
108
- return __generator(this, function (_a) {
109
- switch (_a.label) {
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, idempotencyKeyIsAuth, idempotencyKeyValue, idempotencyKeyKeepEmpty, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
108
+ var _a, _b;
109
+ return __generator(this, function (_c) {
110
+ switch (_c.label) {
110
111
  case 0:
111
112
  // verify required parameter 'completePaymentSetupRequestDto' is not null or undefined
112
113
  (0, common_1.assertParamExists)('completePaymentSetup', 'completePaymentSetupRequestDto', completePaymentSetupRequestDto);
@@ -121,16 +122,25 @@ var PaymentsSetupApiAxiosParamCreator = function (configuration) {
121
122
  localVarQueryParameter = {};
122
123
  // authentication bearer required
123
124
  // http bearer authentication required
124
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
125
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
126
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
127
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
128
+ ];
125
129
  case 1:
126
130
  // authentication bearer required
127
131
  // http bearer authentication required
128
- _a.sent();
129
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
132
+ _c.sent();
133
+ idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
134
+ idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
135
+ idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
136
+ if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
137
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
131
138
  }
132
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
139
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
140
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
141
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _b === void 0 ? void 0 : _b['X-Emil-Account']);
142
+ if (authorizationValue || authorizationKeepEmpty) {
143
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
134
144
  }
135
145
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
146
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -156,9 +166,10 @@ var PaymentsSetupApiAxiosParamCreator = function (configuration) {
156
166
  getPublicPSPConfig: function (idempotencyKey, authorization, options) {
157
167
  if (options === void 0) { options = {}; }
158
168
  return __awaiter(_this, void 0, void 0, function () {
159
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
- return __generator(this, function (_a) {
161
- switch (_a.label) {
169
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, idempotencyKeyIsAuth, idempotencyKeyValue, idempotencyKeyKeepEmpty, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
170
+ var _a, _b;
171
+ return __generator(this, function (_c) {
172
+ switch (_c.label) {
162
173
  case 0:
163
174
  localVarPath = "/publicapi/v1/payment-setup/get-psp-config";
164
175
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -171,16 +182,25 @@ var PaymentsSetupApiAxiosParamCreator = function (configuration) {
171
182
  localVarQueryParameter = {};
172
183
  // authentication bearer required
173
184
  // http bearer authentication required
174
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
185
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
186
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
187
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
188
+ ];
175
189
  case 1:
176
190
  // authentication bearer required
177
191
  // http bearer authentication required
178
- _a.sent();
179
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
180
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
192
+ _c.sent();
193
+ idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
194
+ idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
195
+ idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
196
+ if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
197
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
181
198
  }
182
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
199
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
200
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
201
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _b === void 0 ? void 0 : _b['X-Emil-Account']);
202
+ if (authorizationValue || authorizationKeepEmpty) {
203
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
184
204
  }
185
205
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
206
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -205,9 +225,10 @@ var PaymentsSetupApiAxiosParamCreator = function (configuration) {
205
225
  getPublicPSPConfigForProduct: function (productSlug, idempotencyKey, authorization, options) {
206
226
  if (options === void 0) { options = {}; }
207
227
  return __awaiter(_this, void 0, void 0, function () {
208
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
209
- return __generator(this, function (_a) {
210
- switch (_a.label) {
228
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, idempotencyKeyIsAuth, idempotencyKeyValue, idempotencyKeyKeepEmpty, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
229
+ var _a, _b;
230
+ return __generator(this, function (_c) {
231
+ switch (_c.label) {
211
232
  case 0:
212
233
  // verify required parameter 'productSlug' is not null or undefined
213
234
  (0, common_1.assertParamExists)('getPublicPSPConfigForProduct', 'productSlug', productSlug);
@@ -223,16 +244,25 @@ var PaymentsSetupApiAxiosParamCreator = function (configuration) {
223
244
  localVarQueryParameter = {};
224
245
  // authentication bearer required
225
246
  // http bearer authentication required
226
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
247
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
248
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
249
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
250
+ ];
227
251
  case 1:
228
252
  // authentication bearer required
229
253
  // http bearer authentication required
230
- _a.sent();
231
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
232
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
254
+ _c.sent();
255
+ idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
256
+ idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
257
+ idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
258
+ if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
259
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
233
260
  }
234
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
235
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
261
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
262
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
263
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _b === void 0 ? void 0 : _b['X-Emil-Account']);
264
+ if (authorizationValue || authorizationKeepEmpty) {
265
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
236
266
  }
237
267
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
238
268
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -257,9 +287,10 @@ var PaymentsSetupApiAxiosParamCreator = function (configuration) {
257
287
  initiatePaymentSetup: function (initiatePaymentSetupRequestDto, idempotencyKey, authorization, options) {
258
288
  if (options === void 0) { options = {}; }
259
289
  return __awaiter(_this, void 0, void 0, function () {
260
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
261
- return __generator(this, function (_a) {
262
- switch (_a.label) {
290
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, idempotencyKeyIsAuth, idempotencyKeyValue, idempotencyKeyKeepEmpty, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
291
+ var _a, _b;
292
+ return __generator(this, function (_c) {
293
+ switch (_c.label) {
263
294
  case 0:
264
295
  // verify required parameter 'initiatePaymentSetupRequestDto' is not null or undefined
265
296
  (0, common_1.assertParamExists)('initiatePaymentSetup', 'initiatePaymentSetupRequestDto', initiatePaymentSetupRequestDto);
@@ -274,16 +305,25 @@ var PaymentsSetupApiAxiosParamCreator = function (configuration) {
274
305
  localVarQueryParameter = {};
275
306
  // authentication bearer required
276
307
  // http bearer authentication required
277
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
308
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
309
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
310
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
311
+ ];
278
312
  case 1:
279
313
  // authentication bearer required
280
314
  // http bearer authentication required
281
- _a.sent();
282
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
283
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
315
+ _c.sent();
316
+ idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
317
+ idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
318
+ idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
319
+ if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
320
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
284
321
  }
285
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
286
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
322
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
323
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
324
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _b === void 0 ? void 0 : _b['X-Emil-Account']);
325
+ if (authorizationValue || authorizationKeepEmpty) {
326
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
287
327
  }
288
328
  localVarHeaderParameter['Content-Type'] = 'application/json';
289
329
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -476,7 +516,7 @@ var PaymentsSetupApi = /** @class */ (function (_super) {
476
516
  */
477
517
  PaymentsSetupApi.prototype.completePaymentSetup = function (requestParameters, options) {
478
518
  var _this = this;
479
- return (0, exports.PaymentsSetupApiFp)(this.configuration).completePaymentSetup(requestParameters.completePaymentSetupRequestDto, requestParameters.idempotencyKey, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
519
+ return (0, exports.PaymentsSetupApiFp)(this.configuration).completePaymentSetup(requestParameters.completePaymentSetupRequestDto, requestParameters.idempotencyKey, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
480
520
  };
481
521
  /**
482
522
  * This will send the customer the public key to load the payment form and complete the payment setup.
@@ -489,7 +529,7 @@ var PaymentsSetupApi = /** @class */ (function (_super) {
489
529
  PaymentsSetupApi.prototype.getPublicPSPConfig = function (requestParameters, options) {
490
530
  var _this = this;
491
531
  if (requestParameters === void 0) { requestParameters = {}; }
492
- return (0, exports.PaymentsSetupApiFp)(this.configuration).getPublicPSPConfig(requestParameters.idempotencyKey, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
532
+ return (0, exports.PaymentsSetupApiFp)(this.configuration).getPublicPSPConfig(requestParameters.idempotencyKey, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
493
533
  };
494
534
  /**
495
535
  * Retrieves the details of the psp-settings that was previously created. Supply the unique psp-settings code that was returned when you created it and Emil Api will return the corresponding psp-settings information.
@@ -501,7 +541,7 @@ var PaymentsSetupApi = /** @class */ (function (_super) {
501
541
  */
502
542
  PaymentsSetupApi.prototype.getPublicPSPConfigForProduct = function (requestParameters, options) {
503
543
  var _this = this;
504
- return (0, exports.PaymentsSetupApiFp)(this.configuration).getPublicPSPConfigForProduct(requestParameters.productSlug, requestParameters.idempotencyKey, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
544
+ return (0, exports.PaymentsSetupApiFp)(this.configuration).getPublicPSPConfigForProduct(requestParameters.productSlug, requestParameters.idempotencyKey, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
505
545
  };
506
546
  /**
507
547
  * This will Initiate an account inside the payment service providers and they will generate a secret token which is allow user add its payment information.
@@ -513,7 +553,7 @@ var PaymentsSetupApi = /** @class */ (function (_super) {
513
553
  */
514
554
  PaymentsSetupApi.prototype.initiatePaymentSetup = function (requestParameters, options) {
515
555
  var _this = this;
516
- return (0, exports.PaymentsSetupApiFp)(this.configuration).initiatePaymentSetup(requestParameters.initiatePaymentSetupRequestDto, requestParameters.idempotencyKey, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
556
+ return (0, exports.PaymentsSetupApiFp)(this.configuration).initiatePaymentSetup(requestParameters.initiatePaymentSetupRequestDto, requestParameters.idempotencyKey, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
517
557
  };
518
558
  return PaymentsSetupApi;
519
559
  }(base_1.BaseAPI));
@@ -252,7 +252,7 @@ export declare class ProductVersionsApi extends BaseAPI {
252
252
  * @throws {RequiredError}
253
253
  * @memberof ProductVersionsApi
254
254
  */
255
- calculateProductTariffQuote(requestParameters: ProductVersionsApiCalculateProductTariffQuoteRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CalculateProductTariffQuoteResponseClass, any, {}>>;
255
+ calculateProductTariffQuote(requestParameters: ProductVersionsApiCalculateProductTariffQuoteRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CalculateProductTariffQuoteResponseClass, any, {}, any>>;
256
256
  /**
257
257
  * Returns a list of insured objects you have previously created. The insured objects are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
258
258
  * @summary List insured objects
@@ -261,7 +261,7 @@ export declare class ProductVersionsApi extends BaseAPI {
261
261
  * @throws {RequiredError}
262
262
  * @memberof ProductVersionsApi
263
263
  */
264
- getInsuredObjectsPerVersion(requestParameters: ProductVersionsApiGetInsuredObjectsPerVersionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InsuredObjectClass[], any, {}>>;
264
+ getInsuredObjectsPerVersion(requestParameters: ProductVersionsApiGetInsuredObjectsPerVersionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InsuredObjectClass[], any, {}, any>>;
265
265
  /**
266
266
  * Retrieves list of available tariffs for the published product config version
267
267
  * @summary Retrieve the Product Config Tariffs
@@ -270,7 +270,7 @@ export declare class ProductVersionsApi extends BaseAPI {
270
270
  * @throws {RequiredError}
271
271
  * @memberof ProductVersionsApi
272
272
  */
273
- getProductConfigTariffs(requestParameters: ProductVersionsApiGetProductConfigTariffsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetProductConfigTariffsResponseClass, any, {}>>;
273
+ getProductConfigTariffs(requestParameters: ProductVersionsApiGetProductConfigTariffsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetProductConfigTariffsResponseClass, any, {}, any>>;
274
274
  /**
275
275
  * Returns a list of product factors you have previously created. The product factors are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
276
276
  * @summary List product factors
@@ -279,5 +279,5 @@ export declare class ProductVersionsApi extends BaseAPI {
279
279
  * @throws {RequiredError}
280
280
  * @memberof ProductVersionsApi
281
281
  */
282
- getProductFactorsPerVersion(requestParameters: ProductVersionsApiGetProductFactorsPerVersionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ProductFactorForVersionClass[], any, {}>>;
282
+ getProductFactorsPerVersion(requestParameters: ProductVersionsApiGetProductFactorsPerVersionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ProductFactorForVersionClass[], any, {}, any>>;
283
283
  }
@@ -104,9 +104,10 @@ var ProductVersionsApiAxiosParamCreator = function (configuration) {
104
104
  calculateProductTariffQuote: function (productVersionId, calculateProductTariffQuoteRequestDto, authorization, options) {
105
105
  if (options === void 0) { options = {}; }
106
106
  return __awaiter(_this, void 0, void 0, function () {
107
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
108
- return __generator(this, function (_a) {
109
- switch (_a.label) {
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
108
+ var _a;
109
+ return __generator(this, function (_b) {
110
+ switch (_b.label) {
110
111
  case 0:
111
112
  // verify required parameter 'productVersionId' is not null or undefined
112
113
  (0, common_1.assertParamExists)('calculateProductTariffQuote', 'productVersionId', productVersionId);
@@ -124,13 +125,19 @@ var ProductVersionsApiAxiosParamCreator = function (configuration) {
124
125
  localVarQueryParameter = {};
125
126
  // authentication bearer required
126
127
  // http bearer authentication required
127
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
129
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
130
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
131
+ ];
128
132
  case 1:
129
133
  // authentication bearer required
130
134
  // http bearer authentication required
131
- _a.sent();
132
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
135
+ _b.sent();
136
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
137
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
138
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
139
+ if (authorizationValue || authorizationKeepEmpty) {
140
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
134
141
  }
135
142
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
143
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -156,9 +163,10 @@ var ProductVersionsApiAxiosParamCreator = function (configuration) {
156
163
  getInsuredObjectsPerVersion: function (productVersionId, authorization, options) {
157
164
  if (options === void 0) { options = {}; }
158
165
  return __awaiter(_this, void 0, void 0, function () {
159
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
- return __generator(this, function (_a) {
161
- switch (_a.label) {
166
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
167
+ var _a;
168
+ return __generator(this, function (_b) {
169
+ switch (_b.label) {
162
170
  case 0:
163
171
  // verify required parameter 'productVersionId' is not null or undefined
164
172
  (0, common_1.assertParamExists)('getInsuredObjectsPerVersion', 'productVersionId', productVersionId);
@@ -174,13 +182,19 @@ var ProductVersionsApiAxiosParamCreator = function (configuration) {
174
182
  localVarQueryParameter = {};
175
183
  // authentication bearer required
176
184
  // http bearer authentication required
177
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
185
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
186
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
187
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
188
+ ];
178
189
  case 1:
179
190
  // authentication bearer required
180
191
  // http bearer authentication required
181
- _a.sent();
182
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
192
+ _b.sent();
193
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
194
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
195
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
196
+ if (authorizationValue || authorizationKeepEmpty) {
197
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
184
198
  }
185
199
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
200
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -204,9 +218,10 @@ var ProductVersionsApiAxiosParamCreator = function (configuration) {
204
218
  getProductConfigTariffs: function (productVersionId, authorization, options) {
205
219
  if (options === void 0) { options = {}; }
206
220
  return __awaiter(_this, void 0, void 0, function () {
207
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
208
- return __generator(this, function (_a) {
209
- switch (_a.label) {
221
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
222
+ var _a;
223
+ return __generator(this, function (_b) {
224
+ switch (_b.label) {
210
225
  case 0:
211
226
  // verify required parameter 'productVersionId' is not null or undefined
212
227
  (0, common_1.assertParamExists)('getProductConfigTariffs', 'productVersionId', productVersionId);
@@ -222,13 +237,19 @@ var ProductVersionsApiAxiosParamCreator = function (configuration) {
222
237
  localVarQueryParameter = {};
223
238
  // authentication bearer required
224
239
  // http bearer authentication required
225
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
240
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
241
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
242
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
243
+ ];
226
244
  case 1:
227
245
  // authentication bearer required
228
246
  // http bearer authentication required
229
- _a.sent();
230
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
247
+ _b.sent();
248
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
249
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
250
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
251
+ if (authorizationValue || authorizationKeepEmpty) {
252
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
232
253
  }
233
254
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
234
255
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -253,9 +274,10 @@ var ProductVersionsApiAxiosParamCreator = function (configuration) {
253
274
  getProductFactorsPerVersion: function (productVersionId, allValues, authorization, options) {
254
275
  if (options === void 0) { options = {}; }
255
276
  return __awaiter(_this, void 0, void 0, function () {
256
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
257
- return __generator(this, function (_a) {
258
- switch (_a.label) {
277
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
278
+ var _a;
279
+ return __generator(this, function (_b) {
280
+ switch (_b.label) {
259
281
  case 0:
260
282
  // verify required parameter 'productVersionId' is not null or undefined
261
283
  (0, common_1.assertParamExists)('getProductFactorsPerVersion', 'productVersionId', productVersionId);
@@ -277,12 +299,15 @@ var ProductVersionsApiAxiosParamCreator = function (configuration) {
277
299
  case 1:
278
300
  // authentication bearer required
279
301
  // http bearer authentication required
280
- _a.sent();
302
+ _b.sent();
281
303
  if (allValues !== undefined) {
282
304
  localVarQueryParameter['all_values'] = allValues;
283
305
  }
284
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
285
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
306
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
307
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
308
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
309
+ if (authorizationValue || authorizationKeepEmpty) {
310
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
286
311
  }
287
312
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
288
313
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -471,7 +496,7 @@ var ProductVersionsApi = /** @class */ (function (_super) {
471
496
  */
472
497
  ProductVersionsApi.prototype.calculateProductTariffQuote = function (requestParameters, options) {
473
498
  var _this = this;
474
- return (0, exports.ProductVersionsApiFp)(this.configuration).calculateProductTariffQuote(requestParameters.productVersionId, requestParameters.calculateProductTariffQuoteRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
499
+ return (0, exports.ProductVersionsApiFp)(this.configuration).calculateProductTariffQuote(requestParameters.productVersionId, requestParameters.calculateProductTariffQuoteRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
475
500
  };
476
501
  /**
477
502
  * Returns a list of insured objects you have previously created. The insured objects are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
@@ -483,7 +508,7 @@ var ProductVersionsApi = /** @class */ (function (_super) {
483
508
  */
484
509
  ProductVersionsApi.prototype.getInsuredObjectsPerVersion = function (requestParameters, options) {
485
510
  var _this = this;
486
- return (0, exports.ProductVersionsApiFp)(this.configuration).getInsuredObjectsPerVersion(requestParameters.productVersionId, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
511
+ return (0, exports.ProductVersionsApiFp)(this.configuration).getInsuredObjectsPerVersion(requestParameters.productVersionId, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
487
512
  };
488
513
  /**
489
514
  * Retrieves list of available tariffs for the published product config version
@@ -495,7 +520,7 @@ var ProductVersionsApi = /** @class */ (function (_super) {
495
520
  */
496
521
  ProductVersionsApi.prototype.getProductConfigTariffs = function (requestParameters, options) {
497
522
  var _this = this;
498
- return (0, exports.ProductVersionsApiFp)(this.configuration).getProductConfigTariffs(requestParameters.productVersionId, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
523
+ return (0, exports.ProductVersionsApiFp)(this.configuration).getProductConfigTariffs(requestParameters.productVersionId, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
499
524
  };
500
525
  /**
501
526
  * Returns a list of product factors you have previously created. The product factors are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
@@ -507,7 +532,7 @@ var ProductVersionsApi = /** @class */ (function (_super) {
507
532
  */
508
533
  ProductVersionsApi.prototype.getProductFactorsPerVersion = function (requestParameters, options) {
509
534
  var _this = this;
510
- return (0, exports.ProductVersionsApiFp)(this.configuration).getProductFactorsPerVersion(requestParameters.productVersionId, requestParameters.allValues, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
535
+ return (0, exports.ProductVersionsApiFp)(this.configuration).getProductFactorsPerVersion(requestParameters.productVersionId, requestParameters.allValues, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
511
536
  };
512
537
  return ProductVersionsApi;
513
538
  }(base_1.BaseAPI));