feat: add team alerts
This commit is contained in:
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user