Member Junction
    Preparing search index...

    Context passed to FetchChanges for incremental data retrieval

    interface FetchContext {
        AfterKeyValue?: string;
        BatchSize: number;
        CompanyIntegration: MJCompanyIntegrationEntity;
        ContextUser: UserInfo;
        CurrentCursor?: string;
        CurrentOffset?: number;
        CurrentPage?: number;
        MaxConcurrency?: number;
        ObjectName: string;
        RateLimitAcquire?: () => Promise<void>;
        RateLimitReport?: (throttledErr?: unknown) => void;
        RequestedSourceFields?: string[];
        WatermarkValue: string;
    }
    Index

    Properties

    AfterKeyValue?: string

    KEYSET / seek resume position (plan.md §7): the last-seen value of the connector's StableOrderingKey. The connector fetches WHERE <key> > AfterKeyValue ORDER BY <key> so a mid-stream insert/delete cannot corrupt the scan position. Engine passes it on subsequent calls (and on restart-recovery). undefined/null on the first page.

    BatchSize: number

    Maximum number of records to fetch in a single batch

    CompanyIntegration: MJCompanyIntegrationEntity

    The company integration entity providing connection details

    ContextUser: UserInfo

    User context for authorization

    CurrentCursor?: string

    Current cursor for cursor-based pagination. Passed by engine on subsequent calls.

    CurrentOffset?: number

    Current offset for offset-based pagination. Passed by engine on subsequent calls.

    CurrentPage?: number

    Current page number for page-based pagination (1-based). Passed by engine on subsequent calls.

    MaxConcurrency?: number
    ObjectName: string

    External object name to fetch from

    RateLimitAcquire?: () => Promise<void>

    Adaptive rate-limit hooks (plan.md §7), supplied by the engine so a connector's INNER request loop (e.g. a second-layer/parent-iterated object that fires one request per parent) is governed by the SAME per-credential AIMD token bucket that paces the outer object level — instead of a fixed self-throttle that defeats concurrency and ignores 429 back-off. Optional + back-compat: a connector that ignores them behaves exactly as before; the engine omits them when unavailable.

    • RateLimitAcquire() — await one token from the adaptive bucket before each inner request.
    • RateLimitReport(err?) — feed the outcome back so the rate auto-tunes (clean → ramp up, 429 → back off).
    • MaxConcurrency — the engine's resolved in-flight cap for inner requests (>=1).
    RateLimitReport?: (throttledErr?: unknown) => void
    RequestedSourceFields?: string[]

    Optional list of source field names to request from the external API. When provided, the connector should limit the returned fields to this set.

    WatermarkValue: string

    Current watermark value for incremental fetch, or null for full fetch