@emilgroup/accounting-sdk 1.34.1-beta.0 → 1.34.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 (182) 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 +1231 -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 +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 +54 -7
  17. package/dist/api/accounting-configs-api.js +206 -63
  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 +82 -16
  23. package/dist/api/financial-accounts-api.js +168 -40
  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-account-mapping-class.js +15 -0
  54. package/dist/models/commission-agreement-account-mapping-detail-class.d.ts +44 -0
  55. package/dist/models/commission-agreement-account-mapping-detail-class.js +15 -0
  56. package/dist/models/commission-agreement-partner-class.d.ts +30 -0
  57. package/dist/models/commission-agreement-partner-class.js +15 -0
  58. package/dist/models/commission-agreement-with-account-mapping-class.d.ts +43 -0
  59. package/dist/models/commission-agreement-with-account-mapping-class.js +15 -0
  60. package/dist/models/commission-type-account-mapping-class.d.ts +31 -0
  61. package/dist/models/commission-type-account-mapping-class.js +15 -0
  62. package/dist/models/create-booking-entry-request-dto.d.ts +22 -0
  63. package/dist/models/create-booking-entry-request-dto.js +10 -0
  64. package/dist/models/create-financial-account-request-dto.d.ts +14 -0
  65. package/dist/models/create-financial-account-request-dto.js +3 -1
  66. package/dist/models/create-or-correct-opening-balance-dto.d.ts +25 -0
  67. package/dist/models/create-or-correct-opening-balance-dto.js +15 -0
  68. package/dist/models/create-or-correct-opening-balance-response-class.d.ts +25 -0
  69. package/dist/models/create-or-correct-opening-balance-response-class.js +15 -0
  70. package/dist/models/financial-account-class.d.ts +30 -1
  71. package/dist/models/financial-account-class.js +5 -1
  72. package/dist/models/financial-transaction-class.d.ts +6 -0
  73. package/dist/models/financial-transaction-data-dto.d.ts +7 -0
  74. package/dist/models/financial-transaction-data-dto.js +1 -0
  75. package/dist/models/get-activation-snapshot-response-class.d.ts +25 -0
  76. package/dist/models/get-activation-snapshot-response-class.js +15 -0
  77. package/dist/models/index.d.ts +35 -0
  78. package/dist/models/index.js +35 -0
  79. package/dist/models/list-commission-account-mappings-response-class.d.ts +43 -0
  80. package/dist/models/list-commission-account-mappings-response-class.js +15 -0
  81. package/dist/models/list-commission-agreements-with-account-mappings-response-class.d.ts +43 -0
  82. package/dist/models/list-commission-agreements-with-account-mappings-response-class.js +15 -0
  83. package/dist/models/list-commission-type-account-mappings-response-class.d.ts +43 -0
  84. package/dist/models/list-commission-type-account-mappings-response-class.js +15 -0
  85. package/dist/models/list-product-account-mappings-response-class.d.ts +43 -0
  86. package/dist/models/list-product-account-mappings-response-class.js +15 -0
  87. package/dist/models/list-products-with-account-mappings-response-class.d.ts +43 -0
  88. package/dist/models/list-products-with-account-mappings-response-class.js +15 -0
  89. package/dist/models/opening-balance-item-dto.d.ts +41 -0
  90. package/dist/models/opening-balance-item-dto.js +20 -0
  91. package/dist/models/personal-account-class.d.ts +6 -0
  92. package/dist/models/personal-account-range-class.d.ts +42 -0
  93. package/dist/models/personal-account-range-class.js +21 -0
  94. package/dist/models/personal-account-range-dto.d.ts +42 -0
  95. package/dist/models/personal-account-range-dto.js +21 -0
  96. package/dist/models/post-financial-event-request-dto.d.ts +46 -0
  97. package/dist/models/post-financial-event-request-dto.js +25 -0
  98. package/dist/models/post-financial-event-response-class.d.ts +25 -0
  99. package/dist/models/post-financial-event-response-class.js +15 -0
  100. package/dist/models/premium-item-account-mapping-class.d.ts +37 -0
  101. package/dist/models/premium-item-account-mapping-class.js +15 -0
  102. package/dist/models/product-account-mapping-class.d.ts +61 -0
  103. package/dist/models/product-account-mapping-class.js +15 -0
  104. package/dist/models/product-account-mapping-detail-class.d.ts +56 -0
  105. package/dist/models/product-account-mapping-detail-class.js +15 -0
  106. package/dist/models/product-risk-carrier-class.d.ts +42 -0
  107. package/dist/models/product-risk-carrier-class.js +15 -0
  108. package/dist/models/product-version-account-mapping-detail-class.d.ts +50 -0
  109. package/dist/models/product-version-account-mapping-detail-class.js +15 -0
  110. package/dist/models/product-version-with-account-mappings-class.d.ts +42 -0
  111. package/dist/models/product-version-with-account-mappings-class.js +15 -0
  112. package/dist/models/product-with-account-mappings-class.d.ts +49 -0
  113. package/dist/models/product-with-account-mappings-class.js +15 -0
  114. package/dist/models/put-premium-item-account-body-dto.d.ts +24 -0
  115. package/dist/models/put-premium-item-account-body-dto.js +15 -0
  116. package/dist/models/put-product-category-account-body-dto.d.ts +24 -0
  117. package/dist/models/put-product-category-account-body-dto.js +15 -0
  118. package/dist/models/put-product-risk-carrier-body-dto.d.ts +24 -0
  119. package/dist/models/put-product-risk-carrier-body-dto.js +15 -0
  120. package/dist/models/put-product-version-category-account-body-dto.d.ts +24 -0
  121. package/dist/models/put-product-version-category-account-body-dto.js +15 -0
  122. package/dist/models/resolved-account-mapping-class.d.ts +31 -0
  123. package/dist/models/resolved-account-mapping-class.js +15 -0
  124. package/dist/models/resolved-commission-account-mapping-class.d.ts +37 -0
  125. package/dist/models/resolved-commission-account-mapping-class.js +21 -0
  126. package/dist/models/update-commission-agreement-account-body-dto.d.ts +24 -0
  127. package/dist/models/update-commission-agreement-account-body-dto.js +15 -0
  128. package/dist/models/update-commission-type-account-body-dto.d.ts +24 -0
  129. package/dist/models/update-commission-type-account-body-dto.js +15 -0
  130. package/dist/models/update-financial-account-body-dto.d.ts +48 -0
  131. package/dist/models/update-financial-account-body-dto.js +15 -0
  132. package/dist/models/update-financial-account-response-class.d.ts +25 -0
  133. package/dist/models/update-financial-account-response-class.js +15 -0
  134. package/models/account-mapping-class.ts +3 -1
  135. package/models/accounting-config-class.ts +14 -0
  136. package/models/accounting-config-data-class.ts +7 -0
  137. package/models/accounting-config-data-dto-default-account-mappings.ts +9 -1
  138. package/models/accounting-config-data-dto.ts +7 -0
  139. package/models/booking-entry-class.ts +36 -0
  140. package/models/commission-account-mapping-class.ts +55 -0
  141. package/models/commission-agreement-account-mapping-detail-class.ts +50 -0
  142. package/models/commission-agreement-partner-class.ts +36 -0
  143. package/models/commission-agreement-with-account-mapping-class.ts +49 -0
  144. package/models/commission-type-account-mapping-class.ts +37 -0
  145. package/models/create-booking-entry-request-dto.ts +25 -0
  146. package/models/create-financial-account-request-dto.ts +15 -1
  147. package/models/create-or-correct-opening-balance-dto.ts +31 -0
  148. package/models/create-or-correct-opening-balance-response-class.ts +31 -0
  149. package/models/financial-account-class.ts +31 -1
  150. package/models/financial-transaction-class.ts +6 -0
  151. package/models/financial-transaction-data-dto.ts +7 -0
  152. package/models/get-activation-snapshot-response-class.ts +31 -0
  153. package/models/index.ts +35 -0
  154. package/models/list-commission-account-mappings-response-class.ts +49 -0
  155. package/models/list-commission-agreements-with-account-mappings-response-class.ts +49 -0
  156. package/models/list-commission-type-account-mappings-response-class.ts +49 -0
  157. package/models/list-product-account-mappings-response-class.ts +49 -0
  158. package/models/list-products-with-account-mappings-response-class.ts +49 -0
  159. package/models/opening-balance-item-dto.ts +50 -0
  160. package/models/personal-account-class.ts +6 -0
  161. package/models/personal-account-range-class.ts +51 -0
  162. package/models/personal-account-range-dto.ts +51 -0
  163. package/models/post-financial-event-request-dto.ts +55 -0
  164. package/models/post-financial-event-response-class.ts +31 -0
  165. package/models/premium-item-account-mapping-class.ts +43 -0
  166. package/models/product-account-mapping-class.ts +67 -0
  167. package/models/product-account-mapping-detail-class.ts +62 -0
  168. package/models/product-risk-carrier-class.ts +48 -0
  169. package/models/product-version-account-mapping-detail-class.ts +56 -0
  170. package/models/product-version-with-account-mappings-class.ts +48 -0
  171. package/models/product-with-account-mappings-class.ts +55 -0
  172. package/models/put-premium-item-account-body-dto.ts +30 -0
  173. package/models/put-product-category-account-body-dto.ts +30 -0
  174. package/models/put-product-risk-carrier-body-dto.ts +30 -0
  175. package/models/put-product-version-category-account-body-dto.ts +30 -0
  176. package/models/resolved-account-mapping-class.ts +37 -0
  177. package/models/resolved-commission-account-mapping-class.ts +46 -0
  178. package/models/update-commission-agreement-account-body-dto.ts +30 -0
  179. package/models/update-commission-type-account-body-dto.ts +30 -0
  180. package/models/update-financial-account-body-dto.ts +54 -0
  181. package/models/update-financial-account-response-class.ts +31 -0
  182. package/package.json +2 -2
@@ -103,13 +103,14 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
103
103
  createAndEnableSubledger: function (createAndEnableSubledgerRequestDto, authorization, options) {
104
104
  if (options === void 0) { options = {}; }
105
105
  return __awaiter(_this, void 0, void 0, function () {
106
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
- return __generator(this, function (_a) {
108
- switch (_a.label) {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
107
+ var _a;
108
+ return __generator(this, function (_b) {
109
+ switch (_b.label) {
109
110
  case 0:
110
111
  // verify required parameter 'createAndEnableSubledgerRequestDto' is not null or undefined
111
112
  (0, common_1.assertParamExists)('createAndEnableSubledger', 'createAndEnableSubledgerRequestDto', createAndEnableSubledgerRequestDto);
112
- localVarPath = "/accountingservice/v1/accountingconfigs";
113
+ localVarPath = "/accountingservice/v1/subledger";
113
114
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
114
115
  if (configuration) {
115
116
  baseOptions = configuration.baseOptions;
@@ -120,13 +121,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
120
121
  localVarQueryParameter = {};
121
122
  // authentication bearer required
122
123
  // http bearer authentication required
123
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
125
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
126
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
127
+ ];
124
128
  case 1:
125
129
  // authentication bearer required
126
130
  // http bearer authentication required
127
- _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ _b.sent();
132
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
133
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
134
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
135
+ if (authorizationValue || authorizationKeepEmpty) {
136
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
130
137
  }
131
138
  localVarHeaderParameter['Content-Type'] = 'application/json';
132
139
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -152,13 +159,14 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
152
159
  createAndEnableSubledgerFromFile: function (file, authorization, options) {
153
160
  if (options === void 0) { options = {}; }
154
161
  return __awaiter(_this, void 0, void 0, function () {
155
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
156
- return __generator(this, function (_a) {
157
- switch (_a.label) {
162
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
163
+ var _a;
164
+ return __generator(this, function (_b) {
165
+ switch (_b.label) {
158
166
  case 0:
159
167
  // verify required parameter 'file' is not null or undefined
160
168
  (0, common_1.assertParamExists)('createAndEnableSubledgerFromFile', 'file', file);
161
- localVarPath = "/accountingservice/v1/accountingconfigs/upload";
169
+ localVarPath = "/accountingservice/v1/subledger/upload";
162
170
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
163
171
  if (configuration) {
164
172
  baseOptions = configuration.baseOptions;
@@ -170,13 +178,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
170
178
  localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
171
179
  // authentication bearer required
172
180
  // http bearer authentication required
173
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
181
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
182
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
183
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
184
+ ];
174
185
  case 1:
175
186
  // authentication bearer required
176
187
  // http bearer authentication required
177
- _a.sent();
178
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
179
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
188
+ _b.sent();
189
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
190
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
191
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
192
+ if (authorizationValue || authorizationKeepEmpty) {
193
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
180
194
  }
181
195
  if (file !== undefined) {
182
196
  localVarFormParams.append('file', file);
@@ -203,11 +217,12 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
203
217
  exportAccountingConfig: function (authorization, options) {
204
218
  if (options === void 0) { options = {}; }
205
219
  return __awaiter(_this, void 0, void 0, function () {
206
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
207
- return __generator(this, function (_a) {
208
- switch (_a.label) {
220
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
221
+ var _a;
222
+ return __generator(this, function (_b) {
223
+ switch (_b.label) {
209
224
  case 0:
210
- localVarPath = "/accountingservice/v1/accountingconfigs";
225
+ localVarPath = "/accountingservice/v1/subledger/config/export";
211
226
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
212
227
  if (configuration) {
213
228
  baseOptions = configuration.baseOptions;
@@ -218,13 +233,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
218
233
  localVarQueryParameter = {};
219
234
  // authentication bearer required
220
235
  // http bearer authentication required
221
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
236
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
237
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
238
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
239
+ ];
222
240
  case 1:
223
241
  // authentication bearer required
224
242
  // http bearer authentication required
225
- _a.sent();
226
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
227
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
243
+ _b.sent();
244
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
245
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
246
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
247
+ if (authorizationValue || authorizationKeepEmpty) {
248
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
228
249
  }
229
250
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
230
251
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -247,11 +268,12 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
247
268
  getAccountingCategories: function (authorization, options) {
248
269
  if (options === void 0) { options = {}; }
249
270
  return __awaiter(_this, void 0, void 0, function () {
250
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
251
- return __generator(this, function (_a) {
252
- switch (_a.label) {
271
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
272
+ var _a;
273
+ return __generator(this, function (_b) {
274
+ switch (_b.label) {
253
275
  case 0:
254
- localVarPath = "/accountingservice/v1/accountingconfigs/categories";
276
+ localVarPath = "/accountingservice/v1/subledger/categories";
255
277
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
256
278
  if (configuration) {
257
279
  baseOptions = configuration.baseOptions;
@@ -262,13 +284,70 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
262
284
  localVarQueryParameter = {};
263
285
  // authentication bearer required
264
286
  // http bearer authentication required
265
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
287
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
288
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
289
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
290
+ ];
266
291
  case 1:
267
292
  // authentication bearer required
268
293
  // http bearer authentication required
269
- _a.sent();
270
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
271
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
294
+ _b.sent();
295
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
296
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
297
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
298
+ if (authorizationValue || authorizationKeepEmpty) {
299
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
300
+ }
301
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
302
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
303
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
304
+ return [2 /*return*/, {
305
+ url: (0, common_1.toPathString)(localVarUrlObj),
306
+ options: localVarRequestOptions,
307
+ }];
308
+ }
309
+ });
310
+ });
311
+ },
312
+ /**
313
+ * 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\"
314
+ * @summary Retrieve the get activation snapshot
315
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
316
+ * @param {*} [options] Override http request option.
317
+ * @throws {RequiredError}
318
+ */
319
+ getActivationSnapshot: function (authorization, options) {
320
+ if (options === void 0) { options = {}; }
321
+ return __awaiter(_this, void 0, void 0, function () {
322
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
323
+ var _a;
324
+ return __generator(this, function (_b) {
325
+ switch (_b.label) {
326
+ case 0:
327
+ localVarPath = "/accountingservice/v1/subledger/activation-snapshot";
328
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
329
+ if (configuration) {
330
+ baseOptions = configuration.baseOptions;
331
+ baseAccessToken = configuration.accessToken;
332
+ }
333
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
334
+ localVarHeaderParameter = {};
335
+ localVarQueryParameter = {};
336
+ // authentication bearer required
337
+ // http bearer authentication required
338
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
339
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
340
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
341
+ ];
342
+ case 1:
343
+ // authentication bearer required
344
+ // http bearer authentication required
345
+ _b.sent();
346
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
347
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
348
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
349
+ if (authorizationValue || authorizationKeepEmpty) {
350
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
272
351
  }
273
352
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
274
353
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -291,11 +370,12 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
291
370
  resetSubledger: function (authorization, options) {
292
371
  if (options === void 0) { options = {}; }
293
372
  return __awaiter(_this, void 0, void 0, function () {
294
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
295
- return __generator(this, function (_a) {
296
- switch (_a.label) {
373
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
374
+ var _a;
375
+ return __generator(this, function (_b) {
376
+ switch (_b.label) {
297
377
  case 0:
298
- localVarPath = "/accountingservice/v1/accountingconfigs";
378
+ localVarPath = "/accountingservice/v1/subledger/reset";
299
379
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
300
380
  if (configuration) {
301
381
  baseOptions = configuration.baseOptions;
@@ -306,13 +386,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
306
386
  localVarQueryParameter = {};
307
387
  // authentication bearer required
308
388
  // http bearer authentication required
309
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
389
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
390
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
391
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
392
+ ];
310
393
  case 1:
311
394
  // authentication bearer required
312
395
  // http bearer authentication required
313
- _a.sent();
314
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
315
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
396
+ _b.sent();
397
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
398
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
399
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
400
+ if (authorizationValue || authorizationKeepEmpty) {
401
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
316
402
  }
317
403
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
318
404
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -336,13 +422,14 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
336
422
  validateAccountingConfig: function (validateAccountingConfigRequestDto, authorization, options) {
337
423
  if (options === void 0) { options = {}; }
338
424
  return __awaiter(_this, void 0, void 0, function () {
339
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
340
- return __generator(this, function (_a) {
341
- switch (_a.label) {
425
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
426
+ var _a;
427
+ return __generator(this, function (_b) {
428
+ switch (_b.label) {
342
429
  case 0:
343
430
  // verify required parameter 'validateAccountingConfigRequestDto' is not null or undefined
344
431
  (0, common_1.assertParamExists)('validateAccountingConfig', 'validateAccountingConfigRequestDto', validateAccountingConfigRequestDto);
345
- localVarPath = "/accountingservice/v1/accountingconfigs/validate";
432
+ localVarPath = "/accountingservice/v1/subledger/config/validate";
346
433
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
347
434
  if (configuration) {
348
435
  baseOptions = configuration.baseOptions;
@@ -353,13 +440,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
353
440
  localVarQueryParameter = {};
354
441
  // authentication bearer required
355
442
  // http bearer authentication required
356
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
443
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
444
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
445
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
446
+ ];
357
447
  case 1:
358
448
  // authentication bearer required
359
449
  // http bearer authentication required
360
- _a.sent();
361
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
362
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
450
+ _b.sent();
451
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
452
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
453
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
454
+ if (authorizationValue || authorizationKeepEmpty) {
455
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
363
456
  }
364
457
  localVarHeaderParameter['Content-Type'] = 'application/json';
365
458
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -385,13 +478,14 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
385
478
  validateAccountingConfigFromFile: function (file, authorization, options) {
386
479
  if (options === void 0) { options = {}; }
387
480
  return __awaiter(_this, void 0, void 0, function () {
388
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
389
- return __generator(this, function (_a) {
390
- switch (_a.label) {
481
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
482
+ var _a;
483
+ return __generator(this, function (_b) {
484
+ switch (_b.label) {
391
485
  case 0:
392
486
  // verify required parameter 'file' is not null or undefined
393
487
  (0, common_1.assertParamExists)('validateAccountingConfigFromFile', 'file', file);
394
- localVarPath = "/accountingservice/v1/accountingconfigs/validate/upload";
488
+ localVarPath = "/accountingservice/v1/subledger/config/validate/upload";
395
489
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
396
490
  if (configuration) {
397
491
  baseOptions = configuration.baseOptions;
@@ -403,13 +497,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
403
497
  localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
404
498
  // authentication bearer required
405
499
  // http bearer authentication required
406
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
500
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
501
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
502
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
503
+ ];
407
504
  case 1:
408
505
  // authentication bearer required
409
506
  // http bearer authentication required
410
- _a.sent();
411
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
412
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
507
+ _b.sent();
508
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
509
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
510
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
511
+ if (authorizationValue || authorizationKeepEmpty) {
512
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
413
513
  }
414
514
  if (file !== undefined) {
415
515
  localVarFormParams.append('file', file);
@@ -518,6 +618,26 @@ var AccountingConfigsApiFp = function (configuration) {
518
618
  });
519
619
  });
520
620
  },
621
+ /**
622
+ * 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\"
623
+ * @summary Retrieve the get activation snapshot
624
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
625
+ * @param {*} [options] Override http request option.
626
+ * @throws {RequiredError}
627
+ */
628
+ getActivationSnapshot: function (authorization, options) {
629
+ return __awaiter(this, void 0, void 0, function () {
630
+ var localVarAxiosArgs;
631
+ return __generator(this, function (_a) {
632
+ switch (_a.label) {
633
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getActivationSnapshot(authorization, options)];
634
+ case 1:
635
+ localVarAxiosArgs = _a.sent();
636
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
637
+ }
638
+ });
639
+ });
640
+ },
521
641
  /**
522
642
  * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
523
643
  * @summary Delete the reset subledger
@@ -632,6 +752,16 @@ var AccountingConfigsApiFactory = function (configuration, basePath, axios) {
632
752
  getAccountingCategories: function (authorization, options) {
633
753
  return localVarFp.getAccountingCategories(authorization, options).then(function (request) { return request(axios, basePath); });
634
754
  },
755
+ /**
756
+ * 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\"
757
+ * @summary Retrieve the get activation snapshot
758
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
759
+ * @param {*} [options] Override http request option.
760
+ * @throws {RequiredError}
761
+ */
762
+ getActivationSnapshot: function (authorization, options) {
763
+ return localVarFp.getActivationSnapshot(authorization, options).then(function (request) { return request(axios, basePath); });
764
+ },
635
765
  /**
636
766
  * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
637
767
  * @summary Delete the reset subledger
@@ -688,7 +818,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
688
818
  */
689
819
  AccountingConfigsApi.prototype.createAndEnableSubledger = function (requestParameters, options) {
690
820
  var _this = this;
691
- return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledger(requestParameters.createAndEnableSubledgerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
821
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledger(requestParameters.createAndEnableSubledgerRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
692
822
  };
693
823
  /**
694
824
  * This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
@@ -700,7 +830,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
700
830
  */
701
831
  AccountingConfigsApi.prototype.createAndEnableSubledgerFromFile = function (requestParameters, options) {
702
832
  var _this = this;
703
- return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledgerFromFile(requestParameters.file, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
833
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledgerFromFile(requestParameters.file, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
704
834
  };
705
835
  /**
706
836
  * This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
@@ -713,7 +843,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
713
843
  AccountingConfigsApi.prototype.exportAccountingConfig = function (requestParameters, options) {
714
844
  var _this = this;
715
845
  if (requestParameters === void 0) { requestParameters = {}; }
716
- return (0, exports.AccountingConfigsApiFp)(this.configuration).exportAccountingConfig(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
846
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).exportAccountingConfig(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
717
847
  };
718
848
  /**
719
849
  * This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
@@ -726,7 +856,20 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
726
856
  AccountingConfigsApi.prototype.getAccountingCategories = function (requestParameters, options) {
727
857
  var _this = this;
728
858
  if (requestParameters === void 0) { requestParameters = {}; }
729
- return (0, exports.AccountingConfigsApiFp)(this.configuration).getAccountingCategories(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
859
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).getAccountingCategories(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
860
+ };
861
+ /**
862
+ * 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\"
863
+ * @summary Retrieve the get activation snapshot
864
+ * @param {AccountingConfigsApiGetActivationSnapshotRequest} requestParameters Request parameters.
865
+ * @param {*} [options] Override http request option.
866
+ * @throws {RequiredError}
867
+ * @memberof AccountingConfigsApi
868
+ */
869
+ AccountingConfigsApi.prototype.getActivationSnapshot = function (requestParameters, options) {
870
+ var _this = this;
871
+ if (requestParameters === void 0) { requestParameters = {}; }
872
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).getActivationSnapshot(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
730
873
  };
731
874
  /**
732
875
  * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
@@ -739,7 +882,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
739
882
  AccountingConfigsApi.prototype.resetSubledger = function (requestParameters, options) {
740
883
  var _this = this;
741
884
  if (requestParameters === void 0) { requestParameters = {}; }
742
- return (0, exports.AccountingConfigsApiFp)(this.configuration).resetSubledger(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
885
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).resetSubledger(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
743
886
  };
744
887
  /**
745
888
  * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
@@ -751,7 +894,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
751
894
  */
752
895
  AccountingConfigsApi.prototype.validateAccountingConfig = function (requestParameters, options) {
753
896
  var _this = this;
754
- return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfig(requestParameters.validateAccountingConfigRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
897
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfig(requestParameters.validateAccountingConfigRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
755
898
  };
756
899
  /**
757
900
  * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
@@ -763,7 +906,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
763
906
  */
764
907
  AccountingConfigsApi.prototype.validateAccountingConfigFromFile = function (requestParameters, options) {
765
908
  var _this = this;
766
- return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfigFromFile(requestParameters.file, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
909
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfigFromFile(requestParameters.file, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
767
910
  };
768
911
  return AccountingConfigsApi;
769
912
  }(base_1.BaseAPI));