@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
@@ -43,7 +43,7 @@ const FormData = require('form-data');
43
43
  export const FinancialAccountsApiAxiosParamCreator = function (configuration?: Configuration) {
44
44
  return {
45
45
  /**
46
- * This will create an financial account in the database. The financial account will be created with the provided name, type, and account number. Optionally, you can provide a parent financial account ID to create a sub-account. **Required Permissions** \"accounting-management.financial-accounts.create\"
46
+ * This will create an financial account in the database. The financial account will be created with the provided name, type, and account number. Optionally, you can provide a parent financial account ID to create a sub-account. A bank-category account may also name the connected bank account it books, via linkedBankAccountCode; the bank account\'s IBAN is stored alongside it for display. **Required Permissions** \"accounting-management.financial-accounts.create\"
47
47
  * @summary Create the Financial Account
48
48
  * @param {CreateFinancialAccountRequestDto} createFinancialAccountRequestDto
49
49
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
@@ -71,8 +71,13 @@ export const FinancialAccountsApiAxiosParamCreator = function (configuration?: C
71
71
  // http bearer authentication required
72
72
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
73
73
 
74
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
75
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
74
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
75
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
76
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
77
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
78
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
79
+ if (authorizationValue || authorizationKeepEmpty) {
80
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
76
81
  }
77
82
 
78
83
 
@@ -119,8 +124,13 @@ export const FinancialAccountsApiAxiosParamCreator = function (configuration?: C
119
124
  // http bearer authentication required
120
125
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
121
126
 
122
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
123
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
127
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
128
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
129
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
130
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
131
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
132
+ if (authorizationValue || authorizationKeepEmpty) {
133
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
124
134
  }
125
135
 
126
136
 
@@ -171,8 +181,13 @@ export const FinancialAccountsApiAxiosParamCreator = function (configuration?: C
171
181
  localVarQueryParameter['expand'] = expand;
172
182
  }
173
183
 
174
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
175
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
184
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
185
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
186
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
187
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
188
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
189
+ if (authorizationValue || authorizationKeepEmpty) {
190
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
176
191
  }
177
192
 
178
193
 
@@ -192,11 +207,11 @@ export const FinancialAccountsApiAxiosParamCreator = function (configuration?: C
192
207
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
193
208
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
194
209
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
195
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory</i>
210
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory, linkedBankAccountCode, linkedBankAccountIban</i>
196
211
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
197
212
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, name, financialAccountNumber, description, functionalCategory, type</i>
198
213
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
199
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory</i>
214
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory, linkedBankAccountCode, linkedBankAccountIban</i>
200
215
  * @param {*} [options] Override http request option.
201
216
  * @throws {RequiredError}
202
217
  */
@@ -247,8 +262,13 @@ export const FinancialAccountsApiAxiosParamCreator = function (configuration?: C
247
262
  localVarQueryParameter['filters'] = filters;
248
263
  }
249
264
 
250
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
251
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
265
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
266
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
267
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
268
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
269
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
270
+ if (authorizationValue || authorizationKeepEmpty) {
271
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
252
272
  }
253
273
 
254
274
 
@@ -263,7 +283,7 @@ export const FinancialAccountsApiAxiosParamCreator = function (configuration?: C
263
283
  };
264
284
  },
265
285
  /**
266
- * Updates name and description (always editable), financialAccountNumber (only while the account is not locked), and isDefault (pool-category accounts only; cannot be unset). **Required Permissions** \"accounting-management.financial-accounts.update\"
286
+ * Updates name and description (always editable), financialAccountNumber (only while the account is not locked), isDefault (pool-category accounts only; cannot be unset), and linkedBankAccountCode (bank-category accounts only; send an empty string to unlink, omit to leave the link untouched). Linking stays editable once the account is locked, and applies to later postings only. **Required Permissions** \"accounting-management.financial-accounts.update\"
267
287
  * @summary Update the Financial Account
268
288
  * @param {string} code Unique identifier for the object.
269
289
  * @param {UpdateFinancialAccountBodyDto} updateFinancialAccountBodyDto
@@ -295,8 +315,13 @@ export const FinancialAccountsApiAxiosParamCreator = function (configuration?: C
295
315
  // http bearer authentication required
296
316
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
297
317
 
298
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
299
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
318
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
319
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
320
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
321
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
322
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
323
+ if (authorizationValue || authorizationKeepEmpty) {
324
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
300
325
  }
301
326
 
302
327
 
@@ -324,7 +349,7 @@ export const FinancialAccountsApiFp = function(configuration?: Configuration) {
324
349
  const localVarAxiosParamCreator = FinancialAccountsApiAxiosParamCreator(configuration)
325
350
  return {
326
351
  /**
327
- * This will create an financial account in the database. The financial account will be created with the provided name, type, and account number. Optionally, you can provide a parent financial account ID to create a sub-account. **Required Permissions** \"accounting-management.financial-accounts.create\"
352
+ * This will create an financial account in the database. The financial account will be created with the provided name, type, and account number. Optionally, you can provide a parent financial account ID to create a sub-account. A bank-category account may also name the connected bank account it books, via linkedBankAccountCode; the bank account\'s IBAN is stored alongside it for display. **Required Permissions** \"accounting-management.financial-accounts.create\"
328
353
  * @summary Create the Financial Account
329
354
  * @param {CreateFinancialAccountRequestDto} createFinancialAccountRequestDto
330
355
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
@@ -366,11 +391,11 @@ export const FinancialAccountsApiFp = function(configuration?: Configuration) {
366
391
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
367
392
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
368
393
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
369
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory</i>
394
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory, linkedBankAccountCode, linkedBankAccountIban</i>
370
395
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
371
396
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, name, financialAccountNumber, description, functionalCategory, type</i>
372
397
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
373
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory</i>
398
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory, linkedBankAccountCode, linkedBankAccountIban</i>
374
399
  * @param {*} [options] Override http request option.
375
400
  * @throws {RequiredError}
376
401
  */
@@ -379,7 +404,7 @@ export const FinancialAccountsApiFp = function(configuration?: Configuration) {
379
404
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
380
405
  },
381
406
  /**
382
- * Updates name and description (always editable), financialAccountNumber (only while the account is not locked), and isDefault (pool-category accounts only; cannot be unset). **Required Permissions** \"accounting-management.financial-accounts.update\"
407
+ * Updates name and description (always editable), financialAccountNumber (only while the account is not locked), isDefault (pool-category accounts only; cannot be unset), and linkedBankAccountCode (bank-category accounts only; send an empty string to unlink, omit to leave the link untouched). Linking stays editable once the account is locked, and applies to later postings only. **Required Permissions** \"accounting-management.financial-accounts.update\"
383
408
  * @summary Update the Financial Account
384
409
  * @param {string} code Unique identifier for the object.
385
410
  * @param {UpdateFinancialAccountBodyDto} updateFinancialAccountBodyDto
@@ -402,7 +427,7 @@ export const FinancialAccountsApiFactory = function (configuration?: Configurati
402
427
  const localVarFp = FinancialAccountsApiFp(configuration)
403
428
  return {
404
429
  /**
405
- * This will create an financial account in the database. The financial account will be created with the provided name, type, and account number. Optionally, you can provide a parent financial account ID to create a sub-account. **Required Permissions** \"accounting-management.financial-accounts.create\"
430
+ * This will create an financial account in the database. The financial account will be created with the provided name, type, and account number. Optionally, you can provide a parent financial account ID to create a sub-account. A bank-category account may also name the connected bank account it books, via linkedBankAccountCode; the bank account\'s IBAN is stored alongside it for display. **Required Permissions** \"accounting-management.financial-accounts.create\"
406
431
  * @summary Create the Financial Account
407
432
  * @param {CreateFinancialAccountRequestDto} createFinancialAccountRequestDto
408
433
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
@@ -441,11 +466,11 @@ export const FinancialAccountsApiFactory = function (configuration?: Configurati
441
466
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
442
467
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
443
468
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
444
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory</i>
469
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory, linkedBankAccountCode, linkedBankAccountIban</i>
445
470
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
446
471
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, name, financialAccountNumber, description, functionalCategory, type</i>
447
472
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
448
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory</i>
473
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory, linkedBankAccountCode, linkedBankAccountIban</i>
449
474
  * @param {*} [options] Override http request option.
450
475
  * @throws {RequiredError}
451
476
  */
@@ -453,7 +478,7 @@ export const FinancialAccountsApiFactory = function (configuration?: Configurati
453
478
  return localVarFp.listFinancialAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
454
479
  },
455
480
  /**
456
- * Updates name and description (always editable), financialAccountNumber (only while the account is not locked), and isDefault (pool-category accounts only; cannot be unset). **Required Permissions** \"accounting-management.financial-accounts.update\"
481
+ * Updates name and description (always editable), financialAccountNumber (only while the account is not locked), isDefault (pool-category accounts only; cannot be unset), and linkedBankAccountCode (bank-category accounts only; send an empty string to unlink, omit to leave the link untouched). Linking stays editable once the account is locked, and applies to later postings only. **Required Permissions** \"accounting-management.financial-accounts.update\"
457
482
  * @summary Update the Financial Account
458
483
  * @param {string} code Unique identifier for the object.
459
484
  * @param {UpdateFinancialAccountBodyDto} updateFinancialAccountBodyDto
@@ -565,7 +590,7 @@ export interface FinancialAccountsApiListFinancialAccountsRequest {
565
590
  readonly pageToken?: string
566
591
 
567
592
  /**
568
- * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory</i>
593
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory, linkedBankAccountCode, linkedBankAccountIban</i>
569
594
  * @type {string}
570
595
  * @memberof FinancialAccountsApiListFinancialAccounts
571
596
  */
@@ -593,7 +618,7 @@ export interface FinancialAccountsApiListFinancialAccountsRequest {
593
618
  readonly expand?: string
594
619
 
595
620
  /**
596
- * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory</i>
621
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type, status, isControlAccount, functionalCategory, linkedBankAccountCode, linkedBankAccountIban</i>
597
622
  * @type {string}
598
623
  * @memberof FinancialAccountsApiListFinancialAccounts
599
624
  */
@@ -636,7 +661,7 @@ export interface FinancialAccountsApiUpdateFinancialAccountRequest {
636
661
  */
637
662
  export class FinancialAccountsApi extends BaseAPI {
638
663
  /**
639
- * This will create an financial account in the database. The financial account will be created with the provided name, type, and account number. Optionally, you can provide a parent financial account ID to create a sub-account. **Required Permissions** \"accounting-management.financial-accounts.create\"
664
+ * This will create an financial account in the database. The financial account will be created with the provided name, type, and account number. Optionally, you can provide a parent financial account ID to create a sub-account. A bank-category account may also name the connected bank account it books, via linkedBankAccountCode; the bank account\'s IBAN is stored alongside it for display. **Required Permissions** \"accounting-management.financial-accounts.create\"
640
665
  * @summary Create the Financial Account
641
666
  * @param {FinancialAccountsApiCreateFinancialAccountRequest} requestParameters Request parameters.
642
667
  * @param {*} [options] Override http request option.
@@ -644,7 +669,7 @@ export class FinancialAccountsApi extends BaseAPI {
644
669
  * @memberof FinancialAccountsApi
645
670
  */
646
671
  public createFinancialAccount(requestParameters: FinancialAccountsApiCreateFinancialAccountRequest, options?: AxiosRequestConfig) {
647
- return FinancialAccountsApiFp(this.configuration).createFinancialAccount(requestParameters.createFinancialAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
672
+ return FinancialAccountsApiFp(this.configuration).createFinancialAccount(requestParameters.createFinancialAccountRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
648
673
  }
649
674
 
650
675
  /**
@@ -656,7 +681,7 @@ export class FinancialAccountsApi extends BaseAPI {
656
681
  * @memberof FinancialAccountsApi
657
682
  */
658
683
  public deleteFinancialAccount(requestParameters: FinancialAccountsApiDeleteFinancialAccountRequest, options?: AxiosRequestConfig) {
659
- return FinancialAccountsApiFp(this.configuration).deleteFinancialAccount(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
684
+ return FinancialAccountsApiFp(this.configuration).deleteFinancialAccount(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
660
685
  }
661
686
 
662
687
  /**
@@ -668,7 +693,7 @@ export class FinancialAccountsApi extends BaseAPI {
668
693
  * @memberof FinancialAccountsApi
669
694
  */
670
695
  public getFinancialAccount(requestParameters: FinancialAccountsApiGetFinancialAccountRequest, options?: AxiosRequestConfig) {
671
- return FinancialAccountsApiFp(this.configuration).getFinancialAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
696
+ return FinancialAccountsApiFp(this.configuration).getFinancialAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
672
697
  }
673
698
 
674
699
  /**
@@ -680,11 +705,11 @@ export class FinancialAccountsApi extends BaseAPI {
680
705
  * @memberof FinancialAccountsApi
681
706
  */
682
707
  public listFinancialAccounts(requestParameters: FinancialAccountsApiListFinancialAccountsRequest = {}, options?: AxiosRequestConfig) {
683
- return FinancialAccountsApiFp(this.configuration).listFinancialAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
708
+ return FinancialAccountsApiFp(this.configuration).listFinancialAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
684
709
  }
685
710
 
686
711
  /**
687
- * Updates name and description (always editable), financialAccountNumber (only while the account is not locked), and isDefault (pool-category accounts only; cannot be unset). **Required Permissions** \"accounting-management.financial-accounts.update\"
712
+ * Updates name and description (always editable), financialAccountNumber (only while the account is not locked), isDefault (pool-category accounts only; cannot be unset), and linkedBankAccountCode (bank-category accounts only; send an empty string to unlink, omit to leave the link untouched). Linking stays editable once the account is locked, and applies to later postings only. **Required Permissions** \"accounting-management.financial-accounts.update\"
688
713
  * @summary Update the Financial Account
689
714
  * @param {FinancialAccountsApiUpdateFinancialAccountRequest} requestParameters Request parameters.
690
715
  * @param {*} [options] Override http request option.
@@ -692,6 +717,6 @@ export class FinancialAccountsApi extends BaseAPI {
692
717
  * @memberof FinancialAccountsApi
693
718
  */
694
719
  public updateFinancialAccount(requestParameters: FinancialAccountsApiUpdateFinancialAccountRequest, options?: AxiosRequestConfig) {
695
- return FinancialAccountsApiFp(this.configuration).updateFinancialAccount(requestParameters.code, requestParameters.updateFinancialAccountBodyDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
720
+ return FinancialAccountsApiFp(this.configuration).updateFinancialAccount(requestParameters.code, requestParameters.updateFinancialAccountBodyDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
696
721
  }
697
722
  }
@@ -71,8 +71,13 @@ export const FinancialTransactionsApiAxiosParamCreator = function (configuration
71
71
  localVarQueryParameter['expand'] = expand;
72
72
  }
73
73
 
74
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
75
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
74
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
75
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
76
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
77
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
78
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
79
+ if (authorizationValue || authorizationKeepEmpty) {
80
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
76
81
  }
77
82
 
78
83
 
@@ -147,8 +152,13 @@ export const FinancialTransactionsApiAxiosParamCreator = function (configuration
147
152
  localVarQueryParameter['filters'] = filters;
148
153
  }
149
154
 
150
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
151
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
155
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
156
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
157
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
158
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
159
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
160
+ if (authorizationValue || authorizationKeepEmpty) {
161
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
152
162
  }
153
163
 
154
164
 
@@ -352,7 +362,7 @@ export class FinancialTransactionsApi extends BaseAPI {
352
362
  * @memberof FinancialTransactionsApi
353
363
  */
354
364
  public getFinancialTransaction(requestParameters: FinancialTransactionsApiGetFinancialTransactionRequest, options?: AxiosRequestConfig) {
355
- return FinancialTransactionsApiFp(this.configuration).getFinancialTransaction(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
365
+ return FinancialTransactionsApiFp(this.configuration).getFinancialTransaction(requestParameters.code, requestParameters.expand, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
356
366
  }
357
367
 
358
368
  /**
@@ -364,6 +374,6 @@ export class FinancialTransactionsApi extends BaseAPI {
364
374
  * @memberof FinancialTransactionsApi
365
375
  */
366
376
  public listFinancialTransactions(requestParameters: FinancialTransactionsApiListFinancialTransactionsRequest = {}, options?: AxiosRequestConfig) {
367
- return FinancialTransactionsApiFp(this.configuration).listFinancialTransactions(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
377
+ return FinancialTransactionsApiFp(this.configuration).listFinancialTransactions(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
368
378
  }
369
379
  }
package/api/health-api.ts CHANGED
@@ -123,6 +123,6 @@ export class HealthApi extends BaseAPI {
123
123
  * @memberof HealthApi
124
124
  */
125
125
  public check(options?: AxiosRequestConfig) {
126
- return HealthApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
126
+ return HealthApiFp(this.configuration).check(this.withOwner(options)).then((request) => request(this.axios, this.basePath));
127
127
  }
128
128
  }
@@ -67,8 +67,13 @@ export const NumberRangesApiAxiosParamCreator = function (configuration?: Config
67
67
  // http bearer authentication required
68
68
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
69
69
 
70
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
71
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
70
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
71
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
72
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
73
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
74
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
75
+ if (authorizationValue || authorizationKeepEmpty) {
76
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
72
77
  }
73
78
 
74
79
 
@@ -115,8 +120,13 @@ export const NumberRangesApiAxiosParamCreator = function (configuration?: Config
115
120
  // http bearer authentication required
116
121
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
117
122
 
118
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
119
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
123
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
124
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
125
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
126
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
127
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
128
+ if (authorizationValue || authorizationKeepEmpty) {
129
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
120
130
  }
121
131
 
122
132
 
@@ -167,8 +177,13 @@ export const NumberRangesApiAxiosParamCreator = function (configuration?: Config
167
177
  localVarQueryParameter['expand'] = expand;
168
178
  }
169
179
 
170
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
171
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
180
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
181
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
182
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
183
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
184
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
185
+ if (authorizationValue || authorizationKeepEmpty) {
186
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
172
187
  }
173
188
 
174
189
 
@@ -243,8 +258,13 @@ export const NumberRangesApiAxiosParamCreator = function (configuration?: Config
243
258
  localVarQueryParameter['filters'] = filters;
244
259
  }
245
260
 
246
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
247
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
261
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
262
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
263
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
264
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
265
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
266
+ if (authorizationValue || authorizationKeepEmpty) {
267
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
248
268
  }
249
269
 
250
270
 
@@ -536,7 +556,7 @@ export class NumberRangesApi extends BaseAPI {
536
556
  * @memberof NumberRangesApi
537
557
  */
538
558
  public createNumberRange(requestParameters: NumberRangesApiCreateNumberRangeRequest, options?: AxiosRequestConfig) {
539
- return NumberRangesApiFp(this.configuration).createNumberRange(requestParameters.createNumberRangeRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
559
+ return NumberRangesApiFp(this.configuration).createNumberRange(requestParameters.createNumberRangeRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
540
560
  }
541
561
 
542
562
  /**
@@ -548,7 +568,7 @@ export class NumberRangesApi extends BaseAPI {
548
568
  * @memberof NumberRangesApi
549
569
  */
550
570
  public deleteNumberRange(requestParameters: NumberRangesApiDeleteNumberRangeRequest, options?: AxiosRequestConfig) {
551
- return NumberRangesApiFp(this.configuration).deleteNumberRange(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
571
+ return NumberRangesApiFp(this.configuration).deleteNumberRange(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
552
572
  }
553
573
 
554
574
  /**
@@ -560,7 +580,7 @@ export class NumberRangesApi extends BaseAPI {
560
580
  * @memberof NumberRangesApi
561
581
  */
562
582
  public getNumberRange(requestParameters: NumberRangesApiGetNumberRangeRequest, options?: AxiosRequestConfig) {
563
- return NumberRangesApiFp(this.configuration).getNumberRange(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
583
+ return NumberRangesApiFp(this.configuration).getNumberRange(requestParameters.code, requestParameters.expand, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
564
584
  }
565
585
 
566
586
  /**
@@ -572,6 +592,6 @@ export class NumberRangesApi extends BaseAPI {
572
592
  * @memberof NumberRangesApi
573
593
  */
574
594
  public listNumberRanges(requestParameters: NumberRangesApiListNumberRangesRequest = {}, options?: AxiosRequestConfig) {
575
- return NumberRangesApiFp(this.configuration).listNumberRanges(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
595
+ return NumberRangesApiFp(this.configuration).listNumberRanges(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
576
596
  }
577
597
  }
@@ -67,8 +67,13 @@ export const PersonalAccountsApiAxiosParamCreator = function (configuration?: Co
67
67
  // http bearer authentication required
68
68
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
69
69
 
70
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
71
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
70
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
71
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
72
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
73
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
74
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
75
+ if (authorizationValue || authorizationKeepEmpty) {
76
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
72
77
  }
73
78
 
74
79
 
@@ -115,8 +120,13 @@ export const PersonalAccountsApiAxiosParamCreator = function (configuration?: Co
115
120
  // http bearer authentication required
116
121
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
117
122
 
118
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
119
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
123
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
124
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
125
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
126
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
127
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
128
+ if (authorizationValue || authorizationKeepEmpty) {
129
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
120
130
  }
121
131
 
122
132
 
@@ -167,8 +177,13 @@ export const PersonalAccountsApiAxiosParamCreator = function (configuration?: Co
167
177
  localVarQueryParameter['expand'] = expand;
168
178
  }
169
179
 
170
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
171
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
180
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
181
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
182
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
183
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
184
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
185
+ if (authorizationValue || authorizationKeepEmpty) {
186
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
172
187
  }
173
188
 
174
189
 
@@ -243,8 +258,13 @@ export const PersonalAccountsApiAxiosParamCreator = function (configuration?: Co
243
258
  localVarQueryParameter['filters'] = filters;
244
259
  }
245
260
 
246
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
247
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
261
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
262
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
263
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
264
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
265
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
266
+ if (authorizationValue || authorizationKeepEmpty) {
267
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
248
268
  }
249
269
 
250
270
 
@@ -536,7 +556,7 @@ export class PersonalAccountsApi extends BaseAPI {
536
556
  * @memberof PersonalAccountsApi
537
557
  */
538
558
  public createPersonalAccount(requestParameters: PersonalAccountsApiCreatePersonalAccountRequest, options?: AxiosRequestConfig) {
539
- return PersonalAccountsApiFp(this.configuration).createPersonalAccount(requestParameters.createPersonalAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
559
+ return PersonalAccountsApiFp(this.configuration).createPersonalAccount(requestParameters.createPersonalAccountRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
540
560
  }
541
561
 
542
562
  /**
@@ -548,7 +568,7 @@ export class PersonalAccountsApi extends BaseAPI {
548
568
  * @memberof PersonalAccountsApi
549
569
  */
550
570
  public deletePersonalAccount(requestParameters: PersonalAccountsApiDeletePersonalAccountRequest, options?: AxiosRequestConfig) {
551
- return PersonalAccountsApiFp(this.configuration).deletePersonalAccount(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
571
+ return PersonalAccountsApiFp(this.configuration).deletePersonalAccount(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
552
572
  }
553
573
 
554
574
  /**
@@ -560,7 +580,7 @@ export class PersonalAccountsApi extends BaseAPI {
560
580
  * @memberof PersonalAccountsApi
561
581
  */
562
582
  public getPersonalAccount(requestParameters: PersonalAccountsApiGetPersonalAccountRequest, options?: AxiosRequestConfig) {
563
- return PersonalAccountsApiFp(this.configuration).getPersonalAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
583
+ return PersonalAccountsApiFp(this.configuration).getPersonalAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
564
584
  }
565
585
 
566
586
  /**
@@ -572,6 +592,6 @@ export class PersonalAccountsApi extends BaseAPI {
572
592
  * @memberof PersonalAccountsApi
573
593
  */
574
594
  public listPersonalAccounts(requestParameters: PersonalAccountsApiListPersonalAccountsRequest = {}, options?: AxiosRequestConfig) {
575
- return PersonalAccountsApiFp(this.configuration).listPersonalAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
595
+ return PersonalAccountsApiFp(this.configuration).listPersonalAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
576
596
  }
577
597
  }