@emilgroup/accounting-sdk 1.34.1-beta.78 → 1.34.1-beta.79

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 (210) hide show
  1. package/.openapi-generator/FILES +50 -0
  2. package/README.md +2 -2
  3. package/api/accounting-configs-api.ts +862 -0
  4. package/api/booking-entries-api.ts +234 -10
  5. package/api/commission-account-mappings-api.ts +1207 -0
  6. package/api/financial-accounts-api.ts +154 -24
  7. package/api/financial-transactions-api.ts +8 -4
  8. package/api/number-ranges-api.ts +16 -8
  9. package/api/personal-accounts-api.ts +16 -8
  10. package/api/product-account-mappings-api.ts +1715 -0
  11. package/api.ts +6 -0
  12. package/base.ts +174 -41
  13. package/common.ts +3 -2
  14. package/configuration.ts +20 -0
  15. package/dist/api/accounting-configs-api.d.ts +451 -0
  16. package/dist/api/accounting-configs-api.js +881 -0
  17. package/dist/api/booking-entries-api.d.ts +121 -7
  18. package/dist/api/booking-entries-api.js +211 -14
  19. package/dist/api/commission-account-mappings-api.d.ts +685 -0
  20. package/dist/api/commission-account-mappings-api.js +1022 -0
  21. package/dist/api/financial-accounts-api.d.ts +86 -20
  22. package/dist/api/financial-accounts-api.js +137 -27
  23. package/dist/api/financial-transactions-api.d.ts +2 -2
  24. package/dist/api/financial-transactions-api.js +8 -6
  25. package/dist/api/health-api.d.ts +1 -1
  26. package/dist/api/number-ranges-api.d.ts +4 -4
  27. package/dist/api/number-ranges-api.js +22 -14
  28. package/dist/api/personal-accounts-api.d.ts +4 -4
  29. package/dist/api/personal-accounts-api.js +22 -14
  30. package/dist/api/product-account-mappings-api.d.ts +972 -0
  31. package/dist/api/product-account-mappings-api.js +1447 -0
  32. package/dist/api.d.ts +3 -0
  33. package/dist/api.js +3 -0
  34. package/dist/base.d.ts +24 -0
  35. package/dist/base.js +178 -59
  36. package/dist/common.d.ts +1 -1
  37. package/dist/common.js +1 -0
  38. package/dist/configuration.d.ts +17 -0
  39. package/dist/configuration.js +2 -0
  40. package/dist/models/account-mapping-class.d.ts +73 -0
  41. package/dist/models/account-mapping-class.js +40 -0
  42. package/dist/models/accounting-category-class.d.ts +45 -0
  43. package/dist/models/accounting-category-class.js +24 -0
  44. package/dist/models/accounting-config-class.d.ts +78 -0
  45. package/dist/models/accounting-config-class.js +20 -0
  46. package/dist/models/accounting-config-data-class.d.ts +38 -0
  47. package/dist/models/accounting-config-data-class.js +15 -0
  48. package/dist/models/accounting-config-data-dto-accounting-configuration.d.ts +46 -0
  49. package/dist/models/accounting-config-data-dto-accounting-configuration.js +24 -0
  50. package/dist/models/accounting-config-data-dto-default-account-mappings.d.ts +79 -0
  51. package/dist/models/accounting-config-data-dto-default-account-mappings.js +40 -0
  52. package/dist/models/accounting-config-data-dto.d.ts +38 -0
  53. package/dist/models/accounting-config-data-dto.js +15 -0
  54. package/dist/models/accounting-configuration-class.d.ts +36 -0
  55. package/dist/models/accounting-configuration-class.js +15 -0
  56. package/dist/models/booking-entry-class.d.ts +34 -0
  57. package/dist/models/booking-entry-class.js +10 -1
  58. package/dist/models/commission-account-mapping-class.d.ts +49 -0
  59. package/dist/models/commission-account-mapping-class.js +15 -0
  60. package/dist/models/commission-agreement-account-mapping-detail-class.d.ts +44 -0
  61. package/dist/models/commission-agreement-account-mapping-detail-class.js +15 -0
  62. package/dist/models/commission-agreement-partner-class.d.ts +30 -0
  63. package/dist/models/commission-agreement-partner-class.js +15 -0
  64. package/dist/models/commission-agreement-with-account-mapping-class.d.ts +43 -0
  65. package/dist/models/commission-agreement-with-account-mapping-class.js +15 -0
  66. package/dist/models/commission-type-account-mapping-class.d.ts +31 -0
  67. package/dist/models/commission-type-account-mapping-class.js +15 -0
  68. package/dist/models/create-and-enable-subledger-request-dto.d.ts +25 -0
  69. package/dist/models/create-and-enable-subledger-request-dto.js +15 -0
  70. package/dist/models/create-and-enable-subledger-response-class.d.ts +25 -0
  71. package/dist/models/create-and-enable-subledger-response-class.js +15 -0
  72. package/dist/models/create-booking-entry-request-dto.d.ts +25 -2
  73. package/dist/models/create-booking-entry-request-dto.js +9 -0
  74. package/dist/models/create-financial-account-request-dto.d.ts +50 -5
  75. package/dist/models/create-financial-account-request-dto.js +26 -2
  76. package/dist/models/create-number-range-request-dto.d.ts +4 -4
  77. package/dist/models/create-number-range-request-dto.js +4 -4
  78. package/dist/models/create-or-correct-opening-balance-dto.d.ts +25 -0
  79. package/dist/models/create-or-correct-opening-balance-dto.js +15 -0
  80. package/dist/models/create-or-correct-opening-balance-response-class.d.ts +25 -0
  81. package/dist/models/create-or-correct-opening-balance-response-class.js +15 -0
  82. package/dist/models/create-personal-account-request-dto.d.ts +14 -6
  83. package/dist/models/create-personal-account-request-dto.js +3 -3
  84. package/dist/models/export-accounting-config-response-class.d.ts +25 -0
  85. package/dist/models/export-accounting-config-response-class.js +15 -0
  86. package/dist/models/financial-account-class.d.ts +49 -2
  87. package/dist/models/financial-account-class.js +6 -2
  88. package/dist/models/financial-transaction-class.d.ts +6 -0
  89. package/dist/models/financial-transaction-data-dto.d.ts +11 -2
  90. package/dist/models/financial-transaction-data-dto.js +1 -0
  91. package/dist/models/get-accounting-categories-response-class.d.ts +25 -0
  92. package/dist/models/get-accounting-categories-response-class.js +15 -0
  93. package/dist/models/get-activation-snapshot-response-class.d.ts +25 -0
  94. package/dist/models/get-activation-snapshot-response-class.js +15 -0
  95. package/dist/models/index.d.ts +47 -0
  96. package/dist/models/index.js +47 -0
  97. package/dist/models/list-commission-account-mappings-response-class.d.ts +43 -0
  98. package/dist/models/list-commission-account-mappings-response-class.js +15 -0
  99. package/dist/models/list-commission-agreements-with-account-mappings-response-class.d.ts +43 -0
  100. package/dist/models/list-commission-agreements-with-account-mappings-response-class.js +15 -0
  101. package/dist/models/list-commission-type-account-mappings-response-class.d.ts +43 -0
  102. package/dist/models/list-commission-type-account-mappings-response-class.js +15 -0
  103. package/dist/models/list-product-account-mappings-response-class.d.ts +43 -0
  104. package/dist/models/list-product-account-mappings-response-class.js +15 -0
  105. package/dist/models/list-products-with-account-mappings-response-class.d.ts +43 -0
  106. package/dist/models/list-products-with-account-mappings-response-class.js +15 -0
  107. package/dist/models/opening-balance-item-dto.d.ts +41 -0
  108. package/dist/models/opening-balance-item-dto.js +20 -0
  109. package/dist/models/personal-account-class.d.ts +8 -2
  110. package/dist/models/personal-account-class.js +1 -1
  111. package/dist/models/post-financial-event-request-dto.d.ts +45 -0
  112. package/dist/models/post-financial-event-request-dto.js +24 -0
  113. package/dist/models/post-financial-event-response-class.d.ts +25 -0
  114. package/dist/models/post-financial-event-response-class.js +15 -0
  115. package/dist/models/premium-item-account-mapping-class.d.ts +37 -0
  116. package/dist/models/premium-item-account-mapping-class.js +15 -0
  117. package/dist/models/product-account-mapping-class.d.ts +61 -0
  118. package/dist/models/product-account-mapping-class.js +15 -0
  119. package/dist/models/product-account-mapping-detail-class.d.ts +56 -0
  120. package/dist/models/product-account-mapping-detail-class.js +15 -0
  121. package/dist/models/product-risk-carrier-class.d.ts +42 -0
  122. package/dist/models/product-risk-carrier-class.js +15 -0
  123. package/dist/models/product-version-account-mapping-detail-class.d.ts +50 -0
  124. package/dist/models/product-version-account-mapping-detail-class.js +15 -0
  125. package/dist/models/product-version-with-account-mappings-class.d.ts +42 -0
  126. package/dist/models/product-version-with-account-mappings-class.js +15 -0
  127. package/dist/models/product-with-account-mappings-class.d.ts +49 -0
  128. package/dist/models/product-with-account-mappings-class.js +15 -0
  129. package/dist/models/put-premium-item-account-body-dto.d.ts +24 -0
  130. package/dist/models/put-premium-item-account-body-dto.js +15 -0
  131. package/dist/models/put-product-category-account-body-dto.d.ts +24 -0
  132. package/dist/models/put-product-category-account-body-dto.js +15 -0
  133. package/dist/models/put-product-risk-carrier-body-dto.d.ts +24 -0
  134. package/dist/models/put-product-risk-carrier-body-dto.js +15 -0
  135. package/dist/models/put-product-version-category-account-body-dto.d.ts +24 -0
  136. package/dist/models/put-product-version-category-account-body-dto.js +15 -0
  137. package/dist/models/resolved-account-mapping-class.d.ts +31 -0
  138. package/dist/models/resolved-account-mapping-class.js +15 -0
  139. package/dist/models/resolved-commission-account-mapping-class.d.ts +37 -0
  140. package/dist/models/resolved-commission-account-mapping-class.js +21 -0
  141. package/dist/models/update-commission-agreement-account-body-dto.d.ts +24 -0
  142. package/dist/models/update-commission-agreement-account-body-dto.js +15 -0
  143. package/dist/models/update-commission-type-account-body-dto.d.ts +24 -0
  144. package/dist/models/update-commission-type-account-body-dto.js +15 -0
  145. package/dist/models/update-financial-account-body-dto.d.ts +48 -0
  146. package/dist/models/update-financial-account-body-dto.js +15 -0
  147. package/dist/models/update-financial-account-response-class.d.ts +25 -0
  148. package/dist/models/update-financial-account-response-class.js +15 -0
  149. package/dist/models/validate-accounting-config-request-dto.d.ts +25 -0
  150. package/dist/models/validate-accounting-config-request-dto.js +15 -0
  151. package/dist/models/validate-accounting-config-response-class.d.ts +30 -0
  152. package/dist/models/validate-accounting-config-response-class.js +15 -0
  153. package/models/account-mapping-class.ts +82 -0
  154. package/models/accounting-category-class.ts +54 -0
  155. package/models/accounting-config-class.ts +87 -0
  156. package/models/accounting-config-data-class.ts +44 -0
  157. package/models/accounting-config-data-dto-accounting-configuration.ts +56 -0
  158. package/models/accounting-config-data-dto-default-account-mappings.ts +88 -0
  159. package/models/accounting-config-data-dto.ts +44 -0
  160. package/models/accounting-configuration-class.ts +42 -0
  161. package/models/booking-entry-class.ts +35 -0
  162. package/models/commission-account-mapping-class.ts +55 -0
  163. package/models/commission-agreement-account-mapping-detail-class.ts +50 -0
  164. package/models/commission-agreement-partner-class.ts +36 -0
  165. package/models/commission-agreement-with-account-mapping-class.ts +49 -0
  166. package/models/commission-type-account-mapping-class.ts +37 -0
  167. package/models/create-and-enable-subledger-request-dto.ts +31 -0
  168. package/models/create-and-enable-subledger-response-class.ts +31 -0
  169. package/models/create-booking-entry-request-dto.ts +26 -2
  170. package/models/create-financial-account-request-dto.ts +49 -5
  171. package/models/create-number-range-request-dto.ts +4 -4
  172. package/models/create-or-correct-opening-balance-dto.ts +31 -0
  173. package/models/create-or-correct-opening-balance-response-class.ts +31 -0
  174. package/models/create-personal-account-request-dto.ts +12 -6
  175. package/models/export-accounting-config-response-class.ts +31 -0
  176. package/models/financial-account-class.ts +50 -2
  177. package/models/financial-transaction-class.ts +6 -0
  178. package/models/financial-transaction-data-dto.ts +9 -2
  179. package/models/get-accounting-categories-response-class.ts +31 -0
  180. package/models/get-activation-snapshot-response-class.ts +31 -0
  181. package/models/index.ts +47 -0
  182. package/models/list-commission-account-mappings-response-class.ts +49 -0
  183. package/models/list-commission-agreements-with-account-mappings-response-class.ts +49 -0
  184. package/models/list-commission-type-account-mappings-response-class.ts +49 -0
  185. package/models/list-product-account-mappings-response-class.ts +49 -0
  186. package/models/list-products-with-account-mappings-response-class.ts +49 -0
  187. package/models/opening-balance-item-dto.ts +50 -0
  188. package/models/personal-account-class.ts +8 -2
  189. package/models/post-financial-event-request-dto.ts +54 -0
  190. package/models/post-financial-event-response-class.ts +31 -0
  191. package/models/premium-item-account-mapping-class.ts +43 -0
  192. package/models/product-account-mapping-class.ts +67 -0
  193. package/models/product-account-mapping-detail-class.ts +62 -0
  194. package/models/product-risk-carrier-class.ts +48 -0
  195. package/models/product-version-account-mapping-detail-class.ts +56 -0
  196. package/models/product-version-with-account-mappings-class.ts +48 -0
  197. package/models/product-with-account-mappings-class.ts +55 -0
  198. package/models/put-premium-item-account-body-dto.ts +30 -0
  199. package/models/put-product-category-account-body-dto.ts +30 -0
  200. package/models/put-product-risk-carrier-body-dto.ts +30 -0
  201. package/models/put-product-version-category-account-body-dto.ts +30 -0
  202. package/models/resolved-account-mapping-class.ts +37 -0
  203. package/models/resolved-commission-account-mapping-class.ts +46 -0
  204. package/models/update-commission-agreement-account-body-dto.ts +30 -0
  205. package/models/update-commission-type-account-body-dto.ts +30 -0
  206. package/models/update-financial-account-body-dto.ts +54 -0
  207. package/models/update-financial-account-response-class.ts +31 -0
  208. package/models/validate-accounting-config-request-dto.ts +31 -0
  209. package/models/validate-accounting-config-response-class.ts +36 -0
  210. package/package.json +2 -2
@@ -0,0 +1,862 @@
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 { CreateAndEnableSubledgerRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateAndEnableSubledgerResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { ExportAccountingConfigResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { GetAccountingCategoriesResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { GetActivationSnapshotResponseClass } from '../models';
33
+ // @ts-ignore
34
+ import { ValidateAccountingConfigRequestDto } from '../models';
35
+ // @ts-ignore
36
+ import { ValidateAccountingConfigResponseClass } from '../models';
37
+ /**
38
+ * AccountingConfigsApi - axios parameter creator
39
+ * @export
40
+ */
41
+ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: Configuration) {
42
+ return {
43
+ /**
44
+ * This will create and enable the subledger, using an accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
45
+ * @summary Create the create and enable subledger
46
+ * @param {CreateAndEnableSubledgerRequestDto} createAndEnableSubledgerRequestDto
47
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
48
+ * @param {*} [options] Override http request option.
49
+ * @throws {RequiredError}
50
+ */
51
+ createAndEnableSubledger: async (createAndEnableSubledgerRequestDto: CreateAndEnableSubledgerRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
52
+ // verify required parameter 'createAndEnableSubledgerRequestDto' is not null or undefined
53
+ assertParamExists('createAndEnableSubledger', 'createAndEnableSubledgerRequestDto', createAndEnableSubledgerRequestDto)
54
+ const localVarPath = `/accountingservice/v1/subledger`;
55
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
56
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
57
+ let baseOptions;
58
+ let baseAccessToken;
59
+ if (configuration) {
60
+ baseOptions = configuration.baseOptions;
61
+ baseAccessToken = configuration.accessToken;
62
+ }
63
+
64
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
65
+ const localVarHeaderParameter = {} as any;
66
+ const localVarQueryParameter = {} as any;
67
+
68
+ // authentication bearer required
69
+ // http bearer authentication required
70
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
71
+
72
+ // Only Authorization falls back to the configured token; an empty value is never sent.
73
+ const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
74
+ if (authorizationValue) {
75
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
76
+ }
77
+
78
+
79
+
80
+ localVarHeaderParameter['Content-Type'] = 'application/json';
81
+
82
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
83
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
84
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
85
+ localVarRequestOptions.data = serializeDataIfNeeded(createAndEnableSubledgerRequestDto, localVarRequestOptions, configuration)
86
+
87
+ return {
88
+ url: toPathString(localVarUrlObj),
89
+ options: localVarRequestOptions,
90
+ };
91
+ },
92
+ /**
93
+ * This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
94
+ * @summary Create the create and enable subledger from file
95
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
96
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ createAndEnableSubledgerFromFile: async (file: any, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
101
+ // verify required parameter 'file' is not null or undefined
102
+ assertParamExists('createAndEnableSubledgerFromFile', 'file', file)
103
+ const localVarPath = `/accountingservice/v1/subledger/upload`;
104
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
105
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
106
+ let baseOptions;
107
+ let baseAccessToken;
108
+ if (configuration) {
109
+ baseOptions = configuration.baseOptions;
110
+ baseAccessToken = configuration.accessToken;
111
+ }
112
+
113
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
114
+ const localVarHeaderParameter = {} as any;
115
+ const localVarQueryParameter = {} as any;
116
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
117
+
118
+ // authentication bearer required
119
+ // http bearer authentication required
120
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
121
+
122
+ // Only Authorization falls back to the configured token; an empty value is never sent.
123
+ const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
124
+ if (authorizationValue) {
125
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
126
+ }
127
+
128
+
129
+ if (file !== undefined) {
130
+ localVarFormParams.append('file', file as any);
131
+ }
132
+
133
+
134
+
135
+
136
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
137
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
139
+ localVarRequestOptions.data = localVarFormParams;
140
+
141
+ return {
142
+ url: toPathString(localVarUrlObj),
143
+ options: localVarRequestOptions,
144
+ };
145
+ },
146
+ /**
147
+ * This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
148
+ * @summary Retrieve the export accounting config
149
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
150
+ * @param {*} [options] Override http request option.
151
+ * @throws {RequiredError}
152
+ */
153
+ exportAccountingConfig: async (authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
154
+ const localVarPath = `/accountingservice/v1/subledger/config/export`;
155
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
156
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
157
+ let baseOptions;
158
+ let baseAccessToken;
159
+ if (configuration) {
160
+ baseOptions = configuration.baseOptions;
161
+ baseAccessToken = configuration.accessToken;
162
+ }
163
+
164
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
165
+ const localVarHeaderParameter = {} as any;
166
+ const localVarQueryParameter = {} as any;
167
+
168
+ // authentication bearer required
169
+ // http bearer authentication required
170
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
171
+
172
+ // Only Authorization falls back to the configured token; an empty value is never sent.
173
+ const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
174
+ if (authorizationValue) {
175
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
176
+ }
177
+
178
+
179
+
180
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
181
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
182
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
183
+
184
+ return {
185
+ url: toPathString(localVarUrlObj),
186
+ options: localVarRequestOptions,
187
+ };
188
+ },
189
+ /**
190
+ * This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
191
+ * @summary Retrieve the accounting categories
192
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
193
+ * @param {*} [options] Override http request option.
194
+ * @throws {RequiredError}
195
+ */
196
+ getAccountingCategories: async (authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
197
+ const localVarPath = `/accountingservice/v1/subledger/categories`;
198
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
199
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
200
+ let baseOptions;
201
+ let baseAccessToken;
202
+ if (configuration) {
203
+ baseOptions = configuration.baseOptions;
204
+ baseAccessToken = configuration.accessToken;
205
+ }
206
+
207
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
208
+ const localVarHeaderParameter = {} as any;
209
+ const localVarQueryParameter = {} as any;
210
+
211
+ // authentication bearer required
212
+ // http bearer authentication required
213
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
214
+
215
+ // Only Authorization falls back to the configured token; an empty value is never sent.
216
+ const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
217
+ if (authorizationValue) {
218
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
219
+ }
220
+
221
+
222
+
223
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
224
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
225
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
226
+
227
+ return {
228
+ url: toPathString(localVarUrlObj),
229
+ options: localVarRequestOptions,
230
+ };
231
+ },
232
+ /**
233
+ * Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
234
+ * @summary Retrieve the get activation snapshot
235
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
236
+ * @param {*} [options] Override http request option.
237
+ * @throws {RequiredError}
238
+ */
239
+ getActivationSnapshot: async (authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
240
+ const localVarPath = `/accountingservice/v1/subledger/activation-snapshot`;
241
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
242
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
243
+ let baseOptions;
244
+ let baseAccessToken;
245
+ if (configuration) {
246
+ baseOptions = configuration.baseOptions;
247
+ baseAccessToken = configuration.accessToken;
248
+ }
249
+
250
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
251
+ const localVarHeaderParameter = {} as any;
252
+ const localVarQueryParameter = {} as any;
253
+
254
+ // authentication bearer required
255
+ // http bearer authentication required
256
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
257
+
258
+ // Only Authorization falls back to the configured token; an empty value is never sent.
259
+ const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
260
+ if (authorizationValue) {
261
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
262
+ }
263
+
264
+
265
+
266
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
267
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
268
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
269
+
270
+ return {
271
+ url: toPathString(localVarUrlObj),
272
+ options: localVarRequestOptions,
273
+ };
274
+ },
275
+ /**
276
+ * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
277
+ * @summary Delete the reset subledger
278
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
279
+ * @param {*} [options] Override http request option.
280
+ * @throws {RequiredError}
281
+ */
282
+ resetSubledger: async (authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
283
+ const localVarPath = `/accountingservice/v1/subledger/reset`;
284
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
285
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
286
+ let baseOptions;
287
+ let baseAccessToken;
288
+ if (configuration) {
289
+ baseOptions = configuration.baseOptions;
290
+ baseAccessToken = configuration.accessToken;
291
+ }
292
+
293
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
294
+ const localVarHeaderParameter = {} as any;
295
+ const localVarQueryParameter = {} as any;
296
+
297
+ // authentication bearer required
298
+ // http bearer authentication required
299
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
300
+
301
+ // Only Authorization falls back to the configured token; an empty value is never sent.
302
+ const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
303
+ if (authorizationValue) {
304
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
305
+ }
306
+
307
+
308
+
309
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
310
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
311
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
312
+
313
+ return {
314
+ url: toPathString(localVarUrlObj),
315
+ options: localVarRequestOptions,
316
+ };
317
+ },
318
+ /**
319
+ * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
320
+ * @summary Create the validate accounting config
321
+ * @param {ValidateAccountingConfigRequestDto} validateAccountingConfigRequestDto
322
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
323
+ * @param {*} [options] Override http request option.
324
+ * @throws {RequiredError}
325
+ */
326
+ validateAccountingConfig: async (validateAccountingConfigRequestDto: ValidateAccountingConfigRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
327
+ // verify required parameter 'validateAccountingConfigRequestDto' is not null or undefined
328
+ assertParamExists('validateAccountingConfig', 'validateAccountingConfigRequestDto', validateAccountingConfigRequestDto)
329
+ const localVarPath = `/accountingservice/v1/subledger/config/validate`;
330
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
331
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
332
+ let baseOptions;
333
+ let baseAccessToken;
334
+ if (configuration) {
335
+ baseOptions = configuration.baseOptions;
336
+ baseAccessToken = configuration.accessToken;
337
+ }
338
+
339
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
340
+ const localVarHeaderParameter = {} as any;
341
+ const localVarQueryParameter = {} as any;
342
+
343
+ // authentication bearer required
344
+ // http bearer authentication required
345
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
346
+
347
+ // Only Authorization falls back to the configured token; an empty value is never sent.
348
+ const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
349
+ if (authorizationValue) {
350
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
351
+ }
352
+
353
+
354
+
355
+ localVarHeaderParameter['Content-Type'] = 'application/json';
356
+
357
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
358
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
359
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
360
+ localVarRequestOptions.data = serializeDataIfNeeded(validateAccountingConfigRequestDto, localVarRequestOptions, configuration)
361
+
362
+ return {
363
+ url: toPathString(localVarUrlObj),
364
+ options: localVarRequestOptions,
365
+ };
366
+ },
367
+ /**
368
+ * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
369
+ * @summary Create the validate accounting config from file
370
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
371
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
372
+ * @param {*} [options] Override http request option.
373
+ * @throws {RequiredError}
374
+ */
375
+ validateAccountingConfigFromFile: async (file: any, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
376
+ // verify required parameter 'file' is not null or undefined
377
+ assertParamExists('validateAccountingConfigFromFile', 'file', file)
378
+ const localVarPath = `/accountingservice/v1/subledger/config/validate/upload`;
379
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
380
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
381
+ let baseOptions;
382
+ let baseAccessToken;
383
+ if (configuration) {
384
+ baseOptions = configuration.baseOptions;
385
+ baseAccessToken = configuration.accessToken;
386
+ }
387
+
388
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
389
+ const localVarHeaderParameter = {} as any;
390
+ const localVarQueryParameter = {} as any;
391
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
392
+
393
+ // authentication bearer required
394
+ // http bearer authentication required
395
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
396
+
397
+ // Only Authorization falls back to the configured token; an empty value is never sent.
398
+ const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
399
+ if (authorizationValue) {
400
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
401
+ }
402
+
403
+
404
+ if (file !== undefined) {
405
+ localVarFormParams.append('file', file as any);
406
+ }
407
+
408
+
409
+
410
+
411
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
412
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
413
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
414
+ localVarRequestOptions.data = localVarFormParams;
415
+
416
+ return {
417
+ url: toPathString(localVarUrlObj),
418
+ options: localVarRequestOptions,
419
+ };
420
+ },
421
+ }
422
+ };
423
+
424
+ /**
425
+ * AccountingConfigsApi - functional programming interface
426
+ * @export
427
+ */
428
+ export const AccountingConfigsApiFp = function(configuration?: Configuration) {
429
+ const localVarAxiosParamCreator = AccountingConfigsApiAxiosParamCreator(configuration)
430
+ return {
431
+ /**
432
+ * This will create and enable the subledger, using an accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
433
+ * @summary Create the create and enable subledger
434
+ * @param {CreateAndEnableSubledgerRequestDto} createAndEnableSubledgerRequestDto
435
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
436
+ * @param {*} [options] Override http request option.
437
+ * @throws {RequiredError}
438
+ */
439
+ async createAndEnableSubledger(createAndEnableSubledgerRequestDto: CreateAndEnableSubledgerRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateAndEnableSubledgerResponseClass>> {
440
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createAndEnableSubledger(createAndEnableSubledgerRequestDto, authorization, options);
441
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
442
+ },
443
+ /**
444
+ * This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
445
+ * @summary Create the create and enable subledger from file
446
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
447
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
448
+ * @param {*} [options] Override http request option.
449
+ * @throws {RequiredError}
450
+ */
451
+ async createAndEnableSubledgerFromFile(file: any, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateAndEnableSubledgerResponseClass>> {
452
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createAndEnableSubledgerFromFile(file, authorization, options);
453
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
454
+ },
455
+ /**
456
+ * This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
457
+ * @summary Retrieve the export accounting config
458
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
459
+ * @param {*} [options] Override http request option.
460
+ * @throws {RequiredError}
461
+ */
462
+ async exportAccountingConfig(authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExportAccountingConfigResponseClass>> {
463
+ const localVarAxiosArgs = await localVarAxiosParamCreator.exportAccountingConfig(authorization, options);
464
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
465
+ },
466
+ /**
467
+ * This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
468
+ * @summary Retrieve the accounting categories
469
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
470
+ * @param {*} [options] Override http request option.
471
+ * @throws {RequiredError}
472
+ */
473
+ async getAccountingCategories(authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAccountingCategoriesResponseClass>> {
474
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAccountingCategories(authorization, options);
475
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
476
+ },
477
+ /**
478
+ * Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
479
+ * @summary Retrieve the get activation snapshot
480
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
481
+ * @param {*} [options] Override http request option.
482
+ * @throws {RequiredError}
483
+ */
484
+ async getActivationSnapshot(authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetActivationSnapshotResponseClass>> {
485
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getActivationSnapshot(authorization, options);
486
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
487
+ },
488
+ /**
489
+ * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
490
+ * @summary Delete the reset subledger
491
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
492
+ * @param {*} [options] Override http request option.
493
+ * @throws {RequiredError}
494
+ */
495
+ async resetSubledger(authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
496
+ const localVarAxiosArgs = await localVarAxiosParamCreator.resetSubledger(authorization, options);
497
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
498
+ },
499
+ /**
500
+ * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
501
+ * @summary Create the validate accounting config
502
+ * @param {ValidateAccountingConfigRequestDto} validateAccountingConfigRequestDto
503
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
504
+ * @param {*} [options] Override http request option.
505
+ * @throws {RequiredError}
506
+ */
507
+ async validateAccountingConfig(validateAccountingConfigRequestDto: ValidateAccountingConfigRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ValidateAccountingConfigResponseClass>> {
508
+ const localVarAxiosArgs = await localVarAxiosParamCreator.validateAccountingConfig(validateAccountingConfigRequestDto, authorization, options);
509
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
510
+ },
511
+ /**
512
+ * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
513
+ * @summary Create the validate accounting config from file
514
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
515
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
516
+ * @param {*} [options] Override http request option.
517
+ * @throws {RequiredError}
518
+ */
519
+ async validateAccountingConfigFromFile(file: any, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ValidateAccountingConfigResponseClass>> {
520
+ const localVarAxiosArgs = await localVarAxiosParamCreator.validateAccountingConfigFromFile(file, authorization, options);
521
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
522
+ },
523
+ }
524
+ };
525
+
526
+ /**
527
+ * AccountingConfigsApi - factory interface
528
+ * @export
529
+ */
530
+ export const AccountingConfigsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
531
+ const localVarFp = AccountingConfigsApiFp(configuration)
532
+ return {
533
+ /**
534
+ * This will create and enable the subledger, using an accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
535
+ * @summary Create the create and enable subledger
536
+ * @param {CreateAndEnableSubledgerRequestDto} createAndEnableSubledgerRequestDto
537
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
538
+ * @param {*} [options] Override http request option.
539
+ * @throws {RequiredError}
540
+ */
541
+ createAndEnableSubledger(createAndEnableSubledgerRequestDto: CreateAndEnableSubledgerRequestDto, authorization?: string, options?: any): AxiosPromise<CreateAndEnableSubledgerResponseClass> {
542
+ return localVarFp.createAndEnableSubledger(createAndEnableSubledgerRequestDto, authorization, options).then((request) => request(axios, basePath));
543
+ },
544
+ /**
545
+ * This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
546
+ * @summary Create the create and enable subledger from file
547
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
548
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
549
+ * @param {*} [options] Override http request option.
550
+ * @throws {RequiredError}
551
+ */
552
+ createAndEnableSubledgerFromFile(file: any, authorization?: string, options?: any): AxiosPromise<CreateAndEnableSubledgerResponseClass> {
553
+ return localVarFp.createAndEnableSubledgerFromFile(file, authorization, options).then((request) => request(axios, basePath));
554
+ },
555
+ /**
556
+ * This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
557
+ * @summary Retrieve the export accounting config
558
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
559
+ * @param {*} [options] Override http request option.
560
+ * @throws {RequiredError}
561
+ */
562
+ exportAccountingConfig(authorization?: string, options?: any): AxiosPromise<ExportAccountingConfigResponseClass> {
563
+ return localVarFp.exportAccountingConfig(authorization, options).then((request) => request(axios, basePath));
564
+ },
565
+ /**
566
+ * This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
567
+ * @summary Retrieve the accounting categories
568
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
569
+ * @param {*} [options] Override http request option.
570
+ * @throws {RequiredError}
571
+ */
572
+ getAccountingCategories(authorization?: string, options?: any): AxiosPromise<GetAccountingCategoriesResponseClass> {
573
+ return localVarFp.getAccountingCategories(authorization, options).then((request) => request(axios, basePath));
574
+ },
575
+ /**
576
+ * Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
577
+ * @summary Retrieve the get activation snapshot
578
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
579
+ * @param {*} [options] Override http request option.
580
+ * @throws {RequiredError}
581
+ */
582
+ getActivationSnapshot(authorization?: string, options?: any): AxiosPromise<GetActivationSnapshotResponseClass> {
583
+ return localVarFp.getActivationSnapshot(authorization, options).then((request) => request(axios, basePath));
584
+ },
585
+ /**
586
+ * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
587
+ * @summary Delete the reset subledger
588
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
589
+ * @param {*} [options] Override http request option.
590
+ * @throws {RequiredError}
591
+ */
592
+ resetSubledger(authorization?: string, options?: any): AxiosPromise<void> {
593
+ return localVarFp.resetSubledger(authorization, options).then((request) => request(axios, basePath));
594
+ },
595
+ /**
596
+ * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
597
+ * @summary Create the validate accounting config
598
+ * @param {ValidateAccountingConfigRequestDto} validateAccountingConfigRequestDto
599
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
600
+ * @param {*} [options] Override http request option.
601
+ * @throws {RequiredError}
602
+ */
603
+ validateAccountingConfig(validateAccountingConfigRequestDto: ValidateAccountingConfigRequestDto, authorization?: string, options?: any): AxiosPromise<ValidateAccountingConfigResponseClass> {
604
+ return localVarFp.validateAccountingConfig(validateAccountingConfigRequestDto, authorization, options).then((request) => request(axios, basePath));
605
+ },
606
+ /**
607
+ * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
608
+ * @summary Create the validate accounting config from file
609
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
610
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
611
+ * @param {*} [options] Override http request option.
612
+ * @throws {RequiredError}
613
+ */
614
+ validateAccountingConfigFromFile(file: any, authorization?: string, options?: any): AxiosPromise<ValidateAccountingConfigResponseClass> {
615
+ return localVarFp.validateAccountingConfigFromFile(file, authorization, options).then((request) => request(axios, basePath));
616
+ },
617
+ };
618
+ };
619
+
620
+ /**
621
+ * Request parameters for createAndEnableSubledger operation in AccountingConfigsApi.
622
+ * @export
623
+ * @interface AccountingConfigsApiCreateAndEnableSubledgerRequest
624
+ */
625
+ export interface AccountingConfigsApiCreateAndEnableSubledgerRequest {
626
+ /**
627
+ *
628
+ * @type {CreateAndEnableSubledgerRequestDto}
629
+ * @memberof AccountingConfigsApiCreateAndEnableSubledger
630
+ */
631
+ readonly createAndEnableSubledgerRequestDto: CreateAndEnableSubledgerRequestDto
632
+
633
+ /**
634
+ * Bearer Token: provided by the login endpoint under the name accessToken.
635
+ * @type {string}
636
+ * @memberof AccountingConfigsApiCreateAndEnableSubledger
637
+ */
638
+ readonly authorization?: string
639
+ }
640
+
641
+ /**
642
+ * Request parameters for createAndEnableSubledgerFromFile operation in AccountingConfigsApi.
643
+ * @export
644
+ * @interface AccountingConfigsApiCreateAndEnableSubledgerFromFileRequest
645
+ */
646
+ export interface AccountingConfigsApiCreateAndEnableSubledgerFromFileRequest {
647
+ /**
648
+ * JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
649
+ * @type {any}
650
+ * @memberof AccountingConfigsApiCreateAndEnableSubledgerFromFile
651
+ */
652
+ readonly file: any
653
+
654
+ /**
655
+ * Bearer Token: provided by the login endpoint under the name accessToken.
656
+ * @type {string}
657
+ * @memberof AccountingConfigsApiCreateAndEnableSubledgerFromFile
658
+ */
659
+ readonly authorization?: string
660
+ }
661
+
662
+ /**
663
+ * Request parameters for exportAccountingConfig operation in AccountingConfigsApi.
664
+ * @export
665
+ * @interface AccountingConfigsApiExportAccountingConfigRequest
666
+ */
667
+ export interface AccountingConfigsApiExportAccountingConfigRequest {
668
+ /**
669
+ * Bearer Token: provided by the login endpoint under the name accessToken.
670
+ * @type {string}
671
+ * @memberof AccountingConfigsApiExportAccountingConfig
672
+ */
673
+ readonly authorization?: string
674
+ }
675
+
676
+ /**
677
+ * Request parameters for getAccountingCategories operation in AccountingConfigsApi.
678
+ * @export
679
+ * @interface AccountingConfigsApiGetAccountingCategoriesRequest
680
+ */
681
+ export interface AccountingConfigsApiGetAccountingCategoriesRequest {
682
+ /**
683
+ * Bearer Token: provided by the login endpoint under the name accessToken.
684
+ * @type {string}
685
+ * @memberof AccountingConfigsApiGetAccountingCategories
686
+ */
687
+ readonly authorization?: string
688
+ }
689
+
690
+ /**
691
+ * Request parameters for getActivationSnapshot operation in AccountingConfigsApi.
692
+ * @export
693
+ * @interface AccountingConfigsApiGetActivationSnapshotRequest
694
+ */
695
+ export interface AccountingConfigsApiGetActivationSnapshotRequest {
696
+ /**
697
+ * Bearer Token: provided by the login endpoint under the name accessToken.
698
+ * @type {string}
699
+ * @memberof AccountingConfigsApiGetActivationSnapshot
700
+ */
701
+ readonly authorization?: string
702
+ }
703
+
704
+ /**
705
+ * Request parameters for resetSubledger operation in AccountingConfigsApi.
706
+ * @export
707
+ * @interface AccountingConfigsApiResetSubledgerRequest
708
+ */
709
+ export interface AccountingConfigsApiResetSubledgerRequest {
710
+ /**
711
+ * Bearer Token: provided by the login endpoint under the name accessToken.
712
+ * @type {string}
713
+ * @memberof AccountingConfigsApiResetSubledger
714
+ */
715
+ readonly authorization?: string
716
+ }
717
+
718
+ /**
719
+ * Request parameters for validateAccountingConfig operation in AccountingConfigsApi.
720
+ * @export
721
+ * @interface AccountingConfigsApiValidateAccountingConfigRequest
722
+ */
723
+ export interface AccountingConfigsApiValidateAccountingConfigRequest {
724
+ /**
725
+ *
726
+ * @type {ValidateAccountingConfigRequestDto}
727
+ * @memberof AccountingConfigsApiValidateAccountingConfig
728
+ */
729
+ readonly validateAccountingConfigRequestDto: ValidateAccountingConfigRequestDto
730
+
731
+ /**
732
+ * Bearer Token: provided by the login endpoint under the name accessToken.
733
+ * @type {string}
734
+ * @memberof AccountingConfigsApiValidateAccountingConfig
735
+ */
736
+ readonly authorization?: string
737
+ }
738
+
739
+ /**
740
+ * Request parameters for validateAccountingConfigFromFile operation in AccountingConfigsApi.
741
+ * @export
742
+ * @interface AccountingConfigsApiValidateAccountingConfigFromFileRequest
743
+ */
744
+ export interface AccountingConfigsApiValidateAccountingConfigFromFileRequest {
745
+ /**
746
+ * JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
747
+ * @type {any}
748
+ * @memberof AccountingConfigsApiValidateAccountingConfigFromFile
749
+ */
750
+ readonly file: any
751
+
752
+ /**
753
+ * Bearer Token: provided by the login endpoint under the name accessToken.
754
+ * @type {string}
755
+ * @memberof AccountingConfigsApiValidateAccountingConfigFromFile
756
+ */
757
+ readonly authorization?: string
758
+ }
759
+
760
+ /**
761
+ * AccountingConfigsApi - object-oriented interface
762
+ * @export
763
+ * @class AccountingConfigsApi
764
+ * @extends {BaseAPI}
765
+ */
766
+ export class AccountingConfigsApi extends BaseAPI {
767
+ /**
768
+ * This will create and enable the subledger, using an accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
769
+ * @summary Create the create and enable subledger
770
+ * @param {AccountingConfigsApiCreateAndEnableSubledgerRequest} requestParameters Request parameters.
771
+ * @param {*} [options] Override http request option.
772
+ * @throws {RequiredError}
773
+ * @memberof AccountingConfigsApi
774
+ */
775
+ public createAndEnableSubledger(requestParameters: AccountingConfigsApiCreateAndEnableSubledgerRequest, options?: AxiosRequestConfig) {
776
+ return AccountingConfigsApiFp(this.configuration).createAndEnableSubledger(requestParameters.createAndEnableSubledgerRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
777
+ }
778
+
779
+ /**
780
+ * This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
781
+ * @summary Create the create and enable subledger from file
782
+ * @param {AccountingConfigsApiCreateAndEnableSubledgerFromFileRequest} requestParameters Request parameters.
783
+ * @param {*} [options] Override http request option.
784
+ * @throws {RequiredError}
785
+ * @memberof AccountingConfigsApi
786
+ */
787
+ public createAndEnableSubledgerFromFile(requestParameters: AccountingConfigsApiCreateAndEnableSubledgerFromFileRequest, options?: AxiosRequestConfig) {
788
+ return AccountingConfigsApiFp(this.configuration).createAndEnableSubledgerFromFile(requestParameters.file, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
789
+ }
790
+
791
+ /**
792
+ * This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
793
+ * @summary Retrieve the export accounting config
794
+ * @param {AccountingConfigsApiExportAccountingConfigRequest} requestParameters Request parameters.
795
+ * @param {*} [options] Override http request option.
796
+ * @throws {RequiredError}
797
+ * @memberof AccountingConfigsApi
798
+ */
799
+ public exportAccountingConfig(requestParameters: AccountingConfigsApiExportAccountingConfigRequest = {}, options?: AxiosRequestConfig) {
800
+ return AccountingConfigsApiFp(this.configuration).exportAccountingConfig(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
801
+ }
802
+
803
+ /**
804
+ * This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
805
+ * @summary Retrieve the accounting categories
806
+ * @param {AccountingConfigsApiGetAccountingCategoriesRequest} requestParameters Request parameters.
807
+ * @param {*} [options] Override http request option.
808
+ * @throws {RequiredError}
809
+ * @memberof AccountingConfigsApi
810
+ */
811
+ public getAccountingCategories(requestParameters: AccountingConfigsApiGetAccountingCategoriesRequest = {}, options?: AxiosRequestConfig) {
812
+ return AccountingConfigsApiFp(this.configuration).getAccountingCategories(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
813
+ }
814
+
815
+ /**
816
+ * Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
817
+ * @summary Retrieve the get activation snapshot
818
+ * @param {AccountingConfigsApiGetActivationSnapshotRequest} requestParameters Request parameters.
819
+ * @param {*} [options] Override http request option.
820
+ * @throws {RequiredError}
821
+ * @memberof AccountingConfigsApi
822
+ */
823
+ public getActivationSnapshot(requestParameters: AccountingConfigsApiGetActivationSnapshotRequest = {}, options?: AxiosRequestConfig) {
824
+ return AccountingConfigsApiFp(this.configuration).getActivationSnapshot(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
825
+ }
826
+
827
+ /**
828
+ * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
829
+ * @summary Delete the reset subledger
830
+ * @param {AccountingConfigsApiResetSubledgerRequest} requestParameters Request parameters.
831
+ * @param {*} [options] Override http request option.
832
+ * @throws {RequiredError}
833
+ * @memberof AccountingConfigsApi
834
+ */
835
+ public resetSubledger(requestParameters: AccountingConfigsApiResetSubledgerRequest = {}, options?: AxiosRequestConfig) {
836
+ return AccountingConfigsApiFp(this.configuration).resetSubledger(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
837
+ }
838
+
839
+ /**
840
+ * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
841
+ * @summary Create the validate accounting config
842
+ * @param {AccountingConfigsApiValidateAccountingConfigRequest} requestParameters Request parameters.
843
+ * @param {*} [options] Override http request option.
844
+ * @throws {RequiredError}
845
+ * @memberof AccountingConfigsApi
846
+ */
847
+ public validateAccountingConfig(requestParameters: AccountingConfigsApiValidateAccountingConfigRequest, options?: AxiosRequestConfig) {
848
+ return AccountingConfigsApiFp(this.configuration).validateAccountingConfig(requestParameters.validateAccountingConfigRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
849
+ }
850
+
851
+ /**
852
+ * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
853
+ * @summary Create the validate accounting config from file
854
+ * @param {AccountingConfigsApiValidateAccountingConfigFromFileRequest} requestParameters Request parameters.
855
+ * @param {*} [options] Override http request option.
856
+ * @throws {RequiredError}
857
+ * @memberof AccountingConfigsApi
858
+ */
859
+ public validateAccountingConfigFromFile(requestParameters: AccountingConfigsApiValidateAccountingConfigFromFileRequest, options?: AxiosRequestConfig) {
860
+ return AccountingConfigsApiFp(this.configuration).validateAccountingConfigFromFile(requestParameters.file, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
861
+ }
862
+ }