-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alert api #263
alert api #263
Conversation
|
dashboardId: alertDoc.dashboardId.toString(), | ||
chartId: alertDoc.chartId as string, | ||
} | ||
: ({} as never)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we throw here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to throw inline here but unfortunately that didn't seem possible, could always move this out to the top of the fn and assert and I think it'll still carry over, but I didn't think it was worth it.
teamId: ObjectId, | ||
alertInput: z.infer<typeof alertSchema>, | ||
) => { | ||
if (alertInput.source === 'CHART') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I feel it would be cleaner if AlertSource
is an enum
Introduces external alert api to OSS, adds translation layer between internal naming and product-aligned external naming.
Example: