import { description } from './description.js'; export declare const tempFile: Omit, "functions" | "description" | "item" | "exposedFunctions" | "security" | "middlewares"> & { item: import("@aeriajs/types").SchemaWithId<{ readonly $id: "tempFile"; readonly icon: "file"; readonly hidden: true; readonly temporary: { readonly index: "created_at"; readonly expireAfterSeconds: 3600; }; readonly properties: { readonly created_at: { readonly type: "string"; readonly format: "date-time"; }; readonly absolute_path: { readonly type: "string"; }; readonly size: { readonly type: "number"; }; readonly mime: { readonly type: "number"; }; readonly collection: { readonly type: "string"; }; readonly filename: { readonly type: "string"; }; }; }>; description: { readonly $id: "tempFile"; readonly icon: "file"; readonly hidden: true; readonly temporary: { readonly index: "created_at"; readonly expireAfterSeconds: 3600; }; readonly properties: { readonly created_at: { readonly type: "string"; readonly format: "date-time"; }; readonly absolute_path: { readonly type: "string"; }; readonly size: { readonly type: "number"; }; readonly mime: { readonly type: "number"; }; readonly collection: { readonly type: "string"; }; readonly filename: { readonly type: "string"; }; }; }; functions: (Record) => any> & {}) | undefined; contracts: { [x: string]: import("@aeriajs/types").Contract | undefined; } | undefined; }; export declare const file: { description: { readonly $id: "file"; readonly icon: "paperclip"; readonly owned: "always"; readonly presets: readonly ["owned"]; readonly indexes: readonly ["name", "link", "type", "size"]; readonly properties: { readonly type: { readonly type: "string"; }; readonly size: { readonly type: "number"; }; readonly last_modified: { readonly type: "string"; readonly format: "date-time"; }; readonly name: { readonly type: "string"; }; readonly absolute_path: { readonly type: "string"; }; readonly relative_path: { readonly type: "string"; }; readonly immutable: { readonly type: "boolean"; }; readonly link: { readonly type: "getter"; readonly getter: (doc: object) => Promise; }; readonly download_link: { readonly type: "getter"; readonly getter: (doc: object) => Promise; }; }; readonly actions: { readonly deleteAll: { readonly label: "Remover"; readonly ask: true; readonly selection: true; }; }; readonly individualActions: { readonly remove: { readonly label: "Remover"; readonly icon: "trash"; readonly ask: true; }; }; }; functions: { get: (payload: import("@aeriajs/types").GetPayload>, context: TContext, options?: import("@aeriajs/core").GetOptions) => Promise>>; insert: (payload: { what: { content: string; } & Pick>, "_id" | "name" | "owner" | "absolute_path">; }, context: import("@aeriajs/types").Context) => Promise Promise; }; readonly download_link: { readonly type: "getter"; readonly getter: (doc: object) => Promise; }; }; readonly actions: { readonly deleteAll: { readonly label: "Remover"; readonly ask: true; readonly selection: true; }; }; readonly individualActions: { readonly remove: { readonly label: "Remover"; readonly icon: "trash"; readonly ask: true; }; }; }>>>; download: (payload: Pick<{} & Omit> & { fileId: string; options: ("download" | "picture")[]; noHeaders: boolean; }, never>, "fileId"> & Partial<{} & Omit> & { fileId: string; options: ("download" | "picture")[]; noHeaders: boolean; }, never>>, context: import("@aeriajs/types").Context<{ readonly $id: "file"; readonly icon: "paperclip"; readonly owned: "always"; readonly presets: readonly ["owned"]; readonly indexes: readonly ["name", "link", "type", "size"]; readonly properties: { readonly type: { readonly type: "string"; }; readonly size: { readonly type: "number"; }; readonly last_modified: { readonly type: "string"; readonly format: "date-time"; }; readonly name: { readonly type: "string"; }; readonly absolute_path: { readonly type: "string"; }; readonly relative_path: { readonly type: "string"; }; readonly immutable: { readonly type: "boolean"; }; readonly link: { readonly type: "getter"; readonly getter: (doc: object) => Promise; }; readonly download_link: { readonly type: "getter"; readonly getter: (doc: object) => Promise; }; }; readonly actions: { readonly deleteAll: { readonly label: "Remover"; readonly ask: true; readonly selection: true; }; }; readonly individualActions: { readonly remove: { readonly label: "Remover"; readonly icon: "trash"; readonly ask: true; }; }; }>) => any; remove: (payload: import("@aeriajs/types").RemovePayload>, context: import("@aeriajs/types").Context) => Promise<{ readonly _tag: "Result"; readonly error: undefined; readonly result: import("mongodb").WithId>, "_id">> | null; } | import("@aeriajs/types").Result.Error<{ readonly code: "RESOURCE_NOT_FOUND"; } & { httpStatus: 404; }> | import("@aeriajs/types").Result.Error<{ readonly code: "OWNERSHIP_ERROR"; } & { httpStatus: 403; }> | { readonly _tag: "Error"; readonly error: Pick<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "MALFORMED_INPUT"; httpStatus: 400 | 403 | 404; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "MALFORMED_INPUT"; httpStatus: 400 | 403 | 404; message: string; details: any; }, never>>; readonly result: undefined; }>; removeAll: (payload: import("@aeriajs/types").RemoveAllPayload, context: import("@aeriajs/types").Context) => Promise<{ readonly _tag: "Result"; readonly error: undefined; readonly result: import("mongodb").DeleteResult; } | import("@aeriajs/types").Result.Error<{ readonly code: "OWNERSHIP_ERROR"; } & { httpStatus: 403; }>>; }; exposedFunctions: { get: "unauthenticated"; insert: true; download: "unauthenticated"; remove: true; removeAll: true; }; contracts: { readonly download: { readonly payload: { readonly type: "object"; readonly required: readonly ["fileId"]; readonly properties: { readonly fileId: { readonly type: "string"; }; readonly options: { readonly type: "array"; readonly items: { readonly enum: readonly ["picture", "download"]; }; }; readonly noHeaders: { readonly type: "boolean"; }; }; }; readonly response: [{ readonly type: "object"; readonly properties: { readonly _tag: { readonly const: "Error"; }; readonly result: { readonly const: undefined; readonly isConstUndefined: true; }; readonly error: { readonly type: "object"; readonly required: readonly ["httpStatus", "code"]; readonly properties: { readonly httpStatus: { readonly enum: [404, 416]; }; readonly code: { readonly enum: ["RESOURCE_NOT_FOUND", "RANGE_NOT_SATISFIABLE"]; }; readonly message: { readonly type: "string"; }; readonly details: { readonly type: "object"; readonly additionalProperties: true; }; }; }; }; }, { readonly type: "object"; readonly additionalProperties: true; }]; }; }; } & { item: import("@aeriajs/types").SchemaWithId<{ readonly $id: "file"; readonly icon: "paperclip"; readonly owned: "always"; readonly presets: readonly ["owned"]; readonly indexes: readonly ["name", "link", "type", "size"]; readonly properties: { readonly type: { readonly type: "string"; }; readonly size: { readonly type: "number"; }; readonly last_modified: { readonly type: "string"; readonly format: "date-time"; }; readonly name: { readonly type: "string"; }; readonly absolute_path: { readonly type: "string"; }; readonly relative_path: { readonly type: "string"; }; readonly immutable: { readonly type: "boolean"; }; readonly link: { readonly type: "getter"; readonly getter: (doc: object) => Promise; }; readonly download_link: { readonly type: "getter"; readonly getter: (doc: object) => Promise; }; }; readonly actions: { readonly deleteAll: { readonly label: "Remover"; readonly ask: true; readonly selection: true; }; }; readonly individualActions: { readonly remove: { readonly label: "Remover"; readonly icon: "trash"; readonly ask: true; }; }; }>; description: { readonly $id: "file"; readonly icon: "paperclip"; readonly owned: "always"; readonly presets: readonly ["owned"]; readonly indexes: readonly ["name", "link", "type", "size"]; readonly properties: { readonly type: { readonly type: "string"; }; readonly size: { readonly type: "number"; }; readonly last_modified: { readonly type: "string"; readonly format: "date-time"; }; readonly name: { readonly type: "string"; }; readonly absolute_path: { readonly type: "string"; }; readonly relative_path: { readonly type: "string"; }; readonly immutable: { readonly type: "boolean"; }; readonly link: { readonly type: "getter"; readonly getter: (doc: object) => Promise; }; readonly download_link: { readonly type: "getter"; readonly getter: (doc: object) => Promise; }; }; readonly actions: { readonly deleteAll: { readonly label: "Remover"; readonly ask: true; readonly selection: true; }; }; readonly individualActions: { readonly remove: { readonly label: "Remover"; readonly icon: "trash"; readonly ask: true; }; }; }; functions: { get: (payload: import("@aeriajs/types").GetPayload>, context: TContext, options?: import("@aeriajs/core").GetOptions) => Promise>>; insert: (payload: { what: { content: string; } & Pick>, "_id" | "name" | "owner" | "absolute_path">; }, context: import("@aeriajs/types").Context) => Promise Promise; }; readonly download_link: { readonly type: "getter"; readonly getter: (doc: object) => Promise; }; }; readonly actions: { readonly deleteAll: { readonly label: "Remover"; readonly ask: true; readonly selection: true; }; }; readonly individualActions: { readonly remove: { readonly label: "Remover"; readonly icon: "trash"; readonly ask: true; }; }; }>>>; download: (payload: Pick<{} & Omit> & { fileId: string; options: ("download" | "picture")[]; noHeaders: boolean; }, never>, "fileId"> & Partial<{} & Omit> & { fileId: string; options: ("download" | "picture")[]; noHeaders: boolean; }, never>>, context: import("@aeriajs/types").Context<{ readonly $id: "file"; readonly icon: "paperclip"; readonly owned: "always"; readonly presets: readonly ["owned"]; readonly indexes: readonly ["name", "link", "type", "size"]; readonly properties: { readonly type: { readonly type: "string"; }; readonly size: { readonly type: "number"; }; readonly last_modified: { readonly type: "string"; readonly format: "date-time"; }; readonly name: { readonly type: "string"; }; readonly absolute_path: { readonly type: "string"; }; readonly relative_path: { readonly type: "string"; }; readonly immutable: { readonly type: "boolean"; }; readonly link: { readonly type: "getter"; readonly getter: (doc: object) => Promise; }; readonly download_link: { readonly type: "getter"; readonly getter: (doc: object) => Promise; }; }; readonly actions: { readonly deleteAll: { readonly label: "Remover"; readonly ask: true; readonly selection: true; }; }; readonly individualActions: { readonly remove: { readonly label: "Remover"; readonly icon: "trash"; readonly ask: true; }; }; }>) => any; remove: (payload: import("@aeriajs/types").RemovePayload>, context: import("@aeriajs/types").Context) => Promise<{ readonly _tag: "Result"; readonly error: undefined; readonly result: import("mongodb").WithId>, "_id">> | null; } | import("@aeriajs/types").Result.Error<{ readonly code: "RESOURCE_NOT_FOUND"; } & { httpStatus: 404; }> | import("@aeriajs/types").Result.Error<{ readonly code: "OWNERSHIP_ERROR"; } & { httpStatus: 403; }> | { readonly _tag: "Error"; readonly error: Pick<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "MALFORMED_INPUT"; httpStatus: 400 | 403 | 404; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "MALFORMED_INPUT"; httpStatus: 400 | 403 | 404; message: string; details: any; }, never>>; readonly result: undefined; }>; removeAll: (payload: import("@aeriajs/types").RemoveAllPayload, context: import("@aeriajs/types").Context) => Promise<{ readonly _tag: "Result"; readonly error: undefined; readonly result: import("mongodb").DeleteResult; } | import("@aeriajs/types").Result.Error<{ readonly code: "OWNERSHIP_ERROR"; } & { httpStatus: 403; }>>; }; contracts: { readonly download: { readonly payload: { readonly type: "object"; readonly required: readonly ["fileId"]; readonly properties: { readonly fileId: { readonly type: "string"; }; readonly options: { readonly type: "array"; readonly items: { readonly enum: readonly ["picture", "download"]; }; }; readonly noHeaders: { readonly type: "boolean"; }; }; }; readonly response: [{ readonly type: "object"; readonly properties: { readonly _tag: { readonly const: "Error"; }; readonly result: { readonly const: undefined; readonly isConstUndefined: true; }; readonly error: { readonly type: "object"; readonly required: readonly ["httpStatus", "code"]; readonly properties: { readonly httpStatus: { readonly enum: [404, 416]; }; readonly code: { readonly enum: ["RESOURCE_NOT_FOUND", "RANGE_NOT_SATISFIABLE"]; }; readonly message: { readonly type: "string"; }; readonly details: { readonly type: "object"; readonly additionalProperties: true; }; }; }; }; }, { readonly type: "object"; readonly additionalProperties: true; }]; }; }; };