import { ReputationGrant, ReputationGrantTargetFilter } from "../../interfaces/models/ReputationGrant"; interface CreateReputationGrantBaseProps { /** The user receiving the reputation. Cannot be the logged-in user. */ recipientId: string; /** * Positive integer. A user transfer can never mint (negatives) nor be a * no-op (zero) — only an app mint, which is service-key-only and therefore * unreachable from this SDK, may be negative. */ amount: number; /** The bucket both legs move in. Omitted/null = the project-general bucket. */ spaceId?: string | null; /** * Free-text reason. Trimmed and capped at 2000 characters server-side. * Genuinely nullable — an explicit `null` is accepted and means "no note". */ note?: string | null; /** * Arbitrary JSON, capped at 1 MB server-side. * * NOT nullable — deliberately asymmetric with `note` directly above, not a * typo. The server's shared `metadataSchema` is `z.record(...).optional()` * with no `.nullable()`, so an explicit `metadata: null` is rejected with * `400 reputation-grant/invalid-body`. Omit the key to mean "no metadata". */ metadata?: Record; } /** * `targetType` and `targetId` are supplied together or not at all — the * both-or-neither pair is carried by {@link ReputationGrantTargetFilter}, so a * half-filled target is a compile error. The runtime check inside the hook * stays as the defense for plain-JS callers, who get no type checking at all. */ export type CreateReputationGrantProps = CreateReputationGrantBaseProps & ReputationGrantTargetFilter; /** * Transfers reputation from the logged-in user to another user. * * This is a **debited transfer**: the amount leaves the sender's bucket and * lands in the recipient's bucket in the same space — nothing is created. The * mint counterpart is service-key-only and lives in `@sublay/node`. */ declare function useCreateReputationGrant(): (props: CreateReputationGrantProps) => Promise; export default useCreateReputationGrant;