@emilgroup/insurance-sdk 1.107.1-beta.118 → 1.107.1-beta.119

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 (87) hide show
  1. package/README.md +2 -2
  2. package/api/booking-funnel-versions-api.ts +14 -4
  3. package/api/booking-funnels-api.ts +42 -12
  4. package/api/commission-agreement-items-api.ts +35 -10
  5. package/api/commission-agreement-products-api.ts +35 -10
  6. package/api/commission-agreement-versions-api.ts +28 -8
  7. package/api/commission-agreements-api.ts +35 -10
  8. package/api/commission-recipients-api.ts +35 -10
  9. package/api/emil-functions-api.ts +77 -22
  10. package/api/insured-object-types-api.ts +7 -2
  11. package/api/insured-objects-api.ts +28 -8
  12. package/api/lead-statuses-api.ts +35 -10
  13. package/api/lead-versions-api.ts +14 -4
  14. package/api/leads-api.ts +70 -20
  15. package/api/named-ranges-api.ts +42 -12
  16. package/api/partner-links-api.ts +42 -12
  17. package/api/partner-roles-api.ts +35 -10
  18. package/api/policies-api.ts +119 -34
  19. package/api/premium-calculation-api.ts +7 -2
  20. package/api/premium-formulas-api.ts +42 -12
  21. package/api/product-configs-api.ts +42 -12
  22. package/api/product-factors-api.ts +49 -14
  23. package/api/product-fields-api.ts +49 -14
  24. package/api/product-versions-api.ts +14 -4
  25. package/api/products-api.ts +42 -12
  26. package/api/status-transition-rules-api.ts +42 -12
  27. package/base.ts +188 -41
  28. package/common.ts +3 -2
  29. package/configuration.ts +20 -0
  30. package/dist/api/booking-funnel-versions-api.d.ts +2 -2
  31. package/dist/api/booking-funnel-versions-api.js +24 -13
  32. package/dist/api/booking-funnels-api.d.ts +6 -6
  33. package/dist/api/booking-funnels-api.js +80 -41
  34. package/dist/api/commission-agreement-items-api.d.ts +5 -5
  35. package/dist/api/commission-agreement-items-api.js +62 -33
  36. package/dist/api/commission-agreement-products-api.d.ts +5 -5
  37. package/dist/api/commission-agreement-products-api.js +62 -33
  38. package/dist/api/commission-agreement-versions-api.d.ts +4 -4
  39. package/dist/api/commission-agreement-versions-api.js +48 -26
  40. package/dist/api/commission-agreements-api.d.ts +5 -5
  41. package/dist/api/commission-agreements-api.js +62 -33
  42. package/dist/api/commission-recipients-api.d.ts +5 -5
  43. package/dist/api/commission-recipients-api.js +66 -34
  44. package/dist/api/emil-functions-api.d.ts +11 -11
  45. package/dist/api/emil-functions-api.js +150 -76
  46. package/dist/api/health-check-api.d.ts +1 -1
  47. package/dist/api/insured-object-types-api.d.ts +1 -1
  48. package/dist/api/insured-object-types-api.js +10 -6
  49. package/dist/api/insured-objects-api.d.ts +4 -4
  50. package/dist/api/insured-objects-api.js +48 -26
  51. package/dist/api/lead-statuses-api.d.ts +5 -5
  52. package/dist/api/lead-statuses-api.js +66 -34
  53. package/dist/api/lead-versions-api.d.ts +2 -2
  54. package/dist/api/lead-versions-api.js +24 -13
  55. package/dist/api/leads-api.d.ts +10 -10
  56. package/dist/api/leads-api.js +132 -68
  57. package/dist/api/named-ranges-api.d.ts +6 -6
  58. package/dist/api/named-ranges-api.js +76 -40
  59. package/dist/api/partner-links-api.d.ts +6 -6
  60. package/dist/api/partner-links-api.js +76 -40
  61. package/dist/api/partner-roles-api.d.ts +5 -5
  62. package/dist/api/partner-roles-api.js +66 -34
  63. package/dist/api/policies-api.d.ts +17 -17
  64. package/dist/api/policies-api.js +214 -113
  65. package/dist/api/premium-calculation-api.d.ts +1 -1
  66. package/dist/api/premium-calculation-api.js +14 -7
  67. package/dist/api/premium-formulas-api.d.ts +6 -6
  68. package/dist/api/premium-formulas-api.js +80 -41
  69. package/dist/api/product-configs-api.d.ts +6 -6
  70. package/dist/api/product-configs-api.js +80 -41
  71. package/dist/api/product-factors-api.d.ts +7 -7
  72. package/dist/api/product-factors-api.js +82 -45
  73. package/dist/api/product-fields-api.d.ts +7 -7
  74. package/dist/api/product-fields-api.js +90 -47
  75. package/dist/api/product-versions-api.d.ts +2 -2
  76. package/dist/api/product-versions-api.js +24 -13
  77. package/dist/api/products-api.d.ts +6 -6
  78. package/dist/api/products-api.js +72 -39
  79. package/dist/api/status-transition-rules-api.d.ts +6 -6
  80. package/dist/api/status-transition-rules-api.js +76 -40
  81. package/dist/base.d.ts +24 -0
  82. package/dist/base.js +192 -59
  83. package/dist/common.d.ts +1 -1
  84. package/dist/common.js +1 -0
  85. package/dist/configuration.d.ts +17 -0
  86. package/dist/configuration.js +2 -0
  87. package/package.json +2 -2
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/insurance-sdk@1.107.1-beta.118 --save
20
+ npm install @emilgroup/insurance-sdk@1.107.1-beta.119 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/insurance-sdk@1.107.1-beta.118
24
+ yarn add @emilgroup/insurance-sdk@1.107.1-beta.119
25
25
  ```
26
26
 
27
27
  And then you can import `PoliciesApi`.
@@ -60,8 +60,13 @@ export const BookingFunnelVersionsApiAxiosParamCreator = function (configuration
60
60
  // http bearer authentication required
61
61
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
62
62
 
63
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
64
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
63
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
64
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
65
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
66
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
67
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
68
+ if (authorizationValue || authorizationKeepEmpty) {
69
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
65
70
  }
66
71
 
67
72
 
@@ -140,8 +145,13 @@ export const BookingFunnelVersionsApiAxiosParamCreator = function (configuration
140
145
  localVarQueryParameter['filters'] = filters;
141
146
  }
142
147
 
143
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
144
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
148
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
149
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
150
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
151
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
152
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
153
+ if (authorizationValue || authorizationKeepEmpty) {
154
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
145
155
  }
146
156
 
147
157
 
@@ -73,8 +73,13 @@ export const BookingFunnelsApiAxiosParamCreator = function (configuration?: Conf
73
73
  // http bearer authentication required
74
74
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
75
75
 
76
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
77
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
76
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
77
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
78
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
79
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
80
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
81
+ if (authorizationValue || authorizationKeepEmpty) {
82
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
78
83
  }
79
84
 
80
85
 
@@ -121,8 +126,13 @@ export const BookingFunnelsApiAxiosParamCreator = function (configuration?: Conf
121
126
  // http bearer authentication required
122
127
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
123
128
 
124
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
125
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
132
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
133
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
134
+ if (authorizationValue || authorizationKeepEmpty) {
135
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
126
136
  }
127
137
 
128
138
 
@@ -166,8 +176,13 @@ export const BookingFunnelsApiAxiosParamCreator = function (configuration?: Conf
166
176
  // http bearer authentication required
167
177
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
168
178
 
169
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
170
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
179
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
180
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
181
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
182
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
183
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
184
+ if (authorizationValue || authorizationKeepEmpty) {
185
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
171
186
  }
172
187
 
173
188
 
@@ -242,8 +257,13 @@ export const BookingFunnelsApiAxiosParamCreator = function (configuration?: Conf
242
257
  localVarQueryParameter['filters'] = filters;
243
258
  }
244
259
 
245
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
246
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
260
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
261
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
262
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
263
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
264
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
265
+ if (authorizationValue || authorizationKeepEmpty) {
266
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
247
267
  }
248
268
 
249
269
 
@@ -289,8 +309,13 @@ export const BookingFunnelsApiAxiosParamCreator = function (configuration?: Conf
289
309
  // http bearer authentication required
290
310
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
291
311
 
292
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
293
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
312
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
313
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
314
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
315
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
316
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
317
+ if (authorizationValue || authorizationKeepEmpty) {
318
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
294
319
  }
295
320
 
296
321
 
@@ -340,8 +365,13 @@ export const BookingFunnelsApiAxiosParamCreator = function (configuration?: Conf
340
365
  // http bearer authentication required
341
366
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
342
367
 
343
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
344
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
368
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
369
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
370
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
371
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
372
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
373
+ if (authorizationValue || authorizationKeepEmpty) {
374
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
345
375
  }
346
376
 
347
377
 
@@ -73,8 +73,13 @@ export const CommissionAgreementItemsApiAxiosParamCreator = function (configurat
73
73
  // http bearer authentication required
74
74
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
75
75
 
76
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
77
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
76
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
77
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
78
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
79
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
80
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
81
+ if (authorizationValue || authorizationKeepEmpty) {
82
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
78
83
  }
79
84
 
80
85
 
@@ -121,8 +126,13 @@ export const CommissionAgreementItemsApiAxiosParamCreator = function (configurat
121
126
  // http bearer authentication required
122
127
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
123
128
 
124
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
125
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
132
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
133
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
134
+ if (authorizationValue || authorizationKeepEmpty) {
135
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
126
136
  }
127
137
 
128
138
 
@@ -173,8 +183,13 @@ export const CommissionAgreementItemsApiAxiosParamCreator = function (configurat
173
183
  localVarQueryParameter['expand'] = expand;
174
184
  }
175
185
 
176
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
177
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
189
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
190
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
191
+ if (authorizationValue || authorizationKeepEmpty) {
192
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
178
193
  }
179
194
 
180
195
 
@@ -249,8 +264,13 @@ export const CommissionAgreementItemsApiAxiosParamCreator = function (configurat
249
264
  localVarQueryParameter['filters'] = filters;
250
265
  }
251
266
 
252
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
253
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
267
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
268
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
269
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
270
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
271
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
272
+ if (authorizationValue || authorizationKeepEmpty) {
273
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
254
274
  }
255
275
 
256
276
 
@@ -297,8 +317,13 @@ export const CommissionAgreementItemsApiAxiosParamCreator = function (configurat
297
317
  // http bearer authentication required
298
318
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
299
319
 
300
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
301
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
320
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
321
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
322
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
323
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
324
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
325
+ if (authorizationValue || authorizationKeepEmpty) {
326
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
302
327
  }
303
328
 
304
329
 
@@ -73,8 +73,13 @@ export const CommissionAgreementProductsApiAxiosParamCreator = function (configu
73
73
  // http bearer authentication required
74
74
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
75
75
 
76
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
77
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
76
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
77
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
78
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
79
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
80
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
81
+ if (authorizationValue || authorizationKeepEmpty) {
82
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
78
83
  }
79
84
 
80
85
 
@@ -121,8 +126,13 @@ export const CommissionAgreementProductsApiAxiosParamCreator = function (configu
121
126
  // http bearer authentication required
122
127
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
123
128
 
124
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
125
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
132
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
133
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
134
+ if (authorizationValue || authorizationKeepEmpty) {
135
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
126
136
  }
127
137
 
128
138
 
@@ -171,8 +181,13 @@ export const CommissionAgreementProductsApiAxiosParamCreator = function (configu
171
181
  localVarQueryParameter['expand'] = expand;
172
182
  }
173
183
 
174
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
175
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
184
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
185
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
186
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
187
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
188
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
189
+ if (authorizationValue || authorizationKeepEmpty) {
190
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
176
191
  }
177
192
 
178
193
 
@@ -247,8 +262,13 @@ export const CommissionAgreementProductsApiAxiosParamCreator = function (configu
247
262
  localVarQueryParameter['filters'] = filters;
248
263
  }
249
264
 
250
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
251
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
265
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
266
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
267
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
268
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
269
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
270
+ if (authorizationValue || authorizationKeepEmpty) {
271
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
252
272
  }
253
273
 
254
274
 
@@ -295,8 +315,13 @@ export const CommissionAgreementProductsApiAxiosParamCreator = function (configu
295
315
  // http bearer authentication required
296
316
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
297
317
 
298
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
299
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
318
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
319
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
320
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
321
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
322
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
323
+ if (authorizationValue || authorizationKeepEmpty) {
324
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
300
325
  }
301
326
 
302
327
 
@@ -69,8 +69,13 @@ export const CommissionAgreementVersionsApiAxiosParamCreator = function (configu
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 CommissionAgreementVersionsApiAxiosParamCreator = function (configu
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
 
@@ -169,8 +179,13 @@ export const CommissionAgreementVersionsApiAxiosParamCreator = function (configu
169
179
  localVarQueryParameter['expand'] = expand;
170
180
  }
171
181
 
172
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
173
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
182
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
183
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
184
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
185
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
186
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
187
+ if (authorizationValue || authorizationKeepEmpty) {
188
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
174
189
  }
175
190
 
176
191
 
@@ -245,8 +260,13 @@ export const CommissionAgreementVersionsApiAxiosParamCreator = function (configu
245
260
  localVarQueryParameter['filters'] = filters;
246
261
  }
247
262
 
248
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
249
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
263
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
264
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
265
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
266
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
267
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
268
+ if (authorizationValue || authorizationKeepEmpty) {
269
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
250
270
  }
251
271
 
252
272
 
@@ -69,8 +69,13 @@ export const CommissionAgreementsApiAxiosParamCreator = function (configuration?
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 CommissionAgreementsApiAxiosParamCreator = function (configuration?
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
 
@@ -167,8 +177,13 @@ export const CommissionAgreementsApiAxiosParamCreator = function (configuration?
167
177
  localVarQueryParameter['expand'] = expand;
168
178
  }
169
179
 
170
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
171
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
180
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
181
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
182
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
183
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
184
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
185
+ if (authorizationValue || authorizationKeepEmpty) {
186
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
172
187
  }
173
188
 
174
189
 
@@ -243,8 +258,13 @@ export const CommissionAgreementsApiAxiosParamCreator = function (configuration?
243
258
  localVarQueryParameter['filters'] = filters;
244
259
  }
245
260
 
246
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
247
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
261
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
262
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
263
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
264
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
265
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
266
+ if (authorizationValue || authorizationKeepEmpty) {
267
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
248
268
  }
249
269
 
250
270
 
@@ -291,8 +311,13 @@ export const CommissionAgreementsApiAxiosParamCreator = function (configuration?
291
311
  // http bearer authentication required
292
312
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
293
313
 
294
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
295
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
314
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
315
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
316
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
317
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
318
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
319
+ if (authorizationValue || authorizationKeepEmpty) {
320
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
296
321
  }
297
322
 
298
323
 
@@ -73,8 +73,13 @@ export const CommissionRecipientsApiAxiosParamCreator = function (configuration?
73
73
  // http bearer authentication required
74
74
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
75
75
 
76
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
77
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
76
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
77
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
78
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
79
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
80
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
81
+ if (authorizationValue || authorizationKeepEmpty) {
82
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
78
83
  }
79
84
 
80
85
 
@@ -121,8 +126,13 @@ export const CommissionRecipientsApiAxiosParamCreator = function (configuration?
121
126
  // http bearer authentication required
122
127
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
123
128
 
124
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
125
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
132
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
133
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
134
+ if (authorizationValue || authorizationKeepEmpty) {
135
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
126
136
  }
127
137
 
128
138
 
@@ -166,8 +176,13 @@ export const CommissionRecipientsApiAxiosParamCreator = function (configuration?
166
176
  // http bearer authentication required
167
177
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
168
178
 
169
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
170
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
179
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
180
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
181
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
182
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
183
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
184
+ if (authorizationValue || authorizationKeepEmpty) {
185
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
171
186
  }
172
187
 
173
188
 
@@ -242,8 +257,13 @@ export const CommissionRecipientsApiAxiosParamCreator = function (configuration?
242
257
  localVarQueryParameter['filters'] = filters;
243
258
  }
244
259
 
245
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
246
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
260
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
261
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
262
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
263
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
264
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
265
+ if (authorizationValue || authorizationKeepEmpty) {
266
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
247
267
  }
248
268
 
249
269
 
@@ -290,8 +310,13 @@ export const CommissionRecipientsApiAxiosParamCreator = function (configuration?
290
310
  // http bearer authentication required
291
311
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
292
312
 
293
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
294
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
313
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
314
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
315
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
316
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
317
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
318
+ if (authorizationValue || authorizationKeepEmpty) {
319
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
295
320
  }
296
321
 
297
322