import type { Connection, FilterQuery } from 'mongoose'; import { factory } from '../factory'; import { IModel } from './mongoose/schemas/paymentService'; type IUnsetKey = keyof Pick; type IKeyOfProjection4paymentService = keyof factory.service.paymentService.IService; /** * 決済サービス検索条件 */ type ISearchConditions4paymentService = factory.service.paymentService.ISearchConditions; /** * 決済サービスリポジトリ */ export declare class PaymentServiceRepo { private readonly paymentServiceModel; private readonly paymentServiceChannelModel; constructor(connection: Connection); static CREATE_MONGO_CONDITIONS(params: ISearchConditions4paymentService): FilterQuery[]; /** * 決済サービスを保管する */ savePaymentService(params: { /** * idを指定すれば更新 */ id?: string; $set: factory.service.paymentService.IService & { provider?: never; }; $unset: Partial>; /** * 指定プロジェクトの指定プロダクトタイプが存在しなければ作成する */ createIfNotExist?: boolean; }): Promise<{ id: string; }>; /** * 決済サービスを検索する */ projectFields(conditions: ISearchConditions4paymentService, inclusion: IKeyOfProjection4paymentService[]): Promise<(factory.service.paymentService.IService & { id: string; })[]>; deletePaymentServiceById(params: { id: string; }): Promise; findAvailableChannelCreditCard(params: { project: { id: string; }; /** * payment service ID */ id: string; }): Promise & Pick & { id: string; credentials: factory.serviceChannel.ICredentialsCreditCard; }>; findAvailableChannelMovieTicket(params: { project: { id: string; }; /** * payment service ID */ id: string; }): Promise & Pick & { id: string; credentials: factory.serviceChannel.ICredentialsMovieTicket; }>; unsetUnnecessaryFields(params: { filter: any; $unset: any; }): Promise; getModel(): IModel; } export {};