@emilgroup/accounting-sdk 1.34.1-beta.9 → 1.34.1-beta.91

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.
Files changed (180) hide show
  1. package/.openapi-generator/FILES +35 -1
  2. package/README.md +2 -2
  3. package/api/accounting-configs-api.ts +85 -45
  4. package/api/booking-entries-api.ts +252 -13
  5. package/api/commission-account-mappings-api.ts +1231 -0
  6. package/api/financial-accounts-api.ts +56 -31
  7. package/api/financial-transactions-api.ts +16 -6
  8. package/api/health-api.ts +1 -1
  9. package/api/number-ranges-api.ts +32 -12
  10. package/api/personal-accounts-api.ts +32 -12
  11. package/api/product-account-mappings-api.ts +1751 -0
  12. package/api.ts +4 -0
  13. package/base.ts +239 -43
  14. package/common.ts +3 -2
  15. package/configuration.ts +20 -0
  16. package/dist/api/accounting-configs-api.d.ts +25 -25
  17. package/dist/api/accounting-configs-api.js +136 -80
  18. package/dist/api/booking-entries-api.d.ts +121 -7
  19. package/dist/api/booking-entries-api.js +241 -26
  20. package/dist/api/commission-account-mappings-api.d.ts +685 -0
  21. package/dist/api/commission-account-mappings-api.js +1051 -0
  22. package/dist/api/financial-accounts-api.d.ts +21 -21
  23. package/dist/api/financial-accounts-api.js +81 -52
  24. package/dist/api/financial-transactions-api.d.ts +2 -2
  25. package/dist/api/financial-transactions-api.js +22 -14
  26. package/dist/api/health-api.d.ts +1 -1
  27. package/dist/api/health-api.js +1 -1
  28. package/dist/api/number-ranges-api.d.ts +4 -4
  29. package/dist/api/number-ranges-api.js +52 -30
  30. package/dist/api/personal-accounts-api.d.ts +4 -4
  31. package/dist/api/personal-accounts-api.js +52 -30
  32. package/dist/api/product-account-mappings-api.d.ts +972 -0
  33. package/dist/api/product-account-mappings-api.js +1493 -0
  34. package/dist/api.d.ts +2 -0
  35. package/dist/api.js +2 -0
  36. package/dist/base.d.ts +26 -0
  37. package/dist/base.js +243 -60
  38. package/dist/common.d.ts +1 -1
  39. package/dist/common.js +1 -0
  40. package/dist/configuration.d.ts +17 -0
  41. package/dist/configuration.js +2 -0
  42. package/dist/models/account-mapping-class.d.ts +2 -0
  43. package/dist/models/account-mapping-class.js +3 -1
  44. package/dist/models/accounting-config-class.d.ts +11 -0
  45. package/dist/models/accounting-config-class.js +5 -0
  46. package/dist/models/accounting-config-data-class.d.ts +7 -0
  47. package/dist/models/accounting-config-data-dto-default-account-mappings.d.ts +8 -0
  48. package/dist/models/accounting-config-data-dto-default-account-mappings.js +3 -1
  49. package/dist/models/accounting-config-data-dto.d.ts +7 -0
  50. package/dist/models/booking-entry-class.d.ts +35 -0
  51. package/dist/models/booking-entry-class.js +11 -1
  52. package/dist/models/commission-account-mapping-class.d.ts +49 -0
  53. package/dist/models/commission-agreement-account-mapping-detail-class.d.ts +44 -0
  54. package/dist/models/commission-agreement-account-mapping-detail-class.js +15 -0
  55. package/dist/models/commission-agreement-partner-class.d.ts +30 -0
  56. package/dist/models/commission-agreement-partner-class.js +15 -0
  57. package/dist/models/commission-agreement-with-account-mapping-class.d.ts +43 -0
  58. package/dist/models/commission-agreement-with-account-mapping-class.js +15 -0
  59. package/dist/models/commission-type-account-mapping-class.d.ts +31 -0
  60. package/dist/models/commission-type-account-mapping-class.js +15 -0
  61. package/dist/models/create-booking-entry-request-dto.d.ts +22 -0
  62. package/dist/models/create-booking-entry-request-dto.js +10 -0
  63. package/dist/models/create-financial-account-request-dto.d.ts +8 -0
  64. package/dist/models/create-financial-account-request-dto.js +3 -1
  65. package/dist/models/create-or-correct-opening-balance-dto.d.ts +25 -0
  66. package/dist/models/create-or-correct-opening-balance-dto.js +15 -0
  67. package/dist/models/create-or-correct-opening-balance-response-class.d.ts +25 -0
  68. package/dist/models/create-or-correct-opening-balance-response-class.js +15 -0
  69. package/dist/models/financial-account-class.d.ts +18 -1
  70. package/dist/models/financial-account-class.js +5 -1
  71. package/dist/models/financial-transaction-class.d.ts +6 -0
  72. package/dist/models/financial-transaction-data-dto.d.ts +7 -0
  73. package/dist/models/financial-transaction-data-dto.js +1 -0
  74. package/dist/models/get-activation-snapshot-response-class.d.ts +25 -0
  75. package/dist/models/get-activation-snapshot-response-class.js +15 -0
  76. package/dist/models/index.d.ts +33 -1
  77. package/dist/models/index.js +33 -1
  78. package/dist/models/list-commission-account-mappings-response-class.d.ts +43 -0
  79. package/dist/models/list-commission-account-mappings-response-class.js +15 -0
  80. package/dist/models/list-commission-agreements-with-account-mappings-response-class.d.ts +43 -0
  81. package/dist/models/list-commission-agreements-with-account-mappings-response-class.js +15 -0
  82. package/dist/models/list-commission-type-account-mappings-response-class.d.ts +43 -0
  83. package/dist/models/list-commission-type-account-mappings-response-class.js +15 -0
  84. package/dist/models/list-product-account-mappings-response-class.d.ts +43 -0
  85. package/dist/models/list-product-account-mappings-response-class.js +15 -0
  86. package/dist/models/list-products-with-account-mappings-response-class.d.ts +43 -0
  87. package/dist/models/list-products-with-account-mappings-response-class.js +15 -0
  88. package/dist/models/opening-balance-item-dto.d.ts +41 -0
  89. package/dist/models/opening-balance-item-dto.js +20 -0
  90. package/dist/models/personal-account-class.d.ts +6 -0
  91. package/dist/models/personal-account-range-class.d.ts +42 -0
  92. package/dist/models/personal-account-range-class.js +21 -0
  93. package/dist/models/personal-account-range-dto.d.ts +42 -0
  94. package/dist/models/personal-account-range-dto.js +21 -0
  95. package/dist/models/post-financial-event-request-dto.d.ts +46 -0
  96. package/dist/models/post-financial-event-request-dto.js +25 -0
  97. package/dist/models/post-financial-event-response-class.d.ts +25 -0
  98. package/dist/models/post-financial-event-response-class.js +15 -0
  99. package/dist/models/premium-item-account-mapping-class.d.ts +37 -0
  100. package/dist/models/premium-item-account-mapping-class.js +15 -0
  101. package/dist/models/product-account-mapping-class.d.ts +61 -0
  102. package/dist/models/product-account-mapping-class.js +15 -0
  103. package/dist/models/product-account-mapping-detail-class.d.ts +56 -0
  104. package/dist/models/product-account-mapping-detail-class.js +15 -0
  105. package/dist/models/product-risk-carrier-class.d.ts +42 -0
  106. package/dist/models/product-risk-carrier-class.js +15 -0
  107. package/dist/models/product-version-account-mapping-detail-class.d.ts +50 -0
  108. package/dist/models/product-version-account-mapping-detail-class.js +15 -0
  109. package/dist/models/product-version-with-account-mappings-class.d.ts +42 -0
  110. package/dist/models/product-version-with-account-mappings-class.js +15 -0
  111. package/dist/models/product-with-account-mappings-class.d.ts +49 -0
  112. package/dist/models/product-with-account-mappings-class.js +15 -0
  113. package/dist/models/put-premium-item-account-body-dto.d.ts +24 -0
  114. package/dist/models/put-premium-item-account-body-dto.js +15 -0
  115. package/dist/models/put-product-category-account-body-dto.d.ts +24 -0
  116. package/dist/models/put-product-category-account-body-dto.js +15 -0
  117. package/dist/models/put-product-risk-carrier-body-dto.d.ts +24 -0
  118. package/dist/models/put-product-risk-carrier-body-dto.js +15 -0
  119. package/dist/models/put-product-version-category-account-body-dto.d.ts +24 -0
  120. package/dist/models/put-product-version-category-account-body-dto.js +15 -0
  121. package/dist/models/resolved-account-mapping-class.d.ts +31 -0
  122. package/dist/models/resolved-account-mapping-class.js +15 -0
  123. package/dist/models/resolved-commission-account-mapping-class.d.ts +37 -0
  124. package/dist/models/resolved-commission-account-mapping-class.js +21 -0
  125. package/dist/models/update-commission-agreement-account-body-dto.d.ts +24 -0
  126. package/dist/models/update-commission-agreement-account-body-dto.js +15 -0
  127. package/dist/models/update-commission-type-account-body-dto.d.ts +24 -0
  128. package/dist/models/update-commission-type-account-body-dto.js +15 -0
  129. package/dist/models/update-financial-account-body-dto.d.ts +6 -0
  130. package/models/account-mapping-class.ts +3 -1
  131. package/models/accounting-config-class.ts +14 -0
  132. package/models/accounting-config-data-class.ts +7 -0
  133. package/models/accounting-config-data-dto-default-account-mappings.ts +9 -1
  134. package/models/accounting-config-data-dto.ts +7 -0
  135. package/models/booking-entry-class.ts +36 -0
  136. package/models/commission-account-mapping-class.ts +55 -0
  137. package/models/commission-agreement-account-mapping-detail-class.ts +50 -0
  138. package/models/commission-agreement-partner-class.ts +36 -0
  139. package/models/commission-agreement-with-account-mapping-class.ts +49 -0
  140. package/models/commission-type-account-mapping-class.ts +37 -0
  141. package/models/create-booking-entry-request-dto.ts +25 -0
  142. package/models/create-financial-account-request-dto.ts +9 -1
  143. package/models/create-or-correct-opening-balance-dto.ts +31 -0
  144. package/models/create-or-correct-opening-balance-response-class.ts +31 -0
  145. package/models/financial-account-class.ts +19 -1
  146. package/models/financial-transaction-class.ts +6 -0
  147. package/models/financial-transaction-data-dto.ts +7 -0
  148. package/models/get-activation-snapshot-response-class.ts +31 -0
  149. package/models/index.ts +33 -1
  150. package/models/list-commission-account-mappings-response-class.ts +49 -0
  151. package/models/list-commission-agreements-with-account-mappings-response-class.ts +49 -0
  152. package/models/list-commission-type-account-mappings-response-class.ts +49 -0
  153. package/models/list-product-account-mappings-response-class.ts +49 -0
  154. package/models/list-products-with-account-mappings-response-class.ts +49 -0
  155. package/models/opening-balance-item-dto.ts +50 -0
  156. package/models/personal-account-class.ts +6 -0
  157. package/models/personal-account-range-class.ts +51 -0
  158. package/models/personal-account-range-dto.ts +51 -0
  159. package/models/post-financial-event-request-dto.ts +55 -0
  160. package/models/post-financial-event-response-class.ts +31 -0
  161. package/models/premium-item-account-mapping-class.ts +43 -0
  162. package/models/product-account-mapping-class.ts +67 -0
  163. package/models/product-account-mapping-detail-class.ts +62 -0
  164. package/models/product-risk-carrier-class.ts +48 -0
  165. package/models/product-version-account-mapping-detail-class.ts +56 -0
  166. package/models/product-version-with-account-mappings-class.ts +48 -0
  167. package/models/product-with-account-mappings-class.ts +55 -0
  168. package/models/put-premium-item-account-body-dto.ts +30 -0
  169. package/models/put-product-category-account-body-dto.ts +30 -0
  170. package/models/put-product-risk-carrier-body-dto.ts +30 -0
  171. package/models/put-product-version-category-account-body-dto.ts +30 -0
  172. package/models/resolved-account-mapping-class.ts +37 -0
  173. package/models/resolved-commission-account-mapping-class.ts +46 -0
  174. package/models/update-commission-agreement-account-body-dto.ts +30 -0
  175. package/models/update-commission-type-account-body-dto.ts +30 -0
  176. package/models/update-financial-account-body-dto.ts +6 -0
  177. package/package.json +2 -2
  178. package/dist/models/get-subledger-settings-response-class.d.ts +0 -36
  179. package/models/get-subledger-settings-response-class.ts +0 -42
  180. /package/dist/models/{get-subledger-settings-response-class.js → commission-account-mapping-class.js} +0 -0
@@ -25,9 +25,17 @@ 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';
35
+ // @ts-ignore
36
+ import { PostFinancialEventRequestDto } from '../models';
37
+ // @ts-ignore
38
+ import { PostFinancialEventResponseClass } from '../models';
31
39
  /**
32
40
  * BookingEntriesApi - axios parameter creator
33
41
  * @export
@@ -63,8 +71,13 @@ export const BookingEntriesApiAxiosParamCreator = function (configuration?: Conf
63
71
  // http bearer authentication required
64
72
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
65
73
 
66
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
67
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
74
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
75
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
76
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
77
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
78
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
79
+ if (authorizationValue || authorizationKeepEmpty) {
80
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
68
81
  }
69
82
 
70
83
 
@@ -81,6 +94,58 @@ export const BookingEntriesApiAxiosParamCreator = function (configuration?: Conf
81
94
  options: localVarRequestOptions,
82
95
  };
83
96
  },
97
+ /**
98
+ * 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\"
99
+ * @summary Update the create or correct opening balance
100
+ * @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
101
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
102
+ * @param {*} [options] Override http request option.
103
+ * @throws {RequiredError}
104
+ */
105
+ createOrCorrectOpeningBalance: async (createOrCorrectOpeningBalanceDto: CreateOrCorrectOpeningBalanceDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
106
+ // verify required parameter 'createOrCorrectOpeningBalanceDto' is not null or undefined
107
+ assertParamExists('createOrCorrectOpeningBalance', 'createOrCorrectOpeningBalanceDto', createOrCorrectOpeningBalanceDto)
108
+ const localVarPath = `/accountingservice/v1/booking-entries/opening-balances`;
109
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
110
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
111
+ let baseOptions;
112
+ let baseAccessToken;
113
+ if (configuration) {
114
+ baseOptions = configuration.baseOptions;
115
+ baseAccessToken = configuration.accessToken;
116
+ }
117
+
118
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
119
+ const localVarHeaderParameter = {} as any;
120
+ const localVarQueryParameter = {} as any;
121
+
122
+ // authentication bearer required
123
+ // http bearer authentication required
124
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
125
+
126
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
127
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
128
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
129
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
130
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
131
+ if (authorizationValue || authorizationKeepEmpty) {
132
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
133
+ }
134
+
135
+
136
+
137
+ localVarHeaderParameter['Content-Type'] = 'application/json';
138
+
139
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
140
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
141
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
142
+ localVarRequestOptions.data = serializeDataIfNeeded(createOrCorrectOpeningBalanceDto, localVarRequestOptions, configuration)
143
+
144
+ return {
145
+ url: toPathString(localVarUrlObj),
146
+ options: localVarRequestOptions,
147
+ };
148
+ },
84
149
  /**
85
150
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
86
151
  * @summary Retrieve the booking entry
@@ -118,8 +183,13 @@ export const BookingEntriesApiAxiosParamCreator = function (configuration?: Conf
118
183
  localVarQueryParameter['expand'] = expand;
119
184
  }
120
185
 
121
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
122
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
186
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
187
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
188
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
189
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
190
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
191
+ if (authorizationValue || authorizationKeepEmpty) {
192
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
123
193
  }
124
194
 
125
195
 
@@ -134,7 +204,7 @@ export const BookingEntriesApiAxiosParamCreator = function (configuration?: Conf
134
204
  };
135
205
  },
136
206
  /**
137
- * This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
207
+ * This endpoint gets booking entries. Without an explicit `order` they come back newest booking date first (`bookingDate:DESC`), with the entry id ascending as the tie-break for same-day bookings. **Required Permissions** \"accounting-management.entries.view\"
138
208
  * @summary List booking entries
139
209
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
140
210
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
@@ -194,8 +264,13 @@ export const BookingEntriesApiAxiosParamCreator = function (configuration?: Conf
194
264
  localVarQueryParameter['filters'] = filters;
195
265
  }
196
266
 
197
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
198
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
267
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
268
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
269
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
270
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
271
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
272
+ if (authorizationValue || authorizationKeepEmpty) {
273
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
199
274
  }
200
275
 
201
276
 
@@ -204,6 +279,58 @@ export const BookingEntriesApiAxiosParamCreator = function (configuration?: Conf
204
279
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
205
280
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
206
281
 
282
+ return {
283
+ url: toPathString(localVarUrlObj),
284
+ options: localVarRequestOptions,
285
+ };
286
+ },
287
+ /**
288
+ * This endpoint posts the booking entry for an existing invoice, payment, exceeding credit, credit allocation, commission, claim regulation or payment receipt on demand. A credit allocation books nothing, so it always fails with a precondition error. 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\"
289
+ * @summary Create the booking entry from a source entity
290
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
291
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
292
+ * @param {*} [options] Override http request option.
293
+ * @throws {RequiredError}
294
+ */
295
+ postFinancialEvent: async (postFinancialEventRequestDto: PostFinancialEventRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
296
+ // verify required parameter 'postFinancialEventRequestDto' is not null or undefined
297
+ assertParamExists('postFinancialEvent', 'postFinancialEventRequestDto', postFinancialEventRequestDto)
298
+ const localVarPath = `/accountingservice/v1/booking-entries/post-financial-event`;
299
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
300
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
301
+ let baseOptions;
302
+ let baseAccessToken;
303
+ if (configuration) {
304
+ baseOptions = configuration.baseOptions;
305
+ baseAccessToken = configuration.accessToken;
306
+ }
307
+
308
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
309
+ const localVarHeaderParameter = {} as any;
310
+ const localVarQueryParameter = {} as any;
311
+
312
+ // authentication bearer required
313
+ // http bearer authentication required
314
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
315
+
316
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
317
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
318
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
319
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
320
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
321
+ if (authorizationValue || authorizationKeepEmpty) {
322
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
323
+ }
324
+
325
+
326
+
327
+ localVarHeaderParameter['Content-Type'] = 'application/json';
328
+
329
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
330
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
331
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
332
+ localVarRequestOptions.data = serializeDataIfNeeded(postFinancialEventRequestDto, localVarRequestOptions, configuration)
333
+
207
334
  return {
208
335
  url: toPathString(localVarUrlObj),
209
336
  options: localVarRequestOptions,
@@ -231,6 +358,18 @@ export const BookingEntriesApiFp = function(configuration?: Configuration) {
231
358
  const localVarAxiosArgs = await localVarAxiosParamCreator.createBookingEntry(createBookingEntryRequestDto, authorization, options);
232
359
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
233
360
  },
361
+ /**
362
+ * 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\"
363
+ * @summary Update the create or correct opening balance
364
+ * @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
365
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
366
+ * @param {*} [options] Override http request option.
367
+ * @throws {RequiredError}
368
+ */
369
+ async createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto: CreateOrCorrectOpeningBalanceDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateOrCorrectOpeningBalanceResponseClass>> {
370
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto, authorization, options);
371
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
372
+ },
234
373
  /**
235
374
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
236
375
  * @summary Retrieve the booking entry
@@ -245,7 +384,7 @@ export const BookingEntriesApiFp = function(configuration?: Configuration) {
245
384
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
246
385
  },
247
386
  /**
248
- * This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
387
+ * This endpoint gets booking entries. Without an explicit `order` they come back newest booking date first (`bookingDate:DESC`), with the entry id ascending as the tie-break for same-day bookings. **Required Permissions** \"accounting-management.entries.view\"
249
388
  * @summary List booking entries
250
389
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
251
390
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
@@ -262,6 +401,18 @@ export const BookingEntriesApiFp = function(configuration?: Configuration) {
262
401
  const localVarAxiosArgs = await localVarAxiosParamCreator.listBookingEntries(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
263
402
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
264
403
  },
404
+ /**
405
+ * This endpoint posts the booking entry for an existing invoice, payment, exceeding credit, credit allocation, commission, claim regulation or payment receipt on demand. A credit allocation books nothing, so it always fails with a precondition error. 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\"
406
+ * @summary Create the booking entry from a source entity
407
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
408
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
409
+ * @param {*} [options] Override http request option.
410
+ * @throws {RequiredError}
411
+ */
412
+ async postFinancialEvent(postFinancialEventRequestDto: PostFinancialEventRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostFinancialEventResponseClass>> {
413
+ const localVarAxiosArgs = await localVarAxiosParamCreator.postFinancialEvent(postFinancialEventRequestDto, authorization, options);
414
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
415
+ },
265
416
  }
266
417
  };
267
418
 
@@ -283,6 +434,17 @@ export const BookingEntriesApiFactory = function (configuration?: Configuration,
283
434
  createBookingEntry(createBookingEntryRequestDto: CreateBookingEntryRequestDto, authorization?: string, options?: any): AxiosPromise<CreateBookingEntryResponseClass> {
284
435
  return localVarFp.createBookingEntry(createBookingEntryRequestDto, authorization, options).then((request) => request(axios, basePath));
285
436
  },
437
+ /**
438
+ * 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\"
439
+ * @summary Update the create or correct opening balance
440
+ * @param {CreateOrCorrectOpeningBalanceDto} createOrCorrectOpeningBalanceDto
441
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
442
+ * @param {*} [options] Override http request option.
443
+ * @throws {RequiredError}
444
+ */
445
+ createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto: CreateOrCorrectOpeningBalanceDto, authorization?: string, options?: any): AxiosPromise<CreateOrCorrectOpeningBalanceResponseClass> {
446
+ return localVarFp.createOrCorrectOpeningBalance(createOrCorrectOpeningBalanceDto, authorization, options).then((request) => request(axios, basePath));
447
+ },
286
448
  /**
287
449
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
288
450
  * @summary Retrieve the booking entry
@@ -296,7 +458,7 @@ export const BookingEntriesApiFactory = function (configuration?: Configuration,
296
458
  return localVarFp.getBookingEntry(code, expand, authorization, options).then((request) => request(axios, basePath));
297
459
  },
298
460
  /**
299
- * This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
461
+ * This endpoint gets booking entries. Without an explicit `order` they come back newest booking date first (`bookingDate:DESC`), with the entry id ascending as the tie-break for same-day bookings. **Required Permissions** \"accounting-management.entries.view\"
300
462
  * @summary List booking entries
301
463
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
302
464
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
@@ -312,6 +474,17 @@ export const BookingEntriesApiFactory = function (configuration?: Configuration,
312
474
  listBookingEntries(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListBookingEntriesResponseClass> {
313
475
  return localVarFp.listBookingEntries(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
314
476
  },
477
+ /**
478
+ * This endpoint posts the booking entry for an existing invoice, payment, exceeding credit, credit allocation, commission, claim regulation or payment receipt on demand. A credit allocation books nothing, so it always fails with a precondition error. 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\"
479
+ * @summary Create the booking entry from a source entity
480
+ * @param {PostFinancialEventRequestDto} postFinancialEventRequestDto
481
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
482
+ * @param {*} [options] Override http request option.
483
+ * @throws {RequiredError}
484
+ */
485
+ postFinancialEvent(postFinancialEventRequestDto: PostFinancialEventRequestDto, authorization?: string, options?: any): AxiosPromise<PostFinancialEventResponseClass> {
486
+ return localVarFp.postFinancialEvent(postFinancialEventRequestDto, authorization, options).then((request) => request(axios, basePath));
487
+ },
315
488
  };
316
489
  };
317
490
 
@@ -336,6 +509,27 @@ export interface BookingEntriesApiCreateBookingEntryRequest {
336
509
  readonly authorization?: string
337
510
  }
338
511
 
512
+ /**
513
+ * Request parameters for createOrCorrectOpeningBalance operation in BookingEntriesApi.
514
+ * @export
515
+ * @interface BookingEntriesApiCreateOrCorrectOpeningBalanceRequest
516
+ */
517
+ export interface BookingEntriesApiCreateOrCorrectOpeningBalanceRequest {
518
+ /**
519
+ *
520
+ * @type {CreateOrCorrectOpeningBalanceDto}
521
+ * @memberof BookingEntriesApiCreateOrCorrectOpeningBalance
522
+ */
523
+ readonly createOrCorrectOpeningBalanceDto: CreateOrCorrectOpeningBalanceDto
524
+
525
+ /**
526
+ * Bearer Token: provided by the login endpoint under the name accessToken.
527
+ * @type {string}
528
+ * @memberof BookingEntriesApiCreateOrCorrectOpeningBalance
529
+ */
530
+ readonly authorization?: string
531
+ }
532
+
339
533
  /**
340
534
  * Request parameters for getBookingEntry operation in BookingEntriesApi.
341
535
  * @export
@@ -427,6 +621,27 @@ export interface BookingEntriesApiListBookingEntriesRequest {
427
621
  readonly filters?: string
428
622
  }
429
623
 
624
+ /**
625
+ * Request parameters for postFinancialEvent operation in BookingEntriesApi.
626
+ * @export
627
+ * @interface BookingEntriesApiPostFinancialEventRequest
628
+ */
629
+ export interface BookingEntriesApiPostFinancialEventRequest {
630
+ /**
631
+ *
632
+ * @type {PostFinancialEventRequestDto}
633
+ * @memberof BookingEntriesApiPostFinancialEvent
634
+ */
635
+ readonly postFinancialEventRequestDto: PostFinancialEventRequestDto
636
+
637
+ /**
638
+ * Bearer Token: provided by the login endpoint under the name accessToken.
639
+ * @type {string}
640
+ * @memberof BookingEntriesApiPostFinancialEvent
641
+ */
642
+ readonly authorization?: string
643
+ }
644
+
430
645
  /**
431
646
  * BookingEntriesApi - object-oriented interface
432
647
  * @export
@@ -443,7 +658,19 @@ export class BookingEntriesApi extends BaseAPI {
443
658
  * @memberof BookingEntriesApi
444
659
  */
445
660
  public createBookingEntry(requestParameters: BookingEntriesApiCreateBookingEntryRequest, options?: AxiosRequestConfig) {
446
- return BookingEntriesApiFp(this.configuration).createBookingEntry(requestParameters.createBookingEntryRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
661
+ return BookingEntriesApiFp(this.configuration).createBookingEntry(requestParameters.createBookingEntryRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
662
+ }
663
+
664
+ /**
665
+ * 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\"
666
+ * @summary Update the create or correct opening balance
667
+ * @param {BookingEntriesApiCreateOrCorrectOpeningBalanceRequest} requestParameters Request parameters.
668
+ * @param {*} [options] Override http request option.
669
+ * @throws {RequiredError}
670
+ * @memberof BookingEntriesApi
671
+ */
672
+ public createOrCorrectOpeningBalance(requestParameters: BookingEntriesApiCreateOrCorrectOpeningBalanceRequest, options?: AxiosRequestConfig) {
673
+ return BookingEntriesApiFp(this.configuration).createOrCorrectOpeningBalance(requestParameters.createOrCorrectOpeningBalanceDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
447
674
  }
448
675
 
449
676
  /**
@@ -455,11 +682,11 @@ export class BookingEntriesApi extends BaseAPI {
455
682
  * @memberof BookingEntriesApi
456
683
  */
457
684
  public getBookingEntry(requestParameters: BookingEntriesApiGetBookingEntryRequest, options?: AxiosRequestConfig) {
458
- return BookingEntriesApiFp(this.configuration).getBookingEntry(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
685
+ return BookingEntriesApiFp(this.configuration).getBookingEntry(requestParameters.code, requestParameters.expand, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
459
686
  }
460
687
 
461
688
  /**
462
- * This endpoint gets booking entries. **Required Permissions** \"accounting-management.entries.view\"
689
+ * This endpoint gets booking entries. Without an explicit `order` they come back newest booking date first (`bookingDate:DESC`), with the entry id ascending as the tie-break for same-day bookings. **Required Permissions** \"accounting-management.entries.view\"
463
690
  * @summary List booking entries
464
691
  * @param {BookingEntriesApiListBookingEntriesRequest} requestParameters Request parameters.
465
692
  * @param {*} [options] Override http request option.
@@ -467,6 +694,18 @@ export class BookingEntriesApi extends BaseAPI {
467
694
  * @memberof BookingEntriesApi
468
695
  */
469
696
  public listBookingEntries(requestParameters: BookingEntriesApiListBookingEntriesRequest = {}, options?: AxiosRequestConfig) {
470
- 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));
697
+ return BookingEntriesApiFp(this.configuration).listBookingEntries(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
698
+ }
699
+
700
+ /**
701
+ * This endpoint posts the booking entry for an existing invoice, payment, exceeding credit, credit allocation, commission, claim regulation or payment receipt on demand. A credit allocation books nothing, so it always fails with a precondition error. 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\"
702
+ * @summary Create the booking entry from a source entity
703
+ * @param {BookingEntriesApiPostFinancialEventRequest} requestParameters Request parameters.
704
+ * @param {*} [options] Override http request option.
705
+ * @throws {RequiredError}
706
+ * @memberof BookingEntriesApi
707
+ */
708
+ public postFinancialEvent(requestParameters: BookingEntriesApiPostFinancialEventRequest, options?: AxiosRequestConfig) {
709
+ return BookingEntriesApiFp(this.configuration).postFinancialEvent(requestParameters.postFinancialEventRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
471
710
  }
472
711
  }