import { z } from "zod"; /** Transfer routes relative to the companies router (`/api/companies`). */ export declare const COMPANY_IMPORT_TRANSFERS_ROUTE_PATH = "/import/transfers"; export declare const COMPANY_IMPORT_TRANSFERS_API_PATH = "/api/companies/import/transfers"; /** * Paths for one transfer, relative to the companies API root — callers prefix * their own mount ("/companies" in the browser client, "/api/companies" in * the CLI; the server registers the same shapes as express params). */ export declare function companyImportTransferPath(transferId: string): string; export declare function companyImportTransferPartPath(transferId: string, partIndex: number): string; export declare function companyImportTransferPreviewPath(transferId: string): string; export declare function companyImportTransferApplyPath(transferId: string): string; /** Hard cap on the number of declared byte-range parts per transfer. */ export declare const COMPANY_IMPORT_TRANSFER_MAX_PARTS = 4096; export declare const companyImportTransferDeclaredPartSchema: z.ZodObject<{ index: z.ZodNumber; byteSize: z.ZodNumber; sha256: z.ZodString; }, z.core.$strip>; /** * Declaration body for POST /api/companies/import/transfers: the caller's * existing .zip described as contiguous content-addressed byte-range parts. */ export declare const companyImportTransferDeclarationSchema: z.ZodObject<{ totalBytes: z.ZodNumber; zipSha256: z.ZodString; partSizeBytes: z.ZodNumber; parts: z.ZodArray>; }, z.core.$strip>; export type CompanyImportTransferDeclaredPart = z.infer; export type CompanyImportTransferDeclaration = z.infer; /** Ledger states a transfer run moves through (see company_transfer_runs). */ export type CompanyImportTransferRunStatus = "pending" | "running" | "applying" | "completed" | "failed" | "cancelled"; /** Response of declaring (or resuming) a chunked import transfer. */ export interface CompanyImportTransferCreated { transferId: string; status: CompanyImportTransferRunStatus; /** True when this exact content already finished a prior apply. */ alreadyCompleted: boolean; totalParts: number; missingParts: number[]; /** * Where the prior completed apply landed, so an alreadyCompleted rejection * can point at the existing company instead of reading as data loss. * Null/absent when the run's company link was never written or the company * has since been deleted. */ company?: { id: string; name: string | null; issuePrefix: string | null; } | null; } /** * Human-facing message for an `alreadyCompleted` declaration. Shared by the * web and CLI clients so the copy (and the pointer to the landed company) * stays identical everywhere the rejection surfaces. */ export declare function buildAlreadyImportedMessage(company: CompanyImportTransferCreated["company"]): string; /** Response of the resume-polling GET for one transfer. */ export interface CompanyImportTransferStatus { transferId: string; status: CompanyImportTransferRunStatus; totalParts: number; completedParts: number; missingParts: number[]; } /** Response of uploading one declared part. */ export interface CompanyImportTransferPartUploadResult { ok: true; index: number; /** True when the part was already spooled and verified by a prior upload. */ alreadyCompleted: boolean; } //# sourceMappingURL=company-import-transfer.d.ts.map