import type { Id } from '../id.js'; import type { RankType, UpdateRankResult, Vote } from '../ranks/types.js'; import type { GeoClientContext } from './context.js'; export type UpdateRankClientParams = { /** The `Rank` entity to update. */ rankId: Id | string; /** Whether the rank stores ordinal positions or weighted scores. */ rankType: RankType; /** The new, ordered list of votes that replaces the rank's current votes. */ votes: Vote[]; }; /** * Fetches the rank's current `RANK_VOTES` relations from the configured Geo API, * then builds ops that delete them (and their reified vote entities) and re-emit * the new ordered votes. * * @example * ```ts * const { ops } = await geo.ranks.update({ * rankId, * rankType: 'ORDINAL', * votes: [ * { entityId: movie2Id, spaceId }, // reordered submission * { entityId: movie1Id, spaceId }, * ], * }); * ``` * * @param context Client context containing API origin and fetch configuration. * @param params Rank ID, type, and the new ordered votes. * @returns Rank entity ID, ops, and the created vote entity IDs. * @throws When IDs are invalid, fetch is unavailable, GraphQL fails, the response * is malformed, or the rank is not found. */ export declare function update(context: GeoClientContext, { rankId, rankType, votes }: UpdateRankClientParams): Promise; //# sourceMappingURL=ranks.d.ts.map