Additional fields - how to do object? (Mongo)

I want these nested under the emailNotifications. This would be simple JSON in Mongo, not sure how to do it here.
emailNotifications: {
type: "?????",
required: false,
input: true,
validator: {
input: z.object({
bountyLive: z.boolean(),
submissionReceived: z.boolean(),
submissionReviewed: z.boolean(),
manageReviewers: z.boolean()
}),
output: z.object({
bountyLive: z.boolean(),
submissionReceived: z.boolean(),
submissionReviewed: z.boolean(),
manageReviewers: z.boolean()
}),
},
},
emailNotifications: {
type: "?????",
required: false,
input: true,
validator: {
input: z.object({
bountyLive: z.boolean(),
submissionReceived: z.boolean(),
submissionReviewed: z.boolean(),
manageReviewers: z.boolean()
}),
output: z.object({
bountyLive: z.boolean(),
submissionReceived: z.boolean(),
submissionReviewed: z.boolean(),
manageReviewers: z.boolean()
}),
},
},
2 Replies
Stephen
StephenOP3mo ago
@Ping If you don't mind, thanks!
Ping
Ping3mo ago
We don't have json support yet. However you can try just putting json in the type and we would just stringify/parse it from string We will support it in the future though.

Did you find this page helpful?