@emilgroup/accounting-sdk-node 1.32.1-beta.0 → 1.32.1-beta.100
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/.openapi-generator/FILES +37 -0
- package/README.md +2 -2
- package/api/accounting-configs-api.ts +158 -28
- package/api/booking-entries-api.ts +252 -13
- package/api/commission-account-mappings-api.ts +1235 -0
- package/api/financial-accounts-api.ts +169 -24
- package/api/financial-transactions-api.ts +16 -6
- package/api/health-api.ts +1 -1
- package/api/number-ranges-api.ts +32 -12
- package/api/personal-accounts-api.ts +32 -12
- package/api/product-account-mappings-api.ts +1755 -0
- package/api.ts +4 -0
- package/base.ts +4 -0
- package/common.ts +3 -2
- package/dist/api/accounting-configs-api.d.ts +54 -7
- package/dist/api/accounting-configs-api.js +206 -63
- package/dist/api/booking-entries-api.d.ts +121 -7
- package/dist/api/booking-entries-api.js +241 -26
- package/dist/api/commission-account-mappings-api.d.ts +685 -0
- package/dist/api/commission-account-mappings-api.js +1055 -0
- package/dist/api/financial-accounts-api.d.ts +82 -16
- package/dist/api/financial-accounts-api.js +168 -40
- package/dist/api/financial-transactions-api.d.ts +2 -2
- package/dist/api/financial-transactions-api.js +22 -14
- package/dist/api/health-api.d.ts +1 -1
- package/dist/api/health-api.js +1 -1
- package/dist/api/number-ranges-api.d.ts +4 -4
- package/dist/api/number-ranges-api.js +52 -30
- package/dist/api/personal-accounts-api.d.ts +4 -4
- package/dist/api/personal-accounts-api.js +52 -30
- package/dist/api/product-account-mappings-api.d.ts +972 -0
- package/dist/api/product-account-mappings-api.js +1497 -0
- package/dist/api.d.ts +2 -0
- package/dist/api.js +2 -0
- 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/account-mapping-class.d.ts +2 -0
- package/dist/models/account-mapping-class.js +3 -1
- package/dist/models/accounting-config-class.d.ts +11 -0
- package/dist/models/accounting-config-class.js +5 -0
- package/dist/models/accounting-config-data-class.d.ts +7 -0
- package/dist/models/accounting-config-data-dto-default-account-mappings.d.ts +8 -0
- package/dist/models/accounting-config-data-dto-default-account-mappings.js +3 -1
- package/dist/models/accounting-config-data-dto.d.ts +7 -0
- package/dist/models/booking-entry-class.d.ts +35 -0
- package/dist/models/booking-entry-class.js +11 -1
- package/dist/models/commission-account-mapping-class.d.ts +49 -0
- package/dist/models/commission-account-mapping-class.js +15 -0
- package/dist/models/commission-agreement-account-mapping-detail-class.d.ts +44 -0
- package/dist/models/commission-agreement-account-mapping-detail-class.js +15 -0
- package/dist/models/commission-agreement-partner-class.d.ts +30 -0
- package/dist/models/commission-agreement-partner-class.js +15 -0
- package/dist/models/commission-agreement-with-account-mapping-class.d.ts +43 -0
- package/dist/models/commission-agreement-with-account-mapping-class.js +15 -0
- package/dist/models/commission-type-account-mapping-class.d.ts +31 -0
- package/dist/models/commission-type-account-mapping-class.js +15 -0
- package/dist/models/create-booking-entry-request-dto.d.ts +22 -0
- package/dist/models/create-booking-entry-request-dto.js +10 -0
- package/dist/models/create-financial-account-request-dto.d.ts +14 -0
- package/dist/models/create-financial-account-request-dto.js +3 -1
- package/dist/models/create-or-correct-opening-balance-dto.d.ts +25 -0
- package/dist/models/create-or-correct-opening-balance-dto.js +15 -0
- package/dist/models/create-or-correct-opening-balance-response-class.d.ts +25 -0
- package/dist/models/create-or-correct-opening-balance-response-class.js +15 -0
- package/dist/models/financial-account-class.d.ts +30 -1
- package/dist/models/financial-account-class.js +5 -1
- package/dist/models/financial-transaction-class.d.ts +6 -0
- package/dist/models/financial-transaction-data-dto.d.ts +7 -0
- package/dist/models/financial-transaction-data-dto.js +1 -0
- package/dist/models/get-activation-snapshot-response-class.d.ts +25 -0
- package/dist/models/get-activation-snapshot-response-class.js +15 -0
- package/dist/models/index.d.ts +35 -0
- package/dist/models/index.js +35 -0
- package/dist/models/list-commission-account-mappings-response-class.d.ts +43 -0
- package/dist/models/list-commission-account-mappings-response-class.js +15 -0
- package/dist/models/list-commission-agreements-with-account-mappings-response-class.d.ts +43 -0
- package/dist/models/list-commission-agreements-with-account-mappings-response-class.js +15 -0
- package/dist/models/list-commission-type-account-mappings-response-class.d.ts +43 -0
- package/dist/models/list-commission-type-account-mappings-response-class.js +15 -0
- package/dist/models/list-product-account-mappings-response-class.d.ts +43 -0
- package/dist/models/list-product-account-mappings-response-class.js +15 -0
- package/dist/models/list-products-with-account-mappings-response-class.d.ts +43 -0
- package/dist/models/list-products-with-account-mappings-response-class.js +15 -0
- package/dist/models/opening-balance-item-dto.d.ts +41 -0
- package/dist/models/opening-balance-item-dto.js +20 -0
- package/dist/models/personal-account-class.d.ts +6 -0
- package/dist/models/personal-account-range-class.d.ts +42 -0
- package/dist/models/personal-account-range-class.js +21 -0
- package/dist/models/personal-account-range-dto.d.ts +42 -0
- package/dist/models/personal-account-range-dto.js +21 -0
- package/dist/models/post-financial-event-request-dto.d.ts +46 -0
- package/dist/models/post-financial-event-request-dto.js +25 -0
- package/dist/models/post-financial-event-response-class.d.ts +25 -0
- package/dist/models/post-financial-event-response-class.js +15 -0
- package/dist/models/premium-item-account-mapping-class.d.ts +37 -0
- package/dist/models/premium-item-account-mapping-class.js +15 -0
- package/dist/models/product-account-mapping-class.d.ts +61 -0
- package/dist/models/product-account-mapping-class.js +15 -0
- package/dist/models/product-account-mapping-detail-class.d.ts +56 -0
- package/dist/models/product-account-mapping-detail-class.js +15 -0
- package/dist/models/product-risk-carrier-class.d.ts +42 -0
- package/dist/models/product-risk-carrier-class.js +15 -0
- package/dist/models/product-version-account-mapping-detail-class.d.ts +50 -0
- package/dist/models/product-version-account-mapping-detail-class.js +15 -0
- package/dist/models/product-version-with-account-mappings-class.d.ts +42 -0
- package/dist/models/product-version-with-account-mappings-class.js +15 -0
- package/dist/models/product-with-account-mappings-class.d.ts +49 -0
- package/dist/models/product-with-account-mappings-class.js +15 -0
- package/dist/models/put-premium-item-account-body-dto.d.ts +24 -0
- package/dist/models/put-premium-item-account-body-dto.js +15 -0
- package/dist/models/put-product-category-account-body-dto.d.ts +24 -0
- package/dist/models/put-product-category-account-body-dto.js +15 -0
- package/dist/models/put-product-risk-carrier-body-dto.d.ts +24 -0
- package/dist/models/put-product-risk-carrier-body-dto.js +15 -0
- package/dist/models/put-product-version-category-account-body-dto.d.ts +24 -0
- package/dist/models/put-product-version-category-account-body-dto.js +15 -0
- package/dist/models/resolved-account-mapping-class.d.ts +31 -0
- package/dist/models/resolved-account-mapping-class.js +15 -0
- package/dist/models/resolved-commission-account-mapping-class.d.ts +37 -0
- package/dist/models/resolved-commission-account-mapping-class.js +21 -0
- package/dist/models/update-commission-agreement-account-body-dto.d.ts +24 -0
- package/dist/models/update-commission-agreement-account-body-dto.js +15 -0
- package/dist/models/update-commission-type-account-body-dto.d.ts +24 -0
- package/dist/models/update-commission-type-account-body-dto.js +15 -0
- package/dist/models/update-financial-account-body-dto.d.ts +48 -0
- package/dist/models/update-financial-account-body-dto.js +15 -0
- package/dist/models/update-financial-account-response-class.d.ts +25 -0
- package/dist/models/update-financial-account-response-class.js +15 -0
- package/models/account-mapping-class.ts +3 -1
- package/models/accounting-config-class.ts +14 -0
- package/models/accounting-config-data-class.ts +7 -0
- package/models/accounting-config-data-dto-default-account-mappings.ts +9 -1
- package/models/accounting-config-data-dto.ts +7 -0
- package/models/booking-entry-class.ts +36 -0
- package/models/commission-account-mapping-class.ts +55 -0
- package/models/commission-agreement-account-mapping-detail-class.ts +50 -0
- package/models/commission-agreement-partner-class.ts +36 -0
- package/models/commission-agreement-with-account-mapping-class.ts +49 -0
- package/models/commission-type-account-mapping-class.ts +37 -0
- package/models/create-booking-entry-request-dto.ts +25 -0
- package/models/create-financial-account-request-dto.ts +15 -1
- package/models/create-or-correct-opening-balance-dto.ts +31 -0
- package/models/create-or-correct-opening-balance-response-class.ts +31 -0
- package/models/financial-account-class.ts +31 -1
- package/models/financial-transaction-class.ts +6 -0
- package/models/financial-transaction-data-dto.ts +7 -0
- package/models/get-activation-snapshot-response-class.ts +31 -0
- package/models/index.ts +35 -0
- package/models/list-commission-account-mappings-response-class.ts +49 -0
- package/models/list-commission-agreements-with-account-mappings-response-class.ts +49 -0
- package/models/list-commission-type-account-mappings-response-class.ts +49 -0
- package/models/list-product-account-mappings-response-class.ts +49 -0
- package/models/list-products-with-account-mappings-response-class.ts +49 -0
- package/models/opening-balance-item-dto.ts +50 -0
- package/models/personal-account-class.ts +6 -0
- package/models/personal-account-range-class.ts +51 -0
- package/models/personal-account-range-dto.ts +51 -0
- package/models/post-financial-event-request-dto.ts +55 -0
- package/models/post-financial-event-response-class.ts +31 -0
- package/models/premium-item-account-mapping-class.ts +43 -0
- package/models/product-account-mapping-class.ts +67 -0
- package/models/product-account-mapping-detail-class.ts +62 -0
- package/models/product-risk-carrier-class.ts +48 -0
- package/models/product-version-account-mapping-detail-class.ts +56 -0
- package/models/product-version-with-account-mappings-class.ts +48 -0
- package/models/product-with-account-mappings-class.ts +55 -0
- package/models/put-premium-item-account-body-dto.ts +30 -0
- package/models/put-product-category-account-body-dto.ts +30 -0
- package/models/put-product-risk-carrier-body-dto.ts +30 -0
- package/models/put-product-version-category-account-body-dto.ts +30 -0
- package/models/resolved-account-mapping-class.ts +37 -0
- package/models/resolved-commission-account-mapping-class.ts +46 -0
- package/models/update-commission-agreement-account-body-dto.ts +30 -0
- package/models/update-commission-type-account-body-dto.ts +30 -0
- package/models/update-financial-account-body-dto.ts +54 -0
- package/models/update-financial-account-response-class.ts +31 -0
- package/package.json +2 -2
|
@@ -107,9 +107,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
107
107
|
createBookingEntry: function (createBookingEntryRequestDto, 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;
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
111
|
+
var _a;
|
|
112
|
+
return __generator(this, function (_b) {
|
|
113
|
+
switch (_b.label) {
|
|
113
114
|
case 0:
|
|
114
115
|
// verify required parameter 'createBookingEntryRequestDto' is not null or undefined
|
|
115
116
|
(0, common_1.assertParamExists)('createBookingEntry', 'createBookingEntryRequestDto', createBookingEntryRequestDto);
|
|
@@ -124,13 +125,19 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
124
125
|
localVarQueryParameter = {};
|
|
125
126
|
// authentication bearer required
|
|
126
127
|
// http bearer authentication required
|
|
127
|
-
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. Without a session it is sent as before, empty when
|
|
130
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
131
|
+
];
|
|
128
132
|
case 1:
|
|
129
133
|
// authentication bearer required
|
|
130
134
|
// http bearer authentication required
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
135
|
+
_b.sent();
|
|
136
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
137
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
138
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
139
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
140
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
134
141
|
}
|
|
135
142
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
136
143
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -145,6 +152,62 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
145
152
|
});
|
|
146
153
|
});
|
|
147
154
|
},
|
|
155
|
+
/**
|
|
156
|
+
* Enters or restates the confirmed opening balance for one or more accounts: a first-time entry for an account with no opening-balance history yet, a restatement for one that already has some. Each item carries the confirmed balance, not the delta; the service derives the delta itself and books it, per account, against the main-ledger bridge account. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
157
|
+
* @summary Update the create or correct opening balance
|
|
158
|
+
* @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
|
|
159
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
160
|
+
* @param {*} [options] Override http request option.
|
|
161
|
+
* @throws {RequiredError}
|
|
162
|
+
*/
|
|
163
|
+
createOrCorrectOpeningBalance: function (createOrCorrectOpeningBalanceDto, authorization, options) {
|
|
164
|
+
if (options === void 0) { options = {}; }
|
|
165
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
166
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
167
|
+
var _a;
|
|
168
|
+
return __generator(this, function (_b) {
|
|
169
|
+
switch (_b.label) {
|
|
170
|
+
case 0:
|
|
171
|
+
// verify required parameter 'createOrCorrectOpeningBalanceDto' is not null or undefined
|
|
172
|
+
(0, common_1.assertParamExists)('createOrCorrectOpeningBalance', 'createOrCorrectOpeningBalanceDto', createOrCorrectOpeningBalanceDto);
|
|
173
|
+
localVarPath = "/accountingservice/v1/booking-entries/opening-balances";
|
|
174
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
175
|
+
if (configuration) {
|
|
176
|
+
baseOptions = configuration.baseOptions;
|
|
177
|
+
baseAccessToken = configuration.accessToken;
|
|
178
|
+
}
|
|
179
|
+
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
180
|
+
localVarHeaderParameter = {};
|
|
181
|
+
localVarQueryParameter = {};
|
|
182
|
+
// authentication bearer required
|
|
183
|
+
// http bearer authentication required
|
|
184
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
185
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
186
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
187
|
+
];
|
|
188
|
+
case 1:
|
|
189
|
+
// authentication bearer required
|
|
190
|
+
// http bearer authentication required
|
|
191
|
+
_b.sent();
|
|
192
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
193
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
194
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
195
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
196
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
197
|
+
}
|
|
198
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
199
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
200
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
201
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
202
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrCorrectOpeningBalanceDto, localVarRequestOptions, configuration);
|
|
203
|
+
return [2 /*return*/, {
|
|
204
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
205
|
+
options: localVarRequestOptions,
|
|
206
|
+
}];
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
},
|
|
148
211
|
/**
|
|
149
212
|
* This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
|
|
150
213
|
* @summary Retrieve the booking entry
|
|
@@ -157,9 +220,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
157
220
|
getBookingEntry: function (code, expand, authorization, options) {
|
|
158
221
|
if (options === void 0) { options = {}; }
|
|
159
222
|
return __awaiter(_this, void 0, void 0, function () {
|
|
160
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
161
|
-
|
|
162
|
-
|
|
223
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
224
|
+
var _a;
|
|
225
|
+
return __generator(this, function (_b) {
|
|
226
|
+
switch (_b.label) {
|
|
163
227
|
case 0:
|
|
164
228
|
// verify required parameter 'code' is not null or undefined
|
|
165
229
|
(0, common_1.assertParamExists)('getBookingEntry', 'code', code);
|
|
@@ -181,12 +245,15 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
181
245
|
case 1:
|
|
182
246
|
// authentication bearer required
|
|
183
247
|
// http bearer authentication required
|
|
184
|
-
|
|
248
|
+
_b.sent();
|
|
185
249
|
if (expand !== undefined) {
|
|
186
250
|
localVarQueryParameter['expand'] = expand;
|
|
187
251
|
}
|
|
188
|
-
|
|
189
|
-
|
|
252
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
253
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
254
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
255
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
256
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
190
257
|
}
|
|
191
258
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
192
259
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -200,7 +267,7 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
200
267
|
});
|
|
201
268
|
},
|
|
202
269
|
/**
|
|
203
|
-
* This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
|
|
270
|
+
* This endpoint gets booking entries. Without an explicit `order` they come back newest booking date first (`bookingDate:DESC`), with the entry id ascending as the tie-break for same-day bookings. **Required Permissions** \"accounting-management.entries.view\"
|
|
204
271
|
* @summary List booking entries
|
|
205
272
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
206
273
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
@@ -216,9 +283,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
216
283
|
listBookingEntries: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
217
284
|
if (options === void 0) { options = {}; }
|
|
218
285
|
return __awaiter(_this, void 0, void 0, function () {
|
|
219
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
220
|
-
|
|
221
|
-
|
|
286
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
287
|
+
var _a;
|
|
288
|
+
return __generator(this, function (_b) {
|
|
289
|
+
switch (_b.label) {
|
|
222
290
|
case 0:
|
|
223
291
|
localVarPath = "/accountingservice/v1/booking-entries";
|
|
224
292
|
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -235,7 +303,7 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
235
303
|
case 1:
|
|
236
304
|
// authentication bearer required
|
|
237
305
|
// http bearer authentication required
|
|
238
|
-
|
|
306
|
+
_b.sent();
|
|
239
307
|
if (pageSize !== undefined) {
|
|
240
308
|
localVarQueryParameter['pageSize'] = pageSize;
|
|
241
309
|
}
|
|
@@ -257,12 +325,71 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
257
325
|
if (filters !== undefined) {
|
|
258
326
|
localVarQueryParameter['filters'] = filters;
|
|
259
327
|
}
|
|
260
|
-
|
|
261
|
-
|
|
328
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
329
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
330
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
331
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
332
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
333
|
+
}
|
|
334
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
335
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
336
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
337
|
+
return [2 /*return*/, {
|
|
338
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
339
|
+
options: localVarRequestOptions,
|
|
340
|
+
}];
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
},
|
|
345
|
+
/**
|
|
346
|
+
* This endpoint posts the booking entry for an existing invoice, payment, exceeding credit, credit allocation, commission, claim regulation or payment receipt on demand. A credit allocation books nothing, so it always fails with a precondition error. The entity is fetched from the service that owns it and run through the same posting flow its domain event triggers, so the call is idempotent: an entity that is already posted returns its existing booking entry. When the flow deliberately posts nothing (subledger not active for the booking date, non-positive amount) the call fails with a precondition error carrying the reason. **Required Permissions** \"accounting-management.entries.create\"
|
|
347
|
+
* @summary Create the booking entry from a source entity
|
|
348
|
+
* @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
|
|
349
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
350
|
+
* @param {*} [options] Override http request option.
|
|
351
|
+
* @throws {RequiredError}
|
|
352
|
+
*/
|
|
353
|
+
postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
|
|
354
|
+
if (options === void 0) { options = {}; }
|
|
355
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
356
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
357
|
+
var _a;
|
|
358
|
+
return __generator(this, function (_b) {
|
|
359
|
+
switch (_b.label) {
|
|
360
|
+
case 0:
|
|
361
|
+
// verify required parameter 'postFinancialEventRequestDto' is not null or undefined
|
|
362
|
+
(0, common_1.assertParamExists)('postFinancialEvent', 'postFinancialEventRequestDto', postFinancialEventRequestDto);
|
|
363
|
+
localVarPath = "/accountingservice/v1/booking-entries/post-financial-event";
|
|
364
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
365
|
+
if (configuration) {
|
|
366
|
+
baseOptions = configuration.baseOptions;
|
|
367
|
+
baseAccessToken = configuration.accessToken;
|
|
368
|
+
}
|
|
369
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
370
|
+
localVarHeaderParameter = {};
|
|
371
|
+
localVarQueryParameter = {};
|
|
372
|
+
// authentication bearer required
|
|
373
|
+
// http bearer authentication required
|
|
374
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
375
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
376
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
377
|
+
];
|
|
378
|
+
case 1:
|
|
379
|
+
// authentication bearer required
|
|
380
|
+
// http bearer authentication required
|
|
381
|
+
_b.sent();
|
|
382
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
383
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
384
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
385
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
386
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
262
387
|
}
|
|
388
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
263
389
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
264
390
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
265
391
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
392
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(postFinancialEventRequestDto, localVarRequestOptions, configuration);
|
|
266
393
|
return [2 /*return*/, {
|
|
267
394
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
268
395
|
options: localVarRequestOptions,
|
|
@@ -302,6 +429,27 @@ var BookingEntriesApiFp = function (configuration) {
|
|
|
302
429
|
});
|
|
303
430
|
});
|
|
304
431
|
},
|
|
432
|
+
/**
|
|
433
|
+
* Enters or restates the confirmed opening balance for one or more accounts: a first-time entry for an account with no opening-balance history yet, a restatement for one that already has some. Each item carries the confirmed balance, not the delta; the service derives the delta itself and books it, per account, against the main-ledger bridge account. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
434
|
+
* @summary Update the create or correct opening balance
|
|
435
|
+
* @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
|
|
436
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
437
|
+
* @param {*} [options] Override http request option.
|
|
438
|
+
* @throws {RequiredError}
|
|
439
|
+
*/
|
|
440
|
+
createOrCorrectOpeningBalance: function (createOrCorrectOpeningBalanceDto, authorization, options) {
|
|
441
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
442
|
+
var localVarAxiosArgs;
|
|
443
|
+
return __generator(this, function (_a) {
|
|
444
|
+
switch (_a.label) {
|
|
445
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto, authorization, options)];
|
|
446
|
+
case 1:
|
|
447
|
+
localVarAxiosArgs = _a.sent();
|
|
448
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
});
|
|
452
|
+
},
|
|
305
453
|
/**
|
|
306
454
|
* This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
|
|
307
455
|
* @summary Retrieve the booking entry
|
|
@@ -325,7 +473,7 @@ var BookingEntriesApiFp = function (configuration) {
|
|
|
325
473
|
});
|
|
326
474
|
},
|
|
327
475
|
/**
|
|
328
|
-
* This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
|
|
476
|
+
* This endpoint gets booking entries. Without an explicit `order` they come back newest booking date first (`bookingDate:DESC`), with the entry id ascending as the tie-break for same-day bookings. **Required Permissions** \"accounting-management.entries.view\"
|
|
329
477
|
* @summary List booking entries
|
|
330
478
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
331
479
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
@@ -351,6 +499,27 @@ var BookingEntriesApiFp = function (configuration) {
|
|
|
351
499
|
});
|
|
352
500
|
});
|
|
353
501
|
},
|
|
502
|
+
/**
|
|
503
|
+
* This endpoint posts the booking entry for an existing invoice, payment, exceeding credit, credit allocation, commission, claim regulation or payment receipt on demand. A credit allocation books nothing, so it always fails with a precondition error. The entity is fetched from the service that owns it and run through the same posting flow its domain event triggers, so the call is idempotent: an entity that is already posted returns its existing booking entry. When the flow deliberately posts nothing (subledger not active for the booking date, non-positive amount) the call fails with a precondition error carrying the reason. **Required Permissions** \"accounting-management.entries.create\"
|
|
504
|
+
* @summary Create the booking entry from a source entity
|
|
505
|
+
* @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
|
|
506
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
507
|
+
* @param {*} [options] Override http request option.
|
|
508
|
+
* @throws {RequiredError}
|
|
509
|
+
*/
|
|
510
|
+
postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
|
|
511
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
512
|
+
var localVarAxiosArgs;
|
|
513
|
+
return __generator(this, function (_a) {
|
|
514
|
+
switch (_a.label) {
|
|
515
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.postFinancialEvent(postFinancialEventRequestDto, authorization, options)];
|
|
516
|
+
case 1:
|
|
517
|
+
localVarAxiosArgs = _a.sent();
|
|
518
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
519
|
+
}
|
|
520
|
+
});
|
|
521
|
+
});
|
|
522
|
+
},
|
|
354
523
|
};
|
|
355
524
|
};
|
|
356
525
|
exports.BookingEntriesApiFp = BookingEntriesApiFp;
|
|
@@ -372,6 +541,17 @@ var BookingEntriesApiFactory = function (configuration, basePath, axios) {
|
|
|
372
541
|
createBookingEntry: function (createBookingEntryRequestDto, authorization, options) {
|
|
373
542
|
return localVarFp.createBookingEntry(createBookingEntryRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
374
543
|
},
|
|
544
|
+
/**
|
|
545
|
+
* Enters or restates the confirmed opening balance for one or more accounts: a first-time entry for an account with no opening-balance history yet, a restatement for one that already has some. Each item carries the confirmed balance, not the delta; the service derives the delta itself and books it, per account, against the main-ledger bridge account. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
546
|
+
* @summary Update the create or correct opening balance
|
|
547
|
+
* @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
|
|
548
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
549
|
+
* @param {*} [options] Override http request option.
|
|
550
|
+
* @throws {RequiredError}
|
|
551
|
+
*/
|
|
552
|
+
createOrCorrectOpeningBalance: function (createOrCorrectOpeningBalanceDto, authorization, options) {
|
|
553
|
+
return localVarFp.createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
554
|
+
},
|
|
375
555
|
/**
|
|
376
556
|
* This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
|
|
377
557
|
* @summary Retrieve the booking entry
|
|
@@ -385,7 +565,7 @@ var BookingEntriesApiFactory = function (configuration, basePath, axios) {
|
|
|
385
565
|
return localVarFp.getBookingEntry(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
386
566
|
},
|
|
387
567
|
/**
|
|
388
|
-
* This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
|
|
568
|
+
* This endpoint gets booking entries. Without an explicit `order` they come back newest booking date first (`bookingDate:DESC`), with the entry id ascending as the tie-break for same-day bookings. **Required Permissions** \"accounting-management.entries.view\"
|
|
389
569
|
* @summary List booking entries
|
|
390
570
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
391
571
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
@@ -401,6 +581,17 @@ var BookingEntriesApiFactory = function (configuration, basePath, axios) {
|
|
|
401
581
|
listBookingEntries: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
402
582
|
return localVarFp.listBookingEntries(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
|
|
403
583
|
},
|
|
584
|
+
/**
|
|
585
|
+
* This endpoint posts the booking entry for an existing invoice, payment, exceeding credit, credit allocation, commission, claim regulation or payment receipt on demand. A credit allocation books nothing, so it always fails with a precondition error. The entity is fetched from the service that owns it and run through the same posting flow its domain event triggers, so the call is idempotent: an entity that is already posted returns its existing booking entry. When the flow deliberately posts nothing (subledger not active for the booking date, non-positive amount) the call fails with a precondition error carrying the reason. **Required Permissions** \"accounting-management.entries.create\"
|
|
586
|
+
* @summary Create the booking entry from a source entity
|
|
587
|
+
* @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
|
|
588
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
589
|
+
* @param {*} [options] Override http request option.
|
|
590
|
+
* @throws {RequiredError}
|
|
591
|
+
*/
|
|
592
|
+
postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
|
|
593
|
+
return localVarFp.postFinancialEvent(postFinancialEventRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
594
|
+
},
|
|
404
595
|
};
|
|
405
596
|
};
|
|
406
597
|
exports.BookingEntriesApiFactory = BookingEntriesApiFactory;
|
|
@@ -425,7 +616,19 @@ var BookingEntriesApi = /** @class */ (function (_super) {
|
|
|
425
616
|
*/
|
|
426
617
|
BookingEntriesApi.prototype.createBookingEntry = function (requestParameters, options) {
|
|
427
618
|
var _this = this;
|
|
428
|
-
return (0, exports.BookingEntriesApiFp)(this.configuration).createBookingEntry(requestParameters.createBookingEntryRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
619
|
+
return (0, exports.BookingEntriesApiFp)(this.configuration).createBookingEntry(requestParameters.createBookingEntryRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
620
|
+
};
|
|
621
|
+
/**
|
|
622
|
+
* Enters or restates the confirmed opening balance for one or more accounts: a first-time entry for an account with no opening-balance history yet, a restatement for one that already has some. Each item carries the confirmed balance, not the delta; the service derives the delta itself and books it, per account, against the main-ledger bridge account. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
623
|
+
* @summary Update the create or correct opening balance
|
|
624
|
+
* @param {BookingEntriesApiCreateOrCorrectOpeningBalanceRequest} requestParameters Request parameters.
|
|
625
|
+
* @param {*} [options] Override http request option.
|
|
626
|
+
* @throws {RequiredError}
|
|
627
|
+
* @memberof BookingEntriesApi
|
|
628
|
+
*/
|
|
629
|
+
BookingEntriesApi.prototype.createOrCorrectOpeningBalance = function (requestParameters, options) {
|
|
630
|
+
var _this = this;
|
|
631
|
+
return (0, exports.BookingEntriesApiFp)(this.configuration).createOrCorrectOpeningBalance(requestParameters.createOrCorrectOpeningBalanceDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
429
632
|
};
|
|
430
633
|
/**
|
|
431
634
|
* This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
|
|
@@ -437,10 +640,10 @@ var BookingEntriesApi = /** @class */ (function (_super) {
|
|
|
437
640
|
*/
|
|
438
641
|
BookingEntriesApi.prototype.getBookingEntry = function (requestParameters, options) {
|
|
439
642
|
var _this = this;
|
|
440
|
-
return (0, exports.BookingEntriesApiFp)(this.configuration).getBookingEntry(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
643
|
+
return (0, exports.BookingEntriesApiFp)(this.configuration).getBookingEntry(requestParameters.code, requestParameters.expand, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
441
644
|
};
|
|
442
645
|
/**
|
|
443
|
-
* This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
|
|
646
|
+
* This endpoint gets booking entries. Without an explicit `order` they come back newest booking date first (`bookingDate:DESC`), with the entry id ascending as the tie-break for same-day bookings. **Required Permissions** \"accounting-management.entries.view\"
|
|
444
647
|
* @summary List booking entries
|
|
445
648
|
* @param {BookingEntriesApiListBookingEntriesRequest} requestParameters Request parameters.
|
|
446
649
|
* @param {*} [options] Override http request option.
|
|
@@ -450,7 +653,19 @@ var BookingEntriesApi = /** @class */ (function (_super) {
|
|
|
450
653
|
BookingEntriesApi.prototype.listBookingEntries = function (requestParameters, options) {
|
|
451
654
|
var _this = this;
|
|
452
655
|
if (requestParameters === void 0) { requestParameters = {}; }
|
|
453
|
-
return (0, exports.BookingEntriesApiFp)(this.configuration).listBookingEntries(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
656
|
+
return (0, exports.BookingEntriesApiFp)(this.configuration).listBookingEntries(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
657
|
+
};
|
|
658
|
+
/**
|
|
659
|
+
* This endpoint posts the booking entry for an existing invoice, payment, exceeding credit, credit allocation, commission, claim regulation or payment receipt on demand. A credit allocation books nothing, so it always fails with a precondition error. The entity is fetched from the service that owns it and run through the same posting flow its domain event triggers, so the call is idempotent: an entity that is already posted returns its existing booking entry. When the flow deliberately posts nothing (subledger not active for the booking date, non-positive amount) the call fails with a precondition error carrying the reason. **Required Permissions** \"accounting-management.entries.create\"
|
|
660
|
+
* @summary Create the booking entry from a source entity
|
|
661
|
+
* @param {BookingEntriesApiPostFinancialEventRequest} requestParameters Request parameters.
|
|
662
|
+
* @param {*} [options] Override http request option.
|
|
663
|
+
* @throws {RequiredError}
|
|
664
|
+
* @memberof BookingEntriesApi
|
|
665
|
+
*/
|
|
666
|
+
BookingEntriesApi.prototype.postFinancialEvent = function (requestParameters, options) {
|
|
667
|
+
var _this = this;
|
|
668
|
+
return (0, exports.BookingEntriesApiFp)(this.configuration).postFinancialEvent(requestParameters.postFinancialEventRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
454
669
|
};
|
|
455
670
|
return BookingEntriesApi;
|
|
456
671
|
}(base_1.BaseAPI));
|