import { RequestBuilder } from "../request-builder";
import type { Permission, PermissionMeta, PermissionPreset } from "../_internal/types.gen";
export type { Permission, PermissionMeta, PermissionPreset };
export interface PermissionListResult {
    data: Permission[];
    meta?: {
        total?: number;
    };
}
export interface PermissionResult {
    data: Permission;
}
export interface PermissionMetaResult {
    data: PermissionMeta;
}
export interface PermissionPresetListResult {
    data: PermissionPreset[];
    meta?: {
        total?: number;
    };
}
export interface PermissionPresetResult {
    data: PermissionPreset;
}
export interface PermissionListParams {
    app?: string;
    context?: "workspace" | "tenant" | "own";
    category?: string;
}
export interface PermissionPresetListParams {
    context?: "tenant" | "workspace";
    app?: string;
}
export declare function createPermissionsNamespace(rb: RequestBuilder): {
    /**
     * List all registered platform permissions.
     *
     * Optionally filter by `app`, `context`, or `category` query params.
     *
     * @param params - Optional filter parameters (app, context, category)
     * @returns List of permissions
     * @example
     * const perms = await admin.permissions.list({ context: "workspace" });
     */
    list(params?: PermissionListParams): Promise<PermissionListResult>;
    /**
     * Get a single permission by its ID string (e.g., "extract:document:read:all").
     *
     * @param id - Permission ID string
     * @returns The permission record
     * @example
     * const perm = await admin.permissions.get("extract:document:read:all");
     */
    get(id: string): Promise<PermissionResult>;
    /**
     * Get permission system metadata (version, apps, scopes, categories, cache TTL).
     *
     * @returns Permission system metadata
     * @example
     * const meta = await admin.permissions.meta();
     */
    meta(): Promise<PermissionMetaResult>;
    /**
     * List permission presets (pre-defined role bundles).
     *
     * Optionally filter by `context` (tenant, workspace) or `app`.
     *
     * @param params - Optional filter parameters (context, app)
     * @returns List of permission presets
     * @example
     * const presets = await admin.permissions.listPresets({ context: "tenant" });
     */
    listPresets(params?: PermissionPresetListParams): Promise<PermissionPresetListResult>;
    /**
     * Get a single permission preset by its composite ID (e.g., "workspace:org:admin").
     *
     * @param id - Preset composite ID
     * @returns The permission preset
     * @example
     * const preset = await admin.permissions.getPreset("workspace:org:admin");
     */
    getPreset(id: string): Promise<PermissionPresetResult>;
};
//# sourceMappingURL=permissions.d.ts.map