feat: add team alerts

This commit is contained in:
2026-01-19 11:56:32 +05:30
parent 46c07e23ad
commit c10b3629fc
9 changed files with 226 additions and 70 deletions

View File

@@ -30,6 +30,7 @@ const notificationSchema = new mongoose.Schema({
type: [Schema.Types.ObjectId],
ref: "user",
},
assignedToOrg: String,
taggedUsers: Array,
});
@@ -53,11 +54,13 @@ const createNotificationInput = z.object({
client: z.string(),
clientData: z.object({}).passthrough(),
assignedTo: z.array(z.string()).optional(),
assignedToOrg: z.enum(["client", "agent"]).nullable().optional(),
});
const updateNotificationInput = z.object({
status: z.string().optional(),
assignedTo: z.array(z.string()).optional(),
assignedToOrg: z.enum(["client", "agent"]).nullable().optional(),
});
export type CreateNotificationInput = z.infer<typeof createNotificationInput>;