/*
* Copyright (C) 2026 Fluxer Contributors
*
* This file is part of Fluxer.
*
* Fluxer is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Fluxer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Fluxer. If not, see .
*/
import type {ChannelID, MessageID, UserID} from '~/BrandedTypes';
import type {
BetaCodeRow,
GiftCodeRow,
PaymentBySubscriptionRow,
PaymentRow,
PushSubscriptionRow,
RecentMentionRow,
} from '~/database/CassandraTypes';
import type {BetaCode, GiftCode, Payment, PushSubscription, RecentMention, SavedMessage, VisionarySlot} from '~/Models';
export interface IUserContentRepository {
getRecentMention(userId: UserID, messageId: MessageID): Promise;
listRecentMentions(
userId: UserID,
includeEveryone: boolean,
includeRole: boolean,
includeGuilds: boolean,
limit: number,
before?: MessageID,
): Promise>;
createRecentMention(mention: RecentMentionRow): Promise;
createRecentMentions(mentions: Array): Promise;
deleteRecentMention(mention: RecentMention): Promise;
deleteAllRecentMentions(userId: UserID): Promise;
listSavedMessages(userId: UserID, limit?: number, before?: MessageID): Promise>;
createSavedMessage(userId: UserID, channelId: ChannelID, messageId: MessageID): Promise;
deleteSavedMessage(userId: UserID, messageId: MessageID): Promise;
deleteAllSavedMessages(userId: UserID): Promise;
listBetaCodes(creatorId: UserID): Promise>;
getBetaCode(code: string): Promise;
upsertBetaCode(betaCode: BetaCodeRow): Promise;
updateBetaCodeRedeemed(code: string, redeemerId: UserID, redeemedAt: Date): Promise;
deleteBetaCode(code: string, creatorId: UserID): Promise;
deleteAllBetaCodes(userId: UserID): Promise;
createGiftCode(data: GiftCodeRow): Promise;
findGiftCode(code: string): Promise;
findGiftCodeByPaymentIntent(paymentIntentId: string): Promise;
findGiftCodesByCreator(userId: UserID): Promise>;
redeemGiftCode(code: string, userId: UserID): Promise<{applied: boolean}>;
updateGiftCode(code: string, data: Partial): Promise;
linkGiftCodeToCheckoutSession(code: string, checkoutSessionId: string): Promise;
listPushSubscriptions(userId: UserID): Promise>;
createPushSubscription(data: PushSubscriptionRow): Promise;
deletePushSubscription(userId: UserID, subscriptionId: string): Promise;
getBulkPushSubscriptions(userIds: Array): Promise