import { createGetDB, type Generated, type Timestamp, type Serial, type NamespaceDB, type NamespaceInsertable, type NamespaceSelectable, type NamespaceTable, type NamespaceTableName, type NamespaceTransaction, type NamespaceUpdateable, } from "@tailor-platform/sdk/kysely"; export interface Namespace { "main-db": { AccountReceivableDistributionLine: { id: Generated; accountReceivableDocumentLineId: string; correctionOfDistributionLineId: string | null; accountId: string; amount: string; description: string | null; createdAt: Generated; updatedAt: Generated; } AccountReceivableDocument: { id: Generated; companyId: string; customerAccountId: string; currencyId: string; receivableControlAccountId: string; documentType: "INVOICE" | "CREDIT_MEMO"; correctionOfId: string | null; documentNumber: Serial; externalDocumentNumber: string | null; documentDate: Timestamp; postingDate: Timestamp; totalAmount: string; description: string | null; status: "DRAFT" | "REGISTERED" | "POSTED" | "CANCELLED"; registeredAt: Timestamp | null; postedAt: Timestamp | null; cancelledAt: Timestamp | null; createdAt: Generated; updatedAt: Generated; } AccountReceivableDocumentLine: { id: Generated; accountReceivableDocumentId: string; netAmount: string; taxAmount: string | null; grossAmount: string; correctionOfLineId: string | null; correctionType: "PRICE" | "QUANTITY" | "AMOUNT" | null; sourceType: "SALES_ORDER" | null; salesOrderLineId: string | null; quantity: string | null; unitPrice: string | null; unitId: string | null; description: string | null; createdAt: Generated; updatedAt: Generated; } AccountReceivableDueScheduleLine: { id: Generated; accountReceivableDocumentId: string; dueDate: Timestamp; amount: string; createdAt: Generated; updatedAt: Generated; } AccountReceivableSettlement: { id: Generated; sourceType: "INCOMING_PAYMENT"; incomingPaymentId: string; accountReceivableDueScheduleLineId: string; settledAmount: string; reversalOfSettlementId: string | null; createdAt: Generated; updatedAt: Generated; } IncomingPayment: { id: Generated; companyId: string; customerAccountId: string; currencyId: string; paymentAccountId: string; paymentDate: Timestamp; totalAmount: string; status: "DRAFT" | "POSTED" | "CANCELLED" | "REVERSED"; postedAt: Timestamp | null; reversalDate: Timestamp | null; reversedAt: Timestamp | null; cancelledAt: 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;