feat : add stygian guide

This commit is contained in:
2026-09-29 21:23:18 +07:00 Unverified
parent 1654d3df3a
commit 69a4d34b97
27 changed files with 11196 additions and 0 deletions
+9
View File
@@ -42,6 +42,15 @@ describe("invalidation event envelopes", () => {
).toBeNull();
});
it("accepts public Stygian invalidations only on the Stygian topic", () => {
expect(toInvalidationEvent({
topic: "stygian",
aggregateId: "5269001",
eventType: "stygian.updated",
payload: { id: "5269001", version: 4 },
})).toEqual({ type: "stygian.updated", id: "5269001", version: 4 });
});
it("keeps valid scopes only on authenticated admin events", () => {
const id = "4afeea7b-6f24-43f3-b747-2db98335e01e";
expect(toInvalidationEvent({
+3
View File
@@ -1,6 +1,7 @@
export const INVALIDATION_TYPES = [
"directory.updated",
"page.updated",
"stygian.updated",
"admin.updated",
] as const;
@@ -59,6 +60,8 @@ export function expectedTopic(event: InvalidationEvent): string {
return "directory";
case "page.updated":
return `page:${event.id}`;
case "stygian.updated":
return "stygian";
case "admin.updated":
return "admin";
}