@emilgroup/accounting-sdk-node 1.32.1-beta.32 → 1.32.1-beta.33

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.
@@ -39,6 +39,8 @@ models/create-financial-account-request-dto.ts
39
39
  models/create-financial-account-response-class.ts
40
40
  models/create-number-range-request-dto.ts
41
41
  models/create-number-range-response-class.ts
42
+ models/create-or-correct-opening-balance-dto.ts
43
+ models/create-or-correct-opening-balance-response-class.ts
42
44
  models/create-personal-account-request-dto.ts
43
45
  models/create-personal-account-response-class.ts
44
46
  models/export-accounting-config-response-class.ts
@@ -66,6 +68,7 @@ models/list-personal-accounts-response-class.ts
66
68
  models/list-product-account-mappings-response-class.ts
67
69
  models/list-products-with-account-mappings-response-class.ts
68
70
  models/number-range-class.ts
71
+ models/opening-balance-item-dto.ts
69
72
  models/personal-account-class.ts
70
73
  models/post-financial-event-request-dto.ts
71
74
  models/post-financial-event-response-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.32 --save
20
+ npm install @emilgroup/accounting-sdk-node@1.32.1-beta.33 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/accounting-sdk-node@1.32.1-beta.32
24
+ yarn add @emilgroup/accounting-sdk-node@1.32.1-beta.33
25
25
  ```
26
26
 
27
27
  And then you can import `FinancialAccountsApi`.
@@ -25,6 +25,10 @@ import { CreateBookingEntryRequestDto } from '../models';
25
25
  // @ts-ignore
26
26
  import { CreateBookingEntryResponseClass } from '../models';
27
27
  // @ts-ignore
28
+ import { CreateOrCorrectOpeningBalanceDto } from '../models';
29
+ // @ts-ignore
30
+ import { CreateOrCorrectOpeningBalanceResponseClass } from '../models';
31
+ // @ts-ignore
28
32
  import { GetBookingEntryResponseClass } from '../models';
29
33
  // @ts-ignore
30
34
  import { ListBookingEntriesResponseClass } from '../models';
@@ -89,6 +93,53 @@ export const BookingEntriesApiAxiosParamCreator = function (configuration?: Conf
89
93
  options: localVarRequestOptions,
90
94
  };
91
95
  },
96
+ /**
97
+ * 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\"
98
+ * @summary Update the create or correct opening balance
99
+ * @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
100
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
101
+ * @param {*} [options] Override http request option.
102
+ * @throws {RequiredError}
103
+ */
104
+ createOrCorrectOpeningBalance: async (createOrCorrectOpeningBalanceDto: CreateOrCorrectOpeningBalanceDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
105
+ // verify required parameter 'createOrCorrectOpeningBalanceDto' is not null or undefined
106
+ assertParamExists('createOrCorrectOpeningBalance', 'createOrCorrectOpeningBalanceDto', createOrCorrectOpeningBalanceDto)
107
+ const localVarPath = `/accountingservice/v1/booking-entries/opening-balances`;
108
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
109
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
110
+ let baseOptions;
111
+ let baseAccessToken;
112
+ if (configuration) {
113
+ baseOptions = configuration.baseOptions;
114
+ baseAccessToken = configuration.accessToken;
115
+ }
116
+
117
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
118
+ const localVarHeaderParameter = {} as any;
119
+ const localVarQueryParameter = {} as any;
120
+
121
+ // authentication bearer required
122
+ // http bearer authentication required
123
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
124
+
125
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
126
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
127
+ }
128
+
129
+
130
+
131
+ localVarHeaderParameter['Content-Type'] = 'application/json';
132
+
133
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
134
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
135
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
136
+ localVarRequestOptions.data = serializeDataIfNeeded(createOrCorrectOpeningBalanceDto, localVarRequestOptions, configuration)
137
+
138
+ return {
139
+ url: toPathString(localVarUrlObj),
140
+ options: localVarRequestOptions,
141
+ };
142
+ },
92
143
  /**
93
144
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
94
145
  * @summary Retrieve the booking entry
@@ -286,6 +337,18 @@ export const BookingEntriesApiFp = function(configuration?: Configuration) {
286
337
  const localVarAxiosArgs = await localVarAxiosParamCreator.createBookingEntry(createBookingEntryRequestDto, authorization, options);
287
338
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
288
339
  },
340
+ /**
341
+ * 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\"
342
+ * @summary Update the create or correct opening balance
343
+ * @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
344
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
345
+ * @param {*} [options] Override http request option.
346
+ * @throws {RequiredError}
347
+ */
348
+ async createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto: CreateOrCorrectOpeningBalanceDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateOrCorrectOpeningBalanceResponseClass>> {
349
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto, authorization, options);
350
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
351
+ },
289
352
  /**
290
353
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
291
354
  * @summary Retrieve the booking entry
@@ -350,6 +413,17 @@ export const BookingEntriesApiFactory = function (configuration?: Configuration,
350
413
  createBookingEntry(createBookingEntryRequestDto: CreateBookingEntryRequestDto, authorization?: string, options?: any): AxiosPromise<CreateBookingEntryResponseClass> {
351
414
  return localVarFp.createBookingEntry(createBookingEntryRequestDto, authorization, options).then((request) => request(axios, basePath));
352
415
  },
416
+ /**
417
+ * 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\"
418
+ * @summary Update the create or correct opening balance
419
+ * @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
420
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
421
+ * @param {*} [options] Override http request option.
422
+ * @throws {RequiredError}
423
+ */
424
+ createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto: CreateOrCorrectOpeningBalanceDto, authorization?: string, options?: any): AxiosPromise<CreateOrCorrectOpeningBalanceResponseClass> {
425
+ return localVarFp.createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto, authorization, options).then((request) => request(axios, basePath));
426
+ },
353
427
  /**
354
428
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
355
429
  * @summary Retrieve the booking entry
@@ -414,6 +488,27 @@ export interface BookingEntriesApiCreateBookingEntryRequest {
414
488
  readonly authorization?: string
415
489
  }
416
490
 
491
+ /**
492
+ * Request parameters for createOrCorrectOpeningBalance operation in BookingEntriesApi.
493
+ * @export
494
+ * @interface BookingEntriesApiCreateOrCorrectOpeningBalanceRequest
495
+ */
496
+ export interface BookingEntriesApiCreateOrCorrectOpeningBalanceRequest {
497
+ /**
498
+ *
499
+ * @type {CreateOrCorrectOpeningBalanceDto}
500
+ * @memberof BookingEntriesApiCreateOrCorrectOpeningBalance
501
+ */
502
+ readonly createOrCorrectOpeningBalanceDto: CreateOrCorrectOpeningBalanceDto
503
+
504
+ /**
505
+ * Bearer Token: provided by the login endpoint under the name accessToken.
506
+ * @type {string}
507
+ * @memberof BookingEntriesApiCreateOrCorrectOpeningBalance
508
+ */
509
+ readonly authorization?: string
510
+ }
511
+
417
512
  /**
418
513
  * Request parameters for getBookingEntry operation in BookingEntriesApi.
419
514
  * @export
@@ -545,6 +640,18 @@ export class BookingEntriesApi extends BaseAPI {
545
640
  return BookingEntriesApiFp(this.configuration).createBookingEntry(requestParameters.createBookingEntryRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
546
641
  }
547
642
 
643
+ /**
644
+ * 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\"
645
+ * @summary Update the create or correct opening balance
646
+ * @param {BookingEntriesApiCreateOrCorrectOpeningBalanceRequest} requestParameters Request parameters.
647
+ * @param {*} [options] Override http request option.
648
+ * @throws {RequiredError}
649
+ * @memberof BookingEntriesApi
650
+ */
651
+ public createOrCorrectOpeningBalance(requestParameters: BookingEntriesApiCreateOrCorrectOpeningBalanceRequest, options?: AxiosRequestConfig) {
652
+ return BookingEntriesApiFp(this.configuration).createOrCorrectOpeningBalance(requestParameters.createOrCorrectOpeningBalanceDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
653
+ }
654
+
548
655
  /**
549
656
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
550
657
  * @summary Retrieve the booking entry
@@ -14,6 +14,8 @@ import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
15
  import { CreateBookingEntryRequestDto } from '../models';
16
16
  import { CreateBookingEntryResponseClass } from '../models';
17
+ import { CreateOrCorrectOpeningBalanceDto } from '../models';
18
+ import { CreateOrCorrectOpeningBalanceResponseClass } from '../models';
17
19
  import { GetBookingEntryResponseClass } from '../models';
18
20
  import { ListBookingEntriesResponseClass } from '../models';
19
21
  import { PostFinancialEventRequestDto } from '../models';
@@ -32,6 +34,15 @@ export declare const BookingEntriesApiAxiosParamCreator: (configuration?: Config
32
34
  * @throws {RequiredError}
33
35
  */
34
36
  createBookingEntry: (createBookingEntryRequestDto: CreateBookingEntryRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
37
+ /**
38
+ * 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\"
39
+ * @summary Update the create or correct opening balance
40
+ * @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
41
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ createOrCorrectOpeningBalance: (createOrCorrectOpeningBalanceDto: CreateOrCorrectOpeningBalanceDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
35
46
  /**
36
47
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
37
48
  * @summary Retrieve the booking entry
@@ -81,6 +92,15 @@ export declare const BookingEntriesApiFp: (configuration?: Configuration) => {
81
92
  * @throws {RequiredError}
82
93
  */
83
94
  createBookingEntry(createBookingEntryRequestDto: CreateBookingEntryRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateBookingEntryResponseClass>>;
95
+ /**
96
+ * 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\"
97
+ * @summary Update the create or correct opening balance
98
+ * @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
99
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto: CreateOrCorrectOpeningBalanceDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateOrCorrectOpeningBalanceResponseClass>>;
84
104
  /**
85
105
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
86
106
  * @summary Retrieve the booking entry
@@ -130,6 +150,15 @@ export declare const BookingEntriesApiFactory: (configuration?: Configuration, b
130
150
  * @throws {RequiredError}
131
151
  */
132
152
  createBookingEntry(createBookingEntryRequestDto: CreateBookingEntryRequestDto, authorization?: string, options?: any): AxiosPromise<CreateBookingEntryResponseClass>;
153
+ /**
154
+ * 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\"
155
+ * @summary Update the create or correct opening balance
156
+ * @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
157
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
158
+ * @param {*} [options] Override http request option.
159
+ * @throws {RequiredError}
160
+ */
161
+ createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto: CreateOrCorrectOpeningBalanceDto, authorization?: string, options?: any): AxiosPromise<CreateOrCorrectOpeningBalanceResponseClass>;
133
162
  /**
134
163
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
135
164
  * @summary Retrieve the booking entry
@@ -184,6 +213,25 @@ export interface BookingEntriesApiCreateBookingEntryRequest {
184
213
  */
185
214
  readonly authorization?: string;
186
215
  }
216
+ /**
217
+ * Request parameters for createOrCorrectOpeningBalance operation in BookingEntriesApi.
218
+ * @export
219
+ * @interface BookingEntriesApiCreateOrCorrectOpeningBalanceRequest
220
+ */
221
+ export interface BookingEntriesApiCreateOrCorrectOpeningBalanceRequest {
222
+ /**
223
+ *
224
+ * @type {CreateOrCorrectOpeningBalanceDto}
225
+ * @memberof BookingEntriesApiCreateOrCorrectOpeningBalance
226
+ */
227
+ readonly createOrCorrectOpeningBalanceDto: CreateOrCorrectOpeningBalanceDto;
228
+ /**
229
+ * Bearer Token: provided by the login endpoint under the name accessToken.
230
+ * @type {string}
231
+ * @memberof BookingEntriesApiCreateOrCorrectOpeningBalance
232
+ */
233
+ readonly authorization?: string;
234
+ }
187
235
  /**
188
236
  * Request parameters for getBookingEntry operation in BookingEntriesApi.
189
237
  * @export
@@ -299,6 +347,15 @@ export declare class BookingEntriesApi extends BaseAPI {
299
347
  * @memberof BookingEntriesApi
300
348
  */
301
349
  createBookingEntry(requestParameters: BookingEntriesApiCreateBookingEntryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateBookingEntryResponseClass, any, {}>>;
350
+ /**
351
+ * 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\"
352
+ * @summary Update the create or correct opening balance
353
+ * @param {BookingEntriesApiCreateOrCorrectOpeningBalanceRequest} requestParameters Request parameters.
354
+ * @param {*} [options] Override http request option.
355
+ * @throws {RequiredError}
356
+ * @memberof BookingEntriesApi
357
+ */
358
+ createOrCorrectOpeningBalance(requestParameters: BookingEntriesApiCreateOrCorrectOpeningBalanceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateOrCorrectOpeningBalanceResponseClass, any, {}>>;
302
359
  /**
303
360
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
304
361
  * @summary Retrieve the booking entry
@@ -145,6 +145,55 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
145
145
  });
146
146
  });
147
147
  },
148
+ /**
149
+ * 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\"
150
+ * @summary Update the create or correct opening balance
151
+ * @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
152
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
153
+ * @param {*} [options] Override http request option.
154
+ * @throws {RequiredError}
155
+ */
156
+ createOrCorrectOpeningBalance: function (createOrCorrectOpeningBalanceDto, authorization, options) {
157
+ if (options === void 0) { options = {}; }
158
+ return __awaiter(_this, void 0, void 0, function () {
159
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
+ return __generator(this, function (_a) {
161
+ switch (_a.label) {
162
+ case 0:
163
+ // verify required parameter 'createOrCorrectOpeningBalanceDto' is not null or undefined
164
+ (0, common_1.assertParamExists)('createOrCorrectOpeningBalance', 'createOrCorrectOpeningBalanceDto', createOrCorrectOpeningBalanceDto);
165
+ localVarPath = "/accountingservice/v1/booking-entries/opening-balances";
166
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
167
+ if (configuration) {
168
+ baseOptions = configuration.baseOptions;
169
+ baseAccessToken = configuration.accessToken;
170
+ }
171
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
172
+ localVarHeaderParameter = {};
173
+ localVarQueryParameter = {};
174
+ // authentication bearer required
175
+ // http bearer authentication required
176
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
177
+ case 1:
178
+ // authentication bearer required
179
+ // http bearer authentication required
180
+ _a.sent();
181
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
182
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
183
+ }
184
+ localVarHeaderParameter['Content-Type'] = 'application/json';
185
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
188
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrCorrectOpeningBalanceDto, localVarRequestOptions, configuration);
189
+ return [2 /*return*/, {
190
+ url: (0, common_1.toPathString)(localVarUrlObj),
191
+ options: localVarRequestOptions,
192
+ }];
193
+ }
194
+ });
195
+ });
196
+ },
148
197
  /**
149
198
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
150
199
  * @summary Retrieve the booking entry
@@ -351,6 +400,27 @@ var BookingEntriesApiFp = function (configuration) {
351
400
  });
352
401
  });
353
402
  },
403
+ /**
404
+ * 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\"
405
+ * @summary Update the create or correct opening balance
406
+ * @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
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
+ createOrCorrectOpeningBalance: function (createOrCorrectOpeningBalanceDto, 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.createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto, 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
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
356
426
  * @summary Retrieve the booking entry
@@ -442,6 +512,17 @@ var BookingEntriesApiFactory = function (configuration, basePath, axios) {
442
512
  createBookingEntry: function (createBookingEntryRequestDto, authorization, options) {
443
513
  return localVarFp.createBookingEntry(createBookingEntryRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
444
514
  },
515
+ /**
516
+ * 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\"
517
+ * @summary Update the create or correct opening balance
518
+ * @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
519
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
520
+ * @param {*} [options] Override http request option.
521
+ * @throws {RequiredError}
522
+ */
523
+ createOrCorrectOpeningBalance: function (createOrCorrectOpeningBalanceDto, authorization, options) {
524
+ return localVarFp.createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto, authorization, options).then(function (request) { return request(axios, basePath); });
525
+ },
445
526
  /**
446
527
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
447
528
  * @summary Retrieve the booking entry
@@ -508,6 +589,18 @@ var BookingEntriesApi = /** @class */ (function (_super) {
508
589
  var _this = this;
509
590
  return (0, exports.BookingEntriesApiFp)(this.configuration).createBookingEntry(requestParameters.createBookingEntryRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
510
591
  };
592
+ /**
593
+ * 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\"
594
+ * @summary Update the create or correct opening balance
595
+ * @param {BookingEntriesApiCreateOrCorrectOpeningBalanceRequest} requestParameters Request parameters.
596
+ * @param {*} [options] Override http request option.
597
+ * @throws {RequiredError}
598
+ * @memberof BookingEntriesApi
599
+ */
600
+ BookingEntriesApi.prototype.createOrCorrectOpeningBalance = function (requestParameters, options) {
601
+ var _this = this;
602
+ return (0, exports.BookingEntriesApiFp)(this.configuration).createOrCorrectOpeningBalance(requestParameters.createOrCorrectOpeningBalanceDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
603
+ };
511
604
  /**
512
605
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
513
606
  * @summary Retrieve the booking entry
@@ -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 { OpeningBalanceItemDto } from './opening-balance-item-dto';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface CreateOrCorrectOpeningBalanceDto
17
+ */
18
+ export interface CreateOrCorrectOpeningBalanceDto {
19
+ /**
20
+ * The confirmed opening balance for each account — a first-time entry for one with no history yet, a restatement for one that already has some. The service derives the delta itself against whatever balance it reads (implicitly zero for a first-time entry).
21
+ * @type {Array<OpeningBalanceItemDto>}
22
+ * @memberof CreateOrCorrectOpeningBalanceDto
23
+ */
24
+ 'openingBalances': Array<OpeningBalanceItemDto>;
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 });
@@ -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 CreateOrCorrectOpeningBalanceResponseClass
17
+ */
18
+ export interface CreateOrCorrectOpeningBalanceResponseClass {
19
+ /**
20
+ * The booking entries created — one per item whose confirmed balance differed from its current one (implicitly zero for an account with no history yet). Empty when every item\'s confirmed balance already matched: nothing was booked, and that is success, not an error.
21
+ * @type {Array<BookingEntryClass>}
22
+ * @memberof CreateOrCorrectOpeningBalanceResponseClass
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 });
@@ -67,6 +67,7 @@ export declare const FinancialTransactionDataDtoDebitCreditEnum: {
67
67
  export type FinancialTransactionDataDtoDebitCreditEnum = typeof FinancialTransactionDataDtoDebitCreditEnum[keyof typeof FinancialTransactionDataDtoDebitCreditEnum];
68
68
  export declare const FinancialTransactionDataDtoTransactionTypeEnum: {
69
69
  readonly OpeningBalance: "OPENING_BALANCE";
70
+ readonly OpeningBalanceCorrection: "OPENING_BALANCE_CORRECTION";
70
71
  readonly Adjustment: "ADJUSTMENT";
71
72
  readonly Normal: "NORMAL";
72
73
  };
@@ -20,6 +20,7 @@ exports.FinancialTransactionDataDtoDebitCreditEnum = {
20
20
  };
21
21
  exports.FinancialTransactionDataDtoTransactionTypeEnum = {
22
22
  OpeningBalance: 'OPENING_BALANCE',
23
+ OpeningBalanceCorrection: 'OPENING_BALANCE_CORRECTION',
23
24
  Adjustment: 'ADJUSTMENT',
24
25
  Normal: 'NORMAL'
25
26
  };
@@ -20,6 +20,8 @@ export * from './create-financial-account-request-dto';
20
20
  export * from './create-financial-account-response-class';
21
21
  export * from './create-number-range-request-dto';
22
22
  export * from './create-number-range-response-class';
23
+ export * from './create-or-correct-opening-balance-dto';
24
+ export * from './create-or-correct-opening-balance-response-class';
23
25
  export * from './create-personal-account-request-dto';
24
26
  export * from './create-personal-account-response-class';
25
27
  export * from './export-accounting-config-response-class';
@@ -46,6 +48,7 @@ export * from './list-personal-accounts-response-class';
46
48
  export * from './list-product-account-mappings-response-class';
47
49
  export * from './list-products-with-account-mappings-response-class';
48
50
  export * from './number-range-class';
51
+ export * from './opening-balance-item-dto';
49
52
  export * from './personal-account-class';
50
53
  export * from './post-financial-event-request-dto';
51
54
  export * from './post-financial-event-response-class';
@@ -36,6 +36,8 @@ __exportStar(require("./create-financial-account-request-dto"), exports);
36
36
  __exportStar(require("./create-financial-account-response-class"), exports);
37
37
  __exportStar(require("./create-number-range-request-dto"), exports);
38
38
  __exportStar(require("./create-number-range-response-class"), exports);
39
+ __exportStar(require("./create-or-correct-opening-balance-dto"), exports);
40
+ __exportStar(require("./create-or-correct-opening-balance-response-class"), exports);
39
41
  __exportStar(require("./create-personal-account-request-dto"), exports);
40
42
  __exportStar(require("./create-personal-account-response-class"), exports);
41
43
  __exportStar(require("./export-accounting-config-response-class"), exports);
@@ -62,6 +64,7 @@ __exportStar(require("./list-personal-accounts-response-class"), exports);
62
64
  __exportStar(require("./list-product-account-mappings-response-class"), exports);
63
65
  __exportStar(require("./list-products-with-account-mappings-response-class"), exports);
64
66
  __exportStar(require("./number-range-class"), exports);
67
+ __exportStar(require("./opening-balance-item-dto"), exports);
65
68
  __exportStar(require("./personal-account-class"), exports);
66
69
  __exportStar(require("./post-financial-event-request-dto"), exports);
67
70
  __exportStar(require("./post-financial-event-response-class"), exports);
@@ -0,0 +1,41 @@
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 OpeningBalanceItemDto
16
+ */
17
+ export interface OpeningBalanceItemDto {
18
+ /**
19
+ * The financial account this opening balance is entered or restated for.
20
+ * @type {string}
21
+ * @memberof OpeningBalanceItemDto
22
+ */
23
+ 'financialAccountNumber': string;
24
+ /**
25
+ * The confirmed opening balance amount, expressed as a non-negative integer in the smallest currency unit (e.g. cents) — NOT a delta. Direction is carried separately by debitCredit, never by sign. Zero is meaningful: an account with no history and a confirmed balance of zero needs no entry (nothing is booked), and one that already has history can be restated down to exactly zero, which a nonzero-to-zero correction has no other way to express.
26
+ * @type {number}
27
+ * @memberof OpeningBalanceItemDto
28
+ */
29
+ 'amountInCents': number;
30
+ /**
31
+ * Whether the opening balance sits on the debit or credit side of the account.
32
+ * @type {string}
33
+ * @memberof OpeningBalanceItemDto
34
+ */
35
+ 'debitCredit': OpeningBalanceItemDtoDebitCreditEnum;
36
+ }
37
+ export declare const OpeningBalanceItemDtoDebitCreditEnum: {
38
+ readonly Debit: "DEBIT";
39
+ readonly Credit: "CREDIT";
40
+ };
41
+ export type OpeningBalanceItemDtoDebitCreditEnum = typeof OpeningBalanceItemDtoDebitCreditEnum[keyof typeof OpeningBalanceItemDtoDebitCreditEnum];
@@ -0,0 +1,20 @@
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.OpeningBalanceItemDtoDebitCreditEnum = void 0;
17
+ exports.OpeningBalanceItemDtoDebitCreditEnum = {
18
+ Debit: 'DEBIT',
19
+ Credit: 'CREDIT'
20
+ };
@@ -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 { OpeningBalanceItemDto } from './opening-balance-item-dto';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface CreateOrCorrectOpeningBalanceDto
22
+ */
23
+ export interface CreateOrCorrectOpeningBalanceDto {
24
+ /**
25
+ * The confirmed opening balance for each account — a first-time entry for one with no history yet, a restatement for one that already has some. The service derives the delta itself against whatever balance it reads (implicitly zero for a first-time entry).
26
+ * @type {Array<OpeningBalanceItemDto>}
27
+ * @memberof CreateOrCorrectOpeningBalanceDto
28
+ */
29
+ 'openingBalances': Array<OpeningBalanceItemDto>;
30
+ }
31
+
@@ -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 CreateOrCorrectOpeningBalanceResponseClass
22
+ */
23
+ export interface CreateOrCorrectOpeningBalanceResponseClass {
24
+ /**
25
+ * The booking entries created — one per item whose confirmed balance differed from its current one (implicitly zero for an account with no history yet). Empty when every item\'s confirmed balance already matched: nothing was booked, and that is success, not an error.
26
+ * @type {Array<BookingEntryClass>}
27
+ * @memberof CreateOrCorrectOpeningBalanceResponseClass
28
+ */
29
+ 'bookingEntries': Array<BookingEntryClass>;
30
+ }
31
+
@@ -72,6 +72,7 @@ export const FinancialTransactionDataDtoDebitCreditEnum = {
72
72
  export type FinancialTransactionDataDtoDebitCreditEnum = typeof FinancialTransactionDataDtoDebitCreditEnum[keyof typeof FinancialTransactionDataDtoDebitCreditEnum];
73
73
  export const FinancialTransactionDataDtoTransactionTypeEnum = {
74
74
  OpeningBalance: 'OPENING_BALANCE',
75
+ OpeningBalanceCorrection: 'OPENING_BALANCE_CORRECTION',
75
76
  Adjustment: 'ADJUSTMENT',
76
77
  Normal: 'NORMAL'
77
78
  } as const;
package/models/index.ts CHANGED
@@ -20,6 +20,8 @@ export * from './create-financial-account-request-dto';
20
20
  export * from './create-financial-account-response-class';
21
21
  export * from './create-number-range-request-dto';
22
22
  export * from './create-number-range-response-class';
23
+ export * from './create-or-correct-opening-balance-dto';
24
+ export * from './create-or-correct-opening-balance-response-class';
23
25
  export * from './create-personal-account-request-dto';
24
26
  export * from './create-personal-account-response-class';
25
27
  export * from './export-accounting-config-response-class';
@@ -46,6 +48,7 @@ export * from './list-personal-accounts-response-class';
46
48
  export * from './list-product-account-mappings-response-class';
47
49
  export * from './list-products-with-account-mappings-response-class';
48
50
  export * from './number-range-class';
51
+ export * from './opening-balance-item-dto';
49
52
  export * from './personal-account-class';
50
53
  export * from './post-financial-event-request-dto';
51
54
  export * from './post-financial-event-response-class';
@@ -0,0 +1,50 @@
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 OpeningBalanceItemDto
21
+ */
22
+ export interface OpeningBalanceItemDto {
23
+ /**
24
+ * The financial account this opening balance is entered or restated for.
25
+ * @type {string}
26
+ * @memberof OpeningBalanceItemDto
27
+ */
28
+ 'financialAccountNumber': string;
29
+ /**
30
+ * The confirmed opening balance amount, expressed as a non-negative integer in the smallest currency unit (e.g. cents) — NOT a delta. Direction is carried separately by debitCredit, never by sign. Zero is meaningful: an account with no history and a confirmed balance of zero needs no entry (nothing is booked), and one that already has history can be restated down to exactly zero, which a nonzero-to-zero correction has no other way to express.
31
+ * @type {number}
32
+ * @memberof OpeningBalanceItemDto
33
+ */
34
+ 'amountInCents': number;
35
+ /**
36
+ * Whether the opening balance sits on the debit or credit side of the account.
37
+ * @type {string}
38
+ * @memberof OpeningBalanceItemDto
39
+ */
40
+ 'debitCredit': OpeningBalanceItemDtoDebitCreditEnum;
41
+ }
42
+
43
+ export const OpeningBalanceItemDtoDebitCreditEnum = {
44
+ Debit: 'DEBIT',
45
+ Credit: 'CREDIT'
46
+ } as const;
47
+
48
+ export type OpeningBalanceItemDtoDebitCreditEnum = typeof OpeningBalanceItemDtoDebitCreditEnum[keyof typeof OpeningBalanceItemDtoDebitCreditEnum];
49
+
50
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/accounting-sdk-node",
3
- "version": "1.32.1-beta.32",
3
+ "version": "1.32.1-beta.33",
4
4
  "description": "OpenAPI client for @emilgroup/accounting-sdk-node",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [