@emilgroup/accounting-sdk-node 1.32.1-beta.1 → 1.32.1-beta.100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/.openapi-generator/FILES +37 -0
  2. package/README.md +2 -2
  3. package/api/accounting-configs-api.ts +158 -28
  4. package/api/booking-entries-api.ts +252 -13
  5. package/api/commission-account-mappings-api.ts +1235 -0
  6. package/api/financial-accounts-api.ts +169 -24
  7. package/api/financial-transactions-api.ts +16 -6
  8. package/api/health-api.ts +1 -1
  9. package/api/number-ranges-api.ts +32 -12
  10. package/api/personal-accounts-api.ts +32 -12
  11. package/api/product-account-mappings-api.ts +1755 -0
  12. package/api.ts +4 -0
  13. package/base.ts +4 -0
  14. package/common.ts +3 -2
  15. package/dist/api/accounting-configs-api.d.ts +54 -7
  16. package/dist/api/accounting-configs-api.js +206 -63
  17. package/dist/api/booking-entries-api.d.ts +121 -7
  18. package/dist/api/booking-entries-api.js +241 -26
  19. package/dist/api/commission-account-mappings-api.d.ts +685 -0
  20. package/dist/api/commission-account-mappings-api.js +1055 -0
  21. package/dist/api/financial-accounts-api.d.ts +82 -16
  22. package/dist/api/financial-accounts-api.js +168 -40
  23. package/dist/api/financial-transactions-api.d.ts +2 -2
  24. package/dist/api/financial-transactions-api.js +22 -14
  25. package/dist/api/health-api.d.ts +1 -1
  26. package/dist/api/health-api.js +1 -1
  27. package/dist/api/number-ranges-api.d.ts +4 -4
  28. package/dist/api/number-ranges-api.js +52 -30
  29. package/dist/api/personal-accounts-api.d.ts +4 -4
  30. package/dist/api/personal-accounts-api.js +52 -30
  31. package/dist/api/product-account-mappings-api.d.ts +972 -0
  32. package/dist/api/product-account-mappings-api.js +1497 -0
  33. package/dist/api.d.ts +2 -0
  34. package/dist/api.js +2 -0
  35. package/dist/base.d.ts +1 -0
  36. package/dist/base.js +3 -0
  37. package/dist/common.d.ts +1 -1
  38. package/dist/common.js +1 -0
  39. package/dist/models/account-mapping-class.d.ts +2 -0
  40. package/dist/models/account-mapping-class.js +3 -1
  41. package/dist/models/accounting-config-class.d.ts +11 -0
  42. package/dist/models/accounting-config-class.js +5 -0
  43. package/dist/models/accounting-config-data-class.d.ts +7 -0
  44. package/dist/models/accounting-config-data-dto-default-account-mappings.d.ts +8 -0
  45. package/dist/models/accounting-config-data-dto-default-account-mappings.js +3 -1
  46. package/dist/models/accounting-config-data-dto.d.ts +7 -0
  47. package/dist/models/booking-entry-class.d.ts +35 -0
  48. package/dist/models/booking-entry-class.js +11 -1
  49. package/dist/models/commission-account-mapping-class.d.ts +49 -0
  50. package/dist/models/commission-account-mapping-class.js +15 -0
  51. package/dist/models/commission-agreement-account-mapping-detail-class.d.ts +44 -0
  52. package/dist/models/commission-agreement-account-mapping-detail-class.js +15 -0
  53. package/dist/models/commission-agreement-partner-class.d.ts +30 -0
  54. package/dist/models/commission-agreement-partner-class.js +15 -0
  55. package/dist/models/commission-agreement-with-account-mapping-class.d.ts +43 -0
  56. package/dist/models/commission-agreement-with-account-mapping-class.js +15 -0
  57. package/dist/models/commission-type-account-mapping-class.d.ts +31 -0
  58. package/dist/models/commission-type-account-mapping-class.js +15 -0
  59. package/dist/models/create-booking-entry-request-dto.d.ts +22 -0
  60. package/dist/models/create-booking-entry-request-dto.js +10 -0
  61. package/dist/models/create-financial-account-request-dto.d.ts +14 -0
  62. package/dist/models/create-financial-account-request-dto.js +3 -1
  63. package/dist/models/create-or-correct-opening-balance-dto.d.ts +25 -0
  64. package/dist/models/create-or-correct-opening-balance-dto.js +15 -0
  65. package/dist/models/create-or-correct-opening-balance-response-class.d.ts +25 -0
  66. package/dist/models/create-or-correct-opening-balance-response-class.js +15 -0
  67. package/dist/models/financial-account-class.d.ts +30 -1
  68. package/dist/models/financial-account-class.js +5 -1
  69. package/dist/models/financial-transaction-class.d.ts +6 -0
  70. package/dist/models/financial-transaction-data-dto.d.ts +7 -0
  71. package/dist/models/financial-transaction-data-dto.js +1 -0
  72. package/dist/models/get-activation-snapshot-response-class.d.ts +25 -0
  73. package/dist/models/get-activation-snapshot-response-class.js +15 -0
  74. package/dist/models/index.d.ts +35 -0
  75. package/dist/models/index.js +35 -0
  76. package/dist/models/list-commission-account-mappings-response-class.d.ts +43 -0
  77. package/dist/models/list-commission-account-mappings-response-class.js +15 -0
  78. package/dist/models/list-commission-agreements-with-account-mappings-response-class.d.ts +43 -0
  79. package/dist/models/list-commission-agreements-with-account-mappings-response-class.js +15 -0
  80. package/dist/models/list-commission-type-account-mappings-response-class.d.ts +43 -0
  81. package/dist/models/list-commission-type-account-mappings-response-class.js +15 -0
  82. package/dist/models/list-product-account-mappings-response-class.d.ts +43 -0
  83. package/dist/models/list-product-account-mappings-response-class.js +15 -0
  84. package/dist/models/list-products-with-account-mappings-response-class.d.ts +43 -0
  85. package/dist/models/list-products-with-account-mappings-response-class.js +15 -0
  86. package/dist/models/opening-balance-item-dto.d.ts +41 -0
  87. package/dist/models/opening-balance-item-dto.js +20 -0
  88. package/dist/models/personal-account-class.d.ts +6 -0
  89. package/dist/models/personal-account-range-class.d.ts +42 -0
  90. package/dist/models/personal-account-range-class.js +21 -0
  91. package/dist/models/personal-account-range-dto.d.ts +42 -0
  92. package/dist/models/personal-account-range-dto.js +21 -0
  93. package/dist/models/post-financial-event-request-dto.d.ts +46 -0
  94. package/dist/models/post-financial-event-request-dto.js +25 -0
  95. package/dist/models/post-financial-event-response-class.d.ts +25 -0
  96. package/dist/models/post-financial-event-response-class.js +15 -0
  97. package/dist/models/premium-item-account-mapping-class.d.ts +37 -0
  98. package/dist/models/premium-item-account-mapping-class.js +15 -0
  99. package/dist/models/product-account-mapping-class.d.ts +61 -0
  100. package/dist/models/product-account-mapping-class.js +15 -0
  101. package/dist/models/product-account-mapping-detail-class.d.ts +56 -0
  102. package/dist/models/product-account-mapping-detail-class.js +15 -0
  103. package/dist/models/product-risk-carrier-class.d.ts +42 -0
  104. package/dist/models/product-risk-carrier-class.js +15 -0
  105. package/dist/models/product-version-account-mapping-detail-class.d.ts +50 -0
  106. package/dist/models/product-version-account-mapping-detail-class.js +15 -0
  107. package/dist/models/product-version-with-account-mappings-class.d.ts +42 -0
  108. package/dist/models/product-version-with-account-mappings-class.js +15 -0
  109. package/dist/models/product-with-account-mappings-class.d.ts +49 -0
  110. package/dist/models/product-with-account-mappings-class.js +15 -0
  111. package/dist/models/put-premium-item-account-body-dto.d.ts +24 -0
  112. package/dist/models/put-premium-item-account-body-dto.js +15 -0
  113. package/dist/models/put-product-category-account-body-dto.d.ts +24 -0
  114. package/dist/models/put-product-category-account-body-dto.js +15 -0
  115. package/dist/models/put-product-risk-carrier-body-dto.d.ts +24 -0
  116. package/dist/models/put-product-risk-carrier-body-dto.js +15 -0
  117. package/dist/models/put-product-version-category-account-body-dto.d.ts +24 -0
  118. package/dist/models/put-product-version-category-account-body-dto.js +15 -0
  119. package/dist/models/resolved-account-mapping-class.d.ts +31 -0
  120. package/dist/models/resolved-account-mapping-class.js +15 -0
  121. package/dist/models/resolved-commission-account-mapping-class.d.ts +37 -0
  122. package/dist/models/resolved-commission-account-mapping-class.js +21 -0
  123. package/dist/models/update-commission-agreement-account-body-dto.d.ts +24 -0
  124. package/dist/models/update-commission-agreement-account-body-dto.js +15 -0
  125. package/dist/models/update-commission-type-account-body-dto.d.ts +24 -0
  126. package/dist/models/update-commission-type-account-body-dto.js +15 -0
  127. package/dist/models/update-financial-account-body-dto.d.ts +48 -0
  128. package/dist/models/update-financial-account-body-dto.js +15 -0
  129. package/dist/models/update-financial-account-response-class.d.ts +25 -0
  130. package/dist/models/update-financial-account-response-class.js +15 -0
  131. package/models/account-mapping-class.ts +3 -1
  132. package/models/accounting-config-class.ts +14 -0
  133. package/models/accounting-config-data-class.ts +7 -0
  134. package/models/accounting-config-data-dto-default-account-mappings.ts +9 -1
  135. package/models/accounting-config-data-dto.ts +7 -0
  136. package/models/booking-entry-class.ts +36 -0
  137. package/models/commission-account-mapping-class.ts +55 -0
  138. package/models/commission-agreement-account-mapping-detail-class.ts +50 -0
  139. package/models/commission-agreement-partner-class.ts +36 -0
  140. package/models/commission-agreement-with-account-mapping-class.ts +49 -0
  141. package/models/commission-type-account-mapping-class.ts +37 -0
  142. package/models/create-booking-entry-request-dto.ts +25 -0
  143. package/models/create-financial-account-request-dto.ts +15 -1
  144. package/models/create-or-correct-opening-balance-dto.ts +31 -0
  145. package/models/create-or-correct-opening-balance-response-class.ts +31 -0
  146. package/models/financial-account-class.ts +31 -1
  147. package/models/financial-transaction-class.ts +6 -0
  148. package/models/financial-transaction-data-dto.ts +7 -0
  149. package/models/get-activation-snapshot-response-class.ts +31 -0
  150. package/models/index.ts +35 -0
  151. package/models/list-commission-account-mappings-response-class.ts +49 -0
  152. package/models/list-commission-agreements-with-account-mappings-response-class.ts +49 -0
  153. package/models/list-commission-type-account-mappings-response-class.ts +49 -0
  154. package/models/list-product-account-mappings-response-class.ts +49 -0
  155. package/models/list-products-with-account-mappings-response-class.ts +49 -0
  156. package/models/opening-balance-item-dto.ts +50 -0
  157. package/models/personal-account-class.ts +6 -0
  158. package/models/personal-account-range-class.ts +51 -0
  159. package/models/personal-account-range-dto.ts +51 -0
  160. package/models/post-financial-event-request-dto.ts +55 -0
  161. package/models/post-financial-event-response-class.ts +31 -0
  162. package/models/premium-item-account-mapping-class.ts +43 -0
  163. package/models/product-account-mapping-class.ts +67 -0
  164. package/models/product-account-mapping-detail-class.ts +62 -0
  165. package/models/product-risk-carrier-class.ts +48 -0
  166. package/models/product-version-account-mapping-detail-class.ts +56 -0
  167. package/models/product-version-with-account-mappings-class.ts +48 -0
  168. package/models/product-with-account-mappings-class.ts +55 -0
  169. package/models/put-premium-item-account-body-dto.ts +30 -0
  170. package/models/put-product-category-account-body-dto.ts +30 -0
  171. package/models/put-product-risk-carrier-body-dto.ts +30 -0
  172. package/models/put-product-version-category-account-body-dto.ts +30 -0
  173. package/models/resolved-account-mapping-class.ts +37 -0
  174. package/models/resolved-commission-account-mapping-class.ts +46 -0
  175. package/models/update-commission-agreement-account-body-dto.ts +30 -0
  176. package/models/update-commission-type-account-body-dto.ts +30 -0
  177. package/models/update-financial-account-body-dto.ts +54 -0
  178. package/models/update-financial-account-response-class.ts +31 -0
  179. package/package.json +2 -2
@@ -97,7 +97,7 @@ var FinancialAccountsApiAxiosParamCreator = function (configuration) {
97
97
  var _this = this;
98
98
  return {
99
99
  /**
100
- * 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\"
100
+ * 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\"
101
101
  * @summary Create the Financial Account
102
102
  * @param {CreateFinancialAccountRequestDto} createFinancialAccountRequestDto
103
103
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
@@ -107,9 +107,10 @@ var FinancialAccountsApiAxiosParamCreator = function (configuration) {
107
107
  createFinancialAccount: function (createFinancialAccountRequestDto, authorization, options) {
108
108
  if (options === void 0) { options = {}; }
109
109
  return __awaiter(_this, void 0, void 0, function () {
110
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
- return __generator(this, function (_a) {
112
- switch (_a.label) {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
111
+ var _a;
112
+ return __generator(this, function (_b) {
113
+ switch (_b.label) {
113
114
  case 0:
114
115
  // verify required parameter 'createFinancialAccountRequestDto' is not null or undefined
115
116
  (0, common_1.assertParamExists)('createFinancialAccount', 'createFinancialAccountRequestDto', createFinancialAccountRequestDto);
@@ -124,13 +125,19 @@ var FinancialAccountsApiAxiosParamCreator = function (configuration) {
124
125
  localVarQueryParameter = {};
125
126
  // authentication bearer required
126
127
  // http bearer authentication required
127
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
129
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
130
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
131
+ ];
128
132
  case 1:
129
133
  // authentication bearer required
130
134
  // http bearer authentication required
131
- _a.sent();
132
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
135
+ _b.sent();
136
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
137
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
138
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
139
+ if (authorizationValue || authorizationKeepEmpty) {
140
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
134
141
  }
135
142
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
143
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -156,9 +163,10 @@ var FinancialAccountsApiAxiosParamCreator = function (configuration) {
156
163
  deleteFinancialAccount: function (code, authorization, options) {
157
164
  if (options === void 0) { options = {}; }
158
165
  return __awaiter(_this, void 0, void 0, function () {
159
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
- return __generator(this, function (_a) {
161
- switch (_a.label) {
166
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
167
+ var _a;
168
+ return __generator(this, function (_b) {
169
+ switch (_b.label) {
162
170
  case 0:
163
171
  // verify required parameter 'code' is not null or undefined
164
172
  (0, common_1.assertParamExists)('deleteFinancialAccount', 'code', code);
@@ -174,13 +182,19 @@ var FinancialAccountsApiAxiosParamCreator = function (configuration) {
174
182
  localVarQueryParameter = {};
175
183
  // authentication bearer required
176
184
  // http bearer authentication required
177
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
185
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
186
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
187
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
188
+ ];
178
189
  case 1:
179
190
  // authentication bearer required
180
191
  // http bearer authentication required
181
- _a.sent();
182
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
192
+ _b.sent();
193
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
194
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
195
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
196
+ if (authorizationValue || authorizationKeepEmpty) {
197
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
184
198
  }
185
199
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
200
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -205,9 +219,10 @@ var FinancialAccountsApiAxiosParamCreator = function (configuration) {
205
219
  getFinancialAccount: function (code, expand, authorization, options) {
206
220
  if (options === void 0) { options = {}; }
207
221
  return __awaiter(_this, void 0, void 0, function () {
208
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
209
- return __generator(this, function (_a) {
210
- switch (_a.label) {
222
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
223
+ var _a;
224
+ return __generator(this, function (_b) {
225
+ switch (_b.label) {
211
226
  case 0:
212
227
  // verify required parameter 'code' is not null or undefined
213
228
  (0, common_1.assertParamExists)('getFinancialAccount', 'code', code);
@@ -229,12 +244,15 @@ var FinancialAccountsApiAxiosParamCreator = function (configuration) {
229
244
  case 1:
230
245
  // authentication bearer required
231
246
  // http bearer authentication required
232
- _a.sent();
247
+ _b.sent();
233
248
  if (expand !== undefined) {
234
249
  localVarQueryParameter['expand'] = expand;
235
250
  }
236
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
237
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
251
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
252
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
253
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
254
+ if (authorizationValue || authorizationKeepEmpty) {
255
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
238
256
  }
239
257
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
240
258
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -253,20 +271,21 @@ var FinancialAccountsApiAxiosParamCreator = function (configuration) {
253
271
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
254
272
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
255
273
  * @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.
256
- * @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>
274
+ * @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>
257
275
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
258
276
  * @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>
259
277
  * @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/>
260
- * @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>
278
+ * @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>
261
279
  * @param {*} [options] Override http request option.
262
280
  * @throws {RequiredError}
263
281
  */
264
282
  listFinancialAccounts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
265
283
  if (options === void 0) { options = {}; }
266
284
  return __awaiter(_this, void 0, void 0, function () {
267
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
268
- return __generator(this, function (_a) {
269
- switch (_a.label) {
285
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
286
+ var _a;
287
+ return __generator(this, function (_b) {
288
+ switch (_b.label) {
270
289
  case 0:
271
290
  localVarPath = "/accountingservice/v1/financial-accounts";
272
291
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -283,7 +302,7 @@ var FinancialAccountsApiAxiosParamCreator = function (configuration) {
283
302
  case 1:
284
303
  // authentication bearer required
285
304
  // http bearer authentication required
286
- _a.sent();
305
+ _b.sent();
287
306
  if (pageSize !== undefined) {
288
307
  localVarQueryParameter['pageSize'] = pageSize;
289
308
  }
@@ -305,12 +324,75 @@ var FinancialAccountsApiAxiosParamCreator = function (configuration) {
305
324
  if (filters !== undefined) {
306
325
  localVarQueryParameter['filters'] = filters;
307
326
  }
308
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
309
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
327
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
328
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
329
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
330
+ if (authorizationValue || authorizationKeepEmpty) {
331
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
332
+ }
333
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
334
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
335
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
336
+ return [2 /*return*/, {
337
+ url: (0, common_1.toPathString)(localVarUrlObj),
338
+ options: localVarRequestOptions,
339
+ }];
340
+ }
341
+ });
342
+ });
343
+ },
344
+ /**
345
+ * 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\"
346
+ * @summary Update the Financial Account
347
+ * @param {string} code Unique identifier for the object.
348
+ * @param {UpdateFinancialAccountBodyDto} updateFinancialAccountBodyDto
349
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
350
+ * @param {*} [options] Override http request option.
351
+ * @throws {RequiredError}
352
+ */
353
+ updateFinancialAccount: function (code, updateFinancialAccountBodyDto, authorization, options) {
354
+ if (options === void 0) { options = {}; }
355
+ return __awaiter(_this, void 0, void 0, function () {
356
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
357
+ var _a;
358
+ return __generator(this, function (_b) {
359
+ switch (_b.label) {
360
+ case 0:
361
+ // verify required parameter 'code' is not null or undefined
362
+ (0, common_1.assertParamExists)('updateFinancialAccount', 'code', code);
363
+ // verify required parameter 'updateFinancialAccountBodyDto' is not null or undefined
364
+ (0, common_1.assertParamExists)('updateFinancialAccount', 'updateFinancialAccountBodyDto', updateFinancialAccountBodyDto);
365
+ localVarPath = "/accountingservice/v1/financial-accounts/{code}"
366
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
367
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
368
+ if (configuration) {
369
+ baseOptions = configuration.baseOptions;
370
+ baseAccessToken = configuration.accessToken;
371
+ }
372
+ localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
373
+ localVarHeaderParameter = {};
374
+ localVarQueryParameter = {};
375
+ // authentication bearer required
376
+ // http bearer authentication required
377
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
378
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
379
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
380
+ ];
381
+ case 1:
382
+ // authentication bearer required
383
+ // http bearer authentication required
384
+ _b.sent();
385
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
386
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
387
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
388
+ if (authorizationValue || authorizationKeepEmpty) {
389
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
310
390
  }
391
+ localVarHeaderParameter['Content-Type'] = 'application/json';
311
392
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
312
393
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
313
394
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
395
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateFinancialAccountBodyDto, localVarRequestOptions, configuration);
314
396
  return [2 /*return*/, {
315
397
  url: (0, common_1.toPathString)(localVarUrlObj),
316
398
  options: localVarRequestOptions,
@@ -330,7 +412,7 @@ var FinancialAccountsApiFp = function (configuration) {
330
412
  var localVarAxiosParamCreator = (0, exports.FinancialAccountsApiAxiosParamCreator)(configuration);
331
413
  return {
332
414
  /**
333
- * 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\"
415
+ * 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\"
334
416
  * @summary Create the Financial Account
335
417
  * @param {CreateFinancialAccountRequestDto} createFinancialAccountRequestDto
336
418
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
@@ -399,11 +481,11 @@ var FinancialAccountsApiFp = function (configuration) {
399
481
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
400
482
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
401
483
  * @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.
402
- * @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>
484
+ * @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>
403
485
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
404
486
  * @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>
405
487
  * @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/>
406
- * @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>
488
+ * @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>
407
489
  * @param {*} [options] Override http request option.
408
490
  * @throws {RequiredError}
409
491
  */
@@ -420,6 +502,28 @@ var FinancialAccountsApiFp = function (configuration) {
420
502
  });
421
503
  });
422
504
  },
505
+ /**
506
+ * 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\"
507
+ * @summary Update the Financial Account
508
+ * @param {string} code Unique identifier for the object.
509
+ * @param {UpdateFinancialAccountBodyDto} updateFinancialAccountBodyDto
510
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
511
+ * @param {*} [options] Override http request option.
512
+ * @throws {RequiredError}
513
+ */
514
+ updateFinancialAccount: function (code, updateFinancialAccountBodyDto, authorization, options) {
515
+ return __awaiter(this, void 0, void 0, function () {
516
+ var localVarAxiosArgs;
517
+ return __generator(this, function (_a) {
518
+ switch (_a.label) {
519
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateFinancialAccount(code, updateFinancialAccountBodyDto, authorization, options)];
520
+ case 1:
521
+ localVarAxiosArgs = _a.sent();
522
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
523
+ }
524
+ });
525
+ });
526
+ },
423
527
  };
424
528
  };
425
529
  exports.FinancialAccountsApiFp = FinancialAccountsApiFp;
@@ -431,7 +535,7 @@ var FinancialAccountsApiFactory = function (configuration, basePath, axios) {
431
535
  var localVarFp = (0, exports.FinancialAccountsApiFp)(configuration);
432
536
  return {
433
537
  /**
434
- * 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\"
538
+ * 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\"
435
539
  * @summary Create the Financial Account
436
540
  * @param {CreateFinancialAccountRequestDto} createFinancialAccountRequestDto
437
541
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
@@ -470,17 +574,29 @@ var FinancialAccountsApiFactory = function (configuration, basePath, axios) {
470
574
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
471
575
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
472
576
  * @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.
473
- * @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>
577
+ * @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>
474
578
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
475
579
  * @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>
476
580
  * @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/>
477
- * @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>
581
+ * @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>
478
582
  * @param {*} [options] Override http request option.
479
583
  * @throws {RequiredError}
480
584
  */
481
585
  listFinancialAccounts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
482
586
  return localVarFp.listFinancialAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
483
587
  },
588
+ /**
589
+ * 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\"
590
+ * @summary Update the Financial Account
591
+ * @param {string} code Unique identifier for the object.
592
+ * @param {UpdateFinancialAccountBodyDto} updateFinancialAccountBodyDto
593
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
594
+ * @param {*} [options] Override http request option.
595
+ * @throws {RequiredError}
596
+ */
597
+ updateFinancialAccount: function (code, updateFinancialAccountBodyDto, authorization, options) {
598
+ return localVarFp.updateFinancialAccount(code, updateFinancialAccountBodyDto, authorization, options).then(function (request) { return request(axios, basePath); });
599
+ },
484
600
  };
485
601
  };
486
602
  exports.FinancialAccountsApiFactory = FinancialAccountsApiFactory;
@@ -496,7 +612,7 @@ var FinancialAccountsApi = /** @class */ (function (_super) {
496
612
  return _super !== null && _super.apply(this, arguments) || this;
497
613
  }
498
614
  /**
499
- * 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\"
615
+ * 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\"
500
616
  * @summary Create the Financial Account
501
617
  * @param {FinancialAccountsApiCreateFinancialAccountRequest} requestParameters Request parameters.
502
618
  * @param {*} [options] Override http request option.
@@ -505,7 +621,7 @@ var FinancialAccountsApi = /** @class */ (function (_super) {
505
621
  */
506
622
  FinancialAccountsApi.prototype.createFinancialAccount = function (requestParameters, options) {
507
623
  var _this = this;
508
- return (0, exports.FinancialAccountsApiFp)(this.configuration).createFinancialAccount(requestParameters.createFinancialAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
624
+ return (0, exports.FinancialAccountsApiFp)(this.configuration).createFinancialAccount(requestParameters.createFinancialAccountRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
509
625
  };
510
626
  /**
511
627
  * Permanently deletes the Financial Account. Supply the unique code that was returned when you created the Financial Account and this will delete it. **Required Permissions** \"accounting-management.financial-accounts.delete\"
@@ -517,7 +633,7 @@ var FinancialAccountsApi = /** @class */ (function (_super) {
517
633
  */
518
634
  FinancialAccountsApi.prototype.deleteFinancialAccount = function (requestParameters, options) {
519
635
  var _this = this;
520
- return (0, exports.FinancialAccountsApiFp)(this.configuration).deleteFinancialAccount(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
636
+ return (0, exports.FinancialAccountsApiFp)(this.configuration).deleteFinancialAccount(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
521
637
  };
522
638
  /**
523
639
  * Retrieves the details of the Financial Account that was previously created. Supply the unique Financial Account code that was returned when you created it and Emil Api will return the corresponding Financial Account information. **Required Permissions** \"accounting-management.financial-accounts.view\"
@@ -529,7 +645,7 @@ var FinancialAccountsApi = /** @class */ (function (_super) {
529
645
  */
530
646
  FinancialAccountsApi.prototype.getFinancialAccount = function (requestParameters, options) {
531
647
  var _this = this;
532
- return (0, exports.FinancialAccountsApiFp)(this.configuration).getFinancialAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
648
+ return (0, exports.FinancialAccountsApiFp)(this.configuration).getFinancialAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
533
649
  };
534
650
  /**
535
651
  * Returns a list of Financial Accounts you have previously created. The Financial Accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"accounting-management.financial-accounts.view\"
@@ -542,7 +658,19 @@ var FinancialAccountsApi = /** @class */ (function (_super) {
542
658
  FinancialAccountsApi.prototype.listFinancialAccounts = function (requestParameters, options) {
543
659
  var _this = this;
544
660
  if (requestParameters === void 0) { requestParameters = {}; }
545
- return (0, exports.FinancialAccountsApiFp)(this.configuration).listFinancialAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
661
+ return (0, exports.FinancialAccountsApiFp)(this.configuration).listFinancialAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
662
+ };
663
+ /**
664
+ * 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\"
665
+ * @summary Update the Financial Account
666
+ * @param {FinancialAccountsApiUpdateFinancialAccountRequest} requestParameters Request parameters.
667
+ * @param {*} [options] Override http request option.
668
+ * @throws {RequiredError}
669
+ * @memberof FinancialAccountsApi
670
+ */
671
+ FinancialAccountsApi.prototype.updateFinancialAccount = function (requestParameters, options) {
672
+ var _this = this;
673
+ return (0, exports.FinancialAccountsApiFp)(this.configuration).updateFinancialAccount(requestParameters.code, requestParameters.updateFinancialAccountBodyDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
546
674
  };
547
675
  return FinancialAccountsApi;
548
676
  }(base_1.BaseAPI));
@@ -202,7 +202,7 @@ export declare class FinancialTransactionsApi extends BaseAPI {
202
202
  * @throws {RequiredError}
203
203
  * @memberof FinancialTransactionsApi
204
204
  */
205
- getFinancialTransaction(requestParameters: FinancialTransactionsApiGetFinancialTransactionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetFinancialTransactionResponseClass, any, {}>>;
205
+ getFinancialTransaction(requestParameters: FinancialTransactionsApiGetFinancialTransactionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetFinancialTransactionResponseClass, any, {}, any>>;
206
206
  /**
207
207
  * This endpoint list financial transactions. **Required Permissions** \"accounting-management.transactions.view\"
208
208
  * @summary List financial transactions
@@ -211,5 +211,5 @@ export declare class FinancialTransactionsApi extends BaseAPI {
211
211
  * @throws {RequiredError}
212
212
  * @memberof FinancialTransactionsApi
213
213
  */
214
- listFinancialTransactions(requestParameters?: FinancialTransactionsApiListFinancialTransactionsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListFinancialTransactionsResponseClass, any, {}>>;
214
+ listFinancialTransactions(requestParameters?: FinancialTransactionsApiListFinancialTransactionsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListFinancialTransactionsResponseClass, any, {}, any>>;
215
215
  }
@@ -108,9 +108,10 @@ var FinancialTransactionsApiAxiosParamCreator = function (configuration) {
108
108
  getFinancialTransaction: function (code, expand, authorization, options) {
109
109
  if (options === void 0) { options = {}; }
110
110
  return __awaiter(_this, void 0, void 0, function () {
111
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
112
- return __generator(this, function (_a) {
113
- switch (_a.label) {
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
112
+ var _a;
113
+ return __generator(this, function (_b) {
114
+ switch (_b.label) {
114
115
  case 0:
115
116
  // verify required parameter 'code' is not null or undefined
116
117
  (0, common_1.assertParamExists)('getFinancialTransaction', 'code', code);
@@ -132,12 +133,15 @@ var FinancialTransactionsApiAxiosParamCreator = function (configuration) {
132
133
  case 1:
133
134
  // authentication bearer required
134
135
  // http bearer authentication required
135
- _a.sent();
136
+ _b.sent();
136
137
  if (expand !== undefined) {
137
138
  localVarQueryParameter['expand'] = expand;
138
139
  }
139
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
140
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
140
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
141
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
142
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
143
+ if (authorizationValue || authorizationKeepEmpty) {
144
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
141
145
  }
142
146
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
143
147
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -167,9 +171,10 @@ var FinancialTransactionsApiAxiosParamCreator = function (configuration) {
167
171
  listFinancialTransactions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
168
172
  if (options === void 0) { options = {}; }
169
173
  return __awaiter(_this, void 0, void 0, function () {
170
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
171
- return __generator(this, function (_a) {
172
- switch (_a.label) {
174
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
175
+ var _a;
176
+ return __generator(this, function (_b) {
177
+ switch (_b.label) {
173
178
  case 0:
174
179
  localVarPath = "/accountingservice/v1/financial-transactions";
175
180
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -186,7 +191,7 @@ var FinancialTransactionsApiAxiosParamCreator = function (configuration) {
186
191
  case 1:
187
192
  // authentication bearer required
188
193
  // http bearer authentication required
189
- _a.sent();
194
+ _b.sent();
190
195
  if (pageSize !== undefined) {
191
196
  localVarQueryParameter['pageSize'] = pageSize;
192
197
  }
@@ -208,8 +213,11 @@ var FinancialTransactionsApiAxiosParamCreator = function (configuration) {
208
213
  if (filters !== undefined) {
209
214
  localVarQueryParameter['filters'] = filters;
210
215
  }
211
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
212
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
216
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
217
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
218
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
219
+ if (authorizationValue || authorizationKeepEmpty) {
220
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
213
221
  }
214
222
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
215
223
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -344,7 +352,7 @@ var FinancialTransactionsApi = /** @class */ (function (_super) {
344
352
  */
345
353
  FinancialTransactionsApi.prototype.getFinancialTransaction = function (requestParameters, options) {
346
354
  var _this = this;
347
- return (0, exports.FinancialTransactionsApiFp)(this.configuration).getFinancialTransaction(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
355
+ return (0, exports.FinancialTransactionsApiFp)(this.configuration).getFinancialTransaction(requestParameters.code, requestParameters.expand, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
348
356
  };
349
357
  /**
350
358
  * This endpoint list financial transactions. **Required Permissions** \"accounting-management.transactions.view\"
@@ -357,7 +365,7 @@ var FinancialTransactionsApi = /** @class */ (function (_super) {
357
365
  FinancialTransactionsApi.prototype.listFinancialTransactions = function (requestParameters, options) {
358
366
  var _this = this;
359
367
  if (requestParameters === void 0) { requestParameters = {}; }
360
- return (0, exports.FinancialTransactionsApiFp)(this.configuration).listFinancialTransactions(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
368
+ return (0, exports.FinancialTransactionsApiFp)(this.configuration).listFinancialTransactions(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
361
369
  };
362
370
  return FinancialTransactionsApi;
363
371
  }(base_1.BaseAPI));
@@ -66,5 +66,5 @@ export declare class HealthApi extends BaseAPI {
66
66
  * @throws {RequiredError}
67
67
  * @memberof HealthApi
68
68
  */
69
- check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any, {}>>;
69
+ check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any, {}, any>>;
70
70
  }
@@ -197,7 +197,7 @@ var HealthApi = /** @class */ (function (_super) {
197
197
  */
198
198
  HealthApi.prototype.check = function (options) {
199
199
  var _this = this;
200
- return (0, exports.HealthApiFp)(this.configuration).check(options).then(function (request) { return request(_this.axios, _this.basePath); });
200
+ return (0, exports.HealthApiFp)(this.configuration).check(this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
201
201
  };
202
202
  return HealthApi;
203
203
  }(base_1.BaseAPI));
@@ -296,7 +296,7 @@ export declare class NumberRangesApi extends BaseAPI {
296
296
  * @throws {RequiredError}
297
297
  * @memberof NumberRangesApi
298
298
  */
299
- createNumberRange(requestParameters: NumberRangesApiCreateNumberRangeRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateNumberRangeResponseClass, any, {}>>;
299
+ createNumberRange(requestParameters: NumberRangesApiCreateNumberRangeRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateNumberRangeResponseClass, any, {}, any>>;
300
300
  /**
301
301
  * Permanently deletes the Personal Account. Supply the unique code that was returned when you created the Personal Account and this will delete it. **Required Permissions** \"accounting-management.transactions.delete\"
302
302
  * @summary Delete the Personal Account
@@ -305,7 +305,7 @@ export declare class NumberRangesApi extends BaseAPI {
305
305
  * @throws {RequiredError}
306
306
  * @memberof NumberRangesApi
307
307
  */
308
- deleteNumberRange(requestParameters: NumberRangesApiDeleteNumberRangeRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
308
+ deleteNumberRange(requestParameters: NumberRangesApiDeleteNumberRangeRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
309
309
  /**
310
310
  * Retrieves the details of the Financial Account that was previously created. Supply the unique Financial Account code that was returned when you created it and Emil Api will return the corresponding Financial Account information. **Required Permissions** \"accounting-management.transactions.view\"
311
311
  * @summary Retrieve the Financial Account
@@ -314,7 +314,7 @@ export declare class NumberRangesApi extends BaseAPI {
314
314
  * @throws {RequiredError}
315
315
  * @memberof NumberRangesApi
316
316
  */
317
- getNumberRange(requestParameters: NumberRangesApiGetNumberRangeRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetNumberRangeResponseClass, any, {}>>;
317
+ getNumberRange(requestParameters: NumberRangesApiGetNumberRangeRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetNumberRangeResponseClass, any, {}, any>>;
318
318
  /**
319
319
  * Returns a list of Financial Accounts you have previously created. The Financial Accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"accounting-management.transactions.view\"
320
320
  * @summary List Financial Accounts
@@ -323,5 +323,5 @@ export declare class NumberRangesApi extends BaseAPI {
323
323
  * @throws {RequiredError}
324
324
  * @memberof NumberRangesApi
325
325
  */
326
- listNumberRanges(requestParameters?: NumberRangesApiListNumberRangesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListNumberRangeResponseClass, any, {}>>;
326
+ listNumberRanges(requestParameters?: NumberRangesApiListNumberRangesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListNumberRangeResponseClass, any, {}, any>>;
327
327
  }