import { IkasProductAttributeOption } from "./option"; import { IkasProductAttributeTableTemplate } from "./table-template"; import { IkasProductAttributeTranslation } from "./translation"; export type IkasProductAttribute = { id: string; name: string; description: string | null; type: IkasProductAttributeType; options: IkasProductAttributeOption[] | null; tableTemplate: IkasProductAttributeTableTemplate | null; translations?: IkasProductAttributeTranslation[] | null; }; /** * Mirror of the API's `ProductAttributeTypeEnum` (see storefront-api `__api/types`). The API value is * force-cast into this union when products are mapped (`functions/api/product`), so a value missing * here still arrives at runtime — it just stops being visible to the compiler. Keep both lists in sync. */ export type IkasProductAttributeType = "CHOICE" | "MULTIPLE_CHOICE" | "COLOR_THUMBNAIL_MULTIPLE_CHOICE" | "TEXT" | "BOOLEAN" | "NUMERIC" | "DATE" | "DATETIME" | "HTML" | "TABLE" | "IMAGE" | "PRODUCT";