@emilgroup/billing-sdk 1.63.1-beta.34 → 1.63.1-beta.36

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 (41) hide show
  1. package/README.md +2 -2
  2. package/api/correction-invoices-api.ts +12 -6
  3. package/api/draft-invoice-api.ts +12 -6
  4. package/api/estimated-invoices-api.ts +16 -8
  5. package/api/initial-invoices-api.ts +8 -4
  6. package/api/invoices-api.ts +20 -10
  7. package/api/policy-billing-api.ts +12 -6
  8. package/api/recurring-invoices-api.ts +8 -4
  9. package/api/termination-invoices-api.ts +8 -4
  10. package/api/withdraw-invoices-api.ts +8 -4
  11. package/base.ts +174 -41
  12. package/common.ts +3 -2
  13. package/configuration.ts +20 -0
  14. package/dist/api/correction-invoices-api.d.ts +2 -2
  15. package/dist/api/correction-invoices-api.js +17 -10
  16. package/dist/api/draft-invoice-api.d.ts +3 -3
  17. package/dist/api/draft-invoice-api.js +21 -12
  18. package/dist/api/estimated-invoices-api.d.ts +4 -4
  19. package/dist/api/estimated-invoices-api.js +28 -16
  20. package/dist/api/health-api.d.ts +1 -1
  21. package/dist/api/initial-invoices-api.d.ts +1 -1
  22. package/dist/api/initial-invoices-api.js +10 -6
  23. package/dist/api/invoices-api.d.ts +4 -4
  24. package/dist/api/invoices-api.js +22 -15
  25. package/dist/api/policy-billing-api.d.ts +3 -3
  26. package/dist/api/policy-billing-api.js +18 -11
  27. package/dist/api/recurring-invoices-api.d.ts +1 -1
  28. package/dist/api/recurring-invoices-api.js +10 -6
  29. package/dist/api/termination-invoices-api.d.ts +1 -1
  30. package/dist/api/termination-invoices-api.js +10 -6
  31. package/dist/api/withdraw-invoices-api.d.ts +1 -1
  32. package/dist/api/withdraw-invoices-api.js +10 -6
  33. package/dist/base.d.ts +24 -0
  34. package/dist/base.js +178 -59
  35. package/dist/common.d.ts +1 -1
  36. package/dist/common.js +1 -0
  37. package/dist/configuration.d.ts +17 -0
  38. package/dist/configuration.js +2 -0
  39. package/dist/models/invoice-item-class.d.ts +6 -0
  40. package/models/invoice-item-class.ts +6 -0
  41. package/package.json +2 -2
@@ -103,7 +103,7 @@ 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;
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
107
107
  return __generator(this, function (_a) {
108
108
  switch (_a.label) {
109
109
  case 0:
@@ -120,13 +120,16 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
120
120
  localVarQueryParameter = {};
121
121
  // authentication bearer required
122
122
  // http bearer authentication required
123
- 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; an empty value is never sent.
125
+ ];
124
126
  case 1:
125
127
  // authentication bearer required
126
128
  // http bearer authentication required
127
129
  _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
131
+ if (authorizationValue) {
132
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
130
133
  }
131
134
  localVarHeaderParameter['Content-Type'] = 'application/json';
132
135
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -152,7 +155,7 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
152
155
  createEstimatedInvoice: function (createEstimatedInvoiceRequestDto, authorization, options) {
153
156
  if (options === void 0) { options = {}; }
154
157
  return __awaiter(_this, void 0, void 0, function () {
155
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
158
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
156
159
  return __generator(this, function (_a) {
157
160
  switch (_a.label) {
158
161
  case 0:
@@ -169,13 +172,16 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
169
172
  localVarQueryParameter = {};
170
173
  // authentication bearer required
171
174
  // http bearer authentication required
172
- 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; an empty value is never sent.
177
+ ];
173
178
  case 1:
174
179
  // authentication bearer required
175
180
  // http bearer authentication required
176
181
  _a.sent();
177
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
178
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
182
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
183
+ if (authorizationValue) {
184
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
179
185
  }
180
186
  localVarHeaderParameter['Content-Type'] = 'application/json';
181
187
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -201,7 +207,7 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
201
207
  createEstimatedInvoiceFromInterval: function (createEstimatedInvoiceForIntervalRequestDto, authorization, options) {
202
208
  if (options === void 0) { options = {}; }
203
209
  return __awaiter(_this, void 0, void 0, function () {
204
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
210
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
205
211
  return __generator(this, function (_a) {
206
212
  switch (_a.label) {
207
213
  case 0:
@@ -218,13 +224,16 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
218
224
  localVarQueryParameter = {};
219
225
  // authentication bearer required
220
226
  // http bearer authentication required
221
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
227
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
228
+ // Only Authorization falls back to the configured token; an empty value is never sent.
229
+ ];
222
230
  case 1:
223
231
  // authentication bearer required
224
232
  // http bearer authentication required
225
233
  _a.sent();
226
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
227
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
234
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
235
+ if (authorizationValue) {
236
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
228
237
  }
229
238
  localVarHeaderParameter['Content-Type'] = 'application/json';
230
239
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -251,7 +260,7 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
251
260
  createProductEstimatedInvoice: function (productSlug, createProductEstimatedInvoiceRequestDto, authorization, options) {
252
261
  if (options === void 0) { options = {}; }
253
262
  return __awaiter(_this, void 0, void 0, function () {
254
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
263
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
255
264
  return __generator(this, function (_a) {
256
265
  switch (_a.label) {
257
266
  case 0:
@@ -271,13 +280,16 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
271
280
  localVarQueryParameter = {};
272
281
  // authentication bearer required
273
282
  // http bearer authentication required
274
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
283
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
284
+ // Only Authorization falls back to the configured token; an empty value is never sent.
285
+ ];
275
286
  case 1:
276
287
  // authentication bearer required
277
288
  // http bearer authentication required
278
289
  _a.sent();
279
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
280
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
290
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
291
+ if (authorizationValue) {
292
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
281
293
  }
282
294
  localVarHeaderParameter['Content-Type'] = 'application/json';
283
295
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -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
  }
@@ -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,7 +104,7 @@ 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;
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, idempotencyKeyValue, headersFromBaseOptions;
108
108
  return __generator(this, function (_a) {
109
109
  switch (_a.label) {
110
110
  case 0:
@@ -121,16 +121,20 @@ var InitialInvoicesApiAxiosParamCreator = function (configuration) {
121
121
  localVarQueryParameter = {};
122
122
  // authentication bearer required
123
123
  // http bearer authentication required
124
- 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; an empty value is never sent.
126
+ ];
125
127
  case 1:
126
128
  // authentication bearer required
127
129
  // http bearer authentication required
128
130
  _a.sent();
129
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
132
+ if (authorizationValue) {
133
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
131
134
  }
132
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
135
+ idempotencyKeyValue = 'Idempotency-Key'.toLowerCase() === 'authorization' ? (idempotencyKey || baseAccessToken) : idempotencyKey;
136
+ if (idempotencyKeyValue) {
137
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
134
138
  }
135
139
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
140
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -363,7 +363,7 @@ export declare class InvoicesApi extends BaseAPI {
363
363
  * @throws {RequiredError}
364
364
  * @memberof InvoicesApi
365
365
  */
366
- createInvoice(requestParameters: InvoicesApiCreateInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}>>;
366
+ createInvoice(requestParameters: InvoicesApiCreateInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}, any>>;
367
367
  /**
368
368
  * Gets an invoice. **Required Permissions** \"billing-management.invoices.view\"
369
369
  * @summary Retrieve the invoice
@@ -372,7 +372,7 @@ export declare class InvoicesApi extends BaseAPI {
372
372
  * @throws {RequiredError}
373
373
  * @memberof InvoicesApi
374
374
  */
375
- getInvoice(requestParameters: InvoicesApiGetInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetInvoiceResponseClass, any, {}>>;
375
+ getInvoice(requestParameters: InvoicesApiGetInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetInvoiceResponseClass, any, {}, any>>;
376
376
  /**
377
377
  * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"billing-management.invoices.view\"
378
378
  * @summary List invoices
@@ -381,7 +381,7 @@ export declare class InvoicesApi extends BaseAPI {
381
381
  * @throws {RequiredError}
382
382
  * @memberof InvoicesApi
383
383
  */
384
- listInvoices(requestParameters?: InvoicesApiListInvoicesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListInvoicesResponseClass, any, {}>>;
384
+ listInvoices(requestParameters?: InvoicesApiListInvoicesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListInvoicesResponseClass, any, {}, any>>;
385
385
  /**
386
386
  * Returns a list of policies billing dates you have previously created. The policies billing dates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"billing-management.invoices.view\"
387
387
  * @summary List policies billing dates
@@ -391,5 +391,5 @@ export declare class InvoicesApi extends BaseAPI {
391
391
  * @throws {RequiredError}
392
392
  * @memberof InvoicesApi
393
393
  */
394
- listPoliciesBillingDates(requestParameters?: InvoicesApiListPoliciesBillingDatesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListPoliciesBillingsResponseClass, any, {}>>;
394
+ listPoliciesBillingDates(requestParameters?: InvoicesApiListPoliciesBillingDatesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListPoliciesBillingsResponseClass, any, {}, any>>;
395
395
  }
@@ -104,7 +104,7 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
104
104
  createInvoice: function (createInvoiceRequestDto, 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;
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, idempotencyKeyValue, headersFromBaseOptions;
108
108
  return __generator(this, function (_a) {
109
109
  switch (_a.label) {
110
110
  case 0:
@@ -121,16 +121,20 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
121
121
  localVarQueryParameter = {};
122
122
  // authentication bearer required
123
123
  // http bearer authentication required
124
- 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; an empty value is never sent.
126
+ ];
125
127
  case 1:
126
128
  // authentication bearer required
127
129
  // http bearer authentication required
128
130
  _a.sent();
129
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
132
+ if (authorizationValue) {
133
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
131
134
  }
132
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
135
+ idempotencyKeyValue = 'Idempotency-Key'.toLowerCase() === 'authorization' ? (idempotencyKey || baseAccessToken) : idempotencyKey;
136
+ if (idempotencyKeyValue) {
137
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
134
138
  }
135
139
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
140
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -157,7 +161,7 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
157
161
  getInvoice: function (code, expand, authorization, options) {
158
162
  if (options === void 0) { options = {}; }
159
163
  return __awaiter(_this, void 0, void 0, function () {
160
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
164
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
161
165
  return __generator(this, function (_a) {
162
166
  switch (_a.label) {
163
167
  case 0:
@@ -185,8 +189,9 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
185
189
  if (expand !== undefined) {
186
190
  localVarQueryParameter['expand'] = expand;
187
191
  }
188
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
189
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
192
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
193
+ if (authorizationValue) {
194
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
190
195
  }
191
196
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
192
197
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -216,7 +221,7 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
216
221
  listInvoices: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
217
222
  if (options === void 0) { options = {}; }
218
223
  return __awaiter(_this, void 0, void 0, function () {
219
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
224
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
220
225
  return __generator(this, function (_a) {
221
226
  switch (_a.label) {
222
227
  case 0:
@@ -257,8 +262,9 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
257
262
  if (filters !== undefined) {
258
263
  localVarQueryParameter['filters'] = filters;
259
264
  }
260
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
261
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
265
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
266
+ if (authorizationValue) {
267
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
262
268
  }
263
269
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
264
270
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -289,7 +295,7 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
289
295
  listPoliciesBillingDates: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
290
296
  if (options === void 0) { options = {}; }
291
297
  return __awaiter(_this, void 0, void 0, function () {
292
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
298
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
293
299
  return __generator(this, function (_a) {
294
300
  switch (_a.label) {
295
301
  case 0:
@@ -330,8 +336,9 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
330
336
  if (filters !== undefined) {
331
337
  localVarQueryParameter['filters'] = filters;
332
338
  }
333
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
334
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
339
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
340
+ if (authorizationValue) {
341
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
335
342
  }
336
343
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
337
344
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -250,7 +250,7 @@ export declare class PolicyBillingApi extends BaseAPI {
250
250
  * @throws {RequiredError}
251
251
  * @memberof PolicyBillingApi
252
252
  */
253
- createPolicyBilling(requestParameters: PolicyBillingApiCreatePolicyBillingRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePolicyBillingResponseClass, any, {}>>;
253
+ createPolicyBilling(requestParameters: PolicyBillingApiCreatePolicyBillingRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePolicyBillingResponseClass, any, {}, any>>;
254
254
  /**
255
255
  * Returns a list of policies billings you have previously created. The policies billings are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"billing-management.invoices.view\"
256
256
  * @summary List policies billings
@@ -259,7 +259,7 @@ export declare class PolicyBillingApi extends BaseAPI {
259
259
  * @throws {RequiredError}
260
260
  * @memberof PolicyBillingApi
261
261
  */
262
- listPoliciesBillings(requestParameters?: PolicyBillingApiListPoliciesBillingsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
262
+ listPoliciesBillings(requestParameters?: PolicyBillingApiListPoliciesBillingsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
263
263
  /**
264
264
  * Updates the specified request message by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"billing-management.invoices.update\"
265
265
  * @summary Update the request message
@@ -268,5 +268,5 @@ export declare class PolicyBillingApi extends BaseAPI {
268
268
  * @throws {RequiredError}
269
269
  * @memberof PolicyBillingApi
270
270
  */
271
- updatePolicyBilling(requestParameters: PolicyBillingApiUpdatePolicyBillingRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdatePolicyBillingResponseClass, any, {}>>;
271
+ updatePolicyBilling(requestParameters: PolicyBillingApiUpdatePolicyBillingRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdatePolicyBillingResponseClass, any, {}, any>>;
272
272
  }
@@ -103,7 +103,7 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
103
103
  createPolicyBilling: function (createPolicyBillingRequestDto, 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;
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
107
107
  return __generator(this, function (_a) {
108
108
  switch (_a.label) {
109
109
  case 0:
@@ -120,13 +120,16 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
120
120
  localVarQueryParameter = {};
121
121
  // authentication bearer required
122
122
  // http bearer authentication required
123
- 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; an empty value is never sent.
125
+ ];
124
126
  case 1:
125
127
  // authentication bearer required
126
128
  // http bearer authentication required
127
129
  _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
131
+ if (authorizationValue) {
132
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
130
133
  }
131
134
  localVarHeaderParameter['Content-Type'] = 'application/json';
132
135
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -158,7 +161,7 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
158
161
  listPoliciesBillings: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
159
162
  if (options === void 0) { options = {}; }
160
163
  return __awaiter(_this, void 0, void 0, function () {
161
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
164
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
162
165
  return __generator(this, function (_a) {
163
166
  switch (_a.label) {
164
167
  case 0:
@@ -199,8 +202,9 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
199
202
  if (filters !== undefined) {
200
203
  localVarQueryParameter['filters'] = filters;
201
204
  }
202
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
203
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
205
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
206
+ if (authorizationValue) {
207
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
204
208
  }
205
209
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
206
210
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -225,7 +229,7 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
225
229
  updatePolicyBilling: function (code, updatePolicyBillingRequestDto, authorization, options) {
226
230
  if (options === void 0) { options = {}; }
227
231
  return __awaiter(_this, void 0, void 0, function () {
228
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
232
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
229
233
  return __generator(this, function (_a) {
230
234
  switch (_a.label) {
231
235
  case 0:
@@ -245,13 +249,16 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
245
249
  localVarQueryParameter = {};
246
250
  // authentication bearer required
247
251
  // http bearer authentication required
248
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
252
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
253
+ // Only Authorization falls back to the configured token; an empty value is never sent.
254
+ ];
249
255
  case 1:
250
256
  // authentication bearer required
251
257
  // http bearer authentication required
252
258
  _a.sent();
253
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
254
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
259
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
260
+ if (authorizationValue) {
261
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
255
262
  }
256
263
  localVarHeaderParameter['Content-Type'] = 'application/json';
257
264
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -102,5 +102,5 @@ export declare class RecurringInvoicesApi extends BaseAPI {
102
102
  * @throws {RequiredError}
103
103
  * @memberof RecurringInvoicesApi
104
104
  */
105
- createRecurringInvoice(requestParameters: RecurringInvoicesApiCreateRecurringInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}>>;
105
+ createRecurringInvoice(requestParameters: RecurringInvoicesApiCreateRecurringInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}, any>>;
106
106
  }
@@ -104,7 +104,7 @@ var RecurringInvoicesApiAxiosParamCreator = function (configuration) {
104
104
  createRecurringInvoice: 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;
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, idempotencyKeyValue, headersFromBaseOptions;
108
108
  return __generator(this, function (_a) {
109
109
  switch (_a.label) {
110
110
  case 0:
@@ -121,16 +121,20 @@ var RecurringInvoicesApiAxiosParamCreator = function (configuration) {
121
121
  localVarQueryParameter = {};
122
122
  // authentication bearer required
123
123
  // http bearer authentication required
124
- 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; an empty value is never sent.
126
+ ];
125
127
  case 1:
126
128
  // authentication bearer required
127
129
  // http bearer authentication required
128
130
  _a.sent();
129
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
132
+ if (authorizationValue) {
133
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
131
134
  }
132
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
135
+ idempotencyKeyValue = 'Idempotency-Key'.toLowerCase() === 'authorization' ? (idempotencyKey || baseAccessToken) : idempotencyKey;
136
+ if (idempotencyKeyValue) {
137
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
134
138
  }
135
139
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
140
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -102,5 +102,5 @@ export declare class TerminationInvoicesApi extends BaseAPI {
102
102
  * @throws {RequiredError}
103
103
  * @memberof TerminationInvoicesApi
104
104
  */
105
- createTerminationInvoice(requestParameters: TerminationInvoicesApiCreateTerminationInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}>>;
105
+ createTerminationInvoice(requestParameters: TerminationInvoicesApiCreateTerminationInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}, any>>;
106
106
  }
@@ -104,7 +104,7 @@ var TerminationInvoicesApiAxiosParamCreator = function (configuration) {
104
104
  createTerminationInvoice: 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;
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, idempotencyKeyValue, headersFromBaseOptions;
108
108
  return __generator(this, function (_a) {
109
109
  switch (_a.label) {
110
110
  case 0:
@@ -121,16 +121,20 @@ var TerminationInvoicesApiAxiosParamCreator = function (configuration) {
121
121
  localVarQueryParameter = {};
122
122
  // authentication bearer required
123
123
  // http bearer authentication required
124
- 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; an empty value is never sent.
126
+ ];
125
127
  case 1:
126
128
  // authentication bearer required
127
129
  // http bearer authentication required
128
130
  _a.sent();
129
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
132
+ if (authorizationValue) {
133
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
131
134
  }
132
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
135
+ idempotencyKeyValue = 'Idempotency-Key'.toLowerCase() === 'authorization' ? (idempotencyKey || baseAccessToken) : idempotencyKey;
136
+ if (idempotencyKeyValue) {
137
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
134
138
  }
135
139
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
140
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -102,5 +102,5 @@ export declare class WithdrawInvoicesApi extends BaseAPI {
102
102
  * @throws {RequiredError}
103
103
  * @memberof WithdrawInvoicesApi
104
104
  */
105
- createWithdrawInvoice(requestParameters: WithdrawInvoicesApiCreateWithdrawInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}>>;
105
+ createWithdrawInvoice(requestParameters: WithdrawInvoicesApiCreateWithdrawInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}, any>>;
106
106
  }
@@ -104,7 +104,7 @@ var WithdrawInvoicesApiAxiosParamCreator = function (configuration) {
104
104
  createWithdrawInvoice: function (createWithdrawInvoiceRequestDtoRest, 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;
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, idempotencyKeyValue, headersFromBaseOptions;
108
108
  return __generator(this, function (_a) {
109
109
  switch (_a.label) {
110
110
  case 0:
@@ -121,16 +121,20 @@ var WithdrawInvoicesApiAxiosParamCreator = function (configuration) {
121
121
  localVarQueryParameter = {};
122
122
  // authentication bearer required
123
123
  // http bearer authentication required
124
- 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; an empty value is never sent.
126
+ ];
125
127
  case 1:
126
128
  // authentication bearer required
127
129
  // http bearer authentication required
128
130
  _a.sent();
129
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
132
+ if (authorizationValue) {
133
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
131
134
  }
132
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
135
+ idempotencyKeyValue = 'Idempotency-Key'.toLowerCase() === 'authorization' ? (idempotencyKey || baseAccessToken) : idempotencyKey;
136
+ if (idempotencyKeyValue) {
137
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
134
138
  }
135
139
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
140
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
package/dist/base.d.ts CHANGED
@@ -22,9 +22,19 @@ export declare const COLLECTION_FORMATS: {
22
22
  tsv: string;
23
23
  pipes: string;
24
24
  };
25
+ export interface SessionClass {
26
+ sub: string;
27
+ username?: string;
28
+ email?: string;
29
+ tenantSlug?: string;
30
+ permissions?: string;
31
+ expiresAt?: number;
32
+ }
25
33
  export interface LoginClass {
26
34
  accessToken: string;
27
35
  permissions: string;
36
+ authMode?: string;
37
+ session?: SessionClass;
28
38
  }
29
39
  export interface SwitchWorkspaceRequest {
30
40
  username: string;
@@ -33,6 +43,8 @@ export interface SwitchWorkspaceRequest {
33
43
  export interface SwitchWorkspaceResponseClass {
34
44
  accessToken: string;
35
45
  permissions: string;
46
+ authMode?: string;
47
+ session?: SessionClass;
36
48
  }
37
49
  export declare enum Environment {
38
50
  Production = "https://apiv2.emil.de",
@@ -63,6 +75,18 @@ export declare class BaseAPI {
63
75
  protected configuration: Configuration | undefined;
64
76
  private tokenData?;
65
77
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
78
+ private sessionAccount;
79
+ private authBasePath;
80
+ private usesSession;
81
+ private useSessionAuth;
82
+ private useHeaderAuth;
83
+ private applyTokenReply;
84
+ private sessionHeaders;
85
+ private withCurrentAuth;
86
+ private canRetryWithToken;
87
+ private canResend;
88
+ private switchToToken;
89
+ private retryWithToken;
66
90
  selectEnvironment(env: Environment): void;
67
91
  selectBasePath(path: string): void;
68
92
  getPermissions(): Array<string>;