import { ok, type ReadonlyDB } from "@tailor-platform/erp-kit/core"; import type { DB } from "../generated/kysely-tailordb"; export interface ListProductVariantsInput { productId: string; } export async function run(db: ReadonlyDB, input: ListProductVariantsInput) { const variants = await db .selectFrom("ProductVariant") .selectAll() .where("productId", "=", input.productId) .execute(); return ok({ variants }); }