-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIDataSource.d.ts
More file actions
21 lines (20 loc) · 898 Bytes
/
IDataSource.d.ts
File metadata and controls
21 lines (20 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { IDataAdapterRefConfig } from "./IDataAdapterConfig";
export interface IDataSource {
/**
* Simple adapter dependencies when we depend on data from other plugins
*
* Only simple adapters are supported, meaning they must
* - not depend on a data source being already initialized
* - have a root contextType ({}),
* - have no nested dependencies
*/
dependencies?: IDataAdapterRefConfig[];
/**
* Initializes the data source, performing any async operations needed to make the data source functional
*
* [cms v1.0.0-beta.12+]: If a dependencies array was specified, data loaded from each depending adapter is also passed to this method
*
* @param depData A map of adapter URIs to data returned by respective adapter. Adapter alias is also supported as key
*/
init(depData: Map<string, unknown>): Promise<void>;
}