@chevre/domain
Version:
Chevre Domain Library for Node.js
57 lines (56 loc) • 2.37 kB
TypeScript
import { Connection, FilterQuery, QueryOptions } from 'mongoose';
import * as factory from '../factory';
export type ISavingPotentialAction = Pick<factory.potentialAction.IPotentialAction, 'target' | 'project' | 'typeOf' | 'identifier'> & {
id?: never;
};
interface IUnset {
$unset?: {
[key: string]: 1;
};
}
type IKeyOfProjection = keyof factory.potentialAction.IPotentialAction;
/**
* 潜在アクションリポジトリ
*/
export declare class PotentialActionRepo {
private readonly potentialActionModel;
constructor(connection: Connection);
static CREATE_FILTER_QUERY(params: factory.potentialAction.ISearchConditions): FilterQuery<factory.potentialAction.IPotentialInformAction>[];
save(params: {
id?: string;
attributes: ISavingPotentialAction & IUnset;
}): Promise<{
id: string;
}>;
projectFields(conditions: factory.potentialAction.ISearchConditions, inclusion: IKeyOfProjection[]): Promise<factory.potentialAction.IPotentialAction[]>;
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, {
identifier: string;
project: Pick<factory.project.IProject, "id" | "typeOf">;
typeOf: factory.actionType.InformAction;
recipient: factory.potentialAction.IInformRecipient;
target: factory.entryPoint.IEntryPoint;
}> & {
identifier: string;
project: Pick<factory.project.IProject, "id" | "typeOf">;
typeOf: factory.actionType.InformAction;
recipient: factory.potentialAction.IInformRecipient;
target: factory.entryPoint.IEntryPoint;
} & {
_id: import("mongoose").Types.ObjectId;
}, QueryOptions<import("mongoose").Document<unknown, {}, {
identifier: string;
project: Pick<factory.project.IProject, "id" | "typeOf">;
typeOf: factory.actionType.InformAction;
recipient: factory.potentialAction.IInformRecipient;
target: factory.entryPoint.IEntryPoint;
}> & {
identifier: string;
project: Pick<factory.project.IProject, "id" | "typeOf">;
typeOf: factory.actionType.InformAction;
recipient: factory.potentialAction.IInformRecipient;
target: factory.entryPoint.IEntryPoint;
} & {
_id: import("mongoose").Types.ObjectId;
}>>;
}
export {};