@emilgroup/accounting-sdk-node 1.32.1-beta.9 → 1.32.1-beta.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/.openapi-generator/FILES +35 -1
  2. package/README.md +2 -2
  3. package/api/accounting-configs-api.ts +85 -45
  4. package/api/booking-entries-api.ts +252 -13
  5. package/api/commission-account-mappings-api.ts +1235 -0
  6. package/api/financial-accounts-api.ts +56 -31
  7. package/api/financial-transactions-api.ts +16 -6
  8. package/api/health-api.ts +1 -1
  9. package/api/number-ranges-api.ts +32 -12
  10. package/api/personal-accounts-api.ts +32 -12
  11. package/api/product-account-mappings-api.ts +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 +25 -25
  16. package/dist/api/accounting-configs-api.js +136 -80
  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 +21 -21
  22. package/dist/api/financial-accounts-api.js +81 -52
  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-agreement-account-mapping-detail-class.d.ts +44 -0
  51. package/dist/models/commission-agreement-account-mapping-detail-class.js +15 -0
  52. package/dist/models/commission-agreement-partner-class.d.ts +30 -0
  53. package/dist/models/commission-agreement-partner-class.js +15 -0
  54. package/dist/models/commission-agreement-with-account-mapping-class.d.ts +43 -0
  55. package/dist/models/commission-agreement-with-account-mapping-class.js +15 -0
  56. package/dist/models/commission-type-account-mapping-class.d.ts +31 -0
  57. package/dist/models/commission-type-account-mapping-class.js +15 -0
  58. package/dist/models/create-booking-entry-request-dto.d.ts +22 -0
  59. package/dist/models/create-booking-entry-request-dto.js +10 -0
  60. package/dist/models/create-financial-account-request-dto.d.ts +8 -0
  61. package/dist/models/create-financial-account-request-dto.js +3 -1
  62. package/dist/models/create-or-correct-opening-balance-dto.d.ts +25 -0
  63. package/dist/models/create-or-correct-opening-balance-dto.js +15 -0
  64. package/dist/models/create-or-correct-opening-balance-response-class.d.ts +25 -0
  65. package/dist/models/create-or-correct-opening-balance-response-class.js +15 -0
  66. package/dist/models/financial-account-class.d.ts +18 -1
  67. package/dist/models/financial-account-class.js +5 -1
  68. package/dist/models/financial-transaction-class.d.ts +6 -0
  69. package/dist/models/financial-transaction-data-dto.d.ts +7 -0
  70. package/dist/models/financial-transaction-data-dto.js +1 -0
  71. package/dist/models/get-activation-snapshot-response-class.d.ts +25 -0
  72. package/dist/models/get-activation-snapshot-response-class.js +15 -0
  73. package/dist/models/index.d.ts +33 -1
  74. package/dist/models/index.js +33 -1
  75. package/dist/models/list-commission-account-mappings-response-class.d.ts +43 -0
  76. package/dist/models/list-commission-account-mappings-response-class.js +15 -0
  77. package/dist/models/list-commission-agreements-with-account-mappings-response-class.d.ts +43 -0
  78. package/dist/models/list-commission-agreements-with-account-mappings-response-class.js +15 -0
  79. package/dist/models/list-commission-type-account-mappings-response-class.d.ts +43 -0
  80. package/dist/models/list-commission-type-account-mappings-response-class.js +15 -0
  81. package/dist/models/list-product-account-mappings-response-class.d.ts +43 -0
  82. package/dist/models/list-product-account-mappings-response-class.js +15 -0
  83. package/dist/models/list-products-with-account-mappings-response-class.d.ts +43 -0
  84. package/dist/models/list-products-with-account-mappings-response-class.js +15 -0
  85. package/dist/models/opening-balance-item-dto.d.ts +41 -0
  86. package/dist/models/opening-balance-item-dto.js +20 -0
  87. package/dist/models/personal-account-class.d.ts +6 -0
  88. package/dist/models/personal-account-range-class.d.ts +42 -0
  89. package/dist/models/personal-account-range-class.js +21 -0
  90. package/dist/models/personal-account-range-dto.d.ts +42 -0
  91. package/dist/models/personal-account-range-dto.js +21 -0
  92. package/dist/models/post-financial-event-request-dto.d.ts +46 -0
  93. package/dist/models/post-financial-event-request-dto.js +25 -0
  94. package/dist/models/post-financial-event-response-class.d.ts +25 -0
  95. package/dist/models/post-financial-event-response-class.js +15 -0
  96. package/dist/models/premium-item-account-mapping-class.d.ts +37 -0
  97. package/dist/models/premium-item-account-mapping-class.js +15 -0
  98. package/dist/models/product-account-mapping-class.d.ts +61 -0
  99. package/dist/models/product-account-mapping-class.js +15 -0
  100. package/dist/models/product-account-mapping-detail-class.d.ts +56 -0
  101. package/dist/models/product-account-mapping-detail-class.js +15 -0
  102. package/dist/models/product-risk-carrier-class.d.ts +42 -0
  103. package/dist/models/product-risk-carrier-class.js +15 -0
  104. package/dist/models/product-version-account-mapping-detail-class.d.ts +50 -0
  105. package/dist/models/product-version-account-mapping-detail-class.js +15 -0
  106. package/dist/models/product-version-with-account-mappings-class.d.ts +42 -0
  107. package/dist/models/product-version-with-account-mappings-class.js +15 -0
  108. package/dist/models/product-with-account-mappings-class.d.ts +49 -0
  109. package/dist/models/product-with-account-mappings-class.js +15 -0
  110. package/dist/models/put-premium-item-account-body-dto.d.ts +24 -0
  111. package/dist/models/put-premium-item-account-body-dto.js +15 -0
  112. package/dist/models/put-product-category-account-body-dto.d.ts +24 -0
  113. package/dist/models/put-product-category-account-body-dto.js +15 -0
  114. package/dist/models/put-product-risk-carrier-body-dto.d.ts +24 -0
  115. package/dist/models/put-product-risk-carrier-body-dto.js +15 -0
  116. package/dist/models/put-product-version-category-account-body-dto.d.ts +24 -0
  117. package/dist/models/put-product-version-category-account-body-dto.js +15 -0
  118. package/dist/models/resolved-account-mapping-class.d.ts +31 -0
  119. package/dist/models/resolved-account-mapping-class.js +15 -0
  120. package/dist/models/resolved-commission-account-mapping-class.d.ts +37 -0
  121. package/dist/models/resolved-commission-account-mapping-class.js +21 -0
  122. package/dist/models/update-commission-agreement-account-body-dto.d.ts +24 -0
  123. package/dist/models/update-commission-agreement-account-body-dto.js +15 -0
  124. package/dist/models/update-commission-type-account-body-dto.d.ts +24 -0
  125. package/dist/models/update-commission-type-account-body-dto.js +15 -0
  126. package/dist/models/update-financial-account-body-dto.d.ts +6 -0
  127. package/models/account-mapping-class.ts +3 -1
  128. package/models/accounting-config-class.ts +14 -0
  129. package/models/accounting-config-data-class.ts +7 -0
  130. package/models/accounting-config-data-dto-default-account-mappings.ts +9 -1
  131. package/models/accounting-config-data-dto.ts +7 -0
  132. package/models/booking-entry-class.ts +36 -0
  133. package/models/commission-account-mapping-class.ts +55 -0
  134. package/models/commission-agreement-account-mapping-detail-class.ts +50 -0
  135. package/models/commission-agreement-partner-class.ts +36 -0
  136. package/models/commission-agreement-with-account-mapping-class.ts +49 -0
  137. package/models/commission-type-account-mapping-class.ts +37 -0
  138. package/models/create-booking-entry-request-dto.ts +25 -0
  139. package/models/create-financial-account-request-dto.ts +9 -1
  140. package/models/create-or-correct-opening-balance-dto.ts +31 -0
  141. package/models/create-or-correct-opening-balance-response-class.ts +31 -0
  142. package/models/financial-account-class.ts +19 -1
  143. package/models/financial-transaction-class.ts +6 -0
  144. package/models/financial-transaction-data-dto.ts +7 -0
  145. package/models/get-activation-snapshot-response-class.ts +31 -0
  146. package/models/index.ts +33 -1
  147. package/models/list-commission-account-mappings-response-class.ts +49 -0
  148. package/models/list-commission-agreements-with-account-mappings-response-class.ts +49 -0
  149. package/models/list-commission-type-account-mappings-response-class.ts +49 -0
  150. package/models/list-product-account-mappings-response-class.ts +49 -0
  151. package/models/list-products-with-account-mappings-response-class.ts +49 -0
  152. package/models/opening-balance-item-dto.ts +50 -0
  153. package/models/personal-account-class.ts +6 -0
  154. package/models/personal-account-range-class.ts +51 -0
  155. package/models/personal-account-range-dto.ts +51 -0
  156. package/models/post-financial-event-request-dto.ts +55 -0
  157. package/models/post-financial-event-response-class.ts +31 -0
  158. package/models/premium-item-account-mapping-class.ts +43 -0
  159. package/models/product-account-mapping-class.ts +67 -0
  160. package/models/product-account-mapping-detail-class.ts +62 -0
  161. package/models/product-risk-carrier-class.ts +48 -0
  162. package/models/product-version-account-mapping-detail-class.ts +56 -0
  163. package/models/product-version-with-account-mappings-class.ts +48 -0
  164. package/models/product-with-account-mappings-class.ts +55 -0
  165. package/models/put-premium-item-account-body-dto.ts +30 -0
  166. package/models/put-product-category-account-body-dto.ts +30 -0
  167. package/models/put-product-risk-carrier-body-dto.ts +30 -0
  168. package/models/put-product-version-category-account-body-dto.ts +30 -0
  169. package/models/resolved-account-mapping-class.ts +37 -0
  170. package/models/resolved-commission-account-mapping-class.ts +46 -0
  171. package/models/update-commission-agreement-account-body-dto.ts +30 -0
  172. package/models/update-commission-type-account-body-dto.ts +30 -0
  173. package/models/update-financial-account-body-dto.ts +6 -0
  174. package/package.json +2 -2
  175. package/dist/models/get-subledger-settings-response-class.d.ts +0 -36
  176. package/models/get-subledger-settings-response-class.ts +0 -42
  177. /package/dist/models/{get-subledger-settings-response-class.js → commission-account-mapping-class.js} +0 -0
@@ -107,9 +107,10 @@ 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);
@@ -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,9 +163,10 @@ 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);
@@ -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,9 +222,10 @@ 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
230
  localVarPath = "/accountingservice/v1/subledger/config/export";
216
231
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -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,9 +273,10 @@ 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
281
  localVarPath = "/accountingservice/v1/subledger/categories";
260
282
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -267,13 +289,19 @@ 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);
277
305
  }
278
306
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
279
307
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -287,20 +315,21 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
287
315
  });
288
316
  },
289
317
  /**
290
- * Returns the activation date and accounting configuration settings for the active subledger. **Required Permissions** \"accounting-management.financial-accounts.view\"
291
- * @summary Retrieve the get subledger settings
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
292
320
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
293
321
  * @param {*} [options] Override http request option.
294
322
  * @throws {RequiredError}
295
323
  */
296
- getSubledgerSettings: function (authorization, options) {
324
+ getActivationSnapshot: function (authorization, options) {
297
325
  if (options === void 0) { options = {}; }
298
326
  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) {
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) {
302
331
  case 0:
303
- localVarPath = "/accountingservice/v1/subledger/settings";
332
+ localVarPath = "/accountingservice/v1/subledger/activation-snapshot";
304
333
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
305
334
  if (configuration) {
306
335
  baseOptions = configuration.baseOptions;
@@ -311,13 +340,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
311
340
  localVarQueryParameter = {};
312
341
  // authentication bearer required
313
342
  // http bearer authentication required
314
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
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
+ ];
315
347
  case 1:
316
348
  // authentication bearer required
317
349
  // http bearer authentication required
318
- _a.sent();
319
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
320
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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);
321
356
  }
322
357
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
323
358
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -340,9 +375,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
340
375
  resetSubledger: function (authorization, options) {
341
376
  if (options === void 0) { options = {}; }
342
377
  return __awaiter(_this, void 0, void 0, function () {
343
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
344
- return __generator(this, function (_a) {
345
- 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) {
346
382
  case 0:
347
383
  localVarPath = "/accountingservice/v1/subledger/reset";
348
384
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -355,13 +391,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
355
391
  localVarQueryParameter = {};
356
392
  // authentication bearer required
357
393
  // http bearer authentication required
358
- 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
+ ];
359
398
  case 1:
360
399
  // authentication bearer required
361
400
  // http bearer authentication required
362
- _a.sent();
363
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
364
- 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);
365
407
  }
366
408
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
367
409
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -385,9 +427,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
385
427
  validateAccountingConfig: function (validateAccountingConfigRequestDto, authorization, options) {
386
428
  if (options === void 0) { options = {}; }
387
429
  return __awaiter(_this, void 0, void 0, function () {
388
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
389
- return __generator(this, function (_a) {
390
- 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) {
391
434
  case 0:
392
435
  // verify required parameter 'validateAccountingConfigRequestDto' is not null or undefined
393
436
  (0, common_1.assertParamExists)('validateAccountingConfig', 'validateAccountingConfigRequestDto', validateAccountingConfigRequestDto);
@@ -402,13 +445,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
402
445
  localVarQueryParameter = {};
403
446
  // authentication bearer required
404
447
  // http bearer authentication required
405
- 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
+ ];
406
452
  case 1:
407
453
  // authentication bearer required
408
454
  // http bearer authentication required
409
- _a.sent();
410
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
411
- 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);
412
461
  }
413
462
  localVarHeaderParameter['Content-Type'] = 'application/json';
414
463
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -434,9 +483,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
434
483
  validateAccountingConfigFromFile: function (file, authorization, options) {
435
484
  if (options === void 0) { options = {}; }
436
485
  return __awaiter(_this, void 0, void 0, function () {
437
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
438
- return __generator(this, function (_a) {
439
- 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) {
440
490
  case 0:
441
491
  // verify required parameter 'file' is not null or undefined
442
492
  (0, common_1.assertParamExists)('validateAccountingConfigFromFile', 'file', file);
@@ -452,13 +502,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
452
502
  localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
453
503
  // authentication bearer required
454
504
  // http bearer authentication required
455
- 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
+ ];
456
509
  case 1:
457
510
  // authentication bearer required
458
511
  // http bearer authentication required
459
- _a.sent();
460
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
461
- 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);
462
518
  }
463
519
  if (file !== undefined) {
464
520
  localVarFormParams.append('file', file);
@@ -569,18 +625,18 @@ var AccountingConfigsApiFp = function (configuration) {
569
625
  });
570
626
  },
571
627
  /**
572
- * Returns the activation date and accounting configuration settings for the active subledger. **Required Permissions** \"accounting-management.financial-accounts.view\"
573
- * @summary Retrieve the get subledger settings
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
574
630
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
575
631
  * @param {*} [options] Override http request option.
576
632
  * @throws {RequiredError}
577
633
  */
578
- getSubledgerSettings: function (authorization, options) {
634
+ getActivationSnapshot: function (authorization, options) {
579
635
  return __awaiter(this, void 0, void 0, function () {
580
636
  var localVarAxiosArgs;
581
637
  return __generator(this, function (_a) {
582
638
  switch (_a.label) {
583
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSubledgerSettings(authorization, options)];
639
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getActivationSnapshot(authorization, options)];
584
640
  case 1:
585
641
  localVarAxiosArgs = _a.sent();
586
642
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -703,14 +759,14 @@ var AccountingConfigsApiFactory = function (configuration, basePath, axios) {
703
759
  return localVarFp.getAccountingCategories(authorization, options).then(function (request) { return request(axios, basePath); });
704
760
  },
705
761
  /**
706
- * Returns the activation date and accounting configuration settings for the active subledger. **Required Permissions** \"accounting-management.financial-accounts.view\"
707
- * @summary Retrieve the get subledger settings
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
708
764
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
709
765
  * @param {*} [options] Override http request option.
710
766
  * @throws {RequiredError}
711
767
  */
712
- getSubledgerSettings: function (authorization, options) {
713
- return localVarFp.getSubledgerSettings(authorization, options).then(function (request) { return request(axios, basePath); });
768
+ getActivationSnapshot: function (authorization, options) {
769
+ return localVarFp.getActivationSnapshot(authorization, options).then(function (request) { return request(axios, basePath); });
714
770
  },
715
771
  /**
716
772
  * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
@@ -768,7 +824,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
768
824
  */
769
825
  AccountingConfigsApi.prototype.createAndEnableSubledger = function (requestParameters, options) {
770
826
  var _this = this;
771
- 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); });
772
828
  };
773
829
  /**
774
830
  * This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
@@ -780,7 +836,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
780
836
  */
781
837
  AccountingConfigsApi.prototype.createAndEnableSubledgerFromFile = function (requestParameters, options) {
782
838
  var _this = this;
783
- 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); });
784
840
  };
785
841
  /**
786
842
  * This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
@@ -793,7 +849,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
793
849
  AccountingConfigsApi.prototype.exportAccountingConfig = function (requestParameters, options) {
794
850
  var _this = this;
795
851
  if (requestParameters === void 0) { requestParameters = {}; }
796
- 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); });
797
853
  };
798
854
  /**
799
855
  * This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
@@ -806,20 +862,20 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
806
862
  AccountingConfigsApi.prototype.getAccountingCategories = function (requestParameters, options) {
807
863
  var _this = this;
808
864
  if (requestParameters === void 0) { requestParameters = {}; }
809
- 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); });
810
866
  };
811
867
  /**
812
- * Returns the activation date and accounting configuration settings for the active subledger. **Required Permissions** \"accounting-management.financial-accounts.view\"
813
- * @summary Retrieve the get subledger settings
814
- * @param {AccountingConfigsApiGetSubledgerSettingsRequest} requestParameters Request parameters.
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.
815
871
  * @param {*} [options] Override http request option.
816
872
  * @throws {RequiredError}
817
873
  * @memberof AccountingConfigsApi
818
874
  */
819
- AccountingConfigsApi.prototype.getSubledgerSettings = function (requestParameters, options) {
875
+ AccountingConfigsApi.prototype.getActivationSnapshot = function (requestParameters, options) {
820
876
  var _this = this;
821
877
  if (requestParameters === void 0) { requestParameters = {}; }
822
- return (0, exports.AccountingConfigsApiFp)(this.configuration).getSubledgerSettings(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
878
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).getActivationSnapshot(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
823
879
  };
824
880
  /**
825
881
  * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
@@ -832,7 +888,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
832
888
  AccountingConfigsApi.prototype.resetSubledger = function (requestParameters, options) {
833
889
  var _this = this;
834
890
  if (requestParameters === void 0) { requestParameters = {}; }
835
- 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); });
836
892
  };
837
893
  /**
838
894
  * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
@@ -844,7 +900,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
844
900
  */
845
901
  AccountingConfigsApi.prototype.validateAccountingConfig = function (requestParameters, options) {
846
902
  var _this = this;
847
- 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); });
848
904
  };
849
905
  /**
850
906
  * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
@@ -856,7 +912,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
856
912
  */
857
913
  AccountingConfigsApi.prototype.validateAccountingConfigFromFile = function (requestParameters, options) {
858
914
  var _this = this;
859
- 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); });
860
916
  };
861
917
  return AccountingConfigsApi;
862
918
  }(base_1.BaseAPI));