import type { Terminal } from "../terminal.js"; import { type Registered } from "./registry.js"; export declare const DEFAULT_API = "https://prlens.dev"; export declare const API_ENV = "PR_LENS_API_URL"; /** * `||` for the environment: a workflow cannot omit an `env` key, so it sets * it to "". The flag keeps `??`, so a typed `--api ""` is reported. */ export declare const readApi: (value: unknown, env: Record) => string; /** Another app's 404 says nothing about this entry, so it must not change it. */ export declare const requireSameApi: (api: string, { id, entry }: Registered) => void; export declare const requireWriteToken: ({ id, entry }: Registered) => string; /** * The write token first: it works signed out and on stores without accounts. * The account token only works if the app finds the account owns the canvas. */ export declare const writeCredential: (registered: Registered, env: Record, api: string) => Promise; /** Asking again with the same pair is safe: the app answers "rotated" once the token is on record. */ export declare const settleRotation: (api: string, { id, entry }: Registered, nextToken: string, terminal: Terminal, env: Record) => Promise<{ registered: Registered; editUrl: string; }>; export declare const settlePendingRotation: (api: string, registered: Registered, terminal: Terminal, env: Record) => Promise; //# sourceMappingURL=write.d.ts.map