diff --git a/src/backend/services/events/registry.test.ts b/src/backend/services/events/registry.test.ts index 26e787006..b6c59bd3b 100644 --- a/src/backend/services/events/registry.test.ts +++ b/src/backend/services/events/registry.test.ts @@ -28,7 +28,6 @@ import { lookupFsSubject, lookupKvSubject, lookupPublicSubject, - pushProjection, type FsDeliveryContext, type FsPublicSubject, type KvDeliveryContext, @@ -181,20 +180,6 @@ describe('PUBLIC_SUBJECTS', () => { it('requires list to subscribe — see alone is not enough', () => { for (const subject of fsSubjects()) expect(subject.mode).toBe('list'); }); - - it('produces no push payload while notify is null', () => { - for (const subject of fsSubjects()) { - expect(subject.notify).toBeNull(); - expect( - pushProjection(subject, subject.project(delivery)), - ).toBeNull(); - } - }); - - it('defaults every entry to broadcast', () => { - for (const subject of PUBLIC_SUBJECTS) - expect(subject.defaultDelivery).toBe('broadcast'); - }); }); describe('the kv subject', () => { @@ -256,11 +241,6 @@ describe('the kv subject', () => { 'cart:items:1', ); }); - - it('is not pushable and broadcasts by default', () => { - expect(subject().notify).toBeNull(); - expect(subject().defaultDelivery).toBe('broadcast'); - }); }); describe('lookupPublicSubject', () => { diff --git a/src/backend/services/events/registry.ts b/src/backend/services/events/registry.ts index 5defd663e..cd2553e5f 100644 --- a/src/backend/services/events/registry.ts +++ b/src/backend/services/events/registry.ts @@ -197,21 +197,6 @@ export type FsDeliveryContext = FsEventContext & DeliveryFields; export type KvDeliveryContext = KvEventContext & DeliveryFields; export type NotifDeliveryContext = NotifEventContext & DeliveryFields; -export interface PushMessage { - title: string; - body?: string; - icon?: string; - url?: string; -} - -/** - * Human-facing projection. Its absence is what makes a subject unpushable — - * which subjects have one is a privacy decision, not a formatting one. - */ -export type NotifyProjection
= ( - event: P, -) => PushMessage | null; - /** How one family's filters are compiled and what they are tested against. */ export interface MatchSpec { /** Delimiter a single `*` will not cross in this family's filters. */ @@ -239,8 +224,6 @@ export interface SubjectSpec< /** What a match filter globs against. */ matchOn: (event: C) => string; project: (delivery: C & DeliveryFields) => P; - notify: NotifyProjection
| null;
- defaultDelivery: DeliveryClass;
}
export interface FsPublicSubject extends SubjectSpec<
@@ -291,9 +274,6 @@ const fsTokens = (event: FsEventContext): string[] => [
const fsMatchOn = (event: FsEventContext): string => event.entry.path;
-/** No human-facing projection, so nothing is push-eligible yet. */
-const NOT_PUSHABLE: NotifyProjection (
- subject: { notify: NotifyProjection | null },
- event: P,
-): PushMessage | null => subject.notify?.(event) ?? null;