diff --git a/types/index.ts b/types/index.ts index 55b4f4c..e98fbb3 100644 --- a/types/index.ts +++ b/types/index.ts @@ -34,6 +34,11 @@ export const ScalarTypes = makeEnumLike([ // schema field as an IP address so it can be surfaced as an identifier in // moderation flows (e.g., via schema-field role metadata). 'IP_ADDRESS', + // Stored as a string at runtime. The dedicated scalar lets Coop tag a + // schema field as an email address so integrations (e.g., NCMEC) can + // pull it via schema-field role metadata. Format validation happens at + // the field-value level, not here. + 'EMAIL_ADDRESS', // Polymorphic media: holds a URL plus the resolved kind (AUDIO/IMAGE/VIDEO), // detected from the URL extension at ingestion time. Lets an adopter declare // a single field (or container of fields) that mixes media kinds without @@ -65,6 +70,7 @@ type ScalarTypeRuntimeTypeMapping = Satisfies< [ScalarTypes.RELATED_ITEM]: RelatedItem; [ScalarTypes.POLICY_ID]: string; [ScalarTypes.IP_ADDRESS]: string; + [ScalarTypes.EMAIL_ADDRESS]: string; [ScalarTypes.MEDIA]: { url: string; // The resolved kind, derived from the URL extension. `null` when the diff --git a/types/package-lock.json b/types/package-lock.json index c894037..457f166 100644 --- a/types/package-lock.json +++ b/types/package-lock.json @@ -1,12 +1,12 @@ { "name": "@roostorg/coop-types", - "version": "2.3.0", + "version": "2.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@roostorg/coop-types", - "version": "2.3.0", + "version": "2.4.0", "license": "ISC", "dependencies": { "date-fns": "^2.29.3", diff --git a/types/package.json b/types/package.json index 80aedce..946bfc1 100644 --- a/types/package.json +++ b/types/package.json @@ -1,7 +1,7 @@ { "name": "@roostorg/coop-types", "type": "module", - "version": "2.3.0", + "version": "2.4.0", "description": "Shared TypeScript types for Coop: schema primitives, signal data maps, and integration contracts.", "module": "transpiled/index.js", "typings": "./transpiled/index.d.ts",