import * as v from 'valibot'; import type { RawGuideFilePayload } from '@auden.to/protocol'; declare const ImportSuccessSchema: v.ObjectSchema<{ readonly imported: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction]>; readonly skipped: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction]>; readonly updated: v.OptionalSchema, v.IntegerAction, v.MinValueAction]>, undefined>; readonly conflicts: v.OptionalSchema, v.IntegerAction, v.MinValueAction]>, undefined>; readonly results: v.OptionalSchema; readonly path: v.SchemaWithPipe, v.MinLengthAction, v.MaxLengthAction, v.CheckAction, v.CheckAction, v.CheckAction, v.CheckAction]>; readonly outcome: v.PicklistSchema<["imported", "updated", "skipped", "conflict"], undefined>; readonly version: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction]>; }, undefined>, undefined>, v.MaxLengthAction<{ root: "global" | "project"; path: string; outcome: "skipped" | "updated" | "conflict" | "imported"; version: number; }[], 100, undefined>]>, undefined>; readonly members: v.OptionalSchema, v.IntegerAction, v.MinValueAction]>; readonly updated: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction]>; readonly removed: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction]>; readonly unchanged: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction]>; }, undefined>, undefined>; }, undefined>; export type ImportRulesResult = v.InferOutput; export type ImportRulesOptions = { dashboardUrl: string; token: string; rules: RawGuideFilePayload[]; /** * Opaque digest of the checkout these files came from (`repoIdFromRoot`). * Sent on every batch so the server can reconcile an edited file onto the * guide it already created rather than inserting a second one. * * Optional so a caller with no repo context (or a test) can omit it; the * server then falls back to content-hash dedupe. Never synthesize one — an * id not derived from the machine-local key would collide across users' * checkouts in the reconcile lookup. */ repoId?: string; /** * The repo's declared **portable** identity (`project.id` in the committed * `.auden/config.json`). Sent alongside `repoId`, not instead of it: the * server prefers this for reconciliation because every clone agrees on it, * while the machine-local digest keeps working for a repo that has never * declared one and stays the key for evidence (`unified-item-sync` slice 2). * * Optional for the same reason `repoId` is — a caller with no repo context, a * test, or a repo that has not run `auden init` simply omits it. */ projectId?: string; /** Override fetch for tests. Defaults to globalThis.fetch. */ fetchImpl?: typeof fetch; }; /** * Split payloads into consecutive batches bounded by both count * (`MAX_RULES_IMPORT_BATCH`) and approximate serialized size. A single * payload larger than the byte budget still ships alone — the server's * per-field caps are the authority on whether it is acceptable. */ export declare function chunkRulePayloads(rules: RawGuideFilePayload[]): RawGuideFilePayload[][]; /** * POST `RawGuideFilePayload`s to the dashboard import endpoint, chunked to * stay under the server's `MAX_RULES_IMPORT_BATCH` per-request cap and its * request-body byte cap, and sum the parsed results. Throws on transport * errors, non-2xx responses, or malformed bodies. Empty `rules` is rejected * here so the CLI never sends a useless request. */ export declare function importRules(options: ImportRulesOptions): Promise; export {}; //# sourceMappingURL=import-client.d.ts.map