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": { BusinessPartner: { id: Generated; name: string; type: "ORGANIZATION" | "INDIVIDUAL"; status: "ACTIVE" | "INACTIVE"; createdAt: Generated; updatedAt: Generated; } CustomerAccount: { id: Generated; partnerId: string; companyId: string; code: string; name: string; preferredCurrencyId: string | null; status: "ACTIVE" | "INACTIVE"; createdAt: Generated; updatedAt: Generated; } CustomerAddressUsage: { id: Generated; accountId: string; addressId: string; purpose: "BILL_TO" | "SHIP_TO"; isDefault: boolean; createdAt: Generated; updatedAt: Generated; } CustomerBankAccountUsage: { id: Generated; accountId: string; bankAccountId: string; purpose: "RECEIPT" | "REFUND"; isDefault: boolean; createdAt: Generated; updatedAt: Generated; } PartnerAddress: { id: Generated; partnerId: string; active: boolean; line1: string; line2: string | null; city: string; state: string | null; postalCode: string; country: string; createdAt: Generated; updatedAt: Generated; } PartnerBankAccount: { id: Generated; partnerId: string; active: boolean; bankName: string; accountHolderName: string; accountNumber: string; routingNumber: string | null; currencyId: string; createdAt: Generated; updatedAt: Generated; } SupplierAccount: { id: Generated; partnerId: string; companyId: string; code: string; name: string; preferredCurrencyId: string | null; defaultExpenseAccountId: string | null; status: "ACTIVE" | "INACTIVE"; createdAt: Generated; updatedAt: Generated; } SupplierAddressUsage: { id: Generated; accountId: string; addressId: string; purpose: "ORDER_FROM" | "REMIT_TO" | "SHIP_FROM" | "RETURN_TO"; isDefault: boolean; createdAt: Generated; updatedAt: Generated; } SupplierBankAccountUsage: { id: Generated; accountId: string; bankAccountId: string; purpose: "PAYMENT" | "REFUND"; isDefault: boolean; 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;