@emilgroup/accounting-sdk-node 1.32.1-beta.0 → 1.32.1-beta.100

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