@ttt-productions/ttt-core 0.79.78 → 0.79.80
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/admin-labels.d.ts +12 -3
- package/dist/constants/admin-labels.d.ts.map +1 -1
- package/dist/constants/admin-labels.js +26 -14
- package/dist/constants/admin-labels.js.map +1 -1
- package/dist/constants/business-admin.d.ts +9 -0
- package/dist/constants/business-admin.d.ts.map +1 -1
- package/dist/constants/business-admin.js +9 -0
- package/dist/constants/business-admin.js.map +1 -1
- package/dist/constants/safety-active-statuses.d.ts +2 -2
- package/dist/constants/text-fields.d.ts +23 -0
- package/dist/constants/text-fields.d.ts.map +1 -1
- package/dist/constants/text-fields.js +6 -1
- package/dist/constants/text-fields.js.map +1 -1
- package/dist/doc-schemas/chat-sync.d.ts +1 -1
- package/dist/doc-schemas/commissions.d.ts +6 -6
- package/dist/doc-schemas/content.d.ts +100 -69
- package/dist/doc-schemas/content.d.ts.map +1 -1
- package/dist/doc-schemas/content.js +41 -22
- package/dist/doc-schemas/content.js.map +1 -1
- package/dist/doc-schemas/media-assets.d.ts +5 -5
- package/dist/doc-schemas/media-copy-intents.d.ts +2 -2
- package/dist/doc-schemas/messaging.d.ts +1 -1
- package/dist/doc-schemas/moderation.d.ts +6 -6
- package/dist/doc-schemas/ncii/cases.d.ts +1 -1
- package/dist/doc-schemas/ncii/requests.d.ts +4 -4
- package/dist/doc-schemas/notification-archive-all-jobs.d.ts +2 -2
- package/dist/doc-schemas/notifications.d.ts +4 -4
- package/dist/doc-schemas/operational.d.ts +2 -2
- package/dist/doc-schemas/public-documents.d.ts +222 -167
- package/dist/doc-schemas/public-documents.d.ts.map +1 -1
- package/dist/doc-schemas/public-documents.js +7 -2
- package/dist/doc-schemas/public-documents.js.map +1 -1
- package/dist/doc-schemas/registry.d.ts +191 -151
- package/dist/doc-schemas/registry.d.ts.map +1 -1
- package/dist/doc-schemas/report-docs.d.ts +3 -3
- package/dist/doc-schemas/safety/case.d.ts +13 -13
- package/dist/doc-schemas/safety/evidence.d.ts +4 -4
- package/dist/doc-schemas/safety/foundation.d.ts +3 -3
- package/dist/doc-schemas/safety/report.d.ts +2 -2
- package/dist/doc-schemas/safety/sagas.d.ts +2 -2
- package/dist/doc-schemas/social.d.ts +4 -4
- package/dist/doc-schemas/square-announcement-jobs.d.ts +6 -6
- package/dist/doc-schemas/system-slots.d.ts +8 -1
- package/dist/doc-schemas/system-slots.d.ts.map +1 -1
- package/dist/doc-schemas/system.d.ts.map +1 -1
- package/dist/doc-schemas/system.js +2 -1
- package/dist/doc-schemas/system.js.map +1 -1
- package/dist/doc-schemas/user.d.ts +8 -8
- package/dist/doc-schemas/work-project.d.ts +1 -1
- package/dist/media/target-info.d.ts +9 -2
- package/dist/media/target-info.d.ts.map +1 -1
- package/dist/schemas/admin.d.ts +104 -73
- package/dist/schemas/admin.d.ts.map +1 -1
- package/dist/schemas/admin.js +48 -21
- package/dist/schemas/admin.js.map +1 -1
- package/dist/schemas/chat.d.ts +1 -1
- package/dist/schemas/commissions.d.ts +1 -1
- package/dist/schemas/notification.d.ts +1 -1
- package/dist/schemas/public-documents.d.ts +87 -65
- package/dist/schemas/public-documents.d.ts.map +1 -1
- package/dist/schemas/safety.d.ts +43 -43
- package/dist/schemas/users.d.ts +59 -1
- package/dist/schemas/users.d.ts.map +1 -1
- package/dist/schemas/users.js +36 -0
- package/dist/schemas/users.js.map +1 -1
- package/dist/schemas/work-project-management.d.ts +8 -8
- package/dist/system-slots/system-slots.d.ts +62 -5
- package/dist/system-slots/system-slots.d.ts.map +1 -1
- package/dist/system-slots/system-slots.js +47 -0
- package/dist/system-slots/system-slots.js.map +1 -1
- package/dist/types/admin-users.d.ts +1 -10
- package/dist/types/admin-users.d.ts.map +1 -1
- package/dist/types/admin-users.js.map +1 -1
- package/dist/types/content.d.ts +4 -1
- package/dist/types/content.d.ts.map +1 -1
- package/dist/types/content.js +2 -0
- package/dist/types/content.js.map +1 -1
- package/dist/upload-variables/upload-system-content-variables.d.ts +8 -1
- package/dist/upload-variables/upload-system-content-variables.d.ts.map +1 -1
- package/dist/utils/app-config.d.ts +36 -7
- package/dist/utils/app-config.d.ts.map +1 -1
- package/dist/utils/app-config.js +34 -16
- package/dist/utils/app-config.js.map +1 -1
- package/package.json +1 -1
|
@@ -40,56 +40,67 @@ export declare const LegalPageContentSchema: z.ZodObject<{
|
|
|
40
40
|
}, z.core.$strip>>;
|
|
41
41
|
}, z.core.$strip>;
|
|
42
42
|
export declare const RulesAndAgreementsContentSchema: z.ZodObject<{
|
|
43
|
+
agreements: z.ZodObject<{
|
|
44
|
+
intention: z.ZodOptional<z.ZodString>;
|
|
45
|
+
points: z.ZodArray<z.ZodObject<{
|
|
46
|
+
workProjectType: z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
Tales: "Tales";
|
|
48
|
+
Tunes: "Tunes";
|
|
49
|
+
Television: "Television";
|
|
50
|
+
}>>;
|
|
51
|
+
hallWingType: z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
entertainment: "entertainment";
|
|
53
|
+
educational: "educational";
|
|
54
|
+
newsPolitical: "newsPolitical";
|
|
55
|
+
}>>;
|
|
56
|
+
id: z.ZodString;
|
|
57
|
+
text: z.ZodString;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
61
|
+
groupIntentions: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
62
|
+
workRealm: "workRealm";
|
|
63
|
+
generic: "generic";
|
|
64
|
+
merchandising: "merchandising";
|
|
65
|
+
hallWing: "hallWing";
|
|
66
|
+
}> & z.core.$partial, z.ZodString>>;
|
|
43
67
|
rules: z.ZodArray<z.ZodObject<{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
description: z.ZodString;
|
|
47
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
48
|
-
group: z.ZodOptional<z.ZodEnum<{
|
|
49
|
-
workRealm: "workRealm";
|
|
50
|
-
workProjectType: "workProjectType";
|
|
51
|
-
hallWingType: "hallWingType";
|
|
52
|
-
generic: "generic";
|
|
53
|
-
merchandising: "merchandising";
|
|
54
|
-
}>>;
|
|
55
|
-
subgroup: z.ZodOptional<z.ZodEnum<{
|
|
68
|
+
order: z.ZodNumber;
|
|
69
|
+
workProjectType: z.ZodOptional<z.ZodEnum<{
|
|
56
70
|
Tales: "Tales";
|
|
57
71
|
Tunes: "Tunes";
|
|
58
72
|
Television: "Television";
|
|
73
|
+
}>>;
|
|
74
|
+
hallWingType: z.ZodOptional<z.ZodEnum<{
|
|
59
75
|
entertainment: "entertainment";
|
|
60
76
|
educational: "educational";
|
|
61
77
|
newsPolitical: "newsPolitical";
|
|
62
78
|
}>>;
|
|
63
|
-
|
|
79
|
+
id: z.ZodString;
|
|
80
|
+
title: z.ZodString;
|
|
81
|
+
description: z.ZodString;
|
|
82
|
+
group: z.ZodEnum<{
|
|
83
|
+
workRealm: "workRealm";
|
|
84
|
+
generic: "generic";
|
|
85
|
+
merchandising: "merchandising";
|
|
86
|
+
hallWing: "hallWing";
|
|
87
|
+
}>;
|
|
64
88
|
}, z.core.$strip>>;
|
|
65
|
-
agreements: z.ZodObject<{
|
|
66
|
-
tales: z.ZodOptional<z.ZodObject<{
|
|
67
|
-
points: z.ZodArray<z.ZodString>;
|
|
68
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
69
|
-
}, z.core.$strip>>;
|
|
70
|
-
tunes: z.ZodOptional<z.ZodObject<{
|
|
71
|
-
points: z.ZodArray<z.ZodString>;
|
|
72
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
73
|
-
}, z.core.$strip>>;
|
|
74
|
-
television: z.ZodOptional<z.ZodObject<{
|
|
75
|
-
points: z.ZodArray<z.ZodString>;
|
|
76
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
77
|
-
}, z.core.$strip>>;
|
|
78
|
-
}, z.core.$strip>;
|
|
79
89
|
}, z.core.$strip>;
|
|
80
90
|
export declare const FuturePlansContentSchema: z.ZodObject<{
|
|
91
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
92
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
name: z.ZodString;
|
|
95
|
+
order: z.ZodNumber;
|
|
96
|
+
intention: z.ZodOptional<z.ZodString>;
|
|
97
|
+
}, z.core.$strip>>;
|
|
81
98
|
plans: z.ZodArray<z.ZodObject<{
|
|
82
99
|
id: z.ZodString;
|
|
83
100
|
title: z.ZodString;
|
|
84
101
|
description: z.ZodString;
|
|
102
|
+
groupId: z.ZodString;
|
|
85
103
|
order: z.ZodNumber;
|
|
86
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
87
|
-
mediaType: z.ZodOptional<z.ZodEnum<{
|
|
88
|
-
video: "video";
|
|
89
|
-
image: "image";
|
|
90
|
-
audio: "audio";
|
|
91
|
-
other: "other";
|
|
92
|
-
}>>;
|
|
93
104
|
}, z.core.$strip>>;
|
|
94
105
|
}, z.core.$strip>;
|
|
95
106
|
export declare const TakeItDownPageCopyContentSchema: z.ZodObject<{
|
|
@@ -137,56 +148,67 @@ export declare const PUBLIC_DOCUMENT_CONTENT_SCHEMAS: {
|
|
|
137
148
|
}, z.core.$strip>>;
|
|
138
149
|
}, z.core.$strip>;
|
|
139
150
|
readonly rulesAndAgreements: z.ZodObject<{
|
|
151
|
+
agreements: z.ZodObject<{
|
|
152
|
+
intention: z.ZodOptional<z.ZodString>;
|
|
153
|
+
points: z.ZodArray<z.ZodObject<{
|
|
154
|
+
workProjectType: z.ZodOptional<z.ZodEnum<{
|
|
155
|
+
Tales: "Tales";
|
|
156
|
+
Tunes: "Tunes";
|
|
157
|
+
Television: "Television";
|
|
158
|
+
}>>;
|
|
159
|
+
hallWingType: z.ZodOptional<z.ZodEnum<{
|
|
160
|
+
entertainment: "entertainment";
|
|
161
|
+
educational: "educational";
|
|
162
|
+
newsPolitical: "newsPolitical";
|
|
163
|
+
}>>;
|
|
164
|
+
id: z.ZodString;
|
|
165
|
+
text: z.ZodString;
|
|
166
|
+
}, z.core.$strip>>;
|
|
167
|
+
}, z.core.$strip>;
|
|
168
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
169
|
+
groupIntentions: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
170
|
+
workRealm: "workRealm";
|
|
171
|
+
generic: "generic";
|
|
172
|
+
merchandising: "merchandising";
|
|
173
|
+
hallWing: "hallWing";
|
|
174
|
+
}> & z.core.$partial, z.ZodString>>;
|
|
140
175
|
rules: z.ZodArray<z.ZodObject<{
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
description: z.ZodString;
|
|
144
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
145
|
-
group: z.ZodOptional<z.ZodEnum<{
|
|
146
|
-
workRealm: "workRealm";
|
|
147
|
-
workProjectType: "workProjectType";
|
|
148
|
-
hallWingType: "hallWingType";
|
|
149
|
-
generic: "generic";
|
|
150
|
-
merchandising: "merchandising";
|
|
151
|
-
}>>;
|
|
152
|
-
subgroup: z.ZodOptional<z.ZodEnum<{
|
|
176
|
+
order: z.ZodNumber;
|
|
177
|
+
workProjectType: z.ZodOptional<z.ZodEnum<{
|
|
153
178
|
Tales: "Tales";
|
|
154
179
|
Tunes: "Tunes";
|
|
155
180
|
Television: "Television";
|
|
181
|
+
}>>;
|
|
182
|
+
hallWingType: z.ZodOptional<z.ZodEnum<{
|
|
156
183
|
entertainment: "entertainment";
|
|
157
184
|
educational: "educational";
|
|
158
185
|
newsPolitical: "newsPolitical";
|
|
159
186
|
}>>;
|
|
160
|
-
|
|
187
|
+
id: z.ZodString;
|
|
188
|
+
title: z.ZodString;
|
|
189
|
+
description: z.ZodString;
|
|
190
|
+
group: z.ZodEnum<{
|
|
191
|
+
workRealm: "workRealm";
|
|
192
|
+
generic: "generic";
|
|
193
|
+
merchandising: "merchandising";
|
|
194
|
+
hallWing: "hallWing";
|
|
195
|
+
}>;
|
|
161
196
|
}, z.core.$strip>>;
|
|
162
|
-
agreements: z.ZodObject<{
|
|
163
|
-
tales: z.ZodOptional<z.ZodObject<{
|
|
164
|
-
points: z.ZodArray<z.ZodString>;
|
|
165
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
166
|
-
}, z.core.$strip>>;
|
|
167
|
-
tunes: z.ZodOptional<z.ZodObject<{
|
|
168
|
-
points: z.ZodArray<z.ZodString>;
|
|
169
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
170
|
-
}, z.core.$strip>>;
|
|
171
|
-
television: z.ZodOptional<z.ZodObject<{
|
|
172
|
-
points: z.ZodArray<z.ZodString>;
|
|
173
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
174
|
-
}, z.core.$strip>>;
|
|
175
|
-
}, z.core.$strip>;
|
|
176
197
|
}, z.core.$strip>;
|
|
177
198
|
readonly futurePlans: z.ZodObject<{
|
|
199
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
200
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
201
|
+
id: z.ZodString;
|
|
202
|
+
name: z.ZodString;
|
|
203
|
+
order: z.ZodNumber;
|
|
204
|
+
intention: z.ZodOptional<z.ZodString>;
|
|
205
|
+
}, z.core.$strip>>;
|
|
178
206
|
plans: z.ZodArray<z.ZodObject<{
|
|
179
207
|
id: z.ZodString;
|
|
180
208
|
title: z.ZodString;
|
|
181
209
|
description: z.ZodString;
|
|
210
|
+
groupId: z.ZodString;
|
|
182
211
|
order: z.ZodNumber;
|
|
183
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
184
|
-
mediaType: z.ZodOptional<z.ZodEnum<{
|
|
185
|
-
video: "video";
|
|
186
|
-
image: "image";
|
|
187
|
-
audio: "audio";
|
|
188
|
-
other: "other";
|
|
189
|
-
}>>;
|
|
190
212
|
}, z.core.$strip>>;
|
|
191
213
|
}, z.core.$strip>;
|
|
192
214
|
readonly dmcaPolicy: z.ZodObject<{
|
|
@@ -241,40 +263,50 @@ export declare const PUBLIC_DOCUMENT_PROJECTION_SCHEMAS: {
|
|
|
241
263
|
}, z.core.$strip>>;
|
|
242
264
|
}, z.core.$strip>;
|
|
243
265
|
readonly rulesAndAgreements: z.ZodObject<{
|
|
266
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
267
|
+
groupIntentions: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
268
|
+
workRealm: "workRealm";
|
|
269
|
+
generic: "generic";
|
|
270
|
+
merchandising: "merchandising";
|
|
271
|
+
hallWing: "hallWing";
|
|
272
|
+
}> & z.core.$partial, z.ZodString>>;
|
|
244
273
|
rules: z.ZodArray<z.ZodObject<{
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
description: z.ZodString;
|
|
248
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
249
|
-
group: z.ZodOptional<z.ZodEnum<{
|
|
250
|
-
workRealm: "workRealm";
|
|
251
|
-
workProjectType: "workProjectType";
|
|
252
|
-
hallWingType: "hallWingType";
|
|
253
|
-
generic: "generic";
|
|
254
|
-
merchandising: "merchandising";
|
|
255
|
-
}>>;
|
|
256
|
-
subgroup: z.ZodOptional<z.ZodEnum<{
|
|
274
|
+
order: z.ZodNumber;
|
|
275
|
+
workProjectType: z.ZodOptional<z.ZodEnum<{
|
|
257
276
|
Tales: "Tales";
|
|
258
277
|
Tunes: "Tunes";
|
|
259
278
|
Television: "Television";
|
|
279
|
+
}>>;
|
|
280
|
+
hallWingType: z.ZodOptional<z.ZodEnum<{
|
|
260
281
|
entertainment: "entertainment";
|
|
261
282
|
educational: "educational";
|
|
262
283
|
newsPolitical: "newsPolitical";
|
|
263
284
|
}>>;
|
|
264
|
-
|
|
285
|
+
id: z.ZodString;
|
|
286
|
+
title: z.ZodString;
|
|
287
|
+
description: z.ZodString;
|
|
288
|
+
group: z.ZodEnum<{
|
|
289
|
+
workRealm: "workRealm";
|
|
290
|
+
generic: "generic";
|
|
291
|
+
merchandising: "merchandising";
|
|
292
|
+
hallWing: "hallWing";
|
|
293
|
+
}>;
|
|
265
294
|
}, z.core.$strip>>;
|
|
266
295
|
agreements: z.ZodObject<{
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
296
|
+
intention: z.ZodOptional<z.ZodString>;
|
|
297
|
+
points: z.ZodArray<z.ZodObject<{
|
|
298
|
+
workProjectType: z.ZodOptional<z.ZodEnum<{
|
|
299
|
+
Tales: "Tales";
|
|
300
|
+
Tunes: "Tunes";
|
|
301
|
+
Television: "Television";
|
|
302
|
+
}>>;
|
|
303
|
+
hallWingType: z.ZodOptional<z.ZodEnum<{
|
|
304
|
+
entertainment: "entertainment";
|
|
305
|
+
educational: "educational";
|
|
306
|
+
newsPolitical: "newsPolitical";
|
|
307
|
+
}>>;
|
|
308
|
+
id: z.ZodString;
|
|
309
|
+
text: z.ZodString;
|
|
278
310
|
}, z.core.$strip>>;
|
|
279
311
|
}, z.core.$strip>;
|
|
280
312
|
version: z.ZodOptional<z.ZodNumber>;
|
|
@@ -282,18 +314,19 @@ export declare const PUBLIC_DOCUMENT_PROJECTION_SCHEMAS: {
|
|
|
282
314
|
}, z.core.$strip>;
|
|
283
315
|
readonly futurePlans: z.ZodObject<{
|
|
284
316
|
lastUpdated: z.ZodNumber;
|
|
317
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
318
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
319
|
+
id: z.ZodString;
|
|
320
|
+
name: z.ZodString;
|
|
321
|
+
order: z.ZodNumber;
|
|
322
|
+
intention: z.ZodOptional<z.ZodString>;
|
|
323
|
+
}, z.core.$strip>>;
|
|
285
324
|
plans: z.ZodArray<z.ZodObject<{
|
|
286
325
|
id: z.ZodString;
|
|
287
326
|
title: z.ZodString;
|
|
288
327
|
description: z.ZodString;
|
|
328
|
+
groupId: z.ZodString;
|
|
289
329
|
order: z.ZodNumber;
|
|
290
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
291
|
-
mediaType: z.ZodOptional<z.ZodEnum<{
|
|
292
|
-
video: "video";
|
|
293
|
-
image: "image";
|
|
294
|
-
audio: "audio";
|
|
295
|
-
other: "other";
|
|
296
|
-
}>>;
|
|
297
330
|
}, z.core.$strip>>;
|
|
298
331
|
version: z.ZodOptional<z.ZodNumber>;
|
|
299
332
|
}, z.core.$strip>;
|
|
@@ -372,42 +405,52 @@ export declare const PublicDocumentVersionSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
372
405
|
}, z.core.$strip>, z.ZodObject<{
|
|
373
406
|
documentId: z.ZodLiteral<"rulesAndAgreements">;
|
|
374
407
|
content: z.ZodObject<{
|
|
408
|
+
agreements: z.ZodObject<{
|
|
409
|
+
intention: z.ZodOptional<z.ZodString>;
|
|
410
|
+
points: z.ZodArray<z.ZodObject<{
|
|
411
|
+
workProjectType: z.ZodOptional<z.ZodEnum<{
|
|
412
|
+
Tales: "Tales";
|
|
413
|
+
Tunes: "Tunes";
|
|
414
|
+
Television: "Television";
|
|
415
|
+
}>>;
|
|
416
|
+
hallWingType: z.ZodOptional<z.ZodEnum<{
|
|
417
|
+
entertainment: "entertainment";
|
|
418
|
+
educational: "educational";
|
|
419
|
+
newsPolitical: "newsPolitical";
|
|
420
|
+
}>>;
|
|
421
|
+
id: z.ZodString;
|
|
422
|
+
text: z.ZodString;
|
|
423
|
+
}, z.core.$strip>>;
|
|
424
|
+
}, z.core.$strip>;
|
|
425
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
426
|
+
groupIntentions: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
427
|
+
workRealm: "workRealm";
|
|
428
|
+
generic: "generic";
|
|
429
|
+
merchandising: "merchandising";
|
|
430
|
+
hallWing: "hallWing";
|
|
431
|
+
}> & z.core.$partial, z.ZodString>>;
|
|
375
432
|
rules: z.ZodArray<z.ZodObject<{
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
description: z.ZodString;
|
|
379
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
380
|
-
group: z.ZodOptional<z.ZodEnum<{
|
|
381
|
-
workRealm: "workRealm";
|
|
382
|
-
workProjectType: "workProjectType";
|
|
383
|
-
hallWingType: "hallWingType";
|
|
384
|
-
generic: "generic";
|
|
385
|
-
merchandising: "merchandising";
|
|
386
|
-
}>>;
|
|
387
|
-
subgroup: z.ZodOptional<z.ZodEnum<{
|
|
433
|
+
order: z.ZodNumber;
|
|
434
|
+
workProjectType: z.ZodOptional<z.ZodEnum<{
|
|
388
435
|
Tales: "Tales";
|
|
389
436
|
Tunes: "Tunes";
|
|
390
437
|
Television: "Television";
|
|
438
|
+
}>>;
|
|
439
|
+
hallWingType: z.ZodOptional<z.ZodEnum<{
|
|
391
440
|
entertainment: "entertainment";
|
|
392
441
|
educational: "educational";
|
|
393
442
|
newsPolitical: "newsPolitical";
|
|
394
443
|
}>>;
|
|
395
|
-
|
|
444
|
+
id: z.ZodString;
|
|
445
|
+
title: z.ZodString;
|
|
446
|
+
description: z.ZodString;
|
|
447
|
+
group: z.ZodEnum<{
|
|
448
|
+
workRealm: "workRealm";
|
|
449
|
+
generic: "generic";
|
|
450
|
+
merchandising: "merchandising";
|
|
451
|
+
hallWing: "hallWing";
|
|
452
|
+
}>;
|
|
396
453
|
}, z.core.$strip>>;
|
|
397
|
-
agreements: z.ZodObject<{
|
|
398
|
-
tales: z.ZodOptional<z.ZodObject<{
|
|
399
|
-
points: z.ZodArray<z.ZodString>;
|
|
400
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
401
|
-
}, z.core.$strip>>;
|
|
402
|
-
tunes: z.ZodOptional<z.ZodObject<{
|
|
403
|
-
points: z.ZodArray<z.ZodString>;
|
|
404
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
405
|
-
}, z.core.$strip>>;
|
|
406
|
-
television: z.ZodOptional<z.ZodObject<{
|
|
407
|
-
points: z.ZodArray<z.ZodString>;
|
|
408
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
409
|
-
}, z.core.$strip>>;
|
|
410
|
-
}, z.core.$strip>;
|
|
411
454
|
}, z.core.$strip>;
|
|
412
455
|
version: z.ZodNumber;
|
|
413
456
|
releaseId: z.ZodString;
|
|
@@ -416,18 +459,19 @@ export declare const PublicDocumentVersionSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
416
459
|
}, z.core.$strip>, z.ZodObject<{
|
|
417
460
|
documentId: z.ZodLiteral<"futurePlans">;
|
|
418
461
|
content: z.ZodObject<{
|
|
462
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
463
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
464
|
+
id: z.ZodString;
|
|
465
|
+
name: z.ZodString;
|
|
466
|
+
order: z.ZodNumber;
|
|
467
|
+
intention: z.ZodOptional<z.ZodString>;
|
|
468
|
+
}, z.core.$strip>>;
|
|
419
469
|
plans: z.ZodArray<z.ZodObject<{
|
|
420
470
|
id: z.ZodString;
|
|
421
471
|
title: z.ZodString;
|
|
422
472
|
description: z.ZodString;
|
|
473
|
+
groupId: z.ZodString;
|
|
423
474
|
order: z.ZodNumber;
|
|
424
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
425
|
-
mediaType: z.ZodOptional<z.ZodEnum<{
|
|
426
|
-
video: "video";
|
|
427
|
-
image: "image";
|
|
428
|
-
audio: "audio";
|
|
429
|
-
other: "other";
|
|
430
|
-
}>>;
|
|
431
475
|
}, z.core.$strip>>;
|
|
432
476
|
}, z.core.$strip>;
|
|
433
477
|
version: z.ZodNumber;
|
|
@@ -517,42 +561,52 @@ export declare const PublicDocumentDraftSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
517
561
|
}, z.core.$strip>, z.ZodObject<{
|
|
518
562
|
documentId: z.ZodLiteral<"rulesAndAgreements">;
|
|
519
563
|
content: z.ZodObject<{
|
|
564
|
+
agreements: z.ZodObject<{
|
|
565
|
+
intention: z.ZodOptional<z.ZodString>;
|
|
566
|
+
points: z.ZodArray<z.ZodObject<{
|
|
567
|
+
workProjectType: z.ZodOptional<z.ZodEnum<{
|
|
568
|
+
Tales: "Tales";
|
|
569
|
+
Tunes: "Tunes";
|
|
570
|
+
Television: "Television";
|
|
571
|
+
}>>;
|
|
572
|
+
hallWingType: z.ZodOptional<z.ZodEnum<{
|
|
573
|
+
entertainment: "entertainment";
|
|
574
|
+
educational: "educational";
|
|
575
|
+
newsPolitical: "newsPolitical";
|
|
576
|
+
}>>;
|
|
577
|
+
id: z.ZodString;
|
|
578
|
+
text: z.ZodString;
|
|
579
|
+
}, z.core.$strip>>;
|
|
580
|
+
}, z.core.$strip>;
|
|
581
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
582
|
+
groupIntentions: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
583
|
+
workRealm: "workRealm";
|
|
584
|
+
generic: "generic";
|
|
585
|
+
merchandising: "merchandising";
|
|
586
|
+
hallWing: "hallWing";
|
|
587
|
+
}> & z.core.$partial, z.ZodString>>;
|
|
520
588
|
rules: z.ZodArray<z.ZodObject<{
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
description: z.ZodString;
|
|
524
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
525
|
-
group: z.ZodOptional<z.ZodEnum<{
|
|
526
|
-
workRealm: "workRealm";
|
|
527
|
-
workProjectType: "workProjectType";
|
|
528
|
-
hallWingType: "hallWingType";
|
|
529
|
-
generic: "generic";
|
|
530
|
-
merchandising: "merchandising";
|
|
531
|
-
}>>;
|
|
532
|
-
subgroup: z.ZodOptional<z.ZodEnum<{
|
|
589
|
+
order: z.ZodNumber;
|
|
590
|
+
workProjectType: z.ZodOptional<z.ZodEnum<{
|
|
533
591
|
Tales: "Tales";
|
|
534
592
|
Tunes: "Tunes";
|
|
535
593
|
Television: "Television";
|
|
594
|
+
}>>;
|
|
595
|
+
hallWingType: z.ZodOptional<z.ZodEnum<{
|
|
536
596
|
entertainment: "entertainment";
|
|
537
597
|
educational: "educational";
|
|
538
598
|
newsPolitical: "newsPolitical";
|
|
539
599
|
}>>;
|
|
540
|
-
|
|
600
|
+
id: z.ZodString;
|
|
601
|
+
title: z.ZodString;
|
|
602
|
+
description: z.ZodString;
|
|
603
|
+
group: z.ZodEnum<{
|
|
604
|
+
workRealm: "workRealm";
|
|
605
|
+
generic: "generic";
|
|
606
|
+
merchandising: "merchandising";
|
|
607
|
+
hallWing: "hallWing";
|
|
608
|
+
}>;
|
|
541
609
|
}, z.core.$strip>>;
|
|
542
|
-
agreements: z.ZodObject<{
|
|
543
|
-
tales: z.ZodOptional<z.ZodObject<{
|
|
544
|
-
points: z.ZodArray<z.ZodString>;
|
|
545
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
546
|
-
}, z.core.$strip>>;
|
|
547
|
-
tunes: z.ZodOptional<z.ZodObject<{
|
|
548
|
-
points: z.ZodArray<z.ZodString>;
|
|
549
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
550
|
-
}, z.core.$strip>>;
|
|
551
|
-
television: z.ZodOptional<z.ZodObject<{
|
|
552
|
-
points: z.ZodArray<z.ZodString>;
|
|
553
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
554
|
-
}, z.core.$strip>>;
|
|
555
|
-
}, z.core.$strip>;
|
|
556
610
|
}, z.core.$strip>;
|
|
557
611
|
baseVersion: z.ZodNumber;
|
|
558
612
|
revision: z.ZodNumber;
|
|
@@ -561,18 +615,19 @@ export declare const PublicDocumentDraftSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
561
615
|
}, z.core.$strip>, z.ZodObject<{
|
|
562
616
|
documentId: z.ZodLiteral<"futurePlans">;
|
|
563
617
|
content: z.ZodObject<{
|
|
618
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
619
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
620
|
+
id: z.ZodString;
|
|
621
|
+
name: z.ZodString;
|
|
622
|
+
order: z.ZodNumber;
|
|
623
|
+
intention: z.ZodOptional<z.ZodString>;
|
|
624
|
+
}, z.core.$strip>>;
|
|
564
625
|
plans: z.ZodArray<z.ZodObject<{
|
|
565
626
|
id: z.ZodString;
|
|
566
627
|
title: z.ZodString;
|
|
567
628
|
description: z.ZodString;
|
|
629
|
+
groupId: z.ZodString;
|
|
568
630
|
order: z.ZodNumber;
|
|
569
|
-
videoUrl: z.ZodOptional<z.ZodString>;
|
|
570
|
-
mediaType: z.ZodOptional<z.ZodEnum<{
|
|
571
|
-
video: "video";
|
|
572
|
-
image: "image";
|
|
573
|
-
audio: "audio";
|
|
574
|
-
other: "other";
|
|
575
|
-
}>>;
|
|
576
631
|
}, z.core.$strip>>;
|
|
577
632
|
}, z.core.$strip>;
|
|
578
633
|
baseVersion: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-documents.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/public-documents.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAuB,KAAK,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAU9F,eAAO,MAAM,sBAAsB;;;;;;;EAA8B,CAAC;AAElE,mDAAmD;AACnD,eAAO,MAAM,iCAAiC,aAA8B,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,iCAAiC,aAAiC,CAAC;AAEhF,mGAAmG;AACnG,eAAO,MAAM,mCAAmC,aAAiC,CAAC;AAElF,4DAA4D;AAC5D,eAAO,MAAM,8BAA8B;;;;;;;;;;kBAKhC,CAAC;AACZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAMtF,eAAO,MAAM,sBAAsB;;;;;;;;iBAAmD,CAAC;AACvF,eAAO,MAAM,+BAA+B
|
|
1
|
+
{"version":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,2BAA2B,CAAC,CAAC;AAIhF;;;GAGG;AACH,eAAO,MAAM,gCAAgC;;;kBAQzC,CAAC;AACL,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;kBAKlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAI1F;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;kBAOhC,CAAC;AACZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -40,8 +40,13 @@ export const PublicDocumentVersionRefSchema = z
|
|
|
40
40
|
// A document's CONTENT is its current-projection shape minus `version` / `lastUpdated`, so the
|
|
41
41
|
// existing page readers, the working copy, and the immutable version all share one shape.
|
|
42
42
|
export const LegalPageContentSchema = LegalPageDocumentSchema.pick({ sections: true });
|
|
43
|
-
export const RulesAndAgreementsContentSchema = RulesAndAgreementsSchema.pick({
|
|
44
|
-
|
|
43
|
+
export const RulesAndAgreementsContentSchema = RulesAndAgreementsSchema.pick({
|
|
44
|
+
intro: true,
|
|
45
|
+
groupIntentions: true,
|
|
46
|
+
rules: true,
|
|
47
|
+
agreements: true,
|
|
48
|
+
});
|
|
49
|
+
export const FuturePlansContentSchema = FuturePlansDocumentSchema.pick({ intro: true, groups: true, plans: true });
|
|
45
50
|
export const TakeItDownPageCopyContentSchema = TakeItDownPageCopySchema.pick({ strings: true });
|
|
46
51
|
export const DmcaPolicyContentSchema = DmcaPolicyDocumentSchema.pick({
|
|
47
52
|
intro: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-documents.js","sourceRoot":"","sources":["../../src/doc-schemas/public-documents.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,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AuB,EAAE,mCAAmC;CAC7D,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,gFAAgF;AAEhF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC;KAC5C,MAAM,CAAC;IACN,gBAAgB,EAAE,CAAC,CAAC,aAAa,CAAC,sBAAsB,EAAE,iCAAiC,CAAC;IAC5F,aAAa,EAAE,mCAAmC;IAClD,yBAAyB,EAAE,+BAA+B,CAAC,QAAQ,EAAE;IACrE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["// Versioned public documents — the Firestore contracts of the release system.\n//\n// _appConfig/{documentId} current projection (public; the\n// existing page readers read it)\n// publicDocuments/{documentId}/publicDocumentVersions/v{n} immutable published version\n// publicDocumentDrafts/{documentId} the private working copy\n// publicDocumentReleases/{releaseId} one release record per publish\n// _appConfig/app.publicDocumentVersions the version block every session\n// already reads live\n// userProfiles/{uid}/privateData/{uid}.publicDocumentAcceptance\n// what the person last accepted\n//\n// All are backend-written. Versions are whole numbers v1, v2, … per document, assigned by the\n// one publish transaction; a correction is a new version, never an edit. \"Require acceptance\"\n// is recorded on the release and in the version block — never as a second version number.\n// Acceptance HISTORY lives only in the append-only `publicDocuments.accepted` audit events.\n\nimport { z } from 'zod';\nimport { SPECIAL_DOCS } from '../paths/collections.js';\nimport { PUBLIC_DOCUMENT_IDS, type PublicDocumentId } from '../constants/public-documents.js';\nimport {\n LegalPageDocumentSchema,\n RulesAndAgreementsSchema,\n FuturePlansDocumentSchema,\n TakeItDownPageCopySchema,\n DmcaPolicyDocumentSchema,\n} from './content.js';\nimport { LegalReviewNoticeRevisionSchema } from './legal-review-notice.js';\n\nexport const PublicDocumentIdSchema = z.enum(PUBLIC_DOCUMENT_IDS);\n\n/** A published version number: v1 is the first. */\nexport const PublicDocumentVersionNumberSchema = z.number().int().positive();\n\n/**\n * A version reference where 0 means \"none yet\" (never accepted / never required / no base / never\n * published). Every recorded \"which version was accepted\" field derives from it.\n */\nexport const PublicDocumentVersionOrNoneSchema = z.number().int().nonnegative();\n\n/** An acceptance level: 0 = nothing required / nothing accepted; each requiring release adds 1. */\nexport const PublicDocumentAcceptanceLevelSchema = z.number().int().nonnegative();\n\n/** A document paired with one of its published versions. */\nexport const PublicDocumentVersionRefSchema = z\n .object({\n documentId: PublicDocumentIdSchema,\n version: PublicDocumentVersionNumberSchema,\n })\n .strict();\nexport type PublicDocumentVersionRef = z.infer<typeof PublicDocumentVersionRefSchema>;\n\n// ── Content ──────────────────────────────────────────────────────────────────\n// A document's CONTENT is its current-projection shape minus `version` / `lastUpdated`, so the\n// existing page readers, the working copy, and the immutable version all share one shape.\n\nexport const LegalPageContentSchema = LegalPageDocumentSchema.pick({ sections: true });\nexport const RulesAndAgreementsContentSchema = RulesAndAgreementsSchema.pick({ rules: true, agreements: true });\nexport const FuturePlansContentSchema = FuturePlansDocumentSchema.pick({ plans: true });\nexport const TakeItDownPageCopyContentSchema = TakeItDownPageCopySchema.pick({ strings: true });\nexport const DmcaPolicyContentSchema = DmcaPolicyDocumentSchema.pick({\n intro: true,\n contactBlocks: true,\n sections: true,\n});\n\n/** Each document's stored content schema. */\nexport const PUBLIC_DOCUMENT_CONTENT_SCHEMAS = {\n [SPECIAL_DOCS.TERMS_PAGE]: LegalPageContentSchema,\n [SPECIAL_DOCS.PRIVACY_PAGE]: LegalPageContentSchema,\n [SPECIAL_DOCS.RULES_AND_AGREEMENTS]: RulesAndAgreementsContentSchema,\n [SPECIAL_DOCS.FUTURE_PLANS]: FuturePlansContentSchema,\n [SPECIAL_DOCS.DMCA_POLICY]: DmcaPolicyContentSchema,\n [SPECIAL_DOCS.TAKE_IT_DOWN_PAGE_COPY]: TakeItDownPageCopyContentSchema,\n} as const satisfies Record<PublicDocumentId, z.ZodType>;\n\n/** The content of document `D`. */\nexport type PublicDocumentContent<D extends PublicDocumentId = PublicDocumentId> = z.infer<\n (typeof PUBLIC_DOCUMENT_CONTENT_SCHEMAS)[D]\n>;\n\n/** Each document's current-projection schema (`_appConfig/{documentId}`). */\nexport const PUBLIC_DOCUMENT_PROJECTION_SCHEMAS = {\n [SPECIAL_DOCS.TERMS_PAGE]: LegalPageDocumentSchema,\n [SPECIAL_DOCS.PRIVACY_PAGE]: LegalPageDocumentSchema,\n [SPECIAL_DOCS.RULES_AND_AGREEMENTS]: RulesAndAgreementsSchema,\n [SPECIAL_DOCS.FUTURE_PLANS]: FuturePlansDocumentSchema,\n [SPECIAL_DOCS.DMCA_POLICY]: DmcaPolicyDocumentSchema,\n [SPECIAL_DOCS.TAKE_IT_DOWN_PAGE_COPY]: TakeItDownPageCopySchema,\n} as const satisfies Record<PublicDocumentId, z.ZodType>;\n\n/**\n * The current projection the publish writes for document `D`: its content plus the version and\n * the publish time. Assignable to the page's existing document type.\n */\nexport type PublicDocumentProjection<D extends PublicDocumentId = PublicDocumentId> =\n PublicDocumentContent<D> & { version: number; lastUpdated: number };\n\n// One discriminated branch per document, so a version or draft's `content` is typed by its\n// `documentId`.\nfunction perDocument<const S extends z.ZodRawShape>(shape: S) {\n const branch = <const D extends PublicDocumentId>(documentId: D) =>\n z.object({ documentId: z.literal(documentId), content: PUBLIC_DOCUMENT_CONTENT_SCHEMAS[documentId], ...shape });\n return z.discriminatedUnion('documentId', [\n branch(SPECIAL_DOCS.TERMS_PAGE),\n branch(SPECIAL_DOCS.PRIVACY_PAGE),\n branch(SPECIAL_DOCS.RULES_AND_AGREEMENTS),\n branch(SPECIAL_DOCS.FUTURE_PLANS),\n branch(SPECIAL_DOCS.DMCA_POLICY),\n branch(SPECIAL_DOCS.TAKE_IT_DOWN_PAGE_COPY),\n ]);\n}\n\n// ── Immutable version ────────────────────────────────────────────────────────\n\n/**\n * `publicDocuments/{documentId}/publicDocumentVersions/v{version}` — one published version,\n * written once by the publish transaction and never edited: the full content, the version,\n * the release that published it, the publisher's uid, and the server time.\n */\nexport const PublicDocumentVersionSchema = perDocument({\n version: PublicDocumentVersionNumberSchema,\n releaseId: z.string().min(1),\n publishedBy: z.string().min(1),\n publishedAt: z.number(),\n});\nexport type PublicDocumentVersion = z.infer<typeof PublicDocumentVersionSchema>;\n\n// ── Working copy ─────────────────────────────────────────────────────────────\n\n/** A working copy's revision: its first save writes 1 and every later save the next number. */\nexport const PublicDocumentDraftRevisionSchema = z.number().int().positive();\n\n/** A working-copy revision where 0 means \"no working copy\". */\nexport const PublicDocumentDraftRevisionOrNoneSchema = z.number().int().nonnegative();\n\n/**\n * `publicDocumentDrafts/{documentId}` — the one private working copy of a document, saved from\n * its Admin editor. `baseVersion` is the published version the edit started from (0 when the\n * document has never been published): the publish rejects a draft whose base is no longer the\n * current version, and one whose content equals the current version. `revision` counts its\n * saves: a save or a publish names the revision it saw and is refused when another admin's save\n * has moved it since, so one admin's save never silently replaces another's.\n */\nexport const PublicDocumentDraftSchema = perDocument({\n baseVersion: PublicDocumentVersionOrNoneSchema,\n revision: PublicDocumentDraftRevisionSchema,\n savedBy: z.string().min(1),\n savedAt: z.number(),\n});\nexport type PublicDocumentDraft = z.infer<typeof PublicDocumentDraftSchema>;\n\n// ── Release record ───────────────────────────────────────────────────────────\n\n/**\n * `publicDocumentReleases/{releaseId}` — one record per publish: which documents moved to\n * which versions, whether the release requires acceptance, the required-acceptance level in\n * force after it (raised by one only when it requires acceptance), and who published it when.\n */\nexport const PublicDocumentReleaseSchema = z.object({\n releaseId: z.string().min(1),\n documents: z.array(PublicDocumentVersionRefSchema).min(1),\n requireAcceptance: z.boolean(),\n requiredAcceptanceLevel: PublicDocumentAcceptanceLevelSchema,\n publishedBy: z.string().min(1),\n publishedAt: z.number(),\n});\nexport type PublicDocumentRelease = z.infer<typeof PublicDocumentReleaseSchema>;\n\n// ── Version block on _appConfig/app ──────────────────────────────────────────\n\n/**\n * One document's entry in the version block: its current published version and the latest\n * version a release REQUIRED acceptance of (0 when none has).\n */\nexport const PublicDocumentVersionStateSchema = z\n .object({\n currentVersion: PublicDocumentVersionNumberSchema,\n requiredVersion: PublicDocumentVersionOrNoneSchema,\n })\n .strict()\n .refine((state) => state.requiredVersion <= state.currentVersion, {\n message: 'requiredVersion cannot exceed currentVersion',\n });\nexport type PublicDocumentVersionState = z.infer<typeof PublicDocumentVersionStateSchema>;\n\n/**\n * `_appConfig/app.publicDocumentVersions` — written only by the publish transaction. A document\n * never published has no entry. `requiredAcceptanceLevel` rises by one with every release that\n * requires acceptance; a session whose accepted level is below it is asked to accept.\n */\nexport const PublicDocumentVersionBlockSchema = z\n .object({\n documents: z.partialRecord(PublicDocumentIdSchema, PublicDocumentVersionStateSchema),\n requiredAcceptanceLevel: PublicDocumentAcceptanceLevelSchema,\n })\n .strict();\nexport type PublicDocumentVersionBlock = z.infer<typeof PublicDocumentVersionBlockSchema>;\n\n// ── The person's acceptance summary (private doc) ────────────────────────────\n\n/**\n * `privateData/{uid}.publicDocumentAcceptance` — the LATEST accepted version of each document\n * and the accepted level, replaced whole on every acceptance (registration or the re-acceptance\n * prompt). A document absent from `documentVersions` counts as version 0. The notice revision in\n * force at that acceptance is recorded when the notice was active. History is not kept here — it\n * is the `publicDocuments.accepted` audit events.\n */\nexport const PublicDocumentAcceptanceSchema = z\n .object({\n documentVersions: z.partialRecord(PublicDocumentIdSchema, PublicDocumentVersionOrNoneSchema),\n acceptedLevel: PublicDocumentAcceptanceLevelSchema,\n legalReviewNoticeRevision: LegalReviewNoticeRevisionSchema.optional(),\n acceptedAt: z.number(),\n })\n .strict();\nexport type PublicDocumentAcceptance = z.infer<typeof PublicDocumentAcceptanceSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"public-documents.js","sourceRoot":"","sources":["../../src/doc-schemas/public-documents.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,EAAE;AACF,8FAA8F;AAC9F,6FAA6F;AAC7F,0FAA0F;AAC1F,uFAAuF;AACvF,6FAA6F;AAC7F,8FAA8F;AAC9F,iFAAiF;AACjF,kEAAkE;AAClE,4FAA4F;AAC5F,EAAE;AAC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gFAAgF;AAEhF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC;KAC5C,MAAM,CAAC;IACN,gBAAgB,EAAE,CAAC,CAAC,aAAa,CAAC,sBAAsB,EAAE,iCAAiC,CAAC;IAC5F,aAAa,EAAE,mCAAmC;IAClD,yBAAyB,EAAE,+BAA+B,CAAC,QAAQ,EAAE;IACrE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["// Versioned public documents — the Firestore contracts of the release system.\n//\n// _appConfig/{documentId} current projection (public; the\n// existing page readers read it)\n// publicDocuments/{documentId}/publicDocumentVersions/v{n} immutable published version\n// publicDocumentDrafts/{documentId} the private working copy\n// publicDocumentReleases/{releaseId} one release record per publish\n// _appConfig/app.publicDocumentVersions the version block every session\n// already reads live\n// userProfiles/{uid}/privateData/{uid}.publicDocumentAcceptance\n// what the person last accepted\n//\n// All are backend-written. Versions are whole numbers v1, v2, … per document, assigned by the\n// one publish transaction; a correction is a new version, never an edit. \"Require acceptance\"\n// is recorded on the release and in the version block — never as a second version number.\n// Acceptance HISTORY lives only in the append-only `publicDocuments.accepted` audit events.\n\nimport { z } from 'zod';\nimport { SPECIAL_DOCS } from '../paths/collections.js';\nimport { PUBLIC_DOCUMENT_IDS, type PublicDocumentId } from '../constants/public-documents.js';\nimport {\n LegalPageDocumentSchema,\n RulesAndAgreementsSchema,\n FuturePlansDocumentSchema,\n TakeItDownPageCopySchema,\n DmcaPolicyDocumentSchema,\n} from './content.js';\nimport { LegalReviewNoticeRevisionSchema } from './legal-review-notice.js';\n\nexport const PublicDocumentIdSchema = z.enum(PUBLIC_DOCUMENT_IDS);\n\n/** A published version number: v1 is the first. */\nexport const PublicDocumentVersionNumberSchema = z.number().int().positive();\n\n/**\n * A version reference where 0 means \"none yet\" (never accepted / never required / no base / never\n * published). Every recorded \"which version was accepted\" field derives from it.\n */\nexport const PublicDocumentVersionOrNoneSchema = z.number().int().nonnegative();\n\n/** An acceptance level: 0 = nothing required / nothing accepted; each requiring release adds 1. */\nexport const PublicDocumentAcceptanceLevelSchema = z.number().int().nonnegative();\n\n/** A document paired with one of its published versions. */\nexport const PublicDocumentVersionRefSchema = z\n .object({\n documentId: PublicDocumentIdSchema,\n version: PublicDocumentVersionNumberSchema,\n })\n .strict();\nexport type PublicDocumentVersionRef = z.infer<typeof PublicDocumentVersionRefSchema>;\n\n// ── Content ──────────────────────────────────────────────────────────────────\n// A document's CONTENT is its current-projection shape minus `version` / `lastUpdated`, so the\n// existing page readers, the working copy, and the immutable version all share one shape.\n\nexport const LegalPageContentSchema = LegalPageDocumentSchema.pick({ sections: true });\nexport const RulesAndAgreementsContentSchema = RulesAndAgreementsSchema.pick({\n intro: true,\n groupIntentions: true,\n rules: true,\n agreements: true,\n});\nexport const FuturePlansContentSchema = FuturePlansDocumentSchema.pick({ intro: true, groups: true, plans: true });\nexport const TakeItDownPageCopyContentSchema = TakeItDownPageCopySchema.pick({ strings: true });\nexport const DmcaPolicyContentSchema = DmcaPolicyDocumentSchema.pick({\n intro: true,\n contactBlocks: true,\n sections: true,\n});\n\n/** Each document's stored content schema. */\nexport const PUBLIC_DOCUMENT_CONTENT_SCHEMAS = {\n [SPECIAL_DOCS.TERMS_PAGE]: LegalPageContentSchema,\n [SPECIAL_DOCS.PRIVACY_PAGE]: LegalPageContentSchema,\n [SPECIAL_DOCS.RULES_AND_AGREEMENTS]: RulesAndAgreementsContentSchema,\n [SPECIAL_DOCS.FUTURE_PLANS]: FuturePlansContentSchema,\n [SPECIAL_DOCS.DMCA_POLICY]: DmcaPolicyContentSchema,\n [SPECIAL_DOCS.TAKE_IT_DOWN_PAGE_COPY]: TakeItDownPageCopyContentSchema,\n} as const satisfies Record<PublicDocumentId, z.ZodType>;\n\n/** The content of document `D`. */\nexport type PublicDocumentContent<D extends PublicDocumentId = PublicDocumentId> = z.infer<\n (typeof PUBLIC_DOCUMENT_CONTENT_SCHEMAS)[D]\n>;\n\n/** Each document's current-projection schema (`_appConfig/{documentId}`). */\nexport const PUBLIC_DOCUMENT_PROJECTION_SCHEMAS = {\n [SPECIAL_DOCS.TERMS_PAGE]: LegalPageDocumentSchema,\n [SPECIAL_DOCS.PRIVACY_PAGE]: LegalPageDocumentSchema,\n [SPECIAL_DOCS.RULES_AND_AGREEMENTS]: RulesAndAgreementsSchema,\n [SPECIAL_DOCS.FUTURE_PLANS]: FuturePlansDocumentSchema,\n [SPECIAL_DOCS.DMCA_POLICY]: DmcaPolicyDocumentSchema,\n [SPECIAL_DOCS.TAKE_IT_DOWN_PAGE_COPY]: TakeItDownPageCopySchema,\n} as const satisfies Record<PublicDocumentId, z.ZodType>;\n\n/**\n * The current projection the publish writes for document `D`: its content plus the version and\n * the publish time. Assignable to the page's existing document type.\n */\nexport type PublicDocumentProjection<D extends PublicDocumentId = PublicDocumentId> =\n PublicDocumentContent<D> & { version: number; lastUpdated: number };\n\n// One discriminated branch per document, so a version or draft's `content` is typed by its\n// `documentId`.\nfunction perDocument<const S extends z.ZodRawShape>(shape: S) {\n const branch = <const D extends PublicDocumentId>(documentId: D) =>\n z.object({ documentId: z.literal(documentId), content: PUBLIC_DOCUMENT_CONTENT_SCHEMAS[documentId], ...shape });\n return z.discriminatedUnion('documentId', [\n branch(SPECIAL_DOCS.TERMS_PAGE),\n branch(SPECIAL_DOCS.PRIVACY_PAGE),\n branch(SPECIAL_DOCS.RULES_AND_AGREEMENTS),\n branch(SPECIAL_DOCS.FUTURE_PLANS),\n branch(SPECIAL_DOCS.DMCA_POLICY),\n branch(SPECIAL_DOCS.TAKE_IT_DOWN_PAGE_COPY),\n ]);\n}\n\n// ── Immutable version ────────────────────────────────────────────────────────\n\n/**\n * `publicDocuments/{documentId}/publicDocumentVersions/v{version}` — one published version,\n * written once by the publish transaction and never edited: the full content, the version,\n * the release that published it, the publisher's uid, and the server time.\n */\nexport const PublicDocumentVersionSchema = perDocument({\n version: PublicDocumentVersionNumberSchema,\n releaseId: z.string().min(1),\n publishedBy: z.string().min(1),\n publishedAt: z.number(),\n});\nexport type PublicDocumentVersion = z.infer<typeof PublicDocumentVersionSchema>;\n\n// ── Working copy ─────────────────────────────────────────────────────────────\n\n/** A working copy's revision: its first save writes 1 and every later save the next number. */\nexport const PublicDocumentDraftRevisionSchema = z.number().int().positive();\n\n/** A working-copy revision where 0 means \"no working copy\". */\nexport const PublicDocumentDraftRevisionOrNoneSchema = z.number().int().nonnegative();\n\n/**\n * `publicDocumentDrafts/{documentId}` — the one private working copy of a document, saved from\n * its Admin editor. `baseVersion` is the published version the edit started from (0 when the\n * document has never been published): the publish rejects a draft whose base is no longer the\n * current version, and one whose content equals the current version. `revision` counts its\n * saves: a save or a publish names the revision it saw and is refused when another admin's save\n * has moved it since, so one admin's save never silently replaces another's.\n */\nexport const PublicDocumentDraftSchema = perDocument({\n baseVersion: PublicDocumentVersionOrNoneSchema,\n revision: PublicDocumentDraftRevisionSchema,\n savedBy: z.string().min(1),\n savedAt: z.number(),\n});\nexport type PublicDocumentDraft = z.infer<typeof PublicDocumentDraftSchema>;\n\n// ── Release record ───────────────────────────────────────────────────────────\n\n/**\n * `publicDocumentReleases/{releaseId}` — one record per publish: which documents moved to\n * which versions, whether the release requires acceptance, the required-acceptance level in\n * force after it (raised by one only when it requires acceptance), and who published it when.\n */\nexport const PublicDocumentReleaseSchema = z.object({\n releaseId: z.string().min(1),\n documents: z.array(PublicDocumentVersionRefSchema).min(1),\n requireAcceptance: z.boolean(),\n requiredAcceptanceLevel: PublicDocumentAcceptanceLevelSchema,\n publishedBy: z.string().min(1),\n publishedAt: z.number(),\n});\nexport type PublicDocumentRelease = z.infer<typeof PublicDocumentReleaseSchema>;\n\n// ── Version block on _appConfig/app ──────────────────────────────────────────\n\n/**\n * One document's entry in the version block: its current published version and the latest\n * version a release REQUIRED acceptance of (0 when none has).\n */\nexport const PublicDocumentVersionStateSchema = z\n .object({\n currentVersion: PublicDocumentVersionNumberSchema,\n requiredVersion: PublicDocumentVersionOrNoneSchema,\n })\n .strict()\n .refine((state) => state.requiredVersion <= state.currentVersion, {\n message: 'requiredVersion cannot exceed currentVersion',\n });\nexport type PublicDocumentVersionState = z.infer<typeof PublicDocumentVersionStateSchema>;\n\n/**\n * `_appConfig/app.publicDocumentVersions` — written only by the publish transaction. A document\n * never published has no entry. `requiredAcceptanceLevel` rises by one with every release that\n * requires acceptance; a session whose accepted level is below it is asked to accept.\n */\nexport const PublicDocumentVersionBlockSchema = z\n .object({\n documents: z.partialRecord(PublicDocumentIdSchema, PublicDocumentVersionStateSchema),\n requiredAcceptanceLevel: PublicDocumentAcceptanceLevelSchema,\n })\n .strict();\nexport type PublicDocumentVersionBlock = z.infer<typeof PublicDocumentVersionBlockSchema>;\n\n// ── The person's acceptance summary (private doc) ────────────────────────────\n\n/**\n * `privateData/{uid}.publicDocumentAcceptance` — the LATEST accepted version of each document\n * and the accepted level, replaced whole on every acceptance (registration or the re-acceptance\n * prompt). A document absent from `documentVersions` counts as version 0. The notice revision in\n * force at that acceptance is recorded when the notice was active. History is not kept here — it\n * is the `publicDocuments.accepted` audit events.\n */\nexport const PublicDocumentAcceptanceSchema = z\n .object({\n documentVersions: z.partialRecord(PublicDocumentIdSchema, PublicDocumentVersionOrNoneSchema),\n acceptedLevel: PublicDocumentAcceptanceLevelSchema,\n legalReviewNoticeRevision: LegalReviewNoticeRevisionSchema.optional(),\n acceptedAt: z.number(),\n })\n .strict();\nexport type PublicDocumentAcceptance = z.infer<typeof PublicDocumentAcceptanceSchema>;\n"]}
|