@emilgroup/accounting-sdk 1.34.1-beta.27 → 1.34.1-beta.29

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.
@@ -67,6 +67,8 @@ models/list-product-account-mappings-response-class.ts
67
67
  models/list-products-with-account-mappings-response-class.ts
68
68
  models/number-range-class.ts
69
69
  models/personal-account-class.ts
70
+ models/post-financial-event-request-dto.ts
71
+ models/post-financial-event-response-class.ts
70
72
  models/premium-item-account-mapping-class.ts
71
73
  models/product-account-mapping-class.ts
72
74
  models/product-account-mapping-detail-class.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/accounting-sdk@1.34.1-beta.27 --save
20
+ npm install @emilgroup/accounting-sdk@1.34.1-beta.29 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/accounting-sdk@1.34.1-beta.27
24
+ yarn add @emilgroup/accounting-sdk@1.34.1-beta.29
25
25
  ```
26
26
 
27
27
  And then you can import `FinancialAccountsApi`.
@@ -28,6 +28,10 @@ import { CreateBookingEntryResponseClass } from '../models';
28
28
  import { GetBookingEntryResponseClass } from '../models';
29
29
  // @ts-ignore
30
30
  import { ListBookingEntriesResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { PostFinancialEventRequestDto } from '../models';
33
+ // @ts-ignore
34
+ import { PostFinancialEventResponseClass } from '../models';
31
35
  /**
32
36
  * BookingEntriesApi - axios parameter creator
33
37
  * @export
@@ -204,6 +208,53 @@ export const BookingEntriesApiAxiosParamCreator = function (configuration?: Conf
204
208
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
205
209
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
206
210
 
211
+ return {
212
+ url: toPathString(localVarUrlObj),
213
+ options: localVarRequestOptions,
214
+ };
215
+ },
216
+ /**
217
+ * 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\"
218
+ * @summary Create the booking entry from a source entity
219
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
220
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
221
+ * @param {*} [options] Override http request option.
222
+ * @throws {RequiredError}
223
+ */
224
+ postFinancialEvent: async (postFinancialEventRequestDto: PostFinancialEventRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
225
+ // verify required parameter 'postFinancialEventRequestDto' is not null or undefined
226
+ assertParamExists('postFinancialEvent', 'postFinancialEventRequestDto', postFinancialEventRequestDto)
227
+ const localVarPath = `/accountingservice/v1/booking-entries/post-financial-event`;
228
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
229
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
230
+ let baseOptions;
231
+ let baseAccessToken;
232
+ if (configuration) {
233
+ baseOptions = configuration.baseOptions;
234
+ baseAccessToken = configuration.accessToken;
235
+ }
236
+
237
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
238
+ const localVarHeaderParameter = {} as any;
239
+ const localVarQueryParameter = {} as any;
240
+
241
+ // authentication bearer required
242
+ // http bearer authentication required
243
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
244
+
245
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
246
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
247
+ }
248
+
249
+
250
+
251
+ localVarHeaderParameter['Content-Type'] = 'application/json';
252
+
253
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
254
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
255
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
256
+ localVarRequestOptions.data = serializeDataIfNeeded(postFinancialEventRequestDto, localVarRequestOptions, configuration)
257
+
207
258
  return {
208
259
  url: toPathString(localVarUrlObj),
209
260
  options: localVarRequestOptions,
@@ -262,6 +313,18 @@ export const BookingEntriesApiFp = function(configuration?: Configuration) {
262
313
  const localVarAxiosArgs = await localVarAxiosParamCreator.listBookingEntries(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
263
314
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
264
315
  },
316
+ /**
317
+ * 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\"
318
+ * @summary Create the booking entry from a source entity
319
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
320
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
321
+ * @param {*} [options] Override http request option.
322
+ * @throws {RequiredError}
323
+ */
324
+ async postFinancialEvent(postFinancialEventRequestDto: PostFinancialEventRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostFinancialEventResponseClass>> {
325
+ const localVarAxiosArgs = await localVarAxiosParamCreator.postFinancialEvent(postFinancialEventRequestDto, authorization, options);
326
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
327
+ },
265
328
  }
266
329
  };
267
330
 
@@ -312,6 +375,17 @@ export const BookingEntriesApiFactory = function (configuration?: Configuration,
312
375
  listBookingEntries(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListBookingEntriesResponseClass> {
313
376
  return localVarFp.listBookingEntries(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
314
377
  },
378
+ /**
379
+ * 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\"
380
+ * @summary Create the booking entry from a source entity
381
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
382
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
383
+ * @param {*} [options] Override http request option.
384
+ * @throws {RequiredError}
385
+ */
386
+ postFinancialEvent(postFinancialEventRequestDto: PostFinancialEventRequestDto, authorization?: string, options?: any): AxiosPromise<PostFinancialEventResponseClass> {
387
+ return localVarFp.postFinancialEvent(postFinancialEventRequestDto, authorization, options).then((request) => request(axios, basePath));
388
+ },
315
389
  };
316
390
  };
317
391
 
@@ -427,6 +501,27 @@ export interface BookingEntriesApiListBookingEntriesRequest {
427
501
  readonly filters?: string
428
502
  }
429
503
 
504
+ /**
505
+ * Request parameters for postFinancialEvent operation in BookingEntriesApi.
506
+ * @export
507
+ * @interface BookingEntriesApiPostFinancialEventRequest
508
+ */
509
+ export interface BookingEntriesApiPostFinancialEventRequest {
510
+ /**
511
+ *
512
+ * @type {PostFinancialEventRequestDto}
513
+ * @memberof BookingEntriesApiPostFinancialEvent
514
+ */
515
+ readonly postFinancialEventRequestDto: PostFinancialEventRequestDto
516
+
517
+ /**
518
+ * Bearer Token: provided by the login endpoint under the name accessToken.
519
+ * @type {string}
520
+ * @memberof BookingEntriesApiPostFinancialEvent
521
+ */
522
+ readonly authorization?: string
523
+ }
524
+
430
525
  /**
431
526
  * BookingEntriesApi - object-oriented interface
432
527
  * @export
@@ -469,4 +564,16 @@ export class BookingEntriesApi extends BaseAPI {
469
564
  public listBookingEntries(requestParameters: BookingEntriesApiListBookingEntriesRequest = {}, options?: AxiosRequestConfig) {
470
565
  return BookingEntriesApiFp(this.configuration).listBookingEntries(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
471
566
  }
567
+
568
+ /**
569
+ * 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\"
570
+ * @summary Create the booking entry from a source entity
571
+ * @param {BookingEntriesApiPostFinancialEventRequest} requestParameters Request parameters.
572
+ * @param {*} [options] Override http request option.
573
+ * @throws {RequiredError}
574
+ * @memberof BookingEntriesApi
575
+ */
576
+ public postFinancialEvent(requestParameters: BookingEntriesApiPostFinancialEventRequest, options?: AxiosRequestConfig) {
577
+ return BookingEntriesApiFp(this.configuration).postFinancialEvent(requestParameters.postFinancialEventRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
578
+ }
472
579
  }
@@ -16,6 +16,8 @@ import { CreateBookingEntryRequestDto } from '../models';
16
16
  import { CreateBookingEntryResponseClass } from '../models';
17
17
  import { GetBookingEntryResponseClass } from '../models';
18
18
  import { ListBookingEntriesResponseClass } from '../models';
19
+ import { PostFinancialEventRequestDto } from '../models';
20
+ import { PostFinancialEventResponseClass } from '../models';
19
21
  /**
20
22
  * BookingEntriesApi - axios parameter creator
21
23
  * @export
@@ -55,6 +57,15 @@ export declare const BookingEntriesApiAxiosParamCreator: (configuration?: Config
55
57
  * @throws {RequiredError}
56
58
  */
57
59
  listBookingEntries: (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
60
+ /**
61
+ * 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\"
62
+ * @summary Create the booking entry from a source entity
63
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
64
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
65
+ * @param {*} [options] Override http request option.
66
+ * @throws {RequiredError}
67
+ */
68
+ postFinancialEvent: (postFinancialEventRequestDto: PostFinancialEventRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
58
69
  };
59
70
  /**
60
71
  * BookingEntriesApi - functional programming interface
@@ -95,6 +106,15 @@ export declare const BookingEntriesApiFp: (configuration?: Configuration) => {
95
106
  * @throws {RequiredError}
96
107
  */
97
108
  listBookingEntries(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBookingEntriesResponseClass>>;
109
+ /**
110
+ * 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\"
111
+ * @summary Create the booking entry from a source entity
112
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
113
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
114
+ * @param {*} [options] Override http request option.
115
+ * @throws {RequiredError}
116
+ */
117
+ postFinancialEvent(postFinancialEventRequestDto: PostFinancialEventRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostFinancialEventResponseClass>>;
98
118
  };
99
119
  /**
100
120
  * BookingEntriesApi - factory interface
@@ -135,6 +155,15 @@ export declare const BookingEntriesApiFactory: (configuration?: Configuration, b
135
155
  * @throws {RequiredError}
136
156
  */
137
157
  listBookingEntries(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListBookingEntriesResponseClass>;
158
+ /**
159
+ * 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\"
160
+ * @summary Create the booking entry from a source entity
161
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
162
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
163
+ * @param {*} [options] Override http request option.
164
+ * @throws {RequiredError}
165
+ */
166
+ postFinancialEvent(postFinancialEventRequestDto: PostFinancialEventRequestDto, authorization?: string, options?: any): AxiosPromise<PostFinancialEventResponseClass>;
138
167
  };
139
168
  /**
140
169
  * Request parameters for createBookingEntry operation in BookingEntriesApi.
@@ -235,6 +264,25 @@ export interface BookingEntriesApiListBookingEntriesRequest {
235
264
  */
236
265
  readonly filters?: string;
237
266
  }
267
+ /**
268
+ * Request parameters for postFinancialEvent operation in BookingEntriesApi.
269
+ * @export
270
+ * @interface BookingEntriesApiPostFinancialEventRequest
271
+ */
272
+ export interface BookingEntriesApiPostFinancialEventRequest {
273
+ /**
274
+ *
275
+ * @type {PostFinancialEventRequestDto}
276
+ * @memberof BookingEntriesApiPostFinancialEvent
277
+ */
278
+ readonly postFinancialEventRequestDto: PostFinancialEventRequestDto;
279
+ /**
280
+ * Bearer Token: provided by the login endpoint under the name accessToken.
281
+ * @type {string}
282
+ * @memberof BookingEntriesApiPostFinancialEvent
283
+ */
284
+ readonly authorization?: string;
285
+ }
238
286
  /**
239
287
  * BookingEntriesApi - object-oriented interface
240
288
  * @export
@@ -269,4 +317,13 @@ export declare class BookingEntriesApi extends BaseAPI {
269
317
  * @memberof BookingEntriesApi
270
318
  */
271
319
  listBookingEntries(requestParameters?: BookingEntriesApiListBookingEntriesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListBookingEntriesResponseClass, any, {}>>;
320
+ /**
321
+ * 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\"
322
+ * @summary Create the booking entry from a source entity
323
+ * @param {BookingEntriesApiPostFinancialEventRequest} requestParameters Request parameters.
324
+ * @param {*} [options] Override http request option.
325
+ * @throws {RequiredError}
326
+ * @memberof BookingEntriesApi
327
+ */
328
+ postFinancialEvent(requestParameters: BookingEntriesApiPostFinancialEventRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PostFinancialEventResponseClass, any, {}>>;
272
329
  }
@@ -267,6 +267,55 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
267
267
  });
268
268
  });
269
269
  },
270
+ /**
271
+ * 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\"
272
+ * @summary Create the booking entry from a source entity
273
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
274
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
275
+ * @param {*} [options] Override http request option.
276
+ * @throws {RequiredError}
277
+ */
278
+ postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
279
+ if (options === void 0) { options = {}; }
280
+ return __awaiter(_this, void 0, void 0, function () {
281
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
282
+ return __generator(this, function (_a) {
283
+ switch (_a.label) {
284
+ case 0:
285
+ // verify required parameter 'postFinancialEventRequestDto' is not null or undefined
286
+ (0, common_1.assertParamExists)('postFinancialEvent', 'postFinancialEventRequestDto', postFinancialEventRequestDto);
287
+ localVarPath = "/accountingservice/v1/booking-entries/post-financial-event";
288
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
289
+ if (configuration) {
290
+ baseOptions = configuration.baseOptions;
291
+ baseAccessToken = configuration.accessToken;
292
+ }
293
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
294
+ localVarHeaderParameter = {};
295
+ localVarQueryParameter = {};
296
+ // authentication bearer required
297
+ // http bearer authentication required
298
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
299
+ case 1:
300
+ // authentication bearer required
301
+ // http bearer authentication required
302
+ _a.sent();
303
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
304
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
305
+ }
306
+ localVarHeaderParameter['Content-Type'] = 'application/json';
307
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
308
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
309
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
310
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(postFinancialEventRequestDto, localVarRequestOptions, configuration);
311
+ return [2 /*return*/, {
312
+ url: (0, common_1.toPathString)(localVarUrlObj),
313
+ options: localVarRequestOptions,
314
+ }];
315
+ }
316
+ });
317
+ });
318
+ },
270
319
  };
271
320
  };
272
321
  exports.BookingEntriesApiAxiosParamCreator = BookingEntriesApiAxiosParamCreator;
@@ -347,6 +396,27 @@ var BookingEntriesApiFp = function (configuration) {
347
396
  });
348
397
  });
349
398
  },
399
+ /**
400
+ * 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\"
401
+ * @summary Create the booking entry from a source entity
402
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
403
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
404
+ * @param {*} [options] Override http request option.
405
+ * @throws {RequiredError}
406
+ */
407
+ postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
408
+ return __awaiter(this, void 0, void 0, function () {
409
+ var localVarAxiosArgs;
410
+ return __generator(this, function (_a) {
411
+ switch (_a.label) {
412
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.postFinancialEvent(postFinancialEventRequestDto, authorization, options)];
413
+ case 1:
414
+ localVarAxiosArgs = _a.sent();
415
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
416
+ }
417
+ });
418
+ });
419
+ },
350
420
  };
351
421
  };
352
422
  exports.BookingEntriesApiFp = BookingEntriesApiFp;
@@ -397,6 +467,17 @@ var BookingEntriesApiFactory = function (configuration, basePath, axios) {
397
467
  listBookingEntries: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
398
468
  return localVarFp.listBookingEntries(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
399
469
  },
470
+ /**
471
+ * 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\"
472
+ * @summary Create the booking entry from a source entity
473
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
474
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
475
+ * @param {*} [options] Override http request option.
476
+ * @throws {RequiredError}
477
+ */
478
+ postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
479
+ return localVarFp.postFinancialEvent(postFinancialEventRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
480
+ },
400
481
  };
401
482
  };
402
483
  exports.BookingEntriesApiFactory = BookingEntriesApiFactory;
@@ -448,6 +529,18 @@ var BookingEntriesApi = /** @class */ (function (_super) {
448
529
  if (requestParameters === void 0) { requestParameters = {}; }
449
530
  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
531
  };
532
+ /**
533
+ * 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\"
534
+ * @summary Create the booking entry from a source entity
535
+ * @param {BookingEntriesApiPostFinancialEventRequest} requestParameters Request parameters.
536
+ * @param {*} [options] Override http request option.
537
+ * @throws {RequiredError}
538
+ * @memberof BookingEntriesApi
539
+ */
540
+ BookingEntriesApi.prototype.postFinancialEvent = function (requestParameters, options) {
541
+ var _this = this;
542
+ return (0, exports.BookingEntriesApiFp)(this.configuration).postFinancialEvent(requestParameters.postFinancialEventRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
543
+ };
451
544
  return BookingEntriesApi;
452
545
  }(base_1.BaseAPI));
453
546
  exports.BookingEntriesApi = BookingEntriesApi;
@@ -47,6 +47,8 @@ export * from './list-product-account-mappings-response-class';
47
47
  export * from './list-products-with-account-mappings-response-class';
48
48
  export * from './number-range-class';
49
49
  export * from './personal-account-class';
50
+ export * from './post-financial-event-request-dto';
51
+ export * from './post-financial-event-response-class';
50
52
  export * from './premium-item-account-mapping-class';
51
53
  export * from './product-account-mapping-class';
52
54
  export * from './product-account-mapping-detail-class';
@@ -63,6 +63,8 @@ __exportStar(require("./list-product-account-mappings-response-class"), exports)
63
63
  __exportStar(require("./list-products-with-account-mappings-response-class"), exports);
64
64
  __exportStar(require("./number-range-class"), exports);
65
65
  __exportStar(require("./personal-account-class"), exports);
66
+ __exportStar(require("./post-financial-event-request-dto"), exports);
67
+ __exportStar(require("./post-financial-event-response-class"), exports);
66
68
  __exportStar(require("./premium-item-account-mapping-class"), exports);
67
69
  __exportStar(require("./product-account-mapping-class"), exports);
68
70
  __exportStar(require("./product-account-mapping-detail-class"), exports);
@@ -23,17 +23,17 @@ export interface ListCommissionAgreementsWithAccountMappingsResponseClass {
23
23
  */
24
24
  'nextPageToken': string;
25
25
  /**
26
- * Not yet populated -- commissionservice\'s own agreement list doesn\'t carry this either.
26
+ * Total amount of items.
27
27
  * @type {number}
28
28
  * @memberof ListCommissionAgreementsWithAccountMappingsResponseClass
29
29
  */
30
- 'totalItems'?: number;
30
+ 'totalItems': number;
31
31
  /**
32
- * Not yet populated -- commissionservice\'s own agreement list doesn\'t carry this either.
32
+ * Items per page.
33
33
  * @type {number}
34
34
  * @memberof ListCommissionAgreementsWithAccountMappingsResponseClass
35
35
  */
36
- 'itemsPerPage'?: number;
36
+ 'itemsPerPage': number;
37
37
  /**
38
38
  *
39
39
  * @type {Array<CommissionAgreementWithAccountMappingClass>}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * EMIL AccountingService
3
+ * The EMIL AccountingService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface PostFinancialEventRequestDto
16
+ */
17
+ export interface PostFinancialEventRequestDto {
18
+ /**
19
+ * The kind of source entity to post a booking entry for. Each kind is posted through the same flow its domain event goes through.
20
+ * @type {string}
21
+ * @memberof PostFinancialEventRequestDto
22
+ */
23
+ 'sourceEntityType': PostFinancialEventRequestDtoSourceEntityTypeEnum;
24
+ /**
25
+ * The code of the source entity in the service that owns it, such as an invoice, payment, exceeding credit or credit allocation code.
26
+ * @type {string}
27
+ * @memberof PostFinancialEventRequestDto
28
+ */
29
+ 'sourceEntityCode': string;
30
+ /**
31
+ * The partner whose personal account the entry posts to. Required for an exceeding credit, which does not name its partner itself. Optional for a payment or credit allocation, where it must match the entity\'s own partner. Not accepted for an invoice, whose partner is derived from the policy.
32
+ * @type {string}
33
+ * @memberof PostFinancialEventRequestDto
34
+ */
35
+ 'partnerCode'?: string;
36
+ }
37
+ export declare const PostFinancialEventRequestDtoSourceEntityTypeEnum: {
38
+ readonly Invoice: "invoice";
39
+ readonly Payment: "payment";
40
+ readonly Credit: "credit";
41
+ readonly CreditAllocation: "credit_allocation";
42
+ };
43
+ export type PostFinancialEventRequestDtoSourceEntityTypeEnum = typeof PostFinancialEventRequestDtoSourceEntityTypeEnum[keyof typeof PostFinancialEventRequestDtoSourceEntityTypeEnum];
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL AccountingService
6
+ * The EMIL AccountingService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PostFinancialEventRequestDtoSourceEntityTypeEnum = void 0;
17
+ exports.PostFinancialEventRequestDtoSourceEntityTypeEnum = {
18
+ Invoice: 'invoice',
19
+ Payment: 'payment',
20
+ Credit: 'credit',
21
+ CreditAllocation: 'credit_allocation'
22
+ };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * EMIL AccountingService
3
+ * The EMIL AccountingService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { BookingEntryClass } from './booking-entry-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PostFinancialEventResponseClass
17
+ */
18
+ export interface PostFinancialEventResponseClass {
19
+ /**
20
+ * Every booking entry the posting wrote, in posting order. A payment settlement that releases premium tax writes a second entry.
21
+ * @type {Array<BookingEntryClass>}
22
+ * @memberof PostFinancialEventResponseClass
23
+ */
24
+ 'bookingEntries': Array<BookingEntryClass>;
25
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL AccountingService
6
+ * The EMIL AccountingService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
package/models/index.ts CHANGED
@@ -47,6 +47,8 @@ export * from './list-product-account-mappings-response-class';
47
47
  export * from './list-products-with-account-mappings-response-class';
48
48
  export * from './number-range-class';
49
49
  export * from './personal-account-class';
50
+ export * from './post-financial-event-request-dto';
51
+ export * from './post-financial-event-response-class';
50
52
  export * from './premium-item-account-mapping-class';
51
53
  export * from './product-account-mapping-class';
52
54
  export * from './product-account-mapping-detail-class';
@@ -28,17 +28,17 @@ export interface ListCommissionAgreementsWithAccountMappingsResponseClass {
28
28
  */
29
29
  'nextPageToken': string;
30
30
  /**
31
- * Not yet populated -- commissionservice\'s own agreement list doesn\'t carry this either.
31
+ * Total amount of items.
32
32
  * @type {number}
33
33
  * @memberof ListCommissionAgreementsWithAccountMappingsResponseClass
34
34
  */
35
- 'totalItems'?: number;
35
+ 'totalItems': number;
36
36
  /**
37
- * Not yet populated -- commissionservice\'s own agreement list doesn\'t carry this either.
37
+ * Items per page.
38
38
  * @type {number}
39
39
  * @memberof ListCommissionAgreementsWithAccountMappingsResponseClass
40
40
  */
41
- 'itemsPerPage'?: number;
41
+ 'itemsPerPage': number;
42
42
  /**
43
43
  *
44
44
  * @type {Array<CommissionAgreementWithAccountMappingClass>}
@@ -0,0 +1,52 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AccountingService
5
+ * The EMIL AccountingService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface PostFinancialEventRequestDto
21
+ */
22
+ export interface PostFinancialEventRequestDto {
23
+ /**
24
+ * The kind of source entity to post a booking entry for. Each kind is posted through the same flow its domain event goes through.
25
+ * @type {string}
26
+ * @memberof PostFinancialEventRequestDto
27
+ */
28
+ 'sourceEntityType': PostFinancialEventRequestDtoSourceEntityTypeEnum;
29
+ /**
30
+ * The code of the source entity in the service that owns it, such as an invoice, payment, exceeding credit or credit allocation code.
31
+ * @type {string}
32
+ * @memberof PostFinancialEventRequestDto
33
+ */
34
+ 'sourceEntityCode': string;
35
+ /**
36
+ * The partner whose personal account the entry posts to. Required for an exceeding credit, which does not name its partner itself. Optional for a payment or credit allocation, where it must match the entity\'s own partner. Not accepted for an invoice, whose partner is derived from the policy.
37
+ * @type {string}
38
+ * @memberof PostFinancialEventRequestDto
39
+ */
40
+ 'partnerCode'?: string;
41
+ }
42
+
43
+ export const PostFinancialEventRequestDtoSourceEntityTypeEnum = {
44
+ Invoice: 'invoice',
45
+ Payment: 'payment',
46
+ Credit: 'credit',
47
+ CreditAllocation: 'credit_allocation'
48
+ } as const;
49
+
50
+ export type PostFinancialEventRequestDtoSourceEntityTypeEnum = typeof PostFinancialEventRequestDtoSourceEntityTypeEnum[keyof typeof PostFinancialEventRequestDtoSourceEntityTypeEnum];
51
+
52
+
@@ -0,0 +1,31 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AccountingService
5
+ * The EMIL AccountingService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import { BookingEntryClass } from './booking-entry-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface PostFinancialEventResponseClass
22
+ */
23
+ export interface PostFinancialEventResponseClass {
24
+ /**
25
+ * Every booking entry the posting wrote, in posting order. A payment settlement that releases premium tax writes a second entry.
26
+ * @type {Array<BookingEntryClass>}
27
+ * @memberof PostFinancialEventResponseClass
28
+ */
29
+ 'bookingEntries': Array<BookingEntryClass>;
30
+ }
31
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/accounting-sdk",
3
- "version": "1.34.1-beta.27",
3
+ "version": "1.34.1-beta.29",
4
4
  "description": "OpenAPI client for @emilgroup/accounting-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [