import { createGetDB, type Generated, type Timestamp, type NamespaceDB, type NamespaceInsertable, type NamespaceSelectable, type NamespaceTable, type NamespaceTableName, type NamespaceTransaction, type NamespaceUpdateable, } from "@tailor-platform/sdk/kysely"; export interface Namespace { "main-db": { ApprovalDecision: { id: Generated; approvalRequestId: string; approvalStepId: string | null; sentBackToStepId: string | null; decision: "APPROVE" | "REJECT" | "SEND_BACK" | "DELEGATE" | "WITHDRAW" | "CANCEL" | "RESUBMIT"; decidedByUserId: string; delegatedToUserId: string | null; comment: string | null; decidedAt: Timestamp; createdAt: Generated; updatedAt: Generated; } ApprovalPolicy: { id: Generated; purpose: string; name: string; description: string | null; status: "DRAFT" | "ACTIVE" | "INACTIVE"; activatedAt: Timestamp | null; deactivatedAt: Timestamp | null; createdAt: Generated; updatedAt: Generated; } ApprovalPolicyStep: { id: Generated; approvalPolicyId: string; stepOrder: number; name: string; minimumApprovals: number; createdAt: Generated; updatedAt: Generated; } ApprovalPolicyStepAssignee: { id: Generated; approvalPolicyStepId: string; userId: string | null; roleId: string | null; required: boolean; roleQuorum: "ALL" | "ANY" | null; createdAt: Generated; updatedAt: Generated; } ApprovalRequest: { id: Generated; name: string; purpose: string; targetEntityType: string; targetEntityId: string; requesterId: string; sourcePolicyId: string | null; status: "PENDING" | "APPROVED" | "REJECTED" | "REVISION_REQUESTED" | "WITHDRAWN" | "CANCELLED"; rejectionReason: string | null; resolvedAt: Timestamp | null; createdAt: Generated; updatedAt: Generated; } ApprovalStep: { id: Generated; approvalRequestId: string; stepOrder: number; name: string; minimumApprovals: number; status: "PENDING" | "IN_PROGRESS" | "APPROVED" | "REJECTED"; resolvedAt: Timestamp | null; createdAt: Generated; updatedAt: Generated; } ApprovalStepAssignee: { id: Generated; approvalStepId: string; userId: string | null; roleId: string | null; required: boolean; roleQuorum: "ALL" | "ANY" | null; status: "PENDING" | "APPROVED" | "REJECTED" | "DELEGATED"; resolvedAt: 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;