@emilgroup/accounting-sdk-node 1.32.1-beta.27 → 1.32.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-node@1.32.1-beta.27 --save
20
+ npm install @emilgroup/accounting-sdk-node@1.32.1-beta.29 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/accounting-sdk-node@1.32.1-beta.27
24
+ yarn add @emilgroup/accounting-sdk-node@1.32.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
  // URLSearchParams not necessarily used
32
36
  // @ts-ignore
33
37
  import { URL, URLSearchParams } from 'url';
@@ -208,6 +212,53 @@ export const BookingEntriesApiAxiosParamCreator = function (configuration?: Conf
208
212
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
209
213
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
210
214
 
215
+ return {
216
+ url: toPathString(localVarUrlObj),
217
+ options: localVarRequestOptions,
218
+ };
219
+ },
220
+ /**
221
+ * 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\"
222
+ * @summary Create the booking entry from a source entity
223
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
224
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
225
+ * @param {*} [options] Override http request option.
226
+ * @throws {RequiredError}
227
+ */
228
+ postFinancialEvent: async (postFinancialEventRequestDto: PostFinancialEventRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
229
+ // verify required parameter 'postFinancialEventRequestDto' is not null or undefined
230
+ assertParamExists('postFinancialEvent', 'postFinancialEventRequestDto', postFinancialEventRequestDto)
231
+ const localVarPath = `/accountingservice/v1/booking-entries/post-financial-event`;
232
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
233
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
234
+ let baseOptions;
235
+ let baseAccessToken;
236
+ if (configuration) {
237
+ baseOptions = configuration.baseOptions;
238
+ baseAccessToken = configuration.accessToken;
239
+ }
240
+
241
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
242
+ const localVarHeaderParameter = {} as any;
243
+ const localVarQueryParameter = {} as any;
244
+
245
+ // authentication bearer required
246
+ // http bearer authentication required
247
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
248
+
249
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
250
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
251
+ }
252
+
253
+
254
+
255
+ localVarHeaderParameter['Content-Type'] = 'application/json';
256
+
257
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
258
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
259
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
260
+ localVarRequestOptions.data = serializeDataIfNeeded(postFinancialEventRequestDto, localVarRequestOptions, configuration)
261
+
211
262
  return {
212
263
  url: toPathString(localVarUrlObj),
213
264
  options: localVarRequestOptions,
@@ -266,6 +317,18 @@ export const BookingEntriesApiFp = function(configuration?: Configuration) {
266
317
  const localVarAxiosArgs = await localVarAxiosParamCreator.listBookingEntries(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
267
318
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
268
319
  },
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 {PostFinancialEventRequestDto} postFinancialEventRequestDto
324
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
325
+ * @param {*} [options] Override http request option.
326
+ * @throws {RequiredError}
327
+ */
328
+ async postFinancialEvent(postFinancialEventRequestDto: PostFinancialEventRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostFinancialEventResponseClass>> {
329
+ const localVarAxiosArgs = await localVarAxiosParamCreator.postFinancialEvent(postFinancialEventRequestDto, authorization, options);
330
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
331
+ },
269
332
  }
270
333
  };
271
334
 
@@ -316,6 +379,17 @@ export const BookingEntriesApiFactory = function (configuration?: Configuration,
316
379
  listBookingEntries(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListBookingEntriesResponseClass> {
317
380
  return localVarFp.listBookingEntries(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
318
381
  },
382
+ /**
383
+ * 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\"
384
+ * @summary Create the booking entry from a source entity
385
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
386
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
387
+ * @param {*} [options] Override http request option.
388
+ * @throws {RequiredError}
389
+ */
390
+ postFinancialEvent(postFinancialEventRequestDto: PostFinancialEventRequestDto, authorization?: string, options?: any): AxiosPromise<PostFinancialEventResponseClass> {
391
+ return localVarFp.postFinancialEvent(postFinancialEventRequestDto, authorization, options).then((request) => request(axios, basePath));
392
+ },
319
393
  };
320
394
  };
321
395
 
@@ -431,6 +505,27 @@ export interface BookingEntriesApiListBookingEntriesRequest {
431
505
  readonly filters?: string
432
506
  }
433
507
 
508
+ /**
509
+ * Request parameters for postFinancialEvent operation in BookingEntriesApi.
510
+ * @export
511
+ * @interface BookingEntriesApiPostFinancialEventRequest
512
+ */
513
+ export interface BookingEntriesApiPostFinancialEventRequest {
514
+ /**
515
+ *
516
+ * @type {PostFinancialEventRequestDto}
517
+ * @memberof BookingEntriesApiPostFinancialEvent
518
+ */
519
+ readonly postFinancialEventRequestDto: PostFinancialEventRequestDto
520
+
521
+ /**
522
+ * Bearer Token: provided by the login endpoint under the name accessToken.
523
+ * @type {string}
524
+ * @memberof BookingEntriesApiPostFinancialEvent
525
+ */
526
+ readonly authorization?: string
527
+ }
528
+
434
529
  /**
435
530
  * BookingEntriesApi - object-oriented interface
436
531
  * @export
@@ -473,4 +568,16 @@ export class BookingEntriesApi extends BaseAPI {
473
568
  public listBookingEntries(requestParameters: BookingEntriesApiListBookingEntriesRequest = {}, options?: AxiosRequestConfig) {
474
569
  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));
475
570
  }
571
+
572
+ /**
573
+ * 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\"
574
+ * @summary Create the booking entry from a source entity
575
+ * @param {BookingEntriesApiPostFinancialEventRequest} requestParameters Request parameters.
576
+ * @param {*} [options] Override http request option.
577
+ * @throws {RequiredError}
578
+ * @memberof BookingEntriesApi
579
+ */
580
+ public postFinancialEvent(requestParameters: BookingEntriesApiPostFinancialEventRequest, options?: AxiosRequestConfig) {
581
+ return BookingEntriesApiFp(this.configuration).postFinancialEvent(requestParameters.postFinancialEventRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
582
+ }
476
583
  }
@@ -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
  }
@@ -271,6 +271,55 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
271
271
  });
272
272
  });
273
273
  },
274
+ /**
275
+ * 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\"
276
+ * @summary Create the booking entry from a source entity
277
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
278
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
279
+ * @param {*} [options] Override http request option.
280
+ * @throws {RequiredError}
281
+ */
282
+ postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
283
+ if (options === void 0) { options = {}; }
284
+ return __awaiter(_this, void 0, void 0, function () {
285
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
286
+ return __generator(this, function (_a) {
287
+ switch (_a.label) {
288
+ case 0:
289
+ // verify required parameter 'postFinancialEventRequestDto' is not null or undefined
290
+ (0, common_1.assertParamExists)('postFinancialEvent', 'postFinancialEventRequestDto', postFinancialEventRequestDto);
291
+ localVarPath = "/accountingservice/v1/booking-entries/post-financial-event";
292
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
293
+ if (configuration) {
294
+ baseOptions = configuration.baseOptions;
295
+ baseAccessToken = configuration.accessToken;
296
+ }
297
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
298
+ localVarHeaderParameter = {};
299
+ localVarQueryParameter = {};
300
+ // authentication bearer required
301
+ // http bearer authentication required
302
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
303
+ case 1:
304
+ // authentication bearer required
305
+ // http bearer authentication required
306
+ _a.sent();
307
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
308
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
309
+ }
310
+ localVarHeaderParameter['Content-Type'] = 'application/json';
311
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
312
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
313
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
314
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(postFinancialEventRequestDto, localVarRequestOptions, configuration);
315
+ return [2 /*return*/, {
316
+ url: (0, common_1.toPathString)(localVarUrlObj),
317
+ options: localVarRequestOptions,
318
+ }];
319
+ }
320
+ });
321
+ });
322
+ },
274
323
  };
275
324
  };
276
325
  exports.BookingEntriesApiAxiosParamCreator = BookingEntriesApiAxiosParamCreator;
@@ -351,6 +400,27 @@ var BookingEntriesApiFp = function (configuration) {
351
400
  });
352
401
  });
353
402
  },
403
+ /**
404
+ * 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\"
405
+ * @summary Create the booking entry from a source entity
406
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
407
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
408
+ * @param {*} [options] Override http request option.
409
+ * @throws {RequiredError}
410
+ */
411
+ postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
412
+ return __awaiter(this, void 0, void 0, function () {
413
+ var localVarAxiosArgs;
414
+ return __generator(this, function (_a) {
415
+ switch (_a.label) {
416
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.postFinancialEvent(postFinancialEventRequestDto, authorization, options)];
417
+ case 1:
418
+ localVarAxiosArgs = _a.sent();
419
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
420
+ }
421
+ });
422
+ });
423
+ },
354
424
  };
355
425
  };
356
426
  exports.BookingEntriesApiFp = BookingEntriesApiFp;
@@ -401,6 +471,17 @@ var BookingEntriesApiFactory = function (configuration, basePath, axios) {
401
471
  listBookingEntries: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
402
472
  return localVarFp.listBookingEntries(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
403
473
  },
474
+ /**
475
+ * 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\"
476
+ * @summary Create the booking entry from a source entity
477
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
478
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
479
+ * @param {*} [options] Override http request option.
480
+ * @throws {RequiredError}
481
+ */
482
+ postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
483
+ return localVarFp.postFinancialEvent(postFinancialEventRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
484
+ },
404
485
  };
405
486
  };
406
487
  exports.BookingEntriesApiFactory = BookingEntriesApiFactory;
@@ -452,6 +533,18 @@ var BookingEntriesApi = /** @class */ (function (_super) {
452
533
  if (requestParameters === void 0) { requestParameters = {}; }
453
534
  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); });
454
535
  };
536
+ /**
537
+ * 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\"
538
+ * @summary Create the booking entry from a source entity
539
+ * @param {BookingEntriesApiPostFinancialEventRequest} requestParameters Request parameters.
540
+ * @param {*} [options] Override http request option.
541
+ * @throws {RequiredError}
542
+ * @memberof BookingEntriesApi
543
+ */
544
+ BookingEntriesApi.prototype.postFinancialEvent = function (requestParameters, options) {
545
+ var _this = this;
546
+ return (0, exports.BookingEntriesApiFp)(this.configuration).postFinancialEvent(requestParameters.postFinancialEventRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
547
+ };
455
548
  return BookingEntriesApi;
456
549
  }(base_1.BaseAPI));
457
550
  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-node",
3
- "version": "1.32.1-beta.27",
3
+ "version": "1.32.1-beta.29",
4
4
  "description": "OpenAPI client for @emilgroup/accounting-sdk-node",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [