chore: clean up types (#476)
This commit is contained in:
@@ -36,6 +36,7 @@ const cardMemberSchema = z.object({
|
||||
email: z.string(),
|
||||
user: z
|
||||
.object({
|
||||
id: z.string().nullable(),
|
||||
name: z.string().nullable(),
|
||||
})
|
||||
.nullable(),
|
||||
@@ -180,6 +181,7 @@ export const activityItemSchema = z.object({
|
||||
publicId: z.string(),
|
||||
user: z
|
||||
.object({
|
||||
id: z.string().nullable(),
|
||||
name: z.string().nullable(),
|
||||
email: z.string(),
|
||||
image: z.string().nullable(),
|
||||
@@ -189,6 +191,7 @@ export const activityItemSchema = z.object({
|
||||
.nullable(),
|
||||
user: z
|
||||
.object({
|
||||
id: z.string().nullable(),
|
||||
name: z.string().nullable(),
|
||||
email: z.string(),
|
||||
image: z.string().nullable(),
|
||||
|
||||
@@ -25,6 +25,7 @@ export const checklistResponseSchema = z.object({
|
||||
|
||||
// Shared user sub-object (used inside member/workspace responses)
|
||||
export const userSchema = z.object({
|
||||
id: z.string().nullable(),
|
||||
name: z.string().nullable(),
|
||||
email: z.string(),
|
||||
image: z.string().nullable(),
|
||||
|
||||
@@ -10,7 +10,7 @@ export const workspaceListItemSchema = z.object({
|
||||
name: z.string(),
|
||||
description: z.string().nullable(),
|
||||
slug: z.string(),
|
||||
plan: z.enum(["free", "pro", "enterprise"]),
|
||||
plan: z.enum(["free", "team", "pro", "enterprise"]),
|
||||
weekStartDay: z.number().nullable(),
|
||||
deletedAt: z.date().nullable(),
|
||||
}),
|
||||
@@ -25,6 +25,7 @@ const workspaceMemberDetailSchema = z.object({
|
||||
createdAt: z.date(),
|
||||
user: z
|
||||
.object({
|
||||
id: z.string().nullable(),
|
||||
name: z.string().nullable(),
|
||||
email: z.string().optional(),
|
||||
image: z.string().nullable(),
|
||||
@@ -72,7 +73,7 @@ export const workspaceCreateResponseSchema = z.object({
|
||||
name: z.string(),
|
||||
slug: z.string(),
|
||||
description: z.string().nullable(),
|
||||
plan: z.enum(["free", "pro", "enterprise"]),
|
||||
plan: z.enum(["free", "team", "pro", "enterprise"]),
|
||||
});
|
||||
|
||||
// ─── workspace.update ────────────────────────────────────────
|
||||
@@ -81,7 +82,7 @@ export const workspaceUpdateResponseSchema = z.object({
|
||||
name: z.string(),
|
||||
slug: z.string(),
|
||||
description: z.string().nullable(),
|
||||
plan: z.enum(["free", "pro", "enterprise"]),
|
||||
plan: z.enum(["free", "team", "pro", "enterprise"]),
|
||||
showEmailsToMembers: z.boolean().nullable(),
|
||||
weekStartDay: z.number().nullable(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user