@emilgroup/billing-sdk-node 1.63.1-beta.4 → 1.63.1-beta.41
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.
- package/README.md +2 -2
- package/api/correction-invoices-api.ts +23 -8
- package/api/draft-invoice-api.ts +24 -9
- package/api/estimated-invoices-api.ts +32 -12
- package/api/health-api.ts +1 -1
- package/api/initial-invoices-api.ts +15 -5
- package/api/invoices-api.ts +47 -22
- package/api/policy-billing-api.ts +24 -9
- package/api/recurring-invoices-api.ts +15 -5
- package/api/termination-invoices-api.ts +15 -5
- package/api/withdraw-invoices-api.ts +15 -5
- package/base.ts +4 -0
- package/common.ts +3 -2
- package/dist/api/correction-invoices-api.d.ts +2 -2
- package/dist/api/correction-invoices-api.js +35 -18
- package/dist/api/draft-invoice-api.d.ts +3 -3
- package/dist/api/draft-invoice-api.js +45 -24
- package/dist/api/estimated-invoices-api.d.ts +4 -4
- package/dist/api/estimated-invoices-api.js +60 -32
- package/dist/api/health-api.d.ts +1 -1
- package/dist/api/health-api.js +1 -1
- package/dist/api/initial-invoices-api.d.ts +1 -1
- package/dist/api/initial-invoices-api.js +20 -10
- package/dist/api/invoices-api.d.ts +12 -12
- package/dist/api/invoices-api.js +59 -37
- package/dist/api/policy-billing-api.d.ts +3 -3
- package/dist/api/policy-billing-api.js +41 -23
- package/dist/api/recurring-invoices-api.d.ts +1 -1
- package/dist/api/recurring-invoices-api.js +20 -10
- package/dist/api/termination-invoices-api.d.ts +1 -1
- package/dist/api/termination-invoices-api.js +20 -10
- package/dist/api/withdraw-invoices-api.d.ts +1 -1
- package/dist/api/withdraw-invoices-api.js +20 -10
- package/dist/base.d.ts +1 -0
- package/dist/base.js +3 -0
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -0
- package/dist/models/invoice-item-class.d.ts +12 -0
- package/models/invoice-item-class.ts +12 -0
- package/package.json +2 -2
|
@@ -108,9 +108,10 @@ 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;
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, idempotencyKeyIsAuth, idempotencyKeyValue, idempotencyKeyKeepEmpty, headersFromBaseOptions;
|
|
112
|
+
var _a, _b;
|
|
113
|
+
return __generator(this, function (_c) {
|
|
114
|
+
switch (_c.label) {
|
|
114
115
|
case 0:
|
|
115
116
|
// verify required parameter 'createWithdrawInvoiceRequestDtoRest' is not null or undefined
|
|
116
117
|
(0, common_1.assertParamExists)('createWithdrawInvoice', 'createWithdrawInvoiceRequestDtoRest', createWithdrawInvoiceRequestDtoRest);
|
|
@@ -125,16 +126,25 @@ var WithdrawInvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
125
126
|
localVarQueryParameter = {};
|
|
126
127
|
// authentication bearer required
|
|
127
128
|
// http bearer authentication required
|
|
128
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
129
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
130
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
131
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
132
|
+
];
|
|
129
133
|
case 1:
|
|
130
134
|
// authentication bearer required
|
|
131
135
|
// http bearer authentication required
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
136
|
+
_c.sent();
|
|
137
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
138
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
139
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
140
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
141
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
135
142
|
}
|
|
136
|
-
|
|
137
|
-
|
|
143
|
+
idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
|
|
144
|
+
idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
|
|
145
|
+
idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !((_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _b === void 0 ? void 0 : _b['X-Emil-Account']);
|
|
146
|
+
if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
|
|
147
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
|
|
138
148
|
}
|
|
139
149
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
140
150
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -227,7 +237,7 @@ var WithdrawInvoicesApi = /** @class */ (function (_super) {
|
|
|
227
237
|
*/
|
|
228
238
|
WithdrawInvoicesApi.prototype.createWithdrawInvoice = function (requestParameters, options) {
|
|
229
239
|
var _this = this;
|
|
230
|
-
return (0, exports.WithdrawInvoicesApiFp)(this.configuration).createWithdrawInvoice(requestParameters.createWithdrawInvoiceRequestDtoRest, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
240
|
+
return (0, exports.WithdrawInvoicesApiFp)(this.configuration).createWithdrawInvoice(requestParameters.createWithdrawInvoiceRequestDtoRest, requestParameters.authorization, requestParameters.idempotencyKey, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
231
241
|
};
|
|
232
242
|
return WithdrawInvoicesApi;
|
|
233
243
|
}(base_1.BaseAPI));
|
package/dist/base.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export declare class BaseAPI {
|
|
|
63
63
|
protected configuration: Configuration;
|
|
64
64
|
private username?;
|
|
65
65
|
private password?;
|
|
66
|
+
protected withOwner(options?: AxiosRequestConfig): AxiosRequestConfig;
|
|
66
67
|
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
67
68
|
initialize(env?: Environment, targetWorkspace?: string): Promise<void>;
|
|
68
69
|
private loadCredentials;
|
package/dist/base.js
CHANGED
|
@@ -163,6 +163,9 @@ var BaseAPI = /** @class */ (function () {
|
|
|
163
163
|
}
|
|
164
164
|
this.attachInterceptor(axios);
|
|
165
165
|
}
|
|
166
|
+
BaseAPI.prototype.withOwner = function (options) {
|
|
167
|
+
return __assign({}, options);
|
|
168
|
+
};
|
|
166
169
|
BaseAPI.prototype.initialize = function (env, targetWorkspace) {
|
|
167
170
|
if (env === void 0) { env = Environment.Production; }
|
|
168
171
|
return __awaiter(this, void 0, void 0, function () {
|
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
|
+
"version": "1.63.1-beta.41",
|
|
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.
|
|
21
|
+
"axios": "1.20.0",
|
|
22
22
|
"form-data": "^4.0.0",
|
|
23
23
|
"url": "^0.11.0"
|
|
24
24
|
},
|