UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

76 lines (75 loc) 3.85 kB
import { Connection, FilterQuery, QueryOptions } from 'mongoose'; import * as factory from '../factory'; export type ISavingIdentity = Pick<factory.creativeWork.certification.webApplication.ICertification, 'about' | 'project' | 'typeOf'> & { id?: never; dateCreated?: never; dateModified?: never; issuedBy: factory.creativeWork.certification.webApplication.IIssuedBy[]; }; interface IUnset { $unset?: { [key: string]: 1; }; } type IIdentityWithId = factory.creativeWork.certification.webApplication.ICertification & { id: string; }; type IKeyOfProjection = keyof factory.creativeWork.certification.webApplication.ICertification; /** * アイデンティティリポジトリ */ export declare class IdentityRepo { private readonly identityModel; constructor(connection: Connection); static CREATE_FILTER_QUERY(params: factory.creativeWork.certification.webApplication.ISearchConditions): FilterQuery<factory.creativeWork.certification.webApplication.ICertification>[]; saveIdentity(params: { id?: string; attributes: ISavingIdentity & IUnset; }): Promise<{ id: string; }>; projectIdentityFields(conditions: factory.creativeWork.certification.webApplication.ISearchConditions, inclusion: IKeyOfProjection[]): Promise<IIdentityWithId[]>; deleteIdentityById(params: { id: string; project: { id: string; }; }): Promise<void>; getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, { project: Pick<factory.project.IProject, "id" | "typeOf">; typeOf: factory.creativeWorkType.Certification; about: import("@chevre/factory/lib/creativeWork/certification/webApplication").IAbout; dateCreated?: Date | undefined; dateModified?: Date | undefined; issuedBy: import("@chevre/factory/lib/creativeWork/certification/webApplication").IIssuedBy | import("@chevre/factory/lib/creativeWork/certification/webApplication").IIssuedBy[]; }> & { project: Pick<factory.project.IProject, "id" | "typeOf">; typeOf: factory.creativeWorkType.Certification; about: import("@chevre/factory/lib/creativeWork/certification/webApplication").IAbout; dateCreated?: Date | undefined; dateModified?: Date | undefined; issuedBy: import("@chevre/factory/lib/creativeWork/certification/webApplication").IIssuedBy | import("@chevre/factory/lib/creativeWork/certification/webApplication").IIssuedBy[]; } & { _id: import("mongoose").Types.ObjectId; }, QueryOptions<import("mongoose").Document<unknown, {}, { project: Pick<factory.project.IProject, "id" | "typeOf">; typeOf: factory.creativeWorkType.Certification; about: import("@chevre/factory/lib/creativeWork/certification/webApplication").IAbout; dateCreated?: Date | undefined; dateModified?: Date | undefined; issuedBy: import("@chevre/factory/lib/creativeWork/certification/webApplication").IIssuedBy | import("@chevre/factory/lib/creativeWork/certification/webApplication").IIssuedBy[]; }> & { project: Pick<factory.project.IProject, "id" | "typeOf">; typeOf: factory.creativeWorkType.Certification; about: import("@chevre/factory/lib/creativeWork/certification/webApplication").IAbout; dateCreated?: Date | undefined; dateModified?: Date | undefined; issuedBy: import("@chevre/factory/lib/creativeWork/certification/webApplication").IIssuedBy | import("@chevre/factory/lib/creativeWork/certification/webApplication").IIssuedBy[]; } & { _id: import("mongoose").Types.ObjectId; }>>; updateIssuedBy2array(params: Pick<ISavingIdentity, 'issuedBy'> & { id: string; }): Promise<void>; } export {};