···22222323export type Action = WebhookAction | RecordAction;
24242525+export type FetchStep = {
2626+ name: string;
2727+ uri: string; // AT URI template
2828+};
2929+2530// Local index of app.rglw.subscription records living on user PDS.
2631// Source of truth is the PDS; this is a cache for fast Jetstream matching.
2732export const subscriptions = sqliteTable("subscriptions", {
···3035 rkey: text("rkey").notNull(),
3136 lexicon: text("lexicon").notNull(), // NSID being watched
3237 actions: text("actions", { mode: "json" }).notNull().$type<Action[]>().default([]),
3838+ fetches: text("fetches", { mode: "json" }).notNull().$type<FetchStep[]>().default([]),
3339 conditions: text("conditions", { mode: "json" })
3440 .notNull()
3541 .$type<Array<{ field: string; operator: string; value: string }>>()