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