import type { WebhookSubscriptionEntry } from '@admin/actions/webhooks/types' import { webhooksCacheTags } from '@admin/actions/webhooks/types' import db from '@admin/db' import { webhookSubscriptions } from '@admin/db/schema' import { cacheLife, cacheTag } from 'next/cache' export async function readWebhookSubscriptions(): Promise { 'use cache' cacheLife('max') cacheTag(webhooksCacheTags.subscriptions) return db .select({ webhookId: webhookSubscriptions.webhookId, event: webhookSubscriptions.event }) .from(webhookSubscriptions) }