import { type TravelCreditRecord } from "../schemas.js"; export interface IssueTravelCreditInput { code?: string | null; seriesCode?: string | null; currency: string; amountCents: number; issuedToPersonId?: string | null; issuedToOrganizationId?: string | null; sourceType: "refund" | "cancellation_credit" | "gift" | "manual" | "goodwill" | "promotion"; sourceBookingId?: string | null; sourcePaymentId?: string | null; validFrom?: string | null; expiresAt?: string | null; notes?: string | null; } export interface UpdateTravelCreditInput { status?: TravelCreditRecord["status"]; seriesCode?: string | null; validFrom?: string | null; expiresAt?: string | null; notes?: string | null; issuedToPersonId?: string | null; issuedToOrganizationId?: string | null; } export interface RedeemTravelCreditInput { idempotencyKey: string; bookingId: string; amountCents: number; paymentId?: string | null; } /** * Travel Credit mutations: issue new stored value, update metadata (status / expiry / * notes / assignment — NOT balance), or redeem against a booking. The redeem * mutation is the only path that decrements `remainingAmountCents`; the * server runs it transactionally with a redemption row. */ export declare function useTravelCreditMutation(): { issue: import("@tanstack/react-query").UseMutationResult<{ id: string; code: string; seriesCode: string | null; status: "expired" | "active" | "void" | "redeemed"; currency: string; initialAmountCents: number; remainingAmountCents: number; issuedToPersonId: string | null; issuedToOrganizationId: string | null; sourceType: "manual" | "refund" | "cancellation_credit" | "gift" | "goodwill" | "promotion"; sourceBookingId: string | null; sourcePaymentId: string | null; validFrom: Date | null; expiresAt: Date | null; notes: string | null; issuedByUserId: string | null; createdAt: Date; updatedAt: Date; }, Error, IssueTravelCreditInput, unknown>; update: import("@tanstack/react-query").UseMutationResult<{ id: string; code: string; seriesCode: string | null; status: "expired" | "active" | "void" | "redeemed"; currency: string; initialAmountCents: number; remainingAmountCents: number; issuedToPersonId: string | null; issuedToOrganizationId: string | null; sourceType: "manual" | "refund" | "cancellation_credit" | "gift" | "goodwill" | "promotion"; sourceBookingId: string | null; sourcePaymentId: string | null; validFrom: Date | null; expiresAt: Date | null; notes: string | null; issuedByUserId: string | null; createdAt: Date; updatedAt: Date; }, Error, { id: string; input: UpdateTravelCreditInput; }, unknown>; redeem: import("@tanstack/react-query").UseMutationResult<{ travelCredit: { id: string; code: string; seriesCode: string | null; status: "expired" | "active" | "void" | "redeemed"; currency: string; initialAmountCents: number; remainingAmountCents: number; issuedToPersonId: string | null; issuedToOrganizationId: string | null; sourceType: "manual" | "refund" | "cancellation_credit" | "gift" | "goodwill" | "promotion"; sourceBookingId: string | null; sourcePaymentId: string | null; validFrom: Date | null; expiresAt: Date | null; notes: string | null; issuedByUserId: string | null; createdAt: Date; updatedAt: Date; }; redemption: { id: string; travelCreditId: string; bookingId: string; paymentId: string | null; idempotencyKey: string | null; amountCents: number; createdByUserId: string | null; createdAt: Date; } | null; }, Error, { id: string; input: RedeemTravelCreditInput; }, unknown>; };