import { WorkspaceMember, WorkspaceCapability } from "../../interfaces/models/Workspace"; export interface UpdateWorkspaceMemberProps { workspaceId: string; targetUserId: string; capabilities?: WorkspaceCapability[]; permissions?: string[]; rank?: number; /** * `rank`'s relative twin: an offset from the ACTOR (`1` = one rung below me), * resolved to an absolute rank at write time and stored absolute. Must be * `>= 1`; mutually exclusive with `rank` (sending both is a 400). Both rank fields are also capped at `2147483647` (int4), and the RESOLVED sum is bounded too — an in-range anchor plus an in-range offset can still overflow, which is a 400 rather than a 500. * * The anchor is the actor's own rank if they hold a member row on this * workspace, apex otherwise. A SNAPSHOT — frozen at write time, it does not * follow the actor's own rank afterwards. * * Unlike invite, edit has NO default: omitting BOTH still means "rank * unchanged", so editing someone's capabilities never moves them on the * ladder. */ relativeRank?: number; title?: string | null; metadata?: Record; } /** * Edit a direct member's access (capabilities / permissions / rank) and/or * profile (title / metadata). The actor is the bearer-token user and is subject * to the capability + rank rules on the workspace. * * Rank moves in either coordinate — `rank` (absolute) or `relativeRank` (an * offset from the actor) — never both. Omitting both leaves rank UNCHANGED; * unlike invite, edit has no value default. */ declare function useUpdateWorkspaceMember(): (props: UpdateWorkspaceMemberProps) => Promise; export default useUpdateWorkspaceMember;