import { createGetDB, type Generated, type Timestamp, type ObjectColumnType, type ArrayColumnType, type NamespaceDB, type NamespaceInsertable, type NamespaceSelectable, type NamespaceTable, type NamespaceTableName, type NamespaceTransaction, type NamespaceUpdateable, } from "@tailor-platform/sdk/kysely"; export interface Namespace { "main-db": { Shift: { id: Generated; shiftScheduleId: string; date: Timestamp; shiftType: "NORMAL" | "SPLIT" | "THROUGH" | "ON_CALL" | "SUPPORT"; cancelledAt: Timestamp | null; plannedStartAt: Timestamp; plannedEndAt: Timestamp; segments: ArrayColumnType>; shiftPatternId: string | null; siteId: string | null; createdAt: Generated; updatedAt: Generated; } ShiftPattern: { id: Generated; code: string; scopeId: string | null; name: string; kind: "DAY" | "EARLY" | "LATE" | "NIGHT" | "ON_CALL" | "OFF"; segments: { sequence: number; startTime: number; endTime: number; breakMinutes: number; spansMidnight: boolean; }[]; createdAt: Generated; updatedAt: Generated; } ShiftPlacement: { id: Generated; shiftId: string; assignmentId: string; status: "ACTIVE" | "SUPERSEDED" | "CANCELLED"; supersededById: string | null; assignedAt: Timestamp; releasedAt: Timestamp | null; provenance: "GENERATED" | "MANUAL"; createdAt: Generated; updatedAt: Generated; } ShiftSchedule: { id: Generated; startDate: Timestamp; endDate: Timestamp; status: "DRAFT" | "CONFIRMED"; confirmedAt: Timestamp | null; createdAt: Generated; updatedAt: Generated; } } } export const getDB = createGetDB(); export type DB = NamespaceDB; export type Transaction = NamespaceTransaction; type TableName = NamespaceTableName; export type Table = NamespaceTable; export type Insertable = NamespaceInsertable; export type Selectable = NamespaceSelectable; export type Updateable = NamespaceUpdateable;