export * as builtinFunctions from './functions/index.js'; export * from './collections/index.js'; export * from './authentication.js'; export { insert as insertUser, } from './collections/user/insert.js'; import { file, tempFile, log, resourceUsage, user } from './collections/index.js'; type File = typeof file.item; type TempFile = typeof tempFile.item; type Log = typeof log.item; type ResourceUsage = typeof resourceUsage.item; type User = typeof user.item; export declare const collections: { 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/index.js").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/index.js").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; }]; }; }; }; 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; }; log: Omit, "functions" | "description" | "item" | "exposedFunctions" | "security" | "middlewares"> & { item: import("@aeriajs/types").SchemaWithId<{ readonly $id: "log"; readonly icon: "magnifying-glass"; readonly required: readonly ["context", "message"]; readonly table: readonly ["owner", "context", "message", "created_at"]; readonly properties: { readonly owner: { readonly $ref: "user"; readonly noForm: true; }; readonly context: { readonly type: "string"; }; readonly message: { readonly type: "string"; }; readonly details: { readonly type: "object"; readonly additionalProperties: true; }; readonly created_at: { readonly type: "string"; readonly format: "date-time"; }; }; readonly presets: readonly ["view"]; readonly filters: readonly ["context", "message", "owner"]; }>; description: { readonly $id: "log"; readonly icon: "magnifying-glass"; readonly required: readonly ["context", "message"]; readonly table: readonly ["owner", "context", "message", "created_at"]; readonly properties: { readonly owner: { readonly $ref: "user"; readonly noForm: true; }; readonly context: { readonly type: "string"; }; readonly message: { readonly type: "string"; }; readonly details: { readonly type: "object"; readonly additionalProperties: true; }; readonly created_at: { readonly type: "string"; readonly format: "date-time"; }; }; readonly presets: readonly ["view"]; readonly filters: readonly ["context", "message", "owner"]; }; functions: { get: (payload: import("@aeriajs/types").GetPayload>, context: TContext, options?: import("@aeriajs/core/index.js").GetOptions) => Promise>>; getAll: (payload: import("@aeriajs/types").GetAllPayload>, context: import("@aeriajs/types").Context Promise; })>, options?: import("@aeriajs/core/index.js").GetAllOptions) => Promise>>; insert: (payload: import("@aeriajs/types").InsertPayload>, context: TContext, options?: import("@aeriajs/core/index.js").InsertOptions) => Promise>>; }; contracts: { get?: import("@aeriajs/types").Contract | undefined; getAll?: import("@aeriajs/types").Contract | undefined; insert?: import("@aeriajs/types").Contract | undefined; }; }; resourceUsage: Omit, "functions" | "description" | "item" | "exposedFunctions" | "security" | "middlewares"> & { item: import("@aeriajs/types").SchemaWithId<{ readonly $id: "resourceUsage"; readonly icon: "wrench"; readonly required: readonly ["usage"]; readonly properties: { readonly user: { readonly $ref: "user"; }; readonly address: { readonly type: "string"; }; readonly usage: { readonly type: "object"; readonly additionalProperties: { readonly type: "object"; readonly properties: { readonly hits: { readonly type: "integer"; }; readonly points: { readonly type: "integer"; }; readonly last_reach: { readonly type: "string"; readonly format: "date-time"; }; readonly last_maximum_reach: { readonly type: "string"; readonly format: "date-time"; }; }; }; }; }; }>; description: { readonly $id: "resourceUsage"; readonly icon: "wrench"; readonly required: readonly ["usage"]; readonly properties: { readonly user: { readonly $ref: "user"; }; readonly address: { readonly type: "string"; }; readonly usage: { readonly type: "object"; readonly additionalProperties: { readonly type: "object"; readonly properties: { readonly hits: { readonly type: "integer"; }; readonly points: { readonly type: "integer"; }; readonly last_reach: { readonly type: "string"; readonly format: "date-time"; }; readonly last_maximum_reach: { readonly type: "string"; readonly format: "date-time"; }; }; }; }; }; }; functions: (Record) => any> & {}) | undefined; contracts: { [x: string]: import("@aeriajs/types").Contract | undefined; } | undefined; }; user: Omit, "functions" | "description" | "item" | "exposedFunctions" | "security" | "middlewares"> & { item: import("@aeriajs/types").SchemaWithId<{ readonly $id: "user"; readonly icon: "users"; readonly required: readonly ["name", "roles", "email"]; readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"]; readonly indexes: readonly ["name"]; readonly unique: readonly ["email"]; readonly properties: { readonly name: { readonly type: "string"; readonly minLength: 1; }; readonly given_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly family_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly active: { readonly type: "boolean"; }; readonly roles: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly uniqueItems: true; readonly minItems: 1; }; readonly email: { readonly type: "string"; readonly inputType: "email"; readonly minLength: 3; }; readonly password: { readonly type: "string"; readonly inputType: "password"; readonly hidden: true; }; readonly phone_number: { readonly type: "string"; readonly mask: "(##) #####-####"; }; readonly picture_file: { readonly $ref: "file"; readonly accept: readonly ["image/*"]; }; readonly picture: { readonly type: "getter"; readonly getter: (doc: object) => Promise | undefined; }; readonly self_registered: { readonly type: "boolean"; readonly readOnly: true; }; readonly updated_at: { readonly type: "string"; readonly format: "date-time"; }; }; readonly presets: readonly ["crud", "duplicate"]; readonly layout: { readonly name: "grid"; readonly options: { readonly title: "name"; readonly badge: "roles"; readonly picture: "picture_file"; readonly information: "email"; readonly active: "active"; readonly translateBadge: true; }; }; readonly individualActions: { readonly changePassword: { readonly label: "change_password"; readonly icon: "key"; readonly translate: true; readonly route: { readonly name: "/dashboard/user/changepass"; readonly fetchItem: true; }; }; readonly copyRedefinePasswordLink: { readonly label: "copy_redefine_password_link"; readonly icon: "link"; readonly translate: true; }; readonly copyActivationLink: { readonly label: "copy_activation_link"; readonly icon: "link"; readonly translate: true; }; }; readonly filters: readonly ["name", "roles", "email", "phone_number"]; readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"]; readonly tableMeta: readonly ["email"]; readonly formLayout: { readonly fields: { readonly given_name: { readonly span: 3; }; readonly family_name: { readonly span: 3; }; }; }; }>; description: { readonly $id: "user"; readonly icon: "users"; readonly required: readonly ["name", "roles", "email"]; readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"]; readonly indexes: readonly ["name"]; readonly unique: readonly ["email"]; readonly properties: { readonly name: { readonly type: "string"; readonly minLength: 1; }; readonly given_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly family_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly active: { readonly type: "boolean"; }; readonly roles: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly uniqueItems: true; readonly minItems: 1; }; readonly email: { readonly type: "string"; readonly inputType: "email"; readonly minLength: 3; }; readonly password: { readonly type: "string"; readonly inputType: "password"; readonly hidden: true; }; readonly phone_number: { readonly type: "string"; readonly mask: "(##) #####-####"; }; readonly picture_file: { readonly $ref: "file"; readonly accept: readonly ["image/*"]; }; readonly picture: { readonly type: "getter"; readonly getter: (doc: object) => Promise | undefined; }; readonly self_registered: { readonly type: "boolean"; readonly readOnly: true; }; readonly updated_at: { readonly type: "string"; readonly format: "date-time"; }; }; readonly presets: readonly ["crud", "duplicate"]; readonly layout: { readonly name: "grid"; readonly options: { readonly title: "name"; readonly badge: "roles"; readonly picture: "picture_file"; readonly information: "email"; readonly active: "active"; readonly translateBadge: true; }; }; readonly individualActions: { readonly changePassword: { readonly label: "change_password"; readonly icon: "key"; readonly translate: true; readonly route: { readonly name: "/dashboard/user/changepass"; readonly fetchItem: true; }; }; readonly copyRedefinePasswordLink: { readonly label: "copy_redefine_password_link"; readonly icon: "link"; readonly translate: true; }; readonly copyActivationLink: { readonly label: "copy_activation_link"; readonly icon: "link"; readonly translate: true; }; }; readonly filters: readonly ["name", "roles", "email", "phone_number"]; readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"]; readonly tableMeta: readonly ["email"]; readonly formLayout: { readonly fields: { readonly given_name: { readonly span: 3; }; readonly family_name: { readonly span: 3; }; }; }; }; functions: { readonly get: (payload: import("@aeriajs/types").GetPayload>, context: Omit) => Promise>>; readonly getAll: (payload: import("@aeriajs/types").GetAllPayload>, context: Omit) => Promise>>; readonly remove: (payload: import("@aeriajs/types").RemovePayload>, context: Omit) => 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 upload: (payload: unknown, context: Omit) => Promise | { readonly _tag: "Result"; readonly error: undefined; readonly result: { readonly tempId: any; }; }>; readonly removeFile: (payload: import("@aeriajs/types").RemoveFilePayload, context: Omit) => Promise<{ readonly _tag: "Result"; readonly error: undefined; readonly result: any; } | import("@aeriajs/types").Result.Error<{ readonly code: "OWNERSHIP_ERROR"; } & { httpStatus: 403; }>>; readonly insert: (payload: NoInfer>>, context: Omit) => Promise | import("@aeriajs/types").Result.Error<{ readonly code: "AUTHORIZATION_ERROR"; readonly message: "tried to set unallowed roles"; } & { httpStatus: 403; }> | import("@aeriajs/types").Result.Error<{ readonly code: "RESOURCE_NOT_FOUND"; } & { httpStatus: 404; }> | import("@aeriajs/types").Result.Error<{ readonly code: "AUTHORIZATION_ERROR"; readonly message: "tried to edit an user with a role higher in the hierarchy"; } & { httpStatus: 403; }> | import("@aeriajs/types").InsertReturnType>>; readonly editProfile: (payload: Partial<{} & Omit string | undefined; }; readonly family_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly active: { readonly type: "boolean"; }; readonly roles: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly uniqueItems: true; readonly minItems: 1; }; readonly email: { readonly type: "string"; readonly inputType: "email"; readonly minLength: 3; }; readonly password: { readonly type: "string"; readonly inputType: "password"; readonly hidden: true; }; readonly phone_number: { readonly type: "string"; readonly mask: "(##) #####-####"; }; readonly picture: { readonly type: "getter"; readonly getter: (doc: object) => Promise | undefined; }; readonly self_registered: { readonly type: "boolean"; readonly readOnly: true; }; readonly updated_at: { readonly type: "string"; readonly format: "date-time"; }; }, {}>> & { name: string; password: string; updated_at: Date; picture: never; roles: string[]; email: string; active: boolean; phone_number: string; picture_file: import("bson").ObjectId; given_name: never; family_name: never; }, never>>, context: Omit) => ({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "TARGET_IMMUTABLE" | "MALFORMED_INPUT" | "UNIQUENESS_VIOLATED" | "EMPTY_TARGET" | "INVALID_PROPERTIES" | "MISSING_PROPERTIES" | "INVALID_DOCUMENT_ID" | "INVALID_TEMPFILE"; httpStatus: 400 | 403 | 404 | 422 | 500; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "TARGET_IMMUTABLE" | "MALFORMED_INPUT" | "UNIQUENESS_VIOLATED" | "EMPTY_TARGET" | "INVALID_PROPERTIES" | "MISSING_PROPERTIES" | "INVALID_DOCUMENT_ID" | "INVALID_TEMPFILE"; httpStatus: 400 | 403 | 404 | 422 | 500; message: string; details: any; }, never>>; }, never>) | ({ result: import("@aeriajs/types").SchemaWithId<{ readonly $id: "user"; readonly icon: "users"; readonly required: readonly ["name", "roles", "email"]; readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"]; readonly indexes: readonly ["name"]; readonly unique: readonly ["email"]; readonly properties: { readonly name: { readonly type: "string"; readonly minLength: 1; }; readonly given_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly family_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly active: { readonly type: "boolean"; }; readonly roles: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly uniqueItems: true; readonly minItems: 1; }; readonly email: { readonly type: "string"; readonly inputType: "email"; readonly minLength: 3; }; readonly password: { readonly type: "string"; readonly inputType: "password"; readonly hidden: true; }; readonly phone_number: { readonly type: "string"; readonly mask: "(##) #####-####"; }; readonly picture_file: { readonly $ref: "file"; readonly accept: readonly ["image/*"]; }; readonly picture: { readonly type: "getter"; readonly getter: (doc: object) => Promise | undefined; }; readonly self_registered: { readonly type: "boolean"; readonly readOnly: true; }; readonly updated_at: { readonly type: "string"; readonly format: "date-time"; }; }; readonly presets: readonly ["crud", "duplicate"]; readonly layout: { readonly name: "grid"; readonly options: { readonly title: "name"; readonly badge: "roles"; readonly picture: "picture_file"; readonly information: "email"; readonly active: "active"; readonly translateBadge: true; }; }; readonly individualActions: { readonly changePassword: { readonly label: "change_password"; readonly icon: "key"; readonly translate: true; readonly route: { readonly name: "/dashboard/user/changepass"; readonly fetchItem: true; }; }; readonly copyRedefinePasswordLink: { readonly label: "copy_redefine_password_link"; readonly icon: "link"; readonly translate: true; }; readonly copyActivationLink: { readonly label: "copy_activation_link"; readonly icon: "link"; readonly translate: true; }; }; readonly filters: readonly ["name", "roles", "email", "phone_number"]; readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"]; readonly tableMeta: readonly ["email"]; readonly formLayout: { readonly fields: { readonly given_name: { readonly span: 3; }; readonly family_name: { readonly span: 3; }; }; }; }>; } & Omit> & { _tag: "Result"; result: never; error: undefined; }, "result">) | Promise<({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "TARGET_IMMUTABLE" | "MALFORMED_INPUT" | "UNIQUENESS_VIOLATED" | "EMPTY_TARGET" | "INVALID_PROPERTIES" | "MISSING_PROPERTIES" | "INVALID_DOCUMENT_ID" | "INVALID_TEMPFILE"; httpStatus: 400 | 403 | 404 | 422 | 500; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "TARGET_IMMUTABLE" | "MALFORMED_INPUT" | "UNIQUENESS_VIOLATED" | "EMPTY_TARGET" | "INVALID_PROPERTIES" | "MISSING_PROPERTIES" | "INVALID_DOCUMENT_ID" | "INVALID_TEMPFILE"; httpStatus: 400 | 403 | 404 | 422 | 500; message: string; details: any; }, never>>; }, never>) | ({ result: import("@aeriajs/types").SchemaWithId<{ readonly $id: "user"; readonly icon: "users"; readonly required: readonly ["name", "roles", "email"]; readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"]; readonly indexes: readonly ["name"]; readonly unique: readonly ["email"]; readonly properties: { readonly name: { readonly type: "string"; readonly minLength: 1; }; readonly given_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly family_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly active: { readonly type: "boolean"; }; readonly roles: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly uniqueItems: true; readonly minItems: 1; }; readonly email: { readonly type: "string"; readonly inputType: "email"; readonly minLength: 3; }; readonly password: { readonly type: "string"; readonly inputType: "password"; readonly hidden: true; }; readonly phone_number: { readonly type: "string"; readonly mask: "(##) #####-####"; }; readonly picture_file: { readonly $ref: "file"; readonly accept: readonly ["image/*"]; }; readonly picture: { readonly type: "getter"; readonly getter: (doc: object) => Promise | undefined; }; readonly self_registered: { readonly type: "boolean"; readonly readOnly: true; }; readonly updated_at: { readonly type: "string"; readonly format: "date-time"; }; }; readonly presets: readonly ["crud", "duplicate"]; readonly layout: { readonly name: "grid"; readonly options: { readonly title: "name"; readonly badge: "roles"; readonly picture: "picture_file"; readonly information: "email"; readonly active: "active"; readonly translateBadge: true; }; }; readonly individualActions: { readonly changePassword: { readonly label: "change_password"; readonly icon: "key"; readonly translate: true; readonly route: { readonly name: "/dashboard/user/changepass"; readonly fetchItem: true; }; }; readonly copyRedefinePasswordLink: { readonly label: "copy_redefine_password_link"; readonly icon: "link"; readonly translate: true; }; readonly copyActivationLink: { readonly label: "copy_activation_link"; readonly icon: "link"; readonly translate: true; }; }; readonly filters: readonly ["name", "roles", "email", "phone_number"]; readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"]; readonly tableMeta: readonly ["email"]; readonly formLayout: { readonly fields: { readonly given_name: { readonly span: 3; }; readonly family_name: { readonly span: 3; }; }; }; }>; } & Omit> & { _tag: "Result"; result: never; error: undefined; }, "result">)>; readonly authenticate: (payload: Partial<{} & Omit> & { password: string; email: string; revalidate: boolean; token: {} & Omit> & { type: "bearer"; content: string; }, never>; }, never>>, context: Omit) => Promise<({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "AUTHORIZATION_ERROR" | "INVALID_CREDENTIALS" | "INACTIVE_USER"; httpStatus: 401; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "AUTHORIZATION_ERROR" | "INVALID_CREDENTIALS" | "INACTIVE_USER"; httpStatus: 401; message: string; details: any; }, never>>; }, never>) | ({} & Omit> & { _tag: "Result"; result: { user: import("@aeriajs/types").SchemaWithId<{ readonly $id: "user"; readonly icon: "users"; readonly required: readonly ["name", "roles", "email"]; readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"]; readonly indexes: readonly ["name"]; readonly unique: readonly ["email"]; readonly properties: { readonly name: { readonly type: "string"; readonly minLength: 1; }; readonly given_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly family_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly active: { readonly type: "boolean"; }; readonly roles: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly uniqueItems: true; readonly minItems: 1; }; readonly email: { readonly type: "string"; readonly inputType: "email"; readonly minLength: 3; }; readonly password: { readonly type: "string"; readonly inputType: "password"; readonly hidden: true; }; readonly phone_number: { readonly type: "string"; readonly mask: "(##) #####-####"; }; readonly picture_file: { readonly $ref: "file"; readonly accept: readonly ["image/*"]; }; readonly picture: { readonly type: "getter"; readonly getter: (doc: object) => Promise | undefined; }; readonly self_registered: { readonly type: "boolean"; readonly readOnly: true; }; readonly updated_at: { readonly type: "string"; readonly format: "date-time"; }; }; readonly presets: readonly ["crud", "duplicate"]; readonly layout: { readonly name: "grid"; readonly options: { readonly title: "name"; readonly badge: "roles"; readonly picture: "picture_file"; readonly information: "email"; readonly active: "active"; readonly translateBadge: true; }; }; readonly individualActions: { readonly changePassword: { readonly label: "change_password"; readonly icon: "key"; readonly translate: true; readonly route: { readonly name: "/dashboard/user/changepass"; readonly fetchItem: true; }; }; readonly copyRedefinePasswordLink: { readonly label: "copy_redefine_password_link"; readonly icon: "link"; readonly translate: true; }; readonly copyActivationLink: { readonly label: "copy_activation_link"; readonly icon: "link"; readonly translate: true; }; }; readonly filters: readonly ["name", "roles", "email", "phone_number"]; readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"]; readonly tableMeta: readonly ["email"]; readonly formLayout: { readonly fields: { readonly given_name: { readonly span: 3; }; readonly family_name: { readonly span: 3; }; }; }; }>; } & Omit> & { user: never; token: {} & Omit> & { type: "bearer"; content: string; }, never>; }, "user">; error: undefined; }, never>) | ({} & Omit> & { _tag: "Result"; result: {} & Omit> & { user: {} & Omit> & { name: string; _id: null; roles: string[]; email: string; active: boolean; }, never>; token: {} & Omit> & { type: string; content: string; }, never>; }, never>; error: undefined; }, never>) | Promise<({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "AUTHORIZATION_ERROR" | "INVALID_CREDENTIALS" | "INACTIVE_USER"; httpStatus: 401; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "AUTHORIZATION_ERROR" | "INVALID_CREDENTIALS" | "INACTIVE_USER"; httpStatus: 401; message: string; details: any; }, never>>; }, never>) | ({} & Omit> & { _tag: "Result"; result: { user: import("@aeriajs/types").SchemaWithId<{ readonly $id: "user"; readonly icon: "users"; readonly required: readonly ["name", "roles", "email"]; readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"]; readonly indexes: readonly ["name"]; readonly unique: readonly ["email"]; readonly properties: { readonly name: { readonly type: "string"; readonly minLength: 1; }; readonly given_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly family_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly active: { readonly type: "boolean"; }; readonly roles: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly uniqueItems: true; readonly minItems: 1; }; readonly email: { readonly type: "string"; readonly inputType: "email"; readonly minLength: 3; }; readonly password: { readonly type: "string"; readonly inputType: "password"; readonly hidden: true; }; readonly phone_number: { readonly type: "string"; readonly mask: "(##) #####-####"; }; readonly picture_file: { readonly $ref: "file"; readonly accept: readonly ["image/*"]; }; readonly picture: { readonly type: "getter"; readonly getter: (doc: object) => Promise | undefined; }; readonly self_registered: { readonly type: "boolean"; readonly readOnly: true; }; readonly updated_at: { readonly type: "string"; readonly format: "date-time"; }; }; readonly presets: readonly ["crud", "duplicate"]; readonly layout: { readonly name: "grid"; readonly options: { readonly title: "name"; readonly badge: "roles"; readonly picture: "picture_file"; readonly information: "email"; readonly active: "active"; readonly translateBadge: true; }; }; readonly individualActions: { readonly changePassword: { readonly label: "change_password"; readonly icon: "key"; readonly translate: true; readonly route: { readonly name: "/dashboard/user/changepass"; readonly fetchItem: true; }; }; readonly copyRedefinePasswordLink: { readonly label: "copy_redefine_password_link"; readonly icon: "link"; readonly translate: true; }; readonly copyActivationLink: { readonly label: "copy_activation_link"; readonly icon: "link"; readonly translate: true; }; }; readonly filters: readonly ["name", "roles", "email", "phone_number"]; readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"]; readonly tableMeta: readonly ["email"]; readonly formLayout: { readonly fields: { readonly given_name: { readonly span: 3; }; readonly family_name: { readonly span: 3; }; }; }; }>; } & Omit> & { user: never; token: {} & Omit> & { type: "bearer"; content: string; }, never>; }, "user">; error: undefined; }, never>) | ({} & Omit> & { _tag: "Result"; result: {} & Omit> & { user: {} & Omit> & { name: string; _id: null; roles: string[]; email: string; active: boolean; }, never>; token: {} & Omit> & { type: string; content: string; }, never>; }, never>; error: undefined; }, never>)>>; readonly activate: (payload: Partial<{} & Omit> & { password: string; token: string; userId: string; }, never>>, context: Omit) => ({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "MALFORMED_INPUT" | "USER_NOT_FOUND" | "ALREADY_ACTIVE_USER" | "INVALID_LINK" | "INVALID_TOKEN"; httpStatus: 401 | 403 | 404 | 422; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "MALFORMED_INPUT" | "USER_NOT_FOUND" | "ALREADY_ACTIVE_USER" | "INVALID_LINK" | "INVALID_TOKEN"; httpStatus: 401 | 403 | 404 | 422; message: string; details: any; }, never>>; }, never>) | ({} & Omit> & { _tag: "Result"; result: {} & Omit> & { userId: import("bson").ObjectId; }, never>; error: undefined; }, never>) | Promise<({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "MALFORMED_INPUT" | "USER_NOT_FOUND" | "ALREADY_ACTIVE_USER" | "INVALID_LINK" | "INVALID_TOKEN"; httpStatus: 401 | 403 | 404 | 422; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "MALFORMED_INPUT" | "USER_NOT_FOUND" | "ALREADY_ACTIVE_USER" | "INVALID_LINK" | "INVALID_TOKEN"; httpStatus: 401 | 403 | 404 | 422; message: string; details: any; }, never>>; }, never>) | ({} & Omit> & { _tag: "Result"; result: {} & Omit> & { userId: import("bson").ObjectId; }, never>; error: undefined; }, never>)>; readonly createAccount: (payload: Partial<{ picture_file: 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; }; }; }>; } & Omit string | undefined; }; readonly family_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly active: { readonly type: "boolean"; }; readonly roles: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly uniqueItems: true; readonly minItems: 1; }; readonly email: { readonly type: "string"; readonly inputType: "email"; readonly minLength: 3; }; readonly password: { readonly type: "string"; readonly inputType: "password"; readonly hidden: true; }; readonly phone_number: { readonly type: "string"; readonly mask: "(##) #####-####"; }; readonly picture_file: { readonly $ref: "file"; readonly accept: readonly ["image/*"]; }; readonly picture: { readonly type: "getter"; readonly getter: (doc: object) => Promise | undefined; }; readonly self_registered: { readonly type: "boolean"; readonly readOnly: true; }; readonly updated_at: { readonly type: "string"; readonly format: "date-time"; }; }, {}>> & { name: string; password: string; updated_at: Date; picture: never; roles: string[]; email: string; active: boolean; phone_number: string; picture_file: never; given_name: never; family_name: never; }, "picture_file">>, context: Omit) => ({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "TARGET_IMMUTABLE" | "MALFORMED_INPUT" | "UNIQUENESS_VIOLATED" | "EMPTY_TARGET" | "INVALID_PROPERTIES" | "MISSING_PROPERTIES" | "INVALID_DOCUMENT_ID" | "INVALID_TEMPFILE"; httpStatus: 400 | 403 | 404 | 422 | 500; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "TARGET_IMMUTABLE" | "MALFORMED_INPUT" | "UNIQUENESS_VIOLATED" | "EMPTY_TARGET" | "INVALID_PROPERTIES" | "MISSING_PROPERTIES" | "INVALID_DOCUMENT_ID" | "INVALID_TEMPFILE"; httpStatus: 400 | 403 | 404 | 422 | 500; message: string; details: any; }, never>>; }, never>) | ({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "OWNERSHIP_ERROR" | "MALFORMED_INPUT" | "SIGNUP_DISALLOWED"; httpStatus: 403 | 422; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "OWNERSHIP_ERROR" | "MALFORMED_INPUT" | "SIGNUP_DISALLOWED"; httpStatus: 403 | 422; message: string; details: any; }, never>>; }, never>) | ({ result: import("@aeriajs/types").SchemaWithId<{ readonly $id: "user"; readonly icon: "users"; readonly required: readonly ["name", "roles", "email"]; readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"]; readonly indexes: readonly ["name"]; readonly unique: readonly ["email"]; readonly properties: { readonly name: { readonly type: "string"; readonly minLength: 1; }; readonly given_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly family_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly active: { readonly type: "boolean"; }; readonly roles: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly uniqueItems: true; readonly minItems: 1; }; readonly email: { readonly type: "string"; readonly inputType: "email"; readonly minLength: 3; }; readonly password: { readonly type: "string"; readonly inputType: "password"; readonly hidden: true; }; readonly phone_number: { readonly type: "string"; readonly mask: "(##) #####-####"; }; readonly picture_file: { readonly $ref: "file"; readonly accept: readonly ["image/*"]; }; readonly picture: { readonly type: "getter"; readonly getter: (doc: object) => Promise | undefined; }; readonly self_registered: { readonly type: "boolean"; readonly readOnly: true; }; readonly updated_at: { readonly type: "string"; readonly format: "date-time"; }; }; readonly presets: readonly ["crud", "duplicate"]; readonly layout: { readonly name: "grid"; readonly options: { readonly title: "name"; readonly badge: "roles"; readonly picture: "picture_file"; readonly information: "email"; readonly active: "active"; readonly translateBadge: true; }; }; readonly individualActions: { readonly changePassword: { readonly label: "change_password"; readonly icon: "key"; readonly translate: true; readonly route: { readonly name: "/dashboard/user/changepass"; readonly fetchItem: true; }; }; readonly copyRedefinePasswordLink: { readonly label: "copy_redefine_password_link"; readonly icon: "link"; readonly translate: true; }; readonly copyActivationLink: { readonly label: "copy_activation_link"; readonly icon: "link"; readonly translate: true; }; }; readonly filters: readonly ["name", "roles", "email", "phone_number"]; readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"]; readonly tableMeta: readonly ["email"]; readonly formLayout: { readonly fields: { readonly given_name: { readonly span: 3; }; readonly family_name: { readonly span: 3; }; }; }; }>; } & Omit> & { _tag: "Result"; result: never; error: undefined; }, "result">) | Promise<({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "TARGET_IMMUTABLE" | "MALFORMED_INPUT" | "UNIQUENESS_VIOLATED" | "EMPTY_TARGET" | "INVALID_PROPERTIES" | "MISSING_PROPERTIES" | "INVALID_DOCUMENT_ID" | "INVALID_TEMPFILE"; httpStatus: 400 | 403 | 404 | 422 | 500; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "TARGET_IMMUTABLE" | "MALFORMED_INPUT" | "UNIQUENESS_VIOLATED" | "EMPTY_TARGET" | "INVALID_PROPERTIES" | "MISSING_PROPERTIES" | "INVALID_DOCUMENT_ID" | "INVALID_TEMPFILE"; httpStatus: 400 | 403 | 404 | 422 | 500; message: string; details: any; }, never>>; }, never>) | ({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "OWNERSHIP_ERROR" | "MALFORMED_INPUT" | "SIGNUP_DISALLOWED"; httpStatus: 403 | 422; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "OWNERSHIP_ERROR" | "MALFORMED_INPUT" | "SIGNUP_DISALLOWED"; httpStatus: 403 | 422; message: string; details: any; }, never>>; }, never>) | ({ result: import("@aeriajs/types").SchemaWithId<{ readonly $id: "user"; readonly icon: "users"; readonly required: readonly ["name", "roles", "email"]; readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"]; readonly indexes: readonly ["name"]; readonly unique: readonly ["email"]; readonly properties: { readonly name: { readonly type: "string"; readonly minLength: 1; }; readonly given_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly family_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly active: { readonly type: "boolean"; }; readonly roles: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly uniqueItems: true; readonly minItems: 1; }; readonly email: { readonly type: "string"; readonly inputType: "email"; readonly minLength: 3; }; readonly password: { readonly type: "string"; readonly inputType: "password"; readonly hidden: true; }; readonly phone_number: { readonly type: "string"; readonly mask: "(##) #####-####"; }; readonly picture_file: { readonly $ref: "file"; readonly accept: readonly ["image/*"]; }; readonly picture: { readonly type: "getter"; readonly getter: (doc: object) => Promise | undefined; }; readonly self_registered: { readonly type: "boolean"; readonly readOnly: true; }; readonly updated_at: { readonly type: "string"; readonly format: "date-time"; }; }; readonly presets: readonly ["crud", "duplicate"]; readonly layout: { readonly name: "grid"; readonly options: { readonly title: "name"; readonly badge: "roles"; readonly picture: "picture_file"; readonly information: "email"; readonly active: "active"; readonly translateBadge: true; }; }; readonly individualActions: { readonly changePassword: { readonly label: "change_password"; readonly icon: "key"; readonly translate: true; readonly route: { readonly name: "/dashboard/user/changepass"; readonly fetchItem: true; }; }; readonly copyRedefinePasswordLink: { readonly label: "copy_redefine_password_link"; readonly icon: "link"; readonly translate: true; }; readonly copyActivationLink: { readonly label: "copy_activation_link"; readonly icon: "link"; readonly translate: true; }; }; readonly filters: readonly ["name", "roles", "email", "phone_number"]; readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"]; readonly tableMeta: readonly ["email"]; readonly formLayout: { readonly fields: { readonly given_name: { readonly span: 3; }; readonly family_name: { readonly span: 3; }; }; }; }>; } & Omit> & { _tag: "Result"; result: never; error: undefined; }, "result">)>; readonly getInfo: (payload: Partial<{} & Omit> & { token: string; userId: string; }, never>>, context: Omit) => ({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "USER_NOT_FOUND" | "INVALID_LINK" | "INVALID_TOKEN"; httpStatus: 401 | 404 | 422; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "USER_NOT_FOUND" | "INVALID_LINK" | "INVALID_TOKEN"; httpStatus: 401 | 404 | 422; message: string; details: any; }, never>>; }, never>) | ({} & Omit> & { _tag: "Result"; result: Pick<{} & Omit> & { name: string; email: string; active: boolean; }, never>, "name" | "email"> & Partial<{} & Omit> & { name: string; email: string; active: boolean; }, never>>; error: undefined; }, never>) | Promise<({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "USER_NOT_FOUND" | "INVALID_LINK" | "INVALID_TOKEN"; httpStatus: 401 | 404 | 422; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "USER_NOT_FOUND" | "INVALID_LINK" | "INVALID_TOKEN"; httpStatus: 401 | 404 | 422; message: string; details: any; }, never>>; }, never>) | ({} & Omit> & { _tag: "Result"; result: Pick<{} & Omit> & { name: string; email: string; active: boolean; }, never>, "name" | "email"> & Partial<{} & Omit> & { name: string; email: string; active: boolean; }, never>>; error: undefined; }, never>)>; readonly getCurrentUser: (payload: undefined, context: Omit) => ({ result: import("@aeriajs/types").SchemaWithId<{ readonly $id: "user"; readonly icon: "users"; readonly required: readonly ["name", "roles", "email"]; readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"]; readonly indexes: readonly ["name"]; readonly unique: readonly ["email"]; readonly properties: { readonly name: { readonly type: "string"; readonly minLength: 1; }; readonly given_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly family_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly active: { readonly type: "boolean"; }; readonly roles: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly uniqueItems: true; readonly minItems: 1; }; readonly email: { readonly type: "string"; readonly inputType: "email"; readonly minLength: 3; }; readonly password: { readonly type: "string"; readonly inputType: "password"; readonly hidden: true; }; readonly phone_number: { readonly type: "string"; readonly mask: "(##) #####-####"; }; readonly picture_file: { readonly $ref: "file"; readonly accept: readonly ["image/*"]; }; readonly picture: { readonly type: "getter"; readonly getter: (doc: object) => Promise | undefined; }; readonly self_registered: { readonly type: "boolean"; readonly readOnly: true; }; readonly updated_at: { readonly type: "string"; readonly format: "date-time"; }; }; readonly presets: readonly ["crud", "duplicate"]; readonly layout: { readonly name: "grid"; readonly options: { readonly title: "name"; readonly badge: "roles"; readonly picture: "picture_file"; readonly information: "email"; readonly active: "active"; readonly translateBadge: true; }; }; readonly individualActions: { readonly changePassword: { readonly label: "change_password"; readonly icon: "key"; readonly translate: true; readonly route: { readonly name: "/dashboard/user/changepass"; readonly fetchItem: true; }; }; readonly copyRedefinePasswordLink: { readonly label: "copy_redefine_password_link"; readonly icon: "link"; readonly translate: true; }; readonly copyActivationLink: { readonly label: "copy_activation_link"; readonly icon: "link"; readonly translate: true; }; }; readonly filters: readonly ["name", "roles", "email", "phone_number"]; readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"]; readonly tableMeta: readonly ["email"]; readonly formLayout: { readonly fields: { readonly given_name: { readonly span: 3; }; readonly family_name: { readonly span: 3; }; }; }; }>; } & Omit> & { _tag: "Result"; result: never; error: undefined; }, "result">) | ({} & Omit> & { _tag: "Result"; result: {} & Omit> & { name: string; _id: null; roles: string[]; email: string; active: boolean; }, never>; error: undefined; }, never>) | Promise<({ result: import("@aeriajs/types").SchemaWithId<{ readonly $id: "user"; readonly icon: "users"; readonly required: readonly ["name", "roles", "email"]; readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"]; readonly indexes: readonly ["name"]; readonly unique: readonly ["email"]; readonly properties: { readonly name: { readonly type: "string"; readonly minLength: 1; }; readonly given_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly family_name: { readonly type: "getter"; readonly getter: (doc: object) => string | undefined; }; readonly active: { readonly type: "boolean"; }; readonly roles: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly uniqueItems: true; readonly minItems: 1; }; readonly email: { readonly type: "string"; readonly inputType: "email"; readonly minLength: 3; }; readonly password: { readonly type: "string"; readonly inputType: "password"; readonly hidden: true; }; readonly phone_number: { readonly type: "string"; readonly mask: "(##) #####-####"; }; readonly picture_file: { readonly $ref: "file"; readonly accept: readonly ["image/*"]; }; readonly picture: { readonly type: "getter"; readonly getter: (doc: object) => Promise | undefined; }; readonly self_registered: { readonly type: "boolean"; readonly readOnly: true; }; readonly updated_at: { readonly type: "string"; readonly format: "date-time"; }; }; readonly presets: readonly ["crud", "duplicate"]; readonly layout: { readonly name: "grid"; readonly options: { readonly title: "name"; readonly badge: "roles"; readonly picture: "picture_file"; readonly information: "email"; readonly active: "active"; readonly translateBadge: true; }; }; readonly individualActions: { readonly changePassword: { readonly label: "change_password"; readonly icon: "key"; readonly translate: true; readonly route: { readonly name: "/dashboard/user/changepass"; readonly fetchItem: true; }; }; readonly copyRedefinePasswordLink: { readonly label: "copy_redefine_password_link"; readonly icon: "link"; readonly translate: true; }; readonly copyActivationLink: { readonly label: "copy_activation_link"; readonly icon: "link"; readonly translate: true; }; }; readonly filters: readonly ["name", "roles", "email", "phone_number"]; readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"]; readonly tableMeta: readonly ["email"]; readonly formLayout: { readonly fields: { readonly given_name: { readonly span: 3; }; readonly family_name: { readonly span: 3; }; }; }; }>; } & Omit> & { _tag: "Result"; result: never; error: undefined; }, "result">) | ({} & Omit> & { _tag: "Result"; result: {} & Omit> & { name: string; _id: null; roles: string[]; email: string; active: boolean; }, never>; error: undefined; }, never>)>; readonly getActivationLink: (payload: Pick<{} & Omit> & { userId: import("bson").ObjectId; redirect: string; }, never>, "userId"> & Partial<{} & Omit> & { userId: import("bson").ObjectId; redirect: string; }, never>>, context: Omit) => ({} & Omit> & { _tag: "Error"; result: undefined; 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>>; }, never>) | ({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "ALREADY_ACTIVE_USER" | "INVALID_LINK"; httpStatus: 400 | 403; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "ALREADY_ACTIVE_USER" | "INVALID_LINK"; httpStatus: 400 | 403; message: string; details: any; }, never>>; }, never>) | ({} & Omit> & { _tag: "Result"; result: {} & Omit> & { url: string; }, never>; error: undefined; }, never>) | Promise<({} & Omit> & { _tag: "Error"; result: undefined; 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>>; }, never>) | ({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "ALREADY_ACTIVE_USER" | "INVALID_LINK"; httpStatus: 400 | 403; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "ALREADY_ACTIVE_USER" | "INVALID_LINK"; httpStatus: 400 | 403; message: string; details: any; }, never>>; }, never>) | ({} & Omit> & { _tag: "Result"; result: {} & Omit> & { url: string; }, never>; error: undefined; }, never>)>; readonly getRedefinePasswordLink: (payload: Pick<{} & Omit> & { userId: import("bson").ObjectId; redirect: string; }, never>, "userId"> & Partial<{} & Omit> & { userId: import("bson").ObjectId; redirect: string; }, never>>, context: Omit) => ({} & Omit> & { _tag: "Error"; result: undefined; 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>>; }, never>) | ({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "USER_NOT_ACTIVE"; httpStatus: 403; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "USER_NOT_ACTIVE"; httpStatus: 403; message: string; details: any; }, never>>; }, never>) | ({} & Omit> & { _tag: "Result"; result: {} & Omit> & { url: string; }, never>; error: undefined; }, never>) | Promise<({} & Omit> & { _tag: "Error"; result: undefined; 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>>; }, never>) | ({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "USER_NOT_ACTIVE"; httpStatus: 403; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "USER_NOT_ACTIVE"; httpStatus: 403; message: string; details: any; }, never>>; }, never>) | ({} & Omit> & { _tag: "Result"; result: {} & Omit> & { url: string; }, never>; error: undefined; }, never>)>; readonly redefinePassword: (payload: Partial<{} & Omit> & { password: string; token: string; userId: import("bson").ObjectId; }, never>>, context: Omit) => ({} & Omit> & { _tag: "Error"; result: undefined; 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>>; }, never>) | ({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "MALFORMED_INPUT" | "USER_NOT_FOUND" | "INVALID_LINK" | "INVALID_TOKEN" | "USER_NOT_ACTIVE"; httpStatus: 401 | 403 | 404 | 422; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "MALFORMED_INPUT" | "USER_NOT_FOUND" | "INVALID_LINK" | "INVALID_TOKEN" | "USER_NOT_ACTIVE"; httpStatus: 401 | 403 | 404 | 422; message: string; details: any; }, never>>; }, never>) | ({} & Omit> & { _tag: "Result"; result: {} & Omit> & { userId: import("bson").ObjectId; }, never>; error: undefined; }, never>) | Promise<({} & Omit> & { _tag: "Error"; result: undefined; 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>>; }, never>) | ({} & Omit> & { _tag: "Error"; result: undefined; error: Pick<{} & Omit> & { code: "MALFORMED_INPUT" | "USER_NOT_FOUND" | "INVALID_LINK" | "INVALID_TOKEN" | "USER_NOT_ACTIVE"; httpStatus: 401 | 403 | 404 | 422; message: string; details: any; }, never>, "code" | "httpStatus"> & Partial<{} & Omit> & { code: "MALFORMED_INPUT" | "USER_NOT_FOUND" | "INVALID_LINK" | "INVALID_TOKEN" | "USER_NOT_ACTIVE"; httpStatus: 401 | 403 | 404 | 422; message: string; details: any; }, never>>; }, never>) | ({} & Omit> & { _tag: "Result"; result: {} & Omit> & { userId: import("bson").ObjectId; }, never>; error: undefined; }, never>)>; }; contracts: { readonly get?: import("@aeriajs/types").Contract | undefined; readonly getAll?: import("@aeriajs/types").Contract | undefined; readonly remove?: import("@aeriajs/types").Contract | undefined; readonly upload?: import("@aeriajs/types").Contract | undefined; readonly removeFile?: import("@aeriajs/types").Contract | undefined; readonly insert?: import("@aeriajs/types").Contract | undefined; readonly editProfile?: import("@aeriajs/types").Contract | undefined; readonly authenticate?: import("@aeriajs/types").Contract | undefined; readonly activate?: import("@aeriajs/types").Contract | undefined; readonly createAccount?: import("@aeriajs/types").Contract | undefined; readonly getInfo?: import("@aeriajs/types").Contract | undefined; readonly getCurrentUser?: import("@aeriajs/types").Contract | undefined; readonly getActivationLink?: import("@aeriajs/types").Contract | undefined; readonly getRedefinePasswordLink?: import("@aeriajs/types").Contract | undefined; readonly redefinePassword?: import("@aeriajs/types").Contract | undefined; }; }; }; export type { File, TempFile, Log, ResourceUsage, User, };