@townco/apiclient 0.0.30 → 0.0.32
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/index.d.ts +11 -4
- package/dist/server.d.ts +49 -20
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ export declare const createClient: ({ shedUrl, accessToken, debug, }: {
|
|
|
4
4
|
debug?: boolean;
|
|
5
5
|
}) => import("@trpc/client").TRPCClient<import("@trpc/server").TRPCBuiltRouter<{
|
|
6
6
|
ctx: {
|
|
7
|
-
user: null;
|
|
8
|
-
token?: never;
|
|
9
|
-
} | {
|
|
10
7
|
user: import("@supabase/supabase-js").User | null;
|
|
11
|
-
token: string
|
|
8
|
+
token: string;
|
|
9
|
+
} | {
|
|
10
|
+
user: null;
|
|
11
|
+
token: undefined;
|
|
12
12
|
};
|
|
13
13
|
meta: object;
|
|
14
14
|
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
@@ -231,4 +231,11 @@ export declare const createClient: ({ shedUrl, accessToken, debug, }: {
|
|
|
231
231
|
};
|
|
232
232
|
meta: object;
|
|
233
233
|
}>;
|
|
234
|
+
"definitions.get": import("@trpc/server").TRPCQueryProcedure<{
|
|
235
|
+
input: {
|
|
236
|
+
id: string;
|
|
237
|
+
};
|
|
238
|
+
output: import("./server").AgentDefinitionRecord;
|
|
239
|
+
meta: object;
|
|
240
|
+
}>;
|
|
234
241
|
}>>>;
|
package/dist/server.d.ts
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import type { FileObject } from "@supabase/storage-js";
|
|
2
|
+
import type { z } from "zod";
|
|
2
3
|
export declare const createContext: ({ req }: {
|
|
3
4
|
req: Request;
|
|
4
5
|
}) => Promise<{
|
|
5
|
-
user: null;
|
|
6
|
-
token?: never;
|
|
7
|
-
} | {
|
|
8
6
|
user: import("@supabase/supabase-js").User | null;
|
|
9
|
-
token: string
|
|
7
|
+
token: string;
|
|
8
|
+
} | {
|
|
9
|
+
user: null;
|
|
10
|
+
token: undefined;
|
|
10
11
|
}>;
|
|
11
12
|
export type Context = Awaited<ReturnType<typeof createContext>>;
|
|
12
13
|
export declare const publicProcedure: import("@trpc/server").TRPCProcedureBuilder<{
|
|
13
|
-
user: null;
|
|
14
|
-
token?: never;
|
|
15
|
-
} | {
|
|
16
14
|
user: import("@supabase/supabase-js").User | null;
|
|
17
|
-
token: string
|
|
15
|
+
token: string;
|
|
16
|
+
} | {
|
|
17
|
+
user: null;
|
|
18
|
+
token: undefined;
|
|
18
19
|
}, object, object, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
19
20
|
export declare const authedProcedure: import("@trpc/server").TRPCProcedureBuilder<{
|
|
20
|
-
user: null;
|
|
21
|
-
token?: never;
|
|
22
|
-
} | {
|
|
23
21
|
user: import("@supabase/supabase-js").User | null;
|
|
24
|
-
token: string
|
|
22
|
+
token: string;
|
|
23
|
+
} | {
|
|
24
|
+
user: null;
|
|
25
|
+
token: undefined;
|
|
25
26
|
}, object, {}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
26
27
|
export declare const routerBuilder: import("@trpc/server").TRPCRouterBuilder<{
|
|
27
28
|
ctx: {
|
|
28
|
-
user: null;
|
|
29
|
-
token?: never;
|
|
30
|
-
} | {
|
|
31
29
|
user: import("@supabase/supabase-js").User | null;
|
|
32
|
-
token: string
|
|
30
|
+
token: string;
|
|
31
|
+
} | {
|
|
32
|
+
user: null;
|
|
33
|
+
token: undefined;
|
|
33
34
|
};
|
|
34
35
|
meta: object;
|
|
35
36
|
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
@@ -66,11 +67,11 @@ export type MachineProcess = {
|
|
|
66
67
|
export declare const getMachineProcesses: (flyAppName: string) => Promise<MachineProcess[]>;
|
|
67
68
|
export declare const router: import("@trpc/server").TRPCBuiltRouter<{
|
|
68
69
|
ctx: {
|
|
69
|
-
user: null;
|
|
70
|
-
token?: never;
|
|
71
|
-
} | {
|
|
72
70
|
user: import("@supabase/supabase-js").User | null;
|
|
73
|
-
token: string
|
|
71
|
+
token: string;
|
|
72
|
+
} | {
|
|
73
|
+
user: null;
|
|
74
|
+
token: undefined;
|
|
74
75
|
};
|
|
75
76
|
meta: object;
|
|
76
77
|
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
@@ -293,5 +294,33 @@ export declare const router: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
293
294
|
};
|
|
294
295
|
meta: object;
|
|
295
296
|
}>;
|
|
297
|
+
"definitions.get": import("@trpc/server").TRPCQueryProcedure<{
|
|
298
|
+
input: {
|
|
299
|
+
id: string;
|
|
300
|
+
};
|
|
301
|
+
output: AgentDefinitionRecord;
|
|
302
|
+
meta: object;
|
|
303
|
+
}>;
|
|
296
304
|
}>>;
|
|
305
|
+
export interface AgentDefinitionRecord {
|
|
306
|
+
agent_path: string | null;
|
|
307
|
+
created_at: string;
|
|
308
|
+
definition: z.infer<typeof AgentDefinitionSchema> | null;
|
|
309
|
+
id: string;
|
|
310
|
+
source_object_id: string | null;
|
|
311
|
+
user_id: string;
|
|
312
|
+
}
|
|
313
|
+
declare const AgentDefinitionSchema: z.ZodObject<{
|
|
314
|
+
version: z.ZodOptional<z.ZodString>;
|
|
315
|
+
description: z.ZodOptional<z.ZodString>;
|
|
316
|
+
systemPrompt: z.ZodNullable<z.ZodString>;
|
|
317
|
+
model: z.ZodString;
|
|
318
|
+
mcps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
319
|
+
name: z.ZodString;
|
|
320
|
+
transport: z.ZodLiteral<"http">;
|
|
321
|
+
url: z.ZodString;
|
|
322
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
323
|
+
}, z.core.$strip>>>;
|
|
324
|
+
}, z.core.$strip>;
|
|
297
325
|
export type AppRouter = typeof router;
|
|
326
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@townco/apiclient",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.32",
|
|
5
5
|
"description": "apiclient",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@supabase/supabase-js": "^2.87.1",
|
|
31
31
|
"@trpc/client": "^11.7.2",
|
|
32
32
|
"eventsource": "^4.1.0",
|
|
33
|
-
"superjson": "^2.2.6"
|
|
33
|
+
"superjson": "^2.2.6",
|
|
34
|
+
"zod": "^4.2.1"
|
|
34
35
|
}
|
|
35
36
|
}
|