2026-06-17 20:26:24 -05:00
|
|
|
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()
|
|
|
|
|
}
|
2026-06-17 01:25:51 -05:00
|
|
|
|
|
|
|
|
export { revenueCatWebhook } from './billing/revenueCatWebhook'
|
|
|
|
|
export { syncEntitlement } from './billing/syncEntitlement'
|
2026-06-27 16:35:41 -05:00
|
|
|
export { onEntitlementChanged } from './billing/onEntitlementChanged'
|
2026-06-17 01:30:04 -05:00
|
|
|
export {
|
|
|
|
|
sendDailyQuestionReminder,
|
|
|
|
|
sendPartnerAnsweredNotification,
|
|
|
|
|
} from './notifications/reminders'
|
2026-06-19 23:47:01 -05:00
|
|
|
export { sendGentleReminderCallable } from './notifications/sendGentleReminderCallable'
|
2026-06-30 03:54:01 -05:00
|
|
|
export { sendThinkingOfYouCallable } from './notifications/sendThinkingOfYouCallable'
|
2026-06-19 02:23:52 -05:00
|
|
|
export {
|
|
|
|
|
sendChallengeDayReminders,
|
|
|
|
|
unlockDueMemoryCapsules,
|
|
|
|
|
} from './notifications/gameRetention'
|
2026-06-22 08:34:15 -05:00
|
|
|
export { sendDailyQuestionProactiveReminder } from './notifications/dailyQuestionReminder'
|
2026-06-30 00:38:06 -05:00
|
|
|
export { sendStreakReminder } from './notifications/streakReminder'
|
2026-06-22 08:53:23 -05:00
|
|
|
export { sendReengagementReminder } from './notifications/reengagement'
|
2026-06-17 19:37:19 -05:00
|
|
|
export { checkDeviceIntegrity } from './security/checkDeviceIntegrity'
|
2026-06-23 22:14:36 -05:00
|
|
|
export { notifyOnDateMatch } from './dates/createDateMatch'
|
2026-06-30 18:14:48 -05:00
|
|
|
export { onDateReflectionWritten } from './dates/onDateReflectionWritten'
|
|
|
|
|
export { onDateHistoryCreated } from './dates/onDateHistoryCreated'
|
2026-06-30 20:43:22 -05:00
|
|
|
export { onRestoreRequested, onRestoreFulfilled } from './backup/onRestoreRequested'
|
2026-06-18 00:18:05 -05:00
|
|
|
export {
|
|
|
|
|
assignDailyQuestion,
|
|
|
|
|
assignDailyQuestionCallable,
|
|
|
|
|
} from './questions/assignDailyQuestion'
|
|
|
|
|
export { onAnswerWritten } from './questions/onAnswerWritten'
|
2026-06-26 12:40:36 -05:00
|
|
|
export { onAnswerRevealed } from './questions/onAnswerRevealed'
|
2026-06-20 18:25:05 -05:00
|
|
|
export { onMessageWritten } from './questions/onMessageWritten'
|
2026-06-18 00:25:52 -05:00
|
|
|
export { onCoupleLeave } from './couples/onCoupleLeave'
|
2026-06-19 20:04:18 -05:00
|
|
|
export { leaveCoupleCallable } from './couples/leaveCoupleCallable'
|
2026-06-19 21:46:12 -05:00
|
|
|
export { acceptInviteCallable } from './couples/acceptInviteCallable'
|
2026-06-20 23:28:20 -05:00
|
|
|
export { createInviteCallable } from './couples/createInviteCallable'
|
2026-06-20 23:59:24 -05:00
|
|
|
export { submitOutcomeCallable } from './couples/submitOutcomeCallable'
|
|
|
|
|
export { scheduledOutcomesReminder } from './couples/scheduledOutcomesReminder'
|
2026-06-19 20:04:18 -05:00
|
|
|
export { onUserDelete } from './users/onUserDelete'
|
2026-06-27 13:31:09 -05:00
|
|
|
export { onGameSessionUpdate, onGamePartFinished } from './games/onGameSessionUpdate'
|
2026-06-17 01:25:51 -05:00
|
|
|
|
2026-06-28 17:19:06 -05:00
|
|
|
export { wrapReleaseKeyCallable } from './releaseKey/wrapReleaseKeyCallable'
|
|
|
|
|
|
2026-06-23 22:14:36 -05:00
|
|
|
// 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.
|