53 lines
2.7 KiB
TypeScript
53 lines
2.7 KiB
TypeScript
import * as admin from 'firebase-admin'
|
|
|
|
// Initialize the Admin SDK once for every function in this codebase.
|
|
// Handlers call admin.firestore()/messaging() lazily at invocation time, so a
|
|
// single idempotent init here is sufficient and avoids "already exists" errors.
|
|
if (admin.apps.length === 0) {
|
|
admin.initializeApp()
|
|
}
|
|
|
|
export { revenueCatWebhook } from './billing/revenueCatWebhook'
|
|
export { syncEntitlement } from './billing/syncEntitlement'
|
|
export { onEntitlementChanged } from './billing/onEntitlementChanged'
|
|
export {
|
|
sendDailyQuestionReminder,
|
|
sendPartnerAnsweredNotification,
|
|
} from './notifications/reminders'
|
|
export { sendGentleReminderCallable } from './notifications/sendGentleReminderCallable'
|
|
export { sendThinkingOfYouCallable } from './notifications/sendThinkingOfYouCallable'
|
|
export {
|
|
sendChallengeDayReminders,
|
|
unlockDueMemoryCapsules,
|
|
} from './notifications/gameRetention'
|
|
export { sendDailyQuestionProactiveReminder } from './notifications/dailyQuestionReminder'
|
|
export { sendStreakReminder } from './notifications/streakReminder'
|
|
export { sendReengagementReminder } from './notifications/reengagement'
|
|
export { checkDeviceIntegrity } from './security/checkDeviceIntegrity'
|
|
export { notifyOnDateMatch } from './dates/createDateMatch'
|
|
export { onDateReflectionWritten } from './dates/onDateReflectionWritten'
|
|
export { onDateHistoryCreated } from './dates/onDateHistoryCreated'
|
|
export { onRestoreRequested, onRestoreFulfilled } from './backup/onRestoreRequested'
|
|
export {
|
|
assignDailyQuestion,
|
|
assignDailyQuestionCallable,
|
|
} from './questions/assignDailyQuestion'
|
|
export { onAnswerWritten } from './questions/onAnswerWritten'
|
|
export { onAnswerRevealed } from './questions/onAnswerRevealed'
|
|
export { onMessageWritten } from './questions/onMessageWritten'
|
|
export { onCoupleLeave } from './couples/onCoupleLeave'
|
|
export { leaveCoupleCallable } from './couples/leaveCoupleCallable'
|
|
export { acceptInviteCallable } from './couples/acceptInviteCallable'
|
|
export { createInviteCallable } from './couples/createInviteCallable'
|
|
export { submitOutcomeCallable } from './couples/submitOutcomeCallable'
|
|
export { scheduledOutcomesReminder } from './couples/scheduledOutcomesReminder'
|
|
export { onUserDelete } from './users/onUserDelete'
|
|
export { onGameSessionUpdate, onGamePartFinished } from './games/onGameSessionUpdate'
|
|
|
|
export { wrapReleaseKeyCallable } from './releaseKey/wrapReleaseKeyCallable'
|
|
|
|
// NOTE (security review Batch 2): the unauthenticated public `health` HTTP endpoint
|
|
// was removed to shrink attack surface. Deployment can be verified via
|
|
// `firebase functions:list`. If an uptime probe is ever needed, re-add it behind
|
|
// auth / a shared secret rather than as an open endpoint.
|