@emilgroup/accounting-sdk 1.34.1-beta.115 → 1.34.1-beta.116

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 (66) hide show
  1. package/.openapi-generator/FILES +5 -0
  2. package/README.md +2 -2
  3. package/api/accounting-configs-api.ts +64 -24
  4. package/api/bank-transaction-account-links-api.ts +346 -0
  5. package/api/booking-entries-api.ts +40 -15
  6. package/api/commission-account-mappings-api.ts +64 -24
  7. package/api/financial-accounts-api.ts +40 -15
  8. package/api/financial-transactions-api.ts +16 -6
  9. package/api/health-api.ts +1 -1
  10. package/api/number-ranges-api.ts +32 -12
  11. package/api/personal-accounts-api.ts +32 -12
  12. package/api/product-account-mappings-api.ts +112 -42
  13. package/api.ts +2 -0
  14. package/base.ts +310 -54
  15. package/common.ts +3 -2
  16. package/configuration.ts +20 -0
  17. package/dist/api/accounting-configs-api.d.ts +8 -8
  18. package/dist/api/accounting-configs-api.js +120 -64
  19. package/dist/api/bank-transaction-account-links-api.d.ts +197 -0
  20. package/dist/api/bank-transaction-account-links-api.js +358 -0
  21. package/dist/api/booking-entries-api.d.ts +5 -5
  22. package/dist/api/booking-entries-api.js +67 -38
  23. package/dist/api/commission-account-mappings-api.d.ts +8 -8
  24. package/dist/api/commission-account-mappings-api.js +108 -61
  25. package/dist/api/financial-accounts-api.d.ts +5 -5
  26. package/dist/api/financial-accounts-api.js +67 -38
  27. package/dist/api/financial-transactions-api.d.ts +2 -2
  28. package/dist/api/financial-transactions-api.js +22 -14
  29. package/dist/api/health-api.d.ts +1 -1
  30. package/dist/api/health-api.js +1 -1
  31. package/dist/api/number-ranges-api.d.ts +4 -4
  32. package/dist/api/number-ranges-api.js +52 -30
  33. package/dist/api/personal-accounts-api.d.ts +4 -4
  34. package/dist/api/personal-accounts-api.js +52 -30
  35. package/dist/api/product-account-mappings-api.d.ts +14 -14
  36. package/dist/api/product-account-mappings-api.js +202 -110
  37. package/dist/api.d.ts +1 -0
  38. package/dist/api.js +1 -0
  39. package/dist/base.d.ts +33 -0
  40. package/dist/base.js +308 -72
  41. package/dist/common.d.ts +1 -1
  42. package/dist/common.js +1 -0
  43. package/dist/configuration.d.ts +17 -0
  44. package/dist/configuration.js +2 -0
  45. package/dist/models/bank-transaction-account-link-carrier-class.d.ts +36 -0
  46. package/dist/models/bank-transaction-account-link-carrier-class.js +15 -0
  47. package/dist/models/bank-transaction-account-link-row-class.d.ts +71 -0
  48. package/dist/models/bank-transaction-account-link-row-class.js +20 -0
  49. package/dist/models/booking-entry-class.d.ts +1 -0
  50. package/dist/models/booking-entry-class.js +1 -0
  51. package/dist/models/create-booking-entry-request-dto.d.ts +1 -7
  52. package/dist/models/create-booking-entry-request-dto.js +0 -6
  53. package/dist/models/get-bank-transaction-account-link-options-response-class.d.ts +25 -0
  54. package/dist/models/get-bank-transaction-account-link-options-response-class.js +15 -0
  55. package/dist/models/index.d.ts +4 -0
  56. package/dist/models/index.js +4 -0
  57. package/dist/models/list-bank-transaction-account-link-carriers-response-class.d.ts +43 -0
  58. package/dist/models/list-bank-transaction-account-link-carriers-response-class.js +15 -0
  59. package/models/bank-transaction-account-link-carrier-class.ts +42 -0
  60. package/models/bank-transaction-account-link-row-class.ts +80 -0
  61. package/models/booking-entry-class.ts +1 -0
  62. package/models/create-booking-entry-request-dto.ts +1 -7
  63. package/models/get-bank-transaction-account-link-options-response-class.ts +31 -0
  64. package/models/index.ts +4 -0
  65. package/models/list-bank-transaction-account-link-carriers-response-class.ts +49 -0
  66. package/package.json +2 -2
@@ -4,6 +4,7 @@
4
4
  README.md
5
5
  api.ts
6
6
  api/accounting-configs-api.ts
7
+ api/bank-transaction-account-links-api.ts
7
8
  api/booking-entries-api.ts
8
9
  api/commission-account-mappings-api.ts
9
10
  api/financial-accounts-api.ts
@@ -25,6 +26,8 @@ models/accounting-config-data-dto-accounting-configuration.ts
25
26
  models/accounting-config-data-dto-default-account-mappings.ts
26
27
  models/accounting-config-data-dto.ts
27
28
  models/accounting-configuration-class.ts
29
+ models/bank-transaction-account-link-carrier-class.ts
30
+ models/bank-transaction-account-link-row-class.ts
28
31
  models/booking-entry-class.ts
29
32
  models/commission-account-mapping-class.ts
30
33
  models/commission-agreement-account-mapping-detail-class.ts
@@ -49,6 +52,7 @@ models/financial-transaction-class.ts
49
52
  models/financial-transaction-data-dto.ts
50
53
  models/get-accounting-categories-response-class.ts
51
54
  models/get-activation-snapshot-response-class.ts
55
+ models/get-bank-transaction-account-link-options-response-class.ts
52
56
  models/get-booking-entry-response-class.ts
53
57
  models/get-financial-account-response-class.ts
54
58
  models/get-financial-transaction-response-class.ts
@@ -57,6 +61,7 @@ models/get-personal-account-response-class.ts
57
61
  models/index.ts
58
62
  models/inline-response200.ts
59
63
  models/inline-response503.ts
64
+ models/list-bank-transaction-account-link-carriers-response-class.ts
60
65
  models/list-booking-entries-response-class.ts
61
66
  models/list-commission-account-mappings-response-class.ts
62
67
  models/list-commission-agreements-with-account-mappings-response-class.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/accounting-sdk@1.34.1-beta.115 --save
20
+ npm install @emilgroup/accounting-sdk@1.34.1-beta.116 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/accounting-sdk@1.34.1-beta.115
24
+ yarn add @emilgroup/accounting-sdk@1.34.1-beta.116
25
25
  ```
26
26
 
27
27
  And then you can import `FinancialAccountsApi`.
@@ -69,8 +69,13 @@ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: C
69
69
  // http bearer authentication required
70
70
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
71
71
 
72
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
73
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
72
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
73
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
74
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
75
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
76
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
77
+ if (authorizationValue || authorizationKeepEmpty) {
78
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
74
79
  }
75
80
 
76
81
 
@@ -117,8 +122,13 @@ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: C
117
122
  // http bearer authentication required
118
123
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
119
124
 
120
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
121
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
125
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
126
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
127
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
128
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
129
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
130
+ if (authorizationValue || authorizationKeepEmpty) {
131
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
122
132
  }
123
133
 
124
134
 
@@ -165,8 +175,13 @@ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: C
165
175
  // http bearer authentication required
166
176
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
167
177
 
168
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
169
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
178
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
179
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
180
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
181
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
182
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
183
+ if (authorizationValue || authorizationKeepEmpty) {
184
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
170
185
  }
171
186
 
172
187
 
@@ -206,8 +221,13 @@ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: C
206
221
  // http bearer authentication required
207
222
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
208
223
 
209
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
210
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
224
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
225
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
226
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
227
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
228
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
229
+ if (authorizationValue || authorizationKeepEmpty) {
230
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
211
231
  }
212
232
 
213
233
 
@@ -247,8 +267,13 @@ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: C
247
267
  // http bearer authentication required
248
268
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
249
269
 
250
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
251
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
270
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
271
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
272
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
273
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
274
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
275
+ if (authorizationValue || authorizationKeepEmpty) {
276
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
252
277
  }
253
278
 
254
279
 
@@ -288,8 +313,13 @@ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: C
288
313
  // http bearer authentication required
289
314
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
290
315
 
291
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
292
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
316
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
317
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
318
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
319
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
320
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
321
+ if (authorizationValue || authorizationKeepEmpty) {
322
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
293
323
  }
294
324
 
295
325
 
@@ -332,8 +362,13 @@ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: C
332
362
  // http bearer authentication required
333
363
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
334
364
 
335
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
336
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
365
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
366
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
367
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
368
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
369
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
370
+ if (authorizationValue || authorizationKeepEmpty) {
371
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
337
372
  }
338
373
 
339
374
 
@@ -380,8 +415,13 @@ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: C
380
415
  // http bearer authentication required
381
416
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
382
417
 
383
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
384
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
418
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
419
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
420
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
421
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
422
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
423
+ if (authorizationValue || authorizationKeepEmpty) {
424
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
385
425
  }
386
426
 
387
427
 
@@ -757,7 +797,7 @@ export class AccountingConfigsApi extends BaseAPI {
757
797
  * @memberof AccountingConfigsApi
758
798
  */
759
799
  public createAndEnableSubledger(requestParameters: AccountingConfigsApiCreateAndEnableSubledgerRequest, options?: AxiosRequestConfig) {
760
- return AccountingConfigsApiFp(this.configuration).createAndEnableSubledger(requestParameters.createAndEnableSubledgerRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
800
+ return AccountingConfigsApiFp(this.configuration).createAndEnableSubledger(requestParameters.createAndEnableSubledgerRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
761
801
  }
762
802
 
763
803
  /**
@@ -769,7 +809,7 @@ export class AccountingConfigsApi extends BaseAPI {
769
809
  * @memberof AccountingConfigsApi
770
810
  */
771
811
  public createAndEnableSubledgerFromFile(requestParameters: AccountingConfigsApiCreateAndEnableSubledgerFromFileRequest, options?: AxiosRequestConfig) {
772
- return AccountingConfigsApiFp(this.configuration).createAndEnableSubledgerFromFile(requestParameters.file, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
812
+ return AccountingConfigsApiFp(this.configuration).createAndEnableSubledgerFromFile(requestParameters.file, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
773
813
  }
774
814
 
775
815
  /**
@@ -781,7 +821,7 @@ export class AccountingConfigsApi extends BaseAPI {
781
821
  * @memberof AccountingConfigsApi
782
822
  */
783
823
  public exportAccountingConfig(requestParameters: AccountingConfigsApiExportAccountingConfigRequest = {}, options?: AxiosRequestConfig) {
784
- return AccountingConfigsApiFp(this.configuration).exportAccountingConfig(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
824
+ return AccountingConfigsApiFp(this.configuration).exportAccountingConfig(requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
785
825
  }
786
826
 
787
827
  /**
@@ -793,7 +833,7 @@ export class AccountingConfigsApi extends BaseAPI {
793
833
  * @memberof AccountingConfigsApi
794
834
  */
795
835
  public getAccountingCategories(requestParameters: AccountingConfigsApiGetAccountingCategoriesRequest = {}, options?: AxiosRequestConfig) {
796
- return AccountingConfigsApiFp(this.configuration).getAccountingCategories(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
836
+ return AccountingConfigsApiFp(this.configuration).getAccountingCategories(requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
797
837
  }
798
838
 
799
839
  /**
@@ -805,7 +845,7 @@ export class AccountingConfigsApi extends BaseAPI {
805
845
  * @memberof AccountingConfigsApi
806
846
  */
807
847
  public getActivationSnapshot(requestParameters: AccountingConfigsApiGetActivationSnapshotRequest = {}, options?: AxiosRequestConfig) {
808
- return AccountingConfigsApiFp(this.configuration).getActivationSnapshot(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
848
+ return AccountingConfigsApiFp(this.configuration).getActivationSnapshot(requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
809
849
  }
810
850
 
811
851
  /**
@@ -817,7 +857,7 @@ export class AccountingConfigsApi extends BaseAPI {
817
857
  * @memberof AccountingConfigsApi
818
858
  */
819
859
  public resetSubledger(requestParameters: AccountingConfigsApiResetSubledgerRequest = {}, options?: AxiosRequestConfig) {
820
- return AccountingConfigsApiFp(this.configuration).resetSubledger(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
860
+ return AccountingConfigsApiFp(this.configuration).resetSubledger(requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
821
861
  }
822
862
 
823
863
  /**
@@ -829,7 +869,7 @@ export class AccountingConfigsApi extends BaseAPI {
829
869
  * @memberof AccountingConfigsApi
830
870
  */
831
871
  public validateAccountingConfig(requestParameters: AccountingConfigsApiValidateAccountingConfigRequest, options?: AxiosRequestConfig) {
832
- return AccountingConfigsApiFp(this.configuration).validateAccountingConfig(requestParameters.validateAccountingConfigRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
872
+ return AccountingConfigsApiFp(this.configuration).validateAccountingConfig(requestParameters.validateAccountingConfigRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
833
873
  }
834
874
 
835
875
  /**
@@ -841,6 +881,6 @@ export class AccountingConfigsApi extends BaseAPI {
841
881
  * @memberof AccountingConfigsApi
842
882
  */
843
883
  public validateAccountingConfigFromFile(requestParameters: AccountingConfigsApiValidateAccountingConfigFromFileRequest, options?: AxiosRequestConfig) {
844
- return AccountingConfigsApiFp(this.configuration).validateAccountingConfigFromFile(requestParameters.file, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
884
+ return AccountingConfigsApiFp(this.configuration).validateAccountingConfigFromFile(requestParameters.file, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
845
885
  }
846
886
  }
@@ -0,0 +1,346 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AccountingService
5
+ * The EMIL AccountingService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { GetBankTransactionAccountLinkOptionsResponseClass } from '../models';
25
+ // @ts-ignore
26
+ import { ListBankTransactionAccountLinkCarriersResponseClass } from '../models';
27
+ /**
28
+ * BankTransactionAccountLinksApi - axios parameter creator
29
+ * @export
30
+ */
31
+ export const BankTransactionAccountLinksApiAxiosParamCreator = function (configuration?: Configuration) {
32
+ return {
33
+ /**
34
+ * Lists the rows a bank transaction can be linked to: one per active account of each whitelisted category, default account first, plus the carrier row for an MGA tenant. Which tax rows appear follows the tenant\'s tax handling. **Required Permissions** \"payment-management.bank-accounts.create\"
35
+ * @summary Retrieve the bank transaction account link options
36
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ */
40
+ getBankTransactionAccountLinkOptions: async (authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
41
+ const localVarPath = `/accountingservice/v1/bank-transaction-account-links/accounts`;
42
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
43
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
44
+ let baseOptions;
45
+ let baseAccessToken;
46
+ if (configuration) {
47
+ baseOptions = configuration.baseOptions;
48
+ baseAccessToken = configuration.accessToken;
49
+ }
50
+
51
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
52
+ const localVarHeaderParameter = {} as any;
53
+ const localVarQueryParameter = {} as any;
54
+
55
+ // authentication bearer required
56
+ // http bearer authentication required
57
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
58
+
59
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
60
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
61
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
62
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
63
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
64
+ if (authorizationValue || authorizationKeepEmpty) {
65
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
66
+ }
67
+
68
+
69
+
70
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
71
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
72
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
73
+
74
+ return {
75
+ url: toPathString(localVarUrlObj),
76
+ options: localVarRequestOptions,
77
+ };
78
+ },
79
+ /**
80
+ * Lists the risk carriers a bank transaction can be linked to: partners with the risk carrier role in partnerservice and partners that already hold a carrier personal account, one row per partner, ordered by partner number then code. Returns codes and numbers only; read the names from partnerservice. Search matches carrier names, partner numbers or personal account numbers before pagination. For an exact chip lookup, filters supports partnerCode=(code|code), at most 50 codes. Other filters and custom ordering are not supported. **Required Permissions** \"payment-management.bank-accounts.view\"
81
+ * @summary List bank transaction account link carriers
82
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
83
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
84
+ * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
85
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
86
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
87
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
88
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
89
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
90
+ * @param {*} [options] Override http request option.
91
+ * @throws {RequiredError}
92
+ */
93
+ listBankTransactionAccountLinkCarriers: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
94
+ const localVarPath = `/accountingservice/v1/bank-transaction-account-links/carriers`;
95
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
96
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
97
+ let baseOptions;
98
+ let baseAccessToken;
99
+ if (configuration) {
100
+ baseOptions = configuration.baseOptions;
101
+ baseAccessToken = configuration.accessToken;
102
+ }
103
+
104
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
105
+ const localVarHeaderParameter = {} as any;
106
+ const localVarQueryParameter = {} as any;
107
+
108
+ // authentication bearer required
109
+ // http bearer authentication required
110
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
111
+
112
+ if (pageSize !== undefined) {
113
+ localVarQueryParameter['pageSize'] = pageSize;
114
+ }
115
+
116
+ if (pageToken !== undefined) {
117
+ localVarQueryParameter['pageToken'] = pageToken;
118
+ }
119
+
120
+ if (filter !== undefined) {
121
+ localVarQueryParameter['filter'] = filter;
122
+ }
123
+
124
+ if (search !== undefined) {
125
+ localVarQueryParameter['search'] = search;
126
+ }
127
+
128
+ if (order !== undefined) {
129
+ localVarQueryParameter['order'] = order;
130
+ }
131
+
132
+ if (expand !== undefined) {
133
+ localVarQueryParameter['expand'] = expand;
134
+ }
135
+
136
+ if (filters !== undefined) {
137
+ localVarQueryParameter['filters'] = filters;
138
+ }
139
+
140
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
141
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
142
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
143
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
144
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
145
+ if (authorizationValue || authorizationKeepEmpty) {
146
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
147
+ }
148
+
149
+
150
+
151
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
152
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
153
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
154
+
155
+ return {
156
+ url: toPathString(localVarUrlObj),
157
+ options: localVarRequestOptions,
158
+ };
159
+ },
160
+ }
161
+ };
162
+
163
+ /**
164
+ * BankTransactionAccountLinksApi - functional programming interface
165
+ * @export
166
+ */
167
+ export const BankTransactionAccountLinksApiFp = function(configuration?: Configuration) {
168
+ const localVarAxiosParamCreator = BankTransactionAccountLinksApiAxiosParamCreator(configuration)
169
+ return {
170
+ /**
171
+ * Lists the rows a bank transaction can be linked to: one per active account of each whitelisted category, default account first, plus the carrier row for an MGA tenant. Which tax rows appear follows the tenant\'s tax handling. **Required Permissions** \"payment-management.bank-accounts.create\"
172
+ * @summary Retrieve the bank transaction account link options
173
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
174
+ * @param {*} [options] Override http request option.
175
+ * @throws {RequiredError}
176
+ */
177
+ async getBankTransactionAccountLinkOptions(authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBankTransactionAccountLinkOptionsResponseClass>> {
178
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getBankTransactionAccountLinkOptions(authorization, options);
179
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
180
+ },
181
+ /**
182
+ * Lists the risk carriers a bank transaction can be linked to: partners with the risk carrier role in partnerservice and partners that already hold a carrier personal account, one row per partner, ordered by partner number then code. Returns codes and numbers only; read the names from partnerservice. Search matches carrier names, partner numbers or personal account numbers before pagination. For an exact chip lookup, filters supports partnerCode=(code|code), at most 50 codes. Other filters and custom ordering are not supported. **Required Permissions** \"payment-management.bank-accounts.view\"
183
+ * @summary List bank transaction account link carriers
184
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
185
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
186
+ * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
187
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
188
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
189
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
190
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
191
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
192
+ * @param {*} [options] Override http request option.
193
+ * @throws {RequiredError}
194
+ */
195
+ async listBankTransactionAccountLinkCarriers(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBankTransactionAccountLinkCarriersResponseClass>> {
196
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listBankTransactionAccountLinkCarriers(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
197
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
198
+ },
199
+ }
200
+ };
201
+
202
+ /**
203
+ * BankTransactionAccountLinksApi - factory interface
204
+ * @export
205
+ */
206
+ export const BankTransactionAccountLinksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
207
+ const localVarFp = BankTransactionAccountLinksApiFp(configuration)
208
+ return {
209
+ /**
210
+ * Lists the rows a bank transaction can be linked to: one per active account of each whitelisted category, default account first, plus the carrier row for an MGA tenant. Which tax rows appear follows the tenant\'s tax handling. **Required Permissions** \"payment-management.bank-accounts.create\"
211
+ * @summary Retrieve the bank transaction account link options
212
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
213
+ * @param {*} [options] Override http request option.
214
+ * @throws {RequiredError}
215
+ */
216
+ getBankTransactionAccountLinkOptions(authorization?: string, options?: any): AxiosPromise<GetBankTransactionAccountLinkOptionsResponseClass> {
217
+ return localVarFp.getBankTransactionAccountLinkOptions(authorization, options).then((request) => request(axios, basePath));
218
+ },
219
+ /**
220
+ * Lists the risk carriers a bank transaction can be linked to: partners with the risk carrier role in partnerservice and partners that already hold a carrier personal account, one row per partner, ordered by partner number then code. Returns codes and numbers only; read the names from partnerservice. Search matches carrier names, partner numbers or personal account numbers before pagination. For an exact chip lookup, filters supports partnerCode=(code|code), at most 50 codes. Other filters and custom ordering are not supported. **Required Permissions** \"payment-management.bank-accounts.view\"
221
+ * @summary List bank transaction account link carriers
222
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
223
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
224
+ * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
225
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
226
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
227
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
228
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
229
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
230
+ * @param {*} [options] Override http request option.
231
+ * @throws {RequiredError}
232
+ */
233
+ listBankTransactionAccountLinkCarriers(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListBankTransactionAccountLinkCarriersResponseClass> {
234
+ return localVarFp.listBankTransactionAccountLinkCarriers(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
235
+ },
236
+ };
237
+ };
238
+
239
+ /**
240
+ * Request parameters for getBankTransactionAccountLinkOptions operation in BankTransactionAccountLinksApi.
241
+ * @export
242
+ * @interface BankTransactionAccountLinksApiGetBankTransactionAccountLinkOptionsRequest
243
+ */
244
+ export interface BankTransactionAccountLinksApiGetBankTransactionAccountLinkOptionsRequest {
245
+ /**
246
+ * Bearer Token: provided by the login endpoint under the name accessToken.
247
+ * @type {string}
248
+ * @memberof BankTransactionAccountLinksApiGetBankTransactionAccountLinkOptions
249
+ */
250
+ readonly authorization?: string
251
+ }
252
+
253
+ /**
254
+ * Request parameters for listBankTransactionAccountLinkCarriers operation in BankTransactionAccountLinksApi.
255
+ * @export
256
+ * @interface BankTransactionAccountLinksApiListBankTransactionAccountLinkCarriersRequest
257
+ */
258
+ export interface BankTransactionAccountLinksApiListBankTransactionAccountLinkCarriersRequest {
259
+ /**
260
+ * Bearer Token: provided by the login endpoint under the name accessToken.
261
+ * @type {string}
262
+ * @memberof BankTransactionAccountLinksApiListBankTransactionAccountLinkCarriers
263
+ */
264
+ readonly authorization?: string
265
+
266
+ /**
267
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
268
+ * @type {number}
269
+ * @memberof BankTransactionAccountLinksApiListBankTransactionAccountLinkCarriers
270
+ */
271
+ readonly pageSize?: number
272
+
273
+ /**
274
+ * 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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
275
+ * @type {string}
276
+ * @memberof BankTransactionAccountLinksApiListBankTransactionAccountLinkCarriers
277
+ */
278
+ readonly pageToken?: string
279
+
280
+ /**
281
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
282
+ * @type {string}
283
+ * @memberof BankTransactionAccountLinksApiListBankTransactionAccountLinkCarriers
284
+ */
285
+ readonly filter?: string
286
+
287
+ /**
288
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
289
+ * @type {string}
290
+ * @memberof BankTransactionAccountLinksApiListBankTransactionAccountLinkCarriers
291
+ */
292
+ readonly search?: string
293
+
294
+ /**
295
+ * The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
296
+ * @type {string}
297
+ * @memberof BankTransactionAccountLinksApiListBankTransactionAccountLinkCarriers
298
+ */
299
+ readonly order?: string
300
+
301
+ /**
302
+ * Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
303
+ * @type {string}
304
+ * @memberof BankTransactionAccountLinksApiListBankTransactionAccountLinkCarriers
305
+ */
306
+ readonly expand?: string
307
+
308
+ /**
309
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
310
+ * @type {string}
311
+ * @memberof BankTransactionAccountLinksApiListBankTransactionAccountLinkCarriers
312
+ */
313
+ readonly filters?: string
314
+ }
315
+
316
+ /**
317
+ * BankTransactionAccountLinksApi - object-oriented interface
318
+ * @export
319
+ * @class BankTransactionAccountLinksApi
320
+ * @extends {BaseAPI}
321
+ */
322
+ export class BankTransactionAccountLinksApi extends BaseAPI {
323
+ /**
324
+ * Lists the rows a bank transaction can be linked to: one per active account of each whitelisted category, default account first, plus the carrier row for an MGA tenant. Which tax rows appear follows the tenant\'s tax handling. **Required Permissions** \"payment-management.bank-accounts.create\"
325
+ * @summary Retrieve the bank transaction account link options
326
+ * @param {BankTransactionAccountLinksApiGetBankTransactionAccountLinkOptionsRequest} requestParameters Request parameters.
327
+ * @param {*} [options] Override http request option.
328
+ * @throws {RequiredError}
329
+ * @memberof BankTransactionAccountLinksApi
330
+ */
331
+ public getBankTransactionAccountLinkOptions(requestParameters: BankTransactionAccountLinksApiGetBankTransactionAccountLinkOptionsRequest = {}, options?: AxiosRequestConfig) {
332
+ return BankTransactionAccountLinksApiFp(this.configuration).getBankTransactionAccountLinkOptions(requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
333
+ }
334
+
335
+ /**
336
+ * Lists the risk carriers a bank transaction can be linked to: partners with the risk carrier role in partnerservice and partners that already hold a carrier personal account, one row per partner, ordered by partner number then code. Returns codes and numbers only; read the names from partnerservice. Search matches carrier names, partner numbers or personal account numbers before pagination. For an exact chip lookup, filters supports partnerCode=(code|code), at most 50 codes. Other filters and custom ordering are not supported. **Required Permissions** \"payment-management.bank-accounts.view\"
337
+ * @summary List bank transaction account link carriers
338
+ * @param {BankTransactionAccountLinksApiListBankTransactionAccountLinkCarriersRequest} requestParameters Request parameters.
339
+ * @param {*} [options] Override http request option.
340
+ * @throws {RequiredError}
341
+ * @memberof BankTransactionAccountLinksApi
342
+ */
343
+ public listBankTransactionAccountLinkCarriers(requestParameters: BankTransactionAccountLinksApiListBankTransactionAccountLinkCarriersRequest = {}, options?: AxiosRequestConfig) {
344
+ return BankTransactionAccountLinksApiFp(this.configuration).listBankTransactionAccountLinkCarriers(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));
345
+ }
346
+ }