@stack-spot/portal-network 1.0.0-betaadp.2 → 1.0.0-dev.1768422812092

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 (230) hide show
  1. package/CHANGELOG.md +633 -0
  2. package/dist/api/account.d.ts +413 -277
  3. package/dist/api/account.d.ts.map +1 -1
  4. package/dist/api/account.js +261 -176
  5. package/dist/api/account.js.map +1 -1
  6. package/dist/api/accountAssetManager.d.ts +309 -0
  7. package/dist/api/accountAssetManager.d.ts.map +1 -0
  8. package/dist/api/accountAssetManager.js +169 -0
  9. package/dist/api/accountAssetManager.js.map +1 -0
  10. package/dist/api/agent-tools.d.ts +243 -149
  11. package/dist/api/agent-tools.d.ts.map +1 -1
  12. package/dist/api/agent-tools.js +77 -5
  13. package/dist/api/agent-tools.js.map +1 -1
  14. package/dist/api/agent.d.ts +55 -55
  15. package/dist/api/agent.d.ts.map +1 -1
  16. package/dist/api/ai.d.ts +487 -98
  17. package/dist/api/ai.d.ts.map +1 -1
  18. package/dist/api/ai.js +427 -146
  19. package/dist/api/ai.js.map +1 -1
  20. package/dist/api/cloudPlatform.d.ts +374 -221
  21. package/dist/api/cloudPlatform.d.ts.map +1 -1
  22. package/dist/api/cloudPlatform.js +299 -93
  23. package/dist/api/cloudPlatform.js.map +1 -1
  24. package/dist/api/cloudPlatformHorizon.d.ts +178 -9
  25. package/dist/api/cloudPlatformHorizon.d.ts.map +1 -1
  26. package/dist/api/cloudPlatformHorizon.js +69 -1
  27. package/dist/api/cloudPlatformHorizon.js.map +1 -1
  28. package/dist/api/codeShift.d.ts +1125 -83
  29. package/dist/api/codeShift.d.ts.map +1 -1
  30. package/dist/api/codeShift.js +538 -16
  31. package/dist/api/codeShift.js.map +1 -1
  32. package/dist/api/dataIntegration.d.ts +291 -1
  33. package/dist/api/dataIntegration.d.ts.map +1 -1
  34. package/dist/api/dataIntegration.js +254 -0
  35. package/dist/api/dataIntegration.js.map +1 -1
  36. package/dist/api/discover.d.ts +380 -0
  37. package/dist/api/discover.d.ts.map +1 -0
  38. package/dist/api/discover.js +256 -0
  39. package/dist/api/discover.js.map +1 -0
  40. package/dist/api/edpBfa.d.ts +215 -0
  41. package/dist/api/edpBfa.d.ts.map +1 -0
  42. package/dist/api/edpBfa.js +87 -0
  43. package/dist/api/edpBfa.js.map +1 -0
  44. package/dist/api/genAiInference.d.ts +22 -2
  45. package/dist/api/genAiInference.d.ts.map +1 -1
  46. package/dist/api/genAiInference.js +22 -3
  47. package/dist/api/genAiInference.js.map +1 -1
  48. package/dist/api/workflows.d.ts +68 -5
  49. package/dist/api/workflows.d.ts.map +1 -1
  50. package/dist/api/workflows.js +16 -0
  51. package/dist/api/workflows.js.map +1 -1
  52. package/dist/api/workspaceManager.d.ts +16 -10
  53. package/dist/api/workspaceManager.d.ts.map +1 -1
  54. package/dist/api/workspaceManager.js +10 -0
  55. package/dist/api/workspaceManager.js.map +1 -1
  56. package/dist/api-addresses.d.ts +20 -18
  57. package/dist/api-addresses.d.ts.map +1 -1
  58. package/dist/api-addresses.js +81 -21
  59. package/dist/api-addresses.js.map +1 -1
  60. package/dist/apis-itau.json +241 -0
  61. package/dist/apis.json +18 -2
  62. package/dist/client/account-asset-manager.d.ts +112 -0
  63. package/dist/client/account-asset-manager.d.ts.map +1 -0
  64. package/dist/client/account-asset-manager.js +160 -0
  65. package/dist/client/account-asset-manager.js.map +1 -0
  66. package/dist/client/account.d.ts +265 -242
  67. package/dist/client/account.d.ts.map +1 -1
  68. package/dist/client/account.js +80 -34
  69. package/dist/client/account.js.map +1 -1
  70. package/dist/client/agent-tools.d.ts +166 -119
  71. package/dist/client/agent-tools.d.ts.map +1 -1
  72. package/dist/client/agent-tools.js +62 -11
  73. package/dist/client/agent-tools.js.map +1 -1
  74. package/dist/client/agent.d.ts +46 -46
  75. package/dist/client/agent.d.ts.map +1 -1
  76. package/dist/client/ai.d.ts +266 -79
  77. package/dist/client/ai.d.ts.map +1 -1
  78. package/dist/client/ai.js +262 -20
  79. package/dist/client/ai.js.map +1 -1
  80. package/dist/client/api-management.d.ts +10 -1
  81. package/dist/client/api-management.d.ts.map +1 -1
  82. package/dist/client/api-management.js +11 -2
  83. package/dist/client/api-management.js.map +1 -1
  84. package/dist/client/cloud-account.d.ts +13 -13
  85. package/dist/client/cloud-platform-horizon.d.ts +38 -19
  86. package/dist/client/cloud-platform-horizon.d.ts.map +1 -1
  87. package/dist/client/cloud-platform-horizon.js +19 -1
  88. package/dist/client/cloud-platform-horizon.js.map +1 -1
  89. package/dist/client/cloud-platform.d.ts +213 -46
  90. package/dist/client/cloud-platform.d.ts.map +1 -1
  91. package/dist/client/cloud-platform.js +168 -33
  92. package/dist/client/cloud-platform.js.map +1 -1
  93. package/dist/client/cloud-runtimes.d.ts +4 -4
  94. package/dist/client/cloud-services.d.ts +17 -17
  95. package/dist/client/cloud-services.d.ts.map +1 -1
  96. package/dist/client/code-shift.d.ts +535 -162
  97. package/dist/client/code-shift.d.ts.map +1 -1
  98. package/dist/client/code-shift.js +296 -7
  99. package/dist/client/code-shift.js.map +1 -1
  100. package/dist/client/content.d.ts +127 -132
  101. package/dist/client/content.d.ts.map +1 -1
  102. package/dist/client/data-integration.d.ts +92 -53
  103. package/dist/client/data-integration.d.ts.map +1 -1
  104. package/dist/client/data-integration.js +38 -2
  105. package/dist/client/data-integration.js.map +1 -1
  106. package/dist/client/discover.d.ts +84 -0
  107. package/dist/client/discover.d.ts.map +1 -0
  108. package/dist/client/discover.js +359 -0
  109. package/dist/client/discover.js.map +1 -0
  110. package/dist/client/edp-bfa.d.ts +16 -0
  111. package/dist/client/edp-bfa.d.ts.map +1 -0
  112. package/dist/client/edp-bfa.js +24 -0
  113. package/dist/client/edp-bfa.js.map +1 -0
  114. package/dist/client/event-bus.d.ts.map +1 -1
  115. package/dist/client/gen-ai-inference.d.ts +20 -20
  116. package/dist/client/insights.d.ts +7 -7
  117. package/dist/client/notification.d.ts +17 -10
  118. package/dist/client/notification.d.ts.map +1 -1
  119. package/dist/client/notification.js +10 -1
  120. package/dist/client/notification.js.map +1 -1
  121. package/dist/client/runtime-manager.d.ts +8 -8
  122. package/dist/client/secrets.d.ts.map +1 -1
  123. package/dist/client/secrets.js +1 -1
  124. package/dist/client/secrets.js.map +1 -1
  125. package/dist/client/types.d.ts +50 -7
  126. package/dist/client/types.d.ts.map +1 -1
  127. package/dist/client/workflow.d.ts +10 -10
  128. package/dist/client/workspace-ai.d.ts +53 -53
  129. package/dist/client/workspace-ai.d.ts.map +1 -1
  130. package/dist/client/workspace-ai.js +3 -7
  131. package/dist/client/workspace-ai.js.map +1 -1
  132. package/dist/client/workspace-manager.d.ts +115 -76
  133. package/dist/client/workspace-manager.d.ts.map +1 -1
  134. package/dist/client/workspace-manager.js +47 -2
  135. package/dist/client/workspace-manager.js.map +1 -1
  136. package/dist/client/workspace-search.d.ts +2 -2
  137. package/dist/client/workspace.d.ts +58 -105
  138. package/dist/client/workspace.d.ts.map +1 -1
  139. package/dist/error/DefaultAPIError.d.ts.map +1 -1
  140. package/dist/error/DefaultAPIError.js.map +1 -1
  141. package/dist/error/StackspotAPIError.d.ts +3 -4
  142. package/dist/error/StackspotAPIError.d.ts.map +1 -1
  143. package/dist/error/StackspotAPIError.js +3 -3
  144. package/dist/error/StackspotAPIError.js.map +1 -1
  145. package/dist/error/dictionary/accountAssetManager.d.ts +11 -0
  146. package/dist/error/dictionary/accountAssetManager.d.ts.map +1 -0
  147. package/dist/error/dictionary/accountAssetManager.js +11 -0
  148. package/dist/error/dictionary/accountAssetManager.js.map +1 -0
  149. package/dist/error/dictionary/cloud-platform.d.ts +76 -8
  150. package/dist/error/dictionary/cloud-platform.d.ts.map +1 -1
  151. package/dist/error/dictionary/cloud-platform.js +80 -12
  152. package/dist/error/dictionary/cloud-platform.js.map +1 -1
  153. package/dist/error/dictionary/workspace-ai.d.ts +9 -0
  154. package/dist/error/dictionary/workspace-ai.d.ts.map +1 -0
  155. package/dist/error/dictionary/workspace-ai.js +9 -0
  156. package/dist/error/dictionary/workspace-ai.js.map +1 -0
  157. package/dist/index.d.ts +6 -4
  158. package/dist/index.d.ts.map +1 -1
  159. package/dist/index.js +5 -3
  160. package/dist/index.js.map +1 -1
  161. package/dist/network/NetworkClient.d.ts +4 -2
  162. package/dist/network/NetworkClient.d.ts.map +1 -1
  163. package/dist/network/NetworkClient.js +16 -4
  164. package/dist/network/NetworkClient.js.map +1 -1
  165. package/dist/network/types.d.ts +2 -0
  166. package/dist/network/types.d.ts.map +1 -1
  167. package/dist/utils/StreamedJson.d.ts +3 -1
  168. package/dist/utils/StreamedJson.d.ts.map +1 -1
  169. package/dist/utils/StreamedJson.js +23 -3
  170. package/dist/utils/StreamedJson.js.map +1 -1
  171. package/package.dev.json +3 -0
  172. package/package.json +10 -9
  173. package/package.stg.json +3 -0
  174. package/readme.md +40 -1
  175. package/src/api/account.ts +701 -540
  176. package/src/api/accountAssetManager.ts +771 -0
  177. package/src/api/agent-tools.ts +332 -151
  178. package/src/api/ai.ts +891 -170
  179. package/src/api/cloudPlatform.ts +667 -298
  180. package/src/api/cloudPlatformHorizon.ts +412 -9
  181. package/src/api/codeShift.ts +2088 -97
  182. package/src/api/dataIntegration.ts +635 -1
  183. package/src/api/discover.ts +601 -0
  184. package/src/api/edpBfa.ts +472 -0
  185. package/src/api/genAiInference.ts +47 -4
  186. package/src/api/workflows.ts +100 -5
  187. package/src/api/workspaceManager.ts +25 -10
  188. package/src/api-addresses.ts +113 -38
  189. package/src/apis-itau.json +241 -0
  190. package/src/apis.json +18 -2
  191. package/src/client/account-asset-manager.ts +100 -0
  192. package/src/client/account.ts +71 -40
  193. package/src/client/agent-tools.ts +57 -17
  194. package/src/client/ai.ts +232 -20
  195. package/src/client/api-management.ts +7 -2
  196. package/src/client/cloud-platform-horizon.ts +12 -4
  197. package/src/client/cloud-platform.ts +101 -27
  198. package/src/client/code-shift.ts +196 -8
  199. package/src/client/data-integration.ts +28 -1
  200. package/src/client/discover.ts +319 -0
  201. package/src/client/edp-bfa.ts +24 -0
  202. package/src/client/notification.ts +6 -1
  203. package/src/client/secrets.ts +1 -1
  204. package/src/client/types.ts +55 -9
  205. package/src/client/workspace-ai.ts +19 -23
  206. package/src/client/workspace-manager.ts +31 -2
  207. package/src/error/DefaultAPIError.ts +5 -5
  208. package/src/error/StackspotAPIError.ts +4 -4
  209. package/src/error/dictionary/accountAssetManager.ts +12 -0
  210. package/src/error/dictionary/cloud-platform.ts +80 -12
  211. package/src/error/dictionary/workspace-ai.ts +10 -0
  212. package/src/index.ts +7 -4
  213. package/src/network/NetworkClient.ts +18 -6
  214. package/src/network/types.ts +3 -0
  215. package/src/utils/StreamedJson.tsx +19 -4
  216. package/dist/api/discovery.d.ts +0 -494
  217. package/dist/api/discovery.d.ts.map +0 -1
  218. package/dist/api/discovery.js +0 -205
  219. package/dist/api/discovery.js.map +0 -1
  220. package/dist/client/adp-mock.d.ts +0 -89
  221. package/dist/client/adp-mock.d.ts.map +0 -1
  222. package/dist/client/adp-mock.js +0 -246
  223. package/dist/client/adp-mock.js.map +0 -1
  224. package/dist/client/discovery.d.ts +0 -110
  225. package/dist/client/discovery.d.ts.map +0 -1
  226. package/dist/client/discovery.js +0 -133
  227. package/dist/client/discovery.js.map +0 -1
  228. package/src/api/discovery.ts +0 -729
  229. package/src/client/adp-mock.ts +0 -244
  230. package/src/client/discovery.ts +0 -73
@@ -0,0 +1,601 @@
1
+ /**
2
+ * OpenAPI definition
3
+ * v0
4
+ * DO NOT MODIFY - This file has been generated using oazapfts.
5
+ * See https://www.npmjs.com/package/oazapfts
6
+ */
7
+ import * as Oazapfts from "@oazapfts/runtime";
8
+ import * as QS from "@oazapfts/runtime/query";
9
+ export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
+ headers: {},
11
+ baseUrl: "https://discover-discover-core.dev.stackspot.com",
12
+ };
13
+ const oazapfts = Oazapfts.runtime(defaults);
14
+ export const servers = {
15
+ generatedServerUrl: "https://discover-discover-core.dev.stackspot.com"
16
+ };
17
+ export type GetOpportunityResponseHypothesisResponse = {
18
+ id: string;
19
+ title: string;
20
+ description: string;
21
+ };
22
+ export type GetOpportunityResponse = {
23
+ id: string;
24
+ title: string;
25
+ description: string;
26
+ createdBy: string;
27
+ createdAt?: string;
28
+ hypotheses: GetOpportunityResponseHypothesisResponse[];
29
+ updatedBy?: string;
30
+ updatedAt?: string;
31
+ chatId: string;
32
+ };
33
+ export type UpdateOpportunityRequest = {
34
+ title?: string;
35
+ description?: string;
36
+ };
37
+ export type UpdateOpportunityResponse = {
38
+ id: string;
39
+ title: string;
40
+ description: string;
41
+ createdBy: string;
42
+ createdAt?: string;
43
+ updatedBy?: string;
44
+ updatedAt?: string;
45
+ chatId: string;
46
+ };
47
+ export type GetHypothesisResponseDocumentResponse = {
48
+ id: string;
49
+ title: string;
50
+ description: string;
51
+ };
52
+ export type GetHypothesisResponse = {
53
+ id: string;
54
+ opportunityId: string;
55
+ title: string;
56
+ description: string;
57
+ documents: GetHypothesisResponseDocumentResponse[];
58
+ createdBy: string;
59
+ createdAt?: string;
60
+ updatedBy?: string;
61
+ updatedAt?: string;
62
+ chatId: string;
63
+ };
64
+ export type UpdateHypothesisRequest = {
65
+ title?: string;
66
+ description?: string;
67
+ };
68
+ export type UpdateHypothesisResponse = {
69
+ id: string;
70
+ opportunityId: string;
71
+ title: string;
72
+ description: string;
73
+ createdBy: string;
74
+ createdAt?: string;
75
+ updatedBy?: string;
76
+ updatedAt?: string;
77
+ chatId: string;
78
+ };
79
+ export type GetDocumentResponse = {
80
+ id: string;
81
+ hypothesisId: string;
82
+ title: string;
83
+ description: string;
84
+ createdBy: string;
85
+ createdAt?: string;
86
+ updatedBy?: string;
87
+ updatedAt?: string;
88
+ chatId: string;
89
+ };
90
+ export type UpdateDocumentRequest = {
91
+ title?: string;
92
+ description?: string;
93
+ content?: string;
94
+ };
95
+ export type UpdateDocumentResponse = {
96
+ id: string;
97
+ hypothesisId: string;
98
+ title: string;
99
+ description: string;
100
+ createdBy: string;
101
+ createdAt?: string;
102
+ updatedBy?: string;
103
+ updatedAt?: string;
104
+ chatId: string;
105
+ };
106
+ export type SortResponse = {
107
+ direction: string;
108
+ nullHandling: string;
109
+ ascending: boolean;
110
+ property: string;
111
+ ignoreCase: boolean;
112
+ };
113
+ export type PageableResponse = {
114
+ offset: number;
115
+ sort: SortResponse[];
116
+ paged: boolean;
117
+ pageSize: number;
118
+ pageNumber: number;
119
+ unpaged: boolean;
120
+ };
121
+ export type PageResponseGetOpportunityResponse = {
122
+ totalElements: number;
123
+ totalPages: number;
124
+ first: boolean;
125
+ last: boolean;
126
+ size: number;
127
+ content: GetOpportunityResponse[];
128
+ "number": number;
129
+ sort: SortResponse[];
130
+ numberOfElements: number;
131
+ pageable: PageableResponse;
132
+ empty: boolean;
133
+ };
134
+ export type CreateOpportunityRequest = {
135
+ title?: string;
136
+ description?: string;
137
+ chatId: string;
138
+ };
139
+ export type CreateOpportunityResponse = {
140
+ id: string;
141
+ title: string;
142
+ description: string;
143
+ createdBy: string;
144
+ createdAt?: string;
145
+ updatedBy?: string;
146
+ updatedAt?: string;
147
+ chatId: string;
148
+ };
149
+ export type InsightResponseInsightData = {
150
+ id: string;
151
+ title: string;
152
+ summary: string;
153
+ badge: string;
154
+ chartUrl?: string;
155
+ };
156
+ export type InsightResponse = {
157
+ insights: InsightResponseInsightData[];
158
+ generatedAt: string;
159
+ };
160
+ export type CreateHypothesisRequest = {
161
+ opportunityId?: string;
162
+ title?: string;
163
+ description?: string;
164
+ chatId: string;
165
+ };
166
+ export type CreateHypothesisResponse = {
167
+ id: string;
168
+ opportunityId: string;
169
+ title: string;
170
+ description: string;
171
+ createdBy: string;
172
+ createdAt?: string;
173
+ updatedBy?: string;
174
+ updatedAt?: string;
175
+ chatId: string;
176
+ };
177
+ export type CreateDocumentRequest = {
178
+ hypothesisId?: string;
179
+ title?: string;
180
+ description?: string;
181
+ content?: string;
182
+ chatId: string;
183
+ };
184
+ export type CreateDocumentResponse = {
185
+ id: string;
186
+ hypothesisId: string;
187
+ title: string;
188
+ description: string;
189
+ createdBy: string;
190
+ createdAt?: string;
191
+ updatedBy?: string;
192
+ updatedAt?: string;
193
+ chatId: string;
194
+ };
195
+ export type AiChatRequest = {
196
+ prompt: string;
197
+ conversationId: string;
198
+ };
199
+ export type SseEmitter = {
200
+ timeout?: number;
201
+ };
202
+ export type AdminAgentCreateRequest = {
203
+ agentId: string;
204
+ name: string;
205
+ description: string;
206
+ schema: string;
207
+ };
208
+ export type AdminAgentResponse = {
209
+ id: string;
210
+ name: string;
211
+ description: string;
212
+ active: boolean;
213
+ createdAt: string;
214
+ updatedAt?: string;
215
+ };
216
+ export type GetInsightResponse = {
217
+ id: string;
218
+ title: string;
219
+ summary: string;
220
+ content: string;
221
+ chartUrl?: string;
222
+ };
223
+ export type GetArtifactResponse = {
224
+ "type": "OPPORTUNITY" | "HYPOTHESIS" | "DOCUMENT";
225
+ id: string;
226
+ title: string;
227
+ description: string;
228
+ };
229
+ export type AdminHelloResponse = {
230
+ message: string;
231
+ };
232
+ /**
233
+ * Get specific Opportunity
234
+ */
235
+ export function getById({ opportunityId }: {
236
+ opportunityId: string;
237
+ }, opts?: Oazapfts.RequestOpts) {
238
+ return oazapfts.ok(oazapfts.fetchJson<{
239
+ status: 200;
240
+ data: GetOpportunityResponse;
241
+ }>(`/v2/opportunities/${encodeURIComponent(opportunityId)}`, {
242
+ ...opts
243
+ }));
244
+ }
245
+ /**
246
+ * Update specific Opportunity
247
+ */
248
+ export function updateById({ opportunityId, updateOpportunityRequest }: {
249
+ opportunityId: string;
250
+ updateOpportunityRequest: UpdateOpportunityRequest;
251
+ }, opts?: Oazapfts.RequestOpts) {
252
+ return oazapfts.ok(oazapfts.fetchJson<{
253
+ status: 200;
254
+ data: UpdateOpportunityResponse;
255
+ }>(`/v2/opportunities/${encodeURIComponent(opportunityId)}`, oazapfts.json({
256
+ ...opts,
257
+ method: "PUT",
258
+ body: updateOpportunityRequest
259
+ })));
260
+ }
261
+ /**
262
+ * Delete specific Opportunity
263
+ */
264
+ export function deleteById({ opportunityId }: {
265
+ opportunityId: string;
266
+ }, opts?: Oazapfts.RequestOpts) {
267
+ return oazapfts.ok(oazapfts.fetchText(`/v2/opportunities/${encodeURIComponent(opportunityId)}`, {
268
+ ...opts,
269
+ method: "DELETE"
270
+ }));
271
+ }
272
+ /**
273
+ * Get specific Hypothesis
274
+ */
275
+ export function getById1({ hypothesisId }: {
276
+ hypothesisId: string;
277
+ }, opts?: Oazapfts.RequestOpts) {
278
+ return oazapfts.ok(oazapfts.fetchJson<{
279
+ status: 200;
280
+ data: GetHypothesisResponse;
281
+ }>(`/v2/hypotheses/${encodeURIComponent(hypothesisId)}`, {
282
+ ...opts
283
+ }));
284
+ }
285
+ /**
286
+ * Update specific Hypothesis
287
+ */
288
+ export function updateById1({ hypothesisId, updateHypothesisRequest }: {
289
+ hypothesisId: string;
290
+ updateHypothesisRequest: UpdateHypothesisRequest;
291
+ }, opts?: Oazapfts.RequestOpts) {
292
+ return oazapfts.ok(oazapfts.fetchJson<{
293
+ status: 200;
294
+ data: UpdateHypothesisResponse;
295
+ }>(`/v2/hypotheses/${encodeURIComponent(hypothesisId)}`, oazapfts.json({
296
+ ...opts,
297
+ method: "PUT",
298
+ body: updateHypothesisRequest
299
+ })));
300
+ }
301
+ /**
302
+ * Delete specific Hypothesis
303
+ */
304
+ export function deleteById1({ hypothesisId }: {
305
+ hypothesisId: string;
306
+ }, opts?: Oazapfts.RequestOpts) {
307
+ return oazapfts.ok(oazapfts.fetchText(`/v2/hypotheses/${encodeURIComponent(hypothesisId)}`, {
308
+ ...opts,
309
+ method: "DELETE"
310
+ }));
311
+ }
312
+ /**
313
+ * Get specific Document
314
+ */
315
+ export function getById2({ documentId }: {
316
+ documentId: string;
317
+ }, opts?: Oazapfts.RequestOpts) {
318
+ return oazapfts.ok(oazapfts.fetchJson<{
319
+ status: 200;
320
+ data: GetDocumentResponse;
321
+ }>(`/v2/documents/${encodeURIComponent(documentId)}`, {
322
+ ...opts
323
+ }));
324
+ }
325
+ /**
326
+ * Update specific Document
327
+ */
328
+ export function updateById2({ documentId, updateDocumentRequest }: {
329
+ documentId: string;
330
+ updateDocumentRequest: UpdateDocumentRequest;
331
+ }, opts?: Oazapfts.RequestOpts) {
332
+ return oazapfts.ok(oazapfts.fetchJson<{
333
+ status: 200;
334
+ data: UpdateDocumentResponse;
335
+ }>(`/v2/documents/${encodeURIComponent(documentId)}`, oazapfts.json({
336
+ ...opts,
337
+ method: "PUT",
338
+ body: updateDocumentRequest
339
+ })));
340
+ }
341
+ /**
342
+ * Delete specific Document
343
+ */
344
+ export function deleteById2({ documentId }: {
345
+ documentId: string;
346
+ }, opts?: Oazapfts.RequestOpts) {
347
+ return oazapfts.ok(oazapfts.fetchText(`/v2/documents/${encodeURIComponent(documentId)}`, {
348
+ ...opts,
349
+ method: "DELETE"
350
+ }));
351
+ }
352
+ /**
353
+ * Get all Opportunities
354
+ */
355
+ export function getAll({ filter, page, size, sort, direction }: {
356
+ filter?: string;
357
+ page?: number;
358
+ size?: number;
359
+ sort?: string;
360
+ direction?: string;
361
+ }, opts?: Oazapfts.RequestOpts) {
362
+ return oazapfts.ok(oazapfts.fetchJson<{
363
+ status: 200;
364
+ data: PageResponseGetOpportunityResponse;
365
+ }>(`/v2/opportunities${QS.query(QS.explode({
366
+ filter,
367
+ page,
368
+ size,
369
+ sort,
370
+ direction
371
+ }))}`, {
372
+ ...opts
373
+ }));
374
+ }
375
+ /**
376
+ * Create new Opportunity
377
+ */
378
+ export function create({ createOpportunityRequest }: {
379
+ createOpportunityRequest: CreateOpportunityRequest;
380
+ }, opts?: Oazapfts.RequestOpts) {
381
+ return oazapfts.ok(oazapfts.fetchJson<{
382
+ status: 200;
383
+ data: CreateOpportunityResponse;
384
+ }>("/v2/opportunities", oazapfts.json({
385
+ ...opts,
386
+ method: "POST",
387
+ body: createOpportunityRequest
388
+ })));
389
+ }
390
+ /**
391
+ * Fetch Insights
392
+ */
393
+ export function fetchInsights(opts?: Oazapfts.RequestOpts) {
394
+ return oazapfts.ok(oazapfts.fetchJson<{
395
+ status: 200;
396
+ data: InsightResponse;
397
+ }>("/v2/insights", {
398
+ ...opts,
399
+ method: "POST"
400
+ }));
401
+ }
402
+ /**
403
+ * Refresh Insights
404
+ */
405
+ export function refreshInsights(opts?: Oazapfts.RequestOpts) {
406
+ return oazapfts.ok(oazapfts.fetchJson<{
407
+ status: 200;
408
+ data: InsightResponse;
409
+ }>("/v2/insights/refresh", {
410
+ ...opts,
411
+ method: "POST"
412
+ }));
413
+ }
414
+ /**
415
+ * Get all Hypotheses
416
+ */
417
+ export function getAll1({ opportunityId }: {
418
+ opportunityId: string;
419
+ }, opts?: Oazapfts.RequestOpts) {
420
+ return oazapfts.ok(oazapfts.fetchJson<{
421
+ status: 200;
422
+ data: GetHypothesisResponse[];
423
+ }>(`/v2/hypotheses${QS.query(QS.explode({
424
+ opportunityId
425
+ }))}`, {
426
+ ...opts
427
+ }));
428
+ }
429
+ /**
430
+ * Create new Hypothesis
431
+ */
432
+ export function create1({ createHypothesisRequest }: {
433
+ createHypothesisRequest: CreateHypothesisRequest;
434
+ }, opts?: Oazapfts.RequestOpts) {
435
+ return oazapfts.ok(oazapfts.fetchJson<{
436
+ status: 200;
437
+ data: CreateHypothesisResponse;
438
+ }>("/v2/hypotheses", oazapfts.json({
439
+ ...opts,
440
+ method: "POST",
441
+ body: createHypothesisRequest
442
+ })));
443
+ }
444
+ /**
445
+ * Get all Documents by Hypothesis
446
+ */
447
+ export function getAllByHypothesis({ hypothesisId }: {
448
+ hypothesisId: string;
449
+ }, opts?: Oazapfts.RequestOpts) {
450
+ return oazapfts.ok(oazapfts.fetchJson<{
451
+ status: 200;
452
+ data: GetDocumentResponse[];
453
+ }>(`/v2/documents${QS.query(QS.explode({
454
+ hypothesisId
455
+ }))}`, {
456
+ ...opts
457
+ }));
458
+ }
459
+ /**
460
+ * Create Document
461
+ */
462
+ export function create2({ createDocumentRequest }: {
463
+ createDocumentRequest: CreateDocumentRequest;
464
+ }, opts?: Oazapfts.RequestOpts) {
465
+ return oazapfts.ok(oazapfts.fetchJson<{
466
+ status: 200;
467
+ data: CreateDocumentResponse;
468
+ }>("/v2/documents", oazapfts.json({
469
+ ...opts,
470
+ method: "POST",
471
+ body: createDocumentRequest
472
+ })));
473
+ }
474
+ /**
475
+ * Send a message to AI chat
476
+ */
477
+ export function chat({ aiChatRequest }: {
478
+ aiChatRequest: AiChatRequest;
479
+ }, opts?: Oazapfts.RequestOpts) {
480
+ return oazapfts.ok(oazapfts.fetchJson<{
481
+ status: 200;
482
+ data: SseEmitter;
483
+ }>("/v2/ai/chat", oazapfts.json({
484
+ ...opts,
485
+ method: "POST",
486
+ body: aiChatRequest
487
+ })));
488
+ }
489
+ export function createAgent({ adminAgentCreateRequest }: {
490
+ adminAgentCreateRequest: AdminAgentCreateRequest;
491
+ }, opts?: Oazapfts.RequestOpts) {
492
+ return oazapfts.ok(oazapfts.fetchJson<{
493
+ status: 200;
494
+ data: AdminAgentResponse;
495
+ }>("/v2/admin/agents", oazapfts.json({
496
+ ...opts,
497
+ method: "POST",
498
+ body: adminAgentCreateRequest
499
+ })));
500
+ }
501
+ export function deactivateAgent({ schema, agentId }: {
502
+ schema: string;
503
+ agentId: string;
504
+ }, opts?: Oazapfts.RequestOpts) {
505
+ return oazapfts.ok(oazapfts.fetchText(`/v2/admin/agents/${encodeURIComponent(schema)}/${encodeURIComponent(agentId)}/deactivate`, {
506
+ ...opts,
507
+ method: "PATCH"
508
+ }));
509
+ }
510
+ export function activateAgent({ schema, agentId }: {
511
+ schema: string;
512
+ agentId: string;
513
+ }, opts?: Oazapfts.RequestOpts) {
514
+ return oazapfts.ok(oazapfts.fetchJson<{
515
+ status: 200;
516
+ data: AdminAgentResponse;
517
+ }>(`/v2/admin/agents/${encodeURIComponent(schema)}/${encodeURIComponent(agentId)}/activate`, {
518
+ ...opts,
519
+ method: "PATCH"
520
+ }));
521
+ }
522
+ export function getAndCacheData({ key }: {
523
+ key: string;
524
+ }, opts?: Oazapfts.RequestOpts) {
525
+ return oazapfts.ok(oazapfts.fetchJson<{
526
+ status: 200;
527
+ data: {
528
+ [key: string]: object;
529
+ };
530
+ }>(`/v2/redis/hello-world-persist-redis/${encodeURIComponent(key)}`, {
531
+ ...opts
532
+ }));
533
+ }
534
+ /**
535
+ * Get specific Insight
536
+ */
537
+ export function getInsightById({ insightId }: {
538
+ insightId: string;
539
+ }, opts?: Oazapfts.RequestOpts) {
540
+ return oazapfts.ok(oazapfts.fetchJson<{
541
+ status: 200;
542
+ data: GetInsightResponse;
543
+ }>(`/v2/insights/${encodeURIComponent(insightId)}`, {
544
+ ...opts
545
+ }));
546
+ }
547
+ /**
548
+ * Get specific Document content
549
+ */
550
+ export function getContentById({ documentId }: {
551
+ documentId: string;
552
+ }, opts?: Oazapfts.RequestOpts) {
553
+ return oazapfts.ok(oazapfts.fetchJson<{
554
+ status: 200;
555
+ data: string;
556
+ }>(`/v2/documents/${encodeURIComponent(documentId)}/content`, {
557
+ ...opts
558
+ }));
559
+ }
560
+ /**
561
+ * Get chat artifacts
562
+ */
563
+ export function getAll2({ chatId }: {
564
+ chatId: string;
565
+ }, opts?: Oazapfts.RequestOpts) {
566
+ return oazapfts.ok(oazapfts.fetchJson<{
567
+ status: 200;
568
+ data: GetArtifactResponse[];
569
+ }>(`/v2/artifacts${QS.query(QS.explode({
570
+ chatId
571
+ }))}`, {
572
+ ...opts
573
+ }));
574
+ }
575
+ export function hello(opts?: Oazapfts.RequestOpts) {
576
+ return oazapfts.ok(oazapfts.fetchJson<{
577
+ status: 200;
578
+ data: AdminHelloResponse;
579
+ }>("/v2/admin/hello", {
580
+ ...opts
581
+ }));
582
+ }
583
+ export function listAgents({ schema }: {
584
+ schema: string;
585
+ }, opts?: Oazapfts.RequestOpts) {
586
+ return oazapfts.ok(oazapfts.fetchJson<{
587
+ status: 200;
588
+ data: AdminAgentResponse[];
589
+ }>(`/v2/admin/agents/${encodeURIComponent(schema)}`, {
590
+ ...opts
591
+ }));
592
+ }
593
+ export function deleteAgent({ schema, agentId }: {
594
+ schema: string;
595
+ agentId: string;
596
+ }, opts?: Oazapfts.RequestOpts) {
597
+ return oazapfts.ok(oazapfts.fetchText(`/v2/admin/agents/${encodeURIComponent(schema)}/${encodeURIComponent(agentId)}`, {
598
+ ...opts,
599
+ method: "DELETE"
600
+ }));
601
+ }