UNPKG

idea-toolbox

Version:
69 lines (68 loc) 1.9 kB
import { Label } from './label.model'; import { Languages } from './languages.model'; import { Resource } from './resource.model'; /** * An attachment to stick to an entity. */ export declare class Attachment extends Resource { /** * The ID of the attachment. */ attachmentId: string; /** * The name of the attachment. */ name: string; /** * The format of the attachment, without a prefixing dot (e.g. 'jpg', 'pdf'). */ format: string; load(x: any): void; safeLoad(newData: any, safeData: any): void; validate(): string[]; /** * Get the filename (`name.format`) of the attachment. */ getFilename(): string; } /** * A section to group a list of attachments. */ export declare class AttachmentSection extends Resource { /** * The name of the section (multilanguage). */ name: Label; /** * The description of the section (multilanguage). */ description: Label; /** * The list of attachments in the section. */ attachments: Attachment[]; load(x: any, languages: Languages): void; validate(languages: Languages): string[]; } /** * A block of reorderable sections each containing a list of attachments. * Use it when you need to organize the attachments in sections or categories. */ export declare class AttachmentSections extends Resource { /** * Ordered list of the sections (keys) to expect in the block. * Example: `['flowers', 'burgers', ...]`. */ sectionsLegend: string[]; /** * Object containg attributes of type AttachmentSection; e.g. * ``` * sections.flowers: AttachmentSection; * sections.burgers: AttachmentSection; * ... * ``` */ sections: Record<string, AttachmentSection>; load(x: any, languages: Languages): void; validate(languages: Languages): string[]; }