@chaaskit/shared 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.
Files changed (81) hide show
  1. package/dist/constants/index.d.ts +59 -0
  2. package/dist/constants/index.d.ts.map +1 -0
  3. package/dist/constants/index.js +69 -0
  4. package/dist/constants/index.js.map +1 -0
  5. package/dist/index.d.ts +20 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +23 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/types/admin.d.ts +98 -0
  10. package/dist/types/admin.d.ts.map +1 -0
  11. package/dist/types/admin.js +2 -0
  12. package/dist/types/admin.js.map +1 -0
  13. package/dist/types/auth.d.ts +43 -0
  14. package/dist/types/auth.d.ts.map +1 -0
  15. package/dist/types/auth.js +2 -0
  16. package/dist/types/auth.js.map +1 -0
  17. package/dist/types/config.d.ts +267 -0
  18. package/dist/types/config.d.ts.map +1 -0
  19. package/dist/types/config.js +2 -0
  20. package/dist/types/config.js.map +1 -0
  21. package/dist/types/documents.d.ts +80 -0
  22. package/dist/types/documents.d.ts.map +1 -0
  23. package/dist/types/documents.js +5 -0
  24. package/dist/types/documents.js.map +1 -0
  25. package/dist/types/mcp.d.ts +130 -0
  26. package/dist/types/mcp.d.ts.map +1 -0
  27. package/dist/types/mcp.js +2 -0
  28. package/dist/types/mcp.js.map +1 -0
  29. package/dist/types/message.d.ts +105 -0
  30. package/dist/types/message.d.ts.map +1 -0
  31. package/dist/types/message.js +2 -0
  32. package/dist/types/message.js.map +1 -0
  33. package/dist/types/payment.d.ts +57 -0
  34. package/dist/types/payment.d.ts.map +1 -0
  35. package/dist/types/payment.js +2 -0
  36. package/dist/types/payment.js.map +1 -0
  37. package/dist/types/project.d.ts +30 -0
  38. package/dist/types/project.d.ts.map +1 -0
  39. package/dist/types/project.js +2 -0
  40. package/dist/types/project.js.map +1 -0
  41. package/dist/types/scheduled-prompt.d.ts +99 -0
  42. package/dist/types/scheduled-prompt.d.ts.map +1 -0
  43. package/dist/types/scheduled-prompt.js +18 -0
  44. package/dist/types/scheduled-prompt.js.map +1 -0
  45. package/dist/types/team.d.ts +92 -0
  46. package/dist/types/team.d.ts.map +1 -0
  47. package/dist/types/team.js +2 -0
  48. package/dist/types/team.js.map +1 -0
  49. package/dist/types/theme.d.ts +42 -0
  50. package/dist/types/theme.d.ts.map +1 -0
  51. package/dist/types/theme.js +2 -0
  52. package/dist/types/theme.js.map +1 -0
  53. package/dist/types/thread.d.ts +41 -0
  54. package/dist/types/thread.d.ts.map +1 -0
  55. package/dist/types/thread.js +2 -0
  56. package/dist/types/thread.js.map +1 -0
  57. package/dist/types/user.d.ts +52 -0
  58. package/dist/types/user.d.ts.map +1 -0
  59. package/dist/types/user.js +2 -0
  60. package/dist/types/user.js.map +1 -0
  61. package/dist/validation/config.d.ts +1671 -0
  62. package/dist/validation/config.d.ts.map +1 -0
  63. package/dist/validation/config.js +160 -0
  64. package/dist/validation/config.js.map +1 -0
  65. package/dist/validation/message.d.ts +101 -0
  66. package/dist/validation/message.d.ts.map +1 -0
  67. package/dist/validation/message.js +33 -0
  68. package/dist/validation/message.js.map +1 -0
  69. package/dist/validation/project.d.ts +47 -0
  70. package/dist/validation/project.d.ts.map +1 -0
  71. package/dist/validation/project.js +19 -0
  72. package/dist/validation/project.js.map +1 -0
  73. package/dist/validation/team.d.ts +64 -0
  74. package/dist/validation/team.d.ts.map +1 -0
  75. package/dist/validation/team.js +27 -0
  76. package/dist/validation/team.js.map +1 -0
  77. package/dist/validation/user.d.ts +147 -0
  78. package/dist/validation/user.d.ts.map +1 -0
  79. package/dist/validation/user.js +37 -0
  80. package/dist/validation/user.js.map +1 -0
  81. package/package.json +41 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/validation/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmC1B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -0,0 +1,160 @@
1
+ import { z } from 'zod';
2
+ export const themeColorsSchema = z.object({
3
+ primary: z.string(),
4
+ primaryHover: z.string(),
5
+ secondary: z.string(),
6
+ background: z.string(),
7
+ backgroundSecondary: z.string(),
8
+ sidebar: z.string(),
9
+ textPrimary: z.string(),
10
+ textSecondary: z.string(),
11
+ textMuted: z.string(),
12
+ border: z.string(),
13
+ inputBackground: z.string(),
14
+ inputBorder: z.string(),
15
+ userMessageBg: z.string(),
16
+ userMessageText: z.string(),
17
+ assistantMessageBg: z.string(),
18
+ assistantMessageText: z.string(),
19
+ success: z.string(),
20
+ warning: z.string(),
21
+ error: z.string(),
22
+ });
23
+ export const themeSchema = z.object({
24
+ name: z.string(),
25
+ colors: themeColorsSchema,
26
+ });
27
+ export const themingConfigSchema = z.object({
28
+ defaultTheme: z.string(),
29
+ allowUserThemeSwitch: z.boolean(),
30
+ themes: z.record(themeSchema),
31
+ fonts: z.object({
32
+ sans: z.string(),
33
+ mono: z.string(),
34
+ }),
35
+ borderRadius: z.object({
36
+ sm: z.string(),
37
+ md: z.string(),
38
+ lg: z.string(),
39
+ full: z.string(),
40
+ }),
41
+ });
42
+ export const samplePromptSchema = z.object({
43
+ label: z.string(),
44
+ prompt: z.string(),
45
+ });
46
+ export const uiConfigSchema = z.object({
47
+ welcomeTitle: z.string(),
48
+ welcomeSubtitle: z.string(),
49
+ inputPlaceholder: z.string(),
50
+ samplePrompts: z.array(samplePromptSchema),
51
+ logo: z.union([
52
+ z.string(),
53
+ z.object({ light: z.string(), dark: z.string() }),
54
+ ]),
55
+ });
56
+ export const authConfigSchema = z.object({
57
+ methods: z.array(z.enum(['email-password', 'google', 'github', 'magic-link'])),
58
+ allowUnauthenticated: z.boolean(),
59
+ magicLink: z.object({
60
+ enabled: z.boolean(),
61
+ expiresInMinutes: z.number(),
62
+ }),
63
+ });
64
+ export const builtInAgentConfigSchema = z.object({
65
+ type: z.literal('built-in'),
66
+ provider: z.enum(['anthropic', 'openai']),
67
+ model: z.string(),
68
+ systemPrompt: z.string(),
69
+ maxTokens: z.number(),
70
+ });
71
+ export const externalAgentConfigSchema = z.object({
72
+ type: z.literal('external'),
73
+ endpoint: z.string().url(),
74
+ headers: z.record(z.string()).optional(),
75
+ });
76
+ export const agentConfigSchema = z.discriminatedUnion('type', [
77
+ builtInAgentConfigSchema,
78
+ externalAgentConfigSchema,
79
+ ]);
80
+ export const paymentPlanSchema = z.object({
81
+ id: z.string(),
82
+ name: z.string(),
83
+ type: z.enum(['free', 'monthly', 'credits']),
84
+ params: z.union([
85
+ z.object({ monthlyMessageLimit: z.number() }),
86
+ z.object({
87
+ priceUSD: z.number(),
88
+ monthlyMessageLimit: z.number(),
89
+ stripePriceId: z.string(),
90
+ }),
91
+ z.object({
92
+ pricePerCredit: z.number(),
93
+ messagesPerCredit: z.number(),
94
+ }),
95
+ ]),
96
+ });
97
+ export const paymentsConfigSchema = z.object({
98
+ enabled: z.boolean(),
99
+ provider: z.literal('stripe'),
100
+ plans: z.array(paymentPlanSchema),
101
+ });
102
+ export const mcpServerConfigSchema = z.object({
103
+ id: z.string(),
104
+ name: z.string(),
105
+ transport: z.enum(['stdio', 'sse']),
106
+ command: z.string().optional(),
107
+ args: z.array(z.string()).optional(),
108
+ url: z.string().optional(),
109
+ enabled: z.boolean(),
110
+ });
111
+ export const mcpConfigSchema = z.object({
112
+ servers: z.array(mcpServerConfigSchema),
113
+ allowUserServers: z.boolean(),
114
+ requireToolConfirmation: z.boolean(),
115
+ toolTimeout: z.number(),
116
+ });
117
+ export const userSettingsFieldSchema = z.object({
118
+ key: z.string(),
119
+ label: z.string(),
120
+ type: z.enum(['text', 'select', 'textarea']),
121
+ placeholder: z.string().optional(),
122
+ options: z.array(z.string()).optional(),
123
+ });
124
+ export const appConfigSchema = z.object({
125
+ app: z.object({
126
+ name: z.string(),
127
+ description: z.string(),
128
+ url: z.string(),
129
+ }),
130
+ ui: uiConfigSchema,
131
+ theming: themingConfigSchema,
132
+ auth: authConfigSchema,
133
+ agent: agentConfigSchema,
134
+ payments: paymentsConfigSchema,
135
+ legal: z.object({
136
+ privacyPolicyUrl: z.string(),
137
+ termsOfServiceUrl: z.string(),
138
+ }),
139
+ userSettings: z.object({
140
+ fields: z.array(userSettingsFieldSchema),
141
+ }),
142
+ mcp: mcpConfigSchema.optional(),
143
+ sharing: z.object({
144
+ enabled: z.boolean(),
145
+ allowPublicLinks: z.boolean(),
146
+ allowTeamSharing: z.boolean(),
147
+ expirationOptions: z.array(z.string()),
148
+ }).optional(),
149
+ promptTemplates: z.object({
150
+ enabled: z.boolean(),
151
+ builtIn: z.array(z.object({
152
+ id: z.string(),
153
+ name: z.string(),
154
+ prompt: z.string(),
155
+ variables: z.array(z.string()),
156
+ })),
157
+ allowUserTemplates: z.boolean(),
158
+ }).optional(),
159
+ });
160
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/validation/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,SAAS,EAAE,CAA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AE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;YACxB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;YAChB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;YAClB,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SAC/B,CAAC,CAAC;QACH,kBAAkB,EAAE,CAAC,CAAC,OAAO,EAAE;KAChC,CAAC,CAAC,QAAQ,EAAE;CACd,CAAC,CAAC"}
@@ -0,0 +1,101 @@
1
+ import { z } from 'zod';
2
+ export declare const sendMessageSchema: z.ZodObject<{
3
+ threadId: z.ZodOptional<z.ZodString>;
4
+ content: z.ZodString;
5
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
6
+ id: z.ZodString;
7
+ name: z.ZodString;
8
+ type: z.ZodString;
9
+ size: z.ZodNumber;
10
+ content: z.ZodOptional<z.ZodString>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ type: string;
13
+ id: string;
14
+ name: string;
15
+ size: number;
16
+ content?: string | undefined;
17
+ }, {
18
+ type: string;
19
+ id: string;
20
+ name: string;
21
+ size: number;
22
+ content?: string | undefined;
23
+ }>, "many">>;
24
+ agentId: z.ZodOptional<z.ZodString>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ content: string;
27
+ threadId?: string | undefined;
28
+ files?: {
29
+ type: string;
30
+ id: string;
31
+ name: string;
32
+ size: number;
33
+ content?: string | undefined;
34
+ }[] | undefined;
35
+ agentId?: string | undefined;
36
+ }, {
37
+ content: string;
38
+ threadId?: string | undefined;
39
+ files?: {
40
+ type: string;
41
+ id: string;
42
+ name: string;
43
+ size: number;
44
+ content?: string | undefined;
45
+ }[] | undefined;
46
+ agentId?: string | undefined;
47
+ }>;
48
+ export declare const regenerateMessageSchema: z.ZodObject<{
49
+ messageId: z.ZodString;
50
+ }, "strip", z.ZodTypeAny, {
51
+ messageId: string;
52
+ }, {
53
+ messageId: string;
54
+ }>;
55
+ export declare const editMessageSchema: z.ZodObject<{
56
+ messageId: z.ZodString;
57
+ content: z.ZodString;
58
+ }, "strip", z.ZodTypeAny, {
59
+ content: string;
60
+ messageId: string;
61
+ }, {
62
+ content: string;
63
+ messageId: string;
64
+ }>;
65
+ export declare const branchFromMessageSchema: z.ZodObject<{
66
+ messageId: z.ZodString;
67
+ content: z.ZodOptional<z.ZodString>;
68
+ }, "strip", z.ZodTypeAny, {
69
+ messageId: string;
70
+ content?: string | undefined;
71
+ }, {
72
+ messageId: string;
73
+ content?: string | undefined;
74
+ }>;
75
+ export declare const messageFeedbackSchema: z.ZodObject<{
76
+ type: z.ZodEnum<["up", "down"]>;
77
+ comment: z.ZodOptional<z.ZodString>;
78
+ }, "strip", z.ZodTypeAny, {
79
+ type: "up" | "down";
80
+ comment?: string | undefined;
81
+ }, {
82
+ type: "up" | "down";
83
+ comment?: string | undefined;
84
+ }>;
85
+ export declare const toolApprovalSchema: z.ZodObject<{
86
+ toolCallId: z.ZodString;
87
+ approved: z.ZodBoolean;
88
+ }, "strip", z.ZodTypeAny, {
89
+ toolCallId: string;
90
+ approved: boolean;
91
+ }, {
92
+ toolCallId: string;
93
+ approved: boolean;
94
+ }>;
95
+ export type SendMessageInput = z.infer<typeof sendMessageSchema>;
96
+ export type RegenerateMessageInput = z.infer<typeof regenerateMessageSchema>;
97
+ export type EditMessageInput = z.infer<typeof editMessageSchema>;
98
+ export type BranchFromMessageInput = z.infer<typeof branchFromMessageSchema>;
99
+ export type MessageFeedbackInput = z.infer<typeof messageFeedbackSchema>;
100
+ export type ToolApprovalInput = z.infer<typeof toolApprovalSchema>;
101
+ //# sourceMappingURL=message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/validation/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW5B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;EAElC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;EAGlC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;EAGhC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACjE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC7E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACjE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC7E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACzE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ export const sendMessageSchema = z.object({
3
+ threadId: z.string().optional(),
4
+ content: z.string().min(1).max(100000),
5
+ files: z.array(z.object({
6
+ id: z.string(),
7
+ name: z.string(),
8
+ type: z.string(),
9
+ size: z.number(),
10
+ content: z.string().optional(),
11
+ })).optional(),
12
+ agentId: z.string().max(100).optional(), // Agent to use when creating a new thread
13
+ });
14
+ export const regenerateMessageSchema = z.object({
15
+ messageId: z.string(),
16
+ });
17
+ export const editMessageSchema = z.object({
18
+ messageId: z.string(),
19
+ content: z.string().min(1).max(100000),
20
+ });
21
+ export const branchFromMessageSchema = z.object({
22
+ messageId: z.string(),
23
+ content: z.string().min(1).max(100000).optional(),
24
+ });
25
+ export const messageFeedbackSchema = z.object({
26
+ type: z.enum(['up', 'down']),
27
+ comment: z.string().max(1000).optional(),
28
+ });
29
+ export const toolApprovalSchema = z.object({
30
+ toolCallId: z.string(),
31
+ approved: z.boolean(),
32
+ });
33
+ //# sourceMappingURL=message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/validation/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QACtB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC/B,CAAC,CAAC,CAAC,QAAQ,EAAE;IACd,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,0CAA0C;CACpF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;CACvC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;CACtB,CAAC,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { z } from 'zod';
2
+ export declare const projectSharingSchema: z.ZodEnum<["private", "team"]>;
3
+ export declare const createProjectSchema: z.ZodObject<{
4
+ name: z.ZodString;
5
+ color: z.ZodString;
6
+ context: z.ZodOptional<z.ZodString>;
7
+ teamId: z.ZodOptional<z.ZodString>;
8
+ sharing: z.ZodDefault<z.ZodOptional<z.ZodEnum<["private", "team"]>>>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ name: string;
11
+ color: string;
12
+ sharing: "team" | "private";
13
+ context?: string | undefined;
14
+ teamId?: string | undefined;
15
+ }, {
16
+ name: string;
17
+ color: string;
18
+ context?: string | undefined;
19
+ teamId?: string | undefined;
20
+ sharing?: "team" | "private" | undefined;
21
+ }>;
22
+ export declare const updateProjectSchema: z.ZodObject<{
23
+ name: z.ZodOptional<z.ZodString>;
24
+ color: z.ZodOptional<z.ZodString>;
25
+ context: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ sharing: z.ZodOptional<z.ZodEnum<["private", "team"]>>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ name?: string | undefined;
29
+ color?: string | undefined;
30
+ context?: string | null | undefined;
31
+ sharing?: "team" | "private" | undefined;
32
+ }, {
33
+ name?: string | undefined;
34
+ color?: string | undefined;
35
+ context?: string | null | undefined;
36
+ sharing?: "team" | "private" | undefined;
37
+ }>;
38
+ export declare const projectIdParamSchema: z.ZodObject<{
39
+ projectId: z.ZodString;
40
+ }, "strip", z.ZodTypeAny, {
41
+ projectId: string;
42
+ }, {
43
+ projectId: string;
44
+ }>;
45
+ export type CreateProjectInput = z.infer<typeof createProjectSchema>;
46
+ export type UpdateProjectInput = z.infer<typeof updateProjectSchema>;
47
+ //# sourceMappingURL=project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/validation/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB,gCAA8B,CAAC;AAEhE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;EAM9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAK9B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;EAE/B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACrE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ export const projectSharingSchema = z.enum(['private', 'team']);
3
+ export const createProjectSchema = z.object({
4
+ name: z.string().min(1).max(100).trim(),
5
+ color: z.string().regex(/^#[0-9a-fA-F]{6}$/, 'Invalid hex color'),
6
+ context: z.string().max(10000).optional(),
7
+ teamId: z.string().min(1).optional(),
8
+ sharing: projectSharingSchema.optional().default('private'),
9
+ });
10
+ export const updateProjectSchema = z.object({
11
+ name: z.string().min(1).max(100).trim().optional(),
12
+ color: z.string().regex(/^#[0-9a-fA-F]{6}$/, 'Invalid hex color').optional(),
13
+ context: z.string().max(10000).nullable().optional(),
14
+ sharing: projectSharingSchema.optional(),
15
+ });
16
+ export const projectIdParamSchema = z.object({
17
+ projectId: z.string().min(1),
18
+ });
19
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/validation/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;AAEhE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;IACvC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IACjE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;IACzC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACpC,OAAO,EAAE,oBAAoB,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;CAC5D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAClD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAC,QAAQ,EAAE;IAC5E,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACpD,OAAO,EAAE,oBAAoB,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC7B,CAAC,CAAC"}
@@ -0,0 +1,64 @@
1
+ import { z } from 'zod';
2
+ export declare const teamRoleSchema: z.ZodEnum<["owner", "admin", "member", "viewer"]>;
3
+ export declare const inviteRoleSchema: z.ZodEnum<["admin", "member", "viewer"]>;
4
+ export declare const createTeamSchema: z.ZodObject<{
5
+ name: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ name: string;
8
+ }, {
9
+ name: string;
10
+ }>;
11
+ export declare const updateTeamSchema: z.ZodObject<{
12
+ name: z.ZodOptional<z.ZodString>;
13
+ context: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ name?: string | undefined;
16
+ context?: string | null | undefined;
17
+ }, {
18
+ name?: string | undefined;
19
+ context?: string | null | undefined;
20
+ }>;
21
+ export declare const inviteMemberSchema: z.ZodObject<{
22
+ email: z.ZodString;
23
+ role: z.ZodEnum<["admin", "member", "viewer"]>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ email: string;
26
+ role: "admin" | "member" | "viewer";
27
+ }, {
28
+ email: string;
29
+ role: "admin" | "member" | "viewer";
30
+ }>;
31
+ export declare const updateMemberRoleSchema: z.ZodObject<{
32
+ role: z.ZodEnum<["owner", "admin", "member", "viewer"]>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ role: "owner" | "admin" | "member" | "viewer";
35
+ }, {
36
+ role: "owner" | "admin" | "member" | "viewer";
37
+ }>;
38
+ export declare const teamIdParamSchema: z.ZodObject<{
39
+ teamId: z.ZodString;
40
+ }, "strip", z.ZodTypeAny, {
41
+ teamId: string;
42
+ }, {
43
+ teamId: string;
44
+ }>;
45
+ export declare const userIdParamSchema: z.ZodObject<{
46
+ userId: z.ZodString;
47
+ }, "strip", z.ZodTypeAny, {
48
+ userId: string;
49
+ }, {
50
+ userId: string;
51
+ }>;
52
+ export declare const inviteTokenParamSchema: z.ZodObject<{
53
+ token: z.ZodString;
54
+ }, "strip", z.ZodTypeAny, {
55
+ token: string;
56
+ }, {
57
+ token: string;
58
+ }>;
59
+ export type InviteRole = z.infer<typeof inviteRoleSchema>;
60
+ export type CreateTeamInput = z.infer<typeof createTeamSchema>;
61
+ export type UpdateTeamInput = z.infer<typeof updateTeamSchema>;
62
+ export type InviteMemberInput = z.infer<typeof inviteMemberSchema>;
63
+ export type UpdateMemberRoleInput = z.infer<typeof updateMemberRoleSchema>;
64
+ //# sourceMappingURL=team.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team.d.ts","sourceRoot":"","sources":["../../src/validation/team.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc,mDAAiD,CAAC;AAC7E,eAAO,MAAM,gBAAgB,0CAAwC,CAAC;AAEtE,eAAO,MAAM,gBAAgB;;;;;;EAE3B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;EAG3B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;EAE5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;EAE5B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC/D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC/D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACnE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { z } from 'zod';
2
+ export const teamRoleSchema = z.enum(['owner', 'admin', 'member', 'viewer']);
3
+ export const inviteRoleSchema = z.enum(['admin', 'member', 'viewer']);
4
+ export const createTeamSchema = z.object({
5
+ name: z.string().min(1).max(100).trim(),
6
+ });
7
+ export const updateTeamSchema = z.object({
8
+ name: z.string().min(1).max(100).trim().optional(),
9
+ context: z.string().max(10000).nullable().optional(),
10
+ });
11
+ export const inviteMemberSchema = z.object({
12
+ email: z.string().email().max(255),
13
+ role: inviteRoleSchema,
14
+ });
15
+ export const updateMemberRoleSchema = z.object({
16
+ role: teamRoleSchema,
17
+ });
18
+ export const teamIdParamSchema = z.object({
19
+ teamId: z.string().min(1),
20
+ });
21
+ export const userIdParamSchema = z.object({
22
+ userId: z.string().min(1),
23
+ });
24
+ export const inviteTokenParamSchema = z.object({
25
+ token: z.string().min(1),
26
+ });
27
+ //# sourceMapping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,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC1B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC1B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACzB,CAAC,CAAC"}
@@ -0,0 +1,147 @@
1
+ import { z } from 'zod';
2
+ export declare const updateUserSettingsSchema: z.ZodObject<{
3
+ name: z.ZodOptional<z.ZodString>;
4
+ role: z.ZodOptional<z.ZodString>;
5
+ context: z.ZodOptional<z.ZodString>;
6
+ themePreference: z.ZodOptional<z.ZodString>;
7
+ mcpServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
8
+ id: z.ZodString;
9
+ name: z.ZodString;
10
+ transport: z.ZodEnum<["stdio", "sse"]>;
11
+ command: z.ZodOptional<z.ZodString>;
12
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
13
+ url: z.ZodOptional<z.ZodString>;
14
+ enabled: z.ZodBoolean;
15
+ }, "strip", z.ZodTypeAny, {
16
+ name: string;
17
+ id: string;
18
+ transport: "stdio" | "sse";
19
+ enabled: boolean;
20
+ command?: string | undefined;
21
+ args?: string[] | undefined;
22
+ url?: string | undefined;
23
+ }, {
24
+ name: string;
25
+ id: string;
26
+ transport: "stdio" | "sse";
27
+ enabled: boolean;
28
+ command?: string | undefined;
29
+ args?: string[] | undefined;
30
+ url?: string | undefined;
31
+ }>, "many">>;
32
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
33
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
34
+ name: z.ZodOptional<z.ZodString>;
35
+ role: z.ZodOptional<z.ZodString>;
36
+ context: z.ZodOptional<z.ZodString>;
37
+ themePreference: z.ZodOptional<z.ZodString>;
38
+ mcpServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
39
+ id: z.ZodString;
40
+ name: z.ZodString;
41
+ transport: z.ZodEnum<["stdio", "sse"]>;
42
+ command: z.ZodOptional<z.ZodString>;
43
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
44
+ url: z.ZodOptional<z.ZodString>;
45
+ enabled: z.ZodBoolean;
46
+ }, "strip", z.ZodTypeAny, {
47
+ name: string;
48
+ id: string;
49
+ transport: "stdio" | "sse";
50
+ enabled: boolean;
51
+ command?: string | undefined;
52
+ args?: string[] | undefined;
53
+ url?: string | undefined;
54
+ }, {
55
+ name: string;
56
+ id: string;
57
+ transport: "stdio" | "sse";
58
+ enabled: boolean;
59
+ command?: string | undefined;
60
+ args?: string[] | undefined;
61
+ url?: string | undefined;
62
+ }>, "many">>;
63
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
64
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
65
+ name: z.ZodOptional<z.ZodString>;
66
+ role: z.ZodOptional<z.ZodString>;
67
+ context: z.ZodOptional<z.ZodString>;
68
+ themePreference: z.ZodOptional<z.ZodString>;
69
+ mcpServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
70
+ id: z.ZodString;
71
+ name: z.ZodString;
72
+ transport: z.ZodEnum<["stdio", "sse"]>;
73
+ command: z.ZodOptional<z.ZodString>;
74
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
75
+ url: z.ZodOptional<z.ZodString>;
76
+ enabled: z.ZodBoolean;
77
+ }, "strip", z.ZodTypeAny, {
78
+ name: string;
79
+ id: string;
80
+ transport: "stdio" | "sse";
81
+ enabled: boolean;
82
+ command?: string | undefined;
83
+ args?: string[] | undefined;
84
+ url?: string | undefined;
85
+ }, {
86
+ name: string;
87
+ id: string;
88
+ transport: "stdio" | "sse";
89
+ enabled: boolean;
90
+ command?: string | undefined;
91
+ args?: string[] | undefined;
92
+ url?: string | undefined;
93
+ }>, "many">>;
94
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
95
+ }, z.ZodTypeAny, "passthrough">>;
96
+ export declare const createThreadSchema: z.ZodObject<{
97
+ title: z.ZodOptional<z.ZodString>;
98
+ agentId: z.ZodOptional<z.ZodString>;
99
+ teamId: z.ZodOptional<z.ZodString>;
100
+ projectId: z.ZodOptional<z.ZodString>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ title?: string | undefined;
103
+ agentId?: string | undefined;
104
+ teamId?: string | undefined;
105
+ projectId?: string | undefined;
106
+ }, {
107
+ title?: string | undefined;
108
+ agentId?: string | undefined;
109
+ teamId?: string | undefined;
110
+ projectId?: string | undefined;
111
+ }>;
112
+ export declare const updateThreadSchema: z.ZodObject<{
113
+ title: z.ZodString;
114
+ }, "strip", z.ZodTypeAny, {
115
+ title: string;
116
+ }, {
117
+ title: string;
118
+ }>;
119
+ export declare const shareThreadSchema: z.ZodObject<{
120
+ expiresIn: z.ZodOptional<z.ZodEnum<["1h", "24h", "7d", "30d", "never"]>>;
121
+ }, "strip", z.ZodTypeAny, {
122
+ expiresIn?: "never" | "1h" | "24h" | "7d" | "30d" | undefined;
123
+ }, {
124
+ expiresIn?: "never" | "1h" | "24h" | "7d" | "30d" | undefined;
125
+ }>;
126
+ export declare const searchSchema: z.ZodObject<{
127
+ q: z.ZodString;
128
+ threadId: z.ZodOptional<z.ZodString>;
129
+ limit: z.ZodOptional<z.ZodNumber>;
130
+ offset: z.ZodOptional<z.ZodNumber>;
131
+ }, "strip", z.ZodTypeAny, {
132
+ q: string;
133
+ threadId?: string | undefined;
134
+ limit?: number | undefined;
135
+ offset?: number | undefined;
136
+ }, {
137
+ q: string;
138
+ threadId?: string | undefined;
139
+ limit?: number | undefined;
140
+ offset?: number | undefined;
141
+ }>;
142
+ export type UpdateUserSettingsInput = z.infer<typeof updateUserSettingsSchema>;
143
+ export type CreateThreadInput = z.infer<typeof createThreadSchema>;
144
+ export type UpdateThreadInput = z.infer<typeof updateThreadSchema>;
145
+ export type ShareThreadInput = z.infer<typeof shareThreadSchema>;
146
+ export type SearchInput = z.infer<typeof searchSchema>;
147
+ //# sourceMappingURL=user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/validation/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAgBrB,CAAC;AAEjB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;EAE7B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;EAE5B,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;EAKvB,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC/E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACnE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACnE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACjE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}