@tiny-fish/cli 0.53.1-next.444 → 0.53.1-next.445
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/dist/commands/dataset.js +1 -1
- package/dist/lib/client.d.ts +16 -0
- package/dist/lib/datasets.d.ts +16 -0
- package/dist/lib/datasets.js +4 -0
- package/package.json +1 -1
package/dist/commands/dataset.js
CHANGED
|
@@ -13,7 +13,7 @@ function printDataset(d, pretty, columns = false) {
|
|
|
13
13
|
if (d.run)
|
|
14
14
|
outLine(`Run: ${d.run.id} ${d.run.status}${d.run.error ? `: ${d.run.error}` : ''}`);
|
|
15
15
|
if (columns) {
|
|
16
|
-
const names = d.spec.columns.map((c) => `${c.name}(${c.type})${c.is_primary_key ? '*' : ''}`);
|
|
16
|
+
const names = d.spec.columns.map((c) => `${c.name}(${c.type})${c.is_primary_key ? '*' : ''}${c.is_unique ? '!' : ''}`);
|
|
17
17
|
outLine(`Columns: ${names.join(', ')}`);
|
|
18
18
|
}
|
|
19
19
|
}
|
package/dist/lib/client.d.ts
CHANGED
|
@@ -229,6 +229,9 @@ export declare function createDataset(req: datasets.CreateRequest, apiKey: strin
|
|
|
229
229
|
is_primary_key: boolean;
|
|
230
230
|
label?: string | undefined;
|
|
231
231
|
retrieval_hint?: string | undefined;
|
|
232
|
+
format?: string | undefined;
|
|
233
|
+
examples?: string[] | undefined;
|
|
234
|
+
is_unique?: boolean | undefined;
|
|
232
235
|
}[];
|
|
233
236
|
keep_when?: {
|
|
234
237
|
[x: string]: unknown;
|
|
@@ -261,6 +264,9 @@ export declare function planDataset(prompt: string, apiKey: string): Promise<{
|
|
|
261
264
|
is_primary_key: boolean;
|
|
262
265
|
label?: string | undefined;
|
|
263
266
|
retrieval_hint?: string | undefined;
|
|
267
|
+
format?: string | undefined;
|
|
268
|
+
examples?: string[] | undefined;
|
|
269
|
+
is_unique?: boolean | undefined;
|
|
264
270
|
}[];
|
|
265
271
|
keep_when?: {
|
|
266
272
|
[x: string]: unknown;
|
|
@@ -285,6 +291,9 @@ export declare function listDatasets(opts: datasets.ListQuery, apiKey: string):
|
|
|
285
291
|
is_primary_key: boolean;
|
|
286
292
|
label?: string | undefined;
|
|
287
293
|
retrieval_hint?: string | undefined;
|
|
294
|
+
format?: string | undefined;
|
|
295
|
+
examples?: string[] | undefined;
|
|
296
|
+
is_unique?: boolean | undefined;
|
|
288
297
|
}[];
|
|
289
298
|
keep_when?: {
|
|
290
299
|
[x: string]: unknown;
|
|
@@ -325,6 +334,9 @@ export declare function getDataset(id: string, apiKey: string): Promise<{
|
|
|
325
334
|
is_primary_key: boolean;
|
|
326
335
|
label?: string | undefined;
|
|
327
336
|
retrieval_hint?: string | undefined;
|
|
337
|
+
format?: string | undefined;
|
|
338
|
+
examples?: string[] | undefined;
|
|
339
|
+
is_unique?: boolean | undefined;
|
|
328
340
|
}[];
|
|
329
341
|
keep_when?: {
|
|
330
342
|
[x: string]: unknown;
|
|
@@ -352,6 +364,7 @@ export declare function getDatasetRows(id: string, opts: datasets.RowsQuery, api
|
|
|
352
364
|
label: string;
|
|
353
365
|
type: string;
|
|
354
366
|
is_primary_key: boolean;
|
|
367
|
+
is_unique?: boolean | undefined;
|
|
355
368
|
}[];
|
|
356
369
|
rows: {
|
|
357
370
|
[x: string]: unknown;
|
|
@@ -376,6 +389,9 @@ export declare function populateDataset(id: string, req: datasets.PopulateReques
|
|
|
376
389
|
is_primary_key: boolean;
|
|
377
390
|
label?: string | undefined;
|
|
378
391
|
retrieval_hint?: string | undefined;
|
|
392
|
+
format?: string | undefined;
|
|
393
|
+
examples?: string[] | undefined;
|
|
394
|
+
is_unique?: boolean | undefined;
|
|
379
395
|
}[];
|
|
380
396
|
keep_when?: {
|
|
381
397
|
[x: string]: unknown;
|
package/dist/lib/datasets.d.ts
CHANGED
|
@@ -34,6 +34,9 @@ export declare const specSchema: z.ZodObject<{
|
|
|
34
34
|
type: z.ZodString;
|
|
35
35
|
is_primary_key: z.ZodBoolean;
|
|
36
36
|
retrieval_hint: z.ZodOptional<z.ZodString>;
|
|
37
|
+
format: z.ZodOptional<z.ZodString>;
|
|
38
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
39
|
+
is_unique: z.ZodOptional<z.ZodBoolean>;
|
|
37
40
|
}, z.core.$loose>>;
|
|
38
41
|
keep_when: z.ZodOptional<z.ZodObject<{
|
|
39
42
|
column: z.ZodString;
|
|
@@ -65,6 +68,9 @@ export declare const datasetSchema: z.ZodObject<{
|
|
|
65
68
|
type: z.ZodString;
|
|
66
69
|
is_primary_key: z.ZodBoolean;
|
|
67
70
|
retrieval_hint: z.ZodOptional<z.ZodString>;
|
|
71
|
+
format: z.ZodOptional<z.ZodString>;
|
|
72
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
|
+
is_unique: z.ZodOptional<z.ZodBoolean>;
|
|
68
74
|
}, z.core.$loose>>;
|
|
69
75
|
keep_when: z.ZodOptional<z.ZodObject<{
|
|
70
76
|
column: z.ZodString;
|
|
@@ -106,6 +112,9 @@ export declare const createRequestSchema: z.ZodObject<{
|
|
|
106
112
|
type: z.ZodString;
|
|
107
113
|
is_primary_key: z.ZodBoolean;
|
|
108
114
|
retrieval_hint: z.ZodOptional<z.ZodString>;
|
|
115
|
+
format: z.ZodOptional<z.ZodString>;
|
|
116
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
117
|
+
is_unique: z.ZodOptional<z.ZodBoolean>;
|
|
109
118
|
}, z.core.$loose>>;
|
|
110
119
|
keep_when: z.ZodOptional<z.ZodObject<{
|
|
111
120
|
column: z.ZodString;
|
|
@@ -127,6 +136,9 @@ export declare const planResponseSchema: z.ZodObject<{
|
|
|
127
136
|
type: z.ZodString;
|
|
128
137
|
is_primary_key: z.ZodBoolean;
|
|
129
138
|
retrieval_hint: z.ZodOptional<z.ZodString>;
|
|
139
|
+
format: z.ZodOptional<z.ZodString>;
|
|
140
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
141
|
+
is_unique: z.ZodOptional<z.ZodBoolean>;
|
|
130
142
|
}, z.core.$loose>>;
|
|
131
143
|
keep_when: z.ZodOptional<z.ZodObject<{
|
|
132
144
|
column: z.ZodString;
|
|
@@ -151,6 +163,9 @@ export declare const listSchema: z.ZodObject<{
|
|
|
151
163
|
type: z.ZodString;
|
|
152
164
|
is_primary_key: z.ZodBoolean;
|
|
153
165
|
retrieval_hint: z.ZodOptional<z.ZodString>;
|
|
166
|
+
format: z.ZodOptional<z.ZodString>;
|
|
167
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
168
|
+
is_unique: z.ZodOptional<z.ZodBoolean>;
|
|
154
169
|
}, z.core.$loose>>;
|
|
155
170
|
keep_when: z.ZodOptional<z.ZodObject<{
|
|
156
171
|
column: z.ZodString;
|
|
@@ -196,6 +211,7 @@ export declare const rowsSchema: z.ZodObject<{
|
|
|
196
211
|
label: z.ZodString;
|
|
197
212
|
type: z.ZodString;
|
|
198
213
|
is_primary_key: z.ZodBoolean;
|
|
214
|
+
is_unique: z.ZodOptional<z.ZodBoolean>;
|
|
199
215
|
}, z.core.$loose>>;
|
|
200
216
|
rows: z.ZodArray<z.ZodObject<{
|
|
201
217
|
_id: z.ZodString;
|
package/dist/lib/datasets.js
CHANGED
|
@@ -37,6 +37,9 @@ const columnSchema = z.looseObject({
|
|
|
37
37
|
type: z.string(),
|
|
38
38
|
is_primary_key: z.boolean(),
|
|
39
39
|
retrieval_hint: z.string().optional(),
|
|
40
|
+
format: z.string().optional(),
|
|
41
|
+
examples: z.array(z.string()).optional(),
|
|
42
|
+
is_unique: z.boolean().optional(),
|
|
40
43
|
});
|
|
41
44
|
export const specSchema = z.looseObject({
|
|
42
45
|
name: z.string().min(1),
|
|
@@ -96,6 +99,7 @@ export const rowsSchema = z.looseObject({
|
|
|
96
99
|
label: z.string(),
|
|
97
100
|
type: z.string(),
|
|
98
101
|
is_primary_key: z.boolean(),
|
|
102
|
+
is_unique: z.boolean().optional(),
|
|
99
103
|
})),
|
|
100
104
|
rows: z.array(z.looseObject({ _id: z.string(), data: z.record(z.string(), z.unknown()) })),
|
|
101
105
|
truncated: z.boolean(),
|