Common types and utilities for theWall addon projects.
-
Add domain to
SpecialDomainstypeexport type SpecialDomains = | "linkedin.com" | "facebook.com" // ... existing domains ... | "newplatform.com"; // ← Add here
-
Create the endpoint rule constant
export const API_ENDPOINT_RULE_NEWPLATFORM = { domain: "newplatform.com", regex: "(?:newplatform.com)/([^/?]+)", } as const satisfies APIEndpointRule;
-
Add to
DBFileNamesenumexport enum DBFileNames { // ... existing entries ... FLAGGED_NEWPLATFORM = "FLAGGED_NEWPLATFORM", // ← Add here }
-
Add field to
FinalDBFileSchemaexport const FinalDBFileSchema = z.object({ // ... existing fields ... np: z.string().optional(), // ← Add here (use short abbreviation) });
-
⚠️ ADD TO CONFIG - Don't forget this!export const CONFIG: APIEndpointConfig = { rules: [ // ... existing rules ... API_ENDPOINT_RULE_NEWPLATFORM, // ← Add here ], };
- Domain added to
SpecialDomainstype -
API_ENDPOINT_RULE_*constant created - Entry added to
DBFileNamesenum (FLAGGED_*) - Field added to
FinalDBFileSchema(short abbreviation) - Rule added to
CONFIG.rulesarray⚠️
This package is used by theWallAddon to:
- Define types and schemas for domain detection
- Provide endpoint rules for special domains (LinkedIn, Facebook, Twitter, Instagram, GitHub)
- Extract and validate domain information