import { ObjectId } from 'bson'; import { ICategoryPricingRule } from '../Category'; import ITranslation from '../Translation'; import { ExternalServiceSlugEnum } from '../Space/IExternalService'; export default interface IAttribute { readonly id?: string; readonly slug: string; readonly name: ITranslation[]; readonly values: IAttributeValue[]; /** Use ITranslation[], string is just there for compatibility */ readonly description: ITranslation[] | string; readonly type?: AttributeTypeEnum; readonly is_facet: boolean; readonly is_searchable: boolean; readonly is_multiple: boolean; readonly is_service_related?: boolean; readonly has_price_rules?: boolean; readonly draft?: boolean; readonly prefix?: string; readonly suffix?: string; readonly show_in_cart?: boolean; readonly service_related_name?: string; readonly service_links_to_attribute?: { readonly value_slugs: { readonly slug: string; readonly percent_variation?: number; }[]; readonly service_field: string; }[]; readonly created_from_external_service?: ExternalServiceSlugEnum; } export interface IMongoAttribute extends IAttribute { readonly _id?: string | ObjectId; } export interface IAttributeValue { readonly value: ITranslation[]; readonly pricing_rules?: ICategoryPricingRule[]; readonly slug: string; readonly other_details?: { readonly image?: string; readonly color_code_internal?: string; readonly color_name_internal?: string; }; readonly is_external?: boolean; readonly default_tag?: string; readonly associated_to?: string[]; } export declare enum AttributeTypeEnum { STRING = "string", NUMBER = "number", COLOR = "color", TEXTURE = "img" }