mirror of
https://github.com/kennethnym/freya
synced 2026-07-03 22:51:15 +01:00
22 lines
552 B
TypeScript
22 lines
552 B
TypeScript
import {
|
|
ConversationEntryKind,
|
|
ConversationEntryPayload,
|
|
ConversationEntryVisibility,
|
|
} from "@freya/core"
|
|
import { type } from "arktype"
|
|
|
|
export const Conversation = type({
|
|
id: "string.uuid",
|
|
createdAt: "string.date.iso",
|
|
updatedAt: "string.date.iso",
|
|
})
|
|
|
|
export const ConversationEntry = type({
|
|
id: "string.uuid",
|
|
sequence: "number",
|
|
kind: type.enumerated(...Object.values(ConversationEntryKind)),
|
|
visibility: type.enumerated(...Object.values(ConversationEntryVisibility)),
|
|
fileId: "string | null",
|
|
payload: ConversationEntryPayload,
|
|
})
|