Member Junction
    Preparing search index...

    Writes structured progress artifacts to <rootDir>/<runID>/:

    • manifest.json (written once at start)
    • progress.jsonl (append-only event stream; checkpoint events carry resumableState)
    • result.json (written once at terminate)

    Sequence numbers monotonic per emitter instance. Disk I/O is async and serialized via an internal promise chain — callers don't await; the emitter guarantees ordered writes. A flush() method awaits the queue when needed (test teardown, run completion).

    Index

    Constructors

    Methods

    • Terminate the run as CANCELLED (a user/system abort stopped it mid-flight, not a failure and not a clean completion). Emits exitReason='aborted' so a cancelled run is distinguishable from one that finished — the persisted CompanyIntegrationRun has no 'Cancelled' status, so the artifact's ExitReason is the GQL-visible signal that the run was stopped early (partial state is still durable).

      Parameters

      • Optionalmessage: string

      Returns Promise<void>

    • Write a resumable checkpoint. resumableState should carry enough subsystem- specific data for the originating service to resume from this point.

      Parameters

      • stage: string
      • resumableState: Record<string, unknown>

      Returns void

    • Terminate the run as success.

      Parameters

      • Optionalmessage: string

      Returns Promise<void>

    • Parameters

      • objectName: string
      • mjEntityName: string

      Returns void

    • Parameters

      • url: string
      • method: string
      • status: number
      • durationMs: number

      Returns void

    • Parameters

      • url: string
      • method: string
      • Optionaldata: Record<string, unknown>

      Returns void

    • Terminate the run as failure.

      Parameters

      • message: string
      • Optionalcode: string

      Returns Promise<void>

    • Parameters

      • objectName: string
      • fieldName: string
      • source: "Declared" | "Discovered" | "Custom"

      Returns void

    • Parameters

      • stage: string
      • message: string
      • Optionalcounts: {
            failed?: number;
            processed?: number;
            skipped?: number;
            succeeded?: number;
            totalKnown?: number;
        }

      Returns void

    • Parameters

      • objectName: string
      • source: "Declared" | "Discovered" | "Custom"

      Returns void

    • Parameters

      • objectName: string
      • verdict: Record<string, unknown>

      Returns void

    • Convenience helpers — sugared emit() for the common cases.

      Parameters

      • Optionalmessage: string

      Returns void

    • Parameters

      • stage: string
      • Optionalcounts: {
            failed?: number;
            processed?: number;
            skipped?: number;
            succeeded?: number;
            totalKnown?: number;
        }

      Returns void

    • Parameters

      • stage: string
      • message: string
      • Optionaldata: Record<string, unknown>

      Returns void

    • Emit a non-fatal warning. Carries a structured {stage, code, message, data} payload that the reader aggregates into the run result's warnings[] rollup. Unlike stageError, a warning never fails the run.

      Parameters

      • stage: string
      • code: string
      • message: string
      • Optionaldata: Record<string, unknown>

      Returns void

    • Register (or clear, with no arg) the global publish hook. The server registers this at startup so every emitted event also fans out to the live GraphQL subscription, in addition to the durable JSONL artifact + the pollable tail query.

      Parameters

      • Optionalhook: IntegrationProgressPublishHook

      Returns void