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

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
@@ -59,8 +59,13 @@ export const PartnersApiAxiosParamCreator = function (configuration?: Configurat
59
59
  // http bearer authentication required
60
60
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
61
61
 
62
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
63
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
62
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
63
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
64
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
65
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
66
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
67
+ if (authorizationValue || authorizationKeepEmpty) {
68
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
64
69
  }
65
70
 
66
71
 
@@ -160,6 +165,6 @@ export class PartnersApi extends BaseAPI {
160
165
  * @memberof PartnersApi
161
166
  */
162
167
  public validatePartner(requestParameters: PartnersApiValidatePartnerRequest, options?: AxiosRequestConfig) {
163
- return PartnersApiFp(this.configuration).validatePartner(requestParameters.validatePartnerRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
168
+ return PartnersApiFp(this.configuration).validatePartner(requestParameters.validatePartnerRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
164
169
  }
165
170
  }
@@ -66,12 +66,22 @@ export const PaymentsSetupApiAxiosParamCreator = function (configuration?: Confi
66
66
  // http bearer authentication required
67
67
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
68
68
 
69
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
70
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
69
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
70
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
71
+ const idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
72
+ const idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
73
+ const idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
74
+ if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
75
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
71
76
  }
72
77
 
73
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
74
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
78
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
79
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
80
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
81
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
82
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
83
+ if (authorizationValue || authorizationKeepEmpty) {
84
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
75
85
  }
76
86
 
77
87
 
@@ -115,12 +125,22 @@ export const PaymentsSetupApiAxiosParamCreator = function (configuration?: Confi
115
125
  // http bearer authentication required
116
126
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
117
127
 
118
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
119
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
128
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
129
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
130
+ const idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
131
+ const idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
132
+ const idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
133
+ if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
134
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
120
135
  }
121
136
 
122
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
123
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
137
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
138
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
139
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
140
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
141
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
142
+ if (authorizationValue || authorizationKeepEmpty) {
143
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
124
144
  }
125
145
 
126
146
 
@@ -165,12 +185,22 @@ export const PaymentsSetupApiAxiosParamCreator = function (configuration?: Confi
165
185
  // http bearer authentication required
166
186
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
167
187
 
168
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
169
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
188
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
189
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
190
+ const idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
191
+ const idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
192
+ const idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
193
+ if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
194
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
170
195
  }
171
196
 
172
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
173
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
197
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
198
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
199
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
200
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
201
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
202
+ if (authorizationValue || authorizationKeepEmpty) {
203
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
174
204
  }
175
205
 
176
206
 
@@ -214,12 +244,22 @@ export const PaymentsSetupApiAxiosParamCreator = function (configuration?: Confi
214
244
  // http bearer authentication required
215
245
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
216
246
 
217
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
218
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
247
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
248
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
249
+ const idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
250
+ const idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
251
+ const idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
252
+ if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
253
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
219
254
  }
220
255
 
221
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
222
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
256
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
257
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
258
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
259
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
260
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
261
+ if (authorizationValue || authorizationKeepEmpty) {
262
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
223
263
  }
224
264
 
225
265
 
@@ -478,7 +518,7 @@ export class PaymentsSetupApi extends BaseAPI {
478
518
  * @memberof PaymentsSetupApi
479
519
  */
480
520
  public completePaymentSetup(requestParameters: PaymentsSetupApiCompletePaymentSetupRequest, options?: AxiosRequestConfig) {
481
- return PaymentsSetupApiFp(this.configuration).completePaymentSetup(requestParameters.completePaymentSetupRequestDto, requestParameters.idempotencyKey, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
521
+ return PaymentsSetupApiFp(this.configuration).completePaymentSetup(requestParameters.completePaymentSetupRequestDto, requestParameters.idempotencyKey, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
482
522
  }
483
523
 
484
524
  /**
@@ -490,7 +530,7 @@ export class PaymentsSetupApi extends BaseAPI {
490
530
  * @memberof PaymentsSetupApi
491
531
  */
492
532
  public getPublicPSPConfig(requestParameters: PaymentsSetupApiGetPublicPSPConfigRequest = {}, options?: AxiosRequestConfig) {
493
- return PaymentsSetupApiFp(this.configuration).getPublicPSPConfig(requestParameters.idempotencyKey, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
533
+ return PaymentsSetupApiFp(this.configuration).getPublicPSPConfig(requestParameters.idempotencyKey, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
494
534
  }
495
535
 
496
536
  /**
@@ -502,7 +542,7 @@ export class PaymentsSetupApi extends BaseAPI {
502
542
  * @memberof PaymentsSetupApi
503
543
  */
504
544
  public getPublicPSPConfigForProduct(requestParameters: PaymentsSetupApiGetPublicPSPConfigForProductRequest, options?: AxiosRequestConfig) {
505
- return PaymentsSetupApiFp(this.configuration).getPublicPSPConfigForProduct(requestParameters.productSlug, requestParameters.idempotencyKey, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
545
+ return PaymentsSetupApiFp(this.configuration).getPublicPSPConfigForProduct(requestParameters.productSlug, requestParameters.idempotencyKey, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
506
546
  }
507
547
 
508
548
  /**
@@ -514,6 +554,6 @@ export class PaymentsSetupApi extends BaseAPI {
514
554
  * @memberof PaymentsSetupApi
515
555
  */
516
556
  public initiatePaymentSetup(requestParameters: PaymentsSetupApiInitiatePaymentSetupRequest, options?: AxiosRequestConfig) {
517
- return PaymentsSetupApiFp(this.configuration).initiatePaymentSetup(requestParameters.initiatePaymentSetupRequestDto, requestParameters.idempotencyKey, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
557
+ return PaymentsSetupApiFp(this.configuration).initiatePaymentSetup(requestParameters.initiatePaymentSetupRequestDto, requestParameters.idempotencyKey, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
518
558
  }
519
559
  }
@@ -69,8 +69,13 @@ export const ProductVersionsApiAxiosParamCreator = function (configuration?: Con
69
69
  // http bearer authentication required
70
70
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
71
71
 
72
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
73
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
72
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
73
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
74
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
75
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
76
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
77
+ if (authorizationValue || authorizationKeepEmpty) {
78
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
74
79
  }
75
80
 
76
81
 
@@ -117,8 +122,13 @@ export const ProductVersionsApiAxiosParamCreator = function (configuration?: Con
117
122
  // http bearer authentication required
118
123
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
119
124
 
120
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
121
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
128
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
129
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
130
+ if (authorizationValue || authorizationKeepEmpty) {
131
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
122
132
  }
123
133
 
124
134
 
@@ -162,8 +172,13 @@ export const ProductVersionsApiAxiosParamCreator = function (configuration?: Con
162
172
  // http bearer authentication required
163
173
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
164
174
 
165
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
166
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
175
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
176
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
177
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
178
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
179
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
180
+ if (authorizationValue || authorizationKeepEmpty) {
181
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
167
182
  }
168
183
 
169
184
 
@@ -214,8 +229,13 @@ export const ProductVersionsApiAxiosParamCreator = function (configuration?: Con
214
229
  localVarQueryParameter['all_values'] = allValues;
215
230
  }
216
231
 
217
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
218
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
232
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
233
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
234
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
235
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
236
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
237
+ if (authorizationValue || authorizationKeepEmpty) {
238
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
219
239
  }
220
240
 
221
241
 
@@ -462,7 +482,7 @@ export class ProductVersionsApi extends BaseAPI {
462
482
  * @memberof ProductVersionsApi
463
483
  */
464
484
  public calculateProductTariffQuote(requestParameters: ProductVersionsApiCalculateProductTariffQuoteRequest, options?: AxiosRequestConfig) {
465
- return ProductVersionsApiFp(this.configuration).calculateProductTariffQuote(requestParameters.productVersionId, requestParameters.calculateProductTariffQuoteRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
485
+ return ProductVersionsApiFp(this.configuration).calculateProductTariffQuote(requestParameters.productVersionId, requestParameters.calculateProductTariffQuoteRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
466
486
  }
467
487
 
468
488
  /**
@@ -474,7 +494,7 @@ export class ProductVersionsApi extends BaseAPI {
474
494
  * @memberof ProductVersionsApi
475
495
  */
476
496
  public getInsuredObjectsPerVersion(requestParameters: ProductVersionsApiGetInsuredObjectsPerVersionRequest, options?: AxiosRequestConfig) {
477
- return ProductVersionsApiFp(this.configuration).getInsuredObjectsPerVersion(requestParameters.productVersionId, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
497
+ return ProductVersionsApiFp(this.configuration).getInsuredObjectsPerVersion(requestParameters.productVersionId, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
478
498
  }
479
499
 
480
500
  /**
@@ -486,7 +506,7 @@ export class ProductVersionsApi extends BaseAPI {
486
506
  * @memberof ProductVersionsApi
487
507
  */
488
508
  public getProductConfigTariffs(requestParameters: ProductVersionsApiGetProductConfigTariffsRequest, options?: AxiosRequestConfig) {
489
- return ProductVersionsApiFp(this.configuration).getProductConfigTariffs(requestParameters.productVersionId, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
509
+ return ProductVersionsApiFp(this.configuration).getProductConfigTariffs(requestParameters.productVersionId, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
490
510
  }
491
511
 
492
512
  /**
@@ -498,6 +518,6 @@ export class ProductVersionsApi extends BaseAPI {
498
518
  * @memberof ProductVersionsApi
499
519
  */
500
520
  public getProductFactorsPerVersion(requestParameters: ProductVersionsApiGetProductFactorsPerVersionRequest, options?: AxiosRequestConfig) {
501
- return ProductVersionsApiFp(this.configuration).getProductFactorsPerVersion(requestParameters.productVersionId, requestParameters.allValues, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
521
+ return ProductVersionsApiFp(this.configuration).getProductFactorsPerVersion(requestParameters.productVersionId, requestParameters.allValues, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
502
522
  }
503
523
  }
@@ -83,8 +83,13 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
83
83
  // http bearer authentication required
84
84
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
85
85
 
86
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
87
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
86
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
87
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
88
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
89
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
90
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
91
+ if (authorizationValue || authorizationKeepEmpty) {
92
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
88
93
  }
89
94
 
90
95
 
@@ -134,8 +139,13 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
134
139
  // http bearer authentication required
135
140
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
136
141
 
137
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
138
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
142
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
143
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
144
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
145
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
146
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
147
+ if (authorizationValue || authorizationKeepEmpty) {
148
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
139
149
  }
140
150
 
141
151
 
@@ -185,8 +195,13 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
185
195
  // http bearer authentication required
186
196
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
187
197
 
188
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
189
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
198
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
199
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
200
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
201
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
202
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
203
+ if (authorizationValue || authorizationKeepEmpty) {
204
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
190
205
  }
191
206
 
192
207
 
@@ -233,8 +248,13 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
233
248
  // http bearer authentication required
234
249
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
235
250
 
236
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
237
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
251
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
252
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
253
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
254
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
255
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
256
+ if (authorizationValue || authorizationKeepEmpty) {
257
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
238
258
  }
239
259
 
240
260
 
@@ -288,8 +308,13 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
288
308
  localVarQueryParameter['product_version_id'] = productVersionId;
289
309
  }
290
310
 
291
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
292
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
311
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
312
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
313
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
314
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
315
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
316
+ if (authorizationValue || authorizationKeepEmpty) {
317
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
293
318
  }
294
319
 
295
320
 
@@ -338,8 +363,13 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
338
363
  localVarQueryParameter['language'] = language;
339
364
  }
340
365
 
341
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
342
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
366
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
367
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
368
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
369
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
370
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
371
+ if (authorizationValue || authorizationKeepEmpty) {
372
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
343
373
  }
344
374
 
345
375
 
@@ -400,8 +430,13 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
400
430
  localVarQueryParameter['product_version_id'] = productVersionId;
401
431
  }
402
432
 
403
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
404
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
433
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
434
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
435
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
436
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
437
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
438
+ if (authorizationValue || authorizationKeepEmpty) {
439
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
405
440
  }
406
441
 
407
442
 
@@ -445,8 +480,13 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
445
480
  // http bearer authentication required
446
481
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
447
482
 
448
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
449
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
483
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
484
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
485
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
486
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
487
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
488
+ if (authorizationValue || authorizationKeepEmpty) {
489
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
450
490
  }
451
491
 
452
492
 
@@ -521,8 +561,13 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
521
561
  localVarQueryParameter['filters'] = filters;
522
562
  }
523
563
 
524
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
525
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
564
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
565
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
566
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
567
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
568
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
569
+ if (authorizationValue || authorizationKeepEmpty) {
570
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
526
571
  }
527
572
 
528
573
 
@@ -1106,7 +1151,7 @@ export class ProductsApi extends BaseAPI {
1106
1151
  * @memberof ProductsApi
1107
1152
  */
1108
1153
  public calculateProductFields(requestParameters: ProductsApiCalculateProductFieldsRequest, options?: AxiosRequestConfig) {
1109
- return ProductsApiFp(this.configuration).calculateProductFields(requestParameters.productCode, requestParameters.calculateProductFieldsRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1154
+ return ProductsApiFp(this.configuration).calculateProductFields(requestParameters.productCode, requestParameters.calculateProductFieldsRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1110
1155
  }
1111
1156
 
1112
1157
  /**
@@ -1118,7 +1163,7 @@ export class ProductsApi extends BaseAPI {
1118
1163
  * @memberof ProductsApi
1119
1164
  */
1120
1165
  public createEstimatedInvoice(requestParameters: ProductsApiCreateEstimatedInvoiceRequest, options?: AxiosRequestConfig) {
1121
- return ProductsApiFp(this.configuration).createEstimatedInvoice(requestParameters.productCode, requestParameters.createEstimatedInvoiceRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1166
+ return ProductsApiFp(this.configuration).createEstimatedInvoice(requestParameters.productCode, requestParameters.createEstimatedInvoiceRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1122
1167
  }
1123
1168
 
1124
1169
  /**
@@ -1130,7 +1175,7 @@ export class ProductsApi extends BaseAPI {
1130
1175
  * @memberof ProductsApi
1131
1176
  */
1132
1177
  public customApplication(requestParameters: ProductsApiCustomApplicationRequest, options?: AxiosRequestConfig) {
1133
- return ProductsApiFp(this.configuration).customApplication(requestParameters.productCode, requestParameters.createCustomApplicationRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1178
+ return ProductsApiFp(this.configuration).customApplication(requestParameters.productCode, requestParameters.createCustomApplicationRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1134
1179
  }
1135
1180
 
1136
1181
  /**
@@ -1142,7 +1187,7 @@ export class ProductsApi extends BaseAPI {
1142
1187
  * @memberof ProductsApi
1143
1188
  */
1144
1189
  public getInsuredObjectTypes(requestParameters: ProductsApiGetInsuredObjectTypesRequest, options?: AxiosRequestConfig) {
1145
- return ProductsApiFp(this.configuration).getInsuredObjectTypes(requestParameters.productCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1190
+ return ProductsApiFp(this.configuration).getInsuredObjectTypes(requestParameters.productCode, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1146
1191
  }
1147
1192
 
1148
1193
  /**
@@ -1154,7 +1199,7 @@ export class ProductsApi extends BaseAPI {
1154
1199
  * @memberof ProductsApi
1155
1200
  */
1156
1201
  public getInsuredObjects(requestParameters: ProductsApiGetInsuredObjectsRequest, options?: AxiosRequestConfig) {
1157
- return ProductsApiFp(this.configuration).getInsuredObjects(requestParameters.productCode, requestParameters.authorization, requestParameters.language, requestParameters.productVersionId, options).then((request) => request(this.axios, this.basePath));
1202
+ return ProductsApiFp(this.configuration).getInsuredObjects(requestParameters.productCode, requestParameters.authorization, requestParameters.language, requestParameters.productVersionId, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1158
1203
  }
1159
1204
 
1160
1205
  /**
@@ -1166,7 +1211,7 @@ export class ProductsApi extends BaseAPI {
1166
1211
  * @memberof ProductsApi
1167
1212
  */
1168
1213
  public getProductCustomCss(requestParameters: ProductsApiGetProductCustomCssRequest, options?: AxiosRequestConfig) {
1169
- return ProductsApiFp(this.configuration).getProductCustomCss(requestParameters.productCode, requestParameters.authorization, requestParameters.language, options).then((request) => request(this.axios, this.basePath));
1214
+ return ProductsApiFp(this.configuration).getProductCustomCss(requestParameters.productCode, requestParameters.authorization, requestParameters.language, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1170
1215
  }
1171
1216
 
1172
1217
  /**
@@ -1178,7 +1223,7 @@ export class ProductsApi extends BaseAPI {
1178
1223
  * @memberof ProductsApi
1179
1224
  */
1180
1225
  public getProductFactors(requestParameters: ProductsApiGetProductFactorsRequest, options?: AxiosRequestConfig) {
1181
- return ProductsApiFp(this.configuration).getProductFactors(requestParameters.productCode, requestParameters.allValues, requestParameters.authorization, requestParameters.language, requestParameters.productVersionId, options).then((request) => request(this.axios, this.basePath));
1226
+ return ProductsApiFp(this.configuration).getProductFactors(requestParameters.productCode, requestParameters.allValues, requestParameters.authorization, requestParameters.language, requestParameters.productVersionId, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1182
1227
  }
1183
1228
 
1184
1229
  /**
@@ -1190,7 +1235,7 @@ export class ProductsApi extends BaseAPI {
1190
1235
  * @memberof ProductsApi
1191
1236
  */
1192
1237
  public getProductLanguages(requestParameters: ProductsApiGetProductLanguagesRequest, options?: AxiosRequestConfig) {
1193
- return ProductsApiFp(this.configuration).getProductLanguages(requestParameters.productCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1238
+ return ProductsApiFp(this.configuration).getProductLanguages(requestParameters.productCode, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1194
1239
  }
1195
1240
 
1196
1241
  /**
@@ -1202,6 +1247,6 @@ export class ProductsApi extends BaseAPI {
1202
1247
  * @memberof ProductsApi
1203
1248
  */
1204
1249
  public listProducts(requestParameters: ProductsApiListProductsRequest = {}, options?: AxiosRequestConfig) {
1205
- return ProductsApiFp(this.configuration).listProducts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
1250
+ return ProductsApiFp(this.configuration).listProducts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1206
1251
  }
1207
1252
  }