@emilgroup/accounting-sdk 1.34.1-beta.9 → 1.34.1-beta.90
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 -1
- package/README.md +2 -2
- package/api/accounting-configs-api.ts +85 -45
- package/api/booking-entries-api.ts +252 -13
- package/api/commission-account-mappings-api.ts +1231 -0
- package/api/financial-accounts-api.ts +56 -31
- 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 +1751 -0
- package/api.ts +4 -0
- package/base.ts +239 -43
- package/common.ts +3 -2
- package/configuration.ts +20 -0
- package/dist/api/accounting-configs-api.d.ts +25 -25
- package/dist/api/accounting-configs-api.js +136 -80
- 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 +1051 -0
- package/dist/api/financial-accounts-api.d.ts +21 -21
- package/dist/api/financial-accounts-api.js +81 -52
- 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 +1493 -0
- package/dist/api.d.ts +2 -0
- package/dist/api.js +2 -0
- package/dist/base.d.ts +26 -0
- package/dist/base.js +243 -60
- 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-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 +34 -0
- package/dist/models/booking-entry-class.js +10 -1
- package/dist/models/commission-account-mapping-class.d.ts +49 -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 +18 -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 -1
- package/dist/models/index.js +33 -1
- 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 +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 +6 -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 +35 -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 +19 -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 -1
- 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 +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 +6 -0
- package/package.json +2 -2
- package/dist/models/get-subledger-settings-response-class.d.ts +0 -36
- package/models/get-subledger-settings-response-class.ts +0 -42
- /package/dist/models/{get-subledger-settings-response-class.js → commission-account-mapping-class.js} +0 -0
|
@@ -103,9 +103,10 @@ 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;
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
107
|
+
var _a;
|
|
108
|
+
return __generator(this, function (_b) {
|
|
109
|
+
switch (_b.label) {
|
|
109
110
|
case 0:
|
|
110
111
|
// verify required parameter 'createBookingEntryRequestDto' is not null or undefined
|
|
111
112
|
(0, common_1.assertParamExists)('createBookingEntry', 'createBookingEntryRequestDto', createBookingEntryRequestDto);
|
|
@@ -120,13 +121,19 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
120
121
|
localVarQueryParameter = {};
|
|
121
122
|
// authentication bearer required
|
|
122
123
|
// http bearer authentication required
|
|
123
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
124
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
125
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
126
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
127
|
+
];
|
|
124
128
|
case 1:
|
|
125
129
|
// authentication bearer required
|
|
126
130
|
// http bearer authentication required
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
131
|
+
_b.sent();
|
|
132
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
133
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
134
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
135
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
136
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
130
137
|
}
|
|
131
138
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
132
139
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -141,6 +148,62 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
141
148
|
});
|
|
142
149
|
});
|
|
143
150
|
},
|
|
151
|
+
/**
|
|
152
|
+
* 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\"
|
|
153
|
+
* @summary Update the create or correct opening balance
|
|
154
|
+
* @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
|
|
155
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
156
|
+
* @param {*} [options] Override http request option.
|
|
157
|
+
* @throws {RequiredError}
|
|
158
|
+
*/
|
|
159
|
+
createOrCorrectOpeningBalance: function (createOrCorrectOpeningBalanceDto, authorization, options) {
|
|
160
|
+
if (options === void 0) { options = {}; }
|
|
161
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
162
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
163
|
+
var _a;
|
|
164
|
+
return __generator(this, function (_b) {
|
|
165
|
+
switch (_b.label) {
|
|
166
|
+
case 0:
|
|
167
|
+
// verify required parameter 'createOrCorrectOpeningBalanceDto' is not null or undefined
|
|
168
|
+
(0, common_1.assertParamExists)('createOrCorrectOpeningBalance', 'createOrCorrectOpeningBalanceDto', createOrCorrectOpeningBalanceDto);
|
|
169
|
+
localVarPath = "/accountingservice/v1/booking-entries/opening-balances";
|
|
170
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
171
|
+
if (configuration) {
|
|
172
|
+
baseOptions = configuration.baseOptions;
|
|
173
|
+
baseAccessToken = configuration.accessToken;
|
|
174
|
+
}
|
|
175
|
+
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
176
|
+
localVarHeaderParameter = {};
|
|
177
|
+
localVarQueryParameter = {};
|
|
178
|
+
// authentication bearer required
|
|
179
|
+
// http bearer authentication required
|
|
180
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
181
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
182
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
183
|
+
];
|
|
184
|
+
case 1:
|
|
185
|
+
// authentication bearer required
|
|
186
|
+
// http bearer authentication required
|
|
187
|
+
_b.sent();
|
|
188
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
189
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
190
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
191
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
192
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
193
|
+
}
|
|
194
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
195
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
196
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
197
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
198
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrCorrectOpeningBalanceDto, localVarRequestOptions, configuration);
|
|
199
|
+
return [2 /*return*/, {
|
|
200
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
201
|
+
options: localVarRequestOptions,
|
|
202
|
+
}];
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
},
|
|
144
207
|
/**
|
|
145
208
|
* This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
|
|
146
209
|
* @summary Retrieve the booking entry
|
|
@@ -153,9 +216,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
153
216
|
getBookingEntry: function (code, expand, authorization, options) {
|
|
154
217
|
if (options === void 0) { options = {}; }
|
|
155
218
|
return __awaiter(_this, void 0, void 0, function () {
|
|
156
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
157
|
-
|
|
158
|
-
|
|
219
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
220
|
+
var _a;
|
|
221
|
+
return __generator(this, function (_b) {
|
|
222
|
+
switch (_b.label) {
|
|
159
223
|
case 0:
|
|
160
224
|
// verify required parameter 'code' is not null or undefined
|
|
161
225
|
(0, common_1.assertParamExists)('getBookingEntry', 'code', code);
|
|
@@ -177,12 +241,15 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
177
241
|
case 1:
|
|
178
242
|
// authentication bearer required
|
|
179
243
|
// http bearer authentication required
|
|
180
|
-
|
|
244
|
+
_b.sent();
|
|
181
245
|
if (expand !== undefined) {
|
|
182
246
|
localVarQueryParameter['expand'] = expand;
|
|
183
247
|
}
|
|
184
|
-
|
|
185
|
-
|
|
248
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
249
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
250
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
251
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
252
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
186
253
|
}
|
|
187
254
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
188
255
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -196,7 +263,7 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
196
263
|
});
|
|
197
264
|
},
|
|
198
265
|
/**
|
|
199
|
-
* This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
|
|
266
|
+
* 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
267
|
* @summary List booking entries
|
|
201
268
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
202
269
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
@@ -212,9 +279,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
212
279
|
listBookingEntries: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
213
280
|
if (options === void 0) { options = {}; }
|
|
214
281
|
return __awaiter(_this, void 0, void 0, function () {
|
|
215
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
216
|
-
|
|
217
|
-
|
|
282
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
283
|
+
var _a;
|
|
284
|
+
return __generator(this, function (_b) {
|
|
285
|
+
switch (_b.label) {
|
|
218
286
|
case 0:
|
|
219
287
|
localVarPath = "/accountingservice/v1/booking-entries";
|
|
220
288
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -231,7 +299,7 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
231
299
|
case 1:
|
|
232
300
|
// authentication bearer required
|
|
233
301
|
// http bearer authentication required
|
|
234
|
-
|
|
302
|
+
_b.sent();
|
|
235
303
|
if (pageSize !== undefined) {
|
|
236
304
|
localVarQueryParameter['pageSize'] = pageSize;
|
|
237
305
|
}
|
|
@@ -253,12 +321,71 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
|
|
|
253
321
|
if (filters !== undefined) {
|
|
254
322
|
localVarQueryParameter['filters'] = filters;
|
|
255
323
|
}
|
|
256
|
-
|
|
257
|
-
|
|
324
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
325
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
326
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
327
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
328
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
329
|
+
}
|
|
330
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
331
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
332
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
333
|
+
return [2 /*return*/, {
|
|
334
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
335
|
+
options: localVarRequestOptions,
|
|
336
|
+
}];
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
});
|
|
340
|
+
},
|
|
341
|
+
/**
|
|
342
|
+
* 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\"
|
|
343
|
+
* @summary Create the booking entry from a source entity
|
|
344
|
+
* @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
|
|
345
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
346
|
+
* @param {*} [options] Override http request option.
|
|
347
|
+
* @throws {RequiredError}
|
|
348
|
+
*/
|
|
349
|
+
postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
|
|
350
|
+
if (options === void 0) { options = {}; }
|
|
351
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
352
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
353
|
+
var _a;
|
|
354
|
+
return __generator(this, function (_b) {
|
|
355
|
+
switch (_b.label) {
|
|
356
|
+
case 0:
|
|
357
|
+
// verify required parameter 'postFinancialEventRequestDto' is not null or undefined
|
|
358
|
+
(0, common_1.assertParamExists)('postFinancialEvent', 'postFinancialEventRequestDto', postFinancialEventRequestDto);
|
|
359
|
+
localVarPath = "/accountingservice/v1/booking-entries/post-financial-event";
|
|
360
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
361
|
+
if (configuration) {
|
|
362
|
+
baseOptions = configuration.baseOptions;
|
|
363
|
+
baseAccessToken = configuration.accessToken;
|
|
364
|
+
}
|
|
365
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
366
|
+
localVarHeaderParameter = {};
|
|
367
|
+
localVarQueryParameter = {};
|
|
368
|
+
// authentication bearer required
|
|
369
|
+
// http bearer authentication required
|
|
370
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
371
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
372
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
373
|
+
];
|
|
374
|
+
case 1:
|
|
375
|
+
// authentication bearer required
|
|
376
|
+
// http bearer authentication required
|
|
377
|
+
_b.sent();
|
|
378
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
379
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
380
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
381
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
382
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
258
383
|
}
|
|
384
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
259
385
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
260
386
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
261
387
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
388
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(postFinancialEventRequestDto, localVarRequestOptions, configuration);
|
|
262
389
|
return [2 /*return*/, {
|
|
263
390
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
264
391
|
options: localVarRequestOptions,
|
|
@@ -298,6 +425,27 @@ var BookingEntriesApiFp = function (configuration) {
|
|
|
298
425
|
});
|
|
299
426
|
});
|
|
300
427
|
},
|
|
428
|
+
/**
|
|
429
|
+
* 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\"
|
|
430
|
+
* @summary Update the create or correct opening balance
|
|
431
|
+
* @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
|
|
432
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
433
|
+
* @param {*} [options] Override http request option.
|
|
434
|
+
* @throws {RequiredError}
|
|
435
|
+
*/
|
|
436
|
+
createOrCorrectOpeningBalance: function (createOrCorrectOpeningBalanceDto, authorization, options) {
|
|
437
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
438
|
+
var localVarAxiosArgs;
|
|
439
|
+
return __generator(this, function (_a) {
|
|
440
|
+
switch (_a.label) {
|
|
441
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto, authorization, options)];
|
|
442
|
+
case 1:
|
|
443
|
+
localVarAxiosArgs = _a.sent();
|
|
444
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
});
|
|
448
|
+
},
|
|
301
449
|
/**
|
|
302
450
|
* This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
|
|
303
451
|
* @summary Retrieve the booking entry
|
|
@@ -321,7 +469,7 @@ var BookingEntriesApiFp = function (configuration) {
|
|
|
321
469
|
});
|
|
322
470
|
},
|
|
323
471
|
/**
|
|
324
|
-
* This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
|
|
472
|
+
* 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
473
|
* @summary List booking entries
|
|
326
474
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
327
475
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
@@ -347,6 +495,27 @@ var BookingEntriesApiFp = function (configuration) {
|
|
|
347
495
|
});
|
|
348
496
|
});
|
|
349
497
|
},
|
|
498
|
+
/**
|
|
499
|
+
* 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\"
|
|
500
|
+
* @summary Create the booking entry from a source entity
|
|
501
|
+
* @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
|
|
502
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
503
|
+
* @param {*} [options] Override http request option.
|
|
504
|
+
* @throws {RequiredError}
|
|
505
|
+
*/
|
|
506
|
+
postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
|
|
507
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
508
|
+
var localVarAxiosArgs;
|
|
509
|
+
return __generator(this, function (_a) {
|
|
510
|
+
switch (_a.label) {
|
|
511
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.postFinancialEvent(postFinancialEventRequestDto, authorization, options)];
|
|
512
|
+
case 1:
|
|
513
|
+
localVarAxiosArgs = _a.sent();
|
|
514
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
515
|
+
}
|
|
516
|
+
});
|
|
517
|
+
});
|
|
518
|
+
},
|
|
350
519
|
};
|
|
351
520
|
};
|
|
352
521
|
exports.BookingEntriesApiFp = BookingEntriesApiFp;
|
|
@@ -368,6 +537,17 @@ var BookingEntriesApiFactory = function (configuration, basePath, axios) {
|
|
|
368
537
|
createBookingEntry: function (createBookingEntryRequestDto, authorization, options) {
|
|
369
538
|
return localVarFp.createBookingEntry(createBookingEntryRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
370
539
|
},
|
|
540
|
+
/**
|
|
541
|
+
* 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\"
|
|
542
|
+
* @summary Update the create or correct opening balance
|
|
543
|
+
* @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
|
|
544
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
545
|
+
* @param {*} [options] Override http request option.
|
|
546
|
+
* @throws {RequiredError}
|
|
547
|
+
*/
|
|
548
|
+
createOrCorrectOpeningBalance: function (createOrCorrectOpeningBalanceDto, authorization, options) {
|
|
549
|
+
return localVarFp.createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
550
|
+
},
|
|
371
551
|
/**
|
|
372
552
|
* This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
|
|
373
553
|
* @summary Retrieve the booking entry
|
|
@@ -381,7 +561,7 @@ var BookingEntriesApiFactory = function (configuration, basePath, axios) {
|
|
|
381
561
|
return localVarFp.getBookingEntry(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
382
562
|
},
|
|
383
563
|
/**
|
|
384
|
-
* This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
|
|
564
|
+
* 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
565
|
* @summary List booking entries
|
|
386
566
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
387
567
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
@@ -397,6 +577,17 @@ var BookingEntriesApiFactory = function (configuration, basePath, axios) {
|
|
|
397
577
|
listBookingEntries: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
398
578
|
return localVarFp.listBookingEntries(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
|
|
399
579
|
},
|
|
580
|
+
/**
|
|
581
|
+
* 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\"
|
|
582
|
+
* @summary Create the booking entry from a source entity
|
|
583
|
+
* @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
|
|
584
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
585
|
+
* @param {*} [options] Override http request option.
|
|
586
|
+
* @throws {RequiredError}
|
|
587
|
+
*/
|
|
588
|
+
postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
|
|
589
|
+
return localVarFp.postFinancialEvent(postFinancialEventRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
590
|
+
},
|
|
400
591
|
};
|
|
401
592
|
};
|
|
402
593
|
exports.BookingEntriesApiFactory = BookingEntriesApiFactory;
|
|
@@ -421,7 +612,19 @@ var BookingEntriesApi = /** @class */ (function (_super) {
|
|
|
421
612
|
*/
|
|
422
613
|
BookingEntriesApi.prototype.createBookingEntry = function (requestParameters, options) {
|
|
423
614
|
var _this = this;
|
|
424
|
-
return (0, exports.BookingEntriesApiFp)(this.configuration).createBookingEntry(requestParameters.createBookingEntryRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
615
|
+
return (0, exports.BookingEntriesApiFp)(this.configuration).createBookingEntry(requestParameters.createBookingEntryRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
616
|
+
};
|
|
617
|
+
/**
|
|
618
|
+
* 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\"
|
|
619
|
+
* @summary Update the create or correct opening balance
|
|
620
|
+
* @param {BookingEntriesApiCreateOrCorrectOpeningBalanceRequest} requestParameters Request parameters.
|
|
621
|
+
* @param {*} [options] Override http request option.
|
|
622
|
+
* @throws {RequiredError}
|
|
623
|
+
* @memberof BookingEntriesApi
|
|
624
|
+
*/
|
|
625
|
+
BookingEntriesApi.prototype.createOrCorrectOpeningBalance = function (requestParameters, options) {
|
|
626
|
+
var _this = this;
|
|
627
|
+
return (0, exports.BookingEntriesApiFp)(this.configuration).createOrCorrectOpeningBalance(requestParameters.createOrCorrectOpeningBalanceDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
425
628
|
};
|
|
426
629
|
/**
|
|
427
630
|
* This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
|
|
@@ -433,10 +636,10 @@ var BookingEntriesApi = /** @class */ (function (_super) {
|
|
|
433
636
|
*/
|
|
434
637
|
BookingEntriesApi.prototype.getBookingEntry = function (requestParameters, options) {
|
|
435
638
|
var _this = this;
|
|
436
|
-
return (0, exports.BookingEntriesApiFp)(this.configuration).getBookingEntry(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
639
|
+
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); });
|
|
437
640
|
};
|
|
438
641
|
/**
|
|
439
|
-
* This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
|
|
642
|
+
* 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
643
|
* @summary List booking entries
|
|
441
644
|
* @param {BookingEntriesApiListBookingEntriesRequest} requestParameters Request parameters.
|
|
442
645
|
* @param {*} [options] Override http request option.
|
|
@@ -446,7 +649,19 @@ var BookingEntriesApi = /** @class */ (function (_super) {
|
|
|
446
649
|
BookingEntriesApi.prototype.listBookingEntries = function (requestParameters, options) {
|
|
447
650
|
var _this = this;
|
|
448
651
|
if (requestParameters === void 0) { requestParameters = {}; }
|
|
449
|
-
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); });
|
|
652
|
+
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); });
|
|
653
|
+
};
|
|
654
|
+
/**
|
|
655
|
+
* 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\"
|
|
656
|
+
* @summary Create the booking entry from a source entity
|
|
657
|
+
* @param {BookingEntriesApiPostFinancialEventRequest} requestParameters Request parameters.
|
|
658
|
+
* @param {*} [options] Override http request option.
|
|
659
|
+
* @throws {RequiredError}
|
|
660
|
+
* @memberof BookingEntriesApi
|
|
661
|
+
*/
|
|
662
|
+
BookingEntriesApi.prototype.postFinancialEvent = function (requestParameters, options) {
|
|
663
|
+
var _this = this;
|
|
664
|
+
return (0, exports.BookingEntriesApiFp)(this.configuration).postFinancialEvent(requestParameters.postFinancialEventRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
450
665
|
};
|
|
451
666
|
return BookingEntriesApi;
|
|
452
667
|
}(base_1.BaseAPI));
|