@smartbooks-ai/api-client 0.0.3

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 (257) hide show
  1. package/.openapi-generator/FILES +56 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +50 -0
  5. package/dist/apis/AiApi.d.ts +289 -0
  6. package/dist/apis/AiApi.js +456 -0
  7. package/dist/apis/AnalyticsApi.d.ts +242 -0
  8. package/dist/apis/AnalyticsApi.js +395 -0
  9. package/dist/apis/AsyncOperationsApi.d.ts +48 -0
  10. package/dist/apis/AsyncOperationsApi.js +57 -0
  11. package/dist/apis/BusinessModelModulesApi.d.ts +182 -0
  12. package/dist/apis/BusinessModelModulesApi.js +289 -0
  13. package/dist/apis/ColorPalettesApi.d.ts +62 -0
  14. package/dist/apis/ColorPalettesApi.js +82 -0
  15. package/dist/apis/CommentsApi.d.ts +94 -0
  16. package/dist/apis/CommentsApi.js +138 -0
  17. package/dist/apis/CompaniesApi.d.ts +88 -0
  18. package/dist/apis/CompaniesApi.js +122 -0
  19. package/dist/apis/CompanyManagementApi.d.ts +90 -0
  20. package/dist/apis/CompanyManagementApi.js +127 -0
  21. package/dist/apis/ConnectionParametersApi.d.ts +98 -0
  22. package/dist/apis/ConnectionParametersApi.js +155 -0
  23. package/dist/apis/ConnectionTypesApi.d.ts +90 -0
  24. package/dist/apis/ConnectionTypesApi.js +128 -0
  25. package/dist/apis/ConnectionsApi.d.ts +156 -0
  26. package/dist/apis/ConnectionsApi.js +240 -0
  27. package/dist/apis/ConnectionsAuthorizationApi.d.ts +74 -0
  28. package/dist/apis/ConnectionsAuthorizationApi.js +112 -0
  29. package/dist/apis/ConnectionsClientCredentialsApi.d.ts +72 -0
  30. package/dist/apis/ConnectionsClientCredentialsApi.js +104 -0
  31. package/dist/apis/ConsolidationApi.d.ts +192 -0
  32. package/dist/apis/ConsolidationApi.js +301 -0
  33. package/dist/apis/CostCenterApi.d.ts +130 -0
  34. package/dist/apis/CostCenterApi.js +192 -0
  35. package/dist/apis/DashboardsApi.d.ts +306 -0
  36. package/dist/apis/DashboardsApi.js +519 -0
  37. package/dist/apis/DataSynchronizationApi.d.ts +92 -0
  38. package/dist/apis/DataSynchronizationApi.js +131 -0
  39. package/dist/apis/ExplanationApi.d.ts +110 -0
  40. package/dist/apis/ExplanationApi.js +231 -0
  41. package/dist/apis/FormatsApi.d.ts +46 -0
  42. package/dist/apis/FormatsApi.js +52 -0
  43. package/dist/apis/FormulasApi.d.ts +62 -0
  44. package/dist/apis/FormulasApi.js +85 -0
  45. package/dist/apis/FuturesApi.d.ts +136 -0
  46. package/dist/apis/FuturesApi.js +208 -0
  47. package/dist/apis/IdentityLinkingApi.d.ts +46 -0
  48. package/dist/apis/IdentityLinkingApi.js +53 -0
  49. package/dist/apis/InputApi.d.ts +55 -0
  50. package/dist/apis/InputApi.js +61 -0
  51. package/dist/apis/IntercompanyMatchingApi.d.ts +174 -0
  52. package/dist/apis/IntercompanyMatchingApi.js +264 -0
  53. package/dist/apis/InvitationsApi.d.ts +156 -0
  54. package/dist/apis/InvitationsApi.js +239 -0
  55. package/dist/apis/MaintenanceApi.d.ts +182 -0
  56. package/dist/apis/MaintenanceApi.js +282 -0
  57. package/dist/apis/ManualInputApi.d.ts +204 -0
  58. package/dist/apis/ManualInputApi.js +332 -0
  59. package/dist/apis/ModulesApi.d.ts +88 -0
  60. package/dist/apis/ModulesApi.js +116 -0
  61. package/dist/apis/NodePurposesApi.d.ts +68 -0
  62. package/dist/apis/NodePurposesApi.js +90 -0
  63. package/dist/apis/ProfileApi.d.ts +85 -0
  64. package/dist/apis/ProfileApi.js +118 -0
  65. package/dist/apis/RelationsApi.d.ts +46 -0
  66. package/dist/apis/RelationsApi.js +52 -0
  67. package/dist/apis/ReportGroupsApi.d.ts +72 -0
  68. package/dist/apis/ReportGroupsApi.js +96 -0
  69. package/dist/apis/ReportingApi.d.ts +267 -0
  70. package/dist/apis/ReportingApi.js +383 -0
  71. package/dist/apis/ReportingPeriodsApi.d.ts +46 -0
  72. package/dist/apis/ReportingPeriodsApi.js +52 -0
  73. package/dist/apis/SourceAccountsApi.d.ts +46 -0
  74. package/dist/apis/SourceAccountsApi.js +52 -0
  75. package/dist/apis/StructureApi.d.ts +134 -0
  76. package/dist/apis/StructureApi.js +167 -0
  77. package/dist/apis/StructureDefinitionApi.d.ts +164 -0
  78. package/dist/apis/StructureDefinitionApi.js +263 -0
  79. package/dist/apis/StructureImprovementApi.d.ts +70 -0
  80. package/dist/apis/StructureImprovementApi.js +95 -0
  81. package/dist/apis/TemplatesApi.d.ts +120 -0
  82. package/dist/apis/TemplatesApi.js +182 -0
  83. package/dist/apis/TemplatesGenerationApi.d.ts +66 -0
  84. package/dist/apis/TemplatesGenerationApi.js +89 -0
  85. package/dist/apis/TenantIntercompanySettingsApi.d.ts +90 -0
  86. package/dist/apis/TenantIntercompanySettingsApi.js +127 -0
  87. package/dist/apis/TenantsApi.d.ts +124 -0
  88. package/dist/apis/TenantsApi.js +184 -0
  89. package/dist/apis/TransactionDetailsApi.d.ts +50 -0
  90. package/dist/apis/TransactionDetailsApi.js +61 -0
  91. package/dist/apis/UsersApi.d.ts +114 -0
  92. package/dist/apis/UsersApi.js +169 -0
  93. package/dist/apis/WebhooksApi.d.ts +68 -0
  94. package/dist/apis/WebhooksApi.js +90 -0
  95. package/dist/apis/WizardApi.d.ts +74 -0
  96. package/dist/apis/WizardApi.js +105 -0
  97. package/dist/apis/index.d.ts +46 -0
  98. package/dist/apis/index.js +64 -0
  99. package/dist/esm/apis/AiApi.d.ts +289 -0
  100. package/dist/esm/apis/AiApi.js +452 -0
  101. package/dist/esm/apis/AnalyticsApi.d.ts +242 -0
  102. package/dist/esm/apis/AnalyticsApi.js +391 -0
  103. package/dist/esm/apis/AsyncOperationsApi.d.ts +48 -0
  104. package/dist/esm/apis/AsyncOperationsApi.js +53 -0
  105. package/dist/esm/apis/BusinessModelModulesApi.d.ts +182 -0
  106. package/dist/esm/apis/BusinessModelModulesApi.js +285 -0
  107. package/dist/esm/apis/ColorPalettesApi.d.ts +62 -0
  108. package/dist/esm/apis/ColorPalettesApi.js +78 -0
  109. package/dist/esm/apis/CommentsApi.d.ts +94 -0
  110. package/dist/esm/apis/CommentsApi.js +134 -0
  111. package/dist/esm/apis/CompaniesApi.d.ts +88 -0
  112. package/dist/esm/apis/CompaniesApi.js +118 -0
  113. package/dist/esm/apis/CompanyManagementApi.d.ts +90 -0
  114. package/dist/esm/apis/CompanyManagementApi.js +123 -0
  115. package/dist/esm/apis/ConnectionParametersApi.d.ts +98 -0
  116. package/dist/esm/apis/ConnectionParametersApi.js +151 -0
  117. package/dist/esm/apis/ConnectionTypesApi.d.ts +90 -0
  118. package/dist/esm/apis/ConnectionTypesApi.js +124 -0
  119. package/dist/esm/apis/ConnectionsApi.d.ts +156 -0
  120. package/dist/esm/apis/ConnectionsApi.js +236 -0
  121. package/dist/esm/apis/ConnectionsAuthorizationApi.d.ts +74 -0
  122. package/dist/esm/apis/ConnectionsAuthorizationApi.js +108 -0
  123. package/dist/esm/apis/ConnectionsClientCredentialsApi.d.ts +72 -0
  124. package/dist/esm/apis/ConnectionsClientCredentialsApi.js +100 -0
  125. package/dist/esm/apis/ConsolidationApi.d.ts +192 -0
  126. package/dist/esm/apis/ConsolidationApi.js +297 -0
  127. package/dist/esm/apis/CostCenterApi.d.ts +130 -0
  128. package/dist/esm/apis/CostCenterApi.js +188 -0
  129. package/dist/esm/apis/DashboardsApi.d.ts +306 -0
  130. package/dist/esm/apis/DashboardsApi.js +515 -0
  131. package/dist/esm/apis/DataSynchronizationApi.d.ts +92 -0
  132. package/dist/esm/apis/DataSynchronizationApi.js +127 -0
  133. package/dist/esm/apis/ExplanationApi.d.ts +110 -0
  134. package/dist/esm/apis/ExplanationApi.js +227 -0
  135. package/dist/esm/apis/FormatsApi.d.ts +46 -0
  136. package/dist/esm/apis/FormatsApi.js +48 -0
  137. package/dist/esm/apis/FormulasApi.d.ts +62 -0
  138. package/dist/esm/apis/FormulasApi.js +81 -0
  139. package/dist/esm/apis/FuturesApi.d.ts +136 -0
  140. package/dist/esm/apis/FuturesApi.js +204 -0
  141. package/dist/esm/apis/IdentityLinkingApi.d.ts +46 -0
  142. package/dist/esm/apis/IdentityLinkingApi.js +49 -0
  143. package/dist/esm/apis/InputApi.d.ts +55 -0
  144. package/dist/esm/apis/InputApi.js +57 -0
  145. package/dist/esm/apis/IntercompanyMatchingApi.d.ts +174 -0
  146. package/dist/esm/apis/IntercompanyMatchingApi.js +260 -0
  147. package/dist/esm/apis/InvitationsApi.d.ts +156 -0
  148. package/dist/esm/apis/InvitationsApi.js +235 -0
  149. package/dist/esm/apis/MaintenanceApi.d.ts +182 -0
  150. package/dist/esm/apis/MaintenanceApi.js +278 -0
  151. package/dist/esm/apis/ManualInputApi.d.ts +204 -0
  152. package/dist/esm/apis/ManualInputApi.js +328 -0
  153. package/dist/esm/apis/ModulesApi.d.ts +88 -0
  154. package/dist/esm/apis/ModulesApi.js +112 -0
  155. package/dist/esm/apis/NodePurposesApi.d.ts +68 -0
  156. package/dist/esm/apis/NodePurposesApi.js +86 -0
  157. package/dist/esm/apis/ProfileApi.d.ts +85 -0
  158. package/dist/esm/apis/ProfileApi.js +114 -0
  159. package/dist/esm/apis/RelationsApi.d.ts +46 -0
  160. package/dist/esm/apis/RelationsApi.js +48 -0
  161. package/dist/esm/apis/ReportGroupsApi.d.ts +72 -0
  162. package/dist/esm/apis/ReportGroupsApi.js +92 -0
  163. package/dist/esm/apis/ReportingApi.d.ts +267 -0
  164. package/dist/esm/apis/ReportingApi.js +379 -0
  165. package/dist/esm/apis/ReportingPeriodsApi.d.ts +46 -0
  166. package/dist/esm/apis/ReportingPeriodsApi.js +48 -0
  167. package/dist/esm/apis/SourceAccountsApi.d.ts +46 -0
  168. package/dist/esm/apis/SourceAccountsApi.js +48 -0
  169. package/dist/esm/apis/StructureApi.d.ts +134 -0
  170. package/dist/esm/apis/StructureApi.js +163 -0
  171. package/dist/esm/apis/StructureDefinitionApi.d.ts +164 -0
  172. package/dist/esm/apis/StructureDefinitionApi.js +259 -0
  173. package/dist/esm/apis/StructureImprovementApi.d.ts +70 -0
  174. package/dist/esm/apis/StructureImprovementApi.js +91 -0
  175. package/dist/esm/apis/TemplatesApi.d.ts +120 -0
  176. package/dist/esm/apis/TemplatesApi.js +178 -0
  177. package/dist/esm/apis/TemplatesGenerationApi.d.ts +66 -0
  178. package/dist/esm/apis/TemplatesGenerationApi.js +85 -0
  179. package/dist/esm/apis/TenantIntercompanySettingsApi.d.ts +90 -0
  180. package/dist/esm/apis/TenantIntercompanySettingsApi.js +123 -0
  181. package/dist/esm/apis/TenantsApi.d.ts +124 -0
  182. package/dist/esm/apis/TenantsApi.js +180 -0
  183. package/dist/esm/apis/TransactionDetailsApi.d.ts +50 -0
  184. package/dist/esm/apis/TransactionDetailsApi.js +57 -0
  185. package/dist/esm/apis/UsersApi.d.ts +114 -0
  186. package/dist/esm/apis/UsersApi.js +165 -0
  187. package/dist/esm/apis/WebhooksApi.d.ts +68 -0
  188. package/dist/esm/apis/WebhooksApi.js +86 -0
  189. package/dist/esm/apis/WizardApi.d.ts +74 -0
  190. package/dist/esm/apis/WizardApi.js +101 -0
  191. package/dist/esm/apis/index.d.ts +46 -0
  192. package/dist/esm/apis/index.js +48 -0
  193. package/dist/esm/index.d.ts +3 -0
  194. package/dist/esm/index.js +5 -0
  195. package/dist/esm/models/index.d.ts +15406 -0
  196. package/dist/esm/models/index.js +1279 -0
  197. package/dist/esm/runtime.d.ts +181 -0
  198. package/dist/esm/runtime.js +326 -0
  199. package/dist/index.d.ts +3 -0
  200. package/dist/index.js +21 -0
  201. package/dist/models/index.d.ts +15406 -0
  202. package/dist/models/index.js +1285 -0
  203. package/dist/runtime.d.ts +181 -0
  204. package/dist/runtime.js +341 -0
  205. package/package.json +21 -0
  206. package/src/apis/AiApi.ts +1043 -0
  207. package/src/apis/AnalyticsApi.ts +925 -0
  208. package/src/apis/AsyncOperationsApi.ts +112 -0
  209. package/src/apis/BusinessModelModulesApi.ts +649 -0
  210. package/src/apis/ColorPalettesApi.ts +148 -0
  211. package/src/apis/CommentsApi.ts +308 -0
  212. package/src/apis/CompaniesApi.ts +260 -0
  213. package/src/apis/CompanyManagementApi.ts +270 -0
  214. package/src/apis/ConnectionParametersApi.ts +339 -0
  215. package/src/apis/ConnectionTypesApi.ts +280 -0
  216. package/src/apis/ConnectionsApi.ts +533 -0
  217. package/src/apis/ConnectionsAuthorizationApi.ts +241 -0
  218. package/src/apis/ConnectionsClientCredentialsApi.ts +224 -0
  219. package/src/apis/ConsolidationApi.ts +682 -0
  220. package/src/apis/CostCenterApi.ts +428 -0
  221. package/src/apis/DashboardsApi.ts +1179 -0
  222. package/src/apis/DataSynchronizationApi.ts +288 -0
  223. package/src/apis/ExplanationApi.ts +504 -0
  224. package/src/apis/FormatsApi.ts +96 -0
  225. package/src/apis/FormulasApi.ts +154 -0
  226. package/src/apis/FuturesApi.ts +463 -0
  227. package/src/apis/IdentityLinkingApi.ts +101 -0
  228. package/src/apis/InputApi.ts +126 -0
  229. package/src/apis/IntercompanyMatchingApi.ts +588 -0
  230. package/src/apis/InvitationsApi.ts +523 -0
  231. package/src/apis/MaintenanceApi.ts +597 -0
  232. package/src/apis/ManualInputApi.ts +771 -0
  233. package/src/apis/ModulesApi.ts +246 -0
  234. package/src/apis/NodePurposesApi.ts +184 -0
  235. package/src/apis/ProfileApi.ts +203 -0
  236. package/src/apis/RelationsApi.ts +99 -0
  237. package/src/apis/ReportGroupsApi.ts +205 -0
  238. package/src/apis/ReportingApi.ts +851 -0
  239. package/src/apis/ReportingPeriodsApi.ts +99 -0
  240. package/src/apis/SourceAccountsApi.ts +102 -0
  241. package/src/apis/StructureApi.ts +334 -0
  242. package/src/apis/StructureDefinitionApi.ts +601 -0
  243. package/src/apis/StructureImprovementApi.ts +214 -0
  244. package/src/apis/TemplatesApi.ts +334 -0
  245. package/src/apis/TemplatesGenerationApi.ts +187 -0
  246. package/src/apis/TenantIntercompanySettingsApi.ts +286 -0
  247. package/src/apis/TenantsApi.ts +374 -0
  248. package/src/apis/TransactionDetailsApi.ts +127 -0
  249. package/src/apis/UsersApi.ts +356 -0
  250. package/src/apis/WebhooksApi.ts +193 -0
  251. package/src/apis/WizardApi.ts +230 -0
  252. package/src/apis/index.ts +48 -0
  253. package/src/index.ts +5 -0
  254. package/src/models/index.ts +15625 -0
  255. package/src/runtime.ts +469 -0
  256. package/tsconfig.esm.json +7 -0
  257. package/tsconfig.json +11 -0
@@ -0,0 +1,126 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Smartbooks Restful API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ *
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
+ import type { AsynchronousOperation, InputBatchRequest } from '../models/index';
15
+ import * as runtime from '../runtime';
16
+
17
+ export interface InputApiPostBatchRequest {
18
+ companyCode: string;
19
+ inputBatchRequest: InputBatchRequest;
20
+ }
21
+
22
+ /**
23
+ * InputApi - interface
24
+ *
25
+ * @export
26
+ * @interface InputApiInterface
27
+ */
28
+ export interface InputApiInterface {
29
+ /**
30
+ * Batch input for a given year and period
31
+ * @summary Batch input
32
+ * @param {string} companyCode
33
+ * @param {InputBatchRequest} inputBatchRequest
34
+ * @param {*} [options] Override http request option.
35
+ * @throws {RequiredError}
36
+ * @memberof InputApiInterface
37
+ */
38
+ postBatchRaw(
39
+ requestParameters: InputApiPostBatchRequest,
40
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
41
+ ): Promise<runtime.ApiResponse<AsynchronousOperation>>;
42
+
43
+ /**
44
+ * Batch input for a given year and period
45
+ * Batch input
46
+ */
47
+ postBatch(
48
+ companyCode: string,
49
+ inputBatchRequest: InputBatchRequest,
50
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
51
+ ): Promise<AsynchronousOperation>;
52
+ }
53
+
54
+ /**
55
+ *
56
+ */
57
+ export class InputApi extends runtime.BaseAPI implements InputApiInterface {
58
+ /**
59
+ * Batch input for a given year and period
60
+ * Batch input
61
+ */
62
+ async postBatchRaw(
63
+ requestParameters: InputApiPostBatchRequest,
64
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
65
+ ): Promise<runtime.ApiResponse<AsynchronousOperation>> {
66
+ if (requestParameters['companyCode'] == null) {
67
+ throw new runtime.RequiredError(
68
+ 'companyCode',
69
+ 'Required parameter "companyCode" was null or undefined when calling postBatch().',
70
+ );
71
+ }
72
+
73
+ if (requestParameters['inputBatchRequest'] == null) {
74
+ throw new runtime.RequiredError(
75
+ 'inputBatchRequest',
76
+ 'Required parameter "inputBatchRequest" was null or undefined when calling postBatch().',
77
+ );
78
+ }
79
+
80
+ const queryParameters: any = {};
81
+
82
+ const headerParameters: runtime.HTTPHeaders = {};
83
+
84
+ headerParameters['Content-Type'] = 'application/json';
85
+
86
+ if (this.configuration && this.configuration.accessToken) {
87
+ const token = this.configuration.accessToken;
88
+ const tokenString = await token('bearerToken', ['input:write']);
89
+
90
+ if (tokenString) {
91
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
92
+ }
93
+ }
94
+ const response = await this.request(
95
+ {
96
+ path: `/api/v1/c/{company_code}/input/batch`.replace(
97
+ `{${'company_code'}}`,
98
+ encodeURIComponent(String(requestParameters['companyCode'])),
99
+ ),
100
+ method: 'POST',
101
+ headers: headerParameters,
102
+ query: queryParameters,
103
+ body: requestParameters['inputBatchRequest'],
104
+ },
105
+ initOverrides,
106
+ );
107
+
108
+ return new runtime.JSONApiResponse(response);
109
+ }
110
+
111
+ /**
112
+ * Batch input for a given year and period
113
+ * Batch input
114
+ */
115
+ async postBatch(
116
+ companyCode: string,
117
+ inputBatchRequest: InputBatchRequest,
118
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
119
+ ): Promise<AsynchronousOperation> {
120
+ const response = await this.postBatchRaw(
121
+ { companyCode: companyCode, inputBatchRequest: inputBatchRequest },
122
+ initOverrides,
123
+ );
124
+ return await response.value();
125
+ }
126
+ }
@@ -0,0 +1,588 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Smartbooks Restful API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ *
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
+ import type {
15
+ IcMatchingSynchronization,
16
+ IcMatchingSynchronizationCreate,
17
+ IcMatchingSynchronizations,
18
+ IcMatchingTransactionsWithNextPageToken,
19
+ Match,
20
+ } from '../models/index';
21
+ import * as runtime from '../runtime';
22
+
23
+ export interface IntercompanyMatchingApiGetRequest {
24
+ companyCode: string;
25
+ limit?: number | null;
26
+ }
27
+
28
+ export interface IntercompanyMatchingApiGetItemRequest {
29
+ companyCode: string;
30
+ synchronizationId: string;
31
+ }
32
+
33
+ export interface IntercompanyMatchingApiPostRequest {
34
+ companyCode: string;
35
+ icMatchingSynchronizationCreate: IcMatchingSynchronizationCreate;
36
+ }
37
+
38
+ export interface IntercompanyMatchingApiRetrieveMatchRequest {
39
+ companyCode: string;
40
+ matchId: string;
41
+ }
42
+
43
+ export interface IntercompanyMatchingApiRetrieveTransactionsRequest {
44
+ companyCode: string;
45
+ period?: number | null;
46
+ year?: number | null;
47
+ transactionDateFrom?: string | null;
48
+ transactionDateTo?: string | null;
49
+ amountFrom?: string | null;
50
+ amountTo?: string | null;
51
+ accountId?: string | null;
52
+ hasMatch?: boolean | null;
53
+ view?: string | null;
54
+ limit?: number | null;
55
+ pageToken?: string | null;
56
+ participantCompanyCode?: string | null;
57
+ segment?: string | null;
58
+ }
59
+
60
+ /**
61
+ * IntercompanyMatchingApi - interface
62
+ *
63
+ * @export
64
+ * @interface IntercompanyMatchingApiInterface
65
+ */
66
+ export interface IntercompanyMatchingApiInterface {
67
+ /**
68
+ *
69
+ * @param {string} companyCode
70
+ * @param {number} [limit]
71
+ * @param {*} [options] Override http request option.
72
+ * @throws {RequiredError}
73
+ * @memberof IntercompanyMatchingApiInterface
74
+ */
75
+ getRaw(
76
+ requestParameters: IntercompanyMatchingApiGetRequest,
77
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
78
+ ): Promise<runtime.ApiResponse<IcMatchingSynchronizations>>;
79
+
80
+ /**
81
+ */
82
+ get(
83
+ companyCode: string,
84
+ limit?: number | null,
85
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
86
+ ): Promise<IcMatchingSynchronizations>;
87
+
88
+ /**
89
+ *
90
+ * @param {string} companyCode
91
+ * @param {string} synchronizationId
92
+ * @param {*} [options] Override http request option.
93
+ * @throws {RequiredError}
94
+ * @memberof IntercompanyMatchingApiInterface
95
+ */
96
+ getItemRaw(
97
+ requestParameters: IntercompanyMatchingApiGetItemRequest,
98
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
99
+ ): Promise<runtime.ApiResponse<IcMatchingSynchronization>>;
100
+
101
+ /**
102
+ */
103
+ getItem(
104
+ companyCode: string,
105
+ synchronizationId: string,
106
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
107
+ ): Promise<IcMatchingSynchronization>;
108
+
109
+ /**
110
+ *
111
+ * @param {string} companyCode
112
+ * @param {IcMatchingSynchronizationCreate} icMatchingSynchronizationCreate
113
+ * @param {*} [options] Override http request option.
114
+ * @throws {RequiredError}
115
+ * @memberof IntercompanyMatchingApiInterface
116
+ */
117
+ postRaw(
118
+ requestParameters: IntercompanyMatchingApiPostRequest,
119
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
120
+ ): Promise<runtime.ApiResponse<IcMatchingSynchronization>>;
121
+
122
+ /**
123
+ */
124
+ post(
125
+ companyCode: string,
126
+ icMatchingSynchronizationCreate: IcMatchingSynchronizationCreate,
127
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
128
+ ): Promise<IcMatchingSynchronization>;
129
+
130
+ /**
131
+ * Retrieve a match by ID
132
+ * @summary Retrieve a match by ID
133
+ * @param {string} companyCode
134
+ * @param {string} matchId
135
+ * @param {*} [options] Override http request option.
136
+ * @throws {RequiredError}
137
+ * @memberof IntercompanyMatchingApiInterface
138
+ */
139
+ retrieveMatchRaw(
140
+ requestParameters: IntercompanyMatchingApiRetrieveMatchRequest,
141
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
142
+ ): Promise<runtime.ApiResponse<Match>>;
143
+
144
+ /**
145
+ * Retrieve a match by ID
146
+ * Retrieve a match by ID
147
+ */
148
+ retrieveMatch(
149
+ companyCode: string,
150
+ matchId: string,
151
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
152
+ ): Promise<Match>;
153
+
154
+ /**
155
+ * Retrieve transactions for intercompany matching
156
+ * @summary Retrieve transactions for intercompany matching
157
+ * @param {string} companyCode
158
+ * @param {number} [period]
159
+ * @param {number} [year]
160
+ * @param {string} [transactionDateFrom]
161
+ * @param {string} [transactionDateTo]
162
+ * @param {string} [amountFrom]
163
+ * @param {string} [amountTo]
164
+ * @param {string} [accountId]
165
+ * @param {boolean} [hasMatch]
166
+ * @param {string} [view]
167
+ * @param {number} [limit]
168
+ * @param {string} [pageToken]
169
+ * @param {string} [participantCompanyCode]
170
+ * @param {string} [segment]
171
+ * @param {*} [options] Override http request option.
172
+ * @throws {RequiredError}
173
+ * @memberof IntercompanyMatchingApiInterface
174
+ */
175
+ retrieveTransactionsRaw(
176
+ requestParameters: IntercompanyMatchingApiRetrieveTransactionsRequest,
177
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
178
+ ): Promise<runtime.ApiResponse<IcMatchingTransactionsWithNextPageToken>>;
179
+
180
+ /**
181
+ * Retrieve transactions for intercompany matching
182
+ * Retrieve transactions for intercompany matching
183
+ */
184
+ retrieveTransactions(
185
+ companyCode: string,
186
+ period?: number | null,
187
+ year?: number | null,
188
+ transactionDateFrom?: string | null,
189
+ transactionDateTo?: string | null,
190
+ amountFrom?: string | null,
191
+ amountTo?: string | null,
192
+ accountId?: string | null,
193
+ hasMatch?: boolean | null,
194
+ view?: string | null,
195
+ limit?: number | null,
196
+ pageToken?: string | null,
197
+ participantCompanyCode?: string | null,
198
+ segment?: string | null,
199
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
200
+ ): Promise<IcMatchingTransactionsWithNextPageToken>;
201
+ }
202
+
203
+ /**
204
+ *
205
+ */
206
+ export class IntercompanyMatchingApi extends runtime.BaseAPI implements IntercompanyMatchingApiInterface {
207
+ /**
208
+ */
209
+ async getRaw(
210
+ requestParameters: IntercompanyMatchingApiGetRequest,
211
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
212
+ ): Promise<runtime.ApiResponse<IcMatchingSynchronizations>> {
213
+ if (requestParameters['companyCode'] == null) {
214
+ throw new runtime.RequiredError(
215
+ 'companyCode',
216
+ 'Required parameter "companyCode" was null or undefined when calling get().',
217
+ );
218
+ }
219
+
220
+ const queryParameters: any = {};
221
+
222
+ if (requestParameters['limit'] != null) {
223
+ queryParameters['limit'] = requestParameters['limit'];
224
+ }
225
+
226
+ const headerParameters: runtime.HTTPHeaders = {};
227
+
228
+ if (this.configuration && this.configuration.accessToken) {
229
+ const token = this.configuration.accessToken;
230
+ const tokenString = await token('bearerToken', ['internal']);
231
+
232
+ if (tokenString) {
233
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
234
+ }
235
+ }
236
+ const response = await this.request(
237
+ {
238
+ path: `/api/v1/c/{company_code}/ic_matching/synchronizations`.replace(
239
+ `{${'company_code'}}`,
240
+ encodeURIComponent(String(requestParameters['companyCode'])),
241
+ ),
242
+ method: 'GET',
243
+ headers: headerParameters,
244
+ query: queryParameters,
245
+ },
246
+ initOverrides,
247
+ );
248
+
249
+ return new runtime.JSONApiResponse(response);
250
+ }
251
+
252
+ /**
253
+ */
254
+ async get(
255
+ companyCode: string,
256
+ limit?: number | null,
257
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
258
+ ): Promise<IcMatchingSynchronizations> {
259
+ const response = await this.getRaw({ companyCode: companyCode, limit: limit }, initOverrides);
260
+ return await response.value();
261
+ }
262
+
263
+ /**
264
+ */
265
+ async getItemRaw(
266
+ requestParameters: IntercompanyMatchingApiGetItemRequest,
267
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
268
+ ): Promise<runtime.ApiResponse<IcMatchingSynchronization>> {
269
+ if (requestParameters['companyCode'] == null) {
270
+ throw new runtime.RequiredError(
271
+ 'companyCode',
272
+ 'Required parameter "companyCode" was null or undefined when calling getItem().',
273
+ );
274
+ }
275
+
276
+ if (requestParameters['synchronizationId'] == null) {
277
+ throw new runtime.RequiredError(
278
+ 'synchronizationId',
279
+ 'Required parameter "synchronizationId" was null or undefined when calling getItem().',
280
+ );
281
+ }
282
+
283
+ const queryParameters: any = {};
284
+
285
+ const headerParameters: runtime.HTTPHeaders = {};
286
+
287
+ if (this.configuration && this.configuration.accessToken) {
288
+ const token = this.configuration.accessToken;
289
+ const tokenString = await token('bearerToken', ['internal']);
290
+
291
+ if (tokenString) {
292
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
293
+ }
294
+ }
295
+ const response = await this.request(
296
+ {
297
+ path: `/api/v1/c/{company_code}/ic_matching/synchronizations/{synchronization_id}`
298
+ .replace(`{${'company_code'}}`, encodeURIComponent(String(requestParameters['companyCode'])))
299
+ .replace(`{${'synchronization_id'}}`, encodeURIComponent(String(requestParameters['synchronizationId']))),
300
+ method: 'GET',
301
+ headers: headerParameters,
302
+ query: queryParameters,
303
+ },
304
+ initOverrides,
305
+ );
306
+
307
+ return new runtime.JSONApiResponse(response);
308
+ }
309
+
310
+ /**
311
+ */
312
+ async getItem(
313
+ companyCode: string,
314
+ synchronizationId: string,
315
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
316
+ ): Promise<IcMatchingSynchronization> {
317
+ const response = await this.getItemRaw(
318
+ { companyCode: companyCode, synchronizationId: synchronizationId },
319
+ initOverrides,
320
+ );
321
+ return await response.value();
322
+ }
323
+
324
+ /**
325
+ */
326
+ async postRaw(
327
+ requestParameters: IntercompanyMatchingApiPostRequest,
328
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
329
+ ): Promise<runtime.ApiResponse<IcMatchingSynchronization>> {
330
+ if (requestParameters['companyCode'] == null) {
331
+ throw new runtime.RequiredError(
332
+ 'companyCode',
333
+ 'Required parameter "companyCode" was null or undefined when calling post().',
334
+ );
335
+ }
336
+
337
+ if (requestParameters['icMatchingSynchronizationCreate'] == null) {
338
+ throw new runtime.RequiredError(
339
+ 'icMatchingSynchronizationCreate',
340
+ 'Required parameter "icMatchingSynchronizationCreate" was null or undefined when calling post().',
341
+ );
342
+ }
343
+
344
+ const queryParameters: any = {};
345
+
346
+ const headerParameters: runtime.HTTPHeaders = {};
347
+
348
+ headerParameters['Content-Type'] = 'application/json';
349
+
350
+ if (this.configuration && this.configuration.accessToken) {
351
+ const token = this.configuration.accessToken;
352
+ const tokenString = await token('bearerToken', ['internal']);
353
+
354
+ if (tokenString) {
355
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
356
+ }
357
+ }
358
+ const response = await this.request(
359
+ {
360
+ path: `/api/v1/c/{company_code}/ic_matching/synchronizations`.replace(
361
+ `{${'company_code'}}`,
362
+ encodeURIComponent(String(requestParameters['companyCode'])),
363
+ ),
364
+ method: 'POST',
365
+ headers: headerParameters,
366
+ query: queryParameters,
367
+ body: requestParameters['icMatchingSynchronizationCreate'],
368
+ },
369
+ initOverrides,
370
+ );
371
+
372
+ return new runtime.JSONApiResponse(response);
373
+ }
374
+
375
+ /**
376
+ */
377
+ async post(
378
+ companyCode: string,
379
+ icMatchingSynchronizationCreate: IcMatchingSynchronizationCreate,
380
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
381
+ ): Promise<IcMatchingSynchronization> {
382
+ const response = await this.postRaw(
383
+ { companyCode: companyCode, icMatchingSynchronizationCreate: icMatchingSynchronizationCreate },
384
+ initOverrides,
385
+ );
386
+ return await response.value();
387
+ }
388
+
389
+ /**
390
+ * Retrieve a match by ID
391
+ * Retrieve a match by ID
392
+ */
393
+ async retrieveMatchRaw(
394
+ requestParameters: IntercompanyMatchingApiRetrieveMatchRequest,
395
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
396
+ ): Promise<runtime.ApiResponse<Match>> {
397
+ if (requestParameters['companyCode'] == null) {
398
+ throw new runtime.RequiredError(
399
+ 'companyCode',
400
+ 'Required parameter "companyCode" was null or undefined when calling retrieveMatch().',
401
+ );
402
+ }
403
+
404
+ if (requestParameters['matchId'] == null) {
405
+ throw new runtime.RequiredError(
406
+ 'matchId',
407
+ 'Required parameter "matchId" was null or undefined when calling retrieveMatch().',
408
+ );
409
+ }
410
+
411
+ const queryParameters: any = {};
412
+
413
+ const headerParameters: runtime.HTTPHeaders = {};
414
+
415
+ if (this.configuration && this.configuration.accessToken) {
416
+ const token = this.configuration.accessToken;
417
+ const tokenString = await token('bearerToken', ['intercompany_matching:read']);
418
+
419
+ if (tokenString) {
420
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
421
+ }
422
+ }
423
+ const response = await this.request(
424
+ {
425
+ path: `/api/v1/c/{company_code}/ic_matching/matches/{match_id}`
426
+ .replace(`{${'company_code'}}`, encodeURIComponent(String(requestParameters['companyCode'])))
427
+ .replace(`{${'match_id'}}`, encodeURIComponent(String(requestParameters['matchId']))),
428
+ method: 'GET',
429
+ headers: headerParameters,
430
+ query: queryParameters,
431
+ },
432
+ initOverrides,
433
+ );
434
+
435
+ return new runtime.JSONApiResponse(response);
436
+ }
437
+
438
+ /**
439
+ * Retrieve a match by ID
440
+ * Retrieve a match by ID
441
+ */
442
+ async retrieveMatch(
443
+ companyCode: string,
444
+ matchId: string,
445
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
446
+ ): Promise<Match> {
447
+ const response = await this.retrieveMatchRaw({ companyCode: companyCode, matchId: matchId }, initOverrides);
448
+ return await response.value();
449
+ }
450
+
451
+ /**
452
+ * Retrieve transactions for intercompany matching
453
+ * Retrieve transactions for intercompany matching
454
+ */
455
+ async retrieveTransactionsRaw(
456
+ requestParameters: IntercompanyMatchingApiRetrieveTransactionsRequest,
457
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
458
+ ): Promise<runtime.ApiResponse<IcMatchingTransactionsWithNextPageToken>> {
459
+ if (requestParameters['companyCode'] == null) {
460
+ throw new runtime.RequiredError(
461
+ 'companyCode',
462
+ 'Required parameter "companyCode" was null or undefined when calling retrieveTransactions().',
463
+ );
464
+ }
465
+
466
+ const queryParameters: any = {};
467
+
468
+ if (requestParameters['period'] != null) {
469
+ queryParameters['period'] = requestParameters['period'];
470
+ }
471
+
472
+ if (requestParameters['year'] != null) {
473
+ queryParameters['year'] = requestParameters['year'];
474
+ }
475
+
476
+ if (requestParameters['transactionDateFrom'] != null) {
477
+ queryParameters['transactionDateFrom'] = requestParameters['transactionDateFrom'];
478
+ }
479
+
480
+ if (requestParameters['transactionDateTo'] != null) {
481
+ queryParameters['transactionDateTo'] = requestParameters['transactionDateTo'];
482
+ }
483
+
484
+ if (requestParameters['amountFrom'] != null) {
485
+ queryParameters['amountFrom'] = requestParameters['amountFrom'];
486
+ }
487
+
488
+ if (requestParameters['amountTo'] != null) {
489
+ queryParameters['amountTo'] = requestParameters['amountTo'];
490
+ }
491
+
492
+ if (requestParameters['accountId'] != null) {
493
+ queryParameters['accountId'] = requestParameters['accountId'];
494
+ }
495
+
496
+ if (requestParameters['hasMatch'] != null) {
497
+ queryParameters['hasMatch'] = requestParameters['hasMatch'];
498
+ }
499
+
500
+ if (requestParameters['view'] != null) {
501
+ queryParameters['view'] = requestParameters['view'];
502
+ }
503
+
504
+ if (requestParameters['limit'] != null) {
505
+ queryParameters['limit'] = requestParameters['limit'];
506
+ }
507
+
508
+ if (requestParameters['pageToken'] != null) {
509
+ queryParameters['pageToken'] = requestParameters['pageToken'];
510
+ }
511
+
512
+ if (requestParameters['participantCompanyCode'] != null) {
513
+ queryParameters['participantCompanyCode'] = requestParameters['participantCompanyCode'];
514
+ }
515
+
516
+ if (requestParameters['segment'] != null) {
517
+ queryParameters['segment'] = requestParameters['segment'];
518
+ }
519
+
520
+ const headerParameters: runtime.HTTPHeaders = {};
521
+
522
+ if (this.configuration && this.configuration.accessToken) {
523
+ const token = this.configuration.accessToken;
524
+ const tokenString = await token('bearerToken', ['intercompany_matching:read']);
525
+
526
+ if (tokenString) {
527
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
528
+ }
529
+ }
530
+ const response = await this.request(
531
+ {
532
+ path: `/api/v1/c/{company_code}/ic_matching/transactions`.replace(
533
+ `{${'company_code'}}`,
534
+ encodeURIComponent(String(requestParameters['companyCode'])),
535
+ ),
536
+ method: 'GET',
537
+ headers: headerParameters,
538
+ query: queryParameters,
539
+ },
540
+ initOverrides,
541
+ );
542
+
543
+ return new runtime.JSONApiResponse(response);
544
+ }
545
+
546
+ /**
547
+ * Retrieve transactions for intercompany matching
548
+ * Retrieve transactions for intercompany matching
549
+ */
550
+ async retrieveTransactions(
551
+ companyCode: string,
552
+ period?: number | null,
553
+ year?: number | null,
554
+ transactionDateFrom?: string | null,
555
+ transactionDateTo?: string | null,
556
+ amountFrom?: string | null,
557
+ amountTo?: string | null,
558
+ accountId?: string | null,
559
+ hasMatch?: boolean | null,
560
+ view?: string | null,
561
+ limit?: number | null,
562
+ pageToken?: string | null,
563
+ participantCompanyCode?: string | null,
564
+ segment?: string | null,
565
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
566
+ ): Promise<IcMatchingTransactionsWithNextPageToken> {
567
+ const response = await this.retrieveTransactionsRaw(
568
+ {
569
+ companyCode: companyCode,
570
+ period: period,
571
+ year: year,
572
+ transactionDateFrom: transactionDateFrom,
573
+ transactionDateTo: transactionDateTo,
574
+ amountFrom: amountFrom,
575
+ amountTo: amountTo,
576
+ accountId: accountId,
577
+ hasMatch: hasMatch,
578
+ view: view,
579
+ limit: limit,
580
+ pageToken: pageToken,
581
+ participantCompanyCode: participantCompanyCode,
582
+ segment: segment,
583
+ },
584
+ initOverrides,
585
+ );
586
+ return await response.value();
587
+ }
588
+ }