Skip to content
Français

recoverWorkspacePublication

import { recoverWorkspacePublication } from "@elie-laloum/outpost/workspaces";

Explicitly finishes or rolls back an inspected publication, fencing stale writers and preserving concurrent changes. It never replays completed tasks.

Complete example and detailed rules.

  • transporterRequired
    Transport
    Caller-owned Transport used for conservation; no implicit cloud SDK or credential loading.
  • referenceRequired
    TransportReference
    Transport key and revision identifying the conserved object; conditional revisions fence stale writers.
  • actionRequired
    "finish" | "rollback"
    Explicit finish or rollback request; both verify current preconditions and never execute workflow tasks.
  • optionsOptional
    PublicationRecoveryOptions | undefined
    Confirm that the publication owner has stopped before finishing or conditionally reversing writes.
  • options.processesStoppedOptional
    true | undefined
    Explicit assertion that the prior owner and its processes have stopped; never inferred from heartbeat expiry.

Promise<TransportReference>

export declare function recoverWorkspacePublication(
  transporter: Transport,
  reference: TransportReference,
  action: "finish" | "rollback",
  options?: PublicationRecoveryOptions,
): Promise<TransportReference>;