import { ContractType, ManageableFields, AuthInput, AuthenticationDefinition, Implementation, HandleResult } from './globalTypes.js'; export declare const authorizedByPermission: (auth: AuthenticationDefinition, authInput: AuthInput) => boolean; export declare const getUserIdFields: (fields: ManageableFields) => string[]; export declare const filterToAccess: (input: any[], auth: AuthenticationDefinition, authInput: AuthInput, fields: ManageableFields) => any[]; export declare const keyId: (index: string, id: string) => string; export declare type Get<IMPL extends Implementation> = <IN, OUT>(contract: ContractType<'GET', IMPL, IN, OUT>, auth: AuthInput, id: string | string[] | undefined, body?: IN) => Promise<HandleResult<OUT>>; export declare type Post<IMPL extends Implementation> = <IN, OUT>(contract: ContractType<'POST', IMPL, IN, OUT>, auth: AuthInput, id: string | undefined, body: IN) => Promise<HandleResult<OUT>>; export declare type Delete<IMPL extends Implementation> = <IN, OUT>(contract: ContractType<'DELETE', IMPL, IN, OUT>, auth: AuthInput, id: string | string[]) => Promise<HandleResult<OUT>>; export declare type Patch<IMPL extends Implementation> = <IN, OUT>(contract: ContractType<'PATCH', IMPL, IN, OUT>, auth: AuthInput, id: string, body: IN) => Promise<HandleResult<OUT>>; export declare type Put<IMPL extends Implementation> = <IN, OUT>(contract: ContractType<'PUT', IMPL, IN, OUT>, auth: AuthInput, id: string, body: IN) => Promise<HandleResult<OUT>>; export declare type AbstractBackend<K extends Implementation> = { get: Get<K>; post: Post<K>; delete: Delete<K>; patch: Patch<K>; put: Put<K>; }; export declare const forbidden: (data: any, errors?: string[]) => { errorType: string; data: any; status: number; errors: string[]; }; export declare const notFound: (data: any, errors?: string[]) => { errorType: string; data: any; status: number; errors: string[]; };