UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

41 lines (40 loc) 1.37 kB
import type { Connection, FilterQuery } from 'mongoose'; import * as factory from '../factory'; export type ISavingChannel = Pick<factory.serviceChannel.IServiceChannel, 'credentials' | 'project' | 'providesService' | 'serviceUrl' | 'typeOf'> & { id?: never; }; interface IUnset { $unset?: { [key: string]: 1; }; } type IServiceChannelWithId = factory.serviceChannel.IServiceChannel & { id: string; }; type IKeyOfProjection = keyof factory.serviceChannel.IServiceChannel; /** * 決済サービスチャネルリポジトリ */ export declare class PaymentServiceChannelRepo { private readonly paymentServiceChannelModel; constructor(connection: Connection); static CREATE_MONGO_CONDITIONS(params: factory.serviceChannel.ISearchConditions): FilterQuery<factory.serviceChannel.IServiceChannel>[]; save(params: { id?: string; attributes: ISavingChannel & IUnset; }): Promise<{ id: string; }>; projectFields(conditions: factory.serviceChannel.ISearchConditions, inclusion: IKeyOfProjection[]): Promise<IServiceChannelWithId[]>; deleteById(params: { id: string; project: { id: string; }; }): Promise<void>; unsetUnnecessaryFields(params: { filter: any; $unset: any; }): Promise<import("mongoose").UpdateWriteOpResult>; } export {};