Type Alias IBaseProjectDataProvider<TProjectDataTypes>

IBaseProjectDataProvider: IProjectDataProvider<
    TProjectDataTypes & MandatoryProjectDataTypes,
> & WithProjectDataProviderEngineSettingMethods<TProjectDataTypes> & WithProjectDataProviderEngineExtensionDataMethods<
    TProjectDataTypes,
> & {
    subscribeSetting: <ProjectSettingName extends ProjectSettingNames>(
        key: ProjectSettingName,
        callback: (value: ProjectSettingTypes[ProjectSettingName]) => void,
        options: DataProviderSubscriberOptions,
    ) => Promise<UnsubscriberAsync>;
}

An object on the papi for interacting with that project data. Created by the papi and layers over an IBaseProjectDataProviderEngine provided by an extension. Sometimes returned from getting a project data provider with papi.projectDataProviders.get (depending on if the PDP supports the platform.base projectInterface).

Project Data Providers are a specialized version of IDataProvider that work with projects by exposing methods according to a set of projectInterfaces. For each project available, a Project Data Provider Factory that supports that project with some set of projectInterfaces creates a new instance of a PDP with the supported projectInterfaces.

Every Base PDP must fulfill the requirements of this interface in order to support the methods the PAPI requires for interacting with project data.

See more information, including the difference between Base and Layering PDPs, at ProjectDataProviderInterfaces.

Type Parameters

Type declaration

  • subscribeSetting: <ProjectSettingName extends ProjectSettingNames>(
        key: ProjectSettingName,
        callback: (value: ProjectSettingTypes[ProjectSettingName]) => void,
        options: DataProviderSubscriberOptions,
    ) => Promise<UnsubscriberAsync>

    Subscribe to receive updates to the specified project setting.

    Note: By default, this subscribeSetting function automatically retrieves the current project setting value and runs the provided callback as soon as possible. That way, if you want to keep your data up-to-date, you do not also have to run getSetting. You can turn this functionality off in the options parameter.