import { StaticResource, StorageType } from '@allianz/taly-core';
import { Observable } from 'rxjs';
export interface StoreQuery {
type: StorageType.PfeStoreQuery;
query: string;
}
export type BuildingBlockResourceMap = Record<string, StaticResource | StoreQuery>;
export type StaticResourceList = Record<string, StaticResource>;
export function isStoreQuery(query: StaticResource): query is StoreQuery {
return query !== null && (query as StoreQuery).type === StorageType.PfeStoreQuery;
}
/**
* Abstractions to be decouple PFE while keeping the query aspect.
* This will help to move the query handling into the core soon.
*/
export type ObservableFromQueryFunction = (query: string) => Observable<unknown>;
export type ExpressionFromQueryFunction = (query: string) => unknown;