@ttt-productions/ttt-core 0.78.23 → 0.78.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/app-mode.d.ts +1 -0
- package/dist/constants/app-mode.d.ts.map +1 -1
- package/dist/constants/app-mode.js +11 -0
- package/dist/constants/app-mode.js.map +1 -1
- package/dist/constants/business-user.d.ts +1 -1
- package/dist/constants/business-user.js +1 -1
- package/dist/constants/business-user.js.map +1 -1
- package/dist/constants/release-flags.d.ts +2 -2
- package/dist/constants/release-flags.d.ts.map +1 -1
- package/dist/constants/release-flags.js +2 -2
- package/dist/constants/release-flags.js.map +1 -1
- package/dist/doc-schemas/chat-sync.d.ts.map +1 -1
- package/dist/doc-schemas/chat-sync.js +3 -2
- package/dist/doc-schemas/chat-sync.js.map +1 -1
- package/dist/doc-schemas/commissions.d.ts +14 -11
- package/dist/doc-schemas/commissions.d.ts.map +1 -1
- package/dist/doc-schemas/commissions.js +14 -4
- package/dist/doc-schemas/commissions.js.map +1 -1
- package/dist/doc-schemas/media-activation-jobs.d.ts.map +1 -1
- package/dist/doc-schemas/media-activation-jobs.js +4 -3
- package/dist/doc-schemas/media-activation-jobs.js.map +1 -1
- package/dist/doc-schemas/media-assets.d.ts +2 -2
- package/dist/doc-schemas/media-assets.d.ts.map +1 -1
- package/dist/doc-schemas/media-assets.js +5 -4
- package/dist/doc-schemas/media-assets.js.map +1 -1
- package/dist/doc-schemas/messaging.d.ts.map +1 -1
- package/dist/doc-schemas/messaging.js +3 -2
- package/dist/doc-schemas/messaging.js.map +1 -1
- package/dist/doc-schemas/ncii/allegations.js +3 -3
- package/dist/doc-schemas/ncii/allegations.js.map +1 -1
- package/dist/doc-schemas/ncii/cases.d.ts.map +1 -1
- package/dist/doc-schemas/ncii/cases.js +4 -3
- package/dist/doc-schemas/ncii/cases.js.map +1 -1
- package/dist/doc-schemas/ncii/config.d.ts.map +1 -1
- package/dist/doc-schemas/ncii/config.js +4 -3
- package/dist/doc-schemas/ncii/config.js.map +1 -1
- package/dist/doc-schemas/ncii/holds.js +3 -3
- package/dist/doc-schemas/ncii/holds.js.map +1 -1
- package/dist/doc-schemas/ncii/removal.js +3 -3
- package/dist/doc-schemas/ncii/removal.js.map +1 -1
- package/dist/doc-schemas/ncii/requests.d.ts.map +1 -1
- package/dist/doc-schemas/ncii/requests.js +4 -3
- package/dist/doc-schemas/ncii/requests.js.map +1 -1
- package/dist/doc-schemas/notification-ledger.d.ts.map +1 -1
- package/dist/doc-schemas/notification-ledger.js +3 -1
- package/dist/doc-schemas/notification-ledger.js.map +1 -1
- package/dist/doc-schemas/payments.d.ts.map +1 -1
- package/dist/doc-schemas/payments.js +2 -1
- package/dist/doc-schemas/payments.js.map +1 -1
- package/dist/doc-schemas/registry.d.ts +108 -35
- package/dist/doc-schemas/registry.d.ts.map +1 -1
- package/dist/doc-schemas/registry.js +4 -0
- package/dist/doc-schemas/registry.js.map +1 -1
- package/dist/doc-schemas/safety/age.d.ts.map +1 -1
- package/dist/doc-schemas/safety/age.js +4 -3
- package/dist/doc-schemas/safety/age.js.map +1 -1
- package/dist/doc-schemas/safety/case-aliases.d.ts.map +1 -1
- package/dist/doc-schemas/safety/case-aliases.js +5 -4
- package/dist/doc-schemas/safety/case-aliases.js.map +1 -1
- package/dist/doc-schemas/safety/case.d.ts.map +1 -1
- package/dist/doc-schemas/safety/case.js +4 -3
- package/dist/doc-schemas/safety/case.js.map +1 -1
- package/dist/doc-schemas/safety/evidence.js +3 -3
- package/dist/doc-schemas/safety/evidence.js.map +1 -1
- package/dist/doc-schemas/safety/foundation.d.ts.map +1 -1
- package/dist/doc-schemas/safety/foundation.js +5 -3
- package/dist/doc-schemas/safety/foundation.js.map +1 -1
- package/dist/doc-schemas/safety/holds.d.ts.map +1 -1
- package/dist/doc-schemas/safety/holds.js +4 -3
- package/dist/doc-schemas/safety/holds.js.map +1 -1
- package/dist/doc-schemas/safety/monitors.d.ts.map +1 -1
- package/dist/doc-schemas/safety/monitors.js +5 -3
- package/dist/doc-schemas/safety/monitors.js.map +1 -1
- package/dist/doc-schemas/safety/provenance.js +3 -3
- package/dist/doc-schemas/safety/provenance.js.map +1 -1
- package/dist/doc-schemas/safety/report.d.ts.map +1 -1
- package/dist/doc-schemas/safety/report.js +4 -3
- package/dist/doc-schemas/safety/report.js.map +1 -1
- package/dist/doc-schemas/safety/sagas.js +3 -3
- package/dist/doc-schemas/safety/sagas.js.map +1 -1
- package/dist/doc-schemas/social.d.ts +130 -0
- package/dist/doc-schemas/social.d.ts.map +1 -1
- package/dist/doc-schemas/social.js +91 -2
- package/dist/doc-schemas/social.js.map +1 -1
- package/dist/doc-schemas/square-announcement-jobs.d.ts +306 -14
- package/dist/doc-schemas/square-announcement-jobs.d.ts.map +1 -1
- package/dist/doc-schemas/square-announcement-jobs.js +15 -2
- package/dist/doc-schemas/square-announcement-jobs.js.map +1 -1
- package/dist/doc-schemas/user.js +3 -3
- package/dist/doc-schemas/user.js.map +1 -1
- package/dist/doc-schemas/work-project.js +2 -2
- package/dist/doc-schemas/work-project.js.map +1 -1
- package/dist/ids/chat-ids.d.ts +3 -2
- package/dist/ids/chat-ids.d.ts.map +1 -1
- package/dist/ids/chat-ids.js +3 -2
- package/dist/ids/chat-ids.js.map +1 -1
- package/dist/media/domain-events-admin.d.ts +0 -7
- package/dist/media/domain-events-admin.d.ts.map +1 -1
- package/dist/media/domain-events-admin.js +0 -11
- package/dist/media/domain-events-admin.js.map +1 -1
- package/dist/media/domain-events.d.ts +0 -6
- package/dist/media/domain-events.d.ts.map +1 -1
- package/dist/media/domain-events.js +1 -2
- package/dist/media/domain-events.js.map +1 -1
- package/dist/media/hall-library-target-fields.js +1 -1
- package/dist/media/hall-library-target-fields.js.map +1 -1
- package/dist/media/pending-media.d.ts +0 -54
- package/dist/media/pending-media.d.ts.map +1 -1
- package/dist/media/photodna-coverage.d.ts.map +1 -1
- package/dist/media/photodna-coverage.js +5 -3
- package/dist/media/photodna-coverage.js.map +1 -1
- package/dist/paths/related-ids.js +1 -1
- package/dist/paths/related-ids.js.map +1 -1
- package/dist/safety/ncii-intake-derivations.d.ts.map +1 -1
- package/dist/safety/ncii-intake-derivations.js +4 -2
- package/dist/safety/ncii-intake-derivations.js.map +1 -1
- package/dist/safety/resource-keys.d.ts.map +1 -1
- package/dist/safety/resource-keys.js +2 -1
- package/dist/safety/resource-keys.js.map +1 -1
- package/dist/schemas/chat.js +3 -3
- package/dist/schemas/chat.js.map +1 -1
- package/dist/schemas/ncii.js +1 -1
- package/dist/schemas/ncii.js.map +1 -1
- package/dist/schemas/notification.d.ts +8 -8
- package/dist/schemas/notification.d.ts.map +1 -1
- package/dist/schemas/notification.js +17 -11
- package/dist/schemas/notification.js.map +1 -1
- package/dist/types/social.d.ts +1 -45
- package/dist/types/social.d.ts.map +1 -1
- package/dist/types/social.js.map +1 -1
- package/package.json +3 -3
|
@@ -716,7 +716,105 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
716
716
|
NEW_AUDITION: "NEW_AUDITION";
|
|
717
717
|
NEW_COMMISSION: "NEW_COMMISSION";
|
|
718
718
|
}>;
|
|
719
|
-
payload: z.
|
|
719
|
+
payload: z.ZodObject<{
|
|
720
|
+
userId: z.ZodString;
|
|
721
|
+
mentions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
722
|
+
placeholder: z.ZodString;
|
|
723
|
+
type: z.ZodEnum<{
|
|
724
|
+
workRealm: "workRealm";
|
|
725
|
+
workProject: "workProject";
|
|
726
|
+
audition: "audition";
|
|
727
|
+
user: "user";
|
|
728
|
+
commission: "commission";
|
|
729
|
+
}>;
|
|
730
|
+
id: z.ZodString;
|
|
731
|
+
}, z.core.$strict>>>;
|
|
732
|
+
newMediaAssetId: z.ZodOptional<z.ZodString>;
|
|
733
|
+
craftSkill: z.ZodOptional<z.ZodObject<{
|
|
734
|
+
id: z.ZodString;
|
|
735
|
+
name: z.ZodString;
|
|
736
|
+
mediaAssetId: z.ZodString;
|
|
737
|
+
type: z.ZodEnum<{
|
|
738
|
+
video: "video";
|
|
739
|
+
image: "image";
|
|
740
|
+
audio: "audio";
|
|
741
|
+
}>;
|
|
742
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
743
|
+
acting: "acting";
|
|
744
|
+
"voice-over": "voice-over";
|
|
745
|
+
singing: "singing";
|
|
746
|
+
rapping: "rapping";
|
|
747
|
+
"instrumental-performance": "instrumental-performance";
|
|
748
|
+
"dance-choreography": "dance-choreography";
|
|
749
|
+
"stand-up-sketch-comedy": "stand-up-sketch-comedy";
|
|
750
|
+
"writing-storytelling": "writing-storytelling";
|
|
751
|
+
songwriting: "songwriting";
|
|
752
|
+
"poetry-spoken-word": "poetry-spoken-word";
|
|
753
|
+
"drawing-illustration": "drawing-illustration";
|
|
754
|
+
painting: "painting";
|
|
755
|
+
animation: "animation";
|
|
756
|
+
"graphic-design": "graphic-design";
|
|
757
|
+
photography: "photography";
|
|
758
|
+
"cinematography-camera": "cinematography-camera";
|
|
759
|
+
"video-editing": "video-editing";
|
|
760
|
+
"visual-effects": "visual-effects";
|
|
761
|
+
directing: "directing";
|
|
762
|
+
"costume-makeup": "costume-makeup";
|
|
763
|
+
"set-prop-design": "set-prop-design";
|
|
764
|
+
"music-production": "music-production";
|
|
765
|
+
"composing-scoring": "composing-scoring";
|
|
766
|
+
"sound-design": "sound-design";
|
|
767
|
+
}>>>;
|
|
768
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
769
|
+
original: "original";
|
|
770
|
+
mimicOnTtt: "mimicOnTtt";
|
|
771
|
+
mimicOffTtt: "mimicOffTtt";
|
|
772
|
+
}>>;
|
|
773
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
774
|
+
type: z.ZodEnum<{
|
|
775
|
+
workProject: "workProject";
|
|
776
|
+
user: "user";
|
|
777
|
+
}>;
|
|
778
|
+
id: z.ZodString;
|
|
779
|
+
}, z.core.$strict>>;
|
|
780
|
+
}, z.core.$strip>>;
|
|
781
|
+
craftSkillId: z.ZodOptional<z.ZodString>;
|
|
782
|
+
workProjectTitle: z.ZodOptional<z.ZodString>;
|
|
783
|
+
workProjectId: z.ZodOptional<z.ZodString>;
|
|
784
|
+
workProjectType: z.ZodOptional<z.ZodEnum<{
|
|
785
|
+
Tales: "Tales";
|
|
786
|
+
Tunes: "Tunes";
|
|
787
|
+
Television: "Television";
|
|
788
|
+
}>>;
|
|
789
|
+
workProjectDescription: z.ZodOptional<z.ZodString>;
|
|
790
|
+
workRealmId: z.ZodOptional<z.ZodString>;
|
|
791
|
+
workRealmTitle: z.ZodOptional<z.ZodString>;
|
|
792
|
+
hallItemId: z.ZodOptional<z.ZodString>;
|
|
793
|
+
hallItemTitle: z.ZodOptional<z.ZodString>;
|
|
794
|
+
hallSubItemType: z.ZodOptional<z.ZodEnum<{
|
|
795
|
+
chapter: "chapter";
|
|
796
|
+
track: "track";
|
|
797
|
+
episode: "episode";
|
|
798
|
+
}>>;
|
|
799
|
+
content: z.ZodOptional<z.ZodString>;
|
|
800
|
+
mediaAssetId: z.ZodOptional<z.ZodString>;
|
|
801
|
+
mediaType: z.ZodOptional<z.ZodEnum<{
|
|
802
|
+
video: "video";
|
|
803
|
+
image: "image";
|
|
804
|
+
audio: "audio";
|
|
805
|
+
other: "other";
|
|
806
|
+
}>>;
|
|
807
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
808
|
+
auditionId: z.ZodOptional<z.ZodString>;
|
|
809
|
+
commissionListingId: z.ZodOptional<z.ZodString>;
|
|
810
|
+
auditionAnnounceKind: z.ZodOptional<z.ZodEnum<{
|
|
811
|
+
work: "work";
|
|
812
|
+
platform: "platform";
|
|
813
|
+
sponsored: "sponsored";
|
|
814
|
+
}>>;
|
|
815
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
816
|
+
postId: z.ZodOptional<z.ZodString>;
|
|
817
|
+
}, z.core.$strip>;
|
|
720
818
|
}, z.core.$strip>;
|
|
721
819
|
source: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
722
820
|
status: z.ZodEnum<{
|
|
@@ -989,7 +1087,11 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
989
1087
|
pendingMediaId: z.ZodOptional<z.ZodString>;
|
|
990
1088
|
name: z.ZodString;
|
|
991
1089
|
mediaAssetId: z.ZodString;
|
|
992
|
-
type: z.
|
|
1090
|
+
type: z.ZodEnum<{
|
|
1091
|
+
video: "video";
|
|
1092
|
+
image: "image";
|
|
1093
|
+
audio: "audio";
|
|
1094
|
+
}>;
|
|
993
1095
|
size: z.ZodNumber;
|
|
994
1096
|
}, z.core.$strip>>;
|
|
995
1097
|
requiredTradeProfessions: z.ZodArray<z.ZodString>;
|
|
@@ -1044,12 +1146,9 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
1044
1146
|
title: z.ZodString;
|
|
1045
1147
|
description: z.ZodString;
|
|
1046
1148
|
videoAssetId: z.ZodString;
|
|
1047
|
-
mediaType: z.
|
|
1149
|
+
mediaType: z.ZodEnum<{
|
|
1048
1150
|
video: "video";
|
|
1049
|
-
|
|
1050
|
-
audio: "audio";
|
|
1051
|
-
other: "other";
|
|
1052
|
-
}>>;
|
|
1151
|
+
}>;
|
|
1053
1152
|
openTill: z.ZodNumber;
|
|
1054
1153
|
createdOn: z.ZodNumber;
|
|
1055
1154
|
createdBy: z.ZodObject<{
|
|
@@ -1085,11 +1184,9 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
1085
1184
|
auditionId: z.ZodString;
|
|
1086
1185
|
workProjectId: z.ZodOptional<z.ZodString>;
|
|
1087
1186
|
videoAssetId: z.ZodString;
|
|
1088
|
-
mediaType: z.
|
|
1187
|
+
mediaType: z.ZodEnum<{
|
|
1089
1188
|
video: "video";
|
|
1090
|
-
|
|
1091
|
-
other: "other";
|
|
1092
|
-
}>>;
|
|
1189
|
+
}>;
|
|
1093
1190
|
createdBy: z.ZodObject<{
|
|
1094
1191
|
uid: z.ZodString;
|
|
1095
1192
|
}, z.core.$strip>;
|
|
@@ -2023,12 +2120,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
2023
2120
|
thresholdItemId: z.ZodString;
|
|
2024
2121
|
hallItemId: z.ZodString;
|
|
2025
2122
|
}, z.core.$strict>;
|
|
2026
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
2027
|
-
type: z.ZodLiteral<"thresholdLibrary.rejected">;
|
|
2028
|
-
ids: z.ZodObject<{
|
|
2029
|
-
thresholdItemId: z.ZodString;
|
|
2030
|
-
hallItemId: z.ZodString;
|
|
2031
|
-
}, z.core.$strict>;
|
|
2032
2123
|
}, z.core.$strict>, z.ZodObject<{
|
|
2033
2124
|
type: z.ZodLiteral<"thresholdLibrary.needsRevision">;
|
|
2034
2125
|
ids: z.ZodObject<{
|
|
@@ -2465,12 +2556,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
2465
2556
|
thresholdItemId: z.ZodString;
|
|
2466
2557
|
hallItemId: z.ZodString;
|
|
2467
2558
|
}, z.core.$strict>;
|
|
2468
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
2469
|
-
type: z.ZodLiteral<"thresholdLibrary.rejected">;
|
|
2470
|
-
ids: z.ZodObject<{
|
|
2471
|
-
thresholdItemId: z.ZodString;
|
|
2472
|
-
hallItemId: z.ZodString;
|
|
2473
|
-
}, z.core.$strict>;
|
|
2474
2559
|
}, z.core.$strict>, z.ZodObject<{
|
|
2475
2560
|
type: z.ZodLiteral<"thresholdLibrary.needsRevision">;
|
|
2476
2561
|
ids: z.ZodObject<{
|
|
@@ -2838,12 +2923,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
2838
2923
|
thresholdItemId: z.ZodString;
|
|
2839
2924
|
hallItemId: z.ZodString;
|
|
2840
2925
|
}, z.core.$strict>;
|
|
2841
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
2842
|
-
type: z.ZodLiteral<"thresholdLibrary.rejected">;
|
|
2843
|
-
ids: z.ZodObject<{
|
|
2844
|
-
thresholdItemId: z.ZodString;
|
|
2845
|
-
hallItemId: z.ZodString;
|
|
2846
|
-
}, z.core.$strict>;
|
|
2847
2926
|
}, z.core.$strict>, z.ZodObject<{
|
|
2848
2927
|
type: z.ZodLiteral<"thresholdLibrary.needsRevision">;
|
|
2849
2928
|
ids: z.ZodObject<{
|
|
@@ -3282,12 +3361,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
3282
3361
|
thresholdItemId: z.ZodString;
|
|
3283
3362
|
hallItemId: z.ZodString;
|
|
3284
3363
|
}, z.core.$strict>;
|
|
3285
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
3286
|
-
type: z.ZodLiteral<"thresholdLibrary.rejected">;
|
|
3287
|
-
ids: z.ZodObject<{
|
|
3288
|
-
thresholdItemId: z.ZodString;
|
|
3289
|
-
hallItemId: z.ZodString;
|
|
3290
|
-
}, z.core.$strict>;
|
|
3291
3364
|
}, z.core.$strict>, z.ZodObject<{
|
|
3292
3365
|
type: z.ZodLiteral<"thresholdLibrary.needsRevision">;
|
|
3293
3366
|
ids: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/registry.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgM7B,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/registry.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgM7B,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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E;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;CAmBiC,CAAC;AAEvE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAOvC,CAAC"}
|
|
@@ -76,6 +76,10 @@ export const COLLECTION_SCHEMAS = {
|
|
|
76
76
|
'workRealms/{workRealmId}': WorkRealmSchema,
|
|
77
77
|
'guildInviteConversations/{guildInviteId}': GuildInviteConversationSchema,
|
|
78
78
|
// ===== Square / Social =====
|
|
79
|
+
// SquareStreetzPostSchema is a refined ZodObject (superRefine for the MEDIA-101
|
|
80
|
+
// mediaAssetId↔mediaType pair invariant); the schema-doc generator and the
|
|
81
|
+
// drift-check both unwrap the effect to introspect its shape, so binding the
|
|
82
|
+
// refined schema here is correct.
|
|
79
83
|
'squareStreetzFeed/activePosts/socialPosts/{postId}': SquareStreetzPostSchema,
|
|
80
84
|
'squareStreetzFeed/trendingPosts': TrendingPostsSchema,
|
|
81
85
|
'followEdges/{followEdgeId}': FollowEdgeSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/doc-schemas/registry.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,0FAA0F;AAC1F,oFAAoF;AACpF,yFAAyF;AACzF,mFAAmF;AACnF,EAAE;AACF,0FAA0F;AAC1F,4EAA4E;AAG5E,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,cAAc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ChD,2CAA2C,EAAE,IAAI;IACjD,2CAA2C,EAAE,qBAAqB;IAClE,4DAA4D,EAAE,qBAAqB;IACnF,uCAAuC,EAAE,IAAI;IAC7C,4BAA4B,EAAE,KAAK;CACiC,CAAC;AAEvE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAsB;IACpD,cAAc;IACd,iBAAiB;IACjB,kBAAkB;IAClB,oFAAoF;IACpF,oEAAoE;IACpE,eAAe;CACP,CAAC","sourcesContent":["// Firestore collection registry — the single, authoritative binding from each Firestore\n// collection/subcollection path template to its document Zod schema. This is the input to\n// the schema-doc generator and the drift-check, and its completeness is CI-enforced\n// (registry.test.ts) against the COLLECTIONS / *_SUBCOLLECTIONS name constants, so a new\n// collection cannot be added without either a schema or an explicit PENDING entry.\n//\n// Path templates reuse the segment names from ../paths/collections.ts (and the shapes the\n// path-builders produce). `{placeholder}` segments are document/parent IDs.\n\nimport type { z } from 'zod';\nimport {\n FullUserSchema,\n UserPrivateDataSchema,\n CraftSkillSchema,\n CraftSkillReferenceSchema,\n} from './user.js';\nimport { PublicUserSchema } from './publicUser.js';\nimport { AccountDeletionRequestV1Schema } from './account-deletion.js';\nimport {\n FullWorkProjectSchema,\n PublicWorkProjectSchema,\n WorkFileFolderSchema,\n WorkFileSchema,\n WorkRealmSchema,\n GuildmateUserSchema,\n PublicGuildmateUserSchema,\n} from './work-project.js';\nimport {\n FullTaleSchema,\n FullChapterSchema,\n FullTuneSchema,\n FullTuneTrackSchema,\n FullTelevisionSchema,\n FullTelevisionEpisodeSchema,\n ThresholdItemSchema,\n PublishedHallItemSchema,\n PublishedChapterSchema,\n PublishedTuneTrackSchema,\n PublishedTelevisionEpisodeSchema,\n HallContentChangeRequestSchema,\n FuturePlansDocumentSchema,\n RulesAndAgreementsSchema,\n LegalPageDocumentSchema,\n TakeItDownPageCopySchema,\n HallLibraryPreferencesSchema,\n} from './content.js';\nimport {\n SquareStreetzPostSchema,\n MentionHistoryDocumentSchema,\n FollowEdgeSchema,\n FollowCounterSchema,\n SquareStreetzLikeSchema,\n TrendingPostsSchema,\n} from './social.js';\nimport {\n PledgePaymentSchema,\n PledgePaymentProviderRefSchema,\n ProcessedStripeEventSchema,\n PledgePaymentLedgerEventSchema,\n PaymentWebhookQuarantineSchema,\n PledgePaymentTotalsDocSchema,\n PledgeRefundRequestSchema,\n} from './payments.js';\nimport {\n FullCommissionListingSchema,\n CommissionProposalSchema,\n AuditionSchema,\n AuditionEntrySchema,\n UserAuditionVoteSchema,\n} from './commissions.js';\nimport {\n GuildChatChannelSchema,\n GuildInviteConversationSchema,\n AdminDispatchSchema,\n ChatMessageV1Schema,\n} from './messaging.js';\nimport { AppConfigSchema, AdminListSchema, ProfanityListSchema, ReservedUsernamesSchema, BlockedFranchiseNamesSchema, AppModeMarkerSchema } from './system.js';\nimport {\n ContentViolationSchema,\n ModerationCascadeManifestSchema,\n ModerationCascadeChangedDocSchema,\n} from './moderation.js';\nimport {\n AdminTaskDocSchema,\n} from './report-docs.js';\nimport { TTTAuditEventSchema } from './audit.js';\nimport {\n NotificationDocSchema,\n NotificationHistoryDocSchema,\n PendingNotificationSchema,\n} from './notifications.js';\nimport {\n NotificationDeliverySchema,\n NotificationFanoutJobSchema,\n} from './notification-ledger.js';\nimport {\n ChatChannelAuthProjectionSchema,\n ChatScopeDegradedSchema,\n ChatScopeDegradedCauseSchema,\n ChatSyncEventSchema,\n ChatSyncFanoutJobSchema,\n ChatMessageOutboxSchema,\n ChatAdminActionCommandSchema,\n ChatHistoryAnonymizationJobSchema,\n ChatHistoryAnonymizationAffectedChunkSchema,\n} from './chat-sync.js';\nimport { SquareAnnouncementJobSchema } from './square-announcement-jobs.js';\nimport { PendingMediaSchema, ArchivedPendingMediaSchema } from '../media/pending-media.js';\nimport { MediaAssetSchema } from './media-assets.js';\nimport { MediaActivationJobSchema } from './media-activation-jobs.js';\nimport {\n ReservedDisplayNameSchema,\n ReservedRealmNameSchema,\n StakeShareAuditEventSchema,\n ShortLinkSchema,\n FeedbackAliasSchema,\n UserSuggestionSchema,\n StatusReconcileQueueEntrySchema,\n} from './operational.js';\n// ===== Trust & Safety — report spine (§A1) =====\nimport {\n ProtectedReportRootV1Schema,\n ReportPublicProjectionV1Schema,\n ReportGroupV1Schema,\n ReportTargetSnapshotV1Schema,\n NarrativeRecordV1Schema,\n} from './safety/report.js';\nimport { SafetyCaseAlertV1Schema } from './safety/case-alert.js';\n// ===== Trust & Safety — child-safety case spine (§A1b, §A2) =====\nimport {\n ChildSafetyCaseListV1Schema,\n ChildSafetyCaseV1Schema,\n ChildSafetySourceSignalV1Schema,\n ChildSafetyDecisionV1Schema,\n ChildSafetyDecisionViewV1Schema,\n ChildSafetyCaseAccountV1Schema,\n ChildSafetyCaseAccountHistoryV1Schema,\n ChildSafetyNcmecSubmissionV1Schema,\n ChildSafetyNcmecSubmissionFileV1Schema,\n ChildSafetyLegalProcessEventV1Schema,\n} from './safety/case.js';\nimport {\n ChildSafetyOwningAliasV1Schema,\n} from './safety/case-aliases.js';\nimport {\n SafetyHoldRefV1Schema,\n SafetyHoldResourceV1Schema,\n SafetyResourceCommandV1Schema,\n SafetyResourceCommandAuthorizedRequestV1Schema,\n SafetyResourceCommandBypassRefV1Schema,\n} from './safety/holds.js';\nimport {\n SafetyEvidenceManifestV1Schema,\n SafetyEvidenceJobV1Schema,\n SafetyEvidenceJobItemV1Schema,\n SafetyEvidenceDispositionV1Schema,\n} from './safety/evidence.js';\nimport { EventProvenanceV1Schema } from './safety/provenance.js';\nimport {\n QuarantineSagaJobV1Schema,\n QuarantineSagaRelatedAssetV1Schema,\n NcmecSubmissionJobV1Schema,\n AccountActionCommandV1Schema,\n} from './safety/sagas.js';\nimport {\n SafetySlaMonitorV1Schema,\n SafetyMonitorHeartbeatV1Schema,\n} from './safety/monitors.js';\nimport { AgeAttestationNonceV1Schema, AgePolicyConfigV1Schema } from './safety/age.js';\nimport {\n PrivilegedReviewerPasskeyProfileV1Schema,\n PrivilegedReviewerCapabilityGrantV1Schema,\n} from './safety/reviewer-security.js';\n// ===== Trust & Safety — NCII / TAKE IT DOWN (§A11) =====\nimport { NciiAllegationV1Schema } from './ncii/allegations.js';\nimport {\n TakeItDownRequestRootV1Schema,\n TakeItDownRequesterPrivateV1Schema,\n TakeItDownSubmissionV1Schema,\n TakeItDownValidityDecisionV1Schema,\n TakeItDownRequestActionV1Schema,\n TakeItDownEvidenceV1Schema,\n NciiRetainedEvidenceInventoryV1Schema,\n} from './ncii/requests.js';\nimport {\n NciiCaseV1Schema,\n NciiCaseAllegationLinkV1Schema,\n NciiCaseRequestLinkV1Schema,\n NciiCaseRemovalActionV1Schema,\n NciiBlockedHashV1Schema,\n} from './ncii/cases.js';\nimport { NciiTemporaryHoldV1Schema } from './ncii/holds.js';\nimport {\n NciiRemovalJobV1Schema,\n NciiRemovalTargetV1Schema,\n} from './ncii/removal.js';\nimport {\n NciiPolicyConfigV1Schema,\n PrivilegedReviewerSecurityProfileV1Schema,\n} from './ncii/config.js';\n\nexport const COLLECTION_SCHEMAS = {\n // ===== Users =====\n 'userProfiles/{userId}': FullUserSchema,\n 'userProfiles/{userId}/privateData/{userId}': UserPrivateDataSchema,\n 'userProfiles/{userId}/privateData/hallLibraryPreferences': HallLibraryPreferencesSchema,\n 'userProfiles/{userId}/profileCraftSkills/{craftSkillId}': CraftSkillSchema,\n 'userProfiles/{userId}/auditionVotes/{auditionId}': UserAuditionVoteSchema,\n 'userProfiles/{userId}/mentionHistory/{docId}': MentionHistoryDocumentSchema,\n 'userProfiles/{userId}/notificationHistory/{notificationId}': NotificationHistoryDocSchema,\n 'userProfiles/{userId}/userLikes/likeHistory/squareStreetzLikes/{postId}': SquareStreetzLikeSchema,\n 'publicUsers/{uid}': PublicUserSchema,\n\n // ===== Work / Realm / Guild =====\n 'allWorkProjects/{workProjectId}': FullWorkProjectSchema,\n 'allWorkProjects/{workProjectId}/guildmateUsers/{uid}': GuildmateUserSchema,\n 'allWorkProjects/{workProjectId}/publicGuildmateUsers/{uid}': PublicGuildmateUserSchema,\n 'allWorkProjects/{workProjectId}/workFileFolders/{workFileFolderId}': WorkFileFolderSchema,\n 'allWorkProjects/{workProjectId}/workFileFolders/{workFileFolderId}/workFiles/{workFileId}': WorkFileSchema,\n 'allWorkProjects/{workProjectId}/workProjectTales/{taleId}': FullTaleSchema,\n 'allWorkProjects/{workProjectId}/workProjectTales/{taleId}/taleChapters/{chapterId}': FullChapterSchema,\n 'allWorkProjects/{workProjectId}/workProjectTunes/{tuneId}': FullTuneSchema,\n 'allWorkProjects/{workProjectId}/workProjectTunes/{tuneId}/tuneTracks/{trackId}': FullTuneTrackSchema,\n 'allWorkProjects/{workProjectId}/workProjectTelevision/{televisionId}': FullTelevisionSchema,\n 'allWorkProjects/{workProjectId}/workProjectTelevision/{televisionId}/televisionEpisodes/{episodeId}': FullTelevisionEpisodeSchema,\n 'allWorkProjects/{workProjectId}/guildChatChannels/{guildChatChannelId}': GuildChatChannelSchema,\n // Guild channel + invite messages are REALTIME-ONLY (chat Worker DO) — no Firestore schema.\n 'publicWorkProjects/{workProjectId}': PublicWorkProjectSchema,\n 'workRealms/{workRealmId}': WorkRealmSchema,\n 'guildInviteConversations/{guildInviteId}': GuildInviteConversationSchema,\n\n // ===== Square / Social =====\n 'squareStreetzFeed/activePosts/socialPosts/{postId}': SquareStreetzPostSchema,\n 'squareStreetzFeed/trendingPosts': TrendingPostsSchema,\n 'followEdges/{followEdgeId}': FollowEdgeSchema,\n 'followCounters/{followCounterId}': FollowCounterSchema,\n // Durable Square announcement outbox (Admin-SDK-only; deterministic job ids).\n 'squareAnnouncementJobs/{jobId}': SquareAnnouncementJobSchema,\n\n // ===== Payments / pledge ledger =====\n 'pledgePayments/{pledgePaymentId}': PledgePaymentSchema,\n 'pledgePaymentProviderRefs/{pledgePaymentId}': PledgePaymentProviderRefSchema,\n 'processedStripeEvents/{stripeEventId}': ProcessedStripeEventSchema,\n 'pledgePaymentLedgerEvents/{ledgerId}': PledgePaymentLedgerEventSchema,\n 'paymentWebhookQuarantine/{stripeEventId}': PaymentWebhookQuarantineSchema,\n 'pledgePaymentTotals/summary': PledgePaymentTotalsDocSchema,\n 'pledgeRefundRequests/{requestId}': PledgeRefundRequestSchema,\n\n // ===== Threshold / Hall =====\n 'thresholdItems/{thresholdItemId}': ThresholdItemSchema,\n 'hallItems/{hallItemId}': PublishedHallItemSchema,\n // Published hall sub-item projections — the chapter/track/episode docs copied out of\n // the Work at publish time (runPublishApprovedHallLibraryItem). Segment names are the\n // HALL_ITEM_SUBCOLLECTIONS constants (the lowercased WorkProjectType).\n 'hallItems/{hallItemId}/tales/{itemId}': PublishedChapterSchema,\n 'hallItems/{hallItemId}/tunes/{itemId}': PublishedTuneTrackSchema,\n 'hallItems/{hallItemId}/television/{itemId}': PublishedTelevisionEpisodeSchema,\n 'hallContentChangeRequests/{changeRequestId}': HallContentChangeRequestSchema,\n\n // ===== Commission / Audition =====\n 'commissionListings/{commissionListingId}': FullCommissionListingSchema,\n 'commissionListings/{commissionListingId}/commissionProposals/{commissionProposalId}': CommissionProposalSchema,\n 'auditionBoard/{auditionId}': AuditionSchema,\n 'auditionBoard/{auditionId}/auditionEntries/{auditionEntryId}': AuditionEntrySchema,\n\n // ===== Moderation / Reports / Admin =====\n // The report spine (§A1): the restricted root, its public projection subdoc, and the\n // dedup/count group. The root + projection are written by the app's submitReport\n // callable; the group is maintained by an app-side trigger.\n 'contentReports/{reportId}': ProtectedReportRootV1Schema,\n 'contentReports/{reportId}/publicProjection/{reportId}': ReportPublicProjectionV1Schema,\n 'contentReports/{reportId}/private/snapshot': ReportTargetSnapshotV1Schema,\n 'contentReports/{reportId}/private/narrative': NarrativeRecordV1Schema,\n 'activeReportGroups/{groupKey}': ReportGroupV1Schema,\n 'adminTasks/{taskId}': AdminTaskDocSchema,\n 'contentViolations/{violationId}': ContentViolationSchema,\n 'moderationCascadeManifests/{cascadeId}': ModerationCascadeManifestSchema,\n 'moderationCascadeManifests/{cascadeId}/changedDocs/{changedDocId}': ModerationCascadeChangedDocSchema,\n 'auditEvents/{eventId}': TTTAuditEventSchema,\n 'stakeShareAuditEvents/{eventId}': StakeShareAuditEventSchema,\n 'pendingAdminDispatches/{adminDispatchId}': AdminDispatchSchema,\n 'pendingAdminDispatches/{adminDispatchId}/conversationMessages/{adminDispatchMessageId}': ChatMessageV1Schema,\n\n // ===== Media pipeline =====\n 'pendingMedia/{pendingMediaId}': PendingMediaSchema,\n 'pendingMediaArchive/{pendingMediaId}': ArchivedPendingMediaSchema,\n 'mediaAssets/{mediaAssetId}': MediaAssetSchema,\n 'mediaActivationJobs/{jobId}': MediaActivationJobSchema,\n\n // ===== Notifications =====\n 'activeUserNotifications/{notificationId}': NotificationDocSchema,\n 'activeAdminNotifications/{notificationId}': NotificationDocSchema,\n 'adminNotificationHistory/{notificationId}': NotificationHistoryDocSchema,\n 'pendingNotifications/{notificationId}': PendingNotificationSchema,\n\n // ===== Notification redesign — delivery ledger + fanout engine =====\n 'notificationDeliveries/{deliveryId}': NotificationDeliverySchema,\n 'notificationFanoutJobs/{jobId}': NotificationFanoutJobSchema,\n\n // ===== Chat realtime sync / projection / commands =====\n 'chatChannelAuthProjections/{authPairKey}': ChatChannelAuthProjectionSchema,\n 'chatScopeDegraded/{scopeKey}': ChatScopeDegradedSchema,\n 'chatScopeDegraded/{scopeKey}/causes/{causeId}': ChatScopeDegradedCauseSchema,\n 'chatSyncEvents/{eventId}': ChatSyncEventSchema,\n 'chatSyncFanoutJobs/{jobId}': ChatSyncFanoutJobSchema,\n 'chatMessageOutbox/{commandId}': ChatMessageOutboxSchema,\n 'chatAdminActionCommands/{requestId}': ChatAdminActionCommandSchema,\n 'chatHistoryAnonymizationJobs/{jobId}': ChatHistoryAnonymizationJobSchema,\n 'chatHistoryAnonymizationJobs/{jobId}/affectedChunks/{chunkOrdinal}': ChatHistoryAnonymizationAffectedChunkSchema,\n\n // ===== Craft skills index =====\n 'craftSkillsByTag/{tag}/taggedCraftSkills/{compositeId}': CraftSkillReferenceSchema,\n\n // ===== Operational / utility =====\n 'reservedDisplayNames/{displayNameUppercase}': ReservedDisplayNameSchema,\n 'reservedRealmNames/{workingTitleUppercase}': ReservedRealmNameSchema,\n 'accountDeletionRequests/{uid}': AccountDeletionRequestV1Schema,\n 'shortLinks/{shortId}': ShortLinkSchema,\n 'feedbackAliases/{aliasId}': FeedbackAliasSchema,\n 'feedbackSubmissions/{feedbackType}/userSuggestions/{suggestionId}': UserSuggestionSchema,\n 'statusReconcileQueue/{uid}': StatusReconcileQueueEntrySchema,\n\n // ===== Trust & Safety — child-safety case spine (§A1b, §A2) =====\n 'childSafetyCaseList/{caseId}': ChildSafetyCaseListV1Schema,\n 'activeSafetyCaseAlerts/{caseId}': SafetyCaseAlertV1Schema,\n 'childSafetyCases/{caseId}': ChildSafetyCaseV1Schema,\n 'childSafetyCases/{caseId}/sourceSignals/{signalId}': ChildSafetySourceSignalV1Schema,\n 'childSafetyCases/{caseId}/decisions/{decisionId}': ChildSafetyDecisionV1Schema,\n 'childSafetyCases/{caseId}/decisions/{decisionId}/views/{viewId}': ChildSafetyDecisionViewV1Schema,\n 'childSafetyCases/{caseId}/accounts/{uid}': ChildSafetyCaseAccountV1Schema,\n 'childSafetyCases/{caseId}/accounts/{uid}/history/{historyId}': ChildSafetyCaseAccountHistoryV1Schema,\n 'childSafetyCases/{caseId}/ncmecSubmissions/{submissionId}': ChildSafetyNcmecSubmissionV1Schema,\n 'childSafetyCases/{caseId}/ncmecSubmissions/{submissionId}/files/{fileId}': ChildSafetyNcmecSubmissionFileV1Schema,\n 'childSafetyCases/{caseId}/legalProcess/{eventId}': ChildSafetyLegalProcessEventV1Schema,\n 'childSafetyOwningAliases/{aliasId}': ChildSafetyOwningAliasV1Schema,\n\n // ===== Trust & Safety — holds + resource commands (§A3) =====\n 'safetyHoldRefs/{holdRefId}': SafetyHoldRefV1Schema,\n 'safetyHoldResources/{resourceKeyHash}': SafetyHoldResourceV1Schema,\n 'safetyResourceCommands/{commandDocId}': SafetyResourceCommandV1Schema,\n 'safetyResourceCommands/{commandDocId}/authorizedRequests/{requestId}': SafetyResourceCommandAuthorizedRequestV1Schema,\n 'safetyResourceCommands/{commandDocId}/bypassRefs/{refId}': SafetyResourceCommandBypassRefV1Schema,\n\n // ===== Trust & Safety — evidence + provenance (§A4, §A6) =====\n // SafetyEvidenceManifestV1Schema is a refined ZodObject (superRefine for the H5\n // sourceKind invariant); the schema-doc generator unwraps the effect to introspect\n // its shape, so binding the refined schema here is correct.\n 'safetyEvidenceManifests/{manifestId}': SafetyEvidenceManifestV1Schema,\n 'safetyEvidenceJobs/{jobId}': SafetyEvidenceJobV1Schema,\n 'safetyEvidenceJobs/{jobId}/items/{itemId}': SafetyEvidenceJobItemV1Schema,\n 'safetyEvidenceJobs/{jobId}/disposition/{locationId}': SafetyEvidenceDispositionV1Schema,\n 'eventProvenance/{eventId}': EventProvenanceV1Schema,\n\n // ===== Trust & Safety — sagas + closure (§A5) =====\n 'quarantineSagaJobs/{caseId}': QuarantineSagaJobV1Schema,\n 'quarantineSagaJobs/{caseId}/relatedAssets/{assetId}': QuarantineSagaRelatedAssetV1Schema,\n 'ncmecSubmissionJobs/{ncmecJobId}': NcmecSubmissionJobV1Schema,\n 'accountActionCommands/{accountActionCommandId}': AccountActionCommandV1Schema,\n\n // ===== Trust & Safety — SLA monitors + heartbeat (§A8) =====\n 'safetySlaMonitors/{monitorId}': SafetySlaMonitorV1Schema,\n 'safetyMonitorHeartbeat/global': SafetyMonitorHeartbeatV1Schema,\n\n // ===== Trust & Safety — age attestation nonces (§A7) =====\n 'ageAttestationNonces/{nonceHash}': AgeAttestationNonceV1Schema,\n\n // ===== Trust & Safety — per-operator privileged-reviewer security (§A11 [M-6] / [H-17]) =====\n // Backend-only (Cloud-Functions-only readers/writers; client access denied in firestore.rules).\n 'privilegedReviewerPasskeyProfiles/{uid}': PrivilegedReviewerPasskeyProfileV1Schema,\n 'privilegedReviewerCapabilityGrants/{uid}': PrivilegedReviewerCapabilityGrantV1Schema,\n\n // ===== Trust & Safety — NCII / TAKE IT DOWN (§A11) =====\n 'nciiAllegations/{allegationId}': NciiAllegationV1Schema,\n 'takeItDownRequests/{requestId}': TakeItDownRequestRootV1Schema,\n 'takeItDownRequests/{requestId}/private/requester': TakeItDownRequesterPrivateV1Schema,\n 'takeItDownRequests/{requestId}/submissions/{submissionId}': TakeItDownSubmissionV1Schema,\n 'takeItDownRequests/{requestId}/validityDecisions/{decisionId}': TakeItDownValidityDecisionV1Schema,\n 'takeItDownRequests/{requestId}/actions/{actionId}': TakeItDownRequestActionV1Schema,\n 'takeItDownRequests/{requestId}/evidence/{evidenceId}': TakeItDownEvidenceV1Schema,\n 'nciiCases/{caseId}': NciiCaseV1Schema,\n 'nciiCases/{caseId}/allegationLinks/{allegationId}': NciiCaseAllegationLinkV1Schema,\n 'nciiCases/{caseId}/requestLinks/{requestId}': NciiCaseRequestLinkV1Schema,\n 'nciiCases/{caseId}/removalActions/{actionId}': NciiCaseRemovalActionV1Schema,\n 'nciiCases/{caseId}/blockedHashes/{hashId}': NciiBlockedHashV1Schema,\n 'nciiRetainedEvidenceInventory/{inventoryId}': NciiRetainedEvidenceInventoryV1Schema,\n // [H-01] dead-letter sink for inventory rows that could not be written to the primary\n // nciiRetainedEvidenceInventory collection. Stores the same document shape.\n 'nciiInventoryDeadLetter/{inventoryId}': NciiRetainedEvidenceInventoryV1Schema,\n 'nciiTemporaryHolds/{holdId}': NciiTemporaryHoldV1Schema,\n 'nciiRemovalJobs/{jobId}': NciiRemovalJobV1Schema,\n 'nciiRemovalJobs/{jobId}/targets/{targetKeyHash}': NciiRemovalTargetV1Schema,\n\n // ===== _config singletons (public) =====\n '_config/app': AppConfigSchema,\n '_config/futurePlans': FuturePlansDocumentSchema,\n '_config/rulesAndAgreements': RulesAndAgreementsSchema,\n // Content-pages migration (DJ ruling 2026-07-06): /terms, /privacy, and the\n // /take-it-down page copy render exclusively from these (all public pages —\n // take-it-down is a NO-LOGIN page, so its copy doc must be publicly readable).\n '_config/termsOfService': LegalPageDocumentSchema,\n '_config/privacyPolicy': LegalPageDocumentSchema,\n '_config/takeItDownPageCopy': TakeItDownPageCopySchema,\n\n // ===== _serverData singletons (server-only — Cloud-Functions-only readers, BACKEND-108) =====\n '_serverData/agePolicy': AgePolicyConfigV1Schema,\n '_serverData/nciiPolicy': NciiPolicyConfigV1Schema,\n '_serverData/privilegedReviewerSecurity': PrivilegedReviewerSecurityProfileV1Schema,\n\n // ===== _systemData singletons =====\n '_systemData/adminList': AdminListSchema,\n '_systemData/profanityList': ProfanityListSchema,\n '_systemData/reservedUsernames': ReservedUsernamesSchema,\n '_systemData/blockedFranchiseNames': BlockedFranchiseNamesSchema,\n '_systemData/appMode': AppModeMarkerSchema,\n} as const satisfies Record<string, z.ZodTypeAny>;\n\nexport type RegisteredCollectionPath = keyof typeof COLLECTION_SCHEMAS;\n\n/**\n * Doc-id field annotation: for the listed bindings, the named body field equals the\n * Firestore document id and is injected at READ time (`{ ...doc.data(), <field>: doc.id }`),\n * never persisted — the write callables store the body via `Omit<…, '<field>'>`. The bound\n * schema models the (correct) consumer/read shape, where the field is required, so a raw\n * stored doc is \"missing\" it. The drift-check injects `{ [field]: doc.id, ...data }` before\n * validating, generalizing the one-off `AdminTaskDocSchema` stored-shape workaround into a\n * single mechanism so real-callable drift-checks don't false-flag every doc-id collection.\n * The schema-doc generator ignores this map. Keys are compiler-checked against the registry.\n */\nexport const COLLECTION_DOC_ID_FIELDS = {\n 'allWorkProjects/{workProjectId}/workProjectTales/{taleId}': 'uid',\n 'allWorkProjects/{workProjectId}/workProjectTales/{taleId}/taleChapters/{chapterId}': 'uid',\n 'allWorkProjects/{workProjectId}/workProjectTunes/{tuneId}': 'uid',\n 'allWorkProjects/{workProjectId}/workProjectTunes/{tuneId}/tuneTracks/{trackId}': 'uid',\n 'allWorkProjects/{workProjectId}/workProjectTelevision/{televisionId}': 'uid',\n 'allWorkProjects/{workProjectId}/workProjectTelevision/{televisionId}/televisionEpisodes/{episodeId}': 'uid',\n 'allWorkProjects/{workProjectId}/guildChatChannels/{guildChatChannelId}': 'guildChatChannelId',\n // Published hall sub-items: the doc id IS the live sub-item's id; `uid` is injected at\n // read (the publish writer spreads the live doc's stored body, which has no `uid`).\n 'hallItems/{hallItemId}/tales/{itemId}': 'uid',\n 'hallItems/{hallItemId}/tunes/{itemId}': 'uid',\n 'hallItems/{hallItemId}/television/{itemId}': 'uid',\n 'activeUserNotifications/{notificationId}': 'id',\n 'activeAdminNotifications/{notificationId}': 'id',\n 'adminNotificationHistory/{notificationId}': 'archiveOccurrenceId',\n 'userProfiles/{userId}/notificationHistory/{notificationId}': 'archiveOccurrenceId',\n 'pendingNotifications/{notificationId}': 'id',\n 'statusReconcileQueue/{uid}': 'uid',\n} as const satisfies Partial<Record<RegisteredCollectionPath, string>>;\n\n/**\n * Collections that exist (in COLLECTIONS / *_SUBCOLLECTIONS or firestore.rules) but are\n * intentionally NOT bound to a schema, each with a reason. Listed EXPLICITLY so completeness is\n * enforced and nothing is silently uncovered; the registry test fails if a NEW unlisted collection\n * appears. These three are the only remaining gaps after the schema-registry binding pass:\n *\n * - userMetadata: `userProfiles/{uid}/userMetadata/notificationSettings` — a firestore.rules\n * match and `PATH_BUILDERS.userMetadata` exist, but there is no live reader/writer and no\n * notification-settings type anywhere yet. Bind once that shape is implemented.\n * - checkedOutItems: a `userProfiles/{uid}/checkedOutItems` subcollection constant with no writer,\n * reader, rule, or path-builder (the admin \"checked out items\" UI reads adminTasks by\n * `checkoutDetails.userId`, not this subcollection). Vestigial — remove once confirmed safe.\n * - feedbackDenylist: `feedbackDenylist/{deniedWord}` — Console-managed (firestore.rules §3F: no\n * callable writes it) and submitFeedback reads it via `.exists` only, so there is no field\n * contract to author a schema from. The doc id is the denied word; the body is unused.\n */\nexport const PENDING_COLLECTIONS: readonly string[] = [\n 'userMetadata',\n 'checkedOutItems',\n 'feedbackDenylist',\n // Append-only NCII case closure/reopen event rows — the doc shape is owned app-side\n // (NciiCaseV1 closure events), not modeled in ttt-core doc-schemas.\n 'closureEvents',\n] as const;\n"]}
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/doc-schemas/registry.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,0FAA0F;AAC1F,oFAAoF;AACpF,yFAAyF;AACzF,mFAAmF;AACnF,EAAE;AACF,0FAA0F;AAC1F,4EAA4E;AAG5E,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,gCAAgC,EAChC,8BAA8B,EAC9B,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mBAAmB,EACnB,8BAA8B,EAC9B,0BAA0B,EAC1B,8BAA8B,EAC9B,8BAA8B,EAC9B,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,cAAc,EACd,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,kB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AAE,wBAAwB;IAEtD,+FAA+F;IAC/F,uBAAuB,EAAE,uBAAuB;IAChD,wBAAwB,EAAE,wBAAwB;IAClD,wCAAwC,EAAE,yCAAyC;IAEnF,qCAAqC;IACrC,uBAAuB,EAAE,eAAe;IACxC,2BAA2B,EAAE,mBAAmB;IAChD,+BAA+B,EAAE,uBAAuB;IACxD,mCAAmC,EAAE,2BAA2B;IAChE,qBAAqB,EAAE,mBAAmB;CACK,CAAC;AAIlD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,2DAA2D,EAAE,KAAK;IAClE,oFAAoF,EAAE,KAAK;IAC3F,2DAA2D,EAAE,KAAK;IAClE,gFAAgF,EAAE,KAAK;IACvF,sEAAsE,EAAE,KAAK;IAC7E,qGAAqG,EAAE,KAAK;IAC5G,wEAAwE,EAAE,oBAAoB;IAC9F,uFAAuF;IACvF,oFAAoF;IACpF,uCAAuC,EAAE,KAAK;IAC9C,uCAAuC,EAAE,KAAK;IAC9C,4CAA4C,EAAE,KAAK;IACnD,0CAA0C,EAAE,IAAI;IAChD,2CAA2C,EAAE,IAAI;IACjD,2CAA2C,EAAE,qBAAqB;IAClE,4DAA4D,EAAE,qBAAqB;IACnF,uCAAuC,EAAE,IAAI;IAC7C,4BAA4B,EAAE,KAAK;CACiC,CAAC;AAEvE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAsB;IACpD,cAAc;IACd,iBAAiB;IACjB,kBAAkB;IAClB,oFAAoF;IACpF,oEAAoE;IACpE,eAAe;CACP,CAAC","sourcesContent":["// Firestore collection registry — the single, authoritative binding from each Firestore\n// collection/subcollection path template to its document Zod schema. This is the input to\n// the schema-doc generator and the drift-check, and its completeness is CI-enforced\n// (registry.test.ts) against the COLLECTIONS / *_SUBCOLLECTIONS name constants, so a new\n// collection cannot be added without either a schema or an explicit PENDING entry.\n//\n// Path templates reuse the segment names from ../paths/collections.ts (and the shapes the\n// path-builders produce). `{placeholder}` segments are document/parent IDs.\n\nimport type { z } from 'zod';\nimport {\n FullUserSchema,\n UserPrivateDataSchema,\n CraftSkillSchema,\n CraftSkillReferenceSchema,\n} from './user.js';\nimport { PublicUserSchema } from './publicUser.js';\nimport { AccountDeletionRequestV1Schema } from './account-deletion.js';\nimport {\n FullWorkProjectSchema,\n PublicWorkProjectSchema,\n WorkFileFolderSchema,\n WorkFileSchema,\n WorkRealmSchema,\n GuildmateUserSchema,\n PublicGuildmateUserSchema,\n} from './work-project.js';\nimport {\n FullTaleSchema,\n FullChapterSchema,\n FullTuneSchema,\n FullTuneTrackSchema,\n FullTelevisionSchema,\n FullTelevisionEpisodeSchema,\n ThresholdItemSchema,\n PublishedHallItemSchema,\n PublishedChapterSchema,\n PublishedTuneTrackSchema,\n PublishedTelevisionEpisodeSchema,\n HallContentChangeRequestSchema,\n FuturePlansDocumentSchema,\n RulesAndAgreementsSchema,\n LegalPageDocumentSchema,\n TakeItDownPageCopySchema,\n HallLibraryPreferencesSchema,\n} from './content.js';\nimport {\n SquareStreetzPostSchema,\n MentionHistoryDocumentSchema,\n FollowEdgeSchema,\n FollowCounterSchema,\n SquareStreetzLikeSchema,\n TrendingPostsSchema,\n} from './social.js';\nimport {\n PledgePaymentSchema,\n PledgePaymentProviderRefSchema,\n ProcessedStripeEventSchema,\n PledgePaymentLedgerEventSchema,\n PaymentWebhookQuarantineSchema,\n PledgePaymentTotalsDocSchema,\n PledgeRefundRequestSchema,\n} from './payments.js';\nimport {\n FullCommissionListingSchema,\n CommissionProposalSchema,\n AuditionSchema,\n AuditionEntrySchema,\n UserAuditionVoteSchema,\n} from './commissions.js';\nimport {\n GuildChatChannelSchema,\n GuildInviteConversationSchema,\n AdminDispatchSchema,\n ChatMessageV1Schema,\n} from './messaging.js';\nimport { AppConfigSchema, AdminListSchema, ProfanityListSchema, ReservedUsernamesSchema, BlockedFranchiseNamesSchema, AppModeMarkerSchema } from './system.js';\nimport {\n ContentViolationSchema,\n ModerationCascadeManifestSchema,\n ModerationCascadeChangedDocSchema,\n} from './moderation.js';\nimport {\n AdminTaskDocSchema,\n} from './report-docs.js';\nimport { TTTAuditEventSchema } from './audit.js';\nimport {\n NotificationDocSchema,\n NotificationHistoryDocSchema,\n PendingNotificationSchema,\n} from './notifications.js';\nimport {\n NotificationDeliverySchema,\n NotificationFanoutJobSchema,\n} from './notification-ledger.js';\nimport {\n ChatChannelAuthProjectionSchema,\n ChatScopeDegradedSchema,\n ChatScopeDegradedCauseSchema,\n ChatSyncEventSchema,\n ChatSyncFanoutJobSchema,\n ChatMessageOutboxSchema,\n ChatAdminActionCommandSchema,\n ChatHistoryAnonymizationJobSchema,\n ChatHistoryAnonymizationAffectedChunkSchema,\n} from './chat-sync.js';\nimport { SquareAnnouncementJobSchema } from './square-announcement-jobs.js';\nimport { PendingMediaSchema, ArchivedPendingMediaSchema } from '../media/pending-media.js';\nimport { MediaAssetSchema } from './media-assets.js';\nimport { MediaActivationJobSchema } from './media-activation-jobs.js';\nimport {\n ReservedDisplayNameSchema,\n ReservedRealmNameSchema,\n StakeShareAuditEventSchema,\n ShortLinkSchema,\n FeedbackAliasSchema,\n UserSuggestionSchema,\n StatusReconcileQueueEntrySchema,\n} from './operational.js';\n// ===== Trust & Safety — report spine (§A1) =====\nimport {\n ProtectedReportRootV1Schema,\n ReportPublicProjectionV1Schema,\n ReportGroupV1Schema,\n ReportTargetSnapshotV1Schema,\n NarrativeRecordV1Schema,\n} from './safety/report.js';\nimport { SafetyCaseAlertV1Schema } from './safety/case-alert.js';\n// ===== Trust & Safety — child-safety case spine (§A1b, §A2) =====\nimport {\n ChildSafetyCaseListV1Schema,\n ChildSafetyCaseV1Schema,\n ChildSafetySourceSignalV1Schema,\n ChildSafetyDecisionV1Schema,\n ChildSafetyDecisionViewV1Schema,\n ChildSafetyCaseAccountV1Schema,\n ChildSafetyCaseAccountHistoryV1Schema,\n ChildSafetyNcmecSubmissionV1Schema,\n ChildSafetyNcmecSubmissionFileV1Schema,\n ChildSafetyLegalProcessEventV1Schema,\n} from './safety/case.js';\nimport {\n ChildSafetyOwningAliasV1Schema,\n} from './safety/case-aliases.js';\nimport {\n SafetyHoldRefV1Schema,\n SafetyHoldResourceV1Schema,\n SafetyResourceCommandV1Schema,\n SafetyResourceCommandAuthorizedRequestV1Schema,\n SafetyResourceCommandBypassRefV1Schema,\n} from './safety/holds.js';\nimport {\n SafetyEvidenceManifestV1Schema,\n SafetyEvidenceJobV1Schema,\n SafetyEvidenceJobItemV1Schema,\n SafetyEvidenceDispositionV1Schema,\n} from './safety/evidence.js';\nimport { EventProvenanceV1Schema } from './safety/provenance.js';\nimport {\n QuarantineSagaJobV1Schema,\n QuarantineSagaRelatedAssetV1Schema,\n NcmecSubmissionJobV1Schema,\n AccountActionCommandV1Schema,\n} from './safety/sagas.js';\nimport {\n SafetySlaMonitorV1Schema,\n SafetyMonitorHeartbeatV1Schema,\n} from './safety/monitors.js';\nimport { AgeAttestationNonceV1Schema, AgePolicyConfigV1Schema } from './safety/age.js';\nimport {\n PrivilegedReviewerPasskeyProfileV1Schema,\n PrivilegedReviewerCapabilityGrantV1Schema,\n} from './safety/reviewer-security.js';\n// ===== Trust & Safety — NCII / TAKE IT DOWN (§A11) =====\nimport { NciiAllegationV1Schema } from './ncii/allegations.js';\nimport {\n TakeItDownRequestRootV1Schema,\n TakeItDownRequesterPrivateV1Schema,\n TakeItDownSubmissionV1Schema,\n TakeItDownValidityDecisionV1Schema,\n TakeItDownRequestActionV1Schema,\n TakeItDownEvidenceV1Schema,\n NciiRetainedEvidenceInventoryV1Schema,\n} from './ncii/requests.js';\nimport {\n NciiCaseV1Schema,\n NciiCaseAllegationLinkV1Schema,\n NciiCaseRequestLinkV1Schema,\n NciiCaseRemovalActionV1Schema,\n NciiBlockedHashV1Schema,\n} from './ncii/cases.js';\nimport { NciiTemporaryHoldV1Schema } from './ncii/holds.js';\nimport {\n NciiRemovalJobV1Schema,\n NciiRemovalTargetV1Schema,\n} from './ncii/removal.js';\nimport {\n NciiPolicyConfigV1Schema,\n PrivilegedReviewerSecurityProfileV1Schema,\n} from './ncii/config.js';\n\nexport const COLLECTION_SCHEMAS = {\n // ===== Users =====\n 'userProfiles/{userId}': FullUserSchema,\n 'userProfiles/{userId}/privateData/{userId}': UserPrivateDataSchema,\n 'userProfiles/{userId}/privateData/hallLibraryPreferences': HallLibraryPreferencesSchema,\n 'userProfiles/{userId}/profileCraftSkills/{craftSkillId}': CraftSkillSchema,\n 'userProfiles/{userId}/auditionVotes/{auditionId}': UserAuditionVoteSchema,\n 'userProfiles/{userId}/mentionHistory/{docId}': MentionHistoryDocumentSchema,\n 'userProfiles/{userId}/notificationHistory/{notificationId}': NotificationHistoryDocSchema,\n 'userProfiles/{userId}/userLikes/likeHistory/squareStreetzLikes/{postId}': SquareStreetzLikeSchema,\n 'publicUsers/{uid}': PublicUserSchema,\n\n // ===== Work / Realm / Guild =====\n 'allWorkProjects/{workProjectId}': FullWorkProjectSchema,\n 'allWorkProjects/{workProjectId}/guildmateUsers/{uid}': GuildmateUserSchema,\n 'allWorkProjects/{workProjectId}/publicGuildmateUsers/{uid}': PublicGuildmateUserSchema,\n 'allWorkProjects/{workProjectId}/workFileFolders/{workFileFolderId}': WorkFileFolderSchema,\n 'allWorkProjects/{workProjectId}/workFileFolders/{workFileFolderId}/workFiles/{workFileId}': WorkFileSchema,\n 'allWorkProjects/{workProjectId}/workProjectTales/{taleId}': FullTaleSchema,\n 'allWorkProjects/{workProjectId}/workProjectTales/{taleId}/taleChapters/{chapterId}': FullChapterSchema,\n 'allWorkProjects/{workProjectId}/workProjectTunes/{tuneId}': FullTuneSchema,\n 'allWorkProjects/{workProjectId}/workProjectTunes/{tuneId}/tuneTracks/{trackId}': FullTuneTrackSchema,\n 'allWorkProjects/{workProjectId}/workProjectTelevision/{televisionId}': FullTelevisionSchema,\n 'allWorkProjects/{workProjectId}/workProjectTelevision/{televisionId}/televisionEpisodes/{episodeId}': FullTelevisionEpisodeSchema,\n 'allWorkProjects/{workProjectId}/guildChatChannels/{guildChatChannelId}': GuildChatChannelSchema,\n // Guild channel + invite messages are REALTIME-ONLY (chat Worker DO) — no Firestore schema.\n 'publicWorkProjects/{workProjectId}': PublicWorkProjectSchema,\n 'workRealms/{workRealmId}': WorkRealmSchema,\n 'guildInviteConversations/{guildInviteId}': GuildInviteConversationSchema,\n\n // ===== Square / Social =====\n // SquareStreetzPostSchema is a refined ZodObject (superRefine for the MEDIA-101\n // mediaAssetId↔mediaType pair invariant); the schema-doc generator and the\n // drift-check both unwrap the effect to introspect its shape, so binding the\n // refined schema here is correct.\n 'squareStreetzFeed/activePosts/socialPosts/{postId}': SquareStreetzPostSchema,\n 'squareStreetzFeed/trendingPosts': TrendingPostsSchema,\n 'followEdges/{followEdgeId}': FollowEdgeSchema,\n 'followCounters/{followCounterId}': FollowCounterSchema,\n // Durable Square announcement outbox (Admin-SDK-only; deterministic job ids).\n 'squareAnnouncementJobs/{jobId}': SquareAnnouncementJobSchema,\n\n // ===== Payments / pledge ledger =====\n 'pledgePayments/{pledgePaymentId}': PledgePaymentSchema,\n 'pledgePaymentProviderRefs/{pledgePaymentId}': PledgePaymentProviderRefSchema,\n 'processedStripeEvents/{stripeEventId}': ProcessedStripeEventSchema,\n 'pledgePaymentLedgerEvents/{ledgerId}': PledgePaymentLedgerEventSchema,\n 'paymentWebhookQuarantine/{stripeEventId}': PaymentWebhookQuarantineSchema,\n 'pledgePaymentTotals/summary': PledgePaymentTotalsDocSchema,\n 'pledgeRefundRequests/{requestId}': PledgeRefundRequestSchema,\n\n // ===== Threshold / Hall =====\n 'thresholdItems/{thresholdItemId}': ThresholdItemSchema,\n 'hallItems/{hallItemId}': PublishedHallItemSchema,\n // Published hall sub-item projections — the chapter/track/episode docs copied out of\n // the Work at publish time (runPublishApprovedHallLibraryItem). Segment names are the\n // HALL_ITEM_SUBCOLLECTIONS constants (the lowercased WorkProjectType).\n 'hallItems/{hallItemId}/tales/{itemId}': PublishedChapterSchema,\n 'hallItems/{hallItemId}/tunes/{itemId}': PublishedTuneTrackSchema,\n 'hallItems/{hallItemId}/television/{itemId}': PublishedTelevisionEpisodeSchema,\n 'hallContentChangeRequests/{changeRequestId}': HallContentChangeRequestSchema,\n\n // ===== Commission / Audition =====\n 'commissionListings/{commissionListingId}': FullCommissionListingSchema,\n 'commissionListings/{commissionListingId}/commissionProposals/{commissionProposalId}': CommissionProposalSchema,\n 'auditionBoard/{auditionId}': AuditionSchema,\n 'auditionBoard/{auditionId}/auditionEntries/{auditionEntryId}': AuditionEntrySchema,\n\n // ===== Moderation / Reports / Admin =====\n // The report spine (§A1): the restricted root, its public projection subdoc, and the\n // dedup/count group. The root + projection are written by the app's submitReport\n // callable; the group is maintained by an app-side trigger.\n 'contentReports/{reportId}': ProtectedReportRootV1Schema,\n 'contentReports/{reportId}/publicProjection/{reportId}': ReportPublicProjectionV1Schema,\n 'contentReports/{reportId}/private/snapshot': ReportTargetSnapshotV1Schema,\n 'contentReports/{reportId}/private/narrative': NarrativeRecordV1Schema,\n 'activeReportGroups/{groupKey}': ReportGroupV1Schema,\n 'adminTasks/{taskId}': AdminTaskDocSchema,\n 'contentViolations/{violationId}': ContentViolationSchema,\n 'moderationCascadeManifests/{cascadeId}': ModerationCascadeManifestSchema,\n 'moderationCascadeManifests/{cascadeId}/changedDocs/{changedDocId}': ModerationCascadeChangedDocSchema,\n 'auditEvents/{eventId}': TTTAuditEventSchema,\n 'stakeShareAuditEvents/{eventId}': StakeShareAuditEventSchema,\n 'pendingAdminDispatches/{adminDispatchId}': AdminDispatchSchema,\n 'pendingAdminDispatches/{adminDispatchId}/conversationMessages/{adminDispatchMessageId}': ChatMessageV1Schema,\n\n // ===== Media pipeline =====\n 'pendingMedia/{pendingMediaId}': PendingMediaSchema,\n 'pendingMediaArchive/{pendingMediaId}': ArchivedPendingMediaSchema,\n 'mediaAssets/{mediaAssetId}': MediaAssetSchema,\n 'mediaActivationJobs/{jobId}': MediaActivationJobSchema,\n\n // ===== Notifications =====\n 'activeUserNotifications/{notificationId}': NotificationDocSchema,\n 'activeAdminNotifications/{notificationId}': NotificationDocSchema,\n 'adminNotificationHistory/{notificationId}': NotificationHistoryDocSchema,\n 'pendingNotifications/{notificationId}': PendingNotificationSchema,\n\n // ===== Notification redesign — delivery ledger + fanout engine =====\n 'notificationDeliveries/{deliveryId}': NotificationDeliverySchema,\n 'notificationFanoutJobs/{jobId}': NotificationFanoutJobSchema,\n\n // ===== Chat realtime sync / projection / commands =====\n 'chatChannelAuthProjections/{authPairKey}': ChatChannelAuthProjectionSchema,\n 'chatScopeDegraded/{scopeKey}': ChatScopeDegradedSchema,\n 'chatScopeDegraded/{scopeKey}/causes/{causeId}': ChatScopeDegradedCauseSchema,\n 'chatSyncEvents/{eventId}': ChatSyncEventSchema,\n 'chatSyncFanoutJobs/{jobId}': ChatSyncFanoutJobSchema,\n 'chatMessageOutbox/{commandId}': ChatMessageOutboxSchema,\n 'chatAdminActionCommands/{requestId}': ChatAdminActionCommandSchema,\n 'chatHistoryAnonymizationJobs/{jobId}': ChatHistoryAnonymizationJobSchema,\n 'chatHistoryAnonymizationJobs/{jobId}/affectedChunks/{chunkOrdinal}': ChatHistoryAnonymizationAffectedChunkSchema,\n\n // ===== Craft skills index =====\n 'craftSkillsByTag/{tag}/taggedCraftSkills/{compositeId}': CraftSkillReferenceSchema,\n\n // ===== Operational / utility =====\n 'reservedDisplayNames/{displayNameUppercase}': ReservedDisplayNameSchema,\n 'reservedRealmNames/{workingTitleUppercase}': ReservedRealmNameSchema,\n 'accountDeletionRequests/{uid}': AccountDeletionRequestV1Schema,\n 'shortLinks/{shortId}': ShortLinkSchema,\n 'feedbackAliases/{aliasId}': FeedbackAliasSchema,\n 'feedbackSubmissions/{feedbackType}/userSuggestions/{suggestionId}': UserSuggestionSchema,\n 'statusReconcileQueue/{uid}': StatusReconcileQueueEntrySchema,\n\n // ===== Trust & Safety — child-safety case spine (§A1b, §A2) =====\n 'childSafetyCaseList/{caseId}': ChildSafetyCaseListV1Schema,\n 'activeSafetyCaseAlerts/{caseId}': SafetyCaseAlertV1Schema,\n 'childSafetyCases/{caseId}': ChildSafetyCaseV1Schema,\n 'childSafetyCases/{caseId}/sourceSignals/{signalId}': ChildSafetySourceSignalV1Schema,\n 'childSafetyCases/{caseId}/decisions/{decisionId}': ChildSafetyDecisionV1Schema,\n 'childSafetyCases/{caseId}/decisions/{decisionId}/views/{viewId}': ChildSafetyDecisionViewV1Schema,\n 'childSafetyCases/{caseId}/accounts/{uid}': ChildSafetyCaseAccountV1Schema,\n 'childSafetyCases/{caseId}/accounts/{uid}/history/{historyId}': ChildSafetyCaseAccountHistoryV1Schema,\n 'childSafetyCases/{caseId}/ncmecSubmissions/{submissionId}': ChildSafetyNcmecSubmissionV1Schema,\n 'childSafetyCases/{caseId}/ncmecSubmissions/{submissionId}/files/{fileId}': ChildSafetyNcmecSubmissionFileV1Schema,\n 'childSafetyCases/{caseId}/legalProcess/{eventId}': ChildSafetyLegalProcessEventV1Schema,\n 'childSafetyOwningAliases/{aliasId}': ChildSafetyOwningAliasV1Schema,\n\n // ===== Trust & Safety — holds + resource commands (§A3) =====\n 'safetyHoldRefs/{holdRefId}': SafetyHoldRefV1Schema,\n 'safetyHoldResources/{resourceKeyHash}': SafetyHoldResourceV1Schema,\n 'safetyResourceCommands/{commandDocId}': SafetyResourceCommandV1Schema,\n 'safetyResourceCommands/{commandDocId}/authorizedRequests/{requestId}': SafetyResourceCommandAuthorizedRequestV1Schema,\n 'safetyResourceCommands/{commandDocId}/bypassRefs/{refId}': SafetyResourceCommandBypassRefV1Schema,\n\n // ===== Trust & Safety — evidence + provenance (§A4, §A6) =====\n // SafetyEvidenceManifestV1Schema is a refined ZodObject (superRefine for the H5\n // sourceKind invariant); the schema-doc generator unwraps the effect to introspect\n // its shape, so binding the refined schema here is correct.\n 'safetyEvidenceManifests/{manifestId}': SafetyEvidenceManifestV1Schema,\n 'safetyEvidenceJobs/{jobId}': SafetyEvidenceJobV1Schema,\n 'safetyEvidenceJobs/{jobId}/items/{itemId}': SafetyEvidenceJobItemV1Schema,\n 'safetyEvidenceJobs/{jobId}/disposition/{locationId}': SafetyEvidenceDispositionV1Schema,\n 'eventProvenance/{eventId}': EventProvenanceV1Schema,\n\n // ===== Trust & Safety — sagas + closure (§A5) =====\n 'quarantineSagaJobs/{caseId}': QuarantineSagaJobV1Schema,\n 'quarantineSagaJobs/{caseId}/relatedAssets/{assetId}': QuarantineSagaRelatedAssetV1Schema,\n 'ncmecSubmissionJobs/{ncmecJobId}': NcmecSubmissionJobV1Schema,\n 'accountActionCommands/{accountActionCommandId}': AccountActionCommandV1Schema,\n\n // ===== Trust & Safety — SLA monitors + heartbeat (§A8) =====\n 'safetySlaMonitors/{monitorId}': SafetySlaMonitorV1Schema,\n 'safetyMonitorHeartbeat/global': SafetyMonitorHeartbeatV1Schema,\n\n // ===== Trust & Safety — age attestation nonces (§A7) =====\n 'ageAttestationNonces/{nonceHash}': AgeAttestationNonceV1Schema,\n\n // ===== Trust & Safety — per-operator privileged-reviewer security (§A11 [M-6] / [H-17]) =====\n // Backend-only (Cloud-Functions-only readers/writers; client access denied in firestore.rules).\n 'privilegedReviewerPasskeyProfiles/{uid}': PrivilegedReviewerPasskeyProfileV1Schema,\n 'privilegedReviewerCapabilityGrants/{uid}': PrivilegedReviewerCapabilityGrantV1Schema,\n\n // ===== Trust & Safety — NCII / TAKE IT DOWN (§A11) =====\n 'nciiAllegations/{allegationId}': NciiAllegationV1Schema,\n 'takeItDownRequests/{requestId}': TakeItDownRequestRootV1Schema,\n 'takeItDownRequests/{requestId}/private/requester': TakeItDownRequesterPrivateV1Schema,\n 'takeItDownRequests/{requestId}/submissions/{submissionId}': TakeItDownSubmissionV1Schema,\n 'takeItDownRequests/{requestId}/validityDecisions/{decisionId}': TakeItDownValidityDecisionV1Schema,\n 'takeItDownRequests/{requestId}/actions/{actionId}': TakeItDownRequestActionV1Schema,\n 'takeItDownRequests/{requestId}/evidence/{evidenceId}': TakeItDownEvidenceV1Schema,\n 'nciiCases/{caseId}': NciiCaseV1Schema,\n 'nciiCases/{caseId}/allegationLinks/{allegationId}': NciiCaseAllegationLinkV1Schema,\n 'nciiCases/{caseId}/requestLinks/{requestId}': NciiCaseRequestLinkV1Schema,\n 'nciiCases/{caseId}/removalActions/{actionId}': NciiCaseRemovalActionV1Schema,\n 'nciiCases/{caseId}/blockedHashes/{hashId}': NciiBlockedHashV1Schema,\n 'nciiRetainedEvidenceInventory/{inventoryId}': NciiRetainedEvidenceInventoryV1Schema,\n // [H-01] dead-letter sink for inventory rows that could not be written to the primary\n // nciiRetainedEvidenceInventory collection. Stores the same document shape.\n 'nciiInventoryDeadLetter/{inventoryId}': NciiRetainedEvidenceInventoryV1Schema,\n 'nciiTemporaryHolds/{holdId}': NciiTemporaryHoldV1Schema,\n 'nciiRemovalJobs/{jobId}': NciiRemovalJobV1Schema,\n 'nciiRemovalJobs/{jobId}/targets/{targetKeyHash}': NciiRemovalTargetV1Schema,\n\n // ===== _config singletons (public) =====\n '_config/app': AppConfigSchema,\n '_config/futurePlans': FuturePlansDocumentSchema,\n '_config/rulesAndAgreements': RulesAndAgreementsSchema,\n // Content-pages migration (DJ ruling 2026-07-06): /terms, /privacy, and the\n // /take-it-down page copy render exclusively from these (all public pages —\n // take-it-down is a NO-LOGIN page, so its copy doc must be publicly readable).\n '_config/termsOfService': LegalPageDocumentSchema,\n '_config/privacyPolicy': LegalPageDocumentSchema,\n '_config/takeItDownPageCopy': TakeItDownPageCopySchema,\n\n // ===== _serverData singletons (server-only — Cloud-Functions-only readers, BACKEND-108) =====\n '_serverData/agePolicy': AgePolicyConfigV1Schema,\n '_serverData/nciiPolicy': NciiPolicyConfigV1Schema,\n '_serverData/privilegedReviewerSecurity': PrivilegedReviewerSecurityProfileV1Schema,\n\n // ===== _systemData singletons =====\n '_systemData/adminList': AdminListSchema,\n '_systemData/profanityList': ProfanityListSchema,\n '_systemData/reservedUsernames': ReservedUsernamesSchema,\n '_systemData/blockedFranchiseNames': BlockedFranchiseNamesSchema,\n '_systemData/appMode': AppModeMarkerSchema,\n} as const satisfies Record<string, z.ZodTypeAny>;\n\nexport type RegisteredCollectionPath = keyof typeof COLLECTION_SCHEMAS;\n\n/**\n * Doc-id field annotation: for the listed bindings, the named body field equals the\n * Firestore document id and is injected at READ time (`{ ...doc.data(), <field>: doc.id }`),\n * never persisted — the write callables store the body via `Omit<…, '<field>'>`. The bound\n * schema models the (correct) consumer/read shape, where the field is required, so a raw\n * stored doc is \"missing\" it. The drift-check injects `{ [field]: doc.id, ...data }` before\n * validating, generalizing the one-off `AdminTaskDocSchema` stored-shape workaround into a\n * single mechanism so real-callable drift-checks don't false-flag every doc-id collection.\n * The schema-doc generator ignores this map. Keys are compiler-checked against the registry.\n */\nexport const COLLECTION_DOC_ID_FIELDS = {\n 'allWorkProjects/{workProjectId}/workProjectTales/{taleId}': 'uid',\n 'allWorkProjects/{workProjectId}/workProjectTales/{taleId}/taleChapters/{chapterId}': 'uid',\n 'allWorkProjects/{workProjectId}/workProjectTunes/{tuneId}': 'uid',\n 'allWorkProjects/{workProjectId}/workProjectTunes/{tuneId}/tuneTracks/{trackId}': 'uid',\n 'allWorkProjects/{workProjectId}/workProjectTelevision/{televisionId}': 'uid',\n 'allWorkProjects/{workProjectId}/workProjectTelevision/{televisionId}/televisionEpisodes/{episodeId}': 'uid',\n 'allWorkProjects/{workProjectId}/guildChatChannels/{guildChatChannelId}': 'guildChatChannelId',\n // Published hall sub-items: the doc id IS the live sub-item's id; `uid` is injected at\n // read (the publish writer spreads the live doc's stored body, which has no `uid`).\n 'hallItems/{hallItemId}/tales/{itemId}': 'uid',\n 'hallItems/{hallItemId}/tunes/{itemId}': 'uid',\n 'hallItems/{hallItemId}/television/{itemId}': 'uid',\n 'activeUserNotifications/{notificationId}': 'id',\n 'activeAdminNotifications/{notificationId}': 'id',\n 'adminNotificationHistory/{notificationId}': 'archiveOccurrenceId',\n 'userProfiles/{userId}/notificationHistory/{notificationId}': 'archiveOccurrenceId',\n 'pendingNotifications/{notificationId}': 'id',\n 'statusReconcileQueue/{uid}': 'uid',\n} as const satisfies Partial<Record<RegisteredCollectionPath, string>>;\n\n/**\n * Collections that exist (in COLLECTIONS / *_SUBCOLLECTIONS or firestore.rules) but are\n * intentionally NOT bound to a schema, each with a reason. Listed EXPLICITLY so completeness is\n * enforced and nothing is silently uncovered; the registry test fails if a NEW unlisted collection\n * appears. These three are the only remaining gaps after the schema-registry binding pass:\n *\n * - userMetadata: `userProfiles/{uid}/userMetadata/notificationSettings` — a firestore.rules\n * match and `PATH_BUILDERS.userMetadata` exist, but there is no live reader/writer and no\n * notification-settings type anywhere yet. Bind once that shape is implemented.\n * - checkedOutItems: a `userProfiles/{uid}/checkedOutItems` subcollection constant with no writer,\n * reader, rule, or path-builder (the admin \"checked out items\" UI reads adminTasks by\n * `checkoutDetails.userId`, not this subcollection). Vestigial — remove once confirmed safe.\n * - feedbackDenylist: `feedbackDenylist/{deniedWord}` — Console-managed (firestore.rules §3F: no\n * callable writes it) and submitFeedback reads it via `.exists` only, so there is no field\n * contract to author a schema from. The doc id is the denied word; the body is unused.\n */\nexport const PENDING_COLLECTIONS: readonly string[] = [\n 'userMetadata',\n 'checkedOutItems',\n 'feedbackDenylist',\n // Append-only NCII case closure/reopen event rows — the doc shape is owned app-side\n // (NciiCaseV1 closure events), not modeled in ttt-core doc-schemas.\n 'closureEvents',\n] as const;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"age.d.ts","sourceRoot":"","sources":["../../../src/doc-schemas/safety/age.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"age.d.ts","sourceRoot":"","sources":["../../../src/doc-schemas/safety/age.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,8DAA8D;AAC9D,eAAO,MAAM,gBAAgB;;;EAA4B,CAAC;AAC1D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CA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;;;;;;;;;;;;;;;;;;CAWhC,CAAC;AAUX,OAAO,EAAE,mCAAmC,EAAE,MAAM,iBAAiB,CAAC;AACtE,YAAY,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAErE;;sBAEsB;AACtB,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;kBAGtC,CAAC;AACZ,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC"}
|
|
@@ -17,9 +17,10 @@
|
|
|
17
17
|
// orchestrator merges into `UserPrivateDataSchema` (privateData/{uid}). This file
|
|
18
18
|
// does NOT edit user.ts.
|
|
19
19
|
//
|
|
20
|
-
// Every field/enum/optionality/bound is transcribed verbatim from the frozen
|
|
21
|
-
// (
|
|
22
|
-
//
|
|
20
|
+
// Every field/enum/optionality/bound is transcribed verbatim from the frozen Trust &
|
|
21
|
+
// Safety spec (Appendix A); the durable design owners are ttt-prod
|
|
22
|
+
// docs/design/age-gating-and-account-types.md and
|
|
23
|
+
// docs/design/age-data-handling-profile.md — no invented values, no placeholders.
|
|
23
24
|
//
|
|
24
25
|
// `RegistrationCompletionOutcome` is the DOMAIN outcome that feeds the orphan-Auth
|
|
25
26
|
// deletion policy; it is the SINGLE SOURCE in ./foundation.js and is IMPORTED here
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"age.js","sourceRoot":"","sources":["../../../src/doc-schemas/safety/age.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,qFAAqF;AACrF,kBAAkB;AAClB,EAAE;AACF,qBAAqB;AACrB,iFAAiF;AACjF,oFAAoF;AACpF,sEAAsE;AACtE,uFAAuF;AACvF,qFAAqF;AACrF,8CAA8C;AAC9C,uFAAuF;AACvF,mFAAmF;AACnF,iCAAiC;AACjC,0DAA0D;AAC1D,kFAAkF;AAClF,sFAAsF;AACtF,6BAA6B;AAC7B,EAAE;AACF,kFAAkF;AAClF,sFAAsF;AACtF,oCAAoC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D,CAAC,CAAC,MAAM,EAAE,CAAC;AAGZ;mDACmD;AACnD,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,WAAW,EAAE,gBAAgB;IAC7B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACnC,wBAAwB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC1C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,mBAAmB,EAAE,wCAAwC,CAAC,QAAQ,EAAE;IACxE,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE;IACvE,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5C,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC;AAEX,8EAA8E;AAC9E,sEAAsE;AACtE,EAAE;AACF,mFAAmF;AACnF,qFAAqF;AACrF,gCAAgC;AAChC,8EAA8E;AAE9E,OAAO,EAAE,mCAAmC,EAAE,MAAM,iBAAiB,CAAC;AAGtE;;sBAEsB;AACtB,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D,OAAO,EAAE,mCAAmC;IAC5C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,qDAAqD;CACzF,CAAC,CAAC,MAAM,EAAE,CAAC","sourcesContent":["// Trust & Safety — age attestation, registration nonce, and account age-fields\n// (Appendix A §A7 — \"Age (full contract)\" + the §A11 [H6] concrete AgePolicyConfigV1\n// default block).\n//\n// This cluster owns:\n// - `ageAttestationNonces/{nonceHash}` (AgeAttestationNonceV1) — the one-time,\n// 256-bit server-generated registration nonce. Only the SHA-256 of the nonce is\n// the doc id; the raw nonce appears only inside the signed token.\n// - The pinned `ageBracketAttestation` JWS payload-claims shape [M-09] — the DECODED\n// claims of the compact JWS (JWT, RFC 7519, alg=HS256) issued at /api/age/attest\n// and verified at /api/register/complete.\n// - The `__Secure-ttt_age_session` cookie spec [F13] (an exported const, NOT a doc).\n// - `AgePolicyConfigV1` (the `_config/agePolicy` singleton) + its pinned literal\n// default const (§A11 [H6]).\n// - The teen→adult `ageUpgradeAttestation` token shape.\n// - `UserPrivateDataAgeFieldsSchema` — the STANDALONE age-fields shape that the\n// orchestrator merges into `UserPrivateDataSchema` (privateData/{uid}). This file\n// does NOT edit user.ts.\n//\n// Every field/enum/optionality/bound is transcribed verbatim from the frozen spec\n// (docs/code_changes_needed/trust-and-safety/IMPLEMENTATION_PLAN.md, Appendix A) — no\n// invented values, no placeholders.\n//\n// `RegistrationCompletionOutcome` is the DOMAIN outcome that feeds the orphan-Auth\n// deletion policy; it is the SINGLE SOURCE in ./foundation.js and is IMPORTED here\n// (never redefined).\n//\n// Timestamp convention: epoch-MILLISECONDS via z.number() — EXCEPT the JWS token\n// claims `iat`/`exp`, which are epoch-SECONDS per JWT (RFC 7519); those are commented\n// at the claim.\n\nimport { z } from 'zod';\nimport { RegistrationCompletionOutcomeSchema } from './foundation.js';\n\n// ===========================================================================\n// A7 — ageAttestationNonces/{nonceHash} (AgeAttestationNonceV1)\n// One-time, 256-bit server-generated nonce. Only the nonce's SHA-256 is the doc id;\n// the raw nonce appears only inside the signed token. 10-minute TTL; one successful\n// consume, transactionally bound to the new Auth uid AND the requestSessionHash;\n// expired/used/unknown fails closed. Spent records auto-delete ~24h after consume/expiry\n// via a Firestore native-TTL policy on `ttlExpireAt` (F-018) — no scheduled reaper.\n// ===========================================================================\n\n/** Server-derived audience bracket — NEVER client-derived. */\nexport const AgeBracketSchema = z.enum(['teen', 'adult']);\nexport type AgeBracket = z.infer<typeof AgeBracketSchema>;\n\n/** Nonce lifecycle status. `expired`/`consumed`/unknown all fail closed at consume. */\nexport const AgeAttestationNonceStatusSchema = z.enum(['issued', 'consumed', 'expired']);\nexport type AgeAttestationNonceStatus = z.infer<typeof AgeAttestationNonceStatusSchema>;\n\n/** `ageAttestationNonces/{nonceHash}` — the registration attestation nonce record.\n * Doc id is the SHA-256 hex of the 256-bit server nonce (deterministic; the raw\n * nonce lives only in the signed token, never in Firestore). */\nexport const AgeAttestationNonceV1Schema = z.object({\n schemaVersion: z.literal(1),\n bracket: AgeBracketSchema, // SERVER-derived audience bracket\n policyVersion: z.string().min(1), // the agePolicyVersion in force when issued\n signingKeyVersion: z.string().min(1), // the versioned KMS/Secret-Manager key that signs the token (= JWS `kid`)\n requestSessionHash: z.string().min(1), // SHA-256 of the registering session/request marker — the binding (High-6 §D)\n issuedAt: z.number(), // epoch ms\n expiresAt: z.number(), // epoch ms; issuedAt + 10-min TTL\n consumedAt: z.number().optional(), // epoch ms; set on the one successful consume\n consumedByUid: z.string().min(1).optional(), // the new Auth uid this nonce was transactionally bound to\n status: AgeAttestationNonceStatusSchema,\n // [Q21.5 REVISED — DJ 2026-07-06] The nonce carries NO date of birth for ANY bracket.\n // Registration never persists a DOB (adult or teen — only the derived bracket survives);\n // the previous adult-bracket `dateOfBirth` carry field was removed. The ONLY place a DOB\n // is ever persisted is becomeArtisanCreator ('artisanOnboarding') — see\n // UserPrivateDataAgeFieldsSchema below. Raw DOBs remain no-log everywhere.\n // [F-018] Firestore NATIVE-TTL field. Set to a real Firestore `Timestamp` of (consume/expire time +\n // ~24h) at the moment the nonce becomes spent; a TTL policy on `ageAttestationNonces.ttlExpireAt`\n // then auto-deletes the spent single-use record (no scheduled reaper). DOCUMENTED EXCEPTION to this\n // file's epoch-ms-number convention: native TTL requires a real Timestamp, and this field is\n // WRITE-ONLY (never read by app code), so it is typed opaquely here (`z.unknown`) to avoid pulling a\n // firebase `Timestamp` type into the environment-agnostic ttt-core schema layer (the app writes it via\n // `admin.firestore.Timestamp.fromMillis`, mirroring notification-core's `expireAt`). Absent until spent.\n ttlExpireAt: z.unknown().optional(),\n}).strict();\nexport type AgeAttestationNonceV1 = z.infer<typeof AgeAttestationNonceV1Schema>;\n\n// ===========================================================================\n// A7 [M-09] — ageBracketAttestation JWS payload claims (the ONE pinned wire format)\n//\n// The token is a COMPACT JWS (JWT, RFC 7519) with alg=HS256, signed by the versioned\n// KMS/Secret-Manager key. The schema below validates the DECODED PAYLOAD CLAIMS only.\n//\n// JOSE header (NOT part of this schema — documented for the verifier):\n// { \"alg\": \"HS256\", \"typ\": \"JWT\", \"kid\": <signingKeyVersion> } // kid = the exact signingKeyVersion\n//\n// Serialization: standard JWS compact form\n// base64url(header) '.' base64url(payload) '.' base64url(sig)\n// the signature is base64url (no padding); claim names + types are EXACTLY as below\n// (no extra claims).\n//\n// Verification REQUIRES (fail-closed on any miss): valid HS256 signature under the key\n// named by `kid`; aud == \"ttt-register-complete\"; iss == \"ttt-age-attest\"; exp not\n// passed; sub matches the ageAttestationNonces doc being consumed; rsh matches the\n// request's requestSessionHash.\n//\n// `iat`/`exp` are epoch-SECONDS (per JWT), NOT epoch-millis like the rest of this file.\n// ===========================================================================\n\nexport const AgeBracketAttestationClaimsV1Schema = z.object({\n iss: z.literal('ttt-age-attest'), // issuer\n aud: z.literal('ttt-register-complete'), // AUDIENCE/purpose binding — /api/register/complete MUST verify aud\n sub: z.string().min(1), // the SHA-256 nonce hash (also the ageAttestationNonces doc id)\n iat: z.number().int(), // epoch SECONDS (per JWT)\n exp: z.number().int(), // epoch SECONDS (per JWT); exp = iat + 600 (10-min TTL)\n bkt: AgeBracketSchema, // the SERVER-derived bracket (never client-derived)\n pv: z.string().min(1), // agePolicyVersion string\n rsh: z.string().min(1), // sha256(cookieValue) — the session binding\n}).strict();\nexport type AgeBracketAttestationClaimsV1 = z.infer<typeof AgeBracketAttestationClaimsV1Schema>;\n\n// ===========================================================================\n// A7 [F13] — Age-session cookie spec (`__Secure-ttt_age_session`)\n//\n// Pinned cookie attributes. The cookie VALUE is a cryptographically-random value\n// generated per registration attempt; only requestSessionHash = sha256(cookieValue)\n// is stored (with the nonce) — the raw cookie value is NEVER persisted. A separate\n// non-unique UX marker may exist for display, but is NEVER the security binding.\n//\n// `Domain` is omitted (host-only) — represented here by `hostOnly: true`.\n// ===========================================================================\n\nexport const AGE_SESSION_COOKIE_SPEC = {\n name: '__Secure-ttt_age_session',\n hostOnly: true, // Domain attribute omitted → host-only cookie\n path: '/api',\n secure: true,\n httpOnly: true,\n sameSite: 'Strict',\n maxAgeSeconds: 600, // 10 min\n} as const;\n\n// ===========================================================================\n// A7 / A11 [H6] — AgePolicyConfigV1 (the `_config/agePolicy` singleton)\n//\n// The generic gRPC retryable/terminal code lists are REMOVED — deletion is driven\n// ONLY by the RegistrationCompletionOutcome domain enum (§A7). No raw gRPC code ever\n// deletes an account. noDeleteOutcomes / terminalDeletableOutcomes are typed against\n// the imported RegistrationCompletionOutcome enum so the two arrays can never drift\n// from the domain outcome set.\n// ===========================================================================\n\nexport const AgePolicyConfigV1Schema = z.object({\n agePolicyVersion: z.string().min(1),\n registrationGracePeriodMinutes: z.number().int(),\n cleanupSchedule: z.string().min(1), // cron expression for the orphan-Auth cleanup worker\n ageTokenTtlSeconds: z.number().int(), // [M-09] token TTL\n keyRetirementVerificationMinutes: z.number().int(), // [M-09] retired-signingKeyVersion verification window (> TTL so no live token is orphaned by a rotation)\n noDeleteOutcomes: z.array(RegistrationCompletionOutcomeSchema),\n terminalDeletableOutcomes: z.array(RegistrationCompletionOutcomeSchema),\n}).strict();\nexport type AgePolicyConfigV1 = z.infer<typeof AgePolicyConfigV1Schema>;\n\n/** The pinned literal default for `_config/agePolicy` (§A11 [H6] concrete config\n * values). Build defaults — transcribed verbatim from the frozen spec. */\nexport const DEFAULT_AGE_POLICY_CONFIG_V1: AgePolicyConfigV1 = {\n agePolicyVersion: '2026-06-19.general-audience.v1',\n registrationGracePeriodMinutes: 30,\n cleanupSchedule: '*/15 * * * *',\n ageTokenTtlSeconds: 600,\n keyRetirementVerificationMinutes: 15,\n noDeleteOutcomes: [\n 'completed',\n 'alreadyCompletedSameUid',\n 'retryableInfrastructureFailure',\n 'reauthenticationRequired',\n 'appCheckRetryRequired',\n 'privateDataConflict',\n ],\n terminalDeletableOutcomes: [\n 'nonceExpired',\n 'nonceUnknown',\n 'nonceConsumedDifferentUid',\n 'sessionHashMismatch',\n 'attestationSignatureInvalid',\n 'policyVersionRejected',\n ],\n};\n\n// ===========================================================================\n// A7 — teen→adult ageUpgradeAttestation token\n//\n// A SEPARATE token (not the registration nonce) issued to an authenticated,\n// recently-reauthenticated session. Binds uid + accountCapabilityVersion +\n// policyVersion + issued/expiry + nonce; consumed ONLY for that uid+version; never\n// the registration nonce, never cross-account.\n//\n// This is a token claims shape (decoded payload), NOT a stored Firestore doc.\n// ===========================================================================\n\nexport const AgeUpgradeAttestationV1Schema = z.object({\n uid: z.string().min(1), // the authenticated, recently-reauthenticated account\n accountCapabilityVersion: z.number().int(), // the capability version this upgrade is bound to\n policyVersion: z.string().min(1), // agePolicyVersion in force\n issuedAt: z.number(), // epoch ms\n expiresAt: z.number(), // epoch ms\n nonce: z.string().min(1), // single-use upgrade nonce (never the registration nonce; never cross-account)\n}).strict();\nexport type AgeUpgradeAttestationV1 = z.infer<typeof AgeUpgradeAttestationV1Schema>;\n\n// ===========================================================================\n// A7 — UserPrivateData age fields (STANDALONE shape for the orchestrator)\n//\n// These fields live on `privateData/{uid}` (server-write-only). They are exported as\n// a STANDALONE object shape so the orchestrator can merge them into\n// `UserPrivateDataSchema` in user.ts WITHOUT this file editing user.ts.\n// ===========================================================================\n\n/** Manual age-correction audit stub (who corrected, when, why) — embedded on the\n * private user data when a reviewer hand-corrects the recorded age state. */\nexport const UserPrivateDataAgeManualCorrectionSchema = z.object({\n at: z.number(), // epoch ms\n actorId: z.string().min(1),\n reason: z.string().min(1),\n}).strict();\nexport type UserPrivateDataAgeManualCorrection = z.infer<typeof UserPrivateDataAgeManualCorrectionSchema>;\n\n/** STANDALONE age-fields shape — the orchestrator merges these into\n * `UserPrivateDataSchema` (privateData/{uid}, server-write-only). Exported as a raw\n * object shape (NOT a z.object) so it can be spread into the canonical schema. */\nexport const UserPrivateDataAgeFieldsSchema = z.object({\n accountType: AgeBracketSchema, // 'teen' | 'adult'\n is18Plus: z.boolean(),\n agePolicyVersion: z.string().min(1),\n accountCapabilityVersion: z.number().int(),\n ageAttestedAt: z.number(), // epoch ms\n adultUpgradedAt: z.number().optional(), // epoch ms; set on a successful teen→adult upgrade\n ageManualCorrection: UserPrivateDataAgeManualCorrectionSchema.optional(),\n // [Q21.5 REVISED — DJ 2026-07-06, counsel review pending in the lawyer packet] The DOB is\n // persisted at EXACTLY ONE point: becomeArtisanCreator ('artisanOnboarding'). Registration\n // and the teen→adult upgrade derive the bracket server-side and persist NO DOB for anyone\n // (the register screen's \"It is not stored\" notice is literally true). Rationale: the\n // payout-KYC cross-check (compare to Stripe KYC DOB before paying out) only ever applies to\n // artisans — the money boundary — so collection happens there, with UI copy warning the\n // DOB must match the user's future payout identity. Server re-derives 18+ from the entered\n // DOB; an under-18 derivation rejects with a failure audit and stores nothing. PII —\n // privateData only (BACKEND-105); same no-log posture as the raw DOB (scrubber + canary).\n attestedDateOfBirth: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}$/).optional(), // 'YYYY-MM-DD'\n attestedDobRecordedAt: z.number().optional(), // epoch ms\n attestedDobSource: z.enum(['artisanOnboarding']).optional(),\n}).strict();\nexport type UserPrivateDataAgeFields = z.infer<typeof UserPrivateDataAgeFieldsSchema>;\n\n/** The raw shape (for the orchestrator to `.extend(...)` / spread into\n * `UserPrivateDataSchema` without re-wrapping). */\nexport const userPrivateDataAgeFieldsShape = {\n accountType: AgeBracketSchema,\n is18Plus: z.boolean(),\n agePolicyVersion: z.string().min(1),\n accountCapabilityVersion: z.number().int(),\n ageAttestedAt: z.number(),\n adultUpgradedAt: z.number().optional(),\n ageManualCorrection: UserPrivateDataAgeManualCorrectionSchema.optional(),\n attestedDateOfBirth: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}$/).optional(),\n attestedDobRecordedAt: z.number().optional(),\n attestedDobSource: z.enum(['artisanOnboarding']).optional(),\n} as const;\n\n// ===========================================================================\n// A7 — Registration-completion RESULT (uses the IMPORTED domain enum)\n//\n// `completeRegistration.ts` returns exactly one RegistrationCompletionOutcome. The\n// enum itself is the SINGLE SOURCE in ./foundation.js — re-exported here for cluster\n// convenience, NEVER redefined.\n// ===========================================================================\n\nexport { RegistrationCompletionOutcomeSchema } from './foundation.js';\nexport type { RegistrationCompletionOutcome } from './foundation.js';\n\n/** The result envelope `completeRegistration.ts` returns. `outcome` is the imported\n * domain enum (never a raw gRPC code); only this domain outcome feeds the orphan-Auth\n * deletion policy. */\nexport const RegistrationCompletionResultV1Schema = z.object({\n outcome: RegistrationCompletionOutcomeSchema,\n uid: z.string().min(1).optional(), // present on 'completed' / 'alreadyCompletedSameUid'\n}).strict();\nexport type RegistrationCompletionResultV1 = z.infer<typeof RegistrationCompletionResultV1Schema>;\n"]}
|
|
1
|
+
{"version":3,"file":"age.js","sourceRoot":"","sources":["../../../src/doc-schemas/safety/age.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,qFAAqF;AACrF,kBAAkB;AAClB,EAAE;AACF,qBAAqB;AACrB,iFAAiF;AACjF,oFAAoF;AACpF,sEAAsE;AACtE,uFAAuF;AACvF,qFAAqF;AACrF,8CAA8C;AAC9C,uFAAuF;AACvF,mFAAmF;AACnF,iCAAiC;AACjC,0DAA0D;AAC1D,kFAAkF;AAClF,sFAAsF;AACtF,6BAA6B;AAC7B,EAAE;AACF,qFAAqF;AACrF,mEAAmE;AACnE,kDAAkD;AAClD,kFAAkF;AAClF,EAAE;AACF,mFAAmF;AACnF,mFAAmF;AACnF,qBAAqB;AACrB,EAAE;AACF,iFAAiF;AACjF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IAC3C,WAAW,EAAE,gBAAgB;IAC7B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACnC,wBAAwB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC1C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,mBAAmB,EAAE,wCAAwC,CAAC,QAAQ,EAAE;IACxE,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE;IACvE,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5C,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC;AAEX,8EAA8E;AAC9E,sEAAsE;AACtE,EAAE;AACF,mFAAmF;AACnF,qFAAqF;AACrF,gCAAgC;AAChC,8EAA8E;AAE9E,OAAO,EAAE,mCAAmC,EAAE,MAAM,iBAAiB,CAAC;AAGtE;;sBAEsB;AACtB,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D,OAAO,EAAE,mCAAmC;IAC5C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,qDAAqD;CACzF,CAAC,CAAC,MAAM,EAAE,CAAC","sourcesContent":["// Trust & Safety — age attestation, registration nonce, and account age-fields\n// (Appendix A §A7 — \"Age (full contract)\" + the §A11 [H6] concrete AgePolicyConfigV1\n// default block).\n//\n// This cluster owns:\n// - `ageAttestationNonces/{nonceHash}` (AgeAttestationNonceV1) — the one-time,\n// 256-bit server-generated registration nonce. Only the SHA-256 of the nonce is\n// the doc id; the raw nonce appears only inside the signed token.\n// - The pinned `ageBracketAttestation` JWS payload-claims shape [M-09] — the DECODED\n// claims of the compact JWS (JWT, RFC 7519, alg=HS256) issued at /api/age/attest\n// and verified at /api/register/complete.\n// - The `__Secure-ttt_age_session` cookie spec [F13] (an exported const, NOT a doc).\n// - `AgePolicyConfigV1` (the `_config/agePolicy` singleton) + its pinned literal\n// default const (§A11 [H6]).\n// - The teen→adult `ageUpgradeAttestation` token shape.\n// - `UserPrivateDataAgeFieldsSchema` — the STANDALONE age-fields shape that the\n// orchestrator merges into `UserPrivateDataSchema` (privateData/{uid}). This file\n// does NOT edit user.ts.\n//\n// Every field/enum/optionality/bound is transcribed verbatim from the frozen Trust &\n// Safety spec (Appendix A); the durable design owners are ttt-prod\n// docs/design/age-gating-and-account-types.md and\n// docs/design/age-data-handling-profile.md — no invented values, no placeholders.\n//\n// `RegistrationCompletionOutcome` is the DOMAIN outcome that feeds the orphan-Auth\n// deletion policy; it is the SINGLE SOURCE in ./foundation.js and is IMPORTED here\n// (never redefined).\n//\n// Timestamp convention: epoch-MILLISECONDS via z.number() — EXCEPT the JWS token\n// claims `iat`/`exp`, which are epoch-SECONDS per JWT (RFC 7519); those are commented\n// at the claim.\n\nimport { z } from 'zod';\nimport { RegistrationCompletionOutcomeSchema } from './foundation.js';\n\n// ===========================================================================\n// A7 — ageAttestationNonces/{nonceHash} (AgeAttestationNonceV1)\n// One-time, 256-bit server-generated nonce. Only the nonce's SHA-256 is the doc id;\n// the raw nonce appears only inside the signed token. 10-minute TTL; one successful\n// consume, transactionally bound to the new Auth uid AND the requestSessionHash;\n// expired/used/unknown fails closed. Spent records auto-delete ~24h after consume/expiry\n// via a Firestore native-TTL policy on `ttlExpireAt` (F-018) — no scheduled reaper.\n// ===========================================================================\n\n/** Server-derived audience bracket — NEVER client-derived. */\nexport const AgeBracketSchema = z.enum(['teen', 'adult']);\nexport type AgeBracket = z.infer<typeof AgeBracketSchema>;\n\n/** Nonce lifecycle status. `expired`/`consumed`/unknown all fail closed at consume. */\nexport const AgeAttestationNonceStatusSchema = z.enum(['issued', 'consumed', 'expired']);\nexport type AgeAttestationNonceStatus = z.infer<typeof AgeAttestationNonceStatusSchema>;\n\n/** `ageAttestationNonces/{nonceHash}` — the registration attestation nonce record.\n * Doc id is the SHA-256 hex of the 256-bit server nonce (deterministic; the raw\n * nonce lives only in the signed token, never in Firestore). */\nexport const AgeAttestationNonceV1Schema = z.object({\n schemaVersion: z.literal(1),\n bracket: AgeBracketSchema, // SERVER-derived audience bracket\n policyVersion: z.string().min(1), // the agePolicyVersion in force when issued\n signingKeyVersion: z.string().min(1), // the versioned KMS/Secret-Manager key that signs the token (= JWS `kid`)\n requestSessionHash: z.string().min(1), // SHA-256 of the registering session/request marker — the binding (High-6 §D)\n issuedAt: z.number(), // epoch ms\n expiresAt: z.number(), // epoch ms; issuedAt + 10-min TTL\n consumedAt: z.number().optional(), // epoch ms; set on the one successful consume\n consumedByUid: z.string().min(1).optional(), // the new Auth uid this nonce was transactionally bound to\n status: AgeAttestationNonceStatusSchema,\n // [Q21.5 REVISED — DJ 2026-07-06] The nonce carries NO date of birth for ANY bracket.\n // Registration never persists a DOB (adult or teen — only the derived bracket survives);\n // the previous adult-bracket `dateOfBirth` carry field was removed. The ONLY place a DOB\n // is ever persisted is becomeArtisanCreator ('artisanOnboarding') — see\n // UserPrivateDataAgeFieldsSchema below. Raw DOBs remain no-log everywhere.\n // [F-018] Firestore NATIVE-TTL field. Set to a real Firestore `Timestamp` of (consume/expire time +\n // ~24h) at the moment the nonce becomes spent; a TTL policy on `ageAttestationNonces.ttlExpireAt`\n // then auto-deletes the spent single-use record (no scheduled reaper). DOCUMENTED EXCEPTION to this\n // file's epoch-ms-number convention: native TTL requires a real Timestamp, and this field is\n // WRITE-ONLY (never read by app code), so it is typed opaquely here (`z.unknown`) to avoid pulling a\n // firebase `Timestamp` type into the environment-agnostic ttt-core schema layer (the app writes it via\n // `admin.firestore.Timestamp.fromMillis`, mirroring notification-core's `expireAt`). Absent until spent.\n ttlExpireAt: z.unknown().optional(),\n}).strict();\nexport type AgeAttestationNonceV1 = z.infer<typeof AgeAttestationNonceV1Schema>;\n\n// ===========================================================================\n// A7 [M-09] — ageBracketAttestation JWS payload claims (the ONE pinned wire format)\n//\n// The token is a COMPACT JWS (JWT, RFC 7519) with alg=HS256, signed by the versioned\n// KMS/Secret-Manager key. The schema below validates the DECODED PAYLOAD CLAIMS only.\n//\n// JOSE header (NOT part of this schema — documented for the verifier):\n// { \"alg\": \"HS256\", \"typ\": \"JWT\", \"kid\": <signingKeyVersion> } // kid = the exact signingKeyVersion\n//\n// Serialization: standard JWS compact form\n// base64url(header) '.' base64url(payload) '.' base64url(sig)\n// the signature is base64url (no padding); claim names + types are EXACTLY as below\n// (no extra claims).\n//\n// Verification REQUIRES (fail-closed on any miss): valid HS256 signature under the key\n// named by `kid`; aud == \"ttt-register-complete\"; iss == \"ttt-age-attest\"; exp not\n// passed; sub matches the ageAttestationNonces doc being consumed; rsh matches the\n// request's requestSessionHash.\n//\n// `iat`/`exp` are epoch-SECONDS (per JWT), NOT epoch-millis like the rest of this file.\n// ===========================================================================\n\nexport const AgeBracketAttestationClaimsV1Schema = z.object({\n iss: z.literal('ttt-age-attest'), // issuer\n aud: z.literal('ttt-register-complete'), // AUDIENCE/purpose binding — /api/register/complete MUST verify aud\n sub: z.string().min(1), // the SHA-256 nonce hash (also the ageAttestationNonces doc id)\n iat: z.number().int(), // epoch SECONDS (per JWT)\n exp: z.number().int(), // epoch SECONDS (per JWT); exp = iat + 600 (10-min TTL)\n bkt: AgeBracketSchema, // the SERVER-derived bracket (never client-derived)\n pv: z.string().min(1), // agePolicyVersion string\n rsh: z.string().min(1), // sha256(cookieValue) — the session binding\n}).strict();\nexport type AgeBracketAttestationClaimsV1 = z.infer<typeof AgeBracketAttestationClaimsV1Schema>;\n\n// ===========================================================================\n// A7 [F13] — Age-session cookie spec (`__Secure-ttt_age_session`)\n//\n// Pinned cookie attributes. The cookie VALUE is a cryptographically-random value\n// generated per registration attempt; only requestSessionHash = sha256(cookieValue)\n// is stored (with the nonce) — the raw cookie value is NEVER persisted. A separate\n// non-unique UX marker may exist for display, but is NEVER the security binding.\n//\n// `Domain` is omitted (host-only) — represented here by `hostOnly: true`.\n// ===========================================================================\n\nexport const AGE_SESSION_COOKIE_SPEC = {\n name: '__Secure-ttt_age_session',\n hostOnly: true, // Domain attribute omitted → host-only cookie\n path: '/api',\n secure: true,\n httpOnly: true,\n sameSite: 'Strict',\n maxAgeSeconds: 600, // 10 min\n} as const;\n\n// ===========================================================================\n// A7 / A11 [H6] — AgePolicyConfigV1 (the `_config/agePolicy` singleton)\n//\n// The generic gRPC retryable/terminal code lists are REMOVED — deletion is driven\n// ONLY by the RegistrationCompletionOutcome domain enum (§A7). No raw gRPC code ever\n// deletes an account. noDeleteOutcomes / terminalDeletableOutcomes are typed against\n// the imported RegistrationCompletionOutcome enum so the two arrays can never drift\n// from the domain outcome set.\n// ===========================================================================\n\nexport const AgePolicyConfigV1Schema = z.object({\n agePolicyVersion: z.string().min(1),\n registrationGracePeriodMinutes: z.number().int(),\n cleanupSchedule: z.string().min(1), // cron expression for the orphan-Auth cleanup worker\n ageTokenTtlSeconds: z.number().int(), // [M-09] token TTL\n keyRetirementVerificationMinutes: z.number().int(), // [M-09] retired-signingKeyVersion verification window (> TTL so no live token is orphaned by a rotation)\n noDeleteOutcomes: z.array(RegistrationCompletionOutcomeSchema),\n terminalDeletableOutcomes: z.array(RegistrationCompletionOutcomeSchema),\n}).strict();\nexport type AgePolicyConfigV1 = z.infer<typeof AgePolicyConfigV1Schema>;\n\n/** The pinned literal default for `_config/agePolicy` (§A11 [H6] concrete config\n * values). Build defaults — transcribed verbatim from the frozen spec. */\nexport const DEFAULT_AGE_POLICY_CONFIG_V1: AgePolicyConfigV1 = {\n agePolicyVersion: '2026-06-19.general-audience.v1',\n registrationGracePeriodMinutes: 30,\n cleanupSchedule: '*/15 * * * *',\n ageTokenTtlSeconds: 600,\n keyRetirementVerificationMinutes: 15,\n noDeleteOutcomes: [\n 'completed',\n 'alreadyCompletedSameUid',\n 'retryableInfrastructureFailure',\n 'reauthenticationRequired',\n 'appCheckRetryRequired',\n 'privateDataConflict',\n ],\n terminalDeletableOutcomes: [\n 'nonceExpired',\n 'nonceUnknown',\n 'nonceConsumedDifferentUid',\n 'sessionHashMismatch',\n 'attestationSignatureInvalid',\n 'policyVersionRejected',\n ],\n};\n\n// ===========================================================================\n// A7 — teen→adult ageUpgradeAttestation token\n//\n// A SEPARATE token (not the registration nonce) issued to an authenticated,\n// recently-reauthenticated session. Binds uid + accountCapabilityVersion +\n// policyVersion + issued/expiry + nonce; consumed ONLY for that uid+version; never\n// the registration nonce, never cross-account.\n//\n// This is a token claims shape (decoded payload), NOT a stored Firestore doc.\n// ===========================================================================\n\nexport const AgeUpgradeAttestationV1Schema = z.object({\n uid: z.string().min(1), // the authenticated, recently-reauthenticated account\n accountCapabilityVersion: z.number().int(), // the capability version this upgrade is bound to\n policyVersion: z.string().min(1), // agePolicyVersion in force\n issuedAt: z.number(), // epoch ms\n expiresAt: z.number(), // epoch ms\n nonce: z.string().min(1), // single-use upgrade nonce (never the registration nonce; never cross-account)\n}).strict();\nexport type AgeUpgradeAttestationV1 = z.infer<typeof AgeUpgradeAttestationV1Schema>;\n\n// ===========================================================================\n// A7 — UserPrivateData age fields (STANDALONE shape for the orchestrator)\n//\n// These fields live on `privateData/{uid}` (server-write-only). They are exported as\n// a STANDALONE object shape so the orchestrator can merge them into\n// `UserPrivateDataSchema` in user.ts WITHOUT this file editing user.ts.\n// ===========================================================================\n\n/** Manual age-correction audit stub (who corrected, when, why) — embedded on the\n * private user data when a reviewer hand-corrects the recorded age state. */\nexport const UserPrivateDataAgeManualCorrectionSchema = z.object({\n at: z.number(), // epoch ms\n actorId: z.string().min(1),\n reason: z.string().min(1),\n}).strict();\nexport type UserPrivateDataAgeManualCorrection = z.infer<typeof UserPrivateDataAgeManualCorrectionSchema>;\n\n/** STANDALONE age-fields shape — the orchestrator merges these into\n * `UserPrivateDataSchema` (privateData/{uid}, server-write-only). Exported as a raw\n * object shape (NOT a z.object) so it can be spread into the canonical schema. */\nexport const UserPrivateDataAgeFieldsSchema = z.object({\n accountType: AgeBracketSchema, // 'teen' | 'adult'\n is18Plus: z.boolean(),\n agePolicyVersion: z.string().min(1),\n accountCapabilityVersion: z.number().int(),\n ageAttestedAt: z.number(), // epoch ms\n adultUpgradedAt: z.number().optional(), // epoch ms; set on a successful teen→adult upgrade\n ageManualCorrection: UserPrivateDataAgeManualCorrectionSchema.optional(),\n // [Q21.5 REVISED — DJ 2026-07-06, counsel review pending in the lawyer packet] The DOB is\n // persisted at EXACTLY ONE point: becomeArtisanCreator ('artisanOnboarding'). Registration\n // and the teen→adult upgrade derive the bracket server-side and persist NO DOB for anyone\n // (the register screen's \"It is not stored\" notice is literally true). Rationale: the\n // payout-KYC cross-check (compare to Stripe KYC DOB before paying out) only ever applies to\n // artisans — the money boundary — so collection happens there, with UI copy warning the\n // DOB must match the user's future payout identity. Server re-derives 18+ from the entered\n // DOB; an under-18 derivation rejects with a failure audit and stores nothing. PII —\n // privateData only (BACKEND-105); same no-log posture as the raw DOB (scrubber + canary).\n attestedDateOfBirth: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}$/).optional(), // 'YYYY-MM-DD'\n attestedDobRecordedAt: z.number().optional(), // epoch ms\n attestedDobSource: z.enum(['artisanOnboarding']).optional(),\n}).strict();\nexport type UserPrivateDataAgeFields = z.infer<typeof UserPrivateDataAgeFieldsSchema>;\n\n/** The raw shape (for the orchestrator to `.extend(...)` / spread into\n * `UserPrivateDataSchema` without re-wrapping). */\nexport const userPrivateDataAgeFieldsShape = {\n accountType: AgeBracketSchema,\n is18Plus: z.boolean(),\n agePolicyVersion: z.string().min(1),\n accountCapabilityVersion: z.number().int(),\n ageAttestedAt: z.number(),\n adultUpgradedAt: z.number().optional(),\n ageManualCorrection: UserPrivateDataAgeManualCorrectionSchema.optional(),\n attestedDateOfBirth: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}$/).optional(),\n attestedDobRecordedAt: z.number().optional(),\n attestedDobSource: z.enum(['artisanOnboarding']).optional(),\n} as const;\n\n// ===========================================================================\n// A7 — Registration-completion RESULT (uses the IMPORTED domain enum)\n//\n// `completeRegistration.ts` returns exactly one RegistrationCompletionOutcome. The\n// enum itself is the SINGLE SOURCE in ./foundation.js — re-exported here for cluster\n// convenience, NEVER redefined.\n// ===========================================================================\n\nexport { RegistrationCompletionOutcomeSchema } from './foundation.js';\nexport type { RegistrationCompletionOutcome } from './foundation.js';\n\n/** The result envelope `completeRegistration.ts` returns. `outcome` is the imported\n * domain enum (never a raw gRPC code); only this domain outcome feeds the orphan-Auth\n * deletion policy. */\nexport const RegistrationCompletionResultV1Schema = z.object({\n outcome: RegistrationCompletionOutcomeSchema,\n uid: z.string().min(1).optional(), // present on 'completed' / 'alreadyCompletedSameUid'\n}).strict();\nexport type RegistrationCompletionResultV1 = z.infer<typeof RegistrationCompletionResultV1Schema>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"case-aliases.d.ts","sourceRoot":"","sources":["../../../src/doc-schemas/safety/case-aliases.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"case-aliases.d.ts","sourceRoot":"","sources":["../../../src/doc-schemas/safety/case-aliases.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,6DAA6D;AAC7D,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAMzC,4CAA4C;AAC5C,eAAO,MAAM,gCAAgC;;;;;EAK3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAS1F,eAAO,MAAM,8BAA8B;;;;;;;;;;;kBAMhC,CAAC;AACZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -13,10 +13,11 @@
|
|
|
13
13
|
// rows for one rare incident is acceptable, and cross-linking covers the operator's
|
|
14
14
|
// need to see related cases.
|
|
15
15
|
//
|
|
16
|
-
// Every shape here is transcribed verbatim from
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
// computes them (never this schema
|
|
16
|
+
// Every shape here is transcribed verbatim from the frozen Trust & Safety spec
|
|
17
|
+
// (Appendix A §A2) — no invented values, no placeholders; the durable design
|
|
18
|
+
// owner is ttt-prod docs/design/csam-detection-and-response.md. Deterministic
|
|
19
|
+
// IDs are documented as comments; the server computes them (never this schema
|
|
20
|
+
// layer).
|
|
20
21
|
import { z } from 'zod';
|
|
21
22
|
// ===========================================================================
|
|
22
23
|
// Canonical-key version token (folded into the deterministic id formula below).
|