import type { Logger } from '@sap-ux/logger'; import type { EntityKey } from '../entities'; import type { BackendSerializableKeys, ServiceOptions } from '../types'; import type { BackendSystem } from '../entities/backend-system'; /** * The backend system keys and their values to filter backend systems by. * Each filter value can be either a single value or an array of values. */ export type BackendSystemFilter = Partial<{ [K in BackendSerializableKeys]: BackendSystem[K] | BackendSystem[K][]; }>; /** * Specifies options for retrieving backend systems from the data provider. */ export interface BackendProviderRetrievalOptions { includeSensitiveData?: boolean; backendSystemFilter?: BackendSystemFilter; } /** * Options for the getAll method of a data provider. */ export type ProviderGetAllOptions = T extends BackendSystem ? BackendProviderRetrievalOptions : null; /** * Data provider for an entity. It is responsible for reading * and writing the entity. This is meant to abstract the medium the entity is written to/read from - the data * could be written to the filesystem/OS secure store/network share, the client does not need to know this. */ export interface DataProvider { read(key: K): Promise; write(entity: E): Promise; delete(entity: E): Promise; /** * Returns the data as an array related to the entity. * * @param options - Options for retrieving data. */ getAll(options?: ProviderGetAllOptions): Promise; } export interface DataProviderConstructor { new (logger: Logger, options?: ServiceOptions): DataProvider; } //# sourceMappingURL=index.d.ts.map