UNPKG

@horizon-labs/property-model-v3

Version:

Modelo de propriedades imobiliárias v3 - Sistema de atributos dinâmicos

223 lines (216 loc) 4.93 kB
interface PropertyType { reference: string; web_code?: string | null; title: string | null; description: string | null; attributes: Attribute[]; media: { pictures?: any[]; videos?: any[]; tour360?: any[]; }; tags: string; thumbnails?: string; updated_at: string; } interface Attribute { key: string; value: any; valueLabel?: string | string[]; composedLabel?: string; type?: string; unit?: string; format?: string; } declare const PropertyAttributesModel: ({ key: string; label: string; type: string; cat: string; order: number; role?: undefined; unit?: undefined; composedLabel?: undefined; iconName?: undefined; } | { key: string; label: string; type: string; role: string; unit: string; cat: string; order: number; composedLabel?: undefined; iconName?: undefined; } | { key: string; label: string; type: string; role: string; unit: string; cat: string; composedLabel: string; order: number; iconName?: undefined; } | { key: string; label: string; type: string; role: string; cat: string; order: number; unit?: undefined; composedLabel?: undefined; iconName?: undefined; } | { key: string; label: string; type: string; role: string; unit: string; cat: string; composedLabel: string; iconName: string; order: number; } | { key: string; label: string; type: string; role: string; cat: string; composedLabel: string; iconName: string; order: number; unit?: undefined; })[]; declare const unitListModel: { area: { key: string; aliases: string[]; label: string; labelDisplay: string; }[]; length: { key: string; aliases: string[]; label: string; labelDisplay: string; }[]; currency: { key: string; aliases: never[]; label: string; labelDisplay: string; locale: string; }[]; }; declare const formatListModel: {}; declare function verifyAttrKeyInPropertyV3Model(key: string): { key: string; label: string; type: string; cat: string; order: number; role?: undefined; unit?: undefined; composedLabel?: undefined; iconName?: undefined; } | { key: string; label: string; type: string; role: string; unit: string; cat: string; order: number; composedLabel?: undefined; iconName?: undefined; } | { key: string; label: string; type: string; role: string; unit: string; cat: string; composedLabel: string; order: number; iconName?: undefined; } | { key: string; label: string; type: string; role: string; cat: string; order: number; unit?: undefined; composedLabel?: undefined; iconName?: undefined; } | { key: string; label: string; type: string; role: string; unit: string; cat: string; composedLabel: string; iconName: string; order: number; } | { key: string; label: string; type: string; role: string; cat: string; composedLabel: string; iconName: string; order: number; unit?: undefined; } | undefined; declare function mergePropertyAttributesModel(base: any[], overrides: any[]): any[]; declare function sortAttributes(attributes: any[], sortKeys?: string[]): any[]; declare const preparaAttrValueLabel: (valor: any) => any; interface PropertyAttribute { key: string; value?: any; valueLabel?: string | string[]; composedLabel?: string; type?: string; unit?: string; format?: string; } interface PropertyObject { reference: string; tags: string; attributes: PropertyAttribute[]; [key: string]: any; } interface MapAction { fn: string; key?: string; value?: any; list?: string[]; [key: string]: any; } interface AttributeRule { key: string; condition?: { eq?: any; not_eq?: any; has?: any; has_any?: any; not_has?: any; gt?: number; gte?: number; lt?: number; lte?: number; }; rules: MapAction[]; } interface MapRules { attrTipoRules?: Record<string, MapAction[]>; referenceRules?: Record<string, MapAction[]>; tagsRules?: Record<string, MapAction[]>; attributesRules?: AttributeRule[]; } declare function propertyV3CustomMapper(property: PropertyObject, mapRules: MapRules): PropertyObject; export { type Attribute, type AttributeRule, type MapAction, type MapRules, type PropertyAttribute, PropertyAttributesModel, type PropertyObject, type PropertyType, formatListModel, mergePropertyAttributesModel, preparaAttrValueLabel, propertyV3CustomMapper, sortAttributes, unitListModel, verifyAttrKeyInPropertyV3Model };