Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
2.2 kB ยท 69 lines
TypeScript
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970import { createInsertSchema, createSelectSchema } from "drizzle-zod";import { z } from "zod";
import { externalService } from "./external_service";import { externalServiceComponent } from "./external_service_component";import { externalServiceIncident } from "./external_service_incident";import { externalServiceReport } from "./external_service_report";
export const externalServiceSlugRegex = /^[a-z0-9](-?[a-z0-9])*$/;export const externalServiceSlugSchema = z .string() .min(1) .max(64) .regex(externalServiceSlugRegex);
export const selectExternalServiceSchema = createSelectSchema(externalService);
export const insertExternalServiceSchema = createInsertSchema(externalService, { slug: externalServiceSlugSchema, aliases: z.array(externalServiceSlugSchema).optional(),});
export type ExternalService = z.infer<typeof selectExternalServiceSchema>;export type InsertExternalService = z.infer<typeof insertExternalServiceSchema>;
export const selectExternalServiceIncidentSchema = createSelectSchema( externalServiceIncident,);
export const insertExternalServiceIncidentSchema = createInsertSchema( externalServiceIncident,);
export type ExternalServiceIncident = z.infer< typeof selectExternalServiceIncidentSchema>;export type InsertExternalServiceIncident = z.infer< typeof insertExternalServiceIncidentSchema>;
export const selectExternalServiceComponentSchema = createSelectSchema( externalServiceComponent,);
export const insertExternalServiceComponentSchema = createInsertSchema( externalServiceComponent,);
export type ExternalServiceComponent = z.infer< typeof selectExternalServiceComponentSchema>;export type InsertExternalServiceComponent = z.infer< typeof insertExternalServiceComponentSchema>;
export const selectExternalServiceReportSchema = createSelectSchema( externalServiceReport,);
export const insertExternalServiceReportSchema = createInsertSchema( externalServiceReport,);
export type ExternalServiceReport = z.infer< typeof selectExternalServiceReportSchema>;export type InsertExternalServiceReport = z.infer< typeof insertExternalServiceReportSchema>;