@emilgroup/billing-sdk-node 1.63.1-beta.3 → 1.63.1-beta.32

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 +28 -18
  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 +12 -12
  22. package/dist/api/invoices-api.js +28 -21
  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 +12 -0
  34. package/models/invoice-item-class.ts +12 -0
  35. package/package.json +2 -2
@@ -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; }
@@ -27,6 +27,18 @@ export interface InvoiceItemClass {
27
27
  * @memberof InvoiceItemClass
28
28
  */
29
29
  'premiumFormulaId': number;
30
+ /**
31
+ * Unique identifier of the premium formula that this object belongs to.
32
+ * @type {string}
33
+ * @memberof InvoiceItemClass
34
+ */
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;
30
42
  /**
31
43
  * Product name.
32
44
  * @type {string}
@@ -32,6 +32,18 @@ export interface InvoiceItemClass {
32
32
  * @memberof InvoiceItemClass
33
33
  */
34
34
  'premiumFormulaId': number;
35
+ /**
36
+ * Unique identifier of the premium formula that this object belongs to.
37
+ * @type {string}
38
+ * @memberof InvoiceItemClass
39
+ */
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;
35
47
  /**
36
48
  * Product name.
37
49
  * @type {string}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/billing-sdk-node",
3
- "version": "1.63.1-beta.3",
3
+ "version": "1.63.1-beta.32",
4
4
  "description": "OpenAPI client for @emilgroup/billing-sdk-node",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -18,7 +18,7 @@
18
18
  "prepare": "npm run build"
19
19
  },
20
20
  "dependencies": {
21
- "axios": "1.18.0",
21
+ "axios": "1.20.0",
22
22
  "form-data": "^4.0.0",
23
23
  "url": "^0.11.0"
24
24
  },