should have the following API:
import { Eq } from 'fp-ts/lib/Eq';
import { CacheValue } from 'avenger/lib/CacheValue.ts'
import { StrategyBuilder } from 'avenger/lib/Query.ts'
type TSCompose<..> = ....
type TSproduct<...> = ....
type TSQuery<E, A, L, P> = {
type: "Query";
IOCheck: Eq<CacheValue<E, A>>;
FetchStrategy: StrategyBuilder<A, L, P>;
endpoint: EndpointInstance<...> | TSCompose<..> | TSproduct<...>,
}
type TSCommand<E, A, L, P> = {
type: "Command";
endpoint: EndpointInstance<...>,
invalidates: Record<string, TSQuery<any, any, any, any>>
}
type TSEndpoint<...> = TSQuery<...> | TSCommand<...>
declare function GetAvengerClient<K extends string>(e: Record<K, TSEndpoint>): {
commands: Record<string, (a: A, ia?: ProductA<I>) => TaskEither<L | IL, P>> ;
queries: CachedQuery<A, L, P>
}
should have the following API: