import type { RelationshipField } from 'payload'; export type RoleFieldPlacement = { tab?: string; position?: 'first' | 'last' | 'sidebar' | number; }; export interface CollectionPermissionConfig { enhance: boolean; roleFieldPlacement?: RoleFieldPlacement; autoAssignFirstUser?: boolean; defaultRole?: string; roleFieldConfig?: Partial; } export interface GatekeeperOptions { collections?: { [collectionSlug: string]: CollectionPermissionConfig; }; defaultConfig?: Partial; skipIfRoleExists?: boolean; excludeCollections?: string[]; customPermissions?: Array<{ label: string; value: string; description?: string; }>; skipPermissionChecks?: boolean | (() => boolean); syncRolesOnInit?: boolean; systemRoles?: SystemRole[]; rolesGroup?: string; rolesSlug?: string; /** * Disable the public role for non-authenticated users * @default false */ disablePublicRole?: boolean; /** * Custom permissions for public (non-authenticated) users * @default ['*.read'] - read access to all non-auth collections * @example ['pages.read', 'posts.read', 'media.read', 'comments.create'] */ publicRolePermissions?: string[]; } export interface Permission { label: string; value: string; category?: string; description?: string; } export interface RoleDocument { id: string; name: string; label: string; permissions: string[]; active: boolean; protected?: boolean; description?: string; visibleFor?: string[]; configHash?: string; configVersion?: number; systemManaged?: boolean; } export interface SystemRole { name: string; label: string; permissions: string[]; protected?: boolean; active?: boolean; description?: string; visibleFor?: string[]; } export interface SyncResults { created: string[]; updated: string[]; failed: Array<{ role: string; error: string; }>; skipped: string[]; } //# sourceMappingURL=types.d.ts.map