import { UxFileItem } from '../helpers/file-upload'; import { Deco } from '../interfaces/deco'; import { DecoApi, RequestOption } from '../helpers/deco-api'; import { ValidationController } from 'aurelia-validation'; export interface ModelOptions { enableStory?: boolean; } export interface FilePreviewOptions { etag?: null | string; fileId: null | string; route?: string; } export interface GetAllOptions extends RequestOption { route?: string; getRefLocale?: boolean; includeResponse?: boolean; } export interface GetOneOptions extends RequestOption { route?: string; getRefLocale?: boolean; includeResponse?: boolean; } export interface SaveOptions extends RequestOption { route?: string; getRefLocale?: boolean; body?: any; bodyFormat?: 'json' | 'FormData'; includeResponse?: boolean; } export interface FixBodyOptions extends RequestOption { bodyFormat?: 'json' | 'FormData'; } export interface RemoveOptions extends RequestOption { route?: string; } export interface UpdatePropertiesOptions extends RequestOption { route?: string; bodyFormat?: 'json' | 'FormData'; updateInstanceWithResponse?: boolean; includeResponse?: boolean; } export declare const model: (baseroute: string, options?: ModelOptions) => (target: any) => void; export declare class Model { id: string; _createdAt: Date; _createdBy: string; _updatedAt: Date; _updatedBy: string; _refLocales?: { [key: string]: { [key: string]: any; }; }; static options: ModelOptions; static get deco(): Deco; get deco(): Deco; static get api(): DecoApi; get api(): DecoApi; static get isMultilang(): boolean; get isMultilang(): boolean; static request(method: 'get' | 'post' | 'put' | 'delete', uri?: string, body?: any, options?: RequestOption): Promise>; static addLocaleInSuffixIfNecessary(suffix: string, options?: GetAllOptions): string; addLocaleInSuffixIfNecessary(suffix: string, options?: GetAllOptions): string; static getAll(this: T, suffix?: string, options?: GetAllOptions): Promise>>; static getOneWithId(this: T, id: string, suffix?: string, options?: GetOneOptions): Promise>; static getOneWithQuery(this: T): Promise>; static instanceFromElement(this: T, element: any): InstanceType; static instanceFromApi(this: T, element: any): Promise>; static instanceFromUnclassedElement(this: T, element: any): InstanceType; get _label(): string; save(suffix?: string, options?: SaveOptions): Promise; fixBodyIfFilesToUpload(body: any, options?: FixBodyOptions): Promise; remove(suffix?: string, options?: RemoveOptions): Promise; updateInstanceFromElement(this: T, element: any, properties?: Array): Promise; updateInstanceFromUnclassedElement(this: T, element: any, properties?: Array): T; unClass(): any; updateProperties(suffix: string, properties: Array, options?: UpdatePropertiesOptions): Promise; getFilePreview(property: string, format: string, options?: FilePreviewOptions): Promise; getFilePreviewUrl(property: string, format: string, options?: FilePreviewOptions): Promise; getUxFilePreviewData(property: string, file: UxFileItem, format: string): Promise; getUxFileData(property: string, file: UxFileItem): Promise | null; validationRules(): any; validate(): Promise; private _validationController; get validationController(): ValidationController; static get baseroute(): string; static getAllRoute(): string; static getOneRoute(elementId: string): string; static postRoute(): string; static putRoute(elementId: string): string; static deleteRoute(elementId: string): string; getRoute(): string; getOneRoute(elementId: string): string; postRoute(): string; putRoute(elementId: string): string; deleteRoute(elementId: string): string; get(propertyName: string): any; set(propertyName: string, value: any): void; }