import { DirectusPermission } from "../../../schema/permission.js"; import { AllCollections } from "../../../types/schema.js"; import { ApplyQueryFields } from "../../../types/output.js"; import { Query } from "../../../types/query.js"; import { RestCommand } from "../../types.js"; //#region src/rest/commands/read/permissions.d.ts type ReadPermissionOutput, Item extends object = DirectusPermission> = ApplyQueryFields; type ReadItemPermissionsOutput = { update: { access: boolean; presets?: Record | null; fields?: string[] | null; }; delete: { access: boolean; }; share: { access: boolean; }; }; type ReadUserPermissionsOutput = Record; }>>; /** * List all Permissions that exist in Directus. * @param query The query parameters * @returns An array of up to limit Permission objects. If no items are available, data will be an empty array. */ declare const readPermissions: >>(query?: TQuery) => RestCommand[], Schema>; /** * List all Permissions that exist in Directus. * @param key The primary key of the permission * @param query The query parameters * @returns Returns a Permission object if a valid primary key was provided. * @throws Will throw if key is empty */ declare const readPermission: >>(key: DirectusPermission["id"], query?: TQuery) => RestCommand, Schema>; /** * Check the current user's permissions on a specific item. * @param collection The collection of the item * @param key The primary key of the item * @returns Returns a ItemPermissions object if a valid collection / primary key was provided. */ declare const readItemPermissions: >(collection: Collection, key?: string | number) => RestCommand; /** * Check the current user's permissions. */ declare const readUserPermissions: () => RestCommand; //#endregion export { ReadItemPermissionsOutput, ReadPermissionOutput, ReadUserPermissionsOutput, readItemPermissions, readPermission, readPermissions, readUserPermissions }; //# sourceMappingURL=permissions.d.ts.map