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.
1.1 kB ยท 35 lines
TypeScript
123456789101112131415161718192021222324252627282930313233343536import { CHAT_TITLE_MAX_LENGTH, storedMessageSchema,} from "@openstatus/db/src/schema";import { z } from "zod";
export const CreateChatSessionInput = z.object({ firstMessage: storedMessageSchema,});export type CreateChatSessionInput = z.infer<typeof CreateChatSessionInput>;
export const SetChatSessionMessagesInput = z.object({ sessionId: z.number().int(), // No `.min(1)` โ replacing a session with an empty list is valid // (e.g. user wipes the conversation). messages: z.array(storedMessageSchema),});export type SetChatSessionMessagesInput = z.infer< typeof SetChatSessionMessagesInput>;
export const GetChatSessionInput = z.object({ sessionId: z.number().int(),});export type GetChatSessionInput = z.infer<typeof GetChatSessionInput>;
export const ListChatSessionsInput = z.object({}).strict();export type ListChatSessionsInput = z.infer<typeof ListChatSessionsInput>;
export const DeleteChatSessionInput = z.object({ sessionId: z.number().int(),});export type DeleteChatSessionInput = z.infer<typeof DeleteChatSessionInput>;
export { CHAT_TITLE_MAX_LENGTH };