@emilgroup/billing-sdk 1.63.1-beta.4 → 1.63.1-beta.40

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 (43) hide show
  1. package/README.md +2 -2
  2. package/api/correction-invoices-api.ts +23 -8
  3. package/api/draft-invoice-api.ts +24 -9
  4. package/api/estimated-invoices-api.ts +32 -12
  5. package/api/health-api.ts +1 -1
  6. package/api/initial-invoices-api.ts +15 -5
  7. package/api/invoices-api.ts +47 -22
  8. package/api/policy-billing-api.ts +24 -9
  9. package/api/recurring-invoices-api.ts +15 -5
  10. package/api/termination-invoices-api.ts +15 -5
  11. package/api/withdraw-invoices-api.ts +15 -5
  12. package/base.ts +239 -43
  13. package/common.ts +3 -2
  14. package/configuration.ts +20 -0
  15. package/dist/api/correction-invoices-api.d.ts +2 -2
  16. package/dist/api/correction-invoices-api.js +35 -18
  17. package/dist/api/draft-invoice-api.d.ts +3 -3
  18. package/dist/api/draft-invoice-api.js +45 -24
  19. package/dist/api/estimated-invoices-api.d.ts +4 -4
  20. package/dist/api/estimated-invoices-api.js +60 -32
  21. package/dist/api/health-api.d.ts +1 -1
  22. package/dist/api/health-api.js +1 -1
  23. package/dist/api/initial-invoices-api.d.ts +1 -1
  24. package/dist/api/initial-invoices-api.js +20 -10
  25. package/dist/api/invoices-api.d.ts +12 -12
  26. package/dist/api/invoices-api.js +59 -37
  27. package/dist/api/policy-billing-api.d.ts +3 -3
  28. package/dist/api/policy-billing-api.js +41 -23
  29. package/dist/api/recurring-invoices-api.d.ts +1 -1
  30. package/dist/api/recurring-invoices-api.js +20 -10
  31. package/dist/api/termination-invoices-api.d.ts +1 -1
  32. package/dist/api/termination-invoices-api.js +20 -10
  33. package/dist/api/withdraw-invoices-api.d.ts +1 -1
  34. package/dist/api/withdraw-invoices-api.js +20 -10
  35. package/dist/base.d.ts +26 -0
  36. package/dist/base.js +243 -60
  37. package/dist/common.d.ts +1 -1
  38. package/dist/common.js +1 -0
  39. package/dist/configuration.d.ts +17 -0
  40. package/dist/configuration.js +2 -0
  41. package/dist/models/invoice-item-class.d.ts +12 -0
  42. package/models/invoice-item-class.ts +12 -0
  43. package/package.json +2 -2
@@ -104,9 +104,10 @@ var CorrectionInvoicesApiAxiosParamCreator = function (configuration) {
104
104
  createCorrectionInvoice: function (createInvoiceForPolicyRequestDto, authorization, idempotencyKey, 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, idempotencyKeyIsAuth, idempotencyKeyValue, idempotencyKeyKeepEmpty, headersFromBaseOptions;
108
+ var _a, _b;
109
+ return __generator(this, function (_c) {
110
+ switch (_c.label) {
110
111
  case 0:
111
112
  // verify required parameter 'createInvoiceForPolicyRequestDto' is not null or undefined
112
113
  (0, common_1.assertParamExists)('createCorrectionInvoice', 'createInvoiceForPolicyRequestDto', createInvoiceForPolicyRequestDto);
@@ -121,16 +122,25 @@ var CorrectionInvoicesApiAxiosParamCreator = function (configuration) {
121
122
  localVarQueryParameter = {};
122
123
  // authentication bearer required
123
124
  // http bearer authentication required
124
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
125
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
126
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
127
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
128
+ ];
125
129
  case 1:
126
130
  // authentication bearer required
127
131
  // http bearer authentication required
128
- _a.sent();
129
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
132
+ _c.sent();
133
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
134
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
135
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
136
+ if (authorizationValue || authorizationKeepEmpty) {
137
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
131
138
  }
132
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
139
+ idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
140
+ idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
141
+ idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !((_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _b === void 0 ? void 0 : _b['X-Emil-Account']);
142
+ if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
143
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
134
144
  }
135
145
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
146
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -155,9 +165,10 @@ var CorrectionInvoicesApiAxiosParamCreator = function (configuration) {
155
165
  revertInvoice: function (revertInvoiceRequestDto, authorization, options) {
156
166
  if (options === void 0) { options = {}; }
157
167
  return __awaiter(_this, void 0, void 0, function () {
158
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
159
- return __generator(this, function (_a) {
160
- switch (_a.label) {
168
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
169
+ var _a;
170
+ return __generator(this, function (_b) {
171
+ switch (_b.label) {
161
172
  case 0:
162
173
  // verify required parameter 'revertInvoiceRequestDto' is not null or undefined
163
174
  (0, common_1.assertParamExists)('revertInvoice', 'revertInvoiceRequestDto', revertInvoiceRequestDto);
@@ -172,13 +183,19 @@ var CorrectionInvoicesApiAxiosParamCreator = function (configuration) {
172
183
  localVarQueryParameter = {};
173
184
  // authentication bearer required
174
185
  // http bearer authentication required
175
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
186
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
187
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
188
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
189
+ ];
176
190
  case 1:
177
191
  // authentication bearer required
178
192
  // http bearer authentication required
179
- _a.sent();
180
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
181
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
193
+ _b.sent();
194
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
195
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
196
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
197
+ if (authorizationValue || authorizationKeepEmpty) {
198
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
182
199
  }
183
200
  localVarHeaderParameter['Content-Type'] = 'application/json';
184
201
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -301,7 +318,7 @@ var CorrectionInvoicesApi = /** @class */ (function (_super) {
301
318
  */
302
319
  CorrectionInvoicesApi.prototype.createCorrectionInvoice = function (requestParameters, options) {
303
320
  var _this = this;
304
- return (0, exports.CorrectionInvoicesApiFp)(this.configuration).createCorrectionInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
321
+ return (0, exports.CorrectionInvoicesApiFp)(this.configuration).createCorrectionInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
305
322
  };
306
323
  /**
307
324
  * undefined **Required Permissions** \"billing-management.invoices.update\"
@@ -312,7 +329,7 @@ var CorrectionInvoicesApi = /** @class */ (function (_super) {
312
329
  */
313
330
  CorrectionInvoicesApi.prototype.revertInvoice = function (requestParameters, options) {
314
331
  var _this = this;
315
- return (0, exports.CorrectionInvoicesApiFp)(this.configuration).revertInvoice(requestParameters.revertInvoiceRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
332
+ return (0, exports.CorrectionInvoicesApiFp)(this.configuration).revertInvoice(requestParameters.revertInvoiceRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
316
333
  };
317
334
  return CorrectionInvoicesApi;
318
335
  }(base_1.BaseAPI));
@@ -165,7 +165,7 @@ export declare class DraftInvoiceApi extends BaseAPI {
165
165
  * @throws {RequiredError}
166
166
  * @memberof DraftInvoiceApi
167
167
  */
168
- createDraftInvoice(requestParameters: DraftInvoiceApiCreateDraftInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
168
+ createDraftInvoice(requestParameters: DraftInvoiceApiCreateDraftInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
169
169
  /**
170
170
  * undefined **Required Permissions** \"billing-management.invoices.delete\"
171
171
  * @param {DraftInvoiceApiDeleteAllDraftInvoicesRequest} requestParameters Request parameters.
@@ -173,7 +173,7 @@ export declare class DraftInvoiceApi extends BaseAPI {
173
173
  * @throws {RequiredError}
174
174
  * @memberof DraftInvoiceApi
175
175
  */
176
- deleteAllDraftInvoices(requestParameters?: DraftInvoiceApiDeleteAllDraftInvoicesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
176
+ deleteAllDraftInvoices(requestParameters?: DraftInvoiceApiDeleteAllDraftInvoicesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
177
177
  /**
178
178
  * undefined **Required Permissions** \"billing-management.invoices.delete\"
179
179
  * @param {DraftInvoiceApiDeleteDraftInvoiceRequest} requestParameters Request parameters.
@@ -181,5 +181,5 @@ export declare class DraftInvoiceApi extends BaseAPI {
181
181
  * @throws {RequiredError}
182
182
  * @memberof DraftInvoiceApi
183
183
  */
184
- deleteDraftInvoice(requestParameters: DraftInvoiceApiDeleteDraftInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
184
+ deleteDraftInvoice(requestParameters: DraftInvoiceApiDeleteDraftInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
185
185
  }
@@ -102,9 +102,10 @@ var DraftInvoiceApiAxiosParamCreator = function (configuration) {
102
102
  createDraftInvoice: function (createDraftInvoiceRequestDto, authorization, options) {
103
103
  if (options === void 0) { options = {}; }
104
104
  return __awaiter(_this, void 0, void 0, function () {
105
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
106
- return __generator(this, function (_a) {
107
- switch (_a.label) {
105
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
106
+ var _a;
107
+ return __generator(this, function (_b) {
108
+ switch (_b.label) {
108
109
  case 0:
109
110
  // verify required parameter 'createDraftInvoiceRequestDto' is not null or undefined
110
111
  (0, common_1.assertParamExists)('createDraftInvoice', 'createDraftInvoiceRequestDto', createDraftInvoiceRequestDto);
@@ -119,13 +120,19 @@ var DraftInvoiceApiAxiosParamCreator = function (configuration) {
119
120
  localVarQueryParameter = {};
120
121
  // authentication bearer required
121
122
  // http bearer authentication required
122
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
123
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
124
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
125
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
126
+ ];
123
127
  case 1:
124
128
  // authentication bearer required
125
129
  // http bearer authentication required
126
- _a.sent();
127
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
128
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ _b.sent();
131
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
132
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
133
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
134
+ if (authorizationValue || authorizationKeepEmpty) {
135
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
129
136
  }
130
137
  localVarHeaderParameter['Content-Type'] = 'application/json';
131
138
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -149,9 +156,10 @@ var DraftInvoiceApiAxiosParamCreator = function (configuration) {
149
156
  deleteAllDraftInvoices: function (authorization, options) {
150
157
  if (options === void 0) { options = {}; }
151
158
  return __awaiter(_this, void 0, void 0, function () {
152
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
153
- return __generator(this, function (_a) {
154
- switch (_a.label) {
159
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
160
+ var _a;
161
+ return __generator(this, function (_b) {
162
+ switch (_b.label) {
155
163
  case 0:
156
164
  localVarPath = "/billingservice/v1/draft-invoices";
157
165
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -164,13 +172,19 @@ var DraftInvoiceApiAxiosParamCreator = function (configuration) {
164
172
  localVarQueryParameter = {};
165
173
  // authentication bearer required
166
174
  // http bearer authentication required
167
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
175
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
176
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
177
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
178
+ ];
168
179
  case 1:
169
180
  // authentication bearer required
170
181
  // http bearer authentication required
171
- _a.sent();
172
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
173
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
182
+ _b.sent();
183
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
184
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
185
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
186
+ if (authorizationValue || authorizationKeepEmpty) {
187
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
174
188
  }
175
189
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
176
190
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -193,9 +207,10 @@ var DraftInvoiceApiAxiosParamCreator = function (configuration) {
193
207
  deleteDraftInvoice: function (body, authorization, options) {
194
208
  if (options === void 0) { options = {}; }
195
209
  return __awaiter(_this, void 0, void 0, function () {
196
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
197
- return __generator(this, function (_a) {
198
- switch (_a.label) {
210
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
211
+ var _a;
212
+ return __generator(this, function (_b) {
213
+ switch (_b.label) {
199
214
  case 0:
200
215
  // verify required parameter 'body' is not null or undefined
201
216
  (0, common_1.assertParamExists)('deleteDraftInvoice', 'body', body);
@@ -210,13 +225,19 @@ var DraftInvoiceApiAxiosParamCreator = function (configuration) {
210
225
  localVarQueryParameter = {};
211
226
  // authentication bearer required
212
227
  // http bearer authentication required
213
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
228
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
229
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
230
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
231
+ ];
214
232
  case 1:
215
233
  // authentication bearer required
216
234
  // http bearer authentication required
217
- _a.sent();
218
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
219
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
235
+ _b.sent();
236
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
237
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
238
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
239
+ if (authorizationValue || authorizationKeepEmpty) {
240
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
220
241
  }
221
242
  localVarHeaderParameter['Content-Type'] = 'application/json';
222
243
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -362,7 +383,7 @@ var DraftInvoiceApi = /** @class */ (function (_super) {
362
383
  */
363
384
  DraftInvoiceApi.prototype.createDraftInvoice = function (requestParameters, options) {
364
385
  var _this = this;
365
- return (0, exports.DraftInvoiceApiFp)(this.configuration).createDraftInvoice(requestParameters.createDraftInvoiceRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
386
+ return (0, exports.DraftInvoiceApiFp)(this.configuration).createDraftInvoice(requestParameters.createDraftInvoiceRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
366
387
  };
367
388
  /**
368
389
  * undefined **Required Permissions** \"billing-management.invoices.delete\"
@@ -374,7 +395,7 @@ var DraftInvoiceApi = /** @class */ (function (_super) {
374
395
  DraftInvoiceApi.prototype.deleteAllDraftInvoices = function (requestParameters, options) {
375
396
  var _this = this;
376
397
  if (requestParameters === void 0) { requestParameters = {}; }
377
- return (0, exports.DraftInvoiceApiFp)(this.configuration).deleteAllDraftInvoices(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
398
+ return (0, exports.DraftInvoiceApiFp)(this.configuration).deleteAllDraftInvoices(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
378
399
  };
379
400
  /**
380
401
  * undefined **Required Permissions** \"billing-management.invoices.delete\"
@@ -385,7 +406,7 @@ var DraftInvoiceApi = /** @class */ (function (_super) {
385
406
  */
386
407
  DraftInvoiceApi.prototype.deleteDraftInvoice = function (requestParameters, options) {
387
408
  var _this = this;
388
- return (0, exports.DraftInvoiceApiFp)(this.configuration).deleteDraftInvoice(requestParameters.body, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
409
+ return (0, exports.DraftInvoiceApiFp)(this.configuration).deleteDraftInvoice(requestParameters.body, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
389
410
  };
390
411
  return DraftInvoiceApi;
391
412
  }(base_1.BaseAPI));
@@ -246,7 +246,7 @@ export declare class EstimatedInvoicesApi extends BaseAPI {
246
246
  * @throws {RequiredError}
247
247
  * @memberof EstimatedInvoicesApi
248
248
  */
249
- createCustomEstimatedInvoice(requestParameters: EstimatedInvoicesApiCreateCustomEstimatedInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateCustomEstimatedInvoiceResponseClass, any, {}>>;
249
+ createCustomEstimatedInvoice(requestParameters: EstimatedInvoicesApiCreateCustomEstimatedInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateCustomEstimatedInvoiceResponseClass, any, {}, any>>;
250
250
  /**
251
251
  * This creates an estimated invoice. It will not be saved in the database. **Required Permissions** \"billing-management.invoices.create\"
252
252
  * @summary Create the estimated invoice
@@ -255,7 +255,7 @@ export declare class EstimatedInvoicesApi extends BaseAPI {
255
255
  * @throws {RequiredError}
256
256
  * @memberof EstimatedInvoicesApi
257
257
  */
258
- createEstimatedInvoice(requestParameters: EstimatedInvoicesApiCreateEstimatedInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateEstimatedInvoiceResponseClass, any, {}>>;
258
+ createEstimatedInvoice(requestParameters: EstimatedInvoicesApiCreateEstimatedInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateEstimatedInvoiceResponseClass, any, {}, any>>;
259
259
  /**
260
260
  * This creates an estimated invoice. It will not be saved in the database. **Required Permissions** \"billing-management.invoices.create\"
261
261
  * @summary Create the estimated invoice
@@ -264,7 +264,7 @@ export declare class EstimatedInvoicesApi extends BaseAPI {
264
264
  * @throws {RequiredError}
265
265
  * @memberof EstimatedInvoicesApi
266
266
  */
267
- createEstimatedInvoiceFromInterval(requestParameters: EstimatedInvoicesApiCreateEstimatedInvoiceFromIntervalRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateEstimatedInvoiceForIntervalResponseClass, any, {}>>;
267
+ createEstimatedInvoiceFromInterval(requestParameters: EstimatedInvoicesApiCreateEstimatedInvoiceFromIntervalRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateEstimatedInvoiceForIntervalResponseClass, any, {}, any>>;
268
268
  /**
269
269
  * This creates an estimated product invoice. It will not be saved in the database. **Required Permissions** \"billing-management.invoices.create\"
270
270
  * @summary Create the estimated invoice
@@ -273,5 +273,5 @@ export declare class EstimatedInvoicesApi extends BaseAPI {
273
273
  * @throws {RequiredError}
274
274
  * @memberof EstimatedInvoicesApi
275
275
  */
276
- createProductEstimatedInvoice(requestParameters: EstimatedInvoicesApiCreateProductEstimatedInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateProductEstimatedInvoiceResponseClass, any, {}>>;
276
+ createProductEstimatedInvoice(requestParameters: EstimatedInvoicesApiCreateProductEstimatedInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateProductEstimatedInvoiceResponseClass, any, {}, any>>;
277
277
  }
@@ -103,9 +103,10 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
103
103
  createCustomEstimatedInvoice: function (createCustomEstimatedInvoiceRequestDto, authorization, options) {
104
104
  if (options === void 0) { options = {}; }
105
105
  return __awaiter(_this, void 0, void 0, function () {
106
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
- return __generator(this, function (_a) {
108
- switch (_a.label) {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
107
+ var _a;
108
+ return __generator(this, function (_b) {
109
+ switch (_b.label) {
109
110
  case 0:
110
111
  // verify required parameter 'createCustomEstimatedInvoiceRequestDto' is not null or undefined
111
112
  (0, common_1.assertParamExists)('createCustomEstimatedInvoice', 'createCustomEstimatedInvoiceRequestDto', createCustomEstimatedInvoiceRequestDto);
@@ -120,13 +121,19 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
120
121
  localVarQueryParameter = {};
121
122
  // authentication bearer required
122
123
  // http bearer authentication required
123
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
125
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
126
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
127
+ ];
124
128
  case 1:
125
129
  // authentication bearer required
126
130
  // http bearer authentication required
127
- _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ _b.sent();
132
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
133
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
134
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
135
+ if (authorizationValue || authorizationKeepEmpty) {
136
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
130
137
  }
131
138
  localVarHeaderParameter['Content-Type'] = 'application/json';
132
139
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -152,9 +159,10 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
152
159
  createEstimatedInvoice: function (createEstimatedInvoiceRequestDto, authorization, options) {
153
160
  if (options === void 0) { options = {}; }
154
161
  return __awaiter(_this, void 0, void 0, function () {
155
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
156
- return __generator(this, function (_a) {
157
- switch (_a.label) {
162
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
163
+ var _a;
164
+ return __generator(this, function (_b) {
165
+ switch (_b.label) {
158
166
  case 0:
159
167
  // verify required parameter 'createEstimatedInvoiceRequestDto' is not null or undefined
160
168
  (0, common_1.assertParamExists)('createEstimatedInvoice', 'createEstimatedInvoiceRequestDto', createEstimatedInvoiceRequestDto);
@@ -169,13 +177,19 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
169
177
  localVarQueryParameter = {};
170
178
  // authentication bearer required
171
179
  // http bearer authentication required
172
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
180
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
181
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
182
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
183
+ ];
173
184
  case 1:
174
185
  // authentication bearer required
175
186
  // http bearer authentication required
176
- _a.sent();
177
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
178
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
187
+ _b.sent();
188
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
189
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
190
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
191
+ if (authorizationValue || authorizationKeepEmpty) {
192
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
179
193
  }
180
194
  localVarHeaderParameter['Content-Type'] = 'application/json';
181
195
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -201,9 +215,10 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
201
215
  createEstimatedInvoiceFromInterval: function (createEstimatedInvoiceForIntervalRequestDto, authorization, options) {
202
216
  if (options === void 0) { options = {}; }
203
217
  return __awaiter(_this, void 0, void 0, function () {
204
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
205
- return __generator(this, function (_a) {
206
- switch (_a.label) {
218
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
219
+ var _a;
220
+ return __generator(this, function (_b) {
221
+ switch (_b.label) {
207
222
  case 0:
208
223
  // verify required parameter 'createEstimatedInvoiceForIntervalRequestDto' is not null or undefined
209
224
  (0, common_1.assertParamExists)('createEstimatedInvoiceFromInterval', 'createEstimatedInvoiceForIntervalRequestDto', createEstimatedInvoiceForIntervalRequestDto);
@@ -218,13 +233,19 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
218
233
  localVarQueryParameter = {};
219
234
  // authentication bearer required
220
235
  // http bearer authentication required
221
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
236
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
237
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
238
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
239
+ ];
222
240
  case 1:
223
241
  // authentication bearer required
224
242
  // http bearer authentication required
225
- _a.sent();
226
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
227
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
243
+ _b.sent();
244
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
245
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
246
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
247
+ if (authorizationValue || authorizationKeepEmpty) {
248
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
228
249
  }
229
250
  localVarHeaderParameter['Content-Type'] = 'application/json';
230
251
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -251,9 +272,10 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
251
272
  createProductEstimatedInvoice: function (productSlug, createProductEstimatedInvoiceRequestDto, authorization, options) {
252
273
  if (options === void 0) { options = {}; }
253
274
  return __awaiter(_this, void 0, void 0, function () {
254
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
255
- return __generator(this, function (_a) {
256
- switch (_a.label) {
275
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
276
+ var _a;
277
+ return __generator(this, function (_b) {
278
+ switch (_b.label) {
257
279
  case 0:
258
280
  // verify required parameter 'productSlug' is not null or undefined
259
281
  (0, common_1.assertParamExists)('createProductEstimatedInvoice', 'productSlug', productSlug);
@@ -271,13 +293,19 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
271
293
  localVarQueryParameter = {};
272
294
  // authentication bearer required
273
295
  // http bearer authentication required
274
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
296
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
297
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
298
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
299
+ ];
275
300
  case 1:
276
301
  // authentication bearer required
277
302
  // http bearer authentication required
278
- _a.sent();
279
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
280
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
303
+ _b.sent();
304
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
305
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
306
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
307
+ if (authorizationValue || authorizationKeepEmpty) {
308
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
281
309
  }
282
310
  localVarHeaderParameter['Content-Type'] = 'application/json';
283
311
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -466,7 +494,7 @@ var EstimatedInvoicesApi = /** @class */ (function (_super) {
466
494
  */
467
495
  EstimatedInvoicesApi.prototype.createCustomEstimatedInvoice = function (requestParameters, options) {
468
496
  var _this = this;
469
- return (0, exports.EstimatedInvoicesApiFp)(this.configuration).createCustomEstimatedInvoice(requestParameters.createCustomEstimatedInvoiceRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
497
+ return (0, exports.EstimatedInvoicesApiFp)(this.configuration).createCustomEstimatedInvoice(requestParameters.createCustomEstimatedInvoiceRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
470
498
  };
471
499
  /**
472
500
  * This creates an estimated invoice. It will not be saved in the database. **Required Permissions** \"billing-management.invoices.create\"
@@ -478,7 +506,7 @@ var EstimatedInvoicesApi = /** @class */ (function (_super) {
478
506
  */
479
507
  EstimatedInvoicesApi.prototype.createEstimatedInvoice = function (requestParameters, options) {
480
508
  var _this = this;
481
- return (0, exports.EstimatedInvoicesApiFp)(this.configuration).createEstimatedInvoice(requestParameters.createEstimatedInvoiceRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
509
+ return (0, exports.EstimatedInvoicesApiFp)(this.configuration).createEstimatedInvoice(requestParameters.createEstimatedInvoiceRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
482
510
  };
483
511
  /**
484
512
  * This creates an estimated invoice. It will not be saved in the database. **Required Permissions** \"billing-management.invoices.create\"
@@ -490,7 +518,7 @@ var EstimatedInvoicesApi = /** @class */ (function (_super) {
490
518
  */
491
519
  EstimatedInvoicesApi.prototype.createEstimatedInvoiceFromInterval = function (requestParameters, options) {
492
520
  var _this = this;
493
- return (0, exports.EstimatedInvoicesApiFp)(this.configuration).createEstimatedInvoiceFromInterval(requestParameters.createEstimatedInvoiceForIntervalRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
521
+ return (0, exports.EstimatedInvoicesApiFp)(this.configuration).createEstimatedInvoiceFromInterval(requestParameters.createEstimatedInvoiceForIntervalRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
494
522
  };
495
523
  /**
496
524
  * This creates an estimated product invoice. It will not be saved in the database. **Required Permissions** \"billing-management.invoices.create\"
@@ -502,7 +530,7 @@ var EstimatedInvoicesApi = /** @class */ (function (_super) {
502
530
  */
503
531
  EstimatedInvoicesApi.prototype.createProductEstimatedInvoice = function (requestParameters, options) {
504
532
  var _this = this;
505
- return (0, exports.EstimatedInvoicesApiFp)(this.configuration).createProductEstimatedInvoice(requestParameters.productSlug, requestParameters.createProductEstimatedInvoiceRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
533
+ return (0, exports.EstimatedInvoicesApiFp)(this.configuration).createProductEstimatedInvoice(requestParameters.productSlug, requestParameters.createProductEstimatedInvoiceRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
506
534
  };
507
535
  return EstimatedInvoicesApi;
508
536
  }(base_1.BaseAPI));
@@ -62,5 +62,5 @@ export declare class HealthApi extends BaseAPI {
62
62
  * @throws {RequiredError}
63
63
  * @memberof HealthApi
64
64
  */
65
- check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any, {}>>;
65
+ check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any, {}, any>>;
66
66
  }
@@ -189,7 +189,7 @@ var HealthApi = /** @class */ (function (_super) {
189
189
  */
190
190
  HealthApi.prototype.check = function (options) {
191
191
  var _this = this;
192
- return (0, exports.HealthApiFp)(this.configuration).check(options).then(function (request) { return request(_this.axios, _this.basePath); });
192
+ return (0, exports.HealthApiFp)(this.configuration).check(this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
193
193
  };
194
194
  return HealthApi;
195
195
  }(base_1.BaseAPI));
@@ -102,5 +102,5 @@ export declare class InitialInvoicesApi extends BaseAPI {
102
102
  * @throws {RequiredError}
103
103
  * @memberof InitialInvoicesApi
104
104
  */
105
- createInitialInvoice(requestParameters: InitialInvoicesApiCreateInitialInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}>>;
105
+ createInitialInvoice(requestParameters: InitialInvoicesApiCreateInitialInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}, any>>;
106
106
  }
@@ -104,9 +104,10 @@ var InitialInvoicesApiAxiosParamCreator = function (configuration) {
104
104
  createInitialInvoice: function (createInvoiceForPolicyRequestDto, authorization, idempotencyKey, 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, idempotencyKeyIsAuth, idempotencyKeyValue, idempotencyKeyKeepEmpty, headersFromBaseOptions;
108
+ var _a, _b;
109
+ return __generator(this, function (_c) {
110
+ switch (_c.label) {
110
111
  case 0:
111
112
  // verify required parameter 'createInvoiceForPolicyRequestDto' is not null or undefined
112
113
  (0, common_1.assertParamExists)('createInitialInvoice', 'createInvoiceForPolicyRequestDto', createInvoiceForPolicyRequestDto);
@@ -121,16 +122,25 @@ var InitialInvoicesApiAxiosParamCreator = function (configuration) {
121
122
  localVarQueryParameter = {};
122
123
  // authentication bearer required
123
124
  // http bearer authentication required
124
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
125
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
126
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
127
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
128
+ ];
125
129
  case 1:
126
130
  // authentication bearer required
127
131
  // http bearer authentication required
128
- _a.sent();
129
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
132
+ _c.sent();
133
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
134
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
135
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
136
+ if (authorizationValue || authorizationKeepEmpty) {
137
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
131
138
  }
132
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
139
+ idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
140
+ idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
141
+ idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !((_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _b === void 0 ? void 0 : _b['X-Emil-Account']);
142
+ if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
143
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
134
144
  }
135
145
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
146
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -223,7 +233,7 @@ var InitialInvoicesApi = /** @class */ (function (_super) {
223
233
  */
224
234
  InitialInvoicesApi.prototype.createInitialInvoice = function (requestParameters, options) {
225
235
  var _this = this;
226
- return (0, exports.InitialInvoicesApiFp)(this.configuration).createInitialInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
236
+ return (0, exports.InitialInvoicesApiFp)(this.configuration).createInitialInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
227
237
  };
228
238
  return InitialInvoicesApi;
229
239
  }(base_1.BaseAPI));