import { type ToolContext } from "@voyant-travel/tools"; import { z } from "zod"; import type { OperationsToolServices } from "./tool-services.js"; export interface OperatorDashboardBookingsServices { getBookingAggregates(query: { from?: string; to?: string; upcomingLimit?: number; }): Promise; } export interface OperatorDashboardFinanceServices { getFinanceAggregates(query: { range: "custom"; from: string; to: string; outstandingTopLimit: number; }): Promise; } export interface OperatorDashboardInventoryServices { getProductAggregates(query: { from?: string; to?: string; }): Promise; } export interface OperatorDashboardDistributionServices { getSupplierAggregates(query: { from?: string; to?: string; }): Promise; } export type OperatorDashboardToolContext = ToolContext & { operations?: OperationsToolServices; bookings?: OperatorDashboardBookingsServices; finance?: OperatorDashboardFinanceServices; inventory?: OperatorDashboardInventoryServices; distribution?: OperatorDashboardDistributionServices; }; declare const operatorDashboardRangeSchema: z.ZodEnum<{ today: "today"; "this-week": "this-week"; "this-month": "this-month"; "last-30-days": "last-30-days"; }>; export declare const operatorDashboardSummaryInputSchema: z.ZodObject<{ range: z.ZodDefault>; }, z.core.$strip>; export declare const operatorDashboardSummaryOutputSchema: z.ZodObject<{ range: z.ZodObject<{ key: z.ZodEnum<{ today: "today"; "this-week": "this-week"; "this-month": "this-month"; "last-30-days": "last-30-days"; }>; from: z.ZodString; to: z.ZodString; }, z.core.$strip>; generatedAt: z.ZodString; kpis: z.ZodObject<{ bookings: z.ZodObject<{ total: z.ZodNumber; active: z.ZodNumber; travelers: z.ZodNumber; }, z.core.$strip>; products: z.ZodObject<{ total: z.ZodNumber; active: z.ZodNumber; publicActive: z.ZodNumber; }, z.core.$strip>; suppliers: z.ZodObject<{ total: z.ZodNumber; active: z.ZodNumber; }, z.core.$strip>; availability: z.ZodObject<{ upcomingDepartures: z.ZodNumber; upcomingPax: z.ZodNumber; }, z.core.$strip>; revenue: z.ZodArray>; outstanding: z.ZodArray>; }, z.core.$strip>; alerts: z.ZodArray; severity: z.ZodEnum<{ warning: "warning"; critical: "critical"; }>; count: z.ZodNumber; currency: z.ZodNullable; amountCents: z.ZodNullable; }, z.core.$strip>>; projections: z.ZodObject<{ bookings: z.ZodObject<{ total: z.ZodNumber; totalPax: z.ZodNumber; countsByStatus: z.ZodArray>; monthlyCounts: z.ZodArray>; monthlyRevenue: z.ZodArray>; upcomingDepartures: z.ZodObject<{ count: z.ZodNumber; items: z.ZodArray; status: z.ZodString; startDate: z.ZodNullable; endDate: z.ZodNullable; pax: z.ZodNullable; sellCurrency: z.ZodNullable; sellAmountCents: z.ZodNullable; }, z.core.$strip>>; }, z.core.$strip>; }, z.core.$strip>; products: z.ZodObject<{ total: z.ZodNumber; countsByStatus: z.ZodArray>; active: z.ZodNumber; publicActive: z.ZodNumber; monthlyCreatedCounts: z.ZodArray>; }, z.core.$strip>; suppliers: z.ZodObject<{ total: z.ZodNumber; countsByStatus: z.ZodArray>; countsByType: z.ZodArray>; active: z.ZodNumber; }, z.core.$strip>; finance: z.ZodObject<{ total: z.ZodNumber; countsByStatus: z.ZodArray>; counts: z.ZodObject<{ invoices: z.ZodObject<{ issued: z.ZodNumber; paid: z.ZodNumber; void: z.ZodNumber; overdue: z.ZodNumber; }, z.core.$strip>; proformas: z.ZodObject<{ issued: z.ZodNumber; converted: z.ZodNumber; void: z.ZodNumber; }, z.core.$strip>; paymentSessions: z.ZodObject<{ pending: z.ZodNumber; paid: z.ZodNumber; failed: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>; totals: z.ZodArray>; monthlyRevenue: z.ZodArray>; monthlyInvoiceCounts: z.ZodArray>; outstanding: z.ZodArray>; overdue: z.ZodArray>; outstandingTopN: z.ZodArray; bookingId: z.ZodNullable; status: z.ZodString; currency: z.ZodString; totalCents: z.ZodNumber; balanceDueCents: z.ZodNumber; issueDate: z.ZodNullable; dueDate: z.ZodNullable; }, z.core.$strip>>; }, z.core.$strip>; availability: z.ZodObject<{ total: z.ZodNumber; countsByStatus: z.ZodArray; count: z.ZodNumber; }, z.core.$strip>>; upcomingSlots: z.ZodNumber; upcomingPax: z.ZodNumber; monthlyDepartures: z.ZodArray>; }, z.core.$strip>; }, z.core.$strip>; }, z.core.$strip>; export declare const getOperatorDashboardSummaryDefinition: { readonly owner: "@voyant-travel/operations#dashboard"; readonly capabilityId: "@voyant-travel/operations#dashboard#tool.get-operator-dashboard-summary"; readonly capabilityVersion: "v1"; readonly name: "get_operator_dashboard_summary"; readonly description: string; readonly inputSchema: z.ZodObject<{ range: z.ZodDefault>; }, z.core.$strip>; readonly outputSchema: z.ZodObject<{ range: z.ZodObject<{ key: z.ZodEnum<{ today: "today"; "this-week": "this-week"; "this-month": "this-month"; "last-30-days": "last-30-days"; }>; from: z.ZodString; to: z.ZodString; }, z.core.$strip>; generatedAt: z.ZodString; kpis: z.ZodObject<{ bookings: z.ZodObject<{ total: z.ZodNumber; active: z.ZodNumber; travelers: z.ZodNumber; }, z.core.$strip>; products: z.ZodObject<{ total: z.ZodNumber; active: z.ZodNumber; publicActive: z.ZodNumber; }, z.core.$strip>; suppliers: z.ZodObject<{ total: z.ZodNumber; active: z.ZodNumber; }, z.core.$strip>; availability: z.ZodObject<{ upcomingDepartures: z.ZodNumber; upcomingPax: z.ZodNumber; }, z.core.$strip>; revenue: z.ZodArray>; outstanding: z.ZodArray>; }, z.core.$strip>; alerts: z.ZodArray; severity: z.ZodEnum<{ warning: "warning"; critical: "critical"; }>; count: z.ZodNumber; currency: z.ZodNullable; amountCents: z.ZodNullable; }, z.core.$strip>>; projections: z.ZodObject<{ bookings: z.ZodObject<{ total: z.ZodNumber; totalPax: z.ZodNumber; countsByStatus: z.ZodArray>; monthlyCounts: z.ZodArray>; monthlyRevenue: z.ZodArray>; upcomingDepartures: z.ZodObject<{ count: z.ZodNumber; items: z.ZodArray; status: z.ZodString; startDate: z.ZodNullable; endDate: z.ZodNullable; pax: z.ZodNullable; sellCurrency: z.ZodNullable; sellAmountCents: z.ZodNullable; }, z.core.$strip>>; }, z.core.$strip>; }, z.core.$strip>; products: z.ZodObject<{ total: z.ZodNumber; countsByStatus: z.ZodArray>; active: z.ZodNumber; publicActive: z.ZodNumber; monthlyCreatedCounts: z.ZodArray>; }, z.core.$strip>; suppliers: z.ZodObject<{ total: z.ZodNumber; countsByStatus: z.ZodArray>; countsByType: z.ZodArray>; active: z.ZodNumber; }, z.core.$strip>; finance: z.ZodObject<{ total: z.ZodNumber; countsByStatus: z.ZodArray>; counts: z.ZodObject<{ invoices: z.ZodObject<{ issued: z.ZodNumber; paid: z.ZodNumber; void: z.ZodNumber; overdue: z.ZodNumber; }, z.core.$strip>; proformas: z.ZodObject<{ issued: z.ZodNumber; converted: z.ZodNumber; void: z.ZodNumber; }, z.core.$strip>; paymentSessions: z.ZodObject<{ pending: z.ZodNumber; paid: z.ZodNumber; failed: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>; totals: z.ZodArray>; monthlyRevenue: z.ZodArray>; monthlyInvoiceCounts: z.ZodArray>; outstanding: z.ZodArray>; overdue: z.ZodArray>; outstandingTopN: z.ZodArray; bookingId: z.ZodNullable; status: z.ZodString; currency: z.ZodString; totalCents: z.ZodNumber; balanceDueCents: z.ZodNumber; issueDate: z.ZodNullable; dueDate: z.ZodNullable; }, z.core.$strip>>; }, z.core.$strip>; availability: z.ZodObject<{ total: z.ZodNumber; countsByStatus: z.ZodArray; count: z.ZodNumber; }, z.core.$strip>>; upcomingSlots: z.ZodNumber; upcomingPax: z.ZodNumber; monthlyDepartures: z.ZodArray>; }, z.core.$strip>; }, z.core.$strip>; }, z.core.$strip>; readonly requiredScopes: readonly ["operations:read", "bookings:read", "finance:read", "products:read", "suppliers:read"]; readonly audience: { readonly source: "grant"; readonly allowed: readonly ["staff"]; }; readonly tier: "read"; readonly riskPolicy: import("@voyant-travel/tools").RiskPolicy; readonly annotations: { readonly readOnlyHint: true; readonly idempotentHint: true; }; readonly handler: ({ range }: { range: "today" | "this-week" | "this-month" | "last-30-days"; }, ctx: OperatorDashboardToolContext) => Promise<{ range: { key: "today" | "this-week" | "this-month" | "last-30-days"; from: string; to: string; }; generatedAt: string; kpis: { bookings: { total: number; active: number; travelers: number; }; products: { total: number; active: number; publicActive: number; }; suppliers: { total: number; active: number; }; availability: { upcomingDepartures: number; upcomingPax: number; }; revenue: { currency: string; amountCents: number; }[]; outstanding: { currency: string; amountCents: number; count: number; }[]; }; alerts: { kind: "overdue-invoices" | "no-public-products" | "no-active-suppliers" | "no-upcoming-departures"; severity: "warning" | "critical"; count: number; currency: string | null; amountCents: number | null; }[]; projections: { bookings: { total: number; totalPax: number; countsByStatus: { status: string; count: number; }[]; monthlyCounts: { yearMonth: string; count: number; }[]; monthlyRevenue: { yearMonth: string; currency: string; sellAmountCents: number; }[]; upcomingDepartures: { count: number; items: { id: string; bookingNumber: string | null; status: string; startDate: string | null; endDate: string | null; pax: number | null; sellCurrency: string | null; sellAmountCents: number | null; }[]; }; }; products: { total: number; countsByStatus: { status: string; count: number; }[]; active: number; publicActive: number; monthlyCreatedCounts: { yearMonth: string; count: number; }[]; }; suppliers: { total: number; countsByStatus: { status: string; count: number; }[]; countsByType: { type: string; count: number; }[]; active: number; }; finance: { total: number; countsByStatus: { status: string; count: number; }[]; counts: { invoices: { issued: number; paid: number; void: number; overdue: number; }; proformas: { issued: number; converted: number; void: number; }; paymentSessions: { pending: number; paid: number; failed: number; }; }; totals: { currency: string; invoiced: number; collected: number; outstanding: number; refunded: number; }[]; monthlyRevenue: { yearMonth: string; currency: string; totalCents: number; }[]; monthlyInvoiceCounts: { yearMonth: string; count: number; }[]; outstanding: { currency: string; balanceDueCents: number; count: number; }[]; overdue: { currency: string; balanceDueCents: number; count: number; }[]; outstandingTopN: { id: string; invoiceNumber: string | null; bookingId: string | null; status: string; currency: string; totalCents: number; balanceDueCents: number; issueDate: string | null; dueDate: string | null; }[]; }; availability: { total: number; countsByStatus: { status: "open" | "closed" | "sold_out" | "cancelled"; count: number; }[]; upcomingSlots: number; upcomingPax: number; monthlyDepartures: { yearMonth: string; count: number; }[]; }; }; }>; }; export declare function resolveOperatorDashboardWindow(range: z.infer, now?: Date): { from: string; to: string; }; export {};