/**
 * Cell-grant ACL RPC specs — declarative contract for the three
 * `cell_grant_*` verbs (`create`, `revoke`, `list`).
 *
 * The grant primitive is a resource-side ACL: each row admits a
 * principal (actor or role+scope) at a level (viewer / editor) on a
 * single cell. Owner is implicit on `cell.created_by` and never appears
 * in the grant list.
 *
 * Principal is `{actor_id}` or `{role, scope_id?}` — no name resolver on
 * this verb. Callers pick an actor by id via `actor_search` (debounced
 * prefix search) and submit the resolved id directly.
 *
 * @module
 */
import { z } from 'zod';
/** Error reason — grant id did not resolve, or caller may not see it. */
export declare const ERROR_CELL_GRANT_NOT_FOUND: "cell_grant_not_found";
/**
 * Error reason — `cell_grant_create` principal resolves to the cell's
 * owner. Owner access is implicit (`cell.created_by`); a self-grant
 * row would shadow it without changing access and create a confusing
 * self-leave path.
 */
export declare const ERROR_CELL_GRANT_PRINCIPAL_IS_OWNER: "cell_grant_principal_is_owner";
/**
 * Error reason — role-shaped principal references a role string not
 * registered in the role schema. Would produce a dead grant row that
 * no role_grant could match.
 */
export declare const ERROR_CELL_GRANT_UNKNOWN_ROLE: "cell_grant_unknown_role";
/** Grant level — view-only or view-plus-edit. */
export declare const CellGrantLevel: z.ZodEnum<{
    viewer: "viewer";
    editor: "editor";
}>;
export type CellGrantLevel = z.infer<typeof CellGrantLevel>;
/**
 * Wire-input principal. Discriminated by `kind`. Actor-shaped principals
 * carry a resolved `actor_id` — the picker UI runs `actor_search` to
 * convert a typed name to an id before this verb is called.
 */
export declare const CellGrantPrincipalInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"actor">;
    actor_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
}, z.core.$strict>, z.ZodObject<{
    kind: z.ZodLiteral<"role">;
    role: z.ZodString;
    scope_id: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>>;
}, z.core.$strict>], "kind">;
export type CellGrantPrincipalInput = z.infer<typeof CellGrantPrincipalInput>;
/**
 * Wire-format for a cell_grant row. Mirrors `CellJson`'s shape — ISO-string
 * `created_at`, branded UUIDs, principal columns surfaced as-is. Caller
 * inspects `actor_id` xor `role` to render the right principal label.
 */
export declare const GrantJson: z.ZodObject<{
    id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
    cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
    level: z.ZodEnum<{
        viewer: "viewer";
        editor: "editor";
    }>;
    actor_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
    role: z.ZodNullable<z.ZodString>;
    scope_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
    granted_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
    created_at: z.ZodString;
}, z.core.$strict>;
export type GrantJson = z.infer<typeof GrantJson>;
/**
 * Input for `cell_grant_create`. Idempotent on the unique index —
 * re-granting the same `(cell_id, principal)` pair updates `level` +
 * `granted_by` rather than producing a duplicate row.
 */
export declare const CellGrantCreateInput: z.ZodObject<{
    cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
    level: z.ZodEnum<{
        viewer: "viewer";
        editor: "editor";
    }>;
    principal: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"actor">;
        actor_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"role">;
        role: z.ZodString;
        scope_id: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>>;
    }, z.core.$strict>], "kind">;
    acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
}, z.core.$strict>;
export type CellGrantCreateInput = z.infer<typeof CellGrantCreateInput>;
export declare const CellGrantCreateOutput: z.ZodObject<{
    grant: z.ZodObject<{
        id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
        cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
        level: z.ZodEnum<{
            viewer: "viewer";
            editor: "editor";
        }>;
        actor_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
        role: z.ZodNullable<z.ZodString>;
        scope_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
        granted_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
        created_at: z.ZodString;
    }, z.core.$strict>;
}, z.core.$strict>;
export type CellGrantCreateOutput = z.infer<typeof CellGrantCreateOutput>;
export declare const CellGrantRevokeInput: z.ZodObject<{
    grant_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
    acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
}, z.core.$strict>;
export type CellGrantRevokeInput = z.infer<typeof CellGrantRevokeInput>;
/**
 * Output for `cell_grant_revoke`. `still_admitted` is `true` when the
 * caller retains some admit path on the cell after the revoke (other
 * grant, ownership, admin). Always `true` for non-self revokes (the
 * caller didn't admit via this row to begin with).
 */
export declare const CellGrantRevokeOutput: z.ZodObject<{
    ok: z.ZodLiteral<true>;
    still_admitted: z.ZodBoolean;
}, z.core.$strict>;
export type CellGrantRevokeOutput = z.infer<typeof CellGrantRevokeOutput>;
export declare const CellGrantListInput: z.ZodObject<{
    cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
    acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
}, z.core.$strict>;
export type CellGrantListInput = z.infer<typeof CellGrantListInput>;
export declare const CellGrantListOutput: z.ZodObject<{
    grants: z.ZodArray<z.ZodObject<{
        id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
        cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
        level: z.ZodEnum<{
            viewer: "viewer";
            editor: "editor";
        }>;
        actor_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
        role: z.ZodNullable<z.ZodString>;
        scope_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
        granted_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
        created_at: z.ZodString;
    }, z.core.$strict>>;
}, z.core.$strict>;
export type CellGrantListOutput = z.infer<typeof CellGrantListOutput>;
export declare const cell_grant_create_action_spec: {
    method: string;
    kind: "request_response";
    initiator: "frontend";
    auth: {
        account: "required";
        actor: "required";
    };
    side_effects: true;
    input: z.ZodObject<{
        cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
        level: z.ZodEnum<{
            viewer: "viewer";
            editor: "editor";
        }>;
        principal: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"actor">;
            actor_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"role">;
            role: z.ZodString;
            scope_id: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>>;
        }, z.core.$strict>], "kind">;
        acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
    }, z.core.$strict>;
    output: z.ZodObject<{
        grant: z.ZodObject<{
            id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
            cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
            level: z.ZodEnum<{
                viewer: "viewer";
                editor: "editor";
            }>;
            actor_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
            role: z.ZodNullable<z.ZodString>;
            scope_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
            granted_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
            created_at: z.ZodString;
        }, z.core.$strict>;
    }, z.core.$strict>;
    async: true;
    description: string;
};
export declare const cell_grant_revoke_action_spec: {
    method: string;
    kind: "request_response";
    initiator: "frontend";
    auth: {
        account: "required";
        actor: "required";
    };
    side_effects: true;
    input: z.ZodObject<{
        grant_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
        acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
    }, z.core.$strict>;
    output: z.ZodObject<{
        ok: z.ZodLiteral<true>;
        still_admitted: z.ZodBoolean;
    }, z.core.$strict>;
    async: true;
    description: string;
};
export declare const cell_grant_list_action_spec: {
    method: string;
    kind: "request_response";
    initiator: "frontend";
    auth: {
        account: "required";
        actor: "required";
    };
    side_effects: false;
    input: z.ZodObject<{
        cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
        acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
    }, z.core.$strict>;
    output: z.ZodObject<{
        grants: z.ZodArray<z.ZodObject<{
            id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
            cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
            level: z.ZodEnum<{
                viewer: "viewer";
                editor: "editor";
            }>;
            actor_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
            role: z.ZodNullable<z.ZodString>;
            scope_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
            granted_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
            created_at: z.ZodString;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    async: true;
    description: string;
};
/** All cell_grant action specs — composed into `all_cell_action_specs`. */
export declare const all_cell_grant_action_specs: readonly [{
    method: string;
    kind: "request_response";
    initiator: "frontend";
    auth: {
        account: "required";
        actor: "required";
    };
    side_effects: true;
    input: z.ZodObject<{
        cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
        level: z.ZodEnum<{
            viewer: "viewer";
            editor: "editor";
        }>;
        principal: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"actor">;
            actor_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"role">;
            role: z.ZodString;
            scope_id: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>>;
        }, z.core.$strict>], "kind">;
        acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
    }, z.core.$strict>;
    output: z.ZodObject<{
        grant: z.ZodObject<{
            id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
            cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
            level: z.ZodEnum<{
                viewer: "viewer";
                editor: "editor";
            }>;
            actor_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
            role: z.ZodNullable<z.ZodString>;
            scope_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
            granted_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
            created_at: z.ZodString;
        }, z.core.$strict>;
    }, z.core.$strict>;
    async: true;
    description: string;
}, {
    method: string;
    kind: "request_response";
    initiator: "frontend";
    auth: {
        account: "required";
        actor: "required";
    };
    side_effects: true;
    input: z.ZodObject<{
        grant_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
        acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
    }, z.core.$strict>;
    output: z.ZodObject<{
        ok: z.ZodLiteral<true>;
        still_admitted: z.ZodBoolean;
    }, z.core.$strict>;
    async: true;
    description: string;
}, {
    method: string;
    kind: "request_response";
    initiator: "frontend";
    auth: {
        account: "required";
        actor: "required";
    };
    side_effects: false;
    input: z.ZodObject<{
        cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
        acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
    }, z.core.$strict>;
    output: z.ZodObject<{
        grants: z.ZodArray<z.ZodObject<{
            id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
            cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
            level: z.ZodEnum<{
                viewer: "viewer";
                editor: "editor";
            }>;
            actor_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
            role: z.ZodNullable<z.ZodString>;
            scope_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
            granted_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
            created_at: z.ZodString;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    async: true;
    description: string;
}];
//# sourceMappingURL=cell_grant_action_specs.d.ts.map