0e919f56f2
* Alerts v1 * Encrypt alert webhook secrets and allow them to be generated by the server * Alert v1 UI * Remove unnecessary emails * Move to using `@react-email/components` * WIP slack alerts * More slack alerts WIP * Update pnpm lock after rebase * Finish implementing Slack alerts * Use a more error like emoji * New secondary variant for the segmented control * Added a simple checkbox style variant to storybook * Style tweak to the segmented control * UI improvements to the alert modal * Use searchable Select for alerts. Changed default variant for SegmentedControl * Secondary button now using secondary colour * segmented control style tweak * Improved the channel column in the alerts table * Updated logo-mono.png * Updated email styles * Email templates updated to new styles * Don’t log the decrypted secret * await enqueing the deployment alert when an index fails * await enqueing the timeout alert --------- Co-authored-by: James Ritchie <james@jamesritchie.co.uk> Co-authored-by: Matt Aitken <matt@mattaitken.com>
34 lines
964 B
TypeScript
34 lines
964 B
TypeScript
import { z } from "zod";
|
|
import { EncryptedSecretValueSchema } from "~/services/secrets/secretStore.server";
|
|
|
|
export const ProjectAlertWebhookProperties = z.object({
|
|
secret: EncryptedSecretValueSchema,
|
|
url: z.string(),
|
|
});
|
|
|
|
export type ProjectAlertWebhookProperties = z.infer<typeof ProjectAlertWebhookProperties>;
|
|
|
|
export const ProjectAlertEmailProperties = z.object({
|
|
email: z.string(),
|
|
});
|
|
|
|
export type ProjectAlertEmailProperties = z.infer<typeof ProjectAlertEmailProperties>;
|
|
|
|
export const DeleteProjectAlertChannel = z.object({
|
|
id: z.string(),
|
|
});
|
|
|
|
export const ProjectAlertSlackProperties = z.object({
|
|
channelId: z.string(),
|
|
channelName: z.string(),
|
|
integrationId: z.string().nullish(),
|
|
});
|
|
|
|
export type ProjectAlertSlackProperties = z.infer<typeof ProjectAlertSlackProperties>;
|
|
|
|
export const ProjectAlertSlackStorage = z.object({
|
|
message_ts: z.string(),
|
|
});
|
|
|
|
export type ProjectAlertSlackStorage = z.infer<typeof ProjectAlertSlackStorage>;
|