import { SpaceService } from './services/space.service';
import { SpaceIdDto } from './dto/space-id.dto';
import { PaginationOptions } from "../../database/pagination/pagination-options";
import { SpaceMemberService } from './services/space-member.service';
import { User, Workspace } from "../../database/types/entity.types";
import { AddSpaceMembersDto } from './dto/add-space-members.dto';
import { RemoveSpaceMemberDto } from './dto/remove-space-member.dto';
import { UpdateSpaceMemberRoleDto } from './dto/update-space-member-role.dto';
import SpaceAbilityFactory from '../casl/abilities/space-ability.factory';
import { SpaceCaslAction, SpaceCaslSubject } from '../casl/interfaces/space-ability.type';
import { UpdateSpaceDto } from './dto/update-space.dto';
import { SpaceMemberRepo } from "../../database/repos/space/space-member.repo";
import { SpaceRepo } from "../../database/repos/space/space.repo";
import WorkspaceAbilityFactory from '../casl/abilities/workspace-ability.factory';
import { CreateSpaceDto } from './dto/create-space.dto';
import { ListSpacesDto } from './dto/list-spaces.dto';
import { PagePermissionRepo } from "../../database/repos/page/page-permission.repo";
export declare class SpaceController {
    private readonly spaceService;
    private readonly spaceMemberService;
    private readonly spaceMemberRepo;
    private readonly spaceAbility;
    private readonly workspaceAbility;
    private readonly spaceRepo;
    private readonly pagePermissionRepo;
    constructor(spaceService: SpaceService, spaceMemberService: SpaceMemberService, spaceMemberRepo: SpaceMemberRepo, spaceAbility: SpaceAbilityFactory, workspaceAbility: WorkspaceAbilityFactory, spaceRepo: SpaceRepo, pagePermissionRepo: PagePermissionRepo);
    getWorkspaceSpaces(dto: ListSpacesDto, user: User): Promise<import("../../database/pagination/cursor-pagination").CursorPaginationResult<{
        description: string;
        id: string;
        workspaceId: string;
        creatorId: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date;
        defaultRole: string;
        logo: string;
        name: string;
        settings: import("../../database/types/db").JsonValue;
        archivedAt: Date;
        archivedById: string;
        homePageId: string;
        isPersonal: boolean;
        slug: string;
        visibility: string;
    }>>;
    getSpaceInfo(spaceIdDto: SpaceIdDto, user: User, workspace: Workspace): Promise<{
        membership: {
            userId: string;
            role: string;
            permissions: (import("@casl/ability").SubjectRawRule<SpaceCaslAction, SpaceCaslSubject.Settings, import("@casl/ability").MongoQuery> | import("@casl/ability").SubjectRawRule<SpaceCaslAction, SpaceCaslSubject.Member, import("@casl/ability").MongoQuery> | import("@casl/ability").SubjectRawRule<SpaceCaslAction, SpaceCaslSubject.Page, import("@casl/ability").MongoQuery> | import("@casl/ability").SubjectRawRule<SpaceCaslAction, SpaceCaslSubject.Share, import("@casl/ability").MongoQuery>)[];
        };
        homePage: Pick<{
            id: string;
            workspaceId: string;
            creatorId: string;
            title: string;
            createdAt: Date;
            updatedAt: Date;
            deletedAt: Date;
            content: import("../../database/types/db").JsonValue;
            tsv: string;
            spaceId: string;
            contributorIds: string[];
            coverAttribution: import("../../database/types/db").JsonValue;
            coverPhoto: string;
            coverPosition: number;
            deletedById: string;
            icon: string;
            isBase: boolean;
            baseSchemaVersion: number;
            isLocked: boolean;
            lastUpdatedById: string;
            parentPageId: string;
            position: string;
            slugId: string;
            textContent: string;
            ydoc: Buffer<ArrayBufferLike>;
        }, "id" | "title" | "icon" | "slugId">;
        description: string;
        id: string;
        workspaceId: string;
        creatorId: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date;
        defaultRole: string;
        logo: string;
        name: string;
        settings: import("../../database/types/db").JsonValue;
        archivedAt: Date;
        archivedById: string;
        homePageId: string;
        isPersonal: boolean;
        slug: string;
        visibility: string;
    }>;
    createSpace(createSpaceDto: CreateSpaceDto, user: User, workspace: Workspace): Promise<{
        description: string;
        id: string;
        workspaceId: string;
        creatorId: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date;
        defaultRole: string;
        logo: string;
        name: string;
        settings: import("../../database/types/db").JsonValue;
        archivedAt: Date;
        archivedById: string;
        homePageId: string;
        isPersonal: boolean;
        slug: string;
        visibility: string;
    }>;
    updateSpace(updateSpaceDto: UpdateSpaceDto, user: User, workspace: Workspace): Promise<{
        homePage: Pick<{
            id: string;
            workspaceId: string;
            creatorId: string;
            title: string;
            createdAt: Date;
            updatedAt: Date;
            deletedAt: Date;
            content: import("../../database/types/db").JsonValue;
            tsv: string;
            spaceId: string;
            contributorIds: string[];
            coverAttribution: import("../../database/types/db").JsonValue;
            coverPhoto: string;
            coverPosition: number;
            deletedById: string;
            icon: string;
            isBase: boolean;
            baseSchemaVersion: number;
            isLocked: boolean;
            lastUpdatedById: string;
            parentPageId: string;
            position: string;
            slugId: string;
            textContent: string;
            ydoc: Buffer<ArrayBufferLike>;
        }, "id" | "title" | "icon" | "slugId">;
        description: string;
        id: string;
        workspaceId: string;
        creatorId: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date;
        defaultRole: string;
        logo: string;
        name: string;
        settings: import("../../database/types/db").JsonValue;
        archivedAt: Date;
        archivedById: string;
        homePageId: string;
        isPersonal: boolean;
        slug: string;
        visibility: string;
    }>;
    deleteSpace(spaceIdDto: SpaceIdDto, user: User, workspace: Workspace): Promise<void>;
    archiveSpace(spaceIdDto: SpaceIdDto, user: User, workspace: Workspace): Promise<{
        description: string;
        id: string;
        workspaceId: string;
        creatorId: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date;
        defaultRole: string;
        logo: string;
        name: string;
        settings: import("../../database/types/db").JsonValue;
        archivedAt: Date;
        archivedById: string;
        homePageId: string;
        isPersonal: boolean;
        slug: string;
        visibility: string;
    } & {
        archivedBy?: import("../../database/repos/space/types").SpaceArchivedBy | null;
    }>;
    unarchiveSpace(spaceIdDto: SpaceIdDto, user: User, workspace: Workspace): Promise<{
        description: string;
        id: string;
        workspaceId: string;
        creatorId: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date;
        defaultRole: string;
        logo: string;
        name: string;
        settings: import("../../database/types/db").JsonValue;
        archivedAt: Date;
        archivedById: string;
        homePageId: string;
        isPersonal: boolean;
        slug: string;
        visibility: string;
    } & {
        archivedBy?: import("../../database/repos/space/types").SpaceArchivedBy | null;
    }>;
    getSpaceMembers(spaceIdDto: SpaceIdDto, pagination: PaginationOptions, user: User, workspace: Workspace): Promise<import("../../database/pagination/cursor-pagination").CursorPaginationResult<any>>;
    addSpaceMember(dto: AddSpaceMembersDto, user: User, workspace: Workspace): Promise<void>;
    removeSpaceMember(dto: RemoveSpaceMemberDto, user: User, workspace: Workspace): Promise<void>;
    updateSpaceMemberRole(dto: UpdateSpaceMemberRoleDto, user: User, workspace: Workspace): Promise<void>;
    private findManageableSpace;
    validateIds(dto: RemoveSpaceMemberDto | UpdateSpaceMemberRoleDto): void;
}
