Interface for providers that execute views. Supports parameterized view execution with filtering and pagination. Views are the primary way to query entity data in MemberJunction.

interface IRunViewProvider {
    Config(configData): Promise<boolean>;
    RunView<T>(params, contextUser?): Promise<RunViewResult<T>>;
    RunViews<T>(params, contextUser?): Promise<RunViewResult<T>[]>;
    RunViewsWithCacheCheck?<T>(params, contextUser?): Promise<RunViewsWithCacheCheckResponse<T>>;
}

Implemented by

Methods

  • Executes multiple RunView requests with smart cache checking. For each view with cacheStatus provided, the server checks if the cached data is still current before executing the full query. This reduces unnecessary data transfer when cached data is valid.

    Type Parameters

    • T = unknown

    Parameters

    Returns Promise<RunViewsWithCacheCheckResponse<T>>

    Response containing status and fresh data only for stale caches