rittenhop-dev/versions/5.94.2/node_modules/@tryghost/donations/build/DonationBookshelfRepository.d.ts
2024-09-23 19:40:12 -04:00

31 lines
1.1 KiB
TypeScript

import { DonationPaymentEvent } from './DonationPaymentEvent';
import { DonationRepository } from './DonationRepository';
type BookshelfModelInstance = unknown;
type BookshelfOptions = unknown;
type BookshelfModel<T extends BookshelfModelInstance> = {
add(data: Partial<T>, unfilteredOptions?: BookshelfOptions): Promise<T>;
};
type DonationEventModelInstance = BookshelfModelInstance & {
name: string | null;
email: string;
member_id: string | null;
amount: number;
currency: string;
donation_message: string | null;
attribution_id: string | null;
attribution_url: string | null;
attribution_type: string | null;
referrer_source: string | null;
referrer_medium: string | null;
referrer_url: string | null;
};
type DonationPaymentEventBookshelfModel = BookshelfModel<DonationEventModelInstance>;
export declare class DonationBookshelfRepository implements DonationRepository {
#private;
constructor({ DonationPaymentEventModel }: {
DonationPaymentEventModel: DonationPaymentEventBookshelfModel;
});
save(event: DonationPaymentEvent): Promise<void>;
}
export {};