@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
@@ -104,9 +104,10 @@ var ProductsApiAxiosParamCreator = function (configuration) {
104
104
  calculateProductFields: function (productCode, calculateProductFieldsRequestDto, authorization, options) {
105
105
  if (options === void 0) { options = {}; }
106
106
  return __awaiter(_this, void 0, void 0, function () {
107
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
108
- return __generator(this, function (_a) {
109
- switch (_a.label) {
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
108
+ var _a;
109
+ return __generator(this, function (_b) {
110
+ switch (_b.label) {
110
111
  case 0:
111
112
  // verify required parameter 'productCode' is not null or undefined
112
113
  (0, common_1.assertParamExists)('calculateProductFields', 'productCode', productCode);
@@ -124,13 +125,19 @@ var ProductsApiAxiosParamCreator = function (configuration) {
124
125
  localVarQueryParameter = {};
125
126
  // authentication bearer required
126
127
  // http bearer authentication required
127
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
129
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
130
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
131
+ ];
128
132
  case 1:
129
133
  // authentication bearer required
130
134
  // http bearer authentication required
131
- _a.sent();
132
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
135
+ _b.sent();
136
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
137
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
138
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
139
+ if (authorizationValue || authorizationKeepEmpty) {
140
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
134
141
  }
135
142
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
143
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -157,9 +164,10 @@ var ProductsApiAxiosParamCreator = function (configuration) {
157
164
  createEstimatedInvoice: function (productCode, createEstimatedInvoiceRequestDto, authorization, options) {
158
165
  if (options === void 0) { options = {}; }
159
166
  return __awaiter(_this, void 0, void 0, function () {
160
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
161
- return __generator(this, function (_a) {
162
- switch (_a.label) {
167
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
168
+ var _a;
169
+ return __generator(this, function (_b) {
170
+ switch (_b.label) {
163
171
  case 0:
164
172
  // verify required parameter 'productCode' is not null or undefined
165
173
  (0, common_1.assertParamExists)('createEstimatedInvoice', 'productCode', productCode);
@@ -177,13 +185,19 @@ var ProductsApiAxiosParamCreator = function (configuration) {
177
185
  localVarQueryParameter = {};
178
186
  // authentication bearer required
179
187
  // http bearer authentication required
180
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
188
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
189
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
190
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
191
+ ];
181
192
  case 1:
182
193
  // authentication bearer required
183
194
  // http bearer authentication required
184
- _a.sent();
185
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
186
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
195
+ _b.sent();
196
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
197
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
198
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
199
+ if (authorizationValue || authorizationKeepEmpty) {
200
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
187
201
  }
188
202
  localVarHeaderParameter['Content-Type'] = 'application/json';
189
203
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -210,9 +224,10 @@ var ProductsApiAxiosParamCreator = function (configuration) {
210
224
  customApplication: function (productCode, createCustomApplicationRequestDto, authorization, options) {
211
225
  if (options === void 0) { options = {}; }
212
226
  return __awaiter(_this, void 0, void 0, function () {
213
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
214
- return __generator(this, function (_a) {
215
- switch (_a.label) {
227
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
228
+ var _a;
229
+ return __generator(this, function (_b) {
230
+ switch (_b.label) {
216
231
  case 0:
217
232
  // verify required parameter 'productCode' is not null or undefined
218
233
  (0, common_1.assertParamExists)('customApplication', 'productCode', productCode);
@@ -230,13 +245,19 @@ var ProductsApiAxiosParamCreator = function (configuration) {
230
245
  localVarQueryParameter = {};
231
246
  // authentication bearer required
232
247
  // http bearer authentication required
233
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
248
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
249
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
250
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
251
+ ];
234
252
  case 1:
235
253
  // authentication bearer required
236
254
  // http bearer authentication required
237
- _a.sent();
238
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
239
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
255
+ _b.sent();
256
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
257
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
258
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
259
+ if (authorizationValue || authorizationKeepEmpty) {
260
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
240
261
  }
241
262
  localVarHeaderParameter['Content-Type'] = 'application/json';
242
263
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -262,9 +283,10 @@ var ProductsApiAxiosParamCreator = function (configuration) {
262
283
  getInsuredObjectTypes: function (productCode, authorization, options) {
263
284
  if (options === void 0) { options = {}; }
264
285
  return __awaiter(_this, void 0, void 0, function () {
265
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
266
- return __generator(this, function (_a) {
267
- switch (_a.label) {
286
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
287
+ var _a;
288
+ return __generator(this, function (_b) {
289
+ switch (_b.label) {
268
290
  case 0:
269
291
  // verify required parameter 'productCode' is not null or undefined
270
292
  (0, common_1.assertParamExists)('getInsuredObjectTypes', 'productCode', productCode);
@@ -280,13 +302,19 @@ var ProductsApiAxiosParamCreator = function (configuration) {
280
302
  localVarQueryParameter = {};
281
303
  // authentication bearer required
282
304
  // http bearer authentication required
283
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
305
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
306
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
307
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
308
+ ];
284
309
  case 1:
285
310
  // authentication bearer required
286
311
  // http bearer authentication required
287
- _a.sent();
288
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
289
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
312
+ _b.sent();
313
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
314
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
315
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
316
+ if (authorizationValue || authorizationKeepEmpty) {
317
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
290
318
  }
291
319
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
292
320
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -312,9 +340,10 @@ var ProductsApiAxiosParamCreator = function (configuration) {
312
340
  getInsuredObjects: function (productCode, authorization, language, productVersionId, options) {
313
341
  if (options === void 0) { options = {}; }
314
342
  return __awaiter(_this, void 0, void 0, function () {
315
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
316
- return __generator(this, function (_a) {
317
- switch (_a.label) {
343
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
344
+ var _a;
345
+ return __generator(this, function (_b) {
346
+ switch (_b.label) {
318
347
  case 0:
319
348
  // verify required parameter 'productCode' is not null or undefined
320
349
  (0, common_1.assertParamExists)('getInsuredObjects', 'productCode', productCode);
@@ -334,15 +363,18 @@ var ProductsApiAxiosParamCreator = function (configuration) {
334
363
  case 1:
335
364
  // authentication bearer required
336
365
  // http bearer authentication required
337
- _a.sent();
366
+ _b.sent();
338
367
  if (language !== undefined) {
339
368
  localVarQueryParameter['language'] = language;
340
369
  }
341
370
  if (productVersionId !== undefined) {
342
371
  localVarQueryParameter['product_version_id'] = productVersionId;
343
372
  }
344
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
345
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
373
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
374
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
375
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
376
+ if (authorizationValue || authorizationKeepEmpty) {
377
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
346
378
  }
347
379
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
348
380
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -367,9 +399,10 @@ var ProductsApiAxiosParamCreator = function (configuration) {
367
399
  getProductCustomCss: function (productCode, authorization, language, options) {
368
400
  if (options === void 0) { options = {}; }
369
401
  return __awaiter(_this, void 0, void 0, function () {
370
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
371
- return __generator(this, function (_a) {
372
- switch (_a.label) {
402
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
403
+ var _a;
404
+ return __generator(this, function (_b) {
405
+ switch (_b.label) {
373
406
  case 0:
374
407
  // verify required parameter 'productCode' is not null or undefined
375
408
  (0, common_1.assertParamExists)('getProductCustomCss', 'productCode', productCode);
@@ -389,12 +422,15 @@ var ProductsApiAxiosParamCreator = function (configuration) {
389
422
  case 1:
390
423
  // authentication bearer required
391
424
  // http bearer authentication required
392
- _a.sent();
425
+ _b.sent();
393
426
  if (language !== undefined) {
394
427
  localVarQueryParameter['language'] = language;
395
428
  }
396
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
397
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
429
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
430
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
431
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
432
+ if (authorizationValue || authorizationKeepEmpty) {
433
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
398
434
  }
399
435
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
400
436
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -421,9 +457,10 @@ var ProductsApiAxiosParamCreator = function (configuration) {
421
457
  getProductFactors: function (productCode, allValues, authorization, language, productVersionId, options) {
422
458
  if (options === void 0) { options = {}; }
423
459
  return __awaiter(_this, void 0, void 0, function () {
424
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
425
- return __generator(this, function (_a) {
426
- switch (_a.label) {
460
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
461
+ var _a;
462
+ return __generator(this, function (_b) {
463
+ switch (_b.label) {
427
464
  case 0:
428
465
  // verify required parameter 'productCode' is not null or undefined
429
466
  (0, common_1.assertParamExists)('getProductFactors', 'productCode', productCode);
@@ -445,7 +482,7 @@ var ProductsApiAxiosParamCreator = function (configuration) {
445
482
  case 1:
446
483
  // authentication bearer required
447
484
  // http bearer authentication required
448
- _a.sent();
485
+ _b.sent();
449
486
  if (allValues !== undefined) {
450
487
  localVarQueryParameter['all_values'] = allValues;
451
488
  }
@@ -455,8 +492,11 @@ var ProductsApiAxiosParamCreator = function (configuration) {
455
492
  if (productVersionId !== undefined) {
456
493
  localVarQueryParameter['product_version_id'] = productVersionId;
457
494
  }
458
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
459
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
495
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
496
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
497
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
498
+ if (authorizationValue || authorizationKeepEmpty) {
499
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
460
500
  }
461
501
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
462
502
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -480,9 +520,10 @@ var ProductsApiAxiosParamCreator = function (configuration) {
480
520
  getProductLanguages: function (productCode, authorization, options) {
481
521
  if (options === void 0) { options = {}; }
482
522
  return __awaiter(_this, void 0, void 0, function () {
483
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
484
- return __generator(this, function (_a) {
485
- switch (_a.label) {
523
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
524
+ var _a;
525
+ return __generator(this, function (_b) {
526
+ switch (_b.label) {
486
527
  case 0:
487
528
  // verify required parameter 'productCode' is not null or undefined
488
529
  (0, common_1.assertParamExists)('getProductLanguages', 'productCode', productCode);
@@ -498,13 +539,19 @@ var ProductsApiAxiosParamCreator = function (configuration) {
498
539
  localVarQueryParameter = {};
499
540
  // authentication bearer required
500
541
  // http bearer authentication required
501
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
542
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
543
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
544
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
545
+ ];
502
546
  case 1:
503
547
  // authentication bearer required
504
548
  // http bearer authentication required
505
- _a.sent();
506
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
507
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
549
+ _b.sent();
550
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
551
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
552
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
553
+ if (authorizationValue || authorizationKeepEmpty) {
554
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
508
555
  }
509
556
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
510
557
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -534,9 +581,10 @@ var ProductsApiAxiosParamCreator = function (configuration) {
534
581
  listProducts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
535
582
  if (options === void 0) { options = {}; }
536
583
  return __awaiter(_this, void 0, void 0, function () {
537
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
538
- return __generator(this, function (_a) {
539
- switch (_a.label) {
584
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
585
+ var _a;
586
+ return __generator(this, function (_b) {
587
+ switch (_b.label) {
540
588
  case 0:
541
589
  localVarPath = "/publicapi/v1/products";
542
590
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -553,7 +601,7 @@ var ProductsApiAxiosParamCreator = function (configuration) {
553
601
  case 1:
554
602
  // authentication bearer required
555
603
  // http bearer authentication required
556
- _a.sent();
604
+ _b.sent();
557
605
  if (pageSize !== undefined) {
558
606
  localVarQueryParameter['pageSize'] = pageSize;
559
607
  }
@@ -575,8 +623,11 @@ var ProductsApiAxiosParamCreator = function (configuration) {
575
623
  if (filters !== undefined) {
576
624
  localVarQueryParameter['filters'] = filters;
577
625
  }
578
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
579
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
626
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
627
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
628
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
629
+ if (authorizationValue || authorizationKeepEmpty) {
630
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
580
631
  }
581
632
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
582
633
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -951,7 +1002,7 @@ var ProductsApi = /** @class */ (function (_super) {
951
1002
  */
952
1003
  ProductsApi.prototype.calculateProductFields = function (requestParameters, options) {
953
1004
  var _this = this;
954
- return (0, exports.ProductsApiFp)(this.configuration).calculateProductFields(requestParameters.productCode, requestParameters.calculateProductFieldsRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1005
+ return (0, exports.ProductsApiFp)(this.configuration).calculateProductFields(requestParameters.productCode, requestParameters.calculateProductFieldsRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
955
1006
  };
956
1007
  /**
957
1008
  * This will create an invoice product.
@@ -963,7 +1014,7 @@ var ProductsApi = /** @class */ (function (_super) {
963
1014
  */
964
1015
  ProductsApi.prototype.createEstimatedInvoice = function (requestParameters, options) {
965
1016
  var _this = this;
966
- return (0, exports.ProductsApiFp)(this.configuration).createEstimatedInvoice(requestParameters.productCode, requestParameters.createEstimatedInvoiceRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1017
+ return (0, exports.ProductsApiFp)(this.configuration).createEstimatedInvoice(requestParameters.productCode, requestParameters.createEstimatedInvoiceRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
967
1018
  };
968
1019
  /**
969
1020
  * This will create a custom application for a specific provider.
@@ -975,7 +1026,7 @@ var ProductsApi = /** @class */ (function (_super) {
975
1026
  */
976
1027
  ProductsApi.prototype.customApplication = function (requestParameters, options) {
977
1028
  var _this = this;
978
- return (0, exports.ProductsApiFp)(this.configuration).customApplication(requestParameters.productCode, requestParameters.createCustomApplicationRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1029
+ return (0, exports.ProductsApiFp)(this.configuration).customApplication(requestParameters.productCode, requestParameters.createCustomApplicationRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
979
1030
  };
980
1031
  /**
981
1032
  * Returns a list of insured object types you have previously created. The insured object types are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
@@ -987,7 +1038,7 @@ var ProductsApi = /** @class */ (function (_super) {
987
1038
  */
988
1039
  ProductsApi.prototype.getInsuredObjectTypes = function (requestParameters, options) {
989
1040
  var _this = this;
990
- return (0, exports.ProductsApiFp)(this.configuration).getInsuredObjectTypes(requestParameters.productCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1041
+ return (0, exports.ProductsApiFp)(this.configuration).getInsuredObjectTypes(requestParameters.productCode, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
991
1042
  };
992
1043
  /**
993
1044
  * 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.
@@ -999,7 +1050,7 @@ var ProductsApi = /** @class */ (function (_super) {
999
1050
  */
1000
1051
  ProductsApi.prototype.getInsuredObjects = function (requestParameters, options) {
1001
1052
  var _this = this;
1002
- return (0, exports.ProductsApiFp)(this.configuration).getInsuredObjects(requestParameters.productCode, requestParameters.authorization, requestParameters.language, requestParameters.productVersionId, options).then(function (request) { return request(_this.axios, _this.basePath); });
1053
+ return (0, exports.ProductsApiFp)(this.configuration).getInsuredObjects(requestParameters.productCode, requestParameters.authorization, requestParameters.language, requestParameters.productVersionId, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1003
1054
  };
1004
1055
  /**
1005
1056
  * This will generate a custom css for booking funnel, based on product. Pass `language` to have the funnel texts it carries returned translated; without it the setting is returned exactly as it is stored.
@@ -1011,7 +1062,7 @@ var ProductsApi = /** @class */ (function (_super) {
1011
1062
  */
1012
1063
  ProductsApi.prototype.getProductCustomCss = function (requestParameters, options) {
1013
1064
  var _this = this;
1014
- return (0, exports.ProductsApiFp)(this.configuration).getProductCustomCss(requestParameters.productCode, requestParameters.authorization, requestParameters.language, options).then(function (request) { return request(_this.axios, _this.basePath); });
1065
+ return (0, exports.ProductsApiFp)(this.configuration).getProductCustomCss(requestParameters.productCode, requestParameters.authorization, requestParameters.language, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1015
1066
  };
1016
1067
  /**
1017
1068
  * 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.
@@ -1023,7 +1074,7 @@ var ProductsApi = /** @class */ (function (_super) {
1023
1074
  */
1024
1075
  ProductsApi.prototype.getProductFactors = function (requestParameters, options) {
1025
1076
  var _this = this;
1026
- return (0, exports.ProductsApiFp)(this.configuration).getProductFactors(requestParameters.productCode, requestParameters.allValues, requestParameters.authorization, requestParameters.language, requestParameters.productVersionId, options).then(function (request) { return request(_this.axios, _this.basePath); });
1077
+ return (0, exports.ProductsApiFp)(this.configuration).getProductFactors(requestParameters.productCode, requestParameters.allValues, requestParameters.authorization, requestParameters.language, requestParameters.productVersionId, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1027
1078
  };
1028
1079
  /**
1029
1080
  * This returns the languages a product can be shown in: its default language, followed by every additional language that has been activated.
@@ -1035,7 +1086,7 @@ var ProductsApi = /** @class */ (function (_super) {
1035
1086
  */
1036
1087
  ProductsApi.prototype.getProductLanguages = function (requestParameters, options) {
1037
1088
  var _this = this;
1038
- return (0, exports.ProductsApiFp)(this.configuration).getProductLanguages(requestParameters.productCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1089
+ return (0, exports.ProductsApiFp)(this.configuration).getProductLanguages(requestParameters.productCode, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1039
1090
  };
1040
1091
  /**
1041
1092
  * Returns a list of products you have previously created. The products are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
@@ -1048,7 +1099,7 @@ var ProductsApi = /** @class */ (function (_super) {
1048
1099
  ProductsApi.prototype.listProducts = function (requestParameters, options) {
1049
1100
  var _this = this;
1050
1101
  if (requestParameters === void 0) { requestParameters = {}; }
1051
- return (0, exports.ProductsApiFp)(this.configuration).listProducts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1102
+ return (0, exports.ProductsApiFp)(this.configuration).listProducts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1052
1103
  };
1053
1104
  return ProductsApi;
1054
1105
  }(base_1.BaseAPI));
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Emil PublicAPI
3
+ * The Emil Public API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
+ import { Configuration } from '../configuration';
14
+ import { RequestArgs, BaseAPI } from '../base';
15
+ import { SubmitWithdrawalRequestDto } from '../models';
16
+ import { SubmitWithdrawalRequestResponseClass } from '../models';
17
+ /**
18
+ * WithdrawalRequestsApi - axios parameter creator
19
+ * @export
20
+ */
21
+ export declare const WithdrawalRequestsApiAxiosParamCreator: (configuration?: Configuration) => {
22
+ /**
23
+ * Records the request of a customer to withdraw from a policy. Use it from the withdrawal form of the tenant page, after the customer types the policy number and the policyholder name. The platform checks that the number and the name belong together. A failed check gives one uniform answer, so the response does not show whether a policy number exists. The request needs a policy that is not terminated or withdrawn and that has no open request. A rejected request does not block a new one. The call does not withdraw the policy. A case manager accepts or rejects the request later. The response holds only the time of receipt, in UTC. It holds no policy or customer data. To authenticate, send the public key of the tenant in the Authorization header. Related endpoint: [Create the lead](#/Leads/createLead) uses the same public key. Search terms: withdrawal, revocation, cancellation form, right of withdrawal.
24
+ * @summary Submit a withdrawal request
25
+ * @param {SubmitWithdrawalRequestDto} submitWithdrawalRequestDto
26
+ * @param {string} [authorization] Bearer token. Use the public key of the tenant, for example `Bearer pb_<key>`.
27
+ * @param {*} [options] Override http request option.
28
+ * @throws {RequiredError}
29
+ */
30
+ submitWithdrawalRequest: (submitWithdrawalRequestDto: SubmitWithdrawalRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
31
+ };
32
+ /**
33
+ * WithdrawalRequestsApi - functional programming interface
34
+ * @export
35
+ */
36
+ export declare const WithdrawalRequestsApiFp: (configuration?: Configuration) => {
37
+ /**
38
+ * Records the request of a customer to withdraw from a policy. Use it from the withdrawal form of the tenant page, after the customer types the policy number and the policyholder name. The platform checks that the number and the name belong together. A failed check gives one uniform answer, so the response does not show whether a policy number exists. The request needs a policy that is not terminated or withdrawn and that has no open request. A rejected request does not block a new one. The call does not withdraw the policy. A case manager accepts or rejects the request later. The response holds only the time of receipt, in UTC. It holds no policy or customer data. To authenticate, send the public key of the tenant in the Authorization header. Related endpoint: [Create the lead](#/Leads/createLead) uses the same public key. Search terms: withdrawal, revocation, cancellation form, right of withdrawal.
39
+ * @summary Submit a withdrawal request
40
+ * @param {SubmitWithdrawalRequestDto} submitWithdrawalRequestDto
41
+ * @param {string} [authorization] Bearer token. Use the public key of the tenant, for example &#x60;Bearer pb_&lt;key&gt;&#x60;.
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ submitWithdrawalRequest(submitWithdrawalRequestDto: SubmitWithdrawalRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubmitWithdrawalRequestResponseClass>>;
46
+ };
47
+ /**
48
+ * WithdrawalRequestsApi - factory interface
49
+ * @export
50
+ */
51
+ export declare const WithdrawalRequestsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
52
+ /**
53
+ * Records the request of a customer to withdraw from a policy. Use it from the withdrawal form of the tenant page, after the customer types the policy number and the policyholder name. The platform checks that the number and the name belong together. A failed check gives one uniform answer, so the response does not show whether a policy number exists. The request needs a policy that is not terminated or withdrawn and that has no open request. A rejected request does not block a new one. The call does not withdraw the policy. A case manager accepts or rejects the request later. The response holds only the time of receipt, in UTC. It holds no policy or customer data. To authenticate, send the public key of the tenant in the Authorization header. Related endpoint: [Create the lead](#/Leads/createLead) uses the same public key. Search terms: withdrawal, revocation, cancellation form, right of withdrawal.
54
+ * @summary Submit a withdrawal request
55
+ * @param {SubmitWithdrawalRequestDto} submitWithdrawalRequestDto
56
+ * @param {string} [authorization] Bearer token. Use the public key of the tenant, for example &#x60;Bearer pb_&lt;key&gt;&#x60;.
57
+ * @param {*} [options] Override http request option.
58
+ * @throws {RequiredError}
59
+ */
60
+ submitWithdrawalRequest(submitWithdrawalRequestDto: SubmitWithdrawalRequestDto, authorization?: string, options?: any): AxiosPromise<SubmitWithdrawalRequestResponseClass>;
61
+ };
62
+ /**
63
+ * Request parameters for submitWithdrawalRequest operation in WithdrawalRequestsApi.
64
+ * @export
65
+ * @interface WithdrawalRequestsApiSubmitWithdrawalRequestRequest
66
+ */
67
+ export interface WithdrawalRequestsApiSubmitWithdrawalRequestRequest {
68
+ /**
69
+ *
70
+ * @type {SubmitWithdrawalRequestDto}
71
+ * @memberof WithdrawalRequestsApiSubmitWithdrawalRequest
72
+ */
73
+ readonly submitWithdrawalRequestDto: SubmitWithdrawalRequestDto;
74
+ /**
75
+ * Bearer token. Use the public key of the tenant, for example &#x60;Bearer pb_&lt;key&gt;&#x60;.
76
+ * @type {string}
77
+ * @memberof WithdrawalRequestsApiSubmitWithdrawalRequest
78
+ */
79
+ readonly authorization?: string;
80
+ }
81
+ /**
82
+ * WithdrawalRequestsApi - object-oriented interface
83
+ * @export
84
+ * @class WithdrawalRequestsApi
85
+ * @extends {BaseAPI}
86
+ */
87
+ export declare class WithdrawalRequestsApi extends BaseAPI {
88
+ /**
89
+ * Records the request of a customer to withdraw from a policy. Use it from the withdrawal form of the tenant page, after the customer types the policy number and the policyholder name. The platform checks that the number and the name belong together. A failed check gives one uniform answer, so the response does not show whether a policy number exists. The request needs a policy that is not terminated or withdrawn and that has no open request. A rejected request does not block a new one. The call does not withdraw the policy. A case manager accepts or rejects the request later. The response holds only the time of receipt, in UTC. It holds no policy or customer data. To authenticate, send the public key of the tenant in the Authorization header. Related endpoint: [Create the lead](#/Leads/createLead) uses the same public key. Search terms: withdrawal, revocation, cancellation form, right of withdrawal.
90
+ * @summary Submit a withdrawal request
91
+ * @param {WithdrawalRequestsApiSubmitWithdrawalRequestRequest} requestParameters Request parameters.
92
+ * @param {*} [options] Override http request option.
93
+ * @throws {RequiredError}
94
+ * @memberof WithdrawalRequestsApi
95
+ */
96
+ submitWithdrawalRequest(requestParameters: WithdrawalRequestsApiSubmitWithdrawalRequestRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SubmitWithdrawalRequestResponseClass, any, {}, any>>;
97
+ }