import { AutoEncoder } from '@simonbackx/simple-encoding'; import { Group } from './Group.js'; import { PermissionRole } from './PermissionRole.js'; import { PermissionsByRole } from './PermissionsByRole.js'; import { OrganizationRegistrationPeriod } from './RegistrationPeriod.js'; /** * Give access to a given resouce based by the roles of a user */ export declare class GroupCategoryPermissions extends AutoEncoder { /** * @deprecated * Can create new groups in this category or subcategories */ create: PermissionRole[]; /** * @deprecated * Permissions automatically for all groups in this category */ groupPermissions: PermissionsByRole; } export declare class GroupCategorySettings extends AutoEncoder { name: string; /** * Small text below the category title */ description: string; public: boolean; maximumRegistrations: number | null; /** * @deprecated */ permissions: GroupCategoryPermissions; /** * Whether the category can be deleted / moved by non admins. */ locked: boolean; } export declare class GroupCategory extends AutoEncoder { id: string; settings: GroupCategorySettings; /** * We only save the ID of groups because these are stored separately. To prevent that a group will be deleted when we simply move the group to a different category */ groupIds: string[]; /** * Child category IDS * We use ID's to allow more flexible changes in the future */ categoryIds: string[]; /** * Returns all parent and grandparents of this group */ getParentCategories(all: GroupCategory[]): GroupCategory[]; isPublic(allCategories: GroupCategory[]): boolean; canEdit(permissions: import('./LoadedPermissions.js').LoadedPermissions | null): boolean; canCreate(permissions: import('./LoadedPermissions.js').LoadedPermissions | null, categories?: GroupCategory[]): boolean; getDiffName(): string; } export declare class GroupCategoryTree extends GroupCategory { groups: Group[]; categories: GroupCategoryTree[]; get depth(): number; getAllGroups(): Group[]; getAllCategories(): GroupCategoryTree[]; getMemberCount({ waitingList }?: { waitingList?: boolean; }): number | null; static build(root: GroupCategory, organizationPeriod: OrganizationRegistrationPeriod, options?: { permissions?: import('./LoadedPermissions.js').LoadedPermissions | null; maxDepth?: number | null; smartCombine?: boolean; groups?: Group[]; }): GroupCategoryTree; /** * Filter groups */ filter(keep: (group: Group) => boolean): GroupCategoryTree; /** * Remove empty categories and non-public categories * @param admin Whether not-public categories should be visible */ filterForDisplay(admin?: boolean, useActivities?: boolean, smartCombine?: boolean): GroupCategoryTree; } //# sourceMappingURL=GroupCategory.d.ts.map