@stack-spot/portal-network 0.184.0 → 0.185.0-beta.1

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 (142) hide show
  1. package/CHANGELOG.md +2444 -2412
  2. package/dist/api/account.js +1 -1
  3. package/dist/api/agent-tools.js +1 -1
  4. package/dist/api/agent.js +1 -1
  5. package/dist/api/ai.js +1 -1
  6. package/dist/api/apiManagement.js +1 -1
  7. package/dist/api/apiRuntime.js +1 -1
  8. package/dist/api/cloudAccount.js +1 -1
  9. package/dist/api/cloudPlatform.js +1 -1
  10. package/dist/api/cloudPlatformHorizon.js +1 -1
  11. package/dist/api/cloudRuntimes.js +1 -1
  12. package/dist/api/cloudServices.js +1 -1
  13. package/dist/api/codeShift.d.ts +63 -4
  14. package/dist/api/codeShift.d.ts.map +1 -1
  15. package/dist/api/codeShift.js +14 -1
  16. package/dist/api/codeShift.js.map +1 -1
  17. package/dist/api/content.js +1 -1
  18. package/dist/api/dataIntegration.js +1 -1
  19. package/dist/api/discover.js +1 -1
  20. package/dist/api/genAiInference.js +1 -1
  21. package/dist/api/insights.js +1 -1
  22. package/dist/api/notification.js +1 -1
  23. package/dist/api/secrets.js +1 -1
  24. package/dist/api/serviceCatalog.js +1 -1
  25. package/dist/api/workspace-ai.js +1 -1
  26. package/dist/api/workspace.js +1 -1
  27. package/dist/api/workspaceManager.js +1 -1
  28. package/dist/api/workspaceSearchEngine.js +1 -1
  29. package/dist/client/ai.d.ts.map +1 -1
  30. package/dist/client/ai.js +84 -14
  31. package/dist/client/ai.js.map +1 -1
  32. package/dist/client/code-shift.d.ts +30 -0
  33. package/dist/client/code-shift.d.ts.map +1 -1
  34. package/dist/client/code-shift.js +37 -1
  35. package/dist/client/code-shift.js.map +1 -1
  36. package/dist/client/types.d.ts +26 -6
  37. package/dist/client/types.d.ts.map +1 -1
  38. package/package.json +7 -7
  39. package/readme.md +1 -1
  40. package/scripts/generate-apis.ts +134 -134
  41. package/src/api/account.ts +8368 -8367
  42. package/src/api/agent-tools.ts +2172 -2169
  43. package/src/api/agent.ts +1085 -1083
  44. package/src/api/ai.ts +3388 -3388
  45. package/src/api/apiManagement.ts +570 -570
  46. package/src/api/apiRuntime.ts +2103 -2103
  47. package/src/api/cloudAccount.ts +1239 -1239
  48. package/src/api/cloudPlatform.ts +927 -927
  49. package/src/api/cloudPlatformHorizon.ts +2655 -2655
  50. package/src/api/cloudRuntimes.ts +2043 -2043
  51. package/src/api/cloudServices.ts +1445 -1445
  52. package/src/api/codeShift.ts +3567 -3481
  53. package/src/api/content.ts +9785 -9785
  54. package/src/api/dataIntegration.ts +1657 -1657
  55. package/src/api/discover.ts +435 -435
  56. package/src/api/eventBus.ts +171 -171
  57. package/src/api/genAiInference.ts +603 -603
  58. package/src/api/insights.ts +310 -310
  59. package/src/api/notification.ts +336 -334
  60. package/src/api/secrets.ts +342 -342
  61. package/src/api/serviceCatalog.ts +2908 -2908
  62. package/src/api/workflows.ts +1669 -1669
  63. package/src/api/workspace-ai.ts +677 -677
  64. package/src/api/workspace.ts +5889 -5889
  65. package/src/api/workspaceManager.ts +2951 -2951
  66. package/src/api/workspaceSearchEngine.ts +153 -153
  67. package/src/api-addresses.ts +120 -120
  68. package/src/apis-itau.json +225 -225
  69. package/src/apis.json +225 -225
  70. package/src/client/account.ts +902 -902
  71. package/src/client/agent-tools.ts +210 -210
  72. package/src/client/agent.ts +81 -81
  73. package/src/client/ai.ts +469 -395
  74. package/src/client/api-management.ts +40 -40
  75. package/src/client/cloud-account.ts +70 -70
  76. package/src/client/cloud-platform-horizon.ts +113 -113
  77. package/src/client/cloud-platform.ts +163 -163
  78. package/src/client/cloud-runtimes.ts +129 -129
  79. package/src/client/cloud-services.ts +94 -94
  80. package/src/client/code-shift.ts +371 -349
  81. package/src/client/content.ts +538 -538
  82. package/src/client/data-integration.ts +191 -191
  83. package/src/client/discover.ts +89 -89
  84. package/src/client/event-bus.ts +84 -84
  85. package/src/client/gen-ai-inference.ts +65 -65
  86. package/src/client/insights.ts +28 -28
  87. package/src/client/notification.ts +32 -32
  88. package/src/client/runtime-manager.ts +76 -76
  89. package/src/client/secrets.ts +60 -60
  90. package/src/client/types.ts +398 -377
  91. package/src/client/workflow.ts +83 -83
  92. package/src/client/workspace-ai.ts +191 -191
  93. package/src/client/workspace-manager.ts +564 -564
  94. package/src/client/workspace-search.ts +39 -39
  95. package/src/client/workspace.ts +480 -480
  96. package/src/error/DefaultAPIError.ts +151 -151
  97. package/src/error/FileUploadError.ts +18 -18
  98. package/src/error/IgnoredErrorCodes.ts +3 -3
  99. package/src/error/StackspotAPIError.ts +101 -101
  100. package/src/error/StreamCanceledError.ts +10 -10
  101. package/src/error/StreamError.ts +7 -7
  102. package/src/error/StreamJsonError.ts +10 -10
  103. package/src/error/dictionary/account.ts +58 -58
  104. package/src/error/dictionary/action-details.ts +20 -20
  105. package/src/error/dictionary/action.ts +211 -211
  106. package/src/error/dictionary/agent-tools.ts +75 -75
  107. package/src/error/dictionary/ai-inference.ts +28 -28
  108. package/src/error/dictionary/base.ts +22 -22
  109. package/src/error/dictionary/cloud-platform.ts +82 -82
  110. package/src/error/dictionary/cnt-fields.ts +14 -14
  111. package/src/error/dictionary/cnt.ts +103 -103
  112. package/src/error/dictionary/code-shift.ts +12 -12
  113. package/src/error/dictionary/rte.ts +24 -24
  114. package/src/error/dictionary/rtm.ts +10 -10
  115. package/src/error/dictionary/secrets.ts +14 -14
  116. package/src/error/dictionary/workspace-ai.ts +10 -10
  117. package/src/error/dictionary/workspace-details.ts +15 -15
  118. package/src/error/dictionary/workspace-fields.ts +10 -10
  119. package/src/error/dictionary/workspace.ts +209 -209
  120. package/src/error/types.ts +21 -21
  121. package/src/index.ts +43 -43
  122. package/src/network/AutoInfiniteQuery.ts +115 -115
  123. package/src/network/AutoMutation.ts +27 -27
  124. package/src/network/AutoOperation.ts +73 -73
  125. package/src/network/AutoQuery.ts +75 -75
  126. package/src/network/ManualInfiniteQuery.ts +95 -95
  127. package/src/network/ManualMutation.ts +40 -40
  128. package/src/network/ManualOperation.ts +52 -52
  129. package/src/network/ManualQuery.ts +82 -82
  130. package/src/network/NetworkClient.ts +167 -167
  131. package/src/network/ReactQueryNetworkClient.ts +312 -312
  132. package/src/network/react-query-client.ts +14 -14
  133. package/src/network/types.ts +294 -294
  134. package/src/types.ts +1 -1
  135. package/src/utils/StreamedArray.tsx +146 -146
  136. package/src/utils/StreamedJson.tsx +166 -166
  137. package/src/utils/remove-authorization-param.ts +6 -6
  138. package/src/utils/string.ts +19 -19
  139. package/src/utils/use-extended-list.ts +80 -80
  140. package/src/utils/use-streamed-array.ts +17 -17
  141. package/tsconfig.build.json +4 -4
  142. package/tsconfig.json +10 -10
@@ -1,435 +1,435 @@
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.stg.stackspot.com",
12
- };
13
- const oazapfts = Oazapfts.runtime(defaults);
14
- export const servers = {
15
- generatedServerUrl: "https://discover-discover-core.stg.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 CreateHypothesisRequest = {
150
- opportunityId?: string;
151
- title?: string;
152
- description?: string;
153
- chatId?: string;
154
- };
155
- export type CreateHypothesisResponse = {
156
- id: string;
157
- opportunityId: string;
158
- title: string;
159
- description: string;
160
- createdBy: string;
161
- createdAt?: string;
162
- updatedBy?: string;
163
- updatedAt?: string;
164
- chatId?: string;
165
- };
166
- export type CreateDocumentRequest = {
167
- hypothesisId?: string;
168
- title?: string;
169
- description?: string;
170
- content?: string;
171
- chatId?: string;
172
- };
173
- export type CreateDocumentResponse = {
174
- id: string;
175
- hypothesisId: string;
176
- title: string;
177
- description: string;
178
- createdBy: string;
179
- createdAt?: string;
180
- updatedBy?: string;
181
- updatedAt?: string;
182
- chatId?: string;
183
- };
184
- export type GetArtifactResponse = {
185
- "type": "OPPORTUNITY" | "HYPOTHESIS" | "DOCUMENT";
186
- id: string;
187
- title: string;
188
- description: string;
189
- };
190
- /**
191
- * Get specific Opportunity
192
- */
193
- export function getById({ opportunityId }: {
194
- opportunityId: string;
195
- }, opts?: Oazapfts.RequestOpts) {
196
- return oazapfts.ok(oazapfts.fetchJson<{
197
- status: 200;
198
- data: GetOpportunityResponse;
199
- }>(`/v2/opportunities/${encodeURIComponent(opportunityId)}`, {
200
- ...opts
201
- }));
202
- }
203
- /**
204
- * Update specific Opportunity
205
- */
206
- export function updateById({ opportunityId, updateOpportunityRequest }: {
207
- opportunityId: string;
208
- updateOpportunityRequest: UpdateOpportunityRequest;
209
- }, opts?: Oazapfts.RequestOpts) {
210
- return oazapfts.ok(oazapfts.fetchJson<{
211
- status: 200;
212
- data: UpdateOpportunityResponse;
213
- }>(`/v2/opportunities/${encodeURIComponent(opportunityId)}`, oazapfts.json({
214
- ...opts,
215
- method: "PUT",
216
- body: updateOpportunityRequest
217
- })));
218
- }
219
- /**
220
- * Delete specific Opportunity
221
- */
222
- export function deleteById({ opportunityId }: {
223
- opportunityId: string;
224
- }, opts?: Oazapfts.RequestOpts) {
225
- return oazapfts.ok(oazapfts.fetchText(`/v2/opportunities/${encodeURIComponent(opportunityId)}`, {
226
- ...opts,
227
- method: "DELETE"
228
- }));
229
- }
230
- /**
231
- * Get specific Hypothesis
232
- */
233
- export function getById1({ hypothesisId }: {
234
- hypothesisId: string;
235
- }, opts?: Oazapfts.RequestOpts) {
236
- return oazapfts.ok(oazapfts.fetchJson<{
237
- status: 200;
238
- data: GetHypothesisResponse;
239
- }>(`/v2/hypotheses/${encodeURIComponent(hypothesisId)}`, {
240
- ...opts
241
- }));
242
- }
243
- /**
244
- * Update specific Hypothesis
245
- */
246
- export function updateById1({ hypothesisId, updateHypothesisRequest }: {
247
- hypothesisId: string;
248
- updateHypothesisRequest: UpdateHypothesisRequest;
249
- }, opts?: Oazapfts.RequestOpts) {
250
- return oazapfts.ok(oazapfts.fetchJson<{
251
- status: 200;
252
- data: UpdateHypothesisResponse;
253
- }>(`/v2/hypotheses/${encodeURIComponent(hypothesisId)}`, oazapfts.json({
254
- ...opts,
255
- method: "PUT",
256
- body: updateHypothesisRequest
257
- })));
258
- }
259
- /**
260
- * Delete specific Hypothesis
261
- */
262
- export function deleteById1({ hypothesisId }: {
263
- hypothesisId: string;
264
- }, opts?: Oazapfts.RequestOpts) {
265
- return oazapfts.ok(oazapfts.fetchText(`/v2/hypotheses/${encodeURIComponent(hypothesisId)}`, {
266
- ...opts,
267
- method: "DELETE"
268
- }));
269
- }
270
- /**
271
- * Get specific Document
272
- */
273
- export function getById2({ documentId }: {
274
- documentId: string;
275
- }, opts?: Oazapfts.RequestOpts) {
276
- return oazapfts.ok(oazapfts.fetchJson<{
277
- status: 200;
278
- data: GetDocumentResponse;
279
- }>(`/v2/documents/${encodeURIComponent(documentId)}`, {
280
- ...opts
281
- }));
282
- }
283
- /**
284
- * Update specific Document
285
- */
286
- export function updateById2({ documentId, updateDocumentRequest }: {
287
- documentId: string;
288
- updateDocumentRequest: UpdateDocumentRequest;
289
- }, opts?: Oazapfts.RequestOpts) {
290
- return oazapfts.ok(oazapfts.fetchJson<{
291
- status: 200;
292
- data: UpdateDocumentResponse;
293
- }>(`/v2/documents/${encodeURIComponent(documentId)}`, oazapfts.json({
294
- ...opts,
295
- method: "PUT",
296
- body: updateDocumentRequest
297
- })));
298
- }
299
- /**
300
- * Delete specific Document
301
- */
302
- export function deleteById2({ documentId }: {
303
- documentId: string;
304
- }, opts?: Oazapfts.RequestOpts) {
305
- return oazapfts.ok(oazapfts.fetchText(`/v2/documents/${encodeURIComponent(documentId)}`, {
306
- ...opts,
307
- method: "DELETE"
308
- }));
309
- }
310
- /**
311
- * Get all Opportunities
312
- */
313
- export function getAll({ filter, page, size, sort, direction }: {
314
- filter?: string;
315
- page?: number;
316
- size?: number;
317
- sort?: string;
318
- direction?: string;
319
- }, opts?: Oazapfts.RequestOpts) {
320
- return oazapfts.ok(oazapfts.fetchJson<{
321
- status: 200;
322
- data: PageResponseGetOpportunityResponse;
323
- }>(`/v2/opportunities${QS.query(QS.explode({
324
- filter,
325
- page,
326
- size,
327
- sort,
328
- direction
329
- }))}`, {
330
- ...opts
331
- }));
332
- }
333
- /**
334
- * Create new Opportunity
335
- */
336
- export function create({ createOpportunityRequest }: {
337
- createOpportunityRequest: CreateOpportunityRequest;
338
- }, opts?: Oazapfts.RequestOpts) {
339
- return oazapfts.ok(oazapfts.fetchJson<{
340
- status: 200;
341
- data: CreateOpportunityResponse;
342
- }>("/v2/opportunities", oazapfts.json({
343
- ...opts,
344
- method: "POST",
345
- body: createOpportunityRequest
346
- })));
347
- }
348
- /**
349
- * Get all Hypotheses
350
- */
351
- export function getAll1({ opportunityId }: {
352
- opportunityId: string;
353
- }, opts?: Oazapfts.RequestOpts) {
354
- return oazapfts.ok(oazapfts.fetchJson<{
355
- status: 200;
356
- data: GetHypothesisResponse[];
357
- }>(`/v2/hypotheses${QS.query(QS.explode({
358
- opportunityId
359
- }))}`, {
360
- ...opts
361
- }));
362
- }
363
- /**
364
- * Create new Hypothesis
365
- */
366
- export function create1({ createHypothesisRequest }: {
367
- createHypothesisRequest: CreateHypothesisRequest;
368
- }, opts?: Oazapfts.RequestOpts) {
369
- return oazapfts.ok(oazapfts.fetchJson<{
370
- status: 200;
371
- data: CreateHypothesisResponse;
372
- }>("/v2/hypotheses", oazapfts.json({
373
- ...opts,
374
- method: "POST",
375
- body: createHypothesisRequest
376
- })));
377
- }
378
- /**
379
- * Get all Documents by Hypothesis
380
- */
381
- export function getAllByHypothesis({ hypothesisId }: {
382
- hypothesisId: string;
383
- }, opts?: Oazapfts.RequestOpts) {
384
- return oazapfts.ok(oazapfts.fetchJson<{
385
- status: 200;
386
- data: GetDocumentResponse[];
387
- }>(`/v2/documents${QS.query(QS.explode({
388
- hypothesisId
389
- }))}`, {
390
- ...opts
391
- }));
392
- }
393
- /**
394
- * Create Document
395
- */
396
- export function create2({ createDocumentRequest }: {
397
- createDocumentRequest: CreateDocumentRequest;
398
- }, opts?: Oazapfts.RequestOpts) {
399
- return oazapfts.ok(oazapfts.fetchJson<{
400
- status: 200;
401
- data: CreateDocumentResponse;
402
- }>("/v2/documents", oazapfts.json({
403
- ...opts,
404
- method: "POST",
405
- body: createDocumentRequest
406
- })));
407
- }
408
- /**
409
- * Get specific Document content
410
- */
411
- export function getContentById({ documentId }: {
412
- documentId: string;
413
- }, opts?: Oazapfts.RequestOpts) {
414
- return oazapfts.ok(oazapfts.fetchJson<{
415
- status: 200;
416
- data: string;
417
- }>(`/v2/documents/${encodeURIComponent(documentId)}/content`, {
418
- ...opts
419
- }));
420
- }
421
- /**
422
- * Get chat artifacts
423
- */
424
- export function getAll2({ chatId }: {
425
- chatId: string;
426
- }, opts?: Oazapfts.RequestOpts) {
427
- return oazapfts.ok(oazapfts.fetchJson<{
428
- status: 200;
429
- data: GetArtifactResponse[];
430
- }>(`/v2/artifacts${QS.query(QS.explode({
431
- chatId
432
- }))}`, {
433
- ...opts
434
- }));
435
- }
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.stg.stackspot.com",
12
+ };
13
+ const oazapfts = Oazapfts.runtime(defaults);
14
+ export const servers = {
15
+ generatedServerUrl: "https://discover-discover-core.stg.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 CreateHypothesisRequest = {
150
+ opportunityId?: string;
151
+ title?: string;
152
+ description?: string;
153
+ chatId?: string;
154
+ };
155
+ export type CreateHypothesisResponse = {
156
+ id: string;
157
+ opportunityId: string;
158
+ title: string;
159
+ description: string;
160
+ createdBy: string;
161
+ createdAt?: string;
162
+ updatedBy?: string;
163
+ updatedAt?: string;
164
+ chatId?: string;
165
+ };
166
+ export type CreateDocumentRequest = {
167
+ hypothesisId?: string;
168
+ title?: string;
169
+ description?: string;
170
+ content?: string;
171
+ chatId?: string;
172
+ };
173
+ export type CreateDocumentResponse = {
174
+ id: string;
175
+ hypothesisId: string;
176
+ title: string;
177
+ description: string;
178
+ createdBy: string;
179
+ createdAt?: string;
180
+ updatedBy?: string;
181
+ updatedAt?: string;
182
+ chatId?: string;
183
+ };
184
+ export type GetArtifactResponse = {
185
+ "type": "OPPORTUNITY" | "HYPOTHESIS" | "DOCUMENT";
186
+ id: string;
187
+ title: string;
188
+ description: string;
189
+ };
190
+ /**
191
+ * Get specific Opportunity
192
+ */
193
+ export function getById({ opportunityId }: {
194
+ opportunityId: string;
195
+ }, opts?: Oazapfts.RequestOpts) {
196
+ return oazapfts.ok(oazapfts.fetchJson<{
197
+ status: 200;
198
+ data: GetOpportunityResponse;
199
+ }>(`/v2/opportunities/${encodeURIComponent(opportunityId)}`, {
200
+ ...opts
201
+ }));
202
+ }
203
+ /**
204
+ * Update specific Opportunity
205
+ */
206
+ export function updateById({ opportunityId, updateOpportunityRequest }: {
207
+ opportunityId: string;
208
+ updateOpportunityRequest: UpdateOpportunityRequest;
209
+ }, opts?: Oazapfts.RequestOpts) {
210
+ return oazapfts.ok(oazapfts.fetchJson<{
211
+ status: 200;
212
+ data: UpdateOpportunityResponse;
213
+ }>(`/v2/opportunities/${encodeURIComponent(opportunityId)}`, oazapfts.json({
214
+ ...opts,
215
+ method: "PUT",
216
+ body: updateOpportunityRequest
217
+ })));
218
+ }
219
+ /**
220
+ * Delete specific Opportunity
221
+ */
222
+ export function deleteById({ opportunityId }: {
223
+ opportunityId: string;
224
+ }, opts?: Oazapfts.RequestOpts) {
225
+ return oazapfts.ok(oazapfts.fetchText(`/v2/opportunities/${encodeURIComponent(opportunityId)}`, {
226
+ ...opts,
227
+ method: "DELETE"
228
+ }));
229
+ }
230
+ /**
231
+ * Get specific Hypothesis
232
+ */
233
+ export function getById1({ hypothesisId }: {
234
+ hypothesisId: string;
235
+ }, opts?: Oazapfts.RequestOpts) {
236
+ return oazapfts.ok(oazapfts.fetchJson<{
237
+ status: 200;
238
+ data: GetHypothesisResponse;
239
+ }>(`/v2/hypotheses/${encodeURIComponent(hypothesisId)}`, {
240
+ ...opts
241
+ }));
242
+ }
243
+ /**
244
+ * Update specific Hypothesis
245
+ */
246
+ export function updateById1({ hypothesisId, updateHypothesisRequest }: {
247
+ hypothesisId: string;
248
+ updateHypothesisRequest: UpdateHypothesisRequest;
249
+ }, opts?: Oazapfts.RequestOpts) {
250
+ return oazapfts.ok(oazapfts.fetchJson<{
251
+ status: 200;
252
+ data: UpdateHypothesisResponse;
253
+ }>(`/v2/hypotheses/${encodeURIComponent(hypothesisId)}`, oazapfts.json({
254
+ ...opts,
255
+ method: "PUT",
256
+ body: updateHypothesisRequest
257
+ })));
258
+ }
259
+ /**
260
+ * Delete specific Hypothesis
261
+ */
262
+ export function deleteById1({ hypothesisId }: {
263
+ hypothesisId: string;
264
+ }, opts?: Oazapfts.RequestOpts) {
265
+ return oazapfts.ok(oazapfts.fetchText(`/v2/hypotheses/${encodeURIComponent(hypothesisId)}`, {
266
+ ...opts,
267
+ method: "DELETE"
268
+ }));
269
+ }
270
+ /**
271
+ * Get specific Document
272
+ */
273
+ export function getById2({ documentId }: {
274
+ documentId: string;
275
+ }, opts?: Oazapfts.RequestOpts) {
276
+ return oazapfts.ok(oazapfts.fetchJson<{
277
+ status: 200;
278
+ data: GetDocumentResponse;
279
+ }>(`/v2/documents/${encodeURIComponent(documentId)}`, {
280
+ ...opts
281
+ }));
282
+ }
283
+ /**
284
+ * Update specific Document
285
+ */
286
+ export function updateById2({ documentId, updateDocumentRequest }: {
287
+ documentId: string;
288
+ updateDocumentRequest: UpdateDocumentRequest;
289
+ }, opts?: Oazapfts.RequestOpts) {
290
+ return oazapfts.ok(oazapfts.fetchJson<{
291
+ status: 200;
292
+ data: UpdateDocumentResponse;
293
+ }>(`/v2/documents/${encodeURIComponent(documentId)}`, oazapfts.json({
294
+ ...opts,
295
+ method: "PUT",
296
+ body: updateDocumentRequest
297
+ })));
298
+ }
299
+ /**
300
+ * Delete specific Document
301
+ */
302
+ export function deleteById2({ documentId }: {
303
+ documentId: string;
304
+ }, opts?: Oazapfts.RequestOpts) {
305
+ return oazapfts.ok(oazapfts.fetchText(`/v2/documents/${encodeURIComponent(documentId)}`, {
306
+ ...opts,
307
+ method: "DELETE"
308
+ }));
309
+ }
310
+ /**
311
+ * Get all Opportunities
312
+ */
313
+ export function getAll({ filter, page, size, sort, direction }: {
314
+ filter?: string;
315
+ page?: number;
316
+ size?: number;
317
+ sort?: string;
318
+ direction?: string;
319
+ }, opts?: Oazapfts.RequestOpts) {
320
+ return oazapfts.ok(oazapfts.fetchJson<{
321
+ status: 200;
322
+ data: PageResponseGetOpportunityResponse;
323
+ }>(`/v2/opportunities${QS.query(QS.explode({
324
+ filter,
325
+ page,
326
+ size,
327
+ sort,
328
+ direction
329
+ }))}`, {
330
+ ...opts
331
+ }));
332
+ }
333
+ /**
334
+ * Create new Opportunity
335
+ */
336
+ export function create({ createOpportunityRequest }: {
337
+ createOpportunityRequest: CreateOpportunityRequest;
338
+ }, opts?: Oazapfts.RequestOpts) {
339
+ return oazapfts.ok(oazapfts.fetchJson<{
340
+ status: 200;
341
+ data: CreateOpportunityResponse;
342
+ }>("/v2/opportunities", oazapfts.json({
343
+ ...opts,
344
+ method: "POST",
345
+ body: createOpportunityRequest
346
+ })));
347
+ }
348
+ /**
349
+ * Get all Hypotheses
350
+ */
351
+ export function getAll1({ opportunityId }: {
352
+ opportunityId: string;
353
+ }, opts?: Oazapfts.RequestOpts) {
354
+ return oazapfts.ok(oazapfts.fetchJson<{
355
+ status: 200;
356
+ data: GetHypothesisResponse[];
357
+ }>(`/v2/hypotheses${QS.query(QS.explode({
358
+ opportunityId
359
+ }))}`, {
360
+ ...opts
361
+ }));
362
+ }
363
+ /**
364
+ * Create new Hypothesis
365
+ */
366
+ export function create1({ createHypothesisRequest }: {
367
+ createHypothesisRequest: CreateHypothesisRequest;
368
+ }, opts?: Oazapfts.RequestOpts) {
369
+ return oazapfts.ok(oazapfts.fetchJson<{
370
+ status: 200;
371
+ data: CreateHypothesisResponse;
372
+ }>("/v2/hypotheses", oazapfts.json({
373
+ ...opts,
374
+ method: "POST",
375
+ body: createHypothesisRequest
376
+ })));
377
+ }
378
+ /**
379
+ * Get all Documents by Hypothesis
380
+ */
381
+ export function getAllByHypothesis({ hypothesisId }: {
382
+ hypothesisId: string;
383
+ }, opts?: Oazapfts.RequestOpts) {
384
+ return oazapfts.ok(oazapfts.fetchJson<{
385
+ status: 200;
386
+ data: GetDocumentResponse[];
387
+ }>(`/v2/documents${QS.query(QS.explode({
388
+ hypothesisId
389
+ }))}`, {
390
+ ...opts
391
+ }));
392
+ }
393
+ /**
394
+ * Create Document
395
+ */
396
+ export function create2({ createDocumentRequest }: {
397
+ createDocumentRequest: CreateDocumentRequest;
398
+ }, opts?: Oazapfts.RequestOpts) {
399
+ return oazapfts.ok(oazapfts.fetchJson<{
400
+ status: 200;
401
+ data: CreateDocumentResponse;
402
+ }>("/v2/documents", oazapfts.json({
403
+ ...opts,
404
+ method: "POST",
405
+ body: createDocumentRequest
406
+ })));
407
+ }
408
+ /**
409
+ * Get specific Document content
410
+ */
411
+ export function getContentById({ documentId }: {
412
+ documentId: string;
413
+ }, opts?: Oazapfts.RequestOpts) {
414
+ return oazapfts.ok(oazapfts.fetchJson<{
415
+ status: 200;
416
+ data: string;
417
+ }>(`/v2/documents/${encodeURIComponent(documentId)}/content`, {
418
+ ...opts
419
+ }));
420
+ }
421
+ /**
422
+ * Get chat artifacts
423
+ */
424
+ export function getAll2({ chatId }: {
425
+ chatId: string;
426
+ }, opts?: Oazapfts.RequestOpts) {
427
+ return oazapfts.ok(oazapfts.fetchJson<{
428
+ status: 200;
429
+ data: GetArtifactResponse[];
430
+ }>(`/v2/artifacts${QS.query(QS.explode({
431
+ chatId
432
+ }))}`, {
433
+ ...opts
434
+ }));
435
+ }