import type { AttributeRow, VariantGroupRow } from '../../../../types/db/index.js'; export interface CreateVariantGroupInput { /** The attribute group the products of the variant group belong to. */ attribute_group_id: number | string; /** The axes: 1 to 5 codes of attributes of type `select`. */ attribute_codes: string[]; } export interface CreatedVariantGroup { group: VariantGroupRow; /** * The axes, in the order they are stored (`attribute_one` first). That is the * order the attribute table answers in, not the order of `attribute_codes`. */ attributes: AttributeRow[]; } /** * Creates a variant group: a row that says which attributes the products of the * group differ by. Products join it with `addVariantItem`. * * Refuses (with a `VariantGroupError`) no attributes, more than 5, an attribute * that does not exist or is not of type `select`, and an attribute that is not * linked to the attribute group. */ export default function createVariantGroup(input: CreateVariantGroupInput): Promise;