@serafin/pipeline
Version:
CRUD data access library with a functional approach
18 lines (17 loc) • 1.24 kB
TypeScript
import { IdentityInterface } from "../IdentityInterface";
import { ResultsInterface } from "../ResultsInterface";
import { PipelineAbstract } from "../PipelineAbstract";
import { Relation } from "../Relation";
import { RelationType } from "../RelationType";
/**
* Forked version of a pipeline.
* The provided base pipeline will be called internally.
*/
export declare abstract class ForkedPipeline<M extends IdentityInterface = IdentityInterface, CV = any, CO = any, RQ = any, PQ = any, PV = any, DQ = any, CM = any, RM = any, PM = any, DM = any, CTX = any, R extends Record<string, Relation<IdentityInterface, string, IdentityInterface, any, any, RelationType>> = {}> extends PipelineAbstract<M, CV, CO, RQ, PQ, PV, DQ, CM, RM, PM, DM, CTX, R> {
private basePipeline;
constructor(basePipeline: PipelineAbstract<M, CV, CO, RQ, PQ, PV, DQ, CM, RM, PM, DM, CTX, R>, title: string, description: string, validationEnabled?: boolean);
protected _create(resources: CV[], options: CO): Promise<ResultsInterface<M, CM>>;
protected _read(query: RQ): Promise<ResultsInterface<M, RM>>;
protected _patch(query: PQ, values: PV): Promise<ResultsInterface<M, PM>>;
protected _delete(query: DQ): Promise<ResultsInterface<M, DM>>;
}