@emilgroup/accounting-sdk-node 1.32.1-beta.1 → 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
@@ -107,13 +107,14 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
107
107
  createAndEnableSubledger: function (createAndEnableSubledgerRequestDto, authorization, options) {
108
108
  if (options === void 0) { options = {}; }
109
109
  return __awaiter(_this, void 0, void 0, function () {
110
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
- return __generator(this, function (_a) {
112
- switch (_a.label) {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
111
+ var _a;
112
+ return __generator(this, function (_b) {
113
+ switch (_b.label) {
113
114
  case 0:
114
115
  // verify required parameter 'createAndEnableSubledgerRequestDto' is not null or undefined
115
116
  (0, common_1.assertParamExists)('createAndEnableSubledger', 'createAndEnableSubledgerRequestDto', createAndEnableSubledgerRequestDto);
116
- localVarPath = "/accountingservice/v1/accountingconfigs";
117
+ localVarPath = "/accountingservice/v1/subledger";
117
118
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
118
119
  if (configuration) {
119
120
  baseOptions = configuration.baseOptions;
@@ -124,13 +125,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
124
125
  localVarQueryParameter = {};
125
126
  // authentication bearer required
126
127
  // http bearer authentication required
127
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
129
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
130
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
131
+ ];
128
132
  case 1:
129
133
  // authentication bearer required
130
134
  // http bearer authentication required
131
- _a.sent();
132
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
135
+ _b.sent();
136
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
137
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
138
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
139
+ if (authorizationValue || authorizationKeepEmpty) {
140
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
134
141
  }
135
142
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
143
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -156,13 +163,14 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
156
163
  createAndEnableSubledgerFromFile: function (file, authorization, options) {
157
164
  if (options === void 0) { options = {}; }
158
165
  return __awaiter(_this, void 0, void 0, function () {
159
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
160
- return __generator(this, function (_a) {
161
- switch (_a.label) {
166
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
167
+ var _a;
168
+ return __generator(this, function (_b) {
169
+ switch (_b.label) {
162
170
  case 0:
163
171
  // verify required parameter 'file' is not null or undefined
164
172
  (0, common_1.assertParamExists)('createAndEnableSubledgerFromFile', 'file', file);
165
- localVarPath = "/accountingservice/v1/accountingconfigs/upload";
173
+ localVarPath = "/accountingservice/v1/subledger/upload";
166
174
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
167
175
  if (configuration) {
168
176
  baseOptions = configuration.baseOptions;
@@ -174,13 +182,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
174
182
  localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
175
183
  // authentication bearer required
176
184
  // http bearer authentication required
177
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
185
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
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
+ ];
178
189
  case 1:
179
190
  // authentication bearer required
180
191
  // http bearer authentication required
181
- _a.sent();
182
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
192
+ _b.sent();
193
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
194
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
195
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
196
+ if (authorizationValue || authorizationKeepEmpty) {
197
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
184
198
  }
185
199
  if (file !== undefined) {
186
200
  localVarFormParams.append('file', file);
@@ -208,11 +222,12 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
208
222
  exportAccountingConfig: function (authorization, options) {
209
223
  if (options === void 0) { options = {}; }
210
224
  return __awaiter(_this, void 0, void 0, function () {
211
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
212
- return __generator(this, function (_a) {
213
- switch (_a.label) {
225
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
226
+ var _a;
227
+ return __generator(this, function (_b) {
228
+ switch (_b.label) {
214
229
  case 0:
215
- localVarPath = "/accountingservice/v1/accountingconfigs";
230
+ localVarPath = "/accountingservice/v1/subledger/config/export";
216
231
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
217
232
  if (configuration) {
218
233
  baseOptions = configuration.baseOptions;
@@ -223,13 +238,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
223
238
  localVarQueryParameter = {};
224
239
  // authentication bearer required
225
240
  // http bearer authentication required
226
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
241
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
242
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
243
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
244
+ ];
227
245
  case 1:
228
246
  // authentication bearer required
229
247
  // http bearer authentication required
230
- _a.sent();
231
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
232
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
248
+ _b.sent();
249
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
250
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
251
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
252
+ if (authorizationValue || authorizationKeepEmpty) {
253
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
233
254
  }
234
255
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
235
256
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -252,11 +273,12 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
252
273
  getAccountingCategories: function (authorization, options) {
253
274
  if (options === void 0) { options = {}; }
254
275
  return __awaiter(_this, void 0, void 0, function () {
255
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
256
- return __generator(this, function (_a) {
257
- switch (_a.label) {
276
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
277
+ var _a;
278
+ return __generator(this, function (_b) {
279
+ switch (_b.label) {
258
280
  case 0:
259
- localVarPath = "/accountingservice/v1/accountingconfigs/categories";
281
+ localVarPath = "/accountingservice/v1/subledger/categories";
260
282
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
261
283
  if (configuration) {
262
284
  baseOptions = configuration.baseOptions;
@@ -267,13 +289,70 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
267
289
  localVarQueryParameter = {};
268
290
  // authentication bearer required
269
291
  // http bearer authentication required
270
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
292
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
293
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
294
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
295
+ ];
271
296
  case 1:
272
297
  // authentication bearer required
273
298
  // http bearer authentication required
274
- _a.sent();
275
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
276
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
299
+ _b.sent();
300
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
301
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
302
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
303
+ if (authorizationValue || authorizationKeepEmpty) {
304
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
305
+ }
306
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
307
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
308
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
309
+ return [2 /*return*/, {
310
+ url: (0, common_1.toPathString)(localVarUrlObj),
311
+ options: localVarRequestOptions,
312
+ }];
313
+ }
314
+ });
315
+ });
316
+ },
317
+ /**
318
+ * Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
319
+ * @summary Retrieve the get activation snapshot
320
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
321
+ * @param {*} [options] Override http request option.
322
+ * @throws {RequiredError}
323
+ */
324
+ getActivationSnapshot: function (authorization, options) {
325
+ if (options === void 0) { options = {}; }
326
+ return __awaiter(_this, void 0, void 0, function () {
327
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
328
+ var _a;
329
+ return __generator(this, function (_b) {
330
+ switch (_b.label) {
331
+ case 0:
332
+ localVarPath = "/accountingservice/v1/subledger/activation-snapshot";
333
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
334
+ if (configuration) {
335
+ baseOptions = configuration.baseOptions;
336
+ baseAccessToken = configuration.accessToken;
337
+ }
338
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
339
+ localVarHeaderParameter = {};
340
+ localVarQueryParameter = {};
341
+ // authentication bearer required
342
+ // http bearer authentication required
343
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
344
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
345
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
346
+ ];
347
+ case 1:
348
+ // authentication bearer required
349
+ // http bearer authentication required
350
+ _b.sent();
351
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
352
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
353
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
354
+ if (authorizationValue || authorizationKeepEmpty) {
355
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
277
356
  }
278
357
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
279
358
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -296,11 +375,12 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
296
375
  resetSubledger: function (authorization, options) {
297
376
  if (options === void 0) { options = {}; }
298
377
  return __awaiter(_this, void 0, void 0, function () {
299
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
300
- return __generator(this, function (_a) {
301
- switch (_a.label) {
378
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
379
+ var _a;
380
+ return __generator(this, function (_b) {
381
+ switch (_b.label) {
302
382
  case 0:
303
- localVarPath = "/accountingservice/v1/accountingconfigs";
383
+ localVarPath = "/accountingservice/v1/subledger/reset";
304
384
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
305
385
  if (configuration) {
306
386
  baseOptions = configuration.baseOptions;
@@ -311,13 +391,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
311
391
  localVarQueryParameter = {};
312
392
  // authentication bearer required
313
393
  // http bearer authentication required
314
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
394
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
395
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
396
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
397
+ ];
315
398
  case 1:
316
399
  // authentication bearer required
317
400
  // http bearer authentication required
318
- _a.sent();
319
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
320
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
401
+ _b.sent();
402
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
403
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
404
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
405
+ if (authorizationValue || authorizationKeepEmpty) {
406
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
321
407
  }
322
408
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
323
409
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -341,13 +427,14 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
341
427
  validateAccountingConfig: function (validateAccountingConfigRequestDto, authorization, options) {
342
428
  if (options === void 0) { options = {}; }
343
429
  return __awaiter(_this, void 0, void 0, function () {
344
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
345
- return __generator(this, function (_a) {
346
- switch (_a.label) {
430
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
431
+ var _a;
432
+ return __generator(this, function (_b) {
433
+ switch (_b.label) {
347
434
  case 0:
348
435
  // verify required parameter 'validateAccountingConfigRequestDto' is not null or undefined
349
436
  (0, common_1.assertParamExists)('validateAccountingConfig', 'validateAccountingConfigRequestDto', validateAccountingConfigRequestDto);
350
- localVarPath = "/accountingservice/v1/accountingconfigs/validate";
437
+ localVarPath = "/accountingservice/v1/subledger/config/validate";
351
438
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
352
439
  if (configuration) {
353
440
  baseOptions = configuration.baseOptions;
@@ -358,13 +445,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
358
445
  localVarQueryParameter = {};
359
446
  // authentication bearer required
360
447
  // http bearer authentication required
361
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
448
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
449
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
450
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
451
+ ];
362
452
  case 1:
363
453
  // authentication bearer required
364
454
  // http bearer authentication required
365
- _a.sent();
366
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
367
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
455
+ _b.sent();
456
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
457
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
458
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
459
+ if (authorizationValue || authorizationKeepEmpty) {
460
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
368
461
  }
369
462
  localVarHeaderParameter['Content-Type'] = 'application/json';
370
463
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -390,13 +483,14 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
390
483
  validateAccountingConfigFromFile: function (file, authorization, options) {
391
484
  if (options === void 0) { options = {}; }
392
485
  return __awaiter(_this, void 0, void 0, function () {
393
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
394
- return __generator(this, function (_a) {
395
- switch (_a.label) {
486
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
487
+ var _a;
488
+ return __generator(this, function (_b) {
489
+ switch (_b.label) {
396
490
  case 0:
397
491
  // verify required parameter 'file' is not null or undefined
398
492
  (0, common_1.assertParamExists)('validateAccountingConfigFromFile', 'file', file);
399
- localVarPath = "/accountingservice/v1/accountingconfigs/validate/upload";
493
+ localVarPath = "/accountingservice/v1/subledger/config/validate/upload";
400
494
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
401
495
  if (configuration) {
402
496
  baseOptions = configuration.baseOptions;
@@ -408,13 +502,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
408
502
  localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
409
503
  // authentication bearer required
410
504
  // http bearer authentication required
411
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
505
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
506
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
507
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
508
+ ];
412
509
  case 1:
413
510
  // authentication bearer required
414
511
  // http bearer authentication required
415
- _a.sent();
416
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
417
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
512
+ _b.sent();
513
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
514
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
515
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
516
+ if (authorizationValue || authorizationKeepEmpty) {
517
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
418
518
  }
419
519
  if (file !== undefined) {
420
520
  localVarFormParams.append('file', file);
@@ -524,6 +624,26 @@ var AccountingConfigsApiFp = function (configuration) {
524
624
  });
525
625
  });
526
626
  },
627
+ /**
628
+ * Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
629
+ * @summary Retrieve the get activation snapshot
630
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
631
+ * @param {*} [options] Override http request option.
632
+ * @throws {RequiredError}
633
+ */
634
+ getActivationSnapshot: function (authorization, options) {
635
+ return __awaiter(this, void 0, void 0, function () {
636
+ var localVarAxiosArgs;
637
+ return __generator(this, function (_a) {
638
+ switch (_a.label) {
639
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getActivationSnapshot(authorization, options)];
640
+ case 1:
641
+ localVarAxiosArgs = _a.sent();
642
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
643
+ }
644
+ });
645
+ });
646
+ },
527
647
  /**
528
648
  * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
529
649
  * @summary Delete the reset subledger
@@ -638,6 +758,16 @@ var AccountingConfigsApiFactory = function (configuration, basePath, axios) {
638
758
  getAccountingCategories: function (authorization, options) {
639
759
  return localVarFp.getAccountingCategories(authorization, options).then(function (request) { return request(axios, basePath); });
640
760
  },
761
+ /**
762
+ * Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
763
+ * @summary Retrieve the get activation snapshot
764
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
765
+ * @param {*} [options] Override http request option.
766
+ * @throws {RequiredError}
767
+ */
768
+ getActivationSnapshot: function (authorization, options) {
769
+ return localVarFp.getActivationSnapshot(authorization, options).then(function (request) { return request(axios, basePath); });
770
+ },
641
771
  /**
642
772
  * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
643
773
  * @summary Delete the reset subledger
@@ -694,7 +824,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
694
824
  */
695
825
  AccountingConfigsApi.prototype.createAndEnableSubledger = function (requestParameters, options) {
696
826
  var _this = this;
697
- return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledger(requestParameters.createAndEnableSubledgerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
827
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledger(requestParameters.createAndEnableSubledgerRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
698
828
  };
699
829
  /**
700
830
  * This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
@@ -706,7 +836,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
706
836
  */
707
837
  AccountingConfigsApi.prototype.createAndEnableSubledgerFromFile = function (requestParameters, options) {
708
838
  var _this = this;
709
- return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledgerFromFile(requestParameters.file, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
839
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledgerFromFile(requestParameters.file, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
710
840
  };
711
841
  /**
712
842
  * This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
@@ -719,7 +849,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
719
849
  AccountingConfigsApi.prototype.exportAccountingConfig = function (requestParameters, options) {
720
850
  var _this = this;
721
851
  if (requestParameters === void 0) { requestParameters = {}; }
722
- return (0, exports.AccountingConfigsApiFp)(this.configuration).exportAccountingConfig(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
852
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).exportAccountingConfig(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
723
853
  };
724
854
  /**
725
855
  * This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
@@ -732,7 +862,20 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
732
862
  AccountingConfigsApi.prototype.getAccountingCategories = function (requestParameters, options) {
733
863
  var _this = this;
734
864
  if (requestParameters === void 0) { requestParameters = {}; }
735
- return (0, exports.AccountingConfigsApiFp)(this.configuration).getAccountingCategories(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
865
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).getAccountingCategories(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
866
+ };
867
+ /**
868
+ * Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
869
+ * @summary Retrieve the get activation snapshot
870
+ * @param {AccountingConfigsApiGetActivationSnapshotRequest} requestParameters Request parameters.
871
+ * @param {*} [options] Override http request option.
872
+ * @throws {RequiredError}
873
+ * @memberof AccountingConfigsApi
874
+ */
875
+ AccountingConfigsApi.prototype.getActivationSnapshot = function (requestParameters, options) {
876
+ var _this = this;
877
+ if (requestParameters === void 0) { requestParameters = {}; }
878
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).getActivationSnapshot(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
736
879
  };
737
880
  /**
738
881
  * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
@@ -745,7 +888,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
745
888
  AccountingConfigsApi.prototype.resetSubledger = function (requestParameters, options) {
746
889
  var _this = this;
747
890
  if (requestParameters === void 0) { requestParameters = {}; }
748
- return (0, exports.AccountingConfigsApiFp)(this.configuration).resetSubledger(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
891
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).resetSubledger(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
749
892
  };
750
893
  /**
751
894
  * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
@@ -757,7 +900,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
757
900
  */
758
901
  AccountingConfigsApi.prototype.validateAccountingConfig = function (requestParameters, options) {
759
902
  var _this = this;
760
- return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfig(requestParameters.validateAccountingConfigRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
903
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfig(requestParameters.validateAccountingConfigRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
761
904
  };
762
905
  /**
763
906
  * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
@@ -769,7 +912,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
769
912
  */
770
913
  AccountingConfigsApi.prototype.validateAccountingConfigFromFile = function (requestParameters, options) {
771
914
  var _this = this;
772
- return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfigFromFile(requestParameters.file, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
915
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfigFromFile(requestParameters.file, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
773
916
  };
774
917
  return AccountingConfigsApi;
775
918
  }(base_1.BaseAPI));