@passband/sdk - v0.0.0
    Preparing search index...

    Class PipelineResource

    Pipeline resource — POST /pipeline, GET /pipeline/runs, GET /pipeline/stats.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    runs: PipelineRuns

    Methods

    • Queue a new pipeline run. POST /pipeline

      Returns Promise<{ message?: string; status?: "queued" }>

    • Aggregate pipeline statistics. GET /pipeline/stats

      Returns Promise<
          {
              averageDraftsPerRun?: number;
              averageDuration?: number
              | null;
              averageItemsPerRun?: number;
              last30Days?: { drafts?: number; items?: number; runs?: number };
              successRate?: number;
              topErrors?: { category?: string; count?: number }[];
              totalRuns?: number;
          },
      >

    • Fetch the status of a specific run.

      The API has no GET /pipeline/runs/{id} route, so this method performs a linear scan of the paginated GET /pipeline/runs endpoint to locate runId. Cost is therefore O(n) in the number of runs — up to STATUS_MAX_PAGES pages of STATUS_PAGE_SIZE are scanned before the search is abandoned. Prefer paging runs.list directly when you already know the run is recent.

      Parameters

      • runId: string

      Returns Promise<
          {
              duration?: number
              | null;
              endedAt?: string | null;
              error?: string | null;
              id?: string;
              stage?: string | null;
              startedAt?: string;
              stats?: {
                  draftsCreated?: number;
                  itemsFiltered?: number;
                  itemsIngested?: number;
                  itemsRanked?: number;
                  stageTiming?: Record<string, never>;
              };
              status?: string;
          },
      >

      if the run is not found within the scan cap.