import { mongodb } from '@unchainedshop/mongodb'; import type { PaymentCredentials as PaymentCredentialsType } from '../db/PaymentCredentialsCollection.ts'; export declare const configurePaymentCredentialsModule: (PaymentCredentials: mongodb.Collection) => { markPreferred: ({ userId, paymentCredentialsId, }: { userId: string; paymentCredentialsId: string; }) => Promise | null>; count(query: mongodb.Filter): Promise; credentialsExists: ({ paymentCredentialsId, }: { paymentCredentialsId: string; }) => Promise; findPaymentCredential: ({ paymentCredentialsId, userId, paymentProviderId, isPreferred, }: { paymentCredentialsId?: string; userId?: string; paymentProviderId?: string; isPreferred?: boolean; }, options?: mongodb.FindOptions) => Promise; findPaymentCredentials: (query: mongodb.Filter, options?: mongodb.FindOptions) => Promise; upsertCredentials: ({ userId, paymentProviderId, _id, token, ...meta }: Partial & { userId: PaymentCredentialsType["userId"]; paymentProviderId: PaymentCredentialsType["paymentProviderId"]; _id?: PaymentCredentialsType["_id"]; token?: PaymentCredentialsType["token"]; } & Record) => Promise; removeCredentials: (paymentCredentialsId: string) => Promise | null>; deleteUserPaymentCredentials: (userId: string) => Promise; }; export type PaymentCredentialsModule = ReturnType;