Interface ProjectDataProviderInterfaces

IProjectDataProvider types for each projectInterface supported by PAPI. Extensions can add more Project Data Providers with corresponding projectInterfaces by adding details to their .d.ts file and registering a Project Data Provider factory with the corresponding projectInterface.

There are two types of Project Data Providers (and Project Data Provider Factories that serve them):

  1. Base Project Data Provider - provides project data via some projectInterfaces for its own projects with its own unique project ids. These PDPs must support the platform.base projectInterface by implementing IBaseProjectDataProvider. More information below.
  2. Layering Project Data Provider - layers over other PDPs and provides additional projectInterfaces for projects on other PDPs. Likely does not provide its own unique project ids but rather layers over base PDPs' project ids. These PDPs do not need to support the platform.base projectInterface and should instead implement IProjectDataProvider. Instead of providing projects themselves, they likely use the ExtensionData data type exposed via the platform.base projectInterface on Base PDPs to provide additional project data on top of Base PDPs.

All Base Project Data Provider Interfaces' data types must implement IBaseProjectDataProvider (which extends MandatoryProjectDataTypes) like in the following example. Please see its documentation for information on how Project Data Providers can implement this interface.

Note: The keys of this interface are the projectInterfaces for the associated Project Data Provider Interfaces. projectInterfaces represent standardized sets of methods on a PDP.

WARNING: Each Base Project Data Provider must fulfill certain requirements for its getSetting, setSetting, resetSetting, getExtensionData, and setExtensionData methods. See IBaseProjectDataProvider and MandatoryProjectDataTypes for more information.

An extension can extend this interface to add types for the Project Data Provider Interfaces its registered factory provides by adding the following to its .d.ts file (in this example, we are adding a Base Project Data Provider interface for the MyExtensionBaseProjectInterface projectInterface and a Layering Project Data Provider interface for the MyExtensionLayeringProjectInterface projectInterface):

declare module 'papi-shared-types' {
export type MyBaseProjectDataTypes = {
MyProjectData: DataProviderDataType<string, string, string>;
};

export type MyLayeringProjectDataTypes = {
MyOtherProjectData: DataProviderDataType<number, number, number>;
};

export interface ProjectDataProviderInterfaces {
// Note that the base PDP implements `I**Base**ProjectDataProvider`
MyExtensionBaseProjectInterface: IBaseProjectDataProvider<MyProjectDataTypes>;
// Note that the layering PDP only implements `IProjectDataProvider` because the base PDP already
// provides the `platform.base` data types
MyExtensionLayeringProjectInterface: IProjectDataProvider<MyLayeringProjectDataTypes>;
}
}

Properties

Base projectInterface that all PDPs that expose their own unique project ids must implement.

There should be a PDP that provides platform.base for all available project ids.