@emilgroup/billing-sdk-node 1.63.1-beta.34 → 1.63.1-beta.35

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 (35) 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/common.ts +3 -2
  12. package/dist/api/correction-invoices-api.d.ts +2 -2
  13. package/dist/api/correction-invoices-api.js +17 -10
  14. package/dist/api/draft-invoice-api.d.ts +3 -3
  15. package/dist/api/draft-invoice-api.js +21 -12
  16. package/dist/api/estimated-invoices-api.d.ts +4 -4
  17. package/dist/api/estimated-invoices-api.js +28 -16
  18. package/dist/api/health-api.d.ts +1 -1
  19. package/dist/api/initial-invoices-api.d.ts +1 -1
  20. package/dist/api/initial-invoices-api.js +10 -6
  21. package/dist/api/invoices-api.d.ts +4 -4
  22. package/dist/api/invoices-api.js +22 -15
  23. package/dist/api/policy-billing-api.d.ts +3 -3
  24. package/dist/api/policy-billing-api.js +18 -11
  25. package/dist/api/recurring-invoices-api.d.ts +1 -1
  26. package/dist/api/recurring-invoices-api.js +10 -6
  27. package/dist/api/termination-invoices-api.d.ts +1 -1
  28. package/dist/api/termination-invoices-api.js +10 -6
  29. package/dist/api/withdraw-invoices-api.d.ts +1 -1
  30. package/dist/api/withdraw-invoices-api.js +10 -6
  31. package/dist/common.d.ts +1 -1
  32. package/dist/common.js +1 -0
  33. package/dist/models/invoice-item-class.d.ts +6 -0
  34. package/models/invoice-item-class.ts +6 -0
  35. package/package.json +2 -2
@@ -107,7 +107,7 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
107
107
  createCustomEstimatedInvoice: function (createCustomEstimatedInvoiceRequestDto, authorization, options) {
108
108
  if (options === void 0) { options = {}; }
109
109
  return __awaiter(_this, void 0, void 0, function () {
110
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
111
111
  return __generator(this, function (_a) {
112
112
  switch (_a.label) {
113
113
  case 0:
@@ -124,13 +124,16 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
124
124
  localVarQueryParameter = {};
125
125
  // authentication bearer required
126
126
  // http bearer authentication required
127
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
128
+ // Only Authorization falls back to the configured token; an empty value is never sent.
129
+ ];
128
130
  case 1:
129
131
  // authentication bearer required
130
132
  // http bearer authentication required
131
133
  _a.sent();
132
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
135
+ if (authorizationValue) {
136
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
134
137
  }
135
138
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
139
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -156,7 +159,7 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
156
159
  createEstimatedInvoice: function (createEstimatedInvoiceRequestDto, authorization, options) {
157
160
  if (options === void 0) { options = {}; }
158
161
  return __awaiter(_this, void 0, void 0, function () {
159
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
162
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
160
163
  return __generator(this, function (_a) {
161
164
  switch (_a.label) {
162
165
  case 0:
@@ -173,13 +176,16 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
173
176
  localVarQueryParameter = {};
174
177
  // authentication bearer required
175
178
  // http bearer authentication required
176
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
179
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
180
+ // Only Authorization falls back to the configured token; an empty value is never sent.
181
+ ];
177
182
  case 1:
178
183
  // authentication bearer required
179
184
  // http bearer authentication required
180
185
  _a.sent();
181
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
182
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
186
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
187
+ if (authorizationValue) {
188
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
183
189
  }
184
190
  localVarHeaderParameter['Content-Type'] = 'application/json';
185
191
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -205,7 +211,7 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
205
211
  createEstimatedInvoiceFromInterval: function (createEstimatedInvoiceForIntervalRequestDto, authorization, options) {
206
212
  if (options === void 0) { options = {}; }
207
213
  return __awaiter(_this, void 0, void 0, function () {
208
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
214
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
209
215
  return __generator(this, function (_a) {
210
216
  switch (_a.label) {
211
217
  case 0:
@@ -222,13 +228,16 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
222
228
  localVarQueryParameter = {};
223
229
  // authentication bearer required
224
230
  // http bearer authentication required
225
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
231
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
232
+ // Only Authorization falls back to the configured token; an empty value is never sent.
233
+ ];
226
234
  case 1:
227
235
  // authentication bearer required
228
236
  // http bearer authentication required
229
237
  _a.sent();
230
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
238
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
239
+ if (authorizationValue) {
240
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
232
241
  }
233
242
  localVarHeaderParameter['Content-Type'] = 'application/json';
234
243
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -255,7 +264,7 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
255
264
  createProductEstimatedInvoice: function (productSlug, createProductEstimatedInvoiceRequestDto, authorization, options) {
256
265
  if (options === void 0) { options = {}; }
257
266
  return __awaiter(_this, void 0, void 0, function () {
258
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
267
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
259
268
  return __generator(this, function (_a) {
260
269
  switch (_a.label) {
261
270
  case 0:
@@ -275,13 +284,16 @@ var EstimatedInvoicesApiAxiosParamCreator = function (configuration) {
275
284
  localVarQueryParameter = {};
276
285
  // authentication bearer required
277
286
  // http bearer authentication required
278
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
287
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
288
+ // Only Authorization falls back to the configured token; an empty value is never sent.
289
+ ];
279
290
  case 1:
280
291
  // authentication bearer required
281
292
  // http bearer authentication required
282
293
  _a.sent();
283
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
284
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
294
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
295
+ if (authorizationValue) {
296
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
285
297
  }
286
298
  localVarHeaderParameter['Content-Type'] = 'application/json';
287
299
  (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
  }
@@ -108,7 +108,7 @@ var InitialInvoicesApiAxiosParamCreator = function (configuration) {
108
108
  createInitialInvoice: function (createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options) {
109
109
  if (options === void 0) { options = {}; }
110
110
  return __awaiter(_this, void 0, void 0, function () {
111
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, idempotencyKeyValue, headersFromBaseOptions;
112
112
  return __generator(this, function (_a) {
113
113
  switch (_a.label) {
114
114
  case 0:
@@ -125,16 +125,20 @@ var InitialInvoicesApiAxiosParamCreator = function (configuration) {
125
125
  localVarQueryParameter = {};
126
126
  // authentication bearer required
127
127
  // http bearer authentication required
128
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
129
+ // Only Authorization falls back to the configured token; an empty value is never sent.
130
+ ];
129
131
  case 1:
130
132
  // authentication bearer required
131
133
  // http bearer authentication required
132
134
  _a.sent();
133
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
134
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
135
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
136
+ if (authorizationValue) {
137
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
135
138
  }
136
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
137
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
139
+ idempotencyKeyValue = 'Idempotency-Key'.toLowerCase() === 'authorization' ? (idempotencyKey || baseAccessToken) : idempotencyKey;
140
+ if (idempotencyKeyValue) {
141
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
138
142
  }
139
143
  localVarHeaderParameter['Content-Type'] = 'application/json';
140
144
  (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
  }
@@ -108,7 +108,7 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
108
108
  createInvoice: function (createInvoiceRequestDto, authorization, idempotencyKey, options) {
109
109
  if (options === void 0) { options = {}; }
110
110
  return __awaiter(_this, void 0, void 0, function () {
111
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, idempotencyKeyValue, headersFromBaseOptions;
112
112
  return __generator(this, function (_a) {
113
113
  switch (_a.label) {
114
114
  case 0:
@@ -125,16 +125,20 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
125
125
  localVarQueryParameter = {};
126
126
  // authentication bearer required
127
127
  // http bearer authentication required
128
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
129
+ // Only Authorization falls back to the configured token; an empty value is never sent.
130
+ ];
129
131
  case 1:
130
132
  // authentication bearer required
131
133
  // http bearer authentication required
132
134
  _a.sent();
133
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
134
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
135
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
136
+ if (authorizationValue) {
137
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
135
138
  }
136
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
137
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
139
+ idempotencyKeyValue = 'Idempotency-Key'.toLowerCase() === 'authorization' ? (idempotencyKey || baseAccessToken) : idempotencyKey;
140
+ if (idempotencyKeyValue) {
141
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
138
142
  }
139
143
  localVarHeaderParameter['Content-Type'] = 'application/json';
140
144
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -161,7 +165,7 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
161
165
  getInvoice: function (code, expand, authorization, options) {
162
166
  if (options === void 0) { options = {}; }
163
167
  return __awaiter(_this, void 0, void 0, function () {
164
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
168
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
165
169
  return __generator(this, function (_a) {
166
170
  switch (_a.label) {
167
171
  case 0:
@@ -189,8 +193,9 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
189
193
  if (expand !== undefined) {
190
194
  localVarQueryParameter['expand'] = expand;
191
195
  }
192
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
193
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
196
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
197
+ if (authorizationValue) {
198
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
194
199
  }
195
200
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
196
201
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -220,7 +225,7 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
220
225
  listInvoices: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
221
226
  if (options === void 0) { options = {}; }
222
227
  return __awaiter(_this, void 0, void 0, function () {
223
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
228
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
224
229
  return __generator(this, function (_a) {
225
230
  switch (_a.label) {
226
231
  case 0:
@@ -261,8 +266,9 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
261
266
  if (filters !== undefined) {
262
267
  localVarQueryParameter['filters'] = filters;
263
268
  }
264
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
265
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
269
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
270
+ if (authorizationValue) {
271
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
266
272
  }
267
273
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
268
274
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -293,7 +299,7 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
293
299
  listPoliciesBillingDates: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
294
300
  if (options === void 0) { options = {}; }
295
301
  return __awaiter(_this, void 0, void 0, function () {
296
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
302
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
297
303
  return __generator(this, function (_a) {
298
304
  switch (_a.label) {
299
305
  case 0:
@@ -334,8 +340,9 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
334
340
  if (filters !== undefined) {
335
341
  localVarQueryParameter['filters'] = filters;
336
342
  }
337
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
338
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
343
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
344
+ if (authorizationValue) {
345
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
339
346
  }
340
347
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
341
348
  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
  }
@@ -107,7 +107,7 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
107
107
  createPolicyBilling: function (createPolicyBillingRequestDto, authorization, options) {
108
108
  if (options === void 0) { options = {}; }
109
109
  return __awaiter(_this, void 0, void 0, function () {
110
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
111
111
  return __generator(this, function (_a) {
112
112
  switch (_a.label) {
113
113
  case 0:
@@ -124,13 +124,16 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
124
124
  localVarQueryParameter = {};
125
125
  // authentication bearer required
126
126
  // http bearer authentication required
127
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
128
+ // Only Authorization falls back to the configured token; an empty value is never sent.
129
+ ];
128
130
  case 1:
129
131
  // authentication bearer required
130
132
  // http bearer authentication required
131
133
  _a.sent();
132
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
135
+ if (authorizationValue) {
136
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
134
137
  }
135
138
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
139
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -162,7 +165,7 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
162
165
  listPoliciesBillings: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
163
166
  if (options === void 0) { options = {}; }
164
167
  return __awaiter(_this, void 0, void 0, function () {
165
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
168
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
166
169
  return __generator(this, function (_a) {
167
170
  switch (_a.label) {
168
171
  case 0:
@@ -203,8 +206,9 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
203
206
  if (filters !== undefined) {
204
207
  localVarQueryParameter['filters'] = filters;
205
208
  }
206
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
207
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
209
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
210
+ if (authorizationValue) {
211
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
208
212
  }
209
213
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
210
214
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -229,7 +233,7 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
229
233
  updatePolicyBilling: function (code, updatePolicyBillingRequestDto, authorization, options) {
230
234
  if (options === void 0) { options = {}; }
231
235
  return __awaiter(_this, void 0, void 0, function () {
232
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
236
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
233
237
  return __generator(this, function (_a) {
234
238
  switch (_a.label) {
235
239
  case 0:
@@ -249,13 +253,16 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
249
253
  localVarQueryParameter = {};
250
254
  // authentication bearer required
251
255
  // http bearer authentication required
252
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
256
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
257
+ // Only Authorization falls back to the configured token; an empty value is never sent.
258
+ ];
253
259
  case 1:
254
260
  // authentication bearer required
255
261
  // http bearer authentication required
256
262
  _a.sent();
257
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
258
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
263
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
264
+ if (authorizationValue) {
265
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
259
266
  }
260
267
  localVarHeaderParameter['Content-Type'] = 'application/json';
261
268
  (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
  }
@@ -108,7 +108,7 @@ var RecurringInvoicesApiAxiosParamCreator = function (configuration) {
108
108
  createRecurringInvoice: function (createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options) {
109
109
  if (options === void 0) { options = {}; }
110
110
  return __awaiter(_this, void 0, void 0, function () {
111
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, idempotencyKeyValue, headersFromBaseOptions;
112
112
  return __generator(this, function (_a) {
113
113
  switch (_a.label) {
114
114
  case 0:
@@ -125,16 +125,20 @@ var RecurringInvoicesApiAxiosParamCreator = function (configuration) {
125
125
  localVarQueryParameter = {};
126
126
  // authentication bearer required
127
127
  // http bearer authentication required
128
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
129
+ // Only Authorization falls back to the configured token; an empty value is never sent.
130
+ ];
129
131
  case 1:
130
132
  // authentication bearer required
131
133
  // http bearer authentication required
132
134
  _a.sent();
133
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
134
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
135
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
136
+ if (authorizationValue) {
137
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
135
138
  }
136
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
137
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
139
+ idempotencyKeyValue = 'Idempotency-Key'.toLowerCase() === 'authorization' ? (idempotencyKey || baseAccessToken) : idempotencyKey;
140
+ if (idempotencyKeyValue) {
141
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
138
142
  }
139
143
  localVarHeaderParameter['Content-Type'] = 'application/json';
140
144
  (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
  }
@@ -108,7 +108,7 @@ var TerminationInvoicesApiAxiosParamCreator = function (configuration) {
108
108
  createTerminationInvoice: function (createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options) {
109
109
  if (options === void 0) { options = {}; }
110
110
  return __awaiter(_this, void 0, void 0, function () {
111
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, idempotencyKeyValue, headersFromBaseOptions;
112
112
  return __generator(this, function (_a) {
113
113
  switch (_a.label) {
114
114
  case 0:
@@ -125,16 +125,20 @@ var TerminationInvoicesApiAxiosParamCreator = function (configuration) {
125
125
  localVarQueryParameter = {};
126
126
  // authentication bearer required
127
127
  // http bearer authentication required
128
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
129
+ // Only Authorization falls back to the configured token; an empty value is never sent.
130
+ ];
129
131
  case 1:
130
132
  // authentication bearer required
131
133
  // http bearer authentication required
132
134
  _a.sent();
133
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
134
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
135
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
136
+ if (authorizationValue) {
137
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
135
138
  }
136
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
137
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
139
+ idempotencyKeyValue = 'Idempotency-Key'.toLowerCase() === 'authorization' ? (idempotencyKey || baseAccessToken) : idempotencyKey;
140
+ if (idempotencyKeyValue) {
141
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
138
142
  }
139
143
  localVarHeaderParameter['Content-Type'] = 'application/json';
140
144
  (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
  }
@@ -108,7 +108,7 @@ var WithdrawInvoicesApiAxiosParamCreator = function (configuration) {
108
108
  createWithdrawInvoice: function (createWithdrawInvoiceRequestDtoRest, authorization, idempotencyKey, options) {
109
109
  if (options === void 0) { options = {}; }
110
110
  return __awaiter(_this, void 0, void 0, function () {
111
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, idempotencyKeyValue, headersFromBaseOptions;
112
112
  return __generator(this, function (_a) {
113
113
  switch (_a.label) {
114
114
  case 0:
@@ -125,16 +125,20 @@ var WithdrawInvoicesApiAxiosParamCreator = function (configuration) {
125
125
  localVarQueryParameter = {};
126
126
  // authentication bearer required
127
127
  // http bearer authentication required
128
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
129
+ // Only Authorization falls back to the configured token; an empty value is never sent.
130
+ ];
129
131
  case 1:
130
132
  // authentication bearer required
131
133
  // http bearer authentication required
132
134
  _a.sent();
133
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
134
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
135
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
136
+ if (authorizationValue) {
137
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
135
138
  }
136
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
137
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
139
+ idempotencyKeyValue = 'Idempotency-Key'.toLowerCase() === 'authorization' ? (idempotencyKey || baseAccessToken) : idempotencyKey;
140
+ if (idempotencyKeyValue) {
141
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
138
142
  }
139
143
  localVarHeaderParameter['Content-Type'] = 'application/json';
140
144
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
package/dist/common.d.ts CHANGED
@@ -63,7 +63,7 @@ export declare const toPathString: (url: URL) => string;
63
63
  *
64
64
  * @export
65
65
  */
66
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any, {}>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
66
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any, {}, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
67
67
  /**
68
68
  * EMIL BillingService
69
69
  * The EMIL BillingService API description
package/dist/common.js CHANGED
@@ -234,6 +234,7 @@ exports.toPathString = toPathString;
234
234
  * @export
235
235
  */
236
236
  var createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
237
+ // Typed by hand: since axios 1.20, request() returns an internal axios type that SDK declarations cannot name.
237
238
  return function (axios, basePath) {
238
239
  if (axios === void 0) { axios = globalAxios; }
239
240
  if (basePath === void 0) { basePath = BASE_PATH; }
@@ -33,6 +33,12 @@ export interface InvoiceItemClass {
33
33
  * @memberof InvoiceItemClass
34
34
  */
35
35
  'premiumFormulaCode'?: string;
36
+ /**
37
+ * Unique identifier of the original invoice that this object belongs to.
38
+ * @type {string}
39
+ * @memberof InvoiceItemClass
40
+ */
41
+ 'reversedInvoiceCode'?: string;
36
42
  /**
37
43
  * Product name.
38
44
  * @type {string}
@@ -38,6 +38,12 @@ export interface InvoiceItemClass {
38
38
  * @memberof InvoiceItemClass
39
39
  */
40
40
  'premiumFormulaCode'?: string;
41
+ /**
42
+ * Unique identifier of the original invoice that this object belongs to.
43
+ * @type {string}
44
+ * @memberof InvoiceItemClass
45
+ */
46
+ 'reversedInvoiceCode'?: string;
41
47
  /**
42
48
  * Product name.
43
49
  * @type {string}