import { OpenAPIHono } from "@hono/zod-openapi"; import type { PostgresJsDatabase } from "drizzle-orm/postgres-js"; type Env = { Variables: { db: PostgresJsDatabase; userId?: string; }; }; export declare const quoteVersionRoutes: OpenAPIHono & import("hono/types").MergeSchemaPath<{ "/quote-versions/:id/trip-snapshot": { $post: { input: { param: { id: string; }; } & { json: { tripSnapshotId: string; currency: string; subtotalAmountCents?: number | undefined; taxAmountCents?: number | undefined; totalAmountCents?: number | undefined; lines?: { description: string; currency: string; productId?: string | null | undefined; supplierServiceId?: string | null | undefined; quantity?: number | undefined; unitPriceAmountCents?: number | undefined; totalAmountCents?: number | undefined; componentId?: string | null | undefined; }[] | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { param: { id: string; }; } & { json: { tripSnapshotId: string; currency: string; subtotalAmountCents?: number | undefined; taxAmountCents?: number | undefined; totalAmountCents?: number | undefined; lines?: { description: string; currency: string; productId?: string | null | undefined; supplierServiceId?: string | null | undefined; quantity?: number | undefined; unitPriceAmountCents?: number | undefined; totalAmountCents?: number | undefined; componentId?: string | null | undefined; }[] | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; } & { json: { tripSnapshotId: string; currency: string; subtotalAmountCents?: number | undefined; taxAmountCents?: number | undefined; totalAmountCents?: number | undefined; lines?: { description: string; currency: string; productId?: string | null | undefined; supplierServiceId?: string | null | undefined; quantity?: number | undefined; unitPriceAmountCents?: number | undefined; totalAmountCents?: number | undefined; componentId?: string | null | undefined; }[] | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 409; } | { input: { param: { id: string; }; } & { json: { tripSnapshotId: string; currency: string; subtotalAmountCents?: number | undefined; taxAmountCents?: number | undefined; totalAmountCents?: number | undefined; lines?: { description: string; currency: string; productId?: string | null | undefined; supplierServiceId?: string | null | undefined; quantity?: number | undefined; unitPriceAmountCents?: number | undefined; totalAmountCents?: number | undefined; componentId?: string | null | undefined; }[] | undefined; }; }; output: { data: { quoteVersion: { id: string; quoteId: string; label: string | null; status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired"; supersedesId: string | null; tripSnapshotId: string | null; validUntil: string | null; currency: string; subtotalAmountCents: number; taxAmountCents: number; totalAmountCents: number; notes: string | null; sentAt: string | null; viewedAt: string | null; decidedAt: string | null; createdAt: string; updatedAt: string; archivedAt: string | null; }; lines: { id: string; quoteVersionId: string; productId: string | null; supplierServiceId: string | null; description: string; quantity: number; unitPriceAmountCents: number; totalAmountCents: number; currency: string; createdAt: string; updatedAt: string; }[]; }; }; outputFormat: "json"; status: 200; }; }; } & { "/quote-versions/:id/send": { $post: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 409; } | { input: { param: { id: string; }; }; output: { data: { id: string; quoteId: string; label: string | null; status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired"; supersedesId: string | null; tripSnapshotId: string | null; validUntil: string | null; currency: string; subtotalAmountCents: number; taxAmountCents: number; totalAmountCents: number; notes: string | null; sentAt: string | null; viewedAt: string | null; decidedAt: string | null; createdAt: string; updatedAt: string; archivedAt: string | null; }; }; outputFormat: "json"; status: 200; }; }; } & { "/quote-versions/:id/view": { $post: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { data: { id: string; quoteId: string; label: string | null; status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired"; supersedesId: string | null; tripSnapshotId: string | null; validUntil: string | null; currency: string; subtotalAmountCents: number; taxAmountCents: number; totalAmountCents: number; notes: string | null; sentAt: string | null; viewedAt: string | null; decidedAt: string | null; createdAt: string; updatedAt: string; archivedAt: string | null; }; }; outputFormat: "json"; status: 200; }; }; } & { "/quote-versions/:id/accept": { $post: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 409; } | { input: { param: { id: string; }; }; output: { data: { quote: { id: string; title: string; personId: string | null; organizationId: string | null; pipelineId: string; stageId: string; ownerId: string | null; status: "open" | "won" | "lost" | "archived"; acceptedVersionId: string | null; valueAmountCents: number | null; valueCurrency: string | null; paxCount: number | null; expectedCloseDate: string | null; source: string | null; sourceRef: string | null; lostReason: string | null; tags: string[]; customFields: { [x: string]: { [x: string]: import("hono/utils/types").JSONValue; }; }; description: string | null; createdBy: string | null; updatedBy: string | null; createdAt: string; updatedAt: string; stageChangedAt: string; closedAt: string | null; }; quoteVersion: { id: string; quoteId: string; label: string | null; status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired"; supersedesId: string | null; tripSnapshotId: string | null; validUntil: string | null; currency: string; subtotalAmountCents: number; taxAmountCents: number; totalAmountCents: number; notes: string | null; sentAt: string | null; viewedAt: string | null; decidedAt: string | null; createdAt: string; updatedAt: string; archivedAt: string | null; }; closedQuoteVersions: { id: string; quoteId: string; label: string | null; status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired"; supersedesId: string | null; tripSnapshotId: string | null; validUntil: string | null; currency: string; subtotalAmountCents: number; taxAmountCents: number; totalAmountCents: number; notes: string | null; sentAt: string | null; viewedAt: string | null; decidedAt: string | null; createdAt: string; updatedAt: string; archivedAt: string | null; }[]; }; }; outputFormat: "json"; status: 200; }; }; } & { "/quote-versions/:id/decline": { $post: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 409; } | { input: { param: { id: string; }; }; output: { data: { id: string; quoteId: string; label: string | null; status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired"; supersedesId: string | null; tripSnapshotId: string | null; validUntil: string | null; currency: string; subtotalAmountCents: number; taxAmountCents: number; totalAmountCents: number; notes: string | null; sentAt: string | null; viewedAt: string | null; decidedAt: string | null; createdAt: string; updatedAt: string; archivedAt: string | null; }; }; outputFormat: "json"; status: 200; }; }; }, "/"> & import("hono/types").MergeSchemaPath<{ "/quote-versions": { $get: { input: { query: { limit?: unknown; offset?: unknown; quoteId?: string | undefined; status?: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired" | undefined; }; }; output: { data: { id: string; quoteId: string; label: string | null; status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired"; supersedesId: string | null; tripSnapshotId: string | null; validUntil: string | null; currency: string; subtotalAmountCents: number; taxAmountCents: number; totalAmountCents: number; notes: string | null; sentAt: string | null; viewedAt: string | null; decidedAt: string | null; createdAt: string; updatedAt: string; archivedAt: string | null; }[]; total: number; limit: number; offset: number; }; outputFormat: "json"; status: 200; }; }; } & { "/quotes/:id/versions": { $post: { input: { param: { id: string; }; } & { json: { currency: string; status?: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired" | undefined; label?: string | null | undefined; supersedesId?: string | null | undefined; tripSnapshotId?: string | null | undefined; validUntil?: string | null | undefined; subtotalAmountCents?: number | undefined; taxAmountCents?: number | undefined; totalAmountCents?: number | undefined; notes?: string | null | undefined; sentAt?: string | null | undefined; viewedAt?: string | null | undefined; decidedAt?: string | null | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { param: { id: string; }; } & { json: { currency: string; status?: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired" | undefined; label?: string | null | undefined; supersedesId?: string | null | undefined; tripSnapshotId?: string | null | undefined; validUntil?: string | null | undefined; subtotalAmountCents?: number | undefined; taxAmountCents?: number | undefined; totalAmountCents?: number | undefined; notes?: string | null | undefined; sentAt?: string | null | undefined; viewedAt?: string | null | undefined; decidedAt?: string | null | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; } & { json: { currency: string; status?: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired" | undefined; label?: string | null | undefined; supersedesId?: string | null | undefined; tripSnapshotId?: string | null | undefined; validUntil?: string | null | undefined; subtotalAmountCents?: number | undefined; taxAmountCents?: number | undefined; totalAmountCents?: number | undefined; notes?: string | null | undefined; sentAt?: string | null | undefined; viewedAt?: string | null | undefined; decidedAt?: string | null | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 409; } | { input: { param: { id: string; }; } & { json: { currency: string; status?: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired" | undefined; label?: string | null | undefined; supersedesId?: string | null | undefined; tripSnapshotId?: string | null | undefined; validUntil?: string | null | undefined; subtotalAmountCents?: number | undefined; taxAmountCents?: number | undefined; totalAmountCents?: number | undefined; notes?: string | null | undefined; sentAt?: string | null | undefined; viewedAt?: string | null | undefined; decidedAt?: string | null | undefined; }; }; output: { data: { id: string; quoteId: string; label: string | null; status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired"; supersedesId: string | null; tripSnapshotId: string | null; validUntil: string | null; currency: string; subtotalAmountCents: number; taxAmountCents: number; totalAmountCents: number; notes: string | null; sentAt: string | null; viewedAt: string | null; decidedAt: string | null; createdAt: string; updatedAt: string; archivedAt: string | null; }; }; outputFormat: "json"; status: 201; }; }; } & { "/quote-versions/:id/validity": { $patch: { input: { param: { id: string; }; } & { json: { validUntil: string | null; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { param: { id: string; }; } & { json: { validUntil: string | null; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; } & { json: { validUntil: string | null; }; }; output: { data: { id: string; quoteId: string; label: string | null; status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired"; supersedesId: string | null; tripSnapshotId: string | null; validUntil: string | null; currency: string; subtotalAmountCents: number; taxAmountCents: number; totalAmountCents: number; notes: string | null; sentAt: string | null; viewedAt: string | null; decidedAt: string | null; createdAt: string; updatedAt: string; archivedAt: string | null; }; }; outputFormat: "json"; status: 200; }; }; } & { "/quotes/:id/versions/snapshot": { $post: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 409; } | { input: { param: { id: string; }; }; output: { data: { id: string; quoteId: string; label: string | null; status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired"; supersedesId: string | null; tripSnapshotId: string | null; validUntil: string | null; currency: string; subtotalAmountCents: number; taxAmountCents: number; totalAmountCents: number; notes: string | null; sentAt: string | null; viewedAt: string | null; decidedAt: string | null; createdAt: string; updatedAt: string; archivedAt: string | null; }; }; outputFormat: "json"; status: 201; }; }; } & { "/quote-versions/expire": { $post: { input: {}; output: { data: { id: string; quoteId: string; label: string | null; status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired"; supersedesId: string | null; tripSnapshotId: string | null; validUntil: string | null; currency: string; subtotalAmountCents: number; taxAmountCents: number; totalAmountCents: number; notes: string | null; sentAt: string | null; viewedAt: string | null; decidedAt: string | null; createdAt: string; updatedAt: string; archivedAt: string | null; }[]; }; outputFormat: "json"; status: 200; }; }; } & { "/quote-versions/:id": { $get: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { data: { id: string; quoteId: string; label: string | null; status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired"; supersedesId: string | null; tripSnapshotId: string | null; validUntil: string | null; currency: string; subtotalAmountCents: number; taxAmountCents: number; totalAmountCents: number; notes: string | null; sentAt: string | null; viewedAt: string | null; decidedAt: string | null; createdAt: string; updatedAt: string; archivedAt: string | null; }; }; outputFormat: "json"; status: 200; }; }; } & { "/quote-versions/:id": { $patch: { input: { param: { id: string; }; } & { json: { quoteId?: string | undefined; label?: string | null | undefined; supersedesId?: string | null | undefined; tripSnapshotId?: string | null | undefined; validUntil?: string | null | undefined; currency?: string | undefined; notes?: string | null | undefined; sentAt?: string | null | undefined; viewedAt?: string | null | undefined; decidedAt?: string | null | undefined; status?: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired" | undefined; subtotalAmountCents?: number | undefined; taxAmountCents?: number | undefined; totalAmountCents?: number | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { param: { id: string; }; } & { json: { quoteId?: string | undefined; label?: string | null | undefined; supersedesId?: string | null | undefined; tripSnapshotId?: string | null | undefined; validUntil?: string | null | undefined; currency?: string | undefined; notes?: string | null | undefined; sentAt?: string | null | undefined; viewedAt?: string | null | undefined; decidedAt?: string | null | undefined; status?: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired" | undefined; subtotalAmountCents?: number | undefined; taxAmountCents?: number | undefined; totalAmountCents?: number | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; } & { json: { quoteId?: string | undefined; label?: string | null | undefined; supersedesId?: string | null | undefined; tripSnapshotId?: string | null | undefined; validUntil?: string | null | undefined; currency?: string | undefined; notes?: string | null | undefined; sentAt?: string | null | undefined; viewedAt?: string | null | undefined; decidedAt?: string | null | undefined; status?: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired" | undefined; subtotalAmountCents?: number | undefined; taxAmountCents?: number | undefined; totalAmountCents?: number | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 409; } | { input: { param: { id: string; }; } & { json: { quoteId?: string | undefined; label?: string | null | undefined; supersedesId?: string | null | undefined; tripSnapshotId?: string | null | undefined; validUntil?: string | null | undefined; currency?: string | undefined; notes?: string | null | undefined; sentAt?: string | null | undefined; viewedAt?: string | null | undefined; decidedAt?: string | null | undefined; status?: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired" | undefined; subtotalAmountCents?: number | undefined; taxAmountCents?: number | undefined; totalAmountCents?: number | undefined; }; }; output: { data: { id: string; quoteId: string; label: string | null; status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired"; supersedesId: string | null; tripSnapshotId: string | null; validUntil: string | null; currency: string; subtotalAmountCents: number; taxAmountCents: number; totalAmountCents: number; notes: string | null; sentAt: string | null; viewedAt: string | null; decidedAt: string | null; createdAt: string; updatedAt: string; archivedAt: string | null; }; }; outputFormat: "json"; status: 200; }; }; } & { "/quote-versions/:id": { $delete: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { success: true; }; outputFormat: "json"; status: 200; } | { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 409; }; }; }, "/">, "/">; export {};