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": { AccountingPeriod: { id: Generated; companyId: string; fiscalYearId: string; name: string; startDate: Timestamp; endDate: Timestamp; periodType: "OPERATING" | "ADJUSTMENT"; status: "NEVER_OPENED" | "OPEN" | "CLOSED" | "PERMANENTLY_CLOSED"; createdAt: Generated; updatedAt: Generated; } FiscalYear: { id: Generated; companyId: string; name: string; startDate: Timestamp; endDate: Timestamp; yearEndCloseExecuted: boolean; createdAt: Generated; updatedAt: Generated; } JournalEntry: { id: Generated; companyId: string; accountingPeriodId: string; entryDate: Timestamp; status: "DRAFT" | "CANCELLED" | "POSTED"; description: string | null; sourceDocumentType: "ACCOUNT_PAYABLE_DOCUMENT" | "OUTGOING_PAYMENT" | "INCOMING_PAYMENT" | "BANK_RECONCILIATION" | "SALES_INVOICE" | "INVENTORY_LEDGER" | "STANDARD_COST_REVISION" | "ACQUISITION_COST_ADJUSTMENT" | "PRODUCTION_ORDER" | "YEAR_END_CLOSE" | null; sourceDocumentId: string | null; reversalOfId: string | null; postedAt: Timestamp | null; createdAt: Generated; updatedAt: Generated; } JournalLine: { id: Generated; journalEntryId: string; accountId: string; debitAmount: string | null; creditAmount: string | null; description: string | 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;