@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,1179 @@
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
+ Dashboard,
16
+ DashboardCardPostRequest,
17
+ DashboardCardVersionPostRequest,
18
+ DashboardCardVersionResponse,
19
+ DashboardCreate,
20
+ DashboardPatchRequest,
21
+ DashboardVersionPostRequest,
22
+ DashboardVersionResponse,
23
+ Dashboards,
24
+ ReportReorderRequest,
25
+ } from '../models/index';
26
+ import * as runtime from '../runtime';
27
+
28
+ export interface DashboardsApiDeleteRequest {
29
+ companyCode: string;
30
+ dashboardCode: string;
31
+ }
32
+
33
+ export interface DashboardsApiDeleteCardRequest {
34
+ companyCode: string;
35
+ dashboardCode: string;
36
+ cardCode: string;
37
+ }
38
+
39
+ export interface DashboardsApiGetRequest {
40
+ companyCode: string;
41
+ }
42
+
43
+ export interface DashboardsApiGetItemRequest {
44
+ companyCode: string;
45
+ dashboardCode: string;
46
+ }
47
+
48
+ export interface DashboardsApiGetLatestCardVersionRequest {
49
+ companyCode: string;
50
+ dashboardCode: string;
51
+ cardCode: string;
52
+ }
53
+
54
+ export interface DashboardsApiGetLatestVersionRequest {
55
+ companyCode: string;
56
+ dashboardCode: string;
57
+ }
58
+
59
+ export interface DashboardsApiPatchRequest {
60
+ companyCode: string;
61
+ dashboardCode: string;
62
+ dashboardPatchRequest: DashboardPatchRequest;
63
+ }
64
+
65
+ export interface DashboardsApiPostRequest {
66
+ companyCode: string;
67
+ dashboardCreate: DashboardCreate;
68
+ }
69
+
70
+ export interface DashboardsApiPostCardRequest {
71
+ companyCode: string;
72
+ dashboardCode: string;
73
+ dashboardCardPostRequest: DashboardCardPostRequest;
74
+ copyFrom?: string | null;
75
+ copyFromReportGroup?: string | null;
76
+ }
77
+
78
+ export interface DashboardsApiPostCardVersionRequest {
79
+ companyCode: string;
80
+ dashboardCode: string;
81
+ cardCode: string;
82
+ dashboardCardVersionPostRequest: DashboardCardVersionPostRequest;
83
+ }
84
+
85
+ export interface DashboardsApiPostVersionRequest {
86
+ companyCode: string;
87
+ dashboardCode: string;
88
+ dashboardVersionPostRequest: DashboardVersionPostRequest;
89
+ }
90
+
91
+ export interface DashboardsApiReorderRequest {
92
+ companyCode: string;
93
+ reportReorderRequest: ReportReorderRequest;
94
+ }
95
+
96
+ /**
97
+ * DashboardsApi - interface
98
+ *
99
+ * @export
100
+ * @interface DashboardsApiInterface
101
+ */
102
+ export interface DashboardsApiInterface {
103
+ /**
104
+ *
105
+ * @param {string} companyCode
106
+ * @param {string} dashboardCode
107
+ * @param {*} [options] Override http request option.
108
+ * @throws {RequiredError}
109
+ * @memberof DashboardsApiInterface
110
+ */
111
+ deleteRaw(
112
+ requestParameters: DashboardsApiDeleteRequest,
113
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
114
+ ): Promise<runtime.ApiResponse<void>>;
115
+
116
+ /**
117
+ */
118
+ delete(
119
+ companyCode: string,
120
+ dashboardCode: string,
121
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
122
+ ): Promise<void>;
123
+
124
+ /**
125
+ *
126
+ * @param {string} companyCode
127
+ * @param {string} dashboardCode
128
+ * @param {string} cardCode
129
+ * @param {*} [options] Override http request option.
130
+ * @throws {RequiredError}
131
+ * @memberof DashboardsApiInterface
132
+ */
133
+ deleteCardRaw(
134
+ requestParameters: DashboardsApiDeleteCardRequest,
135
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
136
+ ): Promise<runtime.ApiResponse<void>>;
137
+
138
+ /**
139
+ */
140
+ deleteCard(
141
+ companyCode: string,
142
+ dashboardCode: string,
143
+ cardCode: string,
144
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
145
+ ): Promise<void>;
146
+
147
+ /**
148
+ *
149
+ * @param {string} companyCode
150
+ * @param {*} [options] Override http request option.
151
+ * @throws {RequiredError}
152
+ * @memberof DashboardsApiInterface
153
+ */
154
+ getRaw(
155
+ requestParameters: DashboardsApiGetRequest,
156
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
157
+ ): Promise<runtime.ApiResponse<Dashboards>>;
158
+
159
+ /**
160
+ */
161
+ get(companyCode: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Dashboards>;
162
+
163
+ /**
164
+ *
165
+ * @param {string} companyCode
166
+ * @param {string} dashboardCode
167
+ * @param {*} [options] Override http request option.
168
+ * @throws {RequiredError}
169
+ * @memberof DashboardsApiInterface
170
+ */
171
+ getItemRaw(
172
+ requestParameters: DashboardsApiGetItemRequest,
173
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
174
+ ): Promise<runtime.ApiResponse<Dashboard>>;
175
+
176
+ /**
177
+ */
178
+ getItem(
179
+ companyCode: string,
180
+ dashboardCode: string,
181
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
182
+ ): Promise<Dashboard>;
183
+
184
+ /**
185
+ *
186
+ * @param {string} companyCode
187
+ * @param {string} dashboardCode
188
+ * @param {string} cardCode
189
+ * @param {*} [options] Override http request option.
190
+ * @throws {RequiredError}
191
+ * @memberof DashboardsApiInterface
192
+ */
193
+ getLatestCardVersionRaw(
194
+ requestParameters: DashboardsApiGetLatestCardVersionRequest,
195
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
196
+ ): Promise<runtime.ApiResponse<DashboardCardVersionResponse>>;
197
+
198
+ /**
199
+ */
200
+ getLatestCardVersion(
201
+ companyCode: string,
202
+ dashboardCode: string,
203
+ cardCode: string,
204
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
205
+ ): Promise<DashboardCardVersionResponse>;
206
+
207
+ /**
208
+ *
209
+ * @param {string} companyCode
210
+ * @param {string} dashboardCode
211
+ * @param {*} [options] Override http request option.
212
+ * @throws {RequiredError}
213
+ * @memberof DashboardsApiInterface
214
+ */
215
+ getLatestVersionRaw(
216
+ requestParameters: DashboardsApiGetLatestVersionRequest,
217
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
218
+ ): Promise<runtime.ApiResponse<DashboardVersionResponse>>;
219
+
220
+ /**
221
+ */
222
+ getLatestVersion(
223
+ companyCode: string,
224
+ dashboardCode: string,
225
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
226
+ ): Promise<DashboardVersionResponse>;
227
+
228
+ /**
229
+ *
230
+ * @param {string} companyCode
231
+ * @param {string} dashboardCode
232
+ * @param {DashboardPatchRequest} dashboardPatchRequest
233
+ * @param {*} [options] Override http request option.
234
+ * @throws {RequiredError}
235
+ * @memberof DashboardsApiInterface
236
+ */
237
+ patchRaw(
238
+ requestParameters: DashboardsApiPatchRequest,
239
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
240
+ ): Promise<runtime.ApiResponse<void>>;
241
+
242
+ /**
243
+ */
244
+ patch(
245
+ companyCode: string,
246
+ dashboardCode: string,
247
+ dashboardPatchRequest: DashboardPatchRequest,
248
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
249
+ ): Promise<void>;
250
+
251
+ /**
252
+ *
253
+ * @param {string} companyCode
254
+ * @param {DashboardCreate} dashboardCreate
255
+ * @param {*} [options] Override http request option.
256
+ * @throws {RequiredError}
257
+ * @memberof DashboardsApiInterface
258
+ */
259
+ postRaw(
260
+ requestParameters: DashboardsApiPostRequest,
261
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
262
+ ): Promise<runtime.ApiResponse<Dashboard>>;
263
+
264
+ /**
265
+ */
266
+ post(
267
+ companyCode: string,
268
+ dashboardCreate: DashboardCreate,
269
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
270
+ ): Promise<Dashboard>;
271
+
272
+ /**
273
+ *
274
+ * @param {string} companyCode
275
+ * @param {string} dashboardCode
276
+ * @param {DashboardCardPostRequest} dashboardCardPostRequest
277
+ * @param {string} [copyFrom]
278
+ * @param {string} [copyFromReportGroup]
279
+ * @param {*} [options] Override http request option.
280
+ * @throws {RequiredError}
281
+ * @memberof DashboardsApiInterface
282
+ */
283
+ postCardRaw(
284
+ requestParameters: DashboardsApiPostCardRequest,
285
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
286
+ ): Promise<runtime.ApiResponse<DashboardCardVersionResponse>>;
287
+
288
+ /**
289
+ */
290
+ postCard(
291
+ companyCode: string,
292
+ dashboardCode: string,
293
+ dashboardCardPostRequest: DashboardCardPostRequest,
294
+ copyFrom?: string | null,
295
+ copyFromReportGroup?: string | null,
296
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
297
+ ): Promise<DashboardCardVersionResponse>;
298
+
299
+ /**
300
+ *
301
+ * @param {string} companyCode
302
+ * @param {string} dashboardCode
303
+ * @param {string} cardCode
304
+ * @param {DashboardCardVersionPostRequest} dashboardCardVersionPostRequest
305
+ * @param {*} [options] Override http request option.
306
+ * @throws {RequiredError}
307
+ * @memberof DashboardsApiInterface
308
+ */
309
+ postCardVersionRaw(
310
+ requestParameters: DashboardsApiPostCardVersionRequest,
311
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
312
+ ): Promise<runtime.ApiResponse<DashboardCardVersionResponse>>;
313
+
314
+ /**
315
+ */
316
+ postCardVersion(
317
+ companyCode: string,
318
+ dashboardCode: string,
319
+ cardCode: string,
320
+ dashboardCardVersionPostRequest: DashboardCardVersionPostRequest,
321
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
322
+ ): Promise<DashboardCardVersionResponse>;
323
+
324
+ /**
325
+ *
326
+ * @param {string} companyCode
327
+ * @param {string} dashboardCode
328
+ * @param {DashboardVersionPostRequest} dashboardVersionPostRequest
329
+ * @param {*} [options] Override http request option.
330
+ * @throws {RequiredError}
331
+ * @memberof DashboardsApiInterface
332
+ */
333
+ postVersionRaw(
334
+ requestParameters: DashboardsApiPostVersionRequest,
335
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
336
+ ): Promise<runtime.ApiResponse<DashboardVersionResponse>>;
337
+
338
+ /**
339
+ */
340
+ postVersion(
341
+ companyCode: string,
342
+ dashboardCode: string,
343
+ dashboardVersionPostRequest: DashboardVersionPostRequest,
344
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
345
+ ): Promise<DashboardVersionResponse>;
346
+
347
+ /**
348
+ *
349
+ * @param {string} companyCode
350
+ * @param {ReportReorderRequest} reportReorderRequest
351
+ * @param {*} [options] Override http request option.
352
+ * @throws {RequiredError}
353
+ * @memberof DashboardsApiInterface
354
+ */
355
+ reorderRaw(
356
+ requestParameters: DashboardsApiReorderRequest,
357
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
358
+ ): Promise<runtime.ApiResponse<void>>;
359
+
360
+ /**
361
+ */
362
+ reorder(
363
+ companyCode: string,
364
+ reportReorderRequest: ReportReorderRequest,
365
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
366
+ ): Promise<void>;
367
+ }
368
+
369
+ /**
370
+ *
371
+ */
372
+ export class DashboardsApi extends runtime.BaseAPI implements DashboardsApiInterface {
373
+ /**
374
+ */
375
+ async deleteRaw(
376
+ requestParameters: DashboardsApiDeleteRequest,
377
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
378
+ ): Promise<runtime.ApiResponse<void>> {
379
+ if (requestParameters['companyCode'] == null) {
380
+ throw new runtime.RequiredError(
381
+ 'companyCode',
382
+ 'Required parameter "companyCode" was null or undefined when calling delete().',
383
+ );
384
+ }
385
+
386
+ if (requestParameters['dashboardCode'] == null) {
387
+ throw new runtime.RequiredError(
388
+ 'dashboardCode',
389
+ 'Required parameter "dashboardCode" was null or undefined when calling delete().',
390
+ );
391
+ }
392
+
393
+ const queryParameters: any = {};
394
+
395
+ const headerParameters: runtime.HTTPHeaders = {};
396
+
397
+ if (this.configuration && this.configuration.accessToken) {
398
+ const token = this.configuration.accessToken;
399
+ const tokenString = await token('bearerToken', ['internal']);
400
+
401
+ if (tokenString) {
402
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
403
+ }
404
+ }
405
+ const response = await this.request(
406
+ {
407
+ path: `/api/v1/c/{company_code}/dashboards/{dashboard_code}`
408
+ .replace(`{${'company_code'}}`, encodeURIComponent(String(requestParameters['companyCode'])))
409
+ .replace(`{${'dashboard_code'}}`, encodeURIComponent(String(requestParameters['dashboardCode']))),
410
+ method: 'DELETE',
411
+ headers: headerParameters,
412
+ query: queryParameters,
413
+ },
414
+ initOverrides,
415
+ );
416
+
417
+ return new runtime.VoidApiResponse(response);
418
+ }
419
+
420
+ /**
421
+ */
422
+ async delete(
423
+ companyCode: string,
424
+ dashboardCode: string,
425
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
426
+ ): Promise<void> {
427
+ await this.deleteRaw({ companyCode: companyCode, dashboardCode: dashboardCode }, initOverrides);
428
+ }
429
+
430
+ /**
431
+ */
432
+ async deleteCardRaw(
433
+ requestParameters: DashboardsApiDeleteCardRequest,
434
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
435
+ ): Promise<runtime.ApiResponse<void>> {
436
+ if (requestParameters['companyCode'] == null) {
437
+ throw new runtime.RequiredError(
438
+ 'companyCode',
439
+ 'Required parameter "companyCode" was null or undefined when calling deleteCard().',
440
+ );
441
+ }
442
+
443
+ if (requestParameters['dashboardCode'] == null) {
444
+ throw new runtime.RequiredError(
445
+ 'dashboardCode',
446
+ 'Required parameter "dashboardCode" was null or undefined when calling deleteCard().',
447
+ );
448
+ }
449
+
450
+ if (requestParameters['cardCode'] == null) {
451
+ throw new runtime.RequiredError(
452
+ 'cardCode',
453
+ 'Required parameter "cardCode" was null or undefined when calling deleteCard().',
454
+ );
455
+ }
456
+
457
+ const queryParameters: any = {};
458
+
459
+ const headerParameters: runtime.HTTPHeaders = {};
460
+
461
+ if (this.configuration && this.configuration.accessToken) {
462
+ const token = this.configuration.accessToken;
463
+ const tokenString = await token('bearerToken', ['internal']);
464
+
465
+ if (tokenString) {
466
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
467
+ }
468
+ }
469
+ const response = await this.request(
470
+ {
471
+ path: `/api/v1/c/{company_code}/dashboards/{dashboard_code}/cards/{card_code}`
472
+ .replace(`{${'company_code'}}`, encodeURIComponent(String(requestParameters['companyCode'])))
473
+ .replace(`{${'dashboard_code'}}`, encodeURIComponent(String(requestParameters['dashboardCode'])))
474
+ .replace(`{${'card_code'}}`, encodeURIComponent(String(requestParameters['cardCode']))),
475
+ method: 'DELETE',
476
+ headers: headerParameters,
477
+ query: queryParameters,
478
+ },
479
+ initOverrides,
480
+ );
481
+
482
+ return new runtime.VoidApiResponse(response);
483
+ }
484
+
485
+ /**
486
+ */
487
+ async deleteCard(
488
+ companyCode: string,
489
+ dashboardCode: string,
490
+ cardCode: string,
491
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
492
+ ): Promise<void> {
493
+ await this.deleteCardRaw(
494
+ { companyCode: companyCode, dashboardCode: dashboardCode, cardCode: cardCode },
495
+ initOverrides,
496
+ );
497
+ }
498
+
499
+ /**
500
+ */
501
+ async getRaw(
502
+ requestParameters: DashboardsApiGetRequest,
503
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
504
+ ): Promise<runtime.ApiResponse<Dashboards>> {
505
+ if (requestParameters['companyCode'] == null) {
506
+ throw new runtime.RequiredError(
507
+ 'companyCode',
508
+ 'Required parameter "companyCode" was null or undefined when calling get().',
509
+ );
510
+ }
511
+
512
+ const queryParameters: any = {};
513
+
514
+ const headerParameters: runtime.HTTPHeaders = {};
515
+
516
+ if (this.configuration && this.configuration.accessToken) {
517
+ const token = this.configuration.accessToken;
518
+ const tokenString = await token('bearerToken', ['internal']);
519
+
520
+ if (tokenString) {
521
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
522
+ }
523
+ }
524
+ const response = await this.request(
525
+ {
526
+ path: `/api/v1/c/{company_code}/dashboards`.replace(
527
+ `{${'company_code'}}`,
528
+ encodeURIComponent(String(requestParameters['companyCode'])),
529
+ ),
530
+ method: 'GET',
531
+ headers: headerParameters,
532
+ query: queryParameters,
533
+ },
534
+ initOverrides,
535
+ );
536
+
537
+ return new runtime.JSONApiResponse(response);
538
+ }
539
+
540
+ /**
541
+ */
542
+ async get(companyCode: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Dashboards> {
543
+ const response = await this.getRaw({ companyCode: companyCode }, initOverrides);
544
+ return await response.value();
545
+ }
546
+
547
+ /**
548
+ */
549
+ async getItemRaw(
550
+ requestParameters: DashboardsApiGetItemRequest,
551
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
552
+ ): Promise<runtime.ApiResponse<Dashboard>> {
553
+ if (requestParameters['companyCode'] == null) {
554
+ throw new runtime.RequiredError(
555
+ 'companyCode',
556
+ 'Required parameter "companyCode" was null or undefined when calling getItem().',
557
+ );
558
+ }
559
+
560
+ if (requestParameters['dashboardCode'] == null) {
561
+ throw new runtime.RequiredError(
562
+ 'dashboardCode',
563
+ 'Required parameter "dashboardCode" was null or undefined when calling getItem().',
564
+ );
565
+ }
566
+
567
+ const queryParameters: any = {};
568
+
569
+ const headerParameters: runtime.HTTPHeaders = {};
570
+
571
+ if (this.configuration && this.configuration.accessToken) {
572
+ const token = this.configuration.accessToken;
573
+ const tokenString = await token('bearerToken', ['internal']);
574
+
575
+ if (tokenString) {
576
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
577
+ }
578
+ }
579
+ const response = await this.request(
580
+ {
581
+ path: `/api/v1/c/{company_code}/dashboards/{dashboard_code}`
582
+ .replace(`{${'company_code'}}`, encodeURIComponent(String(requestParameters['companyCode'])))
583
+ .replace(`{${'dashboard_code'}}`, encodeURIComponent(String(requestParameters['dashboardCode']))),
584
+ method: 'GET',
585
+ headers: headerParameters,
586
+ query: queryParameters,
587
+ },
588
+ initOverrides,
589
+ );
590
+
591
+ return new runtime.JSONApiResponse(response);
592
+ }
593
+
594
+ /**
595
+ */
596
+ async getItem(
597
+ companyCode: string,
598
+ dashboardCode: string,
599
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
600
+ ): Promise<Dashboard> {
601
+ const response = await this.getItemRaw({ companyCode: companyCode, dashboardCode: dashboardCode }, initOverrides);
602
+ return await response.value();
603
+ }
604
+
605
+ /**
606
+ */
607
+ async getLatestCardVersionRaw(
608
+ requestParameters: DashboardsApiGetLatestCardVersionRequest,
609
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
610
+ ): Promise<runtime.ApiResponse<DashboardCardVersionResponse>> {
611
+ if (requestParameters['companyCode'] == null) {
612
+ throw new runtime.RequiredError(
613
+ 'companyCode',
614
+ 'Required parameter "companyCode" was null or undefined when calling getLatestCardVersion().',
615
+ );
616
+ }
617
+
618
+ if (requestParameters['dashboardCode'] == null) {
619
+ throw new runtime.RequiredError(
620
+ 'dashboardCode',
621
+ 'Required parameter "dashboardCode" was null or undefined when calling getLatestCardVersion().',
622
+ );
623
+ }
624
+
625
+ if (requestParameters['cardCode'] == null) {
626
+ throw new runtime.RequiredError(
627
+ 'cardCode',
628
+ 'Required parameter "cardCode" was null or undefined when calling getLatestCardVersion().',
629
+ );
630
+ }
631
+
632
+ const queryParameters: any = {};
633
+
634
+ const headerParameters: runtime.HTTPHeaders = {};
635
+
636
+ if (this.configuration && this.configuration.accessToken) {
637
+ const token = this.configuration.accessToken;
638
+ const tokenString = await token('bearerToken', ['internal']);
639
+
640
+ if (tokenString) {
641
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
642
+ }
643
+ }
644
+ const response = await this.request(
645
+ {
646
+ path: `/api/v1/c/{company_code}/dashboards/{dashboard_code}/cards/{card_code}/versions/latest`
647
+ .replace(`{${'company_code'}}`, encodeURIComponent(String(requestParameters['companyCode'])))
648
+ .replace(`{${'dashboard_code'}}`, encodeURIComponent(String(requestParameters['dashboardCode'])))
649
+ .replace(`{${'card_code'}}`, encodeURIComponent(String(requestParameters['cardCode']))),
650
+ method: 'GET',
651
+ headers: headerParameters,
652
+ query: queryParameters,
653
+ },
654
+ initOverrides,
655
+ );
656
+
657
+ return new runtime.JSONApiResponse(response);
658
+ }
659
+
660
+ /**
661
+ */
662
+ async getLatestCardVersion(
663
+ companyCode: string,
664
+ dashboardCode: string,
665
+ cardCode: string,
666
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
667
+ ): Promise<DashboardCardVersionResponse> {
668
+ const response = await this.getLatestCardVersionRaw(
669
+ { companyCode: companyCode, dashboardCode: dashboardCode, cardCode: cardCode },
670
+ initOverrides,
671
+ );
672
+ return await response.value();
673
+ }
674
+
675
+ /**
676
+ */
677
+ async getLatestVersionRaw(
678
+ requestParameters: DashboardsApiGetLatestVersionRequest,
679
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
680
+ ): Promise<runtime.ApiResponse<DashboardVersionResponse>> {
681
+ if (requestParameters['companyCode'] == null) {
682
+ throw new runtime.RequiredError(
683
+ 'companyCode',
684
+ 'Required parameter "companyCode" was null or undefined when calling getLatestVersion().',
685
+ );
686
+ }
687
+
688
+ if (requestParameters['dashboardCode'] == null) {
689
+ throw new runtime.RequiredError(
690
+ 'dashboardCode',
691
+ 'Required parameter "dashboardCode" was null or undefined when calling getLatestVersion().',
692
+ );
693
+ }
694
+
695
+ const queryParameters: any = {};
696
+
697
+ const headerParameters: runtime.HTTPHeaders = {};
698
+
699
+ if (this.configuration && this.configuration.accessToken) {
700
+ const token = this.configuration.accessToken;
701
+ const tokenString = await token('bearerToken', ['internal']);
702
+
703
+ if (tokenString) {
704
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
705
+ }
706
+ }
707
+ const response = await this.request(
708
+ {
709
+ path: `/api/v1/c/{company_code}/dashboards/{dashboard_code}/versions/latest`
710
+ .replace(`{${'company_code'}}`, encodeURIComponent(String(requestParameters['companyCode'])))
711
+ .replace(`{${'dashboard_code'}}`, encodeURIComponent(String(requestParameters['dashboardCode']))),
712
+ method: 'GET',
713
+ headers: headerParameters,
714
+ query: queryParameters,
715
+ },
716
+ initOverrides,
717
+ );
718
+
719
+ return new runtime.JSONApiResponse(response);
720
+ }
721
+
722
+ /**
723
+ */
724
+ async getLatestVersion(
725
+ companyCode: string,
726
+ dashboardCode: string,
727
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
728
+ ): Promise<DashboardVersionResponse> {
729
+ const response = await this.getLatestVersionRaw(
730
+ { companyCode: companyCode, dashboardCode: dashboardCode },
731
+ initOverrides,
732
+ );
733
+ return await response.value();
734
+ }
735
+
736
+ /**
737
+ */
738
+ async patchRaw(
739
+ requestParameters: DashboardsApiPatchRequest,
740
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
741
+ ): Promise<runtime.ApiResponse<void>> {
742
+ if (requestParameters['companyCode'] == null) {
743
+ throw new runtime.RequiredError(
744
+ 'companyCode',
745
+ 'Required parameter "companyCode" was null or undefined when calling patch().',
746
+ );
747
+ }
748
+
749
+ if (requestParameters['dashboardCode'] == null) {
750
+ throw new runtime.RequiredError(
751
+ 'dashboardCode',
752
+ 'Required parameter "dashboardCode" was null or undefined when calling patch().',
753
+ );
754
+ }
755
+
756
+ if (requestParameters['dashboardPatchRequest'] == null) {
757
+ throw new runtime.RequiredError(
758
+ 'dashboardPatchRequest',
759
+ 'Required parameter "dashboardPatchRequest" was null or undefined when calling patch().',
760
+ );
761
+ }
762
+
763
+ const queryParameters: any = {};
764
+
765
+ const headerParameters: runtime.HTTPHeaders = {};
766
+
767
+ headerParameters['Content-Type'] = 'application/json';
768
+
769
+ if (this.configuration && this.configuration.accessToken) {
770
+ const token = this.configuration.accessToken;
771
+ const tokenString = await token('bearerToken', ['internal']);
772
+
773
+ if (tokenString) {
774
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
775
+ }
776
+ }
777
+ const response = await this.request(
778
+ {
779
+ path: `/api/v1/c/{company_code}/dashboards/{dashboard_code}`
780
+ .replace(`{${'company_code'}}`, encodeURIComponent(String(requestParameters['companyCode'])))
781
+ .replace(`{${'dashboard_code'}}`, encodeURIComponent(String(requestParameters['dashboardCode']))),
782
+ method: 'PATCH',
783
+ headers: headerParameters,
784
+ query: queryParameters,
785
+ body: requestParameters['dashboardPatchRequest'],
786
+ },
787
+ initOverrides,
788
+ );
789
+
790
+ return new runtime.VoidApiResponse(response);
791
+ }
792
+
793
+ /**
794
+ */
795
+ async patch(
796
+ companyCode: string,
797
+ dashboardCode: string,
798
+ dashboardPatchRequest: DashboardPatchRequest,
799
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
800
+ ): Promise<void> {
801
+ await this.patchRaw(
802
+ { companyCode: companyCode, dashboardCode: dashboardCode, dashboardPatchRequest: dashboardPatchRequest },
803
+ initOverrides,
804
+ );
805
+ }
806
+
807
+ /**
808
+ */
809
+ async postRaw(
810
+ requestParameters: DashboardsApiPostRequest,
811
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
812
+ ): Promise<runtime.ApiResponse<Dashboard>> {
813
+ if (requestParameters['companyCode'] == null) {
814
+ throw new runtime.RequiredError(
815
+ 'companyCode',
816
+ 'Required parameter "companyCode" was null or undefined when calling post().',
817
+ );
818
+ }
819
+
820
+ if (requestParameters['dashboardCreate'] == null) {
821
+ throw new runtime.RequiredError(
822
+ 'dashboardCreate',
823
+ 'Required parameter "dashboardCreate" was null or undefined when calling post().',
824
+ );
825
+ }
826
+
827
+ const queryParameters: any = {};
828
+
829
+ const headerParameters: runtime.HTTPHeaders = {};
830
+
831
+ headerParameters['Content-Type'] = 'application/json';
832
+
833
+ if (this.configuration && this.configuration.accessToken) {
834
+ const token = this.configuration.accessToken;
835
+ const tokenString = await token('bearerToken', ['internal']);
836
+
837
+ if (tokenString) {
838
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
839
+ }
840
+ }
841
+ const response = await this.request(
842
+ {
843
+ path: `/api/v1/c/{company_code}/dashboards`.replace(
844
+ `{${'company_code'}}`,
845
+ encodeURIComponent(String(requestParameters['companyCode'])),
846
+ ),
847
+ method: 'POST',
848
+ headers: headerParameters,
849
+ query: queryParameters,
850
+ body: requestParameters['dashboardCreate'],
851
+ },
852
+ initOverrides,
853
+ );
854
+
855
+ return new runtime.JSONApiResponse(response);
856
+ }
857
+
858
+ /**
859
+ */
860
+ async post(
861
+ companyCode: string,
862
+ dashboardCreate: DashboardCreate,
863
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
864
+ ): Promise<Dashboard> {
865
+ const response = await this.postRaw({ companyCode: companyCode, dashboardCreate: dashboardCreate }, initOverrides);
866
+ return await response.value();
867
+ }
868
+
869
+ /**
870
+ */
871
+ async postCardRaw(
872
+ requestParameters: DashboardsApiPostCardRequest,
873
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
874
+ ): Promise<runtime.ApiResponse<DashboardCardVersionResponse>> {
875
+ if (requestParameters['companyCode'] == null) {
876
+ throw new runtime.RequiredError(
877
+ 'companyCode',
878
+ 'Required parameter "companyCode" was null or undefined when calling postCard().',
879
+ );
880
+ }
881
+
882
+ if (requestParameters['dashboardCode'] == null) {
883
+ throw new runtime.RequiredError(
884
+ 'dashboardCode',
885
+ 'Required parameter "dashboardCode" was null or undefined when calling postCard().',
886
+ );
887
+ }
888
+
889
+ if (requestParameters['dashboardCardPostRequest'] == null) {
890
+ throw new runtime.RequiredError(
891
+ 'dashboardCardPostRequest',
892
+ 'Required parameter "dashboardCardPostRequest" was null or undefined when calling postCard().',
893
+ );
894
+ }
895
+
896
+ const queryParameters: any = {};
897
+
898
+ if (requestParameters['copyFrom'] != null) {
899
+ queryParameters['copy-from'] = requestParameters['copyFrom'];
900
+ }
901
+
902
+ if (requestParameters['copyFromReportGroup'] != null) {
903
+ queryParameters['copy-from-report-group'] = requestParameters['copyFromReportGroup'];
904
+ }
905
+
906
+ const headerParameters: runtime.HTTPHeaders = {};
907
+
908
+ headerParameters['Content-Type'] = 'application/json';
909
+
910
+ if (this.configuration && this.configuration.accessToken) {
911
+ const token = this.configuration.accessToken;
912
+ const tokenString = await token('bearerToken', ['internal']);
913
+
914
+ if (tokenString) {
915
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
916
+ }
917
+ }
918
+ const response = await this.request(
919
+ {
920
+ path: `/api/v1/c/{company_code}/dashboards/{dashboard_code}/cards`
921
+ .replace(`{${'company_code'}}`, encodeURIComponent(String(requestParameters['companyCode'])))
922
+ .replace(`{${'dashboard_code'}}`, encodeURIComponent(String(requestParameters['dashboardCode']))),
923
+ method: 'POST',
924
+ headers: headerParameters,
925
+ query: queryParameters,
926
+ body: requestParameters['dashboardCardPostRequest'],
927
+ },
928
+ initOverrides,
929
+ );
930
+
931
+ return new runtime.JSONApiResponse(response);
932
+ }
933
+
934
+ /**
935
+ */
936
+ async postCard(
937
+ companyCode: string,
938
+ dashboardCode: string,
939
+ dashboardCardPostRequest: DashboardCardPostRequest,
940
+ copyFrom?: string | null,
941
+ copyFromReportGroup?: string | null,
942
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
943
+ ): Promise<DashboardCardVersionResponse> {
944
+ const response = await this.postCardRaw(
945
+ {
946
+ companyCode: companyCode,
947
+ dashboardCode: dashboardCode,
948
+ dashboardCardPostRequest: dashboardCardPostRequest,
949
+ copyFrom: copyFrom,
950
+ copyFromReportGroup: copyFromReportGroup,
951
+ },
952
+ initOverrides,
953
+ );
954
+ return await response.value();
955
+ }
956
+
957
+ /**
958
+ */
959
+ async postCardVersionRaw(
960
+ requestParameters: DashboardsApiPostCardVersionRequest,
961
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
962
+ ): Promise<runtime.ApiResponse<DashboardCardVersionResponse>> {
963
+ if (requestParameters['companyCode'] == null) {
964
+ throw new runtime.RequiredError(
965
+ 'companyCode',
966
+ 'Required parameter "companyCode" was null or undefined when calling postCardVersion().',
967
+ );
968
+ }
969
+
970
+ if (requestParameters['dashboardCode'] == null) {
971
+ throw new runtime.RequiredError(
972
+ 'dashboardCode',
973
+ 'Required parameter "dashboardCode" was null or undefined when calling postCardVersion().',
974
+ );
975
+ }
976
+
977
+ if (requestParameters['cardCode'] == null) {
978
+ throw new runtime.RequiredError(
979
+ 'cardCode',
980
+ 'Required parameter "cardCode" was null or undefined when calling postCardVersion().',
981
+ );
982
+ }
983
+
984
+ if (requestParameters['dashboardCardVersionPostRequest'] == null) {
985
+ throw new runtime.RequiredError(
986
+ 'dashboardCardVersionPostRequest',
987
+ 'Required parameter "dashboardCardVersionPostRequest" was null or undefined when calling postCardVersion().',
988
+ );
989
+ }
990
+
991
+ const queryParameters: any = {};
992
+
993
+ const headerParameters: runtime.HTTPHeaders = {};
994
+
995
+ headerParameters['Content-Type'] = 'application/json';
996
+
997
+ if (this.configuration && this.configuration.accessToken) {
998
+ const token = this.configuration.accessToken;
999
+ const tokenString = await token('bearerToken', ['internal']);
1000
+
1001
+ if (tokenString) {
1002
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
1003
+ }
1004
+ }
1005
+ const response = await this.request(
1006
+ {
1007
+ path: `/api/v1/c/{company_code}/dashboards/{dashboard_code}/cards/{card_code}/versions`
1008
+ .replace(`{${'company_code'}}`, encodeURIComponent(String(requestParameters['companyCode'])))
1009
+ .replace(`{${'dashboard_code'}}`, encodeURIComponent(String(requestParameters['dashboardCode'])))
1010
+ .replace(`{${'card_code'}}`, encodeURIComponent(String(requestParameters['cardCode']))),
1011
+ method: 'POST',
1012
+ headers: headerParameters,
1013
+ query: queryParameters,
1014
+ body: requestParameters['dashboardCardVersionPostRequest'],
1015
+ },
1016
+ initOverrides,
1017
+ );
1018
+
1019
+ return new runtime.JSONApiResponse(response);
1020
+ }
1021
+
1022
+ /**
1023
+ */
1024
+ async postCardVersion(
1025
+ companyCode: string,
1026
+ dashboardCode: string,
1027
+ cardCode: string,
1028
+ dashboardCardVersionPostRequest: DashboardCardVersionPostRequest,
1029
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
1030
+ ): Promise<DashboardCardVersionResponse> {
1031
+ const response = await this.postCardVersionRaw(
1032
+ {
1033
+ companyCode: companyCode,
1034
+ dashboardCode: dashboardCode,
1035
+ cardCode: cardCode,
1036
+ dashboardCardVersionPostRequest: dashboardCardVersionPostRequest,
1037
+ },
1038
+ initOverrides,
1039
+ );
1040
+ return await response.value();
1041
+ }
1042
+
1043
+ /**
1044
+ */
1045
+ async postVersionRaw(
1046
+ requestParameters: DashboardsApiPostVersionRequest,
1047
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
1048
+ ): Promise<runtime.ApiResponse<DashboardVersionResponse>> {
1049
+ if (requestParameters['companyCode'] == null) {
1050
+ throw new runtime.RequiredError(
1051
+ 'companyCode',
1052
+ 'Required parameter "companyCode" was null or undefined when calling postVersion().',
1053
+ );
1054
+ }
1055
+
1056
+ if (requestParameters['dashboardCode'] == null) {
1057
+ throw new runtime.RequiredError(
1058
+ 'dashboardCode',
1059
+ 'Required parameter "dashboardCode" was null or undefined when calling postVersion().',
1060
+ );
1061
+ }
1062
+
1063
+ if (requestParameters['dashboardVersionPostRequest'] == null) {
1064
+ throw new runtime.RequiredError(
1065
+ 'dashboardVersionPostRequest',
1066
+ 'Required parameter "dashboardVersionPostRequest" was null or undefined when calling postVersion().',
1067
+ );
1068
+ }
1069
+
1070
+ const queryParameters: any = {};
1071
+
1072
+ const headerParameters: runtime.HTTPHeaders = {};
1073
+
1074
+ headerParameters['Content-Type'] = 'application/json';
1075
+
1076
+ if (this.configuration && this.configuration.accessToken) {
1077
+ const token = this.configuration.accessToken;
1078
+ const tokenString = await token('bearerToken', ['internal']);
1079
+
1080
+ if (tokenString) {
1081
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
1082
+ }
1083
+ }
1084
+ const response = await this.request(
1085
+ {
1086
+ path: `/api/v1/c/{company_code}/dashboards/{dashboard_code}/versions`
1087
+ .replace(`{${'company_code'}}`, encodeURIComponent(String(requestParameters['companyCode'])))
1088
+ .replace(`{${'dashboard_code'}}`, encodeURIComponent(String(requestParameters['dashboardCode']))),
1089
+ method: 'POST',
1090
+ headers: headerParameters,
1091
+ query: queryParameters,
1092
+ body: requestParameters['dashboardVersionPostRequest'],
1093
+ },
1094
+ initOverrides,
1095
+ );
1096
+
1097
+ return new runtime.JSONApiResponse(response);
1098
+ }
1099
+
1100
+ /**
1101
+ */
1102
+ async postVersion(
1103
+ companyCode: string,
1104
+ dashboardCode: string,
1105
+ dashboardVersionPostRequest: DashboardVersionPostRequest,
1106
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
1107
+ ): Promise<DashboardVersionResponse> {
1108
+ const response = await this.postVersionRaw(
1109
+ {
1110
+ companyCode: companyCode,
1111
+ dashboardCode: dashboardCode,
1112
+ dashboardVersionPostRequest: dashboardVersionPostRequest,
1113
+ },
1114
+ initOverrides,
1115
+ );
1116
+ return await response.value();
1117
+ }
1118
+
1119
+ /**
1120
+ */
1121
+ async reorderRaw(
1122
+ requestParameters: DashboardsApiReorderRequest,
1123
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
1124
+ ): Promise<runtime.ApiResponse<void>> {
1125
+ if (requestParameters['companyCode'] == null) {
1126
+ throw new runtime.RequiredError(
1127
+ 'companyCode',
1128
+ 'Required parameter "companyCode" was null or undefined when calling reorder().',
1129
+ );
1130
+ }
1131
+
1132
+ if (requestParameters['reportReorderRequest'] == null) {
1133
+ throw new runtime.RequiredError(
1134
+ 'reportReorderRequest',
1135
+ 'Required parameter "reportReorderRequest" was null or undefined when calling reorder().',
1136
+ );
1137
+ }
1138
+
1139
+ const queryParameters: any = {};
1140
+
1141
+ const headerParameters: runtime.HTTPHeaders = {};
1142
+
1143
+ headerParameters['Content-Type'] = 'application/json';
1144
+
1145
+ if (this.configuration && this.configuration.accessToken) {
1146
+ const token = this.configuration.accessToken;
1147
+ const tokenString = await token('bearerToken', ['internal']);
1148
+
1149
+ if (tokenString) {
1150
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
1151
+ }
1152
+ }
1153
+ const response = await this.request(
1154
+ {
1155
+ path: `/api/v1/c/{company_code}/dashboards/reorder`.replace(
1156
+ `{${'company_code'}}`,
1157
+ encodeURIComponent(String(requestParameters['companyCode'])),
1158
+ ),
1159
+ method: 'POST',
1160
+ headers: headerParameters,
1161
+ query: queryParameters,
1162
+ body: requestParameters['reportReorderRequest'],
1163
+ },
1164
+ initOverrides,
1165
+ );
1166
+
1167
+ return new runtime.VoidApiResponse(response);
1168
+ }
1169
+
1170
+ /**
1171
+ */
1172
+ async reorder(
1173
+ companyCode: string,
1174
+ reportReorderRequest: ReportReorderRequest,
1175
+ initOverrides?: RequestInit | runtime.InitOverrideFunction,
1176
+ ): Promise<void> {
1177
+ await this.reorderRaw({ companyCode: companyCode, reportReorderRequest: reportReorderRequest }, initOverrides);
1178
+ }
1179
+ }