@emilgroup/accounting-sdk 1.34.1-beta.11 → 1.34.1-beta.111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/.openapi-generator/FILES +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 +1231 -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 +1751 -0
  12. package/api.ts +4 -0
  13. package/base.ts +239 -43
  14. package/common.ts +3 -2
  15. package/configuration.ts +20 -0
  16. package/dist/api/accounting-configs-api.d.ts +25 -25
  17. package/dist/api/accounting-configs-api.js +136 -80
  18. package/dist/api/booking-entries-api.d.ts +121 -7
  19. package/dist/api/booking-entries-api.js +241 -26
  20. package/dist/api/commission-account-mappings-api.d.ts +685 -0
  21. package/dist/api/commission-account-mappings-api.js +1051 -0
  22. package/dist/api/financial-accounts-api.d.ts +21 -21
  23. package/dist/api/financial-accounts-api.js +81 -52
  24. package/dist/api/financial-transactions-api.d.ts +2 -2
  25. package/dist/api/financial-transactions-api.js +22 -14
  26. package/dist/api/health-api.d.ts +1 -1
  27. package/dist/api/health-api.js +1 -1
  28. package/dist/api/number-ranges-api.d.ts +4 -4
  29. package/dist/api/number-ranges-api.js +52 -30
  30. package/dist/api/personal-accounts-api.d.ts +4 -4
  31. package/dist/api/personal-accounts-api.js +52 -30
  32. package/dist/api/product-account-mappings-api.d.ts +972 -0
  33. package/dist/api/product-account-mappings-api.js +1493 -0
  34. package/dist/api.d.ts +2 -0
  35. package/dist/api.js +2 -0
  36. package/dist/base.d.ts +26 -0
  37. package/dist/base.js +243 -60
  38. package/dist/common.d.ts +1 -1
  39. package/dist/common.js +1 -0
  40. package/dist/configuration.d.ts +17 -0
  41. package/dist/configuration.js +2 -0
  42. package/dist/models/account-mapping-class.d.ts +5 -2
  43. package/dist/models/account-mapping-class.js +6 -3
  44. package/dist/models/accounting-category-class.d.ts +12 -0
  45. package/dist/models/accounting-config-class.d.ts +11 -0
  46. package/dist/models/accounting-config-class.js +5 -0
  47. package/dist/models/accounting-config-data-class.d.ts +7 -0
  48. package/dist/models/accounting-config-data-dto-default-account-mappings.d.ts +11 -2
  49. package/dist/models/accounting-config-data-dto-default-account-mappings.js +6 -3
  50. package/dist/models/accounting-config-data-dto.d.ts +7 -0
  51. package/dist/models/booking-entry-class.d.ts +35 -0
  52. package/dist/models/booking-entry-class.js +11 -1
  53. package/dist/models/commission-account-mapping-class.d.ts +49 -0
  54. package/dist/models/commission-agreement-account-mapping-detail-class.d.ts +44 -0
  55. package/dist/models/commission-agreement-account-mapping-detail-class.js +15 -0
  56. package/dist/models/commission-agreement-partner-class.d.ts +30 -0
  57. package/dist/models/commission-agreement-partner-class.js +15 -0
  58. package/dist/models/commission-agreement-with-account-mapping-class.d.ts +43 -0
  59. package/dist/models/commission-agreement-with-account-mapping-class.js +15 -0
  60. package/dist/models/commission-type-account-mapping-class.d.ts +31 -0
  61. package/dist/models/commission-type-account-mapping-class.js +15 -0
  62. package/dist/models/create-booking-entry-request-dto.d.ts +16 -0
  63. package/dist/models/create-booking-entry-request-dto.js +4 -0
  64. package/dist/models/create-financial-account-request-dto.d.ts +11 -2
  65. package/dist/models/create-financial-account-request-dto.js +6 -3
  66. package/dist/models/create-or-correct-opening-balance-dto.d.ts +25 -0
  67. package/dist/models/create-or-correct-opening-balance-dto.js +15 -0
  68. package/dist/models/create-or-correct-opening-balance-response-class.d.ts +25 -0
  69. package/dist/models/create-or-correct-opening-balance-response-class.js +15 -0
  70. package/dist/models/financial-account-class.d.ts +18 -1
  71. package/dist/models/financial-account-class.js +5 -1
  72. package/dist/models/financial-transaction-class.d.ts +6 -0
  73. package/dist/models/financial-transaction-data-dto.d.ts +7 -0
  74. package/dist/models/financial-transaction-data-dto.js +1 -0
  75. package/dist/models/get-activation-snapshot-response-class.d.ts +25 -0
  76. package/dist/models/get-activation-snapshot-response-class.js +15 -0
  77. package/dist/models/index.d.ts +33 -1
  78. package/dist/models/index.js +33 -1
  79. package/dist/models/list-commission-account-mappings-response-class.d.ts +43 -0
  80. package/dist/models/list-commission-account-mappings-response-class.js +15 -0
  81. package/dist/models/list-commission-agreements-with-account-mappings-response-class.d.ts +43 -0
  82. package/dist/models/list-commission-agreements-with-account-mappings-response-class.js +15 -0
  83. package/dist/models/list-commission-type-account-mappings-response-class.d.ts +43 -0
  84. package/dist/models/list-commission-type-account-mappings-response-class.js +15 -0
  85. package/dist/models/list-product-account-mappings-response-class.d.ts +43 -0
  86. package/dist/models/list-product-account-mappings-response-class.js +15 -0
  87. package/dist/models/list-products-with-account-mappings-response-class.d.ts +43 -0
  88. package/dist/models/list-products-with-account-mappings-response-class.js +15 -0
  89. package/dist/models/opening-balance-item-dto.d.ts +41 -0
  90. package/dist/models/opening-balance-item-dto.js +20 -0
  91. package/dist/models/personal-account-class.d.ts +6 -0
  92. package/dist/models/personal-account-range-class.d.ts +42 -0
  93. package/dist/models/personal-account-range-class.js +21 -0
  94. package/dist/models/personal-account-range-dto.d.ts +42 -0
  95. package/dist/models/personal-account-range-dto.js +21 -0
  96. package/dist/models/post-financial-event-request-dto.d.ts +46 -0
  97. package/dist/models/post-financial-event-request-dto.js +25 -0
  98. package/dist/models/post-financial-event-response-class.d.ts +25 -0
  99. package/dist/models/post-financial-event-response-class.js +15 -0
  100. package/dist/models/premium-item-account-mapping-class.d.ts +37 -0
  101. package/dist/models/premium-item-account-mapping-class.js +15 -0
  102. package/dist/models/product-account-mapping-class.d.ts +61 -0
  103. package/dist/models/product-account-mapping-class.js +15 -0
  104. package/dist/models/product-account-mapping-detail-class.d.ts +56 -0
  105. package/dist/models/product-account-mapping-detail-class.js +15 -0
  106. package/dist/models/product-risk-carrier-class.d.ts +42 -0
  107. package/dist/models/product-risk-carrier-class.js +15 -0
  108. package/dist/models/product-version-account-mapping-detail-class.d.ts +50 -0
  109. package/dist/models/product-version-account-mapping-detail-class.js +15 -0
  110. package/dist/models/product-version-with-account-mappings-class.d.ts +42 -0
  111. package/dist/models/product-version-with-account-mappings-class.js +15 -0
  112. package/dist/models/product-with-account-mappings-class.d.ts +49 -0
  113. package/dist/models/product-with-account-mappings-class.js +15 -0
  114. package/dist/models/put-premium-item-account-body-dto.d.ts +24 -0
  115. package/dist/models/put-premium-item-account-body-dto.js +15 -0
  116. package/dist/models/put-product-category-account-body-dto.d.ts +24 -0
  117. package/dist/models/put-product-category-account-body-dto.js +15 -0
  118. package/dist/models/put-product-risk-carrier-body-dto.d.ts +24 -0
  119. package/dist/models/put-product-risk-carrier-body-dto.js +15 -0
  120. package/dist/models/put-product-version-category-account-body-dto.d.ts +24 -0
  121. package/dist/models/put-product-version-category-account-body-dto.js +15 -0
  122. package/dist/models/resolved-account-mapping-class.d.ts +31 -0
  123. package/dist/models/resolved-account-mapping-class.js +15 -0
  124. package/dist/models/resolved-commission-account-mapping-class.d.ts +37 -0
  125. package/dist/models/resolved-commission-account-mapping-class.js +21 -0
  126. package/dist/models/update-commission-agreement-account-body-dto.d.ts +24 -0
  127. package/dist/models/update-commission-agreement-account-body-dto.js +15 -0
  128. package/dist/models/update-commission-type-account-body-dto.d.ts +24 -0
  129. package/dist/models/update-commission-type-account-body-dto.js +15 -0
  130. package/dist/models/update-financial-account-body-dto.d.ts +6 -0
  131. package/models/account-mapping-class.ts +6 -3
  132. package/models/accounting-category-class.ts +12 -0
  133. package/models/accounting-config-class.ts +14 -0
  134. package/models/accounting-config-data-class.ts +7 -0
  135. package/models/accounting-config-data-dto-default-account-mappings.ts +12 -3
  136. package/models/accounting-config-data-dto.ts +7 -0
  137. package/models/booking-entry-class.ts +36 -0
  138. package/models/commission-account-mapping-class.ts +55 -0
  139. package/models/commission-agreement-account-mapping-detail-class.ts +50 -0
  140. package/models/commission-agreement-partner-class.ts +36 -0
  141. package/models/commission-agreement-with-account-mapping-class.ts +49 -0
  142. package/models/commission-type-account-mapping-class.ts +37 -0
  143. package/models/create-booking-entry-request-dto.ts +19 -0
  144. package/models/create-financial-account-request-dto.ts +12 -3
  145. package/models/create-or-correct-opening-balance-dto.ts +31 -0
  146. package/models/create-or-correct-opening-balance-response-class.ts +31 -0
  147. package/models/financial-account-class.ts +19 -1
  148. package/models/financial-transaction-class.ts +6 -0
  149. package/models/financial-transaction-data-dto.ts +7 -0
  150. package/models/get-activation-snapshot-response-class.ts +31 -0
  151. package/models/index.ts +33 -1
  152. package/models/list-commission-account-mappings-response-class.ts +49 -0
  153. package/models/list-commission-agreements-with-account-mappings-response-class.ts +49 -0
  154. package/models/list-commission-type-account-mappings-response-class.ts +49 -0
  155. package/models/list-product-account-mappings-response-class.ts +49 -0
  156. package/models/list-products-with-account-mappings-response-class.ts +49 -0
  157. package/models/opening-balance-item-dto.ts +50 -0
  158. package/models/personal-account-class.ts +6 -0
  159. package/models/personal-account-range-class.ts +51 -0
  160. package/models/personal-account-range-dto.ts +51 -0
  161. package/models/post-financial-event-request-dto.ts +55 -0
  162. package/models/post-financial-event-response-class.ts +31 -0
  163. package/models/premium-item-account-mapping-class.ts +43 -0
  164. package/models/product-account-mapping-class.ts +67 -0
  165. package/models/product-account-mapping-detail-class.ts +62 -0
  166. package/models/product-risk-carrier-class.ts +48 -0
  167. package/models/product-version-account-mapping-detail-class.ts +56 -0
  168. package/models/product-version-with-account-mappings-class.ts +48 -0
  169. package/models/product-with-account-mappings-class.ts +55 -0
  170. package/models/put-premium-item-account-body-dto.ts +30 -0
  171. package/models/put-product-category-account-body-dto.ts +30 -0
  172. package/models/put-product-risk-carrier-body-dto.ts +30 -0
  173. package/models/put-product-version-category-account-body-dto.ts +30 -0
  174. package/models/resolved-account-mapping-class.ts +37 -0
  175. package/models/resolved-commission-account-mapping-class.ts +46 -0
  176. package/models/update-commission-agreement-account-body-dto.ts +30 -0
  177. package/models/update-commission-type-account-body-dto.ts +30 -0
  178. package/models/update-financial-account-body-dto.ts +6 -0
  179. package/package.json +2 -2
  180. package/dist/models/get-subledger-settings-response-class.d.ts +0 -36
  181. package/models/get-subledger-settings-response-class.ts +0 -42
  182. /package/dist/models/{get-subledger-settings-response-class.js → commission-account-mapping-class.js} +0 -0
@@ -39,7 +39,7 @@ import { UpdateFinancialAccountResponseClass } from '../models';
39
39
  export const FinancialAccountsApiAxiosParamCreator = function (configuration?: Configuration) {
40
40
  return {
41
41
  /**
42
- * 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\"
42
+ * 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\"
43
43
  * @summary Create the Financial Account
44
44
  * @param {CreateFinancialAccountRequestDto} createFinancialAccountRequestDto
45
45
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
@@ -67,8 +67,13 @@ export const FinancialAccountsApiAxiosParamCreator = function (configuration?: C
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 FinancialAccountsApiAxiosParamCreator = function (configuration?: C
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 FinancialAccountsApiAxiosParamCreator = function (configuration?: C
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
 
@@ -188,11 +203,11 @@ export const FinancialAccountsApiAxiosParamCreator = function (configuration?: C
188
203
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
189
204
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
190
205
  * @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.
191
- * @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>
206
+ * @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>
192
207
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
193
208
  * @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>
194
209
  * @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/>
195
- * @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>
210
+ * @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>
196
211
  * @param {*} [options] Override http request option.
197
212
  * @throws {RequiredError}
198
213
  */
@@ -243,8 +258,13 @@ export const FinancialAccountsApiAxiosParamCreator = function (configuration?: C
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
 
@@ -259,7 +279,7 @@ export const FinancialAccountsApiAxiosParamCreator = function (configuration?: C
259
279
  };
260
280
  },
261
281
  /**
262
- * 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\"
282
+ * 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\"
263
283
  * @summary Update the Financial Account
264
284
  * @param {string} code Unique identifier for the object.
265
285
  * @param {UpdateFinancialAccountBodyDto} updateFinancialAccountBodyDto
@@ -291,8 +311,13 @@ export const FinancialAccountsApiAxiosParamCreator = function (configuration?: C
291
311
  // http bearer authentication required
292
312
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
293
313
 
294
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
295
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
314
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
315
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
316
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
317
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
318
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
319
+ if (authorizationValue || authorizationKeepEmpty) {
320
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
296
321
  }
297
322
 
298
323
 
@@ -320,7 +345,7 @@ export const FinancialAccountsApiFp = function(configuration?: Configuration) {
320
345
  const localVarAxiosParamCreator = FinancialAccountsApiAxiosParamCreator(configuration)
321
346
  return {
322
347
  /**
323
- * 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\"
348
+ * 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\"
324
349
  * @summary Create the Financial Account
325
350
  * @param {CreateFinancialAccountRequestDto} createFinancialAccountRequestDto
326
351
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
@@ -362,11 +387,11 @@ export const FinancialAccountsApiFp = function(configuration?: Configuration) {
362
387
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
363
388
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
364
389
  * @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.
365
- * @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>
390
+ * @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>
366
391
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
367
392
  * @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>
368
393
  * @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/>
369
- * @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>
394
+ * @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>
370
395
  * @param {*} [options] Override http request option.
371
396
  * @throws {RequiredError}
372
397
  */
@@ -375,7 +400,7 @@ export const FinancialAccountsApiFp = function(configuration?: Configuration) {
375
400
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
376
401
  },
377
402
  /**
378
- * 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\"
403
+ * 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\"
379
404
  * @summary Update the Financial Account
380
405
  * @param {string} code Unique identifier for the object.
381
406
  * @param {UpdateFinancialAccountBodyDto} updateFinancialAccountBodyDto
@@ -398,7 +423,7 @@ export const FinancialAccountsApiFactory = function (configuration?: Configurati
398
423
  const localVarFp = FinancialAccountsApiFp(configuration)
399
424
  return {
400
425
  /**
401
- * 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\"
426
+ * 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\"
402
427
  * @summary Create the Financial Account
403
428
  * @param {CreateFinancialAccountRequestDto} createFinancialAccountRequestDto
404
429
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
@@ -437,11 +462,11 @@ export const FinancialAccountsApiFactory = function (configuration?: Configurati
437
462
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
438
463
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
439
464
  * @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.
440
- * @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>
465
+ * @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>
441
466
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
442
467
  * @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>
443
468
  * @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/>
444
- * @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>
469
+ * @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>
445
470
  * @param {*} [options] Override http request option.
446
471
  * @throws {RequiredError}
447
472
  */
@@ -449,7 +474,7 @@ export const FinancialAccountsApiFactory = function (configuration?: Configurati
449
474
  return localVarFp.listFinancialAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
450
475
  },
451
476
  /**
452
- * 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\"
477
+ * 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\"
453
478
  * @summary Update the Financial Account
454
479
  * @param {string} code Unique identifier for the object.
455
480
  * @param {UpdateFinancialAccountBodyDto} updateFinancialAccountBodyDto
@@ -561,7 +586,7 @@ export interface FinancialAccountsApiListFinancialAccountsRequest {
561
586
  readonly pageToken?: string
562
587
 
563
588
  /**
564
- * 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>
589
+ * 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>
565
590
  * @type {string}
566
591
  * @memberof FinancialAccountsApiListFinancialAccounts
567
592
  */
@@ -589,7 +614,7 @@ export interface FinancialAccountsApiListFinancialAccountsRequest {
589
614
  readonly expand?: string
590
615
 
591
616
  /**
592
- * 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>
617
+ * 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>
593
618
  * @type {string}
594
619
  * @memberof FinancialAccountsApiListFinancialAccounts
595
620
  */
@@ -632,7 +657,7 @@ export interface FinancialAccountsApiUpdateFinancialAccountRequest {
632
657
  */
633
658
  export class FinancialAccountsApi extends BaseAPI {
634
659
  /**
635
- * 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\"
660
+ * 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\"
636
661
  * @summary Create the Financial Account
637
662
  * @param {FinancialAccountsApiCreateFinancialAccountRequest} requestParameters Request parameters.
638
663
  * @param {*} [options] Override http request option.
@@ -640,7 +665,7 @@ export class FinancialAccountsApi extends BaseAPI {
640
665
  * @memberof FinancialAccountsApi
641
666
  */
642
667
  public createFinancialAccount(requestParameters: FinancialAccountsApiCreateFinancialAccountRequest, options?: AxiosRequestConfig) {
643
- return FinancialAccountsApiFp(this.configuration).createFinancialAccount(requestParameters.createFinancialAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
668
+ return FinancialAccountsApiFp(this.configuration).createFinancialAccount(requestParameters.createFinancialAccountRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
644
669
  }
645
670
 
646
671
  /**
@@ -652,7 +677,7 @@ export class FinancialAccountsApi extends BaseAPI {
652
677
  * @memberof FinancialAccountsApi
653
678
  */
654
679
  public deleteFinancialAccount(requestParameters: FinancialAccountsApiDeleteFinancialAccountRequest, options?: AxiosRequestConfig) {
655
- return FinancialAccountsApiFp(this.configuration).deleteFinancialAccount(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
680
+ return FinancialAccountsApiFp(this.configuration).deleteFinancialAccount(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
656
681
  }
657
682
 
658
683
  /**
@@ -664,7 +689,7 @@ export class FinancialAccountsApi extends BaseAPI {
664
689
  * @memberof FinancialAccountsApi
665
690
  */
666
691
  public getFinancialAccount(requestParameters: FinancialAccountsApiGetFinancialAccountRequest, options?: AxiosRequestConfig) {
667
- return FinancialAccountsApiFp(this.configuration).getFinancialAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
692
+ return FinancialAccountsApiFp(this.configuration).getFinancialAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
668
693
  }
669
694
 
670
695
  /**
@@ -676,11 +701,11 @@ export class FinancialAccountsApi extends BaseAPI {
676
701
  * @memberof FinancialAccountsApi
677
702
  */
678
703
  public listFinancialAccounts(requestParameters: FinancialAccountsApiListFinancialAccountsRequest = {}, options?: AxiosRequestConfig) {
679
- 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));
704
+ 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));
680
705
  }
681
706
 
682
707
  /**
683
- * 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\"
708
+ * 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\"
684
709
  * @summary Update the Financial Account
685
710
  * @param {FinancialAccountsApiUpdateFinancialAccountRequest} requestParameters Request parameters.
686
711
  * @param {*} [options] Override http request option.
@@ -688,6 +713,6 @@ export class FinancialAccountsApi extends BaseAPI {
688
713
  * @memberof FinancialAccountsApi
689
714
  */
690
715
  public updateFinancialAccount(requestParameters: FinancialAccountsApiUpdateFinancialAccountRequest, options?: AxiosRequestConfig) {
691
- return FinancialAccountsApiFp(this.configuration).updateFinancialAccount(requestParameters.code, requestParameters.updateFinancialAccountBodyDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
716
+ return FinancialAccountsApiFp(this.configuration).updateFinancialAccount(requestParameters.code, requestParameters.updateFinancialAccountBodyDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
692
717
  }
693
718
  }
@@ -67,8 +67,13 @@ export const FinancialTransactionsApiAxiosParamCreator = function (configuration
67
67
  localVarQueryParameter['expand'] = expand;
68
68
  }
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
 
@@ -143,8 +148,13 @@ export const FinancialTransactionsApiAxiosParamCreator = function (configuration
143
148
  localVarQueryParameter['filters'] = filters;
144
149
  }
145
150
 
146
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
147
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
151
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
152
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
153
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
154
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
155
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
156
+ if (authorizationValue || authorizationKeepEmpty) {
157
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
148
158
  }
149
159
 
150
160
 
@@ -348,7 +358,7 @@ export class FinancialTransactionsApi extends BaseAPI {
348
358
  * @memberof FinancialTransactionsApi
349
359
  */
350
360
  public getFinancialTransaction(requestParameters: FinancialTransactionsApiGetFinancialTransactionRequest, options?: AxiosRequestConfig) {
351
- return FinancialTransactionsApiFp(this.configuration).getFinancialTransaction(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
361
+ return FinancialTransactionsApiFp(this.configuration).getFinancialTransaction(requestParameters.code, requestParameters.expand, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
352
362
  }
353
363
 
354
364
  /**
@@ -360,6 +370,6 @@ export class FinancialTransactionsApi extends BaseAPI {
360
370
  * @memberof FinancialTransactionsApi
361
371
  */
362
372
  public listFinancialTransactions(requestParameters: FinancialTransactionsApiListFinancialTransactionsRequest = {}, options?: AxiosRequestConfig) {
363
- 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));
373
+ 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));
364
374
  }
365
375
  }
package/api/health-api.ts CHANGED
@@ -119,6 +119,6 @@ export class HealthApi extends BaseAPI {
119
119
  * @memberof HealthApi
120
120
  */
121
121
  public check(options?: AxiosRequestConfig) {
122
- return HealthApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
122
+ return HealthApiFp(this.configuration).check(this.withOwner(options)).then((request) => request(this.axios, this.basePath));
123
123
  }
124
124
  }
@@ -63,8 +63,13 @@ export const NumberRangesApiAxiosParamCreator = function (configuration?: Config
63
63
  // http bearer authentication required
64
64
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
65
65
 
66
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
67
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
66
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
67
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
68
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
69
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
70
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
71
+ if (authorizationValue || authorizationKeepEmpty) {
72
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
68
73
  }
69
74
 
70
75
 
@@ -111,8 +116,13 @@ export const NumberRangesApiAxiosParamCreator = function (configuration?: Config
111
116
  // http bearer authentication required
112
117
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
113
118
 
114
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
115
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
119
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
120
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
121
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
122
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
123
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
124
+ if (authorizationValue || authorizationKeepEmpty) {
125
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
116
126
  }
117
127
 
118
128
 
@@ -163,8 +173,13 @@ export const NumberRangesApiAxiosParamCreator = function (configuration?: Config
163
173
  localVarQueryParameter['expand'] = expand;
164
174
  }
165
175
 
166
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
167
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
176
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
177
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
178
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
179
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
180
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
181
+ if (authorizationValue || authorizationKeepEmpty) {
182
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
168
183
  }
169
184
 
170
185
 
@@ -239,8 +254,13 @@ export const NumberRangesApiAxiosParamCreator = function (configuration?: Config
239
254
  localVarQueryParameter['filters'] = filters;
240
255
  }
241
256
 
242
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
243
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
257
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
258
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
259
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
260
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
261
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
262
+ if (authorizationValue || authorizationKeepEmpty) {
263
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
244
264
  }
245
265
 
246
266
 
@@ -532,7 +552,7 @@ export class NumberRangesApi extends BaseAPI {
532
552
  * @memberof NumberRangesApi
533
553
  */
534
554
  public createNumberRange(requestParameters: NumberRangesApiCreateNumberRangeRequest, options?: AxiosRequestConfig) {
535
- return NumberRangesApiFp(this.configuration).createNumberRange(requestParameters.createNumberRangeRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
555
+ return NumberRangesApiFp(this.configuration).createNumberRange(requestParameters.createNumberRangeRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
536
556
  }
537
557
 
538
558
  /**
@@ -544,7 +564,7 @@ export class NumberRangesApi extends BaseAPI {
544
564
  * @memberof NumberRangesApi
545
565
  */
546
566
  public deleteNumberRange(requestParameters: NumberRangesApiDeleteNumberRangeRequest, options?: AxiosRequestConfig) {
547
- return NumberRangesApiFp(this.configuration).deleteNumberRange(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
567
+ return NumberRangesApiFp(this.configuration).deleteNumberRange(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
548
568
  }
549
569
 
550
570
  /**
@@ -556,7 +576,7 @@ export class NumberRangesApi extends BaseAPI {
556
576
  * @memberof NumberRangesApi
557
577
  */
558
578
  public getNumberRange(requestParameters: NumberRangesApiGetNumberRangeRequest, options?: AxiosRequestConfig) {
559
- return NumberRangesApiFp(this.configuration).getNumberRange(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
579
+ return NumberRangesApiFp(this.configuration).getNumberRange(requestParameters.code, requestParameters.expand, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
560
580
  }
561
581
 
562
582
  /**
@@ -568,6 +588,6 @@ export class NumberRangesApi extends BaseAPI {
568
588
  * @memberof NumberRangesApi
569
589
  */
570
590
  public listNumberRanges(requestParameters: NumberRangesApiListNumberRangesRequest = {}, options?: AxiosRequestConfig) {
571
- 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));
591
+ 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));
572
592
  }
573
593
  }
@@ -63,8 +63,13 @@ export const PersonalAccountsApiAxiosParamCreator = function (configuration?: Co
63
63
  // http bearer authentication required
64
64
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
65
65
 
66
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
67
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
66
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
67
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
68
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
69
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
70
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
71
+ if (authorizationValue || authorizationKeepEmpty) {
72
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
68
73
  }
69
74
 
70
75
 
@@ -111,8 +116,13 @@ export const PersonalAccountsApiAxiosParamCreator = function (configuration?: Co
111
116
  // http bearer authentication required
112
117
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
113
118
 
114
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
115
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
119
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
120
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
121
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
122
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
123
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
124
+ if (authorizationValue || authorizationKeepEmpty) {
125
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
116
126
  }
117
127
 
118
128
 
@@ -163,8 +173,13 @@ export const PersonalAccountsApiAxiosParamCreator = function (configuration?: Co
163
173
  localVarQueryParameter['expand'] = expand;
164
174
  }
165
175
 
166
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
167
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
176
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
177
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
178
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
179
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
180
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
181
+ if (authorizationValue || authorizationKeepEmpty) {
182
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
168
183
  }
169
184
 
170
185
 
@@ -239,8 +254,13 @@ export const PersonalAccountsApiAxiosParamCreator = function (configuration?: Co
239
254
  localVarQueryParameter['filters'] = filters;
240
255
  }
241
256
 
242
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
243
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
257
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
258
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
259
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
260
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
261
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
262
+ if (authorizationValue || authorizationKeepEmpty) {
263
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
244
264
  }
245
265
 
246
266
 
@@ -532,7 +552,7 @@ export class PersonalAccountsApi extends BaseAPI {
532
552
  * @memberof PersonalAccountsApi
533
553
  */
534
554
  public createPersonalAccount(requestParameters: PersonalAccountsApiCreatePersonalAccountRequest, options?: AxiosRequestConfig) {
535
- return PersonalAccountsApiFp(this.configuration).createPersonalAccount(requestParameters.createPersonalAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
555
+ return PersonalAccountsApiFp(this.configuration).createPersonalAccount(requestParameters.createPersonalAccountRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
536
556
  }
537
557
 
538
558
  /**
@@ -544,7 +564,7 @@ export class PersonalAccountsApi extends BaseAPI {
544
564
  * @memberof PersonalAccountsApi
545
565
  */
546
566
  public deletePersonalAccount(requestParameters: PersonalAccountsApiDeletePersonalAccountRequest, options?: AxiosRequestConfig) {
547
- return PersonalAccountsApiFp(this.configuration).deletePersonalAccount(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
567
+ return PersonalAccountsApiFp(this.configuration).deletePersonalAccount(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
548
568
  }
549
569
 
550
570
  /**
@@ -556,7 +576,7 @@ export class PersonalAccountsApi extends BaseAPI {
556
576
  * @memberof PersonalAccountsApi
557
577
  */
558
578
  public getPersonalAccount(requestParameters: PersonalAccountsApiGetPersonalAccountRequest, options?: AxiosRequestConfig) {
559
- return PersonalAccountsApiFp(this.configuration).getPersonalAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
579
+ return PersonalAccountsApiFp(this.configuration).getPersonalAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
560
580
  }
561
581
 
562
582
  /**
@@ -568,6 +588,6 @@ export class PersonalAccountsApi extends BaseAPI {
568
588
  * @memberof PersonalAccountsApi
569
589
  */
570
590
  public listPersonalAccounts(requestParameters: PersonalAccountsApiListPersonalAccountsRequest = {}, options?: AxiosRequestConfig) {
571
- 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));
591
+ 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));
572
592
  }
573
593
  }