@becomes/cms-cloud-client
Version:
SDK for accessing BCMS Cloud API
13 lines (12 loc) • 913 B
TypeScript
import type { FSDBRepository } from '@becomes/purple-cheetah-mod-fsdb/types';
import type { MongoDBRepository } from '@becomes/purple-cheetah-mod-mongodb/types';
import type { Module } from '@becomes/purple-cheetah/types';
import { PaddleTransaction, PaddleTransactionType } from '../models';
export interface PaddleTransactionRepoMethods {
findAllByType(type: PaddleTransactionType): Promise<PaddleTransaction[]>;
findAllByCheckoutId(checkoutId: string): Promise<PaddleTransaction[]>;
findByCheckoutIdAndType(checkoutId: string, type: PaddleTransactionType): Promise<PaddleTransaction | null>;
findByAlertId(alertId: string): Promise<PaddleTransaction | null>;
}
export type PaddleTransactionRepo = FSDBRepository<PaddleTransaction, PaddleTransactionRepoMethods> | MongoDBRepository<PaddleTransaction, PaddleTransactionRepoMethods>;
export declare function createPaddleTransactionRepo(): Module;