@locusai/shared 0.4.1 → 0.4.2
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/models/workspace.ts +9 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/models/workspace.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { BaseEntitySchema } from "../common";
|
|
3
3
|
|
|
4
|
+
export const ChecklistItemSchema = z.object({
|
|
5
|
+
id: z.string(),
|
|
6
|
+
text: z.string(),
|
|
7
|
+
done: z.boolean(),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export type ChecklistItem = z.infer<typeof ChecklistItemSchema>;
|
|
11
|
+
|
|
4
12
|
export const WorkspaceSchema = BaseEntitySchema.extend({
|
|
5
13
|
orgId: z.string().uuid(),
|
|
6
14
|
name: z.string().min(1, "Name is required").max(100),
|
|
@@ -8,6 +16,7 @@ export const WorkspaceSchema = BaseEntitySchema.extend({
|
|
|
8
16
|
.string()
|
|
9
17
|
.min(1, "Slug is required")
|
|
10
18
|
.regex(/^[a-z0-9-]+$/, "Slug must be lowercase alphanumeric with hyphens"),
|
|
19
|
+
defaultChecklist: z.array(ChecklistItemSchema).nullable().optional(),
|
|
11
20
|
});
|
|
12
21
|
|
|
13
22
|
export type Workspace = z.infer<typeof WorkspaceSchema>;
|