/** * Working out who the session belongs to. * * Substack refuses to create a draft without `draft_bylines`, and the byline is * the numeric user id. The old implementation never sent it, which is the other * half of why its drafts came out wrong. * * SUBSTACK_USER_ID is the fast path. When it is not set we resolve the id once * per process and cache it, so the model does not have to make the user go * hunting in DevTools for a number we can look up ourselves. */ import type { SubstackClient } from "./client.js"; import type { Credentials } from "../config.js"; export declare function resolveUserId(client: SubstackClient, creds: Credentials): Promise; /** * The `draft_bylines` value Substack expects. Returns undefined when the id * could not be resolved, so the caller can send the draft without it rather * than failing outright. */ export declare function bylinesFor(client: SubstackClient, creds: Credentials): Promise<{ id: number; is_guest: boolean; }[] | undefined>;