@emilgroup/public-api-sdk 1.40.1-beta.21 → 1.40.1-beta.23

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 (72) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/api/address-completions-validations-api.ts +16 -6
  4. package/api/booking-funnels-api.ts +8 -3
  5. package/api/documents-api.ts +56 -21
  6. package/api/health-api.ts +1 -1
  7. package/api/ibanvalidator-api.ts +8 -3
  8. package/api/leads-api.ts +64 -24
  9. package/api/named-ranges-api.ts +8 -3
  10. package/api/notifications-api.ts +24 -9
  11. package/api/partners-api.ts +8 -3
  12. package/api/payments-setup-api.ts +60 -20
  13. package/api/product-versions-api.ts +32 -12
  14. package/api/products-api.ts +72 -27
  15. package/api/withdrawal-requests-api.ts +176 -0
  16. package/api.ts +2 -0
  17. package/base.ts +239 -43
  18. package/common.ts +3 -2
  19. package/configuration.ts +20 -0
  20. package/dist/api/address-completions-validations-api.d.ts +2 -2
  21. package/dist/api/address-completions-validations-api.js +22 -14
  22. package/dist/api/booking-funnels-api.d.ts +1 -1
  23. package/dist/api/booking-funnels-api.js +11 -7
  24. package/dist/api/documents-api.d.ts +7 -7
  25. package/dist/api/documents-api.js +93 -53
  26. package/dist/api/health-api.d.ts +1 -1
  27. package/dist/api/health-api.js +1 -1
  28. package/dist/api/ibanvalidator-api.d.ts +1 -1
  29. package/dist/api/ibanvalidator-api.js +15 -8
  30. package/dist/api/leads-api.d.ts +8 -8
  31. package/dist/api/leads-api.js +120 -64
  32. package/dist/api/named-ranges-api.d.ts +1 -1
  33. package/dist/api/named-ranges-api.js +11 -7
  34. package/dist/api/notifications-api.d.ts +3 -3
  35. package/dist/api/notifications-api.js +45 -24
  36. package/dist/api/partners-api.d.ts +1 -1
  37. package/dist/api/partners-api.js +15 -8
  38. package/dist/api/payments-setup-api.d.ts +4 -4
  39. package/dist/api/payments-setup-api.js +80 -40
  40. package/dist/api/product-versions-api.d.ts +4 -4
  41. package/dist/api/product-versions-api.js +56 -31
  42. package/dist/api/products-api.d.ts +9 -9
  43. package/dist/api/products-api.js +119 -68
  44. package/dist/api/withdrawal-requests-api.d.ts +97 -0
  45. package/dist/api/withdrawal-requests-api.js +231 -0
  46. package/dist/api.d.ts +1 -0
  47. package/dist/api.js +1 -0
  48. package/dist/base.d.ts +26 -0
  49. package/dist/base.js +243 -60
  50. package/dist/common.d.ts +1 -1
  51. package/dist/common.js +1 -0
  52. package/dist/configuration.d.ts +17 -0
  53. package/dist/configuration.js +2 -0
  54. package/dist/models/index.d.ts +5 -0
  55. package/dist/models/index.js +5 -0
  56. package/dist/models/inline-response400.d.ts +36 -0
  57. package/dist/models/inline-response400.js +15 -0
  58. package/dist/models/inline-response401.d.ts +30 -0
  59. package/dist/models/inline-response401.js +15 -0
  60. package/dist/models/submit-withdrawal-request-dto.d.ts +30 -0
  61. package/dist/models/submit-withdrawal-request-dto.js +15 -0
  62. package/dist/models/submit-withdrawal-request-response-class.d.ts +24 -0
  63. package/dist/models/submit-withdrawal-request-response-class.js +15 -0
  64. package/dist/models/withdrawal-request-error-response-class.d.ts +43 -0
  65. package/dist/models/withdrawal-request-error-response-class.js +22 -0
  66. package/models/index.ts +5 -0
  67. package/models/inline-response400.ts +42 -0
  68. package/models/inline-response401.ts +36 -0
  69. package/models/submit-withdrawal-request-dto.ts +36 -0
  70. package/models/submit-withdrawal-request-response-class.ts +30 -0
  71. package/models/withdrawal-request-error-response-class.ts +52 -0
  72. package/package.json +2 -2
@@ -103,9 +103,10 @@ var NotificationsApiAxiosParamCreator = function (configuration) {
103
103
  completeEmailVerification: function (completeEmailVerificationDto, 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 'completeEmailVerificationDto' is not null or undefined
111
112
  (0, common_1.assertParamExists)('completeEmailVerification', 'completeEmailVerificationDto', completeEmailVerificationDto);
@@ -120,13 +121,19 @@ var NotificationsApiAxiosParamCreator = 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);
@@ -152,9 +159,10 @@ var NotificationsApiAxiosParamCreator = function (configuration) {
152
159
  initiateEmailVerification: function (initiateEmailVerificationDto, authorization, options) {
153
160
  if (options === void 0) { options = {}; }
154
161
  return __awaiter(_this, void 0, void 0, function () {
155
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
156
- return __generator(this, function (_a) {
157
- switch (_a.label) {
162
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
163
+ var _a;
164
+ return __generator(this, function (_b) {
165
+ switch (_b.label) {
158
166
  case 0:
159
167
  // verify required parameter 'initiateEmailVerificationDto' is not null or undefined
160
168
  (0, common_1.assertParamExists)('initiateEmailVerification', 'initiateEmailVerificationDto', initiateEmailVerificationDto);
@@ -169,13 +177,19 @@ var NotificationsApiAxiosParamCreator = function (configuration) {
169
177
  localVarQueryParameter = {};
170
178
  // authentication bearer required
171
179
  // http bearer authentication required
172
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
180
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
181
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
182
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
183
+ ];
173
184
  case 1:
174
185
  // authentication bearer required
175
186
  // http bearer authentication required
176
- _a.sent();
177
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
178
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
187
+ _b.sent();
188
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
189
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
190
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
191
+ if (authorizationValue || authorizationKeepEmpty) {
192
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
179
193
  }
180
194
  localVarHeaderParameter['Content-Type'] = 'application/json';
181
195
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -201,9 +215,10 @@ var NotificationsApiAxiosParamCreator = function (configuration) {
201
215
  sendNotification: function (sendNotificationRequestDto, authorization, options) {
202
216
  if (options === void 0) { options = {}; }
203
217
  return __awaiter(_this, void 0, void 0, function () {
204
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
205
- return __generator(this, function (_a) {
206
- switch (_a.label) {
218
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
219
+ var _a;
220
+ return __generator(this, function (_b) {
221
+ switch (_b.label) {
207
222
  case 0:
208
223
  // verify required parameter 'sendNotificationRequestDto' is not null or undefined
209
224
  (0, common_1.assertParamExists)('sendNotification', 'sendNotificationRequestDto', sendNotificationRequestDto);
@@ -218,13 +233,19 @@ var NotificationsApiAxiosParamCreator = function (configuration) {
218
233
  localVarQueryParameter = {};
219
234
  // authentication bearer required
220
235
  // http bearer authentication required
221
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
236
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
237
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
238
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
239
+ ];
222
240
  case 1:
223
241
  // authentication bearer required
224
242
  // http bearer authentication required
225
- _a.sent();
226
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
227
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
243
+ _b.sent();
244
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
245
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
246
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
247
+ if (authorizationValue || authorizationKeepEmpty) {
248
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
228
249
  }
229
250
  localVarHeaderParameter['Content-Type'] = 'application/json';
230
251
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -379,7 +400,7 @@ var NotificationsApi = /** @class */ (function (_super) {
379
400
  */
380
401
  NotificationsApi.prototype.completeEmailVerification = function (requestParameters, options) {
381
402
  var _this = this;
382
- return (0, exports.NotificationsApiFp)(this.configuration).completeEmailVerification(requestParameters.completeEmailVerificationDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
403
+ return (0, exports.NotificationsApiFp)(this.configuration).completeEmailVerification(requestParameters.completeEmailVerificationDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
383
404
  };
384
405
  /**
385
406
  * This sends an email to the specific recipient set to receive verification code.
@@ -391,7 +412,7 @@ var NotificationsApi = /** @class */ (function (_super) {
391
412
  */
392
413
  NotificationsApi.prototype.initiateEmailVerification = function (requestParameters, options) {
393
414
  var _this = this;
394
- return (0, exports.NotificationsApiFp)(this.configuration).initiateEmailVerification(requestParameters.initiateEmailVerificationDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
415
+ return (0, exports.NotificationsApiFp)(this.configuration).initiateEmailVerification(requestParameters.initiateEmailVerificationDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
395
416
  };
396
417
  /**
397
418
  * This sends an email to the specific recipient set to receive customers\' messages.
@@ -403,7 +424,7 @@ var NotificationsApi = /** @class */ (function (_super) {
403
424
  */
404
425
  NotificationsApi.prototype.sendNotification = function (requestParameters, options) {
405
426
  var _this = this;
406
- return (0, exports.NotificationsApiFp)(this.configuration).sendNotification(requestParameters.sendNotificationRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
427
+ return (0, exports.NotificationsApiFp)(this.configuration).sendNotification(requestParameters.sendNotificationRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
407
428
  };
408
429
  return NotificationsApi;
409
430
  }(base_1.BaseAPI));
@@ -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
  }