@emilgroup/accounting-sdk 1.34.1-beta.7 → 1.34.1-beta.71
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 +35 -0
- package/README.md +2 -2
- package/api/accounting-configs-api.ts +120 -14
- package/api/booking-entries-api.ts +234 -10
- package/api/commission-account-mappings-api.ts +1207 -0
- package/api/financial-accounts-api.ts +150 -20
- package/api/financial-transactions-api.ts +8 -4
- package/api/number-ranges-api.ts +16 -8
- package/api/personal-accounts-api.ts +16 -8
- package/api/product-account-mappings-api.ts +1715 -0
- package/api.ts +4 -0
- package/base.ts +174 -41
- package/common.ts +3 -2
- package/configuration.ts +20 -0
- package/dist/api/accounting-configs-api.d.ts +54 -7
- package/dist/api/accounting-configs-api.js +139 -28
- package/dist/api/booking-entries-api.d.ts +121 -7
- package/dist/api/booking-entries-api.js +211 -14
- package/dist/api/commission-account-mappings-api.d.ts +685 -0
- package/dist/api/commission-account-mappings-api.js +1022 -0
- package/dist/api/financial-accounts-api.d.ts +82 -16
- package/dist/api/financial-accounts-api.js +134 -24
- package/dist/api/financial-transactions-api.d.ts +2 -2
- package/dist/api/financial-transactions-api.js +8 -6
- package/dist/api/health-api.d.ts +1 -1
- package/dist/api/number-ranges-api.d.ts +4 -4
- package/dist/api/number-ranges-api.js +22 -14
- package/dist/api/personal-accounts-api.d.ts +4 -4
- package/dist/api/personal-accounts-api.js +22 -14
- package/dist/api/product-account-mappings-api.d.ts +972 -0
- package/dist/api/product-account-mappings-api.js +1447 -0
- package/dist/api.d.ts +2 -0
- package/dist/api.js +2 -0
- package/dist/base.d.ts +24 -0
- package/dist/base.js +178 -59
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -0
- package/dist/configuration.d.ts +17 -0
- package/dist/configuration.js +2 -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-dto-default-account-mappings.d.ts +8 -0
- package/dist/models/accounting-config-data-dto-default-account-mappings.js +3 -1
- package/dist/models/booking-entry-class.d.ts +21 -0
- package/dist/models/booking-entry-class.js +9 -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 +21 -0
- package/dist/models/create-booking-entry-request-dto.js +9 -0
- package/dist/models/create-financial-account-request-dto.d.ts +8 -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 +24 -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 +33 -0
- package/dist/models/index.js +33 -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/post-financial-event-request-dto.d.ts +45 -0
- package/dist/models/post-financial-event-request-dto.js +24 -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-dto-default-account-mappings.ts +9 -1
- package/models/booking-entry-class.ts +22 -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 +24 -0
- package/models/create-financial-account-request-dto.ts +9 -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 +25 -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 +33 -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/post-financial-event-request-dto.ts +54 -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
|
@@ -103,7 +103,7 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
103
103
|
createBookingEntry: function (createBookingEntryRequestDto, authorization, options) {
|
|
104
104
|
if (options === void 0) { options = {}; }
|
|
105
105
|
return __awaiter(_this, void 0, void 0, function () {
|
|
106
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
106
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
107
107
|
return __generator(this, function (_a) {
|
|
108
108
|
switch (_a.label) {
|
|
109
109
|
case 0:
|
|
@@ -120,13 +120,16 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
120
120
|
localVarQueryParameter = {};
|
|
121
121
|
// authentication bearer required
|
|
122
122
|
// http bearer authentication required
|
|
123
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
123
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
124
|
+
// Only Authorization falls back to the configured token; an empty value is never sent.
|
|
125
|
+
];
|
|
124
126
|
case 1:
|
|
125
127
|
// authentication bearer required
|
|
126
128
|
// http bearer authentication required
|
|
127
129
|
_a.sent();
|
|
128
|
-
|
|
129
|
-
|
|
130
|
+
authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
|
|
131
|
+
if (authorizationValue) {
|
|
132
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
130
133
|
}
|
|
131
134
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
132
135
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -141,6 +144,58 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
141
144
|
});
|
|
142
145
|
});
|
|
143
146
|
},
|
|
147
|
+
/**
|
|
148
|
+
* 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\"
|
|
149
|
+
* @summary Update the create or correct opening balance
|
|
150
|
+
* @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
|
|
151
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
152
|
+
* @param {*} [options] Override http request option.
|
|
153
|
+
* @throws {RequiredError}
|
|
154
|
+
*/
|
|
155
|
+
createOrCorrectOpeningBalance: function (createOrCorrectOpeningBalanceDto, authorization, options) {
|
|
156
|
+
if (options === void 0) { options = {}; }
|
|
157
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
158
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
159
|
+
return __generator(this, function (_a) {
|
|
160
|
+
switch (_a.label) {
|
|
161
|
+
case 0:
|
|
162
|
+
// verify required parameter 'createOrCorrectOpeningBalanceDto' is not null or undefined
|
|
163
|
+
(0, common_1.assertParamExists)('createOrCorrectOpeningBalance', 'createOrCorrectOpeningBalanceDto', createOrCorrectOpeningBalanceDto);
|
|
164
|
+
localVarPath = "/accountingservice/v1/booking-entries/opening-balances";
|
|
165
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
166
|
+
if (configuration) {
|
|
167
|
+
baseOptions = configuration.baseOptions;
|
|
168
|
+
baseAccessToken = configuration.accessToken;
|
|
169
|
+
}
|
|
170
|
+
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
171
|
+
localVarHeaderParameter = {};
|
|
172
|
+
localVarQueryParameter = {};
|
|
173
|
+
// authentication bearer required
|
|
174
|
+
// http bearer authentication required
|
|
175
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
176
|
+
// Only Authorization falls back to the configured token; an empty value is never sent.
|
|
177
|
+
];
|
|
178
|
+
case 1:
|
|
179
|
+
// authentication bearer required
|
|
180
|
+
// http bearer authentication required
|
|
181
|
+
_a.sent();
|
|
182
|
+
authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
|
|
183
|
+
if (authorizationValue) {
|
|
184
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
185
|
+
}
|
|
186
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
187
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
188
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
189
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
190
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrCorrectOpeningBalanceDto, localVarRequestOptions, configuration);
|
|
191
|
+
return [2 /*return*/, {
|
|
192
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
193
|
+
options: localVarRequestOptions,
|
|
194
|
+
}];
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
},
|
|
144
199
|
/**
|
|
145
200
|
* This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
|
|
146
201
|
* @summary Retrieve the booking entry
|
|
@@ -153,7 +208,7 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
153
208
|
getBookingEntry: function (code, expand, authorization, options) {
|
|
154
209
|
if (options === void 0) { options = {}; }
|
|
155
210
|
return __awaiter(_this, void 0, void 0, function () {
|
|
156
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
211
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
157
212
|
return __generator(this, function (_a) {
|
|
158
213
|
switch (_a.label) {
|
|
159
214
|
case 0:
|
|
@@ -181,8 +236,9 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
181
236
|
if (expand !== undefined) {
|
|
182
237
|
localVarQueryParameter['expand'] = expand;
|
|
183
238
|
}
|
|
184
|
-
|
|
185
|
-
|
|
239
|
+
authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
|
|
240
|
+
if (authorizationValue) {
|
|
241
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
186
242
|
}
|
|
187
243
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
188
244
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -196,7 +252,7 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
196
252
|
});
|
|
197
253
|
},
|
|
198
254
|
/**
|
|
199
|
-
* This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
|
|
255
|
+
* 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\"
|
|
200
256
|
* @summary List booking entries
|
|
201
257
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
202
258
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
@@ -212,7 +268,7 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
212
268
|
listBookingEntries: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
213
269
|
if (options === void 0) { options = {}; }
|
|
214
270
|
return __awaiter(_this, void 0, void 0, function () {
|
|
215
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
271
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
216
272
|
return __generator(this, function (_a) {
|
|
217
273
|
switch (_a.label) {
|
|
218
274
|
case 0:
|
|
@@ -253,12 +309,65 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
253
309
|
if (filters !== undefined) {
|
|
254
310
|
localVarQueryParameter['filters'] = filters;
|
|
255
311
|
}
|
|
256
|
-
|
|
257
|
-
|
|
312
|
+
authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
|
|
313
|
+
if (authorizationValue) {
|
|
314
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
315
|
+
}
|
|
316
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
317
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
318
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
319
|
+
return [2 /*return*/, {
|
|
320
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
321
|
+
options: localVarRequestOptions,
|
|
322
|
+
}];
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
});
|
|
326
|
+
},
|
|
327
|
+
/**
|
|
328
|
+
* This endpoint posts the booking entry for an existing invoice, payment, exceeding credit or credit allocation on demand. 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\"
|
|
329
|
+
* @summary Create the booking entry from a source entity
|
|
330
|
+
* @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
|
|
331
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
332
|
+
* @param {*} [options] Override http request option.
|
|
333
|
+
* @throws {RequiredError}
|
|
334
|
+
*/
|
|
335
|
+
postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
|
|
336
|
+
if (options === void 0) { options = {}; }
|
|
337
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
338
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
339
|
+
return __generator(this, function (_a) {
|
|
340
|
+
switch (_a.label) {
|
|
341
|
+
case 0:
|
|
342
|
+
// verify required parameter 'postFinancialEventRequestDto' is not null or undefined
|
|
343
|
+
(0, common_1.assertParamExists)('postFinancialEvent', 'postFinancialEventRequestDto', postFinancialEventRequestDto);
|
|
344
|
+
localVarPath = "/accountingservice/v1/booking-entries/post-financial-event";
|
|
345
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
346
|
+
if (configuration) {
|
|
347
|
+
baseOptions = configuration.baseOptions;
|
|
348
|
+
baseAccessToken = configuration.accessToken;
|
|
349
|
+
}
|
|
350
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
351
|
+
localVarHeaderParameter = {};
|
|
352
|
+
localVarQueryParameter = {};
|
|
353
|
+
// authentication bearer required
|
|
354
|
+
// http bearer authentication required
|
|
355
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
356
|
+
// Only Authorization falls back to the configured token; an empty value is never sent.
|
|
357
|
+
];
|
|
358
|
+
case 1:
|
|
359
|
+
// authentication bearer required
|
|
360
|
+
// http bearer authentication required
|
|
361
|
+
_a.sent();
|
|
362
|
+
authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
|
|
363
|
+
if (authorizationValue) {
|
|
364
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
258
365
|
}
|
|
366
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
259
367
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
260
368
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
261
369
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
370
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(postFinancialEventRequestDto, localVarRequestOptions, configuration);
|
|
262
371
|
return [2 /*return*/, {
|
|
263
372
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
264
373
|
options: localVarRequestOptions,
|
|
@@ -298,6 +407,27 @@ var BookingEntriesApiFp = function (configuration) {
|
|
|
298
407
|
});
|
|
299
408
|
});
|
|
300
409
|
},
|
|
410
|
+
/**
|
|
411
|
+
* 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\"
|
|
412
|
+
* @summary Update the create or correct opening balance
|
|
413
|
+
* @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
|
|
414
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
415
|
+
* @param {*} [options] Override http request option.
|
|
416
|
+
* @throws {RequiredError}
|
|
417
|
+
*/
|
|
418
|
+
createOrCorrectOpeningBalance: function (createOrCorrectOpeningBalanceDto, authorization, options) {
|
|
419
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
420
|
+
var localVarAxiosArgs;
|
|
421
|
+
return __generator(this, function (_a) {
|
|
422
|
+
switch (_a.label) {
|
|
423
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto, authorization, options)];
|
|
424
|
+
case 1:
|
|
425
|
+
localVarAxiosArgs = _a.sent();
|
|
426
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
});
|
|
430
|
+
},
|
|
301
431
|
/**
|
|
302
432
|
* This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
|
|
303
433
|
* @summary Retrieve the booking entry
|
|
@@ -321,7 +451,7 @@ var BookingEntriesApiFp = function (configuration) {
|
|
|
321
451
|
});
|
|
322
452
|
},
|
|
323
453
|
/**
|
|
324
|
-
* This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
|
|
454
|
+
* 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\"
|
|
325
455
|
* @summary List booking entries
|
|
326
456
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
327
457
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
@@ -347,6 +477,27 @@ var BookingEntriesApiFp = function (configuration) {
|
|
|
347
477
|
});
|
|
348
478
|
});
|
|
349
479
|
},
|
|
480
|
+
/**
|
|
481
|
+
* This endpoint posts the booking entry for an existing invoice, payment, exceeding credit or credit allocation on demand. 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\"
|
|
482
|
+
* @summary Create the booking entry from a source entity
|
|
483
|
+
* @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
|
|
484
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
485
|
+
* @param {*} [options] Override http request option.
|
|
486
|
+
* @throws {RequiredError}
|
|
487
|
+
*/
|
|
488
|
+
postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
|
|
489
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
490
|
+
var localVarAxiosArgs;
|
|
491
|
+
return __generator(this, function (_a) {
|
|
492
|
+
switch (_a.label) {
|
|
493
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.postFinancialEvent(postFinancialEventRequestDto, authorization, options)];
|
|
494
|
+
case 1:
|
|
495
|
+
localVarAxiosArgs = _a.sent();
|
|
496
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
});
|
|
500
|
+
},
|
|
350
501
|
};
|
|
351
502
|
};
|
|
352
503
|
exports.BookingEntriesApiFp = BookingEntriesApiFp;
|
|
@@ -368,6 +519,17 @@ var BookingEntriesApiFactory = function (configuration, basePath, axios) {
|
|
|
368
519
|
createBookingEntry: function (createBookingEntryRequestDto, authorization, options) {
|
|
369
520
|
return localVarFp.createBookingEntry(createBookingEntryRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
370
521
|
},
|
|
522
|
+
/**
|
|
523
|
+
* 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\"
|
|
524
|
+
* @summary Update the create or correct opening balance
|
|
525
|
+
* @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
|
|
526
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
527
|
+
* @param {*} [options] Override http request option.
|
|
528
|
+
* @throws {RequiredError}
|
|
529
|
+
*/
|
|
530
|
+
createOrCorrectOpeningBalance: function (createOrCorrectOpeningBalanceDto, authorization, options) {
|
|
531
|
+
return localVarFp.createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
532
|
+
},
|
|
371
533
|
/**
|
|
372
534
|
* This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
|
|
373
535
|
* @summary Retrieve the booking entry
|
|
@@ -381,7 +543,7 @@ var BookingEntriesApiFactory = function (configuration, basePath, axios) {
|
|
|
381
543
|
return localVarFp.getBookingEntry(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
382
544
|
},
|
|
383
545
|
/**
|
|
384
|
-
* This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
|
|
546
|
+
* 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\"
|
|
385
547
|
* @summary List booking entries
|
|
386
548
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
387
549
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
@@ -397,6 +559,17 @@ var BookingEntriesApiFactory = function (configuration, basePath, axios) {
|
|
|
397
559
|
listBookingEntries: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
398
560
|
return localVarFp.listBookingEntries(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
|
|
399
561
|
},
|
|
562
|
+
/**
|
|
563
|
+
* This endpoint posts the booking entry for an existing invoice, payment, exceeding credit or credit allocation on demand. 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\"
|
|
564
|
+
* @summary Create the booking entry from a source entity
|
|
565
|
+
* @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
|
|
566
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
567
|
+
* @param {*} [options] Override http request option.
|
|
568
|
+
* @throws {RequiredError}
|
|
569
|
+
*/
|
|
570
|
+
postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
|
|
571
|
+
return localVarFp.postFinancialEvent(postFinancialEventRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
572
|
+
},
|
|
400
573
|
};
|
|
401
574
|
};
|
|
402
575
|
exports.BookingEntriesApiFactory = BookingEntriesApiFactory;
|
|
@@ -423,6 +596,18 @@ var BookingEntriesApi = /** @class */ (function (_super) {
|
|
|
423
596
|
var _this = this;
|
|
424
597
|
return (0, exports.BookingEntriesApiFp)(this.configuration).createBookingEntry(requestParameters.createBookingEntryRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
425
598
|
};
|
|
599
|
+
/**
|
|
600
|
+
* 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\"
|
|
601
|
+
* @summary Update the create or correct opening balance
|
|
602
|
+
* @param {BookingEntriesApiCreateOrCorrectOpeningBalanceRequest} requestParameters Request parameters.
|
|
603
|
+
* @param {*} [options] Override http request option.
|
|
604
|
+
* @throws {RequiredError}
|
|
605
|
+
* @memberof BookingEntriesApi
|
|
606
|
+
*/
|
|
607
|
+
BookingEntriesApi.prototype.createOrCorrectOpeningBalance = function (requestParameters, options) {
|
|
608
|
+
var _this = this;
|
|
609
|
+
return (0, exports.BookingEntriesApiFp)(this.configuration).createOrCorrectOpeningBalance(requestParameters.createOrCorrectOpeningBalanceDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
610
|
+
};
|
|
426
611
|
/**
|
|
427
612
|
* This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
|
|
428
613
|
* @summary Retrieve the booking entry
|
|
@@ -436,7 +621,7 @@ var BookingEntriesApi = /** @class */ (function (_super) {
|
|
|
436
621
|
return (0, exports.BookingEntriesApiFp)(this.configuration).getBookingEntry(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
437
622
|
};
|
|
438
623
|
/**
|
|
439
|
-
* This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
|
|
624
|
+
* 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\"
|
|
440
625
|
* @summary List booking entries
|
|
441
626
|
* @param {BookingEntriesApiListBookingEntriesRequest} requestParameters Request parameters.
|
|
442
627
|
* @param {*} [options] Override http request option.
|
|
@@ -448,6 +633,18 @@ var BookingEntriesApi = /** @class */ (function (_super) {
|
|
|
448
633
|
if (requestParameters === void 0) { requestParameters = {}; }
|
|
449
634
|
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); });
|
|
450
635
|
};
|
|
636
|
+
/**
|
|
637
|
+
* This endpoint posts the booking entry for an existing invoice, payment, exceeding credit or credit allocation on demand. 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\"
|
|
638
|
+
* @summary Create the booking entry from a source entity
|
|
639
|
+
* @param {BookingEntriesApiPostFinancialEventRequest} requestParameters Request parameters.
|
|
640
|
+
* @param {*} [options] Override http request option.
|
|
641
|
+
* @throws {RequiredError}
|
|
642
|
+
* @memberof BookingEntriesApi
|
|
643
|
+
*/
|
|
644
|
+
BookingEntriesApi.prototype.postFinancialEvent = function (requestParameters, options) {
|
|
645
|
+
var _this = this;
|
|
646
|
+
return (0, exports.BookingEntriesApiFp)(this.configuration).postFinancialEvent(requestParameters.postFinancialEventRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
647
|
+
};
|
|
451
648
|
return BookingEntriesApi;
|
|
452
649
|
}(base_1.BaseAPI));
|
|
453
650
|
exports.BookingEntriesApi = BookingEntriesApi;
|