@keboola/api-client 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +456 -0
- package/dist/ai/index.cjs +203 -0
- package/dist/ai/index.cjs.map +1 -0
- package/dist/ai/index.d.cts +35 -0
- package/dist/ai/index.d.ts +35 -0
- package/dist/ai/index.js +197 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/types.cjs +4 -0
- package/dist/ai/types.cjs.map +1 -0
- package/dist/ai/types.d.cts +2 -0
- package/dist/ai/types.d.ts +2 -0
- package/dist/ai/types.js +3 -0
- package/dist/ai/types.js.map +1 -0
- package/dist/assets/index.cjs +182 -0
- package/dist/assets/index.cjs.map +1 -0
- package/dist/assets/index.d.cts +9 -0
- package/dist/assets/index.d.ts +9 -0
- package/dist/assets/index.js +176 -0
- package/dist/assets/index.js.map +1 -0
- package/dist/assets/types.cjs +4 -0
- package/dist/assets/types.cjs.map +1 -0
- package/dist/assets/types.d.cts +8 -0
- package/dist/assets/types.d.ts +8 -0
- package/dist/assets/types.js +3 -0
- package/dist/assets/types.js.map +1 -0
- package/dist/authMiddleware-BTFSCMTE.d.ts +11 -0
- package/dist/authMiddleware-BteBe1Bt.d.cts +11 -0
- package/dist/chat/index.cjs +428 -0
- package/dist/chat/index.cjs.map +1 -0
- package/dist/chat/index.d.cts +51 -0
- package/dist/chat/index.d.ts +51 -0
- package/dist/chat/index.js +422 -0
- package/dist/chat/index.js.map +1 -0
- package/dist/chat/suggestions.cjs +158 -0
- package/dist/chat/suggestions.cjs.map +1 -0
- package/dist/chat/suggestions.d.cts +437 -0
- package/dist/chat/suggestions.d.ts +437 -0
- package/dist/chat/suggestions.js +140 -0
- package/dist/chat/suggestions.js.map +1 -0
- package/dist/chat/types.cjs +10 -0
- package/dist/chat/types.cjs.map +1 -0
- package/dist/chat/types.d.cts +3 -0
- package/dist/chat/types.d.ts +3 -0
- package/dist/chat/types.js +8 -0
- package/dist/chat/types.js.map +1 -0
- package/dist/createGenericFetchClient-CLUzu-jY.d.cts +18 -0
- package/dist/createGenericFetchClient-DEakI3F1.d.ts +18 -0
- package/dist/createOpenapiFetchClient-CpXmAIFB.d.cts +24 -0
- package/dist/createOpenapiFetchClient-_sm4bchL.d.ts +24 -0
- package/dist/dataScience/index.cjs +416 -0
- package/dist/dataScience/index.cjs.map +1 -0
- package/dist/dataScience/index.d.cts +191 -0
- package/dist/dataScience/index.d.ts +191 -0
- package/dist/dataScience/index.js +388 -0
- package/dist/dataScience/index.js.map +1 -0
- package/dist/dataScience/types.cjs +4 -0
- package/dist/dataScience/types.cjs.map +1 -0
- package/dist/dataScience/types.d.cts +2 -0
- package/dist/dataScience/types.d.ts +2 -0
- package/dist/dataScience/types.js +3 -0
- package/dist/dataScience/types.js.map +1 -0
- package/dist/editor/index.cjs +275 -0
- package/dist/editor/index.cjs.map +1 -0
- package/dist/editor/index.d.cts +172 -0
- package/dist/editor/index.d.ts +172 -0
- package/dist/editor/index.js +269 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/editor/types.cjs +4 -0
- package/dist/editor/types.cjs.map +1 -0
- package/dist/editor/types.d.cts +2 -0
- package/dist/editor/types.d.ts +2 -0
- package/dist/editor/types.js +3 -0
- package/dist/editor/types.js.map +1 -0
- package/dist/encryption/index.cjs +192 -0
- package/dist/encryption/index.cjs.map +1 -0
- package/dist/encryption/index.d.cts +14 -0
- package/dist/encryption/index.d.ts +14 -0
- package/dist/encryption/index.js +186 -0
- package/dist/encryption/index.js.map +1 -0
- package/dist/encryption/types.cjs +4 -0
- package/dist/encryption/types.cjs.map +1 -0
- package/dist/encryption/types.d.cts +8 -0
- package/dist/encryption/types.d.ts +8 -0
- package/dist/encryption/types.js +3 -0
- package/dist/encryption/types.js.map +1 -0
- package/dist/import/index.cjs +198 -0
- package/dist/import/index.cjs.map +1 -0
- package/dist/import/index.d.cts +9 -0
- package/dist/import/index.d.ts +9 -0
- package/dist/import/index.js +192 -0
- package/dist/import/index.js.map +1 -0
- package/dist/index.cjs +3910 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3108 -0
- package/dist/index.d.ts +3108 -0
- package/dist/index.js +3858 -0
- package/dist/index.js.map +1 -0
- package/dist/keboolaUID-D1DGSbge.d.cts +19 -0
- package/dist/keboolaUID-D1DGSbge.d.ts +19 -0
- package/dist/management/index.cjs +872 -0
- package/dist/management/index.cjs.map +1 -0
- package/dist/management/index.d.cts +440 -0
- package/dist/management/index.d.ts +440 -0
- package/dist/management/index.js +865 -0
- package/dist/management/index.js.map +1 -0
- package/dist/management/types.cjs +4 -0
- package/dist/management/types.cjs.map +1 -0
- package/dist/management/types.d.cts +9 -0
- package/dist/management/types.d.ts +9 -0
- package/dist/management/types.js +3 -0
- package/dist/management/types.js.map +1 -0
- package/dist/metastore/index.cjs +339 -0
- package/dist/metastore/index.cjs.map +1 -0
- package/dist/metastore/index.d.cts +52 -0
- package/dist/metastore/index.d.ts +52 -0
- package/dist/metastore/index.js +333 -0
- package/dist/metastore/index.js.map +1 -0
- package/dist/metastore/types.cjs +4 -0
- package/dist/metastore/types.cjs.map +1 -0
- package/dist/metastore/types.d.cts +2 -0
- package/dist/metastore/types.d.ts +2 -0
- package/dist/metastore/types.js +3 -0
- package/dist/metastore/types.js.map +1 -0
- package/dist/queryService/index.cjs +250 -0
- package/dist/queryService/index.cjs.map +1 -0
- package/dist/queryService/index.d.cts +39 -0
- package/dist/queryService/index.d.ts +39 -0
- package/dist/queryService/index.js +244 -0
- package/dist/queryService/index.js.map +1 -0
- package/dist/queryService/types.cjs +4 -0
- package/dist/queryService/types.cjs.map +1 -0
- package/dist/queryService/types.d.cts +2 -0
- package/dist/queryService/types.d.ts +2 -0
- package/dist/queryService/types.js +3 -0
- package/dist/queryService/types.js.map +1 -0
- package/dist/queue/index.cjs +192 -0
- package/dist/queue/index.cjs.map +1 -0
- package/dist/queue/index.d.cts +133 -0
- package/dist/queue/index.d.ts +133 -0
- package/dist/queue/index.js +186 -0
- package/dist/queue/index.js.map +1 -0
- package/dist/queue/types.cjs +4 -0
- package/dist/queue/types.cjs.map +1 -0
- package/dist/queue/types.d.cts +2 -0
- package/dist/queue/types.d.ts +2 -0
- package/dist/queue/types.js +3 -0
- package/dist/queue/types.js.map +1 -0
- package/dist/sdk/storage/index.cjs +96 -0
- package/dist/sdk/storage/index.cjs.map +1 -0
- package/dist/sdk/storage/index.d.cts +24 -0
- package/dist/sdk/storage/index.d.ts +24 -0
- package/dist/sdk/storage/index.js +94 -0
- package/dist/sdk/storage/index.js.map +1 -0
- package/dist/sdk/tag/index.cjs +210 -0
- package/dist/sdk/tag/index.cjs.map +1 -0
- package/dist/sdk/tag/index.d.cts +25 -0
- package/dist/sdk/tag/index.d.ts +25 -0
- package/dist/sdk/tag/index.js +208 -0
- package/dist/sdk/tag/index.js.map +1 -0
- package/dist/sdk/tag/types.cjs +4 -0
- package/dist/sdk/tag/types.cjs.map +1 -0
- package/dist/sdk/tag/types.d.cts +30 -0
- package/dist/sdk/tag/types.d.ts +30 -0
- package/dist/sdk/tag/types.js +3 -0
- package/dist/sdk/tag/types.js.map +1 -0
- package/dist/status/index.cjs +178 -0
- package/dist/status/index.cjs.map +1 -0
- package/dist/status/index.d.cts +10 -0
- package/dist/status/index.d.ts +10 -0
- package/dist/status/index.js +172 -0
- package/dist/status/index.js.map +1 -0
- package/dist/status/types.cjs +4 -0
- package/dist/status/types.cjs.map +1 -0
- package/dist/status/types.d.cts +19 -0
- package/dist/status/types.d.ts +19 -0
- package/dist/status/types.js +3 -0
- package/dist/status/types.js.map +1 -0
- package/dist/storage/index.cjs +1021 -0
- package/dist/storage/index.cjs.map +1 -0
- package/dist/storage/index.d.cts +12 -0
- package/dist/storage/index.d.ts +12 -0
- package/dist/storage/index.js +1014 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/types.cjs +4 -0
- package/dist/storage/types.cjs.map +1 -0
- package/dist/storage/types.d.cts +10976 -0
- package/dist/storage/types.d.ts +10976 -0
- package/dist/storage/types.js +3 -0
- package/dist/storage/types.js.map +1 -0
- package/dist/storageClient-DPLh_p0V.d.cts +608 -0
- package/dist/storageClient-YVWer22Y.d.ts +608 -0
- package/dist/syncActions/index.cjs +366 -0
- package/dist/syncActions/index.cjs.map +1 -0
- package/dist/syncActions/index.d.cts +94 -0
- package/dist/syncActions/index.d.ts +94 -0
- package/dist/syncActions/index.js +341 -0
- package/dist/syncActions/index.js.map +1 -0
- package/dist/syncActions/types.cjs +4 -0
- package/dist/syncActions/types.cjs.map +1 -0
- package/dist/syncActions/types.d.cts +261 -0
- package/dist/syncActions/types.d.ts +261 -0
- package/dist/syncActions/types.js +3 -0
- package/dist/syncActions/types.js.map +1 -0
- package/dist/telemetry/index.cjs +189 -0
- package/dist/telemetry/index.cjs.map +1 -0
- package/dist/telemetry/index.d.cts +13 -0
- package/dist/telemetry/index.d.ts +13 -0
- package/dist/telemetry/index.js +183 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/types.cjs +4 -0
- package/dist/telemetry/types.cjs.map +1 -0
- package/dist/telemetry/types.d.cts +12 -0
- package/dist/telemetry/types.d.ts +12 -0
- package/dist/telemetry/types.js +3 -0
- package/dist/telemetry/types.js.map +1 -0
- package/dist/types-B51cQMrX.d.ts +1408 -0
- package/dist/types-B7k8S4ki.d.ts +1520 -0
- package/dist/types-BNQK_jR_.d.cts +1520 -0
- package/dist/types-BY0tjg2Q.d.ts +1079 -0
- package/dist/types-BeShtGlc.d.cts +8591 -0
- package/dist/types-BeShtGlc.d.ts +8591 -0
- package/dist/types-BjrNNn5I.d.ts +1643 -0
- package/dist/types-C-bd4ArM.d.cts +1079 -0
- package/dist/types-C7mpAfq-.d.cts +64 -0
- package/dist/types-C7mpAfq-.d.ts +64 -0
- package/dist/types-CGMJT3JL.d.ts +943 -0
- package/dist/types-CRSKcua9.d.cts +1314 -0
- package/dist/types-DJ6nbNq5.d.cts +1643 -0
- package/dist/types-DJkU9gvB.d.cts +943 -0
- package/dist/types-DYMMsuU0.d.cts +78 -0
- package/dist/types-DYMMsuU0.d.ts +78 -0
- package/dist/types-Dg1tEsVR.d.cts +17 -0
- package/dist/types-Dg1tEsVR.d.ts +17 -0
- package/dist/types-DgaMV8FF.d.cts +60 -0
- package/dist/types-DgaMV8FF.d.ts +60 -0
- package/dist/types-Dws8mFNY.d.cts +1408 -0
- package/dist/types-cH0_hkCW.d.ts +1314 -0
- package/dist/utils-BNQZiNOu.d.ts +1657 -0
- package/dist/utils-DE09pDTi.d.cts +1657 -0
- package/dist/vault/index.cjs +225 -0
- package/dist/vault/index.cjs.map +1 -0
- package/dist/vault/index.d.cts +26 -0
- package/dist/vault/index.d.ts +26 -0
- package/dist/vault/index.js +219 -0
- package/dist/vault/index.js.map +1 -0
- package/dist/vault/types.cjs +4 -0
- package/dist/vault/types.cjs.map +1 -0
- package/dist/vault/types.d.cts +390 -0
- package/dist/vault/types.d.ts +390 -0
- package/dist/vault/types.js +3 -0
- package/dist/vault/types.js.map +1 -0
- package/dist/verify/index.cjs +190 -0
- package/dist/verify/index.cjs.map +1 -0
- package/dist/verify/index.d.cts +9 -0
- package/dist/verify/index.d.ts +9 -0
- package/dist/verify/index.js +184 -0
- package/dist/verify/index.js.map +1 -0
- package/dist/verify/types.cjs +4 -0
- package/dist/verify/types.cjs.map +1 -0
- package/dist/verify/types.d.cts +29 -0
- package/dist/verify/types.d.ts +29 -0
- package/dist/verify/types.js +3 -0
- package/dist/verify/types.js.map +1 -0
- package/package.json +570 -0
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const SUGGESTION_CATEGORIES: readonly ["error", "maintenance", "documentation"];
|
|
4
|
+
declare const suggestionCategorySchema: z.ZodEnum<{
|
|
5
|
+
error: "error";
|
|
6
|
+
maintenance: "maintenance";
|
|
7
|
+
documentation: "documentation";
|
|
8
|
+
}>;
|
|
9
|
+
type SuggestionCategory = z.infer<typeof suggestionCategorySchema>;
|
|
10
|
+
declare const suggestionSchema: z.ZodObject<{
|
|
11
|
+
label: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
12
|
+
prompt: z.ZodString;
|
|
13
|
+
priority: z.ZodNumber;
|
|
14
|
+
category: z.ZodEnum<{
|
|
15
|
+
error: "error";
|
|
16
|
+
maintenance: "maintenance";
|
|
17
|
+
documentation: "documentation";
|
|
18
|
+
}>;
|
|
19
|
+
reasoning: z.ZodString;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
type Suggestion = z.infer<typeof suggestionSchema>;
|
|
22
|
+
declare const suggestionsResponseSchema: z.ZodObject<{
|
|
23
|
+
suggestions: z.ZodArray<z.ZodObject<{
|
|
24
|
+
label: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
25
|
+
prompt: z.ZodString;
|
|
26
|
+
priority: z.ZodNumber;
|
|
27
|
+
category: z.ZodEnum<{
|
|
28
|
+
error: "error";
|
|
29
|
+
maintenance: "maintenance";
|
|
30
|
+
documentation: "documentation";
|
|
31
|
+
}>;
|
|
32
|
+
reasoning: z.ZodString;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
type SuggestionsResponse = z.infer<typeof suggestionsResponseSchema>;
|
|
36
|
+
declare const suggestionWithIdSchema: z.ZodObject<{
|
|
37
|
+
label: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
38
|
+
prompt: z.ZodString;
|
|
39
|
+
priority: z.ZodNumber;
|
|
40
|
+
category: z.ZodEnum<{
|
|
41
|
+
error: "error";
|
|
42
|
+
maintenance: "maintenance";
|
|
43
|
+
documentation: "documentation";
|
|
44
|
+
}>;
|
|
45
|
+
reasoning: z.ZodString;
|
|
46
|
+
id: z.ZodString;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
type SuggestionWithId = z.infer<typeof suggestionWithIdSchema>;
|
|
49
|
+
declare const suggestionsApiResponseSchema: z.ZodObject<{
|
|
50
|
+
suggestions: z.ZodArray<z.ZodObject<{
|
|
51
|
+
label: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
52
|
+
prompt: z.ZodString;
|
|
53
|
+
priority: z.ZodNumber;
|
|
54
|
+
category: z.ZodEnum<{
|
|
55
|
+
error: "error";
|
|
56
|
+
maintenance: "maintenance";
|
|
57
|
+
documentation: "documentation";
|
|
58
|
+
}>;
|
|
59
|
+
reasoning: z.ZodString;
|
|
60
|
+
id: z.ZodString;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
suggestionSessionId: z.ZodString;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
type SuggestionsApiResponse = z.infer<typeof suggestionsApiResponseSchema>;
|
|
65
|
+
declare const recentFailedJobSchema: z.ZodObject<{
|
|
66
|
+
id: z.ZodString;
|
|
67
|
+
status: z.ZodEnum<{
|
|
68
|
+
error: "error";
|
|
69
|
+
warning: "warning";
|
|
70
|
+
}>;
|
|
71
|
+
component: z.ZodString;
|
|
72
|
+
configId: z.ZodString;
|
|
73
|
+
configName: z.ZodOptional<z.ZodString>;
|
|
74
|
+
createdTime: z.ZodString;
|
|
75
|
+
durationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
type RecentFailedJob = z.infer<typeof recentFailedJobSchema>;
|
|
79
|
+
declare const deprecatedComponentSchema: z.ZodObject<{
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
name: z.ZodString;
|
|
82
|
+
type: z.ZodString;
|
|
83
|
+
expiredOn: z.ZodString;
|
|
84
|
+
configCount: z.ZodNumber;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
type DeprecatedComponent = z.infer<typeof deprecatedComponentSchema>;
|
|
87
|
+
declare const userRecentEditSchema: z.ZodObject<{
|
|
88
|
+
component: z.ZodString;
|
|
89
|
+
configId: z.ZodString;
|
|
90
|
+
configName: z.ZodString;
|
|
91
|
+
lastEdited: z.ZodString;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
type UserRecentEdit = z.infer<typeof userRecentEditSchema>;
|
|
94
|
+
declare const dashboardContextDataSchema: z.ZodObject<{
|
|
95
|
+
recentFailedJobs: z.ZodArray<z.ZodObject<{
|
|
96
|
+
id: z.ZodString;
|
|
97
|
+
status: z.ZodEnum<{
|
|
98
|
+
error: "error";
|
|
99
|
+
warning: "warning";
|
|
100
|
+
}>;
|
|
101
|
+
component: z.ZodString;
|
|
102
|
+
configId: z.ZodString;
|
|
103
|
+
configName: z.ZodOptional<z.ZodString>;
|
|
104
|
+
createdTime: z.ZodString;
|
|
105
|
+
durationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
107
|
+
}, z.core.$strip>>;
|
|
108
|
+
deprecatedComponents: z.ZodArray<z.ZodObject<{
|
|
109
|
+
id: z.ZodString;
|
|
110
|
+
name: z.ZodString;
|
|
111
|
+
type: z.ZodString;
|
|
112
|
+
expiredOn: z.ZodString;
|
|
113
|
+
configCount: z.ZodNumber;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
userRecentEdits: z.ZodArray<z.ZodObject<{
|
|
116
|
+
component: z.ZodString;
|
|
117
|
+
configId: z.ZodString;
|
|
118
|
+
configName: z.ZodString;
|
|
119
|
+
lastEdited: z.ZodString;
|
|
120
|
+
}, z.core.$strip>>;
|
|
121
|
+
currentUserEmail: z.ZodString;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
type DashboardContextData = z.infer<typeof dashboardContextDataSchema>;
|
|
124
|
+
declare const JOB_STATUSES: readonly ["created", "waiting", "processing", "success", "error", "terminating", "terminated", "cancelled", "warning"];
|
|
125
|
+
declare const jobDetailContextDataSchema: z.ZodObject<{
|
|
126
|
+
job: z.ZodObject<{
|
|
127
|
+
id: z.ZodString;
|
|
128
|
+
status: z.ZodEnum<{
|
|
129
|
+
error: "error";
|
|
130
|
+
success: "success";
|
|
131
|
+
warning: "warning";
|
|
132
|
+
created: "created";
|
|
133
|
+
waiting: "waiting";
|
|
134
|
+
processing: "processing";
|
|
135
|
+
terminating: "terminating";
|
|
136
|
+
terminated: "terminated";
|
|
137
|
+
cancelled: "cancelled";
|
|
138
|
+
}>;
|
|
139
|
+
component: z.ZodString;
|
|
140
|
+
configId: z.ZodOptional<z.ZodString>;
|
|
141
|
+
configName: z.ZodOptional<z.ZodString>;
|
|
142
|
+
createdTime: z.ZodString;
|
|
143
|
+
startTime: z.ZodOptional<z.ZodString>;
|
|
144
|
+
endTime: z.ZodOptional<z.ZodString>;
|
|
145
|
+
durationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
146
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
147
|
+
errorType: z.ZodOptional<z.ZodEnum<{
|
|
148
|
+
user: "user";
|
|
149
|
+
application: "application";
|
|
150
|
+
}>>;
|
|
151
|
+
backendSize: z.ZodOptional<z.ZodString>;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
component: z.ZodOptional<z.ZodObject<{
|
|
154
|
+
id: z.ZodString;
|
|
155
|
+
name: z.ZodString;
|
|
156
|
+
type: z.ZodString;
|
|
157
|
+
}, z.core.$strip>>;
|
|
158
|
+
runtimeHistory: z.ZodOptional<z.ZodObject<{
|
|
159
|
+
averageDurationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
minDurationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
maxDurationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
162
|
+
recentJobsCount: z.ZodNumber;
|
|
163
|
+
isSlowerThanAverage: z.ZodOptional<z.ZodBoolean>;
|
|
164
|
+
isFasterThanAverage: z.ZodOptional<z.ZodBoolean>;
|
|
165
|
+
percentageDifference: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
}, z.core.$strip>>;
|
|
167
|
+
currentUserEmail: z.ZodString;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
type JobDetailContextData = z.infer<typeof jobDetailContextDataSchema>;
|
|
170
|
+
declare const configurationDetailContextDataSchema: z.ZodObject<{
|
|
171
|
+
configuration: z.ZodObject<{
|
|
172
|
+
id: z.ZodString;
|
|
173
|
+
name: z.ZodString;
|
|
174
|
+
description: z.ZodOptional<z.ZodString>;
|
|
175
|
+
component: z.ZodString;
|
|
176
|
+
hasRows: z.ZodBoolean;
|
|
177
|
+
rowCount: z.ZodOptional<z.ZodNumber>;
|
|
178
|
+
lastChangeDescription: z.ZodOptional<z.ZodString>;
|
|
179
|
+
}, z.core.$strip>;
|
|
180
|
+
component: z.ZodOptional<z.ZodObject<{
|
|
181
|
+
id: z.ZodString;
|
|
182
|
+
name: z.ZodString;
|
|
183
|
+
type: z.ZodString;
|
|
184
|
+
}, z.core.$strip>>;
|
|
185
|
+
latestJobs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
186
|
+
id: z.ZodString;
|
|
187
|
+
status: z.ZodEnum<{
|
|
188
|
+
error: "error";
|
|
189
|
+
success: "success";
|
|
190
|
+
warning: "warning";
|
|
191
|
+
created: "created";
|
|
192
|
+
waiting: "waiting";
|
|
193
|
+
processing: "processing";
|
|
194
|
+
terminating: "terminating";
|
|
195
|
+
terminated: "terminated";
|
|
196
|
+
cancelled: "cancelled";
|
|
197
|
+
}>;
|
|
198
|
+
durationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
199
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
200
|
+
createdTime: z.ZodString;
|
|
201
|
+
}, z.core.$strip>>>;
|
|
202
|
+
currentUserEmail: z.ZodString;
|
|
203
|
+
}, z.core.$strip>;
|
|
204
|
+
type ConfigurationDetailContextData = z.infer<typeof configurationDetailContextDataSchema>;
|
|
205
|
+
declare const dashboardSuggestionsRequestSchema: z.ZodObject<{
|
|
206
|
+
context: z.ZodLiteral<"dashboard">;
|
|
207
|
+
data: z.ZodObject<{
|
|
208
|
+
recentFailedJobs: z.ZodArray<z.ZodObject<{
|
|
209
|
+
id: z.ZodString;
|
|
210
|
+
status: z.ZodEnum<{
|
|
211
|
+
error: "error";
|
|
212
|
+
warning: "warning";
|
|
213
|
+
}>;
|
|
214
|
+
component: z.ZodString;
|
|
215
|
+
configId: z.ZodString;
|
|
216
|
+
configName: z.ZodOptional<z.ZodString>;
|
|
217
|
+
createdTime: z.ZodString;
|
|
218
|
+
durationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
219
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$strip>>;
|
|
221
|
+
deprecatedComponents: z.ZodArray<z.ZodObject<{
|
|
222
|
+
id: z.ZodString;
|
|
223
|
+
name: z.ZodString;
|
|
224
|
+
type: z.ZodString;
|
|
225
|
+
expiredOn: z.ZodString;
|
|
226
|
+
configCount: z.ZodNumber;
|
|
227
|
+
}, z.core.$strip>>;
|
|
228
|
+
userRecentEdits: z.ZodArray<z.ZodObject<{
|
|
229
|
+
component: z.ZodString;
|
|
230
|
+
configId: z.ZodString;
|
|
231
|
+
configName: z.ZodString;
|
|
232
|
+
lastEdited: z.ZodString;
|
|
233
|
+
}, z.core.$strip>>;
|
|
234
|
+
currentUserEmail: z.ZodString;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
}, z.core.$strip>;
|
|
237
|
+
declare const jobDetailSuggestionsRequestSchema: z.ZodObject<{
|
|
238
|
+
context: z.ZodLiteral<"job-detail">;
|
|
239
|
+
data: z.ZodObject<{
|
|
240
|
+
job: z.ZodObject<{
|
|
241
|
+
id: z.ZodString;
|
|
242
|
+
status: z.ZodEnum<{
|
|
243
|
+
error: "error";
|
|
244
|
+
success: "success";
|
|
245
|
+
warning: "warning";
|
|
246
|
+
created: "created";
|
|
247
|
+
waiting: "waiting";
|
|
248
|
+
processing: "processing";
|
|
249
|
+
terminating: "terminating";
|
|
250
|
+
terminated: "terminated";
|
|
251
|
+
cancelled: "cancelled";
|
|
252
|
+
}>;
|
|
253
|
+
component: z.ZodString;
|
|
254
|
+
configId: z.ZodOptional<z.ZodString>;
|
|
255
|
+
configName: z.ZodOptional<z.ZodString>;
|
|
256
|
+
createdTime: z.ZodString;
|
|
257
|
+
startTime: z.ZodOptional<z.ZodString>;
|
|
258
|
+
endTime: z.ZodOptional<z.ZodString>;
|
|
259
|
+
durationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
261
|
+
errorType: z.ZodOptional<z.ZodEnum<{
|
|
262
|
+
user: "user";
|
|
263
|
+
application: "application";
|
|
264
|
+
}>>;
|
|
265
|
+
backendSize: z.ZodOptional<z.ZodString>;
|
|
266
|
+
}, z.core.$strip>;
|
|
267
|
+
component: z.ZodOptional<z.ZodObject<{
|
|
268
|
+
id: z.ZodString;
|
|
269
|
+
name: z.ZodString;
|
|
270
|
+
type: z.ZodString;
|
|
271
|
+
}, z.core.$strip>>;
|
|
272
|
+
runtimeHistory: z.ZodOptional<z.ZodObject<{
|
|
273
|
+
averageDurationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
274
|
+
minDurationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
275
|
+
maxDurationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
276
|
+
recentJobsCount: z.ZodNumber;
|
|
277
|
+
isSlowerThanAverage: z.ZodOptional<z.ZodBoolean>;
|
|
278
|
+
isFasterThanAverage: z.ZodOptional<z.ZodBoolean>;
|
|
279
|
+
percentageDifference: z.ZodOptional<z.ZodNumber>;
|
|
280
|
+
}, z.core.$strip>>;
|
|
281
|
+
currentUserEmail: z.ZodString;
|
|
282
|
+
}, z.core.$strip>;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
declare const configurationDetailSuggestionsRequestSchema: z.ZodObject<{
|
|
285
|
+
context: z.ZodLiteral<"configuration-detail">;
|
|
286
|
+
data: z.ZodObject<{
|
|
287
|
+
configuration: z.ZodObject<{
|
|
288
|
+
id: z.ZodString;
|
|
289
|
+
name: z.ZodString;
|
|
290
|
+
description: z.ZodOptional<z.ZodString>;
|
|
291
|
+
component: z.ZodString;
|
|
292
|
+
hasRows: z.ZodBoolean;
|
|
293
|
+
rowCount: z.ZodOptional<z.ZodNumber>;
|
|
294
|
+
lastChangeDescription: z.ZodOptional<z.ZodString>;
|
|
295
|
+
}, z.core.$strip>;
|
|
296
|
+
component: z.ZodOptional<z.ZodObject<{
|
|
297
|
+
id: z.ZodString;
|
|
298
|
+
name: z.ZodString;
|
|
299
|
+
type: z.ZodString;
|
|
300
|
+
}, z.core.$strip>>;
|
|
301
|
+
latestJobs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
302
|
+
id: z.ZodString;
|
|
303
|
+
status: z.ZodEnum<{
|
|
304
|
+
error: "error";
|
|
305
|
+
success: "success";
|
|
306
|
+
warning: "warning";
|
|
307
|
+
created: "created";
|
|
308
|
+
waiting: "waiting";
|
|
309
|
+
processing: "processing";
|
|
310
|
+
terminating: "terminating";
|
|
311
|
+
terminated: "terminated";
|
|
312
|
+
cancelled: "cancelled";
|
|
313
|
+
}>;
|
|
314
|
+
durationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
315
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
316
|
+
createdTime: z.ZodString;
|
|
317
|
+
}, z.core.$strip>>>;
|
|
318
|
+
currentUserEmail: z.ZodString;
|
|
319
|
+
}, z.core.$strip>;
|
|
320
|
+
}, z.core.$strip>;
|
|
321
|
+
declare const suggestionsRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
322
|
+
context: z.ZodLiteral<"dashboard">;
|
|
323
|
+
data: z.ZodObject<{
|
|
324
|
+
recentFailedJobs: z.ZodArray<z.ZodObject<{
|
|
325
|
+
id: z.ZodString;
|
|
326
|
+
status: z.ZodEnum<{
|
|
327
|
+
error: "error";
|
|
328
|
+
warning: "warning";
|
|
329
|
+
}>;
|
|
330
|
+
component: z.ZodString;
|
|
331
|
+
configId: z.ZodString;
|
|
332
|
+
configName: z.ZodOptional<z.ZodString>;
|
|
333
|
+
createdTime: z.ZodString;
|
|
334
|
+
durationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
335
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
336
|
+
}, z.core.$strip>>;
|
|
337
|
+
deprecatedComponents: z.ZodArray<z.ZodObject<{
|
|
338
|
+
id: z.ZodString;
|
|
339
|
+
name: z.ZodString;
|
|
340
|
+
type: z.ZodString;
|
|
341
|
+
expiredOn: z.ZodString;
|
|
342
|
+
configCount: z.ZodNumber;
|
|
343
|
+
}, z.core.$strip>>;
|
|
344
|
+
userRecentEdits: z.ZodArray<z.ZodObject<{
|
|
345
|
+
component: z.ZodString;
|
|
346
|
+
configId: z.ZodString;
|
|
347
|
+
configName: z.ZodString;
|
|
348
|
+
lastEdited: z.ZodString;
|
|
349
|
+
}, z.core.$strip>>;
|
|
350
|
+
currentUserEmail: z.ZodString;
|
|
351
|
+
}, z.core.$strip>;
|
|
352
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
353
|
+
context: z.ZodLiteral<"job-detail">;
|
|
354
|
+
data: z.ZodObject<{
|
|
355
|
+
job: z.ZodObject<{
|
|
356
|
+
id: z.ZodString;
|
|
357
|
+
status: z.ZodEnum<{
|
|
358
|
+
error: "error";
|
|
359
|
+
success: "success";
|
|
360
|
+
warning: "warning";
|
|
361
|
+
created: "created";
|
|
362
|
+
waiting: "waiting";
|
|
363
|
+
processing: "processing";
|
|
364
|
+
terminating: "terminating";
|
|
365
|
+
terminated: "terminated";
|
|
366
|
+
cancelled: "cancelled";
|
|
367
|
+
}>;
|
|
368
|
+
component: z.ZodString;
|
|
369
|
+
configId: z.ZodOptional<z.ZodString>;
|
|
370
|
+
configName: z.ZodOptional<z.ZodString>;
|
|
371
|
+
createdTime: z.ZodString;
|
|
372
|
+
startTime: z.ZodOptional<z.ZodString>;
|
|
373
|
+
endTime: z.ZodOptional<z.ZodString>;
|
|
374
|
+
durationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
375
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
376
|
+
errorType: z.ZodOptional<z.ZodEnum<{
|
|
377
|
+
user: "user";
|
|
378
|
+
application: "application";
|
|
379
|
+
}>>;
|
|
380
|
+
backendSize: z.ZodOptional<z.ZodString>;
|
|
381
|
+
}, z.core.$strip>;
|
|
382
|
+
component: z.ZodOptional<z.ZodObject<{
|
|
383
|
+
id: z.ZodString;
|
|
384
|
+
name: z.ZodString;
|
|
385
|
+
type: z.ZodString;
|
|
386
|
+
}, z.core.$strip>>;
|
|
387
|
+
runtimeHistory: z.ZodOptional<z.ZodObject<{
|
|
388
|
+
averageDurationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
389
|
+
minDurationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
390
|
+
maxDurationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
391
|
+
recentJobsCount: z.ZodNumber;
|
|
392
|
+
isSlowerThanAverage: z.ZodOptional<z.ZodBoolean>;
|
|
393
|
+
isFasterThanAverage: z.ZodOptional<z.ZodBoolean>;
|
|
394
|
+
percentageDifference: z.ZodOptional<z.ZodNumber>;
|
|
395
|
+
}, z.core.$strip>>;
|
|
396
|
+
currentUserEmail: z.ZodString;
|
|
397
|
+
}, z.core.$strip>;
|
|
398
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
399
|
+
context: z.ZodLiteral<"configuration-detail">;
|
|
400
|
+
data: z.ZodObject<{
|
|
401
|
+
configuration: z.ZodObject<{
|
|
402
|
+
id: z.ZodString;
|
|
403
|
+
name: z.ZodString;
|
|
404
|
+
description: z.ZodOptional<z.ZodString>;
|
|
405
|
+
component: z.ZodString;
|
|
406
|
+
hasRows: z.ZodBoolean;
|
|
407
|
+
rowCount: z.ZodOptional<z.ZodNumber>;
|
|
408
|
+
lastChangeDescription: z.ZodOptional<z.ZodString>;
|
|
409
|
+
}, z.core.$strip>;
|
|
410
|
+
component: z.ZodOptional<z.ZodObject<{
|
|
411
|
+
id: z.ZodString;
|
|
412
|
+
name: z.ZodString;
|
|
413
|
+
type: z.ZodString;
|
|
414
|
+
}, z.core.$strip>>;
|
|
415
|
+
latestJobs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
416
|
+
id: z.ZodString;
|
|
417
|
+
status: z.ZodEnum<{
|
|
418
|
+
error: "error";
|
|
419
|
+
success: "success";
|
|
420
|
+
warning: "warning";
|
|
421
|
+
created: "created";
|
|
422
|
+
waiting: "waiting";
|
|
423
|
+
processing: "processing";
|
|
424
|
+
terminating: "terminating";
|
|
425
|
+
terminated: "terminated";
|
|
426
|
+
cancelled: "cancelled";
|
|
427
|
+
}>;
|
|
428
|
+
durationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
429
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
430
|
+
createdTime: z.ZodString;
|
|
431
|
+
}, z.core.$strip>>>;
|
|
432
|
+
currentUserEmail: z.ZodString;
|
|
433
|
+
}, z.core.$strip>;
|
|
434
|
+
}, z.core.$strip>], "context">;
|
|
435
|
+
type SuggestionsRequestBody = z.infer<typeof suggestionsRequestSchema>;
|
|
436
|
+
|
|
437
|
+
export { type ConfigurationDetailContextData, type DashboardContextData, type DeprecatedComponent, JOB_STATUSES, type JobDetailContextData, type RecentFailedJob, SUGGESTION_CATEGORIES, type Suggestion, type SuggestionCategory, type SuggestionWithId, type SuggestionsApiResponse, type SuggestionsRequestBody, type SuggestionsResponse, type UserRecentEdit, configurationDetailContextDataSchema, configurationDetailSuggestionsRequestSchema, dashboardContextDataSchema, dashboardSuggestionsRequestSchema, deprecatedComponentSchema, jobDetailContextDataSchema, jobDetailSuggestionsRequestSchema, recentFailedJobSchema, suggestionCategorySchema, suggestionSchema, suggestionWithIdSchema, suggestionsApiResponseSchema, suggestionsRequestSchema, suggestionsResponseSchema, userRecentEditSchema };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
// src/clients/chat/suggestions.ts
|
|
4
|
+
var SUGGESTION_CATEGORIES = ["error", "maintenance", "documentation"];
|
|
5
|
+
var suggestionCategorySchema = z.enum(SUGGESTION_CATEGORIES);
|
|
6
|
+
var suggestionSchema = z.object({
|
|
7
|
+
label: z.preprocess((v) => typeof v === "string" ? v.slice(0, 80) : v, z.string().max(80)),
|
|
8
|
+
prompt: z.string(),
|
|
9
|
+
priority: z.number().int().min(1).max(3),
|
|
10
|
+
category: suggestionCategorySchema,
|
|
11
|
+
reasoning: z.string()
|
|
12
|
+
});
|
|
13
|
+
var suggestionsResponseSchema = z.object({
|
|
14
|
+
suggestions: z.array(suggestionSchema).max(4)
|
|
15
|
+
});
|
|
16
|
+
var suggestionWithIdSchema = suggestionSchema.extend({
|
|
17
|
+
id: z.string()
|
|
18
|
+
});
|
|
19
|
+
var suggestionsApiResponseSchema = z.object({
|
|
20
|
+
suggestions: z.array(suggestionWithIdSchema).max(4),
|
|
21
|
+
suggestionSessionId: z.string()
|
|
22
|
+
});
|
|
23
|
+
var recentFailedJobSchema = z.object({
|
|
24
|
+
id: z.string(),
|
|
25
|
+
status: z.enum(["error", "warning"]),
|
|
26
|
+
component: z.string(),
|
|
27
|
+
configId: z.string(),
|
|
28
|
+
configName: z.string().optional(),
|
|
29
|
+
createdTime: z.string(),
|
|
30
|
+
durationSeconds: z.number().int().nonnegative().optional(),
|
|
31
|
+
errorMessage: z.string().max(200).optional()
|
|
32
|
+
});
|
|
33
|
+
var deprecatedComponentSchema = z.object({
|
|
34
|
+
id: z.string(),
|
|
35
|
+
name: z.string(),
|
|
36
|
+
type: z.string(),
|
|
37
|
+
expiredOn: z.string(),
|
|
38
|
+
configCount: z.number().int().nonnegative()
|
|
39
|
+
});
|
|
40
|
+
var userRecentEditSchema = z.object({
|
|
41
|
+
component: z.string(),
|
|
42
|
+
configId: z.string(),
|
|
43
|
+
configName: z.string(),
|
|
44
|
+
lastEdited: z.string()
|
|
45
|
+
});
|
|
46
|
+
var dashboardContextDataSchema = z.object({
|
|
47
|
+
recentFailedJobs: z.array(recentFailedJobSchema).max(5),
|
|
48
|
+
deprecatedComponents: z.array(deprecatedComponentSchema).max(5),
|
|
49
|
+
userRecentEdits: z.array(userRecentEditSchema).max(5),
|
|
50
|
+
currentUserEmail: z.string().email()
|
|
51
|
+
});
|
|
52
|
+
var JOB_STATUSES = [
|
|
53
|
+
"created",
|
|
54
|
+
"waiting",
|
|
55
|
+
"processing",
|
|
56
|
+
"success",
|
|
57
|
+
"error",
|
|
58
|
+
"terminating",
|
|
59
|
+
"terminated",
|
|
60
|
+
"cancelled",
|
|
61
|
+
"warning"
|
|
62
|
+
];
|
|
63
|
+
var jobDetailContextDataSchema = z.object({
|
|
64
|
+
job: z.object({
|
|
65
|
+
id: z.string(),
|
|
66
|
+
status: z.enum(JOB_STATUSES),
|
|
67
|
+
component: z.string(),
|
|
68
|
+
configId: z.string().optional(),
|
|
69
|
+
configName: z.string().optional(),
|
|
70
|
+
createdTime: z.string(),
|
|
71
|
+
startTime: z.string().optional(),
|
|
72
|
+
endTime: z.string().optional(),
|
|
73
|
+
durationSeconds: z.number().int().nonnegative().optional(),
|
|
74
|
+
errorMessage: z.string().max(500).optional(),
|
|
75
|
+
errorType: z.enum(["user", "application"]).optional(),
|
|
76
|
+
backendSize: z.string().optional()
|
|
77
|
+
}),
|
|
78
|
+
component: z.object({
|
|
79
|
+
id: z.string(),
|
|
80
|
+
name: z.string(),
|
|
81
|
+
type: z.string()
|
|
82
|
+
}).optional(),
|
|
83
|
+
runtimeHistory: z.object({
|
|
84
|
+
averageDurationSeconds: z.number().nonnegative().optional(),
|
|
85
|
+
minDurationSeconds: z.number().nonnegative().optional(),
|
|
86
|
+
maxDurationSeconds: z.number().nonnegative().optional(),
|
|
87
|
+
recentJobsCount: z.number().int().nonnegative(),
|
|
88
|
+
isSlowerThanAverage: z.boolean().optional(),
|
|
89
|
+
isFasterThanAverage: z.boolean().optional(),
|
|
90
|
+
percentageDifference: z.number().optional()
|
|
91
|
+
}).optional(),
|
|
92
|
+
currentUserEmail: z.string().email()
|
|
93
|
+
});
|
|
94
|
+
var configurationDetailContextDataSchema = z.object({
|
|
95
|
+
configuration: z.object({
|
|
96
|
+
id: z.string(),
|
|
97
|
+
name: z.string(),
|
|
98
|
+
description: z.string().max(500).optional(),
|
|
99
|
+
component: z.string(),
|
|
100
|
+
hasRows: z.boolean(),
|
|
101
|
+
rowCount: z.number().int().nonnegative().optional(),
|
|
102
|
+
lastChangeDescription: z.string().max(200).optional()
|
|
103
|
+
}),
|
|
104
|
+
component: z.object({
|
|
105
|
+
id: z.string(),
|
|
106
|
+
name: z.string(),
|
|
107
|
+
type: z.string()
|
|
108
|
+
}).optional(),
|
|
109
|
+
latestJobs: z.array(
|
|
110
|
+
z.object({
|
|
111
|
+
id: z.string(),
|
|
112
|
+
status: z.enum(JOB_STATUSES),
|
|
113
|
+
durationSeconds: z.number().int().nonnegative().optional(),
|
|
114
|
+
errorMessage: z.string().max(200).optional(),
|
|
115
|
+
createdTime: z.string()
|
|
116
|
+
})
|
|
117
|
+
).max(5).optional(),
|
|
118
|
+
currentUserEmail: z.string().email()
|
|
119
|
+
});
|
|
120
|
+
var dashboardSuggestionsRequestSchema = z.object({
|
|
121
|
+
context: z.literal("dashboard"),
|
|
122
|
+
data: dashboardContextDataSchema
|
|
123
|
+
});
|
|
124
|
+
var jobDetailSuggestionsRequestSchema = z.object({
|
|
125
|
+
context: z.literal("job-detail"),
|
|
126
|
+
data: jobDetailContextDataSchema
|
|
127
|
+
});
|
|
128
|
+
var configurationDetailSuggestionsRequestSchema = z.object({
|
|
129
|
+
context: z.literal("configuration-detail"),
|
|
130
|
+
data: configurationDetailContextDataSchema
|
|
131
|
+
});
|
|
132
|
+
var suggestionsRequestSchema = z.discriminatedUnion("context", [
|
|
133
|
+
dashboardSuggestionsRequestSchema,
|
|
134
|
+
jobDetailSuggestionsRequestSchema,
|
|
135
|
+
configurationDetailSuggestionsRequestSchema
|
|
136
|
+
]);
|
|
137
|
+
|
|
138
|
+
export { JOB_STATUSES, SUGGESTION_CATEGORIES, configurationDetailContextDataSchema, configurationDetailSuggestionsRequestSchema, dashboardContextDataSchema, dashboardSuggestionsRequestSchema, deprecatedComponentSchema, jobDetailContextDataSchema, jobDetailSuggestionsRequestSchema, recentFailedJobSchema, suggestionCategorySchema, suggestionSchema, suggestionWithIdSchema, suggestionsApiResponseSchema, suggestionsRequestSchema, suggestionsResponseSchema, userRecentEditSchema };
|
|
139
|
+
//# sourceMappingURL=suggestions.js.map
|
|
140
|
+
//# sourceMappingURL=suggestions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/clients/chat/suggestions.ts"],"names":[],"mappings":";;;AAGO,IAAM,qBAAA,GAAwB,CAAC,OAAA,EAAS,aAAA,EAAe,eAAe;AAEtE,IAAM,wBAAA,GAA2B,CAAA,CAAE,IAAA,CAAK,qBAAqB;AAI7D,IAAM,gBAAA,GAAmB,EAAE,MAAA,CAAO;AAAA,EACvC,OAAO,CAAA,CAAE,UAAA,CAAW,CAAC,CAAA,KAAO,OAAO,MAAM,QAAA,GAAW,CAAA,CAAE,MAAM,CAAA,EAAG,EAAE,IAAI,CAAA,EAAI,CAAA,CAAE,QAAO,CAAE,GAAA,CAAI,EAAE,CAAC,CAAA;AAAA,EAC3F,MAAA,EAAQ,EAAE,MAAA,EAAO;AAAA,EACjB,QAAA,EAAU,CAAA,CAAE,MAAA,EAAO,CAAE,GAAA,GAAM,GAAA,CAAI,CAAC,CAAA,CAAE,GAAA,CAAI,CAAC,CAAA;AAAA,EACvC,QAAA,EAAU,wBAAA;AAAA,EACV,SAAA,EAAW,EAAE,MAAA;AACf,CAAC;AAIM,IAAM,yBAAA,GAA4B,EAAE,MAAA,CAAO;AAAA,EAChD,aAAa,CAAA,CAAE,KAAA,CAAM,gBAAgB,CAAA,CAAE,IAAI,CAAC;AAC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IAAM,iCAAA,GAAoC,EAAE,MAAA,CAAO;AAAA,EACxD,OAAA,EAAS,CAAA,CAAE,OAAA,CAAQ,YAAY,CAAA;AAAA,EAC/B,IAAA,EAAM;AACR,CAAC;AAEM,IAAM,2CAAA,GAA8C,EAAE,MAAA,CAAO;AAAA,EAClE,OAAA,EAAS,CAAA,CAAE,OAAA,CAAQ,sBAAsB,CAAA;AAAA,EACzC,IAAA,EAAM;AACR,CAAC;AAEM,IAAM,wBAAA,GAA2B,CAAA,CAAE,kBAAA,CAAmB,SAAA,EAAW;AAAA,EACtE,iCAAA;AAAA,EACA,iCAAA;AAAA,EACA;AACF,CAAC","file":"suggestions.js","sourcesContent":["import { z } from 'zod';\n\n// Response schemas\nexport const SUGGESTION_CATEGORIES = ['error', 'maintenance', 'documentation'] as const;\n\nexport const suggestionCategorySchema = z.enum(SUGGESTION_CATEGORIES);\nexport type SuggestionCategory = z.infer<typeof suggestionCategorySchema>;\n\n// Schema for LLM-generated suggestions (no ID)\nexport const suggestionSchema = z.object({\n label: z.preprocess((v) => (typeof v === 'string' ? v.slice(0, 80) : v), z.string().max(80)),\n prompt: z.string(),\n priority: z.number().int().min(1).max(3),\n category: suggestionCategorySchema,\n reasoning: z.string(),\n});\nexport type Suggestion = z.infer<typeof suggestionSchema>;\n\n// Schema for LLM response (used internally)\nexport const suggestionsResponseSchema = z.object({\n suggestions: z.array(suggestionSchema).max(4),\n});\nexport type SuggestionsResponse = z.infer<typeof suggestionsResponseSchema>;\n\n// Schema for API response with IDs (used by frontend)\nexport const suggestionWithIdSchema = suggestionSchema.extend({\n id: z.string(),\n});\nexport type SuggestionWithId = z.infer<typeof suggestionWithIdSchema>;\n\nexport const suggestionsApiResponseSchema = z.object({\n suggestions: z.array(suggestionWithIdSchema).max(4),\n suggestionSessionId: z.string(),\n});\nexport type SuggestionsApiResponse = z.infer<typeof suggestionsApiResponseSchema>;\n\n// Request schemas\nexport const recentFailedJobSchema = z.object({\n id: z.string(),\n status: z.enum(['error', 'warning']),\n component: z.string(),\n configId: z.string(),\n configName: z.string().optional(),\n createdTime: z.string(),\n durationSeconds: z.number().int().nonnegative().optional(),\n errorMessage: z.string().max(200).optional(),\n});\nexport type RecentFailedJob = z.infer<typeof recentFailedJobSchema>;\n\nexport const deprecatedComponentSchema = z.object({\n id: z.string(),\n name: z.string(),\n type: z.string(),\n expiredOn: z.string(),\n configCount: z.number().int().nonnegative(),\n});\nexport type DeprecatedComponent = z.infer<typeof deprecatedComponentSchema>;\n\nexport const userRecentEditSchema = z.object({\n component: z.string(),\n configId: z.string(),\n configName: z.string(),\n lastEdited: z.string(),\n});\nexport type UserRecentEdit = z.infer<typeof userRecentEditSchema>;\n\nexport const dashboardContextDataSchema = z.object({\n recentFailedJobs: z.array(recentFailedJobSchema).max(5),\n deprecatedComponents: z.array(deprecatedComponentSchema).max(5),\n userRecentEdits: z.array(userRecentEditSchema).max(5),\n currentUserEmail: z.string().email(),\n});\nexport type DashboardContextData = z.infer<typeof dashboardContextDataSchema>;\n\nexport const JOB_STATUSES = [\n 'created',\n 'waiting',\n 'processing',\n 'success',\n 'error',\n 'terminating',\n 'terminated',\n 'cancelled',\n 'warning',\n] as const;\n\nexport const jobDetailContextDataSchema = z.object({\n job: z.object({\n id: z.string(),\n status: z.enum(JOB_STATUSES),\n component: z.string(),\n configId: z.string().optional(),\n configName: z.string().optional(),\n createdTime: z.string(),\n startTime: z.string().optional(),\n endTime: z.string().optional(),\n durationSeconds: z.number().int().nonnegative().optional(),\n errorMessage: z.string().max(500).optional(),\n errorType: z.enum(['user', 'application']).optional(),\n backendSize: z.string().optional(),\n }),\n component: z\n .object({\n id: z.string(),\n name: z.string(),\n type: z.string(),\n })\n .optional(),\n runtimeHistory: z\n .object({\n averageDurationSeconds: z.number().nonnegative().optional(),\n minDurationSeconds: z.number().nonnegative().optional(),\n maxDurationSeconds: z.number().nonnegative().optional(),\n recentJobsCount: z.number().int().nonnegative(),\n isSlowerThanAverage: z.boolean().optional(),\n isFasterThanAverage: z.boolean().optional(),\n percentageDifference: z.number().optional(),\n })\n .optional(),\n currentUserEmail: z.string().email(),\n});\nexport type JobDetailContextData = z.infer<typeof jobDetailContextDataSchema>;\n\nexport const configurationDetailContextDataSchema = z.object({\n configuration: z.object({\n id: z.string(),\n name: z.string(),\n description: z.string().max(500).optional(),\n component: z.string(),\n hasRows: z.boolean(),\n rowCount: z.number().int().nonnegative().optional(),\n lastChangeDescription: z.string().max(200).optional(),\n }),\n component: z\n .object({\n id: z.string(),\n name: z.string(),\n type: z.string(),\n })\n .optional(),\n latestJobs: z\n .array(\n z.object({\n id: z.string(),\n status: z.enum(JOB_STATUSES),\n durationSeconds: z.number().int().nonnegative().optional(),\n errorMessage: z.string().max(200).optional(),\n createdTime: z.string(),\n }),\n )\n .max(5)\n .optional(),\n currentUserEmail: z.string().email(),\n});\nexport type ConfigurationDetailContextData = z.infer<typeof configurationDetailContextDataSchema>;\n\nexport const dashboardSuggestionsRequestSchema = z.object({\n context: z.literal('dashboard'),\n data: dashboardContextDataSchema,\n});\n\nexport const jobDetailSuggestionsRequestSchema = z.object({\n context: z.literal('job-detail'),\n data: jobDetailContextDataSchema,\n});\n\nexport const configurationDetailSuggestionsRequestSchema = z.object({\n context: z.literal('configuration-detail'),\n data: configurationDetailContextDataSchema,\n});\n\nexport const suggestionsRequestSchema = z.discriminatedUnion('context', [\n dashboardSuggestionsRequestSchema,\n jobDetailSuggestionsRequestSchema,\n configurationDetailSuggestionsRequestSchema,\n]);\nexport type SuggestionsRequestBody = z.infer<typeof suggestionsRequestSchema>;\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var zod = require('zod');
|
|
4
|
+
|
|
5
|
+
// src/clients/chat/types.ts
|
|
6
|
+
var askUserQuestionAnswersSchema = zod.z.record(zod.z.string(), zod.z.string());
|
|
7
|
+
|
|
8
|
+
exports.askUserQuestionAnswersSchema = askUserQuestionAnswersSchema;
|
|
9
|
+
//# sourceMappingURL=types.cjs.map
|
|
10
|
+
//# sourceMappingURL=types.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/clients/chat/types.ts"],"names":["z"],"mappings":";;;;;AAcO,IAAM,4BAAA,GAA+BA,MAAE,MAAA,CAAOA,KAAA,CAAE,QAAO,EAAGA,KAAA,CAAE,QAAQ","file":"types.cjs","sourcesContent":["import { z } from 'zod';\n\nimport type {\n OpenapiBodyType,\n OpenapiPathType,\n OpenapiQueryType,\n OpenapiReturnType,\n} from '../../fetchClient';\n\nimport type { components, paths } from './__generated__/schema';\n\n// Wire-format answer map produced by the AskUserQuestion approval flow.\n// Keys are full question text; values are user-selected labels (multi-select\n// joined with \", \"). Shared between kbc-ui (sender) and kai-agent (receiver).\nexport const askUserQuestionAnswersSchema = z.record(z.string(), z.string());\nexport type AskUserQuestionAnswers = z.Infer<typeof askUserQuestionAnswersSchema>;\n\n// Query Types\nexport type GetHistoryQuery = OpenapiQueryType<paths['/history']['get']>;\nexport type GetVotesQuery = OpenapiQueryType<paths['/vote']['get']>;\n\n// Path Types\nexport type GetChatPath = OpenapiPathType<paths['/chat/{id}']['get']>;\n\n// Body Types\nexport type VoteRequest = OpenapiBodyType<paths['/vote']['patch']>;\nexport type ChatRequest = OpenapiBodyType<paths['/chat']['post']>;\n\n// Return Types\nexport type HistoryResponse = OpenapiReturnType<paths['/history']['get']>;\nexport type ChatWithMessages = OpenapiReturnType<paths['/chat/{id}']['get']>;\nexport type VotesResponse = OpenapiReturnType<paths['/vote']['get']>;\nexport type UsageResponse = OpenapiReturnType<paths['/usage']['get']>;\n\n// Schema Types\nexport type Chat = components['schemas']['Chat'];\nexport type Vote = VotesResponse[number];\nexport type ChatWithMessage = components['schemas']['ChatWithMessages'];\nexport type ChatMessage = ChatWithMessage['messages'][number];\nexport type UserMessage = components['schemas']['Message'];\nexport type TextPart = UserMessage['parts'][number];\nexport type MessageStatus = NonNullable<UserMessage['status']>;\nexport type AgentSettings = components['schemas']['AgentSettings'];\nexport type UpdateAgentSettingsRequest = components['schemas']['UpdateAgentSettingsRequest'];\nexport type UserAgentSettings = components['schemas']['UserAgentSettings'];\nexport type UpdateUserAgentSettingsRequest =\n components['schemas']['UpdateUserAgentSettingsRequest'];\nexport type ToolPermissionValue = components['schemas']['ToolPermissionValue'];\nexport type ToolInfo = components['schemas']['ToolInfo'];\nexport type ToolsListResponse = components['schemas']['ToolsListResponse'];\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import 'zod';
|
|
2
|
+
import '../types-C7mpAfq-.cjs';
|
|
3
|
+
export { A as AgentSettings, g as AskUserQuestionAnswers, h as Chat, i as ChatMessage, C as ChatRequest, j as ChatWithMessage, k as ChatWithMessages, a as GetChatPath, G as GetHistoryQuery, b as GetVotesQuery, H as HistoryResponse, M as MessageStatus, l as TextPart, m as ToolInfo, n as ToolPermissionValue, T as ToolsListResponse, d as UpdateAgentSettingsRequest, f as UpdateUserAgentSettingsRequest, U as UsageResponse, e as UserAgentSettings, o as UserMessage, p as Vote, V as VoteRequest, q as VotesResponse, r as askUserQuestionAnswersSchema } from '../types-DJ6nbNq5.cjs';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import 'zod';
|
|
2
|
+
import '../types-C7mpAfq-.js';
|
|
3
|
+
export { A as AgentSettings, g as AskUserQuestionAnswers, h as Chat, i as ChatMessage, C as ChatRequest, j as ChatWithMessage, k as ChatWithMessages, a as GetChatPath, G as GetHistoryQuery, b as GetVotesQuery, H as HistoryResponse, M as MessageStatus, l as TextPart, m as ToolInfo, n as ToolPermissionValue, T as ToolsListResponse, d as UpdateAgentSettingsRequest, f as UpdateUserAgentSettingsRequest, U as UsageResponse, e as UserAgentSettings, o as UserMessage, p as Vote, V as VoteRequest, q as VotesResponse, r as askUserQuestionAnswersSchema } from '../types-BjrNNn5I.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/clients/chat/types.ts"],"names":[],"mappings":";;;AAcO,IAAM,4BAAA,GAA+B,EAAE,MAAA,CAAO,CAAA,CAAE,QAAO,EAAG,CAAA,CAAE,QAAQ","file":"types.js","sourcesContent":["import { z } from 'zod';\n\nimport type {\n OpenapiBodyType,\n OpenapiPathType,\n OpenapiQueryType,\n OpenapiReturnType,\n} from '../../fetchClient';\n\nimport type { components, paths } from './__generated__/schema';\n\n// Wire-format answer map produced by the AskUserQuestion approval flow.\n// Keys are full question text; values are user-selected labels (multi-select\n// joined with \", \"). Shared between kbc-ui (sender) and kai-agent (receiver).\nexport const askUserQuestionAnswersSchema = z.record(z.string(), z.string());\nexport type AskUserQuestionAnswers = z.Infer<typeof askUserQuestionAnswersSchema>;\n\n// Query Types\nexport type GetHistoryQuery = OpenapiQueryType<paths['/history']['get']>;\nexport type GetVotesQuery = OpenapiQueryType<paths['/vote']['get']>;\n\n// Path Types\nexport type GetChatPath = OpenapiPathType<paths['/chat/{id}']['get']>;\n\n// Body Types\nexport type VoteRequest = OpenapiBodyType<paths['/vote']['patch']>;\nexport type ChatRequest = OpenapiBodyType<paths['/chat']['post']>;\n\n// Return Types\nexport type HistoryResponse = OpenapiReturnType<paths['/history']['get']>;\nexport type ChatWithMessages = OpenapiReturnType<paths['/chat/{id}']['get']>;\nexport type VotesResponse = OpenapiReturnType<paths['/vote']['get']>;\nexport type UsageResponse = OpenapiReturnType<paths['/usage']['get']>;\n\n// Schema Types\nexport type Chat = components['schemas']['Chat'];\nexport type Vote = VotesResponse[number];\nexport type ChatWithMessage = components['schemas']['ChatWithMessages'];\nexport type ChatMessage = ChatWithMessage['messages'][number];\nexport type UserMessage = components['schemas']['Message'];\nexport type TextPart = UserMessage['parts'][number];\nexport type MessageStatus = NonNullable<UserMessage['status']>;\nexport type AgentSettings = components['schemas']['AgentSettings'];\nexport type UpdateAgentSettingsRequest = components['schemas']['UpdateAgentSettingsRequest'];\nexport type UserAgentSettings = components['schemas']['UserAgentSettings'];\nexport type UpdateUserAgentSettingsRequest =\n components['schemas']['UpdateUserAgentSettingsRequest'];\nexport type ToolPermissionValue = components['schemas']['ToolPermissionValue'];\nexport type ToolInfo = components['schemas']['ToolInfo'];\nexport type ToolsListResponse = components['schemas']['ToolsListResponse'];\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { a as CreateFetchClientOptions, P as PathParam, Q as QueryParam, b as BodyParam, F as FetchClientOptions, A as ApiResponse } from './types-DgaMV8FF.cjs';
|
|
2
|
+
|
|
3
|
+
type FetchParams<Path = PathParam, Query = QueryParam, Body = BodyParam> = {
|
|
4
|
+
path?: Path;
|
|
5
|
+
query?: Query;
|
|
6
|
+
body?: Body;
|
|
7
|
+
};
|
|
8
|
+
type FetchMethod = <Data, Path = PathParam, Query = QueryParam, Body = BodyParam>(url: string, params: FetchParams<Path, Query, Body>, options?: FetchClientOptions) => Promise<ApiResponse<Data>>;
|
|
9
|
+
type FetchClient = {
|
|
10
|
+
get: FetchMethod;
|
|
11
|
+
post: FetchMethod;
|
|
12
|
+
put: FetchMethod;
|
|
13
|
+
patch: FetchMethod;
|
|
14
|
+
delete: FetchMethod;
|
|
15
|
+
};
|
|
16
|
+
declare const createGenericFetchClient: (defaultOptions: CreateFetchClientOptions) => FetchClient;
|
|
17
|
+
|
|
18
|
+
export { createGenericFetchClient as c };
|