@nodetool-ai/protocol 0.7.0-rc.11
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/agent-protocol.d.ts +217 -0
- package/dist/agent-protocol.d.ts.map +1 -0
- package/dist/agent-protocol.js +85 -0
- package/dist/agent-protocol.js.map +1 -0
- package/dist/api-schemas/api-error-code.d.ts +21 -0
- package/dist/api-schemas/api-error-code.d.ts.map +1 -0
- package/dist/api-schemas/api-error-code.js +20 -0
- package/dist/api-schemas/api-error-code.js.map +1 -0
- package/dist/api-schemas/assets.d.ts +162 -0
- package/dist/api-schemas/assets.d.ts.map +1 -0
- package/dist/api-schemas/assets.js +119 -0
- package/dist/api-schemas/assets.js.map +1 -0
- package/dist/api-schemas/collections.d.ts +64 -0
- package/dist/api-schemas/collections.d.ts.map +1 -0
- package/dist/api-schemas/collections.js +67 -0
- package/dist/api-schemas/collections.js.map +1 -0
- package/dist/api-schemas/costs.d.ts +168 -0
- package/dist/api-schemas/costs.d.ts.map +1 -0
- package/dist/api-schemas/costs.js +90 -0
- package/dist/api-schemas/costs.js.map +1 -0
- package/dist/api-schemas/error-helpers.d.ts +19 -0
- package/dist/api-schemas/error-helpers.d.ts.map +1 -0
- package/dist/api-schemas/error-helpers.js +7 -0
- package/dist/api-schemas/error-helpers.js.map +1 -0
- package/dist/api-schemas/files.d.ts +38 -0
- package/dist/api-schemas/files.d.ts.map +1 -0
- package/dist/api-schemas/files.js +25 -0
- package/dist/api-schemas/files.js.map +1 -0
- package/dist/api-schemas/fonts.d.ts +6 -0
- package/dist/api-schemas/fonts.d.ts.map +1 -0
- package/dist/api-schemas/fonts.js +8 -0
- package/dist/api-schemas/fonts.js.map +1 -0
- package/dist/api-schemas/index.d.ts +20 -0
- package/dist/api-schemas/index.d.ts.map +1 -0
- package/dist/api-schemas/index.js +20 -0
- package/dist/api-schemas/index.js.map +1 -0
- package/dist/api-schemas/jobs.d.ts +77 -0
- package/dist/api-schemas/jobs.d.ts.map +1 -0
- package/dist/api-schemas/jobs.js +60 -0
- package/dist/api-schemas/jobs.js.map +1 -0
- package/dist/api-schemas/mcp-config.d.ts +119 -0
- package/dist/api-schemas/mcp-config.d.ts.map +1 -0
- package/dist/api-schemas/mcp-config.js +59 -0
- package/dist/api-schemas/mcp-config.js.map +1 -0
- package/dist/api-schemas/messages.d.ts +77 -0
- package/dist/api-schemas/messages.d.ts.map +1 -0
- package/dist/api-schemas/messages.js +81 -0
- package/dist/api-schemas/messages.js.map +1 -0
- package/dist/api-schemas/models.d.ts +202 -0
- package/dist/api-schemas/models.d.ts.map +1 -0
- package/dist/api-schemas/models.js +135 -0
- package/dist/api-schemas/models.js.map +1 -0
- package/dist/api-schemas/nodes.d.ts +23 -0
- package/dist/api-schemas/nodes.d.ts.map +1 -0
- package/dist/api-schemas/nodes.js +20 -0
- package/dist/api-schemas/nodes.js.map +1 -0
- package/dist/api-schemas/settings.d.ts +75 -0
- package/dist/api-schemas/settings.d.ts.map +1 -0
- package/dist/api-schemas/settings.js +66 -0
- package/dist/api-schemas/settings.js.map +1 -0
- package/dist/api-schemas/skills.d.ts +19 -0
- package/dist/api-schemas/skills.d.ts.map +1 -0
- package/dist/api-schemas/skills.js +16 -0
- package/dist/api-schemas/skills.js.map +1 -0
- package/dist/api-schemas/storage.d.ts +46 -0
- package/dist/api-schemas/storage.d.ts.map +1 -0
- package/dist/api-schemas/storage.js +32 -0
- package/dist/api-schemas/storage.js.map +1 -0
- package/dist/api-schemas/threads.d.ts +58 -0
- package/dist/api-schemas/threads.d.ts.map +1 -0
- package/dist/api-schemas/threads.js +52 -0
- package/dist/api-schemas/threads.js.map +1 -0
- package/dist/api-schemas/users.d.ts +49 -0
- package/dist/api-schemas/users.d.ts.map +1 -0
- package/dist/api-schemas/users.js +44 -0
- package/dist/api-schemas/users.js.map +1 -0
- package/dist/api-schemas/workflows.d.ts +489 -0
- package/dist/api-schemas/workflows.d.ts.map +1 -0
- package/dist/api-schemas/workflows.js +248 -0
- package/dist/api-schemas/workflows.js.map +1 -0
- package/dist/api-schemas/workspace.d.ts +88 -0
- package/dist/api-schemas/workspace.d.ts.map +1 -0
- package/dist/api-schemas/workspace.js +65 -0
- package/dist/api-schemas/workspace.js.map +1 -0
- package/dist/api-types.d.ts +809 -0
- package/dist/api-types.d.ts.map +1 -0
- package/dist/api-types.js +9 -0
- package/dist/api-types.js.map +1 -0
- package/dist/graph.d.ts +75 -0
- package/dist/graph.d.ts.map +1 -0
- package/dist/graph.js +15 -0
- package/dist/graph.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/messages.d.ts +334 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +71 -0
- package/dist/messages.js.map +1 -0
- package/dist/toolSchemas.d.ts +108 -0
- package/dist/toolSchemas.d.ts.map +1 -0
- package/dist/toolSchemas.js +205 -0
- package/dist/toolSchemas.js.map +1 -0
- package/dist/type-metadata.d.ts +39 -0
- package/dist/type-metadata.d.ts.map +1 -0
- package/dist/type-metadata.js +126 -0
- package/dist/type-metadata.js.map +1 -0
- package/dist/typecheck.d.ts +17 -0
- package/dist/typecheck.d.ts.map +1 -0
- package/dist/typecheck.js +63 -0
- package/dist/typecheck.js.map +1 -0
- package/dist/wrap-primitives.d.ts +18 -0
- package/dist/wrap-primitives.d.ts.map +1 -0
- package/dist/wrap-primitives.js +28 -0
- package/dist/wrap-primitives.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for the storage domain — JSON ops only.
|
|
3
|
+
* Binary PUT/GET stay as REST.
|
|
4
|
+
*/
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
export declare const storageEntrySchema: z.ZodObject<{
|
|
7
|
+
key: z.ZodString;
|
|
8
|
+
size: z.ZodNumber;
|
|
9
|
+
content_type: z.ZodString;
|
|
10
|
+
last_modified: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type StorageEntry = z.infer<typeof storageEntrySchema>;
|
|
13
|
+
export declare const listStorageInput: z.ZodObject<{
|
|
14
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const listStorageOutput: z.ZodObject<{
|
|
17
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
18
|
+
key: z.ZodString;
|
|
19
|
+
size: z.ZodNumber;
|
|
20
|
+
content_type: z.ZodString;
|
|
21
|
+
last_modified: z.ZodString;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
count: z.ZodNumber;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type ListStorageInput = z.infer<typeof listStorageInput>;
|
|
26
|
+
export type ListStorageOutput = z.infer<typeof listStorageOutput>;
|
|
27
|
+
export declare const storageMetadataInput: z.ZodObject<{
|
|
28
|
+
key: z.ZodString;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export declare const storageMetadataOutput: z.ZodObject<{
|
|
31
|
+
key: z.ZodString;
|
|
32
|
+
size: z.ZodNumber;
|
|
33
|
+
content_type: z.ZodString;
|
|
34
|
+
last_modified: z.ZodString;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type StorageMetadataInput = z.infer<typeof storageMetadataInput>;
|
|
37
|
+
export type StorageMetadataOutput = z.infer<typeof storageMetadataOutput>;
|
|
38
|
+
export declare const storageDeleteInput: z.ZodObject<{
|
|
39
|
+
key: z.ZodString;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export declare const storageDeleteOutput: z.ZodObject<{
|
|
42
|
+
ok: z.ZodLiteral<true>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export type StorageDeleteInput = z.infer<typeof storageDeleteInput>;
|
|
45
|
+
export type StorageDeleteOutput = z.infer<typeof storageDeleteOutput>;
|
|
46
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/api-schemas/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,kBAAkB;;;;;iBAK7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,gBAAgB;;iBAE3B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;iBAG5B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAIlE,eAAO,MAAM,oBAAoB;;iBAE/B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;iBAAqB,CAAC;AAExD,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACxE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAI1E,eAAO,MAAM,kBAAkB;;iBAE7B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;iBAE9B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACpE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for the storage domain — JSON ops only.
|
|
3
|
+
* Binary PUT/GET stay as REST.
|
|
4
|
+
*/
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
// ── storage.list ─────────────────────────────────────────────────────────────
|
|
7
|
+
export const storageEntrySchema = z.object({
|
|
8
|
+
key: z.string(),
|
|
9
|
+
size: z.number(),
|
|
10
|
+
content_type: z.string(),
|
|
11
|
+
last_modified: z.string()
|
|
12
|
+
});
|
|
13
|
+
export const listStorageInput = z.object({
|
|
14
|
+
prefix: z.string().optional()
|
|
15
|
+
});
|
|
16
|
+
export const listStorageOutput = z.object({
|
|
17
|
+
entries: z.array(storageEntrySchema),
|
|
18
|
+
count: z.number()
|
|
19
|
+
});
|
|
20
|
+
// ── storage.metadata ─────────────────────────────────────────────────────────
|
|
21
|
+
export const storageMetadataInput = z.object({
|
|
22
|
+
key: z.string().min(1)
|
|
23
|
+
});
|
|
24
|
+
export const storageMetadataOutput = storageEntrySchema;
|
|
25
|
+
// ── storage.delete ───────────────────────────────────────────────────────────
|
|
26
|
+
export const storageDeleteInput = z.object({
|
|
27
|
+
key: z.string().min(1)
|
|
28
|
+
});
|
|
29
|
+
export const storageDeleteOutput = z.object({
|
|
30
|
+
ok: z.literal(true)
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/api-schemas/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gFAAgF;AAEhF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC;IACpC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAKH,gFAAgF;AAEhF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAKxD,gFAAgF;AAEhF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;CACpB,CAAC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const threadResponse: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
user_id: z.ZodString;
|
|
5
|
+
title: z.ZodString;
|
|
6
|
+
created_at: z.ZodString;
|
|
7
|
+
updated_at: z.ZodString;
|
|
8
|
+
etag: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type ThreadResponse = z.infer<typeof threadResponse>;
|
|
11
|
+
export declare const listInput: z.ZodObject<{
|
|
12
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
13
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
14
|
+
reverse: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export type ListInput = z.infer<typeof listInput>;
|
|
17
|
+
export declare const listOutput: z.ZodObject<{
|
|
18
|
+
threads: z.ZodArray<z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
user_id: z.ZodString;
|
|
21
|
+
title: z.ZodString;
|
|
22
|
+
created_at: z.ZodString;
|
|
23
|
+
updated_at: z.ZodString;
|
|
24
|
+
etag: z.ZodString;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
next: z.ZodNullable<z.ZodString>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type ListOutput = z.infer<typeof listOutput>;
|
|
29
|
+
export declare const getInput: z.ZodObject<{
|
|
30
|
+
id: z.ZodString;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export type GetInput = z.infer<typeof getInput>;
|
|
33
|
+
export declare const createInput: z.ZodObject<{
|
|
34
|
+
title: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type CreateInput = z.infer<typeof createInput>;
|
|
37
|
+
export declare const updateInput: z.ZodObject<{
|
|
38
|
+
id: z.ZodString;
|
|
39
|
+
title: z.ZodString;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export type UpdateInput = z.infer<typeof updateInput>;
|
|
42
|
+
export declare const deleteInput: z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
export type DeleteInput = z.infer<typeof deleteInput>;
|
|
46
|
+
export declare const deleteOutput: z.ZodObject<{
|
|
47
|
+
ok: z.ZodLiteral<true>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export type DeleteOutput = z.infer<typeof deleteOutput>;
|
|
50
|
+
export declare const summarizeInput: z.ZodObject<{
|
|
51
|
+
id: z.ZodString;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type SummarizeInput = z.infer<typeof summarizeInput>;
|
|
54
|
+
export declare const summarizeOutput: z.ZodObject<{
|
|
55
|
+
title: z.ZodString;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export type SummarizeOutput = z.infer<typeof summarizeOutput>;
|
|
58
|
+
//# sourceMappingURL=threads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threads.d.ts","sourceRoot":"","sources":["../../src/api-schemas/threads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,cAAc;;;;;;;iBAOzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAG5D,eAAO,MAAM,SAAS;;;;iBAIpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD,eAAO,MAAM,UAAU;;;;;;;;;;iBAGrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAGpD,eAAO,MAAM,QAAQ;;iBAEnB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAIhD,eAAO,MAAM,WAAW;;iBAEtB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAGtD,eAAO,MAAM,WAAW;;;iBAGtB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAItD,eAAO,MAAM,WAAW;;iBAEtB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,eAAO,MAAM,YAAY;;iBAEvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAIxD,eAAO,MAAM,cAAc;;iBAEzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,eAAO,MAAM,eAAe;;iBAE1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// ── Thread response ──────────────────────────────────────────────
|
|
3
|
+
// Mirrors `toThreadResponse` in the legacy http-api.ts handler.
|
|
4
|
+
export const threadResponse = z.object({
|
|
5
|
+
id: z.string(),
|
|
6
|
+
user_id: z.string(),
|
|
7
|
+
title: z.string(),
|
|
8
|
+
created_at: z.string(),
|
|
9
|
+
updated_at: z.string(),
|
|
10
|
+
etag: z.string()
|
|
11
|
+
});
|
|
12
|
+
// ── list (GET /api/threads) ──────────────────────────────────────
|
|
13
|
+
export const listInput = z.object({
|
|
14
|
+
limit: z.number().int().min(1).max(500).default(10),
|
|
15
|
+
cursor: z.string().optional(),
|
|
16
|
+
reverse: z.boolean().optional()
|
|
17
|
+
});
|
|
18
|
+
export const listOutput = z.object({
|
|
19
|
+
threads: z.array(threadResponse),
|
|
20
|
+
next: z.string().nullable()
|
|
21
|
+
});
|
|
22
|
+
// ── get (GET /api/threads/:id) ───────────────────────────────────
|
|
23
|
+
export const getInput = z.object({
|
|
24
|
+
id: z.string().min(1)
|
|
25
|
+
});
|
|
26
|
+
// ── create (POST /api/threads) ───────────────────────────────────
|
|
27
|
+
// `title` is optional; defaults to "New Thread" server-side.
|
|
28
|
+
export const createInput = z.object({
|
|
29
|
+
title: z.string().optional()
|
|
30
|
+
});
|
|
31
|
+
// ── update (PUT /api/threads/:id) ────────────────────────────────
|
|
32
|
+
export const updateInput = z.object({
|
|
33
|
+
id: z.string().min(1),
|
|
34
|
+
title: z.string().min(1)
|
|
35
|
+
});
|
|
36
|
+
// ── delete (DELETE /api/threads/:id) ─────────────────────────────
|
|
37
|
+
// Legacy returned HTTP 204; tRPC requires a JSON payload so we return an ack.
|
|
38
|
+
export const deleteInput = z.object({
|
|
39
|
+
id: z.string().min(1)
|
|
40
|
+
});
|
|
41
|
+
export const deleteOutput = z.object({
|
|
42
|
+
ok: z.literal(true)
|
|
43
|
+
});
|
|
44
|
+
// ── summarize (POST /api/threads/:id/summarize) ──────────────────
|
|
45
|
+
// Derives a title from the first user message content and saves it.
|
|
46
|
+
export const summarizeInput = z.object({
|
|
47
|
+
id: z.string().min(1)
|
|
48
|
+
});
|
|
49
|
+
export const summarizeOutput = z.object({
|
|
50
|
+
title: z.string()
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=threads.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threads.js","sourceRoot":"","sources":["../../src/api-schemas/threads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oEAAoE;AACpE,gEAAgE;AAChE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAGH,oEAAoE;AACpE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO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CAAC,CAAC;AAGH,oEAAoE;AACpE,oEAAoE;AACpE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACtB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const userListItem: z.ZodObject<{
|
|
3
|
+
username: z.ZodString;
|
|
4
|
+
user_id: z.ZodString;
|
|
5
|
+
role: z.ZodString;
|
|
6
|
+
token_hash: z.ZodString;
|
|
7
|
+
created_at: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type UserListItem = z.infer<typeof userListItem>;
|
|
10
|
+
export declare const userCreateResponse: z.ZodObject<{
|
|
11
|
+
username: z.ZodString;
|
|
12
|
+
user_id: z.ZodString;
|
|
13
|
+
role: z.ZodString;
|
|
14
|
+
token: z.ZodString;
|
|
15
|
+
created_at: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type UserCreateResponse = z.infer<typeof userCreateResponse>;
|
|
18
|
+
export declare const listOutput: z.ZodObject<{
|
|
19
|
+
users: z.ZodArray<z.ZodObject<{
|
|
20
|
+
username: z.ZodString;
|
|
21
|
+
user_id: z.ZodString;
|
|
22
|
+
role: z.ZodString;
|
|
23
|
+
token_hash: z.ZodString;
|
|
24
|
+
created_at: z.ZodString;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type ListOutput = z.infer<typeof listOutput>;
|
|
28
|
+
export declare const getInput: z.ZodObject<{
|
|
29
|
+
username: z.ZodString;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type GetInput = z.infer<typeof getInput>;
|
|
32
|
+
export declare const createInput: z.ZodObject<{
|
|
33
|
+
username: z.ZodString;
|
|
34
|
+
role: z.ZodDefault<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type CreateInput = z.infer<typeof createInput>;
|
|
37
|
+
export declare const removeInput: z.ZodObject<{
|
|
38
|
+
username: z.ZodString;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
export type RemoveInput = z.infer<typeof removeInput>;
|
|
41
|
+
export declare const removeOutput: z.ZodObject<{
|
|
42
|
+
message: z.ZodString;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export type RemoveOutput = z.infer<typeof removeOutput>;
|
|
45
|
+
export declare const resetTokenInput: z.ZodObject<{
|
|
46
|
+
username: z.ZodString;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
export type ResetTokenInput = z.infer<typeof resetTokenInput>;
|
|
49
|
+
//# sourceMappingURL=users.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/api-schemas/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,YAAY;;;;;;iBAMvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,eAAO,MAAM,kBAAkB;;;;;;iBAM7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAGpE,eAAO,MAAM,UAAU;;;;;;;;iBAErB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAGpD,eAAO,MAAM,QAAQ;;iBAEnB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAGhD,eAAO,MAAM,WAAW;;;iBAGtB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAGtD,eAAO,MAAM,WAAW;;iBAEtB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,eAAO,MAAM,YAAY;;iBAEvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAGxD,eAAO,MAAM,eAAe;;iBAE1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// ── User response shapes ─────────────────────────────────────────
|
|
3
|
+
// Two distinct shapes depending on caller context:
|
|
4
|
+
// • listResponse / getResponse — masked `token_hash` (first 16 chars + "...").
|
|
5
|
+
// • createResponse / resetTokenResponse — plaintext `token` (shown once).
|
|
6
|
+
export const userListItem = z.object({
|
|
7
|
+
username: z.string(),
|
|
8
|
+
user_id: z.string(),
|
|
9
|
+
role: z.string(),
|
|
10
|
+
token_hash: z.string(),
|
|
11
|
+
created_at: z.string()
|
|
12
|
+
});
|
|
13
|
+
export const userCreateResponse = z.object({
|
|
14
|
+
username: z.string(),
|
|
15
|
+
user_id: z.string(),
|
|
16
|
+
role: z.string(),
|
|
17
|
+
token: z.string(),
|
|
18
|
+
created_at: z.string()
|
|
19
|
+
});
|
|
20
|
+
// ── list (GET /api/users) ────────────────────────────────────────
|
|
21
|
+
export const listOutput = z.object({
|
|
22
|
+
users: z.array(userListItem)
|
|
23
|
+
});
|
|
24
|
+
// ── get (GET /api/users/:username) ───────────────────────────────
|
|
25
|
+
export const getInput = z.object({
|
|
26
|
+
username: z.string().min(1)
|
|
27
|
+
});
|
|
28
|
+
// ── create (POST /api/users) ─────────────────────────────────────
|
|
29
|
+
export const createInput = z.object({
|
|
30
|
+
username: z.string().min(1),
|
|
31
|
+
role: z.string().default("user")
|
|
32
|
+
});
|
|
33
|
+
// ── remove (DELETE /api/users/:username) ─────────────────────────
|
|
34
|
+
export const removeInput = z.object({
|
|
35
|
+
username: z.string().min(1)
|
|
36
|
+
});
|
|
37
|
+
export const removeOutput = z.object({
|
|
38
|
+
message: z.string()
|
|
39
|
+
});
|
|
40
|
+
// ── resetToken (POST /api/users/reset-token) ─────────────────────
|
|
41
|
+
export const resetTokenInput = z.object({
|
|
42
|
+
username: z.string().min(1)
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=users.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/api-schemas/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oEAAoE;AACpE,mDAAmD;AACnD,iFAAiF;AACjF,4EAA4E;AAE5E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE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