import { type FetchWithValidationOptions } from "./client.js"; import type { FinanceActionLedgerListCursor } from "./query-keys.js"; import { type PublicFinanceDocumentLookupQuery, type PublicStartPaymentSessionInput, type PublicValidateTravelCreditInput } from "./schemas.js"; export interface FinanceActionLedgerListInput { cursor?: FinanceActionLedgerListCursor | null | undefined; limit?: number | undefined; } export interface InvoiceFxRateInput { baseCurrency: string; quoteCurrency: string; date?: string | undefined; } export declare function listInvoiceActionLedger(client: FetchWithValidationOptions, invoiceId: string, input?: FinanceActionLedgerListInput): Promise<{ data: { id: string; occurredAt: string; actionName: string; actionVersion: string; actionKind: "reverse" | "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "compensate" | "duplicate"; status: "expired" | "failed" | "cancelled" | "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "reversed" | "compensated" | "superseded"; evaluatedRisk: "high" | "low" | "medium" | "critical"; actorType: string | null; principalType: "user" | "api_key" | "agent" | "workflow" | "system"; principalId: string; principalSubtype: string | null; sessionId: string | null; apiTokenId: string | null; internalRequest: boolean; delegatedByPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system" | null; delegatedByPrincipalId: string | null; delegationId: string | null; callerType: string | null; organizationId: string | null; routeOrToolName: string | null; workflowRunId: string | null; workflowStepId: string | null; correlationId: string | null; causationActionId: string | null; idempotencyScope: string | null; idempotencyKey: string | null; idempotencyFingerprint: string | null; targetType: string; targetId: string; capabilityId: string | null; capabilityVersion: string | null; authorizationSource: string | null; approvalId: string | null; amendsActionId: string | null; createdAt: string; mutationSummary: string | null; }[]; pageInfo: { nextCursor: { occurredAt: string; id: string; } | null; }; }>; export declare function listPaymentSessionActionLedger(client: FetchWithValidationOptions, paymentSessionId: string, input?: FinanceActionLedgerListInput): Promise<{ data: { id: string; occurredAt: string; actionName: string; actionVersion: string; actionKind: "reverse" | "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "compensate" | "duplicate"; status: "expired" | "failed" | "cancelled" | "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "reversed" | "compensated" | "superseded"; evaluatedRisk: "high" | "low" | "medium" | "critical"; actorType: string | null; principalType: "user" | "api_key" | "agent" | "workflow" | "system"; principalId: string; principalSubtype: string | null; sessionId: string | null; apiTokenId: string | null; internalRequest: boolean; delegatedByPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system" | null; delegatedByPrincipalId: string | null; delegationId: string | null; callerType: string | null; organizationId: string | null; routeOrToolName: string | null; workflowRunId: string | null; workflowStepId: string | null; correlationId: string | null; causationActionId: string | null; idempotencyScope: string | null; idempotencyKey: string | null; idempotencyFingerprint: string | null; targetType: string; targetId: string; capabilityId: string | null; capabilityVersion: string | null; authorizationSource: string | null; approvalId: string | null; amendsActionId: string | null; createdAt: string; mutationSummary: string | null; }[]; pageInfo: { nextCursor: { occurredAt: string; id: string; } | null; }; }>; export declare function getPublicFinanceDocumentByReference(client: FetchWithValidationOptions, query: PublicFinanceDocumentLookupQuery): Promise<{ data: { invoiceId: string; invoiceNumber: string; invoiceType: "invoice" | "proforma" | "credit_note"; invoiceStatus: "paid" | "void" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue"; currency: string; totalCents: number; paidCents: number; balanceDueCents: number; issueDate: string; dueDate: string; renditionId: string | null; documentStatus: "pending" | "failed" | "ready" | "stale" | "missing"; format: "xml" | "pdf" | "html" | "json" | null; language: string | null; generatedAt: string | null; fileSize: number | null; checksum: string | null; downloadUrl: string | null; bookingId: string; }; }>; export declare function getPublicBookingDocuments(client: FetchWithValidationOptions, bookingId: string): Promise<{ data: { bookingId: string; documents: { invoiceId: string; invoiceNumber: string; invoiceType: "invoice" | "proforma" | "credit_note"; invoiceStatus: "paid" | "void" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue"; currency: string; totalCents: number; paidCents: number; balanceDueCents: number; issueDate: string; dueDate: string; renditionId: string | null; documentStatus: "pending" | "failed" | "ready" | "stale" | "missing"; format: "xml" | "pdf" | "html" | "json" | null; language: string | null; generatedAt: string | null; fileSize: number | null; checksum: string | null; downloadUrl: string | null; }[]; }; }>; export declare function getPublicBookingPayments(client: FetchWithValidationOptions, bookingId: string): Promise<{ data: { bookingId: string; payments: { id: string; source: "payment" | "travel_credit_redemption"; invoiceId: string | null; invoiceNumber: string | null; invoiceType: "invoice" | "proforma" | "credit_note" | null; status: "pending" | "failed" | "completed" | "refunded"; paymentMethod: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "travel_credit" | "other" | "bank_transfer" | "cheque"; amountCents: number; currency: string; baseCurrency: string | null; baseAmountCents: number | null; paymentDate: string; referenceNumber: string | null; notes: string | null; }[]; }; }>; /** * Admin variant — same response shape as `getPublicBookingPayments`, * but hits the admin endpoint (`/v1/admin/finance/bookings/:id/payments`) * so a staff actor can read it. The customer-portal continues to use * the public path; the operator dashboard uses this one. */ export declare function getAdminBookingPayments(client: FetchWithValidationOptions, bookingId: string): Promise<{ data: { bookingId: string; payments: { id: string; source: "payment" | "travel_credit_redemption"; invoiceId: string | null; invoiceNumber: string | null; invoiceType: "invoice" | "proforma" | "credit_note" | null; status: "pending" | "failed" | "completed" | "refunded"; paymentMethod: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "travel_credit" | "other" | "bank_transfer" | "cheque"; amountCents: number; currency: string; baseCurrency: string | null; baseAmountCents: number | null; paymentDate: string; referenceNumber: string | null; notes: string | null; }[]; }; }>; export declare function getInvoiceFxRate(client: FetchWithValidationOptions, input: InvoiceFxRateInput): Promise<{ data: { baseCurrency: string; quoteCurrency: string; rate: number; fxCommissionBps: number; effectiveRate: number; date?: string | undefined; source?: string | undefined; quotedAt?: string | undefined; validUntil?: string | undefined; fxCommissionInvoiceMention?: string | undefined; }; }>; export declare function getPublicBookingPaymentOptions(client: FetchWithValidationOptions, bookingId: string, filters?: { personId?: string; organizationId?: string; provider?: string; instrumentType?: string; includeInactive?: boolean; }): Promise<{ data: { bookingId: string; accounts: { id: string; label: string; provider: string | null; instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "travel_credit" | "other" | "bank_account"; status: "expired" | "active" | "inactive" | "revoked" | "failed_verification"; brand: string | null; last4: string | null; expiryMonth: number | null; expiryYear: number | null; isDefault: boolean; }[]; schedules: { id: string; scheduleType: "other" | "hold" | "deposit" | "installment" | "balance"; status: "expired" | "paid" | "pending" | "cancelled" | "due" | "waived"; dueDate: string; currency: string; amountCents: number; notes: string | null; }[]; guarantees: { id: string; bookingPaymentScheduleId: string | null; guaranteeType: string; status: string; currency: string | null; amountCents: number | null; provider: string | null; referenceNumber: string | null; expiresAt: string | null; notes: string | null; }[]; recommendedTarget: { targetType: "booking_payment_schedule" | "booking_guarantee" | null; targetId: string | null; } | null; }; }>; export declare function getPublicPaymentSession(client: FetchWithValidationOptions, sessionId: string): Promise<{ data: { legacyOrderId: string | null; providerConnectionId: string | null; target: { type: "booking_session"; bookingSessionId: string; } | { type: "booking"; bookingId: string; } | { type: "invoice"; invoiceId: string; } | { type: "booking_payment_schedule"; bookingPaymentScheduleId: string; } | { type: "booking_guarantee"; bookingGuaranteeId: string; } | { type: "flight_order"; flightOrderId: string; } | { type: "program"; programId: string; } | { type: "supplier_settlement"; supplierSettlementId: string; } | { type: "channel_settlement"; channelSettlementId: string; } | { type: "provider_reference"; provider: string; reference: string; } | { type: "legacy_order"; legacyOrderId: string; } | null; provenance: { source: "other" | "operator" | "storefront" | "customer_portal" | "payment_provider" | "supplier_channel" | "migration"; provider?: string | null | undefined; reference?: string | null | undefined; idempotencyKey?: string | null | undefined; } | null; id: string; targetType: "invoice" | "other" | "booking_session" | "booking" | "order" | "booking_payment_schedule" | "booking_guarantee" | "flight_order"; targetId: string | null; bookingId: string | null; invoiceId: string | null; bookingPaymentScheduleId: string | null; bookingGuaranteeId: string | null; status: "paid" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "cancelled" | "expired"; provider: string | null; providerSessionId: string | null; providerPaymentId: string | null; externalReference: string | null; clientReference: string | null; currency: string; amountCents: number; paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null; payerEmail: string | null; payerName: string | null; redirectUrl: string | null; returnUrl: string | null; cancelUrl: string | null; expiresAt: string | null; completedAt: string | null; failureCode: string | null; failureMessage: string | null; notes: string | null; }; }>; export declare function startPublicBookingSchedulePaymentSession(client: FetchWithValidationOptions, bookingId: string, scheduleId: string, input: PublicStartPaymentSessionInput): Promise<{ data: { legacyOrderId: string | null; providerConnectionId: string | null; target: { type: "booking_session"; bookingSessionId: string; } | { type: "booking"; bookingId: string; } | { type: "invoice"; invoiceId: string; } | { type: "booking_payment_schedule"; bookingPaymentScheduleId: string; } | { type: "booking_guarantee"; bookingGuaranteeId: string; } | { type: "flight_order"; flightOrderId: string; } | { type: "program"; programId: string; } | { type: "supplier_settlement"; supplierSettlementId: string; } | { type: "channel_settlement"; channelSettlementId: string; } | { type: "provider_reference"; provider: string; reference: string; } | { type: "legacy_order"; legacyOrderId: string; } | null; provenance: { source: "other" | "operator" | "storefront" | "customer_portal" | "payment_provider" | "supplier_channel" | "migration"; provider?: string | null | undefined; reference?: string | null | undefined; idempotencyKey?: string | null | undefined; } | null; id: string; targetType: "invoice" | "other" | "booking_session" | "booking" | "order" | "booking_payment_schedule" | "booking_guarantee" | "flight_order"; targetId: string | null; bookingId: string | null; invoiceId: string | null; bookingPaymentScheduleId: string | null; bookingGuaranteeId: string | null; status: "paid" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "cancelled" | "expired"; provider: string | null; providerSessionId: string | null; providerPaymentId: string | null; externalReference: string | null; clientReference: string | null; currency: string; amountCents: number; paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null; payerEmail: string | null; payerName: string | null; redirectUrl: string | null; returnUrl: string | null; cancelUrl: string | null; expiresAt: string | null; completedAt: string | null; failureCode: string | null; failureMessage: string | null; notes: string | null; }; }>; export declare function startPublicBookingGuaranteePaymentSession(client: FetchWithValidationOptions, bookingId: string, guaranteeId: string, input: PublicStartPaymentSessionInput): Promise<{ data: { legacyOrderId: string | null; providerConnectionId: string | null; target: { type: "booking_session"; bookingSessionId: string; } | { type: "booking"; bookingId: string; } | { type: "invoice"; invoiceId: string; } | { type: "booking_payment_schedule"; bookingPaymentScheduleId: string; } | { type: "booking_guarantee"; bookingGuaranteeId: string; } | { type: "flight_order"; flightOrderId: string; } | { type: "program"; programId: string; } | { type: "supplier_settlement"; supplierSettlementId: string; } | { type: "channel_settlement"; channelSettlementId: string; } | { type: "provider_reference"; provider: string; reference: string; } | { type: "legacy_order"; legacyOrderId: string; } | null; provenance: { source: "other" | "operator" | "storefront" | "customer_portal" | "payment_provider" | "supplier_channel" | "migration"; provider?: string | null | undefined; reference?: string | null | undefined; idempotencyKey?: string | null | undefined; } | null; id: string; targetType: "invoice" | "other" | "booking_session" | "booking" | "order" | "booking_payment_schedule" | "booking_guarantee" | "flight_order"; targetId: string | null; bookingId: string | null; invoiceId: string | null; bookingPaymentScheduleId: string | null; bookingGuaranteeId: string | null; status: "paid" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "cancelled" | "expired"; provider: string | null; providerSessionId: string | null; providerPaymentId: string | null; externalReference: string | null; clientReference: string | null; currency: string; amountCents: number; paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null; payerEmail: string | null; payerName: string | null; redirectUrl: string | null; returnUrl: string | null; cancelUrl: string | null; expiresAt: string | null; completedAt: string | null; failureCode: string | null; failureMessage: string | null; notes: string | null; }; }>; export declare function validatePublicTravelCredit(client: FetchWithValidationOptions, input: PublicValidateTravelCreditInput): Promise<{ data: { valid: boolean; reason: "expired" | "inactive" | "not_found" | "not_started" | "booking_mismatch" | "currency_mismatch" | "insufficient_balance" | null; travelCredit: { id: string; code: string; currency: string | null; amountCents: number | null; remainingAmountCents: number | null; expiresAt: string | null; } | null; }; }>;