35 lines
2.2 KiB
TypeScript
35 lines
2.2 KiB
TypeScript
import { Checker, Trigger, StorageSchema, EntityDict, Watcher, Routine, Timer, Aspect } from "oak-domain/lib/types";
|
|
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/base-app-domain';
|
|
import { AsyncContext } from 'oak-domain/lib/store/AsyncRowStore';
|
|
import { Connector } from 'oak-domain/lib/types/Connector';
|
|
import { SyncContext } from 'oak-domain/lib/store/SyncRowStore';
|
|
import { DebugStore } from "../debugStore/DebugStore";
|
|
import { CommonConfiguration } from "oak-domain/lib/types/Configuration";
|
|
import { Importation, Exportation } from 'oak-domain/lib/types/Port';
|
|
export default class DebugConnector<ED extends EntityDict & BaseEntityDict, Cxt extends AsyncContext<ED>, FrontCxt extends SyncContext<ED>> implements Connector<ED, FrontCxt> {
|
|
debugStore: DebugStore<ED, Cxt>;
|
|
contextBuilder: (store: DebugStore<ED, Cxt>) => Cxt;
|
|
aspectDict: Record<string, Aspect<ED, Cxt>>;
|
|
constructor(storageSchema: StorageSchema<ED>, contextBuilder: (store: DebugStore<ED, Cxt>) => Cxt, aspectDict: Record<string, Aspect<ED, Cxt>>, triggers: Array<Trigger<ED, keyof ED, Cxt>>, checkers: Array<Checker<ED, keyof ED, Cxt>>, watchers: Array<Watcher<ED, keyof ED, Cxt>>, timers: Array<Timer<ED, keyof ED, Cxt>>, startRoutines: Array<Routine<ED, keyof ED, Cxt>>, initialData: {
|
|
[T in keyof ED]?: Array<ED[T]['CreateSingle']['data']>;
|
|
}, common: CommonConfiguration<ED>, importations?: Array<Importation<ED, keyof ED, '', Cxt>>, exportations?: Array<Exportation<ED, keyof ED, '', Cxt>>);
|
|
getRouter(): string;
|
|
callAspect(name: string, params: any, context?: FrontCxt | undefined): Promise<{
|
|
result: any;
|
|
opRecords: import("oak-domain/lib/types").OpRecord<ED>[];
|
|
message: string | undefined;
|
|
}>;
|
|
parseRequest(): any;
|
|
serializeResult(): any;
|
|
serializeException(): any;
|
|
getSocketPath(): any;
|
|
getSocketPointRouter(): any;
|
|
getSocketPoint(): any;
|
|
getBridgeRouter(): string;
|
|
makeBridgeUrl(url: string): string;
|
|
getEndpointRouter(): string;
|
|
parseBridgeRequestQuery(urlParams: string): any;
|
|
getFullData(keys?: (keyof ED)[]): Promise<{ [T in keyof ED]?: ED[T]["OpSchema"][] | undefined; }>;
|
|
getCorsHeader(): string[];
|
|
}
|