@ttt-productions/ttt-core 0.79.48 → 0.79.49
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/business-admin.d.ts +7 -0
- package/dist/constants/business-admin.d.ts.map +1 -1
- package/dist/constants/business-admin.js +7 -0
- package/dist/constants/business-admin.js.map +1 -1
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +3 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/legal-review-notice-state.d.ts +5 -0
- package/dist/constants/legal-review-notice-state.d.ts.map +1 -0
- package/dist/constants/legal-review-notice-state.js +19 -0
- package/dist/constants/legal-review-notice-state.js.map +1 -0
- package/dist/constants/legal-review-notice.d.ts +102 -0
- package/dist/constants/legal-review-notice.d.ts.map +1 -0
- package/dist/constants/legal-review-notice.js +171 -0
- package/dist/constants/legal-review-notice.js.map +1 -0
- package/dist/constants/public-documents.d.ts +20 -0
- package/dist/constants/public-documents.d.ts.map +1 -0
- package/dist/constants/public-documents.js +48 -0
- package/dist/constants/public-documents.js.map +1 -0
- package/dist/doc-schemas/content.d.ts +56 -0
- package/dist/doc-schemas/content.d.ts.map +1 -1
- package/dist/doc-schemas/content.js +34 -0
- package/dist/doc-schemas/content.js.map +1 -1
- package/dist/doc-schemas/index.d.ts +2 -0
- package/dist/doc-schemas/index.d.ts.map +1 -1
- package/dist/doc-schemas/index.js +2 -0
- package/dist/doc-schemas/index.js.map +1 -1
- package/dist/doc-schemas/legal-review-notice.d.ts +8 -0
- package/dist/doc-schemas/legal-review-notice.d.ts.map +1 -0
- package/dist/doc-schemas/legal-review-notice.js +14 -0
- package/dist/doc-schemas/legal-review-notice.js.map +1 -0
- package/dist/doc-schemas/payments.d.ts +4 -0
- package/dist/doc-schemas/payments.d.ts.map +1 -1
- package/dist/doc-schemas/payments.js +6 -0
- package/dist/doc-schemas/payments.js.map +1 -1
- package/dist/doc-schemas/public-documents.d.ts +677 -0
- package/dist/doc-schemas/public-documents.d.ts.map +1 -0
- package/dist/doc-schemas/public-documents.js +158 -0
- package/dist/doc-schemas/public-documents.js.map +1 -0
- package/dist/doc-schemas/registry.d.ts +338 -23
- package/dist/doc-schemas/registry.d.ts.map +1 -1
- package/dist/doc-schemas/registry.js +8 -1
- package/dist/doc-schemas/registry.js.map +1 -1
- package/dist/doc-schemas/safety/case.d.ts +3 -3
- package/dist/doc-schemas/system.d.ts +14 -0
- package/dist/doc-schemas/system.d.ts.map +1 -1
- package/dist/doc-schemas/system.js +7 -0
- package/dist/doc-schemas/system.js.map +1 -1
- package/dist/doc-schemas/user.d.ts +14 -1
- package/dist/doc-schemas/user.d.ts.map +1 -1
- package/dist/doc-schemas/user.js +13 -7
- package/dist/doc-schemas/user.js.map +1 -1
- package/dist/media/domain-events-admin.d.ts +0 -6
- package/dist/media/domain-events-admin.d.ts.map +1 -1
- package/dist/media/domain-events-admin.js +0 -10
- package/dist/media/domain-events-admin.js.map +1 -1
- package/dist/media/domain-events.d.ts +0 -5
- 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/pending-media.d.ts +0 -55
- package/dist/media/pending-media.d.ts.map +1 -1
- package/dist/paths/collection-refs.d.ts +2 -0
- package/dist/paths/collection-refs.d.ts.map +1 -1
- package/dist/paths/collection-refs.js +3 -0
- package/dist/paths/collection-refs.js.map +1 -1
- package/dist/paths/collections.d.ts +5 -0
- package/dist/paths/collections.d.ts.map +1 -1
- package/dist/paths/collections.js +14 -0
- package/dist/paths/collections.js.map +1 -1
- package/dist/paths/path-builders.d.ts +8 -0
- package/dist/paths/path-builders.d.ts.map +1 -1
- package/dist/paths/path-builders.js +17 -0
- package/dist/paths/path-builders.js.map +1 -1
- package/dist/schemas/admin.d.ts +119 -42
- package/dist/schemas/admin.d.ts.map +1 -1
- package/dist/schemas/admin.js +49 -30
- package/dist/schemas/admin.js.map +1 -1
- package/dist/schemas/atoms.d.ts +8 -0
- package/dist/schemas/atoms.d.ts.map +1 -1
- package/dist/schemas/atoms.js +8 -0
- package/dist/schemas/atoms.js.map +1 -1
- package/dist/schemas/hall-library.d.ts +1 -0
- package/dist/schemas/hall-library.d.ts.map +1 -1
- package/dist/schemas/hall-library.js +6 -1
- package/dist/schemas/hall-library.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/notification.d.ts +1 -1
- package/dist/schemas/payments.d.ts +1 -0
- package/dist/schemas/payments.d.ts.map +1 -1
- package/dist/schemas/payments.js +5 -0
- package/dist/schemas/payments.js.map +1 -1
- package/dist/schemas/public-documents.d.ts +399 -0
- package/dist/schemas/public-documents.d.ts.map +1 -0
- package/dist/schemas/public-documents.js +147 -0
- package/dist/schemas/public-documents.js.map +1 -0
- package/dist/schemas/safety.d.ts +1 -1
- package/dist/types/audit.d.ts +1 -1
- package/dist/types/audit.d.ts.map +1 -1
- package/dist/types/audit.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/public-documents.d.ts +3 -0
- package/dist/types/public-documents.d.ts.map +1 -0
- package/dist/types/public-documents.js +2 -0
- package/dist/types/public-documents.js.map +1 -0
- package/dist/types/system.d.ts +3 -3
- package/dist/types/system.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/public-documents.d.ts +63 -0
- package/dist/utils/public-documents.d.ts.map +1 -0
- package/dist/utils/public-documents.js +143 -0
- package/dist/utils/public-documents.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
// Versioned public documents — the Firestore contracts of the release system.
|
|
2
|
+
//
|
|
3
|
+
// _appConfig/{documentId} current projection (public; the
|
|
4
|
+
// existing page readers read it)
|
|
5
|
+
// publicDocuments/{documentId}/publicDocumentVersions/v{n} immutable published version
|
|
6
|
+
// publicDocumentDrafts/{documentId} the private working copy
|
|
7
|
+
// publicDocumentReleases/{releaseId} one release record per publish
|
|
8
|
+
// _appConfig/app.publicDocumentVersions the version block every session
|
|
9
|
+
// already reads live
|
|
10
|
+
// userProfiles/{uid}/privateData/{uid}.publicDocumentAcceptance
|
|
11
|
+
// what the person last accepted
|
|
12
|
+
//
|
|
13
|
+
// All are backend-written. Versions are whole numbers v1, v2, … per document, assigned by the
|
|
14
|
+
// one publish transaction; a correction is a new version, never an edit. "Require acceptance"
|
|
15
|
+
// is recorded on the release and in the version block — never as a second version number.
|
|
16
|
+
// Acceptance HISTORY lives only in the append-only `publicDocuments.accepted` audit events.
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
import { SPECIAL_DOCS } from '../paths/collections.js';
|
|
19
|
+
import { PUBLIC_DOCUMENT_IDS } from '../constants/public-documents.js';
|
|
20
|
+
import { LegalPageDocumentSchema, RulesAndAgreementsSchema, FuturePlansDocumentSchema, TakeItDownPageCopySchema, DmcaPolicyDocumentSchema, } from './content.js';
|
|
21
|
+
import { LegalReviewNoticeRevisionSchema } from './legal-review-notice.js';
|
|
22
|
+
export const PublicDocumentIdSchema = z.enum(PUBLIC_DOCUMENT_IDS);
|
|
23
|
+
/** A published version number: v1 is the first. */
|
|
24
|
+
export const PublicDocumentVersionNumberSchema = z.number().int().positive();
|
|
25
|
+
/** A version reference where 0 means "none yet" (never accepted / never required / no base). */
|
|
26
|
+
const versionOrNoneSchema = z.number().int().nonnegative();
|
|
27
|
+
/** An acceptance level: 0 = nothing required / nothing accepted; each requiring release adds 1. */
|
|
28
|
+
export const PublicDocumentAcceptanceLevelSchema = z.number().int().nonnegative();
|
|
29
|
+
/** A document paired with one of its published versions. */
|
|
30
|
+
export const PublicDocumentVersionRefSchema = z
|
|
31
|
+
.object({
|
|
32
|
+
documentId: PublicDocumentIdSchema,
|
|
33
|
+
version: PublicDocumentVersionNumberSchema,
|
|
34
|
+
})
|
|
35
|
+
.strict();
|
|
36
|
+
// ── Content ──────────────────────────────────────────────────────────────────
|
|
37
|
+
// A document's CONTENT is its current-projection shape minus `version` / `lastUpdated`, so the
|
|
38
|
+
// existing page readers, the working copy, and the immutable version all share one shape.
|
|
39
|
+
export const LegalPageContentSchema = LegalPageDocumentSchema.pick({ sections: true });
|
|
40
|
+
export const RulesAndAgreementsContentSchema = RulesAndAgreementsSchema.pick({ rules: true, agreements: true });
|
|
41
|
+
export const FuturePlansContentSchema = FuturePlansDocumentSchema.pick({ plans: true });
|
|
42
|
+
export const TakeItDownPageCopyContentSchema = TakeItDownPageCopySchema.pick({ strings: true });
|
|
43
|
+
export const DmcaPolicyContentSchema = DmcaPolicyDocumentSchema.pick({
|
|
44
|
+
intro: true,
|
|
45
|
+
contactBlocks: true,
|
|
46
|
+
sections: true,
|
|
47
|
+
});
|
|
48
|
+
/** Each document's stored content schema. */
|
|
49
|
+
export const PUBLIC_DOCUMENT_CONTENT_SCHEMAS = {
|
|
50
|
+
[SPECIAL_DOCS.TERMS_PAGE]: LegalPageContentSchema,
|
|
51
|
+
[SPECIAL_DOCS.PRIVACY_PAGE]: LegalPageContentSchema,
|
|
52
|
+
[SPECIAL_DOCS.RULES_AND_AGREEMENTS]: RulesAndAgreementsContentSchema,
|
|
53
|
+
[SPECIAL_DOCS.FUTURE_PLANS]: FuturePlansContentSchema,
|
|
54
|
+
[SPECIAL_DOCS.DMCA_POLICY]: DmcaPolicyContentSchema,
|
|
55
|
+
[SPECIAL_DOCS.TAKE_IT_DOWN_PAGE_COPY]: TakeItDownPageCopyContentSchema,
|
|
56
|
+
};
|
|
57
|
+
/** Each document's current-projection schema (`_appConfig/{documentId}`). */
|
|
58
|
+
export const PUBLIC_DOCUMENT_PROJECTION_SCHEMAS = {
|
|
59
|
+
[SPECIAL_DOCS.TERMS_PAGE]: LegalPageDocumentSchema,
|
|
60
|
+
[SPECIAL_DOCS.PRIVACY_PAGE]: LegalPageDocumentSchema,
|
|
61
|
+
[SPECIAL_DOCS.RULES_AND_AGREEMENTS]: RulesAndAgreementsSchema,
|
|
62
|
+
[SPECIAL_DOCS.FUTURE_PLANS]: FuturePlansDocumentSchema,
|
|
63
|
+
[SPECIAL_DOCS.DMCA_POLICY]: DmcaPolicyDocumentSchema,
|
|
64
|
+
[SPECIAL_DOCS.TAKE_IT_DOWN_PAGE_COPY]: TakeItDownPageCopySchema,
|
|
65
|
+
};
|
|
66
|
+
// One discriminated branch per document, so a version or draft's `content` is typed by its
|
|
67
|
+
// `documentId`.
|
|
68
|
+
function perDocument(shape) {
|
|
69
|
+
const branch = (documentId) => z.object({ documentId: z.literal(documentId), content: PUBLIC_DOCUMENT_CONTENT_SCHEMAS[documentId], ...shape });
|
|
70
|
+
return z.discriminatedUnion('documentId', [
|
|
71
|
+
branch(SPECIAL_DOCS.TERMS_PAGE),
|
|
72
|
+
branch(SPECIAL_DOCS.PRIVACY_PAGE),
|
|
73
|
+
branch(SPECIAL_DOCS.RULES_AND_AGREEMENTS),
|
|
74
|
+
branch(SPECIAL_DOCS.FUTURE_PLANS),
|
|
75
|
+
branch(SPECIAL_DOCS.DMCA_POLICY),
|
|
76
|
+
branch(SPECIAL_DOCS.TAKE_IT_DOWN_PAGE_COPY),
|
|
77
|
+
]);
|
|
78
|
+
}
|
|
79
|
+
// ── Immutable version ────────────────────────────────────────────────────────
|
|
80
|
+
/**
|
|
81
|
+
* `publicDocuments/{documentId}/publicDocumentVersions/v{version}` — one published version,
|
|
82
|
+
* written once by the publish transaction and never edited: the full content, the version,
|
|
83
|
+
* the release that published it, the publisher's uid, and the server time.
|
|
84
|
+
*/
|
|
85
|
+
export const PublicDocumentVersionSchema = perDocument({
|
|
86
|
+
version: PublicDocumentVersionNumberSchema,
|
|
87
|
+
releaseId: z.string().min(1),
|
|
88
|
+
publishedBy: z.string().min(1),
|
|
89
|
+
publishedAt: z.number(),
|
|
90
|
+
});
|
|
91
|
+
// ── Working copy ─────────────────────────────────────────────────────────────
|
|
92
|
+
/**
|
|
93
|
+
* `publicDocumentDrafts/{documentId}` — the one private working copy of a document, saved from
|
|
94
|
+
* its Admin editor. `baseVersion` is the published version the edit started from (0 when the
|
|
95
|
+
* document has never been published): the publish rejects a draft whose base is no longer the
|
|
96
|
+
* current version, and one whose content equals the current version.
|
|
97
|
+
*/
|
|
98
|
+
export const PublicDocumentDraftSchema = perDocument({
|
|
99
|
+
baseVersion: versionOrNoneSchema,
|
|
100
|
+
savedBy: z.string().min(1),
|
|
101
|
+
savedAt: z.number(),
|
|
102
|
+
});
|
|
103
|
+
// ── Release record ───────────────────────────────────────────────────────────
|
|
104
|
+
/**
|
|
105
|
+
* `publicDocumentReleases/{releaseId}` — one record per publish: which documents moved to
|
|
106
|
+
* which versions, whether the release requires acceptance, the required-acceptance level in
|
|
107
|
+
* force after it (raised by one only when it requires acceptance), and who published it when.
|
|
108
|
+
*/
|
|
109
|
+
export const PublicDocumentReleaseSchema = z.object({
|
|
110
|
+
releaseId: z.string().min(1),
|
|
111
|
+
documents: z.array(PublicDocumentVersionRefSchema).min(1),
|
|
112
|
+
requireAcceptance: z.boolean(),
|
|
113
|
+
requiredAcceptanceLevel: PublicDocumentAcceptanceLevelSchema,
|
|
114
|
+
publishedBy: z.string().min(1),
|
|
115
|
+
publishedAt: z.number(),
|
|
116
|
+
});
|
|
117
|
+
// ── Version block on _appConfig/app ──────────────────────────────────────────
|
|
118
|
+
/**
|
|
119
|
+
* One document's entry in the version block: its current published version and the latest
|
|
120
|
+
* version a release REQUIRED acceptance of (0 when none has).
|
|
121
|
+
*/
|
|
122
|
+
export const PublicDocumentVersionStateSchema = z
|
|
123
|
+
.object({
|
|
124
|
+
currentVersion: PublicDocumentVersionNumberSchema,
|
|
125
|
+
requiredVersion: versionOrNoneSchema,
|
|
126
|
+
})
|
|
127
|
+
.strict()
|
|
128
|
+
.refine((state) => state.requiredVersion <= state.currentVersion, {
|
|
129
|
+
message: 'requiredVersion cannot exceed currentVersion',
|
|
130
|
+
});
|
|
131
|
+
/**
|
|
132
|
+
* `_appConfig/app.publicDocumentVersions` — written only by the publish transaction. A document
|
|
133
|
+
* never published has no entry. `requiredAcceptanceLevel` rises by one with every release that
|
|
134
|
+
* requires acceptance; a session whose accepted level is below it is asked to accept.
|
|
135
|
+
*/
|
|
136
|
+
export const PublicDocumentVersionBlockSchema = z
|
|
137
|
+
.object({
|
|
138
|
+
documents: z.partialRecord(PublicDocumentIdSchema, PublicDocumentVersionStateSchema),
|
|
139
|
+
requiredAcceptanceLevel: PublicDocumentAcceptanceLevelSchema,
|
|
140
|
+
})
|
|
141
|
+
.strict();
|
|
142
|
+
// ── The person's acceptance summary (private doc) ────────────────────────────
|
|
143
|
+
/**
|
|
144
|
+
* `privateData/{uid}.publicDocumentAcceptance` — the LATEST accepted version of each document
|
|
145
|
+
* and the accepted level, replaced whole on every acceptance (registration or the re-acceptance
|
|
146
|
+
* prompt). A document absent from `documentVersions` counts as version 0. The notice revision in
|
|
147
|
+
* force at that acceptance is recorded when the notice was active. History is not kept here — it
|
|
148
|
+
* is the `publicDocuments.accepted` audit events.
|
|
149
|
+
*/
|
|
150
|
+
export const PublicDocumentAcceptanceSchema = z
|
|
151
|
+
.object({
|
|
152
|
+
documentVersions: z.partialRecord(PublicDocumentIdSchema, versionOrNoneSchema),
|
|
153
|
+
acceptedLevel: PublicDocumentAcceptanceLevelSchema,
|
|
154
|
+
legalReviewNoticeRevision: LegalReviewNoticeRevisionSchema.optional(),
|
|
155
|
+
acceptedAt: z.number(),
|
|
156
|
+
})
|
|
157
|
+
.strict();
|
|
158
|
+
//# sourceMappingURL=public-documents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-documents.js","sourceRoot":"","sources":["../../src/doc-schemas/public-documents.ts"],"names":[],"mappings":"AAAA,8EAA8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+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/** A version reference where 0 means \"none yet\" (never accepted / never required / no base). */\nconst versionOrNoneSchema = 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/**\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.\n */\nexport const PublicDocumentDraftSchema = perDocument({\n baseVersion: versionOrNoneSchema,\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: versionOrNoneSchema,\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, versionOrNoneSchema),\n acceptedLevel: PublicDocumentAcceptanceLevelSchema,\n legalReviewNoticeRevision: LegalReviewNoticeRevisionSchema.optional(),\n acceptedAt: z.number(),\n })\n .strict();\nexport type PublicDocumentAcceptance = z.infer<typeof PublicDocumentAcceptanceSchema>;\n"]}
|
|
@@ -7,7 +7,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
7
7
|
profilePictureAssetId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
8
|
artisanCreator: z.ZodOptional<z.ZodNumber>;
|
|
9
9
|
hasPledged: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
-
charterSignupMember: z.ZodOptional<z.ZodBoolean>;
|
|
11
10
|
status: z.ZodOptional<z.ZodEnum<{
|
|
12
11
|
banned: "banned";
|
|
13
12
|
active: "active";
|
|
@@ -74,6 +73,7 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
74
73
|
}, z.core.$strip>>;
|
|
75
74
|
squareStreetzAgreementsDate: z.ZodOptional<z.ZodNumber>;
|
|
76
75
|
squareStreetzAgreementsVersion: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
artisanCreatorAgreementsVersion: z.ZodOptional<z.ZodNumber>;
|
|
77
77
|
hallDownloadAcknowledgedAt: z.ZodOptional<z.ZodNumber>;
|
|
78
78
|
agreements: z.ZodOptional<z.ZodObject<{
|
|
79
79
|
age: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -85,6 +85,19 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
85
85
|
termsVersion: z.ZodOptional<z.ZodNumber>;
|
|
86
86
|
privacyVersion: z.ZodOptional<z.ZodNumber>;
|
|
87
87
|
}, z.core.$strip>>;
|
|
88
|
+
publicDocumentAcceptance: z.ZodOptional<z.ZodObject<{
|
|
89
|
+
documentVersions: z.ZodRecord<z.ZodEnum<{
|
|
90
|
+
futurePlans: "futurePlans";
|
|
91
|
+
rulesAndAgreements: "rulesAndAgreements";
|
|
92
|
+
termsOfService: "termsOfService";
|
|
93
|
+
privacyPolicy: "privacyPolicy";
|
|
94
|
+
takeItDownPageCopy: "takeItDownPageCopy";
|
|
95
|
+
dmcaPolicy: "dmcaPolicy";
|
|
96
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
97
|
+
acceptedLevel: z.ZodNumber;
|
|
98
|
+
legalReviewNoticeRevision: z.ZodOptional<z.ZodString>;
|
|
99
|
+
acceptedAt: z.ZodNumber;
|
|
100
|
+
}, z.core.$strict>>;
|
|
88
101
|
siteTour: z.ZodOptional<z.ZodObject<{
|
|
89
102
|
completedVersion: z.ZodOptional<z.ZodNumber>;
|
|
90
103
|
completedAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -904,6 +917,10 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
904
917
|
refundIds: z.ZodArray<z.ZodString>;
|
|
905
918
|
disputeId: z.ZodNullable<z.ZodString>;
|
|
906
919
|
ageAttestedAt: z.ZodNumber;
|
|
920
|
+
legalReviewNotice: z.ZodOptional<z.ZodObject<{
|
|
921
|
+
revision: z.ZodString;
|
|
922
|
+
acknowledgedAt: z.ZodNumber;
|
|
923
|
+
}, z.core.$strict>>;
|
|
907
924
|
createdAt: z.ZodNumber;
|
|
908
925
|
updatedAt: z.ZodNumber;
|
|
909
926
|
}, z.core.$strip>;
|
|
@@ -1010,6 +1027,10 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
1010
1027
|
attestNoBegging: z.ZodLiteral<true>;
|
|
1011
1028
|
attestHumanMadeOriginal: z.ZodLiteral<true>;
|
|
1012
1029
|
attestedAt: z.ZodNumber;
|
|
1030
|
+
legalReviewNotice: z.ZodOptional<z.ZodObject<{
|
|
1031
|
+
revision: z.ZodString;
|
|
1032
|
+
acknowledgedAt: z.ZodNumber;
|
|
1033
|
+
}, z.core.$strict>>;
|
|
1013
1034
|
confirmedNoBegging: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1014
1035
|
confirmedNoCredits: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1015
1036
|
confirmedConsistentFormat: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -2327,11 +2348,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
2327
2348
|
thresholdItemId: z.ZodString;
|
|
2328
2349
|
hallItemId: z.ZodString;
|
|
2329
2350
|
}, z.core.$strict>;
|
|
2330
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
2331
|
-
type: z.ZodLiteral<"adminDispatch.systemMarked">;
|
|
2332
|
-
ids: z.ZodObject<{
|
|
2333
|
-
userId: z.ZodString;
|
|
2334
|
-
}, z.core.$strict>;
|
|
2335
2351
|
}, z.core.$strict>, z.ZodObject<{
|
|
2336
2352
|
type: z.ZodLiteral<"adminDispatch.threadUpdated">;
|
|
2337
2353
|
ids: z.ZodObject<{
|
|
@@ -2805,11 +2821,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
2805
2821
|
thresholdItemId: z.ZodString;
|
|
2806
2822
|
hallItemId: z.ZodString;
|
|
2807
2823
|
}, z.core.$strict>;
|
|
2808
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
2809
|
-
type: z.ZodLiteral<"adminDispatch.systemMarked">;
|
|
2810
|
-
ids: z.ZodObject<{
|
|
2811
|
-
userId: z.ZodString;
|
|
2812
|
-
}, z.core.$strict>;
|
|
2813
2824
|
}, z.core.$strict>, z.ZodObject<{
|
|
2814
2825
|
type: z.ZodLiteral<"adminDispatch.threadUpdated">;
|
|
2815
2826
|
ids: z.ZodObject<{
|
|
@@ -3201,11 +3212,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
3201
3212
|
thresholdItemId: z.ZodString;
|
|
3202
3213
|
hallItemId: z.ZodString;
|
|
3203
3214
|
}, z.core.$strict>;
|
|
3204
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
3205
|
-
type: z.ZodLiteral<"adminDispatch.systemMarked">;
|
|
3206
|
-
ids: z.ZodObject<{
|
|
3207
|
-
userId: z.ZodString;
|
|
3208
|
-
}, z.core.$strict>;
|
|
3209
3215
|
}, z.core.$strict>, z.ZodObject<{
|
|
3210
3216
|
type: z.ZodLiteral<"adminDispatch.threadUpdated">;
|
|
3211
3217
|
ids: z.ZodObject<{
|
|
@@ -3681,11 +3687,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
3681
3687
|
thresholdItemId: z.ZodString;
|
|
3682
3688
|
hallItemId: z.ZodString;
|
|
3683
3689
|
}, z.core.$strict>;
|
|
3684
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
3685
|
-
type: z.ZodLiteral<"adminDispatch.systemMarked">;
|
|
3686
|
-
ids: z.ZodObject<{
|
|
3687
|
-
userId: z.ZodString;
|
|
3688
|
-
}, z.core.$strict>;
|
|
3689
3690
|
}, z.core.$strict>, z.ZodObject<{
|
|
3690
3691
|
type: z.ZodLiteral<"adminDispatch.threadUpdated">;
|
|
3691
3692
|
ids: z.ZodObject<{
|
|
@@ -4721,6 +4722,282 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
4721
4722
|
}>;
|
|
4722
4723
|
reason: z.ZodLiteral<"postCommitAuthEffectFailed">;
|
|
4723
4724
|
}, z.core.$strip>;
|
|
4725
|
+
readonly 'publicDocuments/{documentId}/publicDocumentVersions/{versionId}': z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4726
|
+
documentId: z.ZodLiteral<"termsOfService">;
|
|
4727
|
+
content: z.ZodObject<{
|
|
4728
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
4729
|
+
id: z.ZodString;
|
|
4730
|
+
heading: z.ZodString;
|
|
4731
|
+
level: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
4732
|
+
body: z.ZodString;
|
|
4733
|
+
order: z.ZodNumber;
|
|
4734
|
+
}, z.core.$strip>>;
|
|
4735
|
+
}, z.core.$strip>;
|
|
4736
|
+
version: z.ZodNumber;
|
|
4737
|
+
releaseId: z.ZodString;
|
|
4738
|
+
publishedBy: z.ZodString;
|
|
4739
|
+
publishedAt: z.ZodNumber;
|
|
4740
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4741
|
+
documentId: z.ZodLiteral<"privacyPolicy">;
|
|
4742
|
+
content: z.ZodObject<{
|
|
4743
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
4744
|
+
id: z.ZodString;
|
|
4745
|
+
heading: z.ZodString;
|
|
4746
|
+
level: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
4747
|
+
body: z.ZodString;
|
|
4748
|
+
order: z.ZodNumber;
|
|
4749
|
+
}, z.core.$strip>>;
|
|
4750
|
+
}, z.core.$strip>;
|
|
4751
|
+
version: z.ZodNumber;
|
|
4752
|
+
releaseId: z.ZodString;
|
|
4753
|
+
publishedBy: z.ZodString;
|
|
4754
|
+
publishedAt: z.ZodNumber;
|
|
4755
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4756
|
+
documentId: z.ZodLiteral<"rulesAndAgreements">;
|
|
4757
|
+
content: z.ZodObject<{
|
|
4758
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
4759
|
+
id: z.ZodString;
|
|
4760
|
+
title: z.ZodString;
|
|
4761
|
+
description: z.ZodString;
|
|
4762
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
4763
|
+
group: z.ZodOptional<z.ZodEnum<{
|
|
4764
|
+
workRealm: "workRealm";
|
|
4765
|
+
workProjectType: "workProjectType";
|
|
4766
|
+
hallWingType: "hallWingType";
|
|
4767
|
+
generic: "generic";
|
|
4768
|
+
merchandising: "merchandising";
|
|
4769
|
+
}>>;
|
|
4770
|
+
subgroup: z.ZodOptional<z.ZodEnum<{
|
|
4771
|
+
Tales: "Tales";
|
|
4772
|
+
Tunes: "Tunes";
|
|
4773
|
+
Television: "Television";
|
|
4774
|
+
entertainment: "entertainment";
|
|
4775
|
+
educational: "educational";
|
|
4776
|
+
newsPolitical: "newsPolitical";
|
|
4777
|
+
}>>;
|
|
4778
|
+
order: z.ZodNumber;
|
|
4779
|
+
}, z.core.$strip>>;
|
|
4780
|
+
agreements: z.ZodObject<{
|
|
4781
|
+
tales: z.ZodOptional<z.ZodObject<{
|
|
4782
|
+
points: z.ZodArray<z.ZodString>;
|
|
4783
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
4784
|
+
}, z.core.$strip>>;
|
|
4785
|
+
tunes: z.ZodOptional<z.ZodObject<{
|
|
4786
|
+
points: z.ZodArray<z.ZodString>;
|
|
4787
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
4788
|
+
}, z.core.$strip>>;
|
|
4789
|
+
television: z.ZodOptional<z.ZodObject<{
|
|
4790
|
+
points: z.ZodArray<z.ZodString>;
|
|
4791
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
4792
|
+
}, z.core.$strip>>;
|
|
4793
|
+
}, z.core.$strip>;
|
|
4794
|
+
}, z.core.$strip>;
|
|
4795
|
+
version: z.ZodNumber;
|
|
4796
|
+
releaseId: z.ZodString;
|
|
4797
|
+
publishedBy: z.ZodString;
|
|
4798
|
+
publishedAt: z.ZodNumber;
|
|
4799
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4800
|
+
documentId: z.ZodLiteral<"futurePlans">;
|
|
4801
|
+
content: z.ZodObject<{
|
|
4802
|
+
plans: z.ZodArray<z.ZodObject<{
|
|
4803
|
+
id: z.ZodString;
|
|
4804
|
+
title: z.ZodString;
|
|
4805
|
+
description: z.ZodString;
|
|
4806
|
+
order: z.ZodNumber;
|
|
4807
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
4808
|
+
mediaType: z.ZodOptional<z.ZodEnum<{
|
|
4809
|
+
image: "image";
|
|
4810
|
+
video: "video";
|
|
4811
|
+
audio: "audio";
|
|
4812
|
+
other: "other";
|
|
4813
|
+
}>>;
|
|
4814
|
+
}, z.core.$strip>>;
|
|
4815
|
+
}, z.core.$strip>;
|
|
4816
|
+
version: z.ZodNumber;
|
|
4817
|
+
releaseId: z.ZodString;
|
|
4818
|
+
publishedBy: z.ZodString;
|
|
4819
|
+
publishedAt: z.ZodNumber;
|
|
4820
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4821
|
+
documentId: z.ZodLiteral<"dmcaPolicy">;
|
|
4822
|
+
content: z.ZodObject<{
|
|
4823
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
4824
|
+
id: z.ZodString;
|
|
4825
|
+
heading: z.ZodString;
|
|
4826
|
+
level: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
4827
|
+
body: z.ZodString;
|
|
4828
|
+
order: z.ZodNumber;
|
|
4829
|
+
}, z.core.$strip>>;
|
|
4830
|
+
intro: z.ZodString;
|
|
4831
|
+
contactBlocks: z.ZodArray<z.ZodObject<{
|
|
4832
|
+
id: z.ZodString;
|
|
4833
|
+
heading: z.ZodString;
|
|
4834
|
+
order: z.ZodNumber;
|
|
4835
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
4836
|
+
id: z.ZodString;
|
|
4837
|
+
label: z.ZodString;
|
|
4838
|
+
value: z.ZodString;
|
|
4839
|
+
order: z.ZodNumber;
|
|
4840
|
+
}, z.core.$strip>>;
|
|
4841
|
+
}, z.core.$strip>>;
|
|
4842
|
+
}, z.core.$strip>;
|
|
4843
|
+
version: z.ZodNumber;
|
|
4844
|
+
releaseId: z.ZodString;
|
|
4845
|
+
publishedBy: z.ZodString;
|
|
4846
|
+
publishedAt: z.ZodNumber;
|
|
4847
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4848
|
+
documentId: z.ZodLiteral<"takeItDownPageCopy">;
|
|
4849
|
+
content: z.ZodObject<{
|
|
4850
|
+
strings: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
4851
|
+
}, z.core.$strip>;
|
|
4852
|
+
version: z.ZodNumber;
|
|
4853
|
+
releaseId: z.ZodString;
|
|
4854
|
+
publishedBy: z.ZodString;
|
|
4855
|
+
publishedAt: z.ZodNumber;
|
|
4856
|
+
}, z.core.$strip>], "documentId">;
|
|
4857
|
+
readonly 'publicDocumentDrafts/{documentId}': z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4858
|
+
documentId: z.ZodLiteral<"termsOfService">;
|
|
4859
|
+
content: z.ZodObject<{
|
|
4860
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
4861
|
+
id: z.ZodString;
|
|
4862
|
+
heading: z.ZodString;
|
|
4863
|
+
level: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
4864
|
+
body: z.ZodString;
|
|
4865
|
+
order: z.ZodNumber;
|
|
4866
|
+
}, z.core.$strip>>;
|
|
4867
|
+
}, z.core.$strip>;
|
|
4868
|
+
baseVersion: z.ZodNumber;
|
|
4869
|
+
savedBy: z.ZodString;
|
|
4870
|
+
savedAt: z.ZodNumber;
|
|
4871
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4872
|
+
documentId: z.ZodLiteral<"privacyPolicy">;
|
|
4873
|
+
content: z.ZodObject<{
|
|
4874
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
4875
|
+
id: z.ZodString;
|
|
4876
|
+
heading: z.ZodString;
|
|
4877
|
+
level: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
4878
|
+
body: z.ZodString;
|
|
4879
|
+
order: z.ZodNumber;
|
|
4880
|
+
}, z.core.$strip>>;
|
|
4881
|
+
}, z.core.$strip>;
|
|
4882
|
+
baseVersion: z.ZodNumber;
|
|
4883
|
+
savedBy: z.ZodString;
|
|
4884
|
+
savedAt: z.ZodNumber;
|
|
4885
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4886
|
+
documentId: z.ZodLiteral<"rulesAndAgreements">;
|
|
4887
|
+
content: z.ZodObject<{
|
|
4888
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
4889
|
+
id: z.ZodString;
|
|
4890
|
+
title: z.ZodString;
|
|
4891
|
+
description: z.ZodString;
|
|
4892
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
4893
|
+
group: z.ZodOptional<z.ZodEnum<{
|
|
4894
|
+
workRealm: "workRealm";
|
|
4895
|
+
workProjectType: "workProjectType";
|
|
4896
|
+
hallWingType: "hallWingType";
|
|
4897
|
+
generic: "generic";
|
|
4898
|
+
merchandising: "merchandising";
|
|
4899
|
+
}>>;
|
|
4900
|
+
subgroup: z.ZodOptional<z.ZodEnum<{
|
|
4901
|
+
Tales: "Tales";
|
|
4902
|
+
Tunes: "Tunes";
|
|
4903
|
+
Television: "Television";
|
|
4904
|
+
entertainment: "entertainment";
|
|
4905
|
+
educational: "educational";
|
|
4906
|
+
newsPolitical: "newsPolitical";
|
|
4907
|
+
}>>;
|
|
4908
|
+
order: z.ZodNumber;
|
|
4909
|
+
}, z.core.$strip>>;
|
|
4910
|
+
agreements: z.ZodObject<{
|
|
4911
|
+
tales: z.ZodOptional<z.ZodObject<{
|
|
4912
|
+
points: z.ZodArray<z.ZodString>;
|
|
4913
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
4914
|
+
}, z.core.$strip>>;
|
|
4915
|
+
tunes: z.ZodOptional<z.ZodObject<{
|
|
4916
|
+
points: z.ZodArray<z.ZodString>;
|
|
4917
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
4918
|
+
}, z.core.$strip>>;
|
|
4919
|
+
television: z.ZodOptional<z.ZodObject<{
|
|
4920
|
+
points: z.ZodArray<z.ZodString>;
|
|
4921
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
4922
|
+
}, z.core.$strip>>;
|
|
4923
|
+
}, z.core.$strip>;
|
|
4924
|
+
}, z.core.$strip>;
|
|
4925
|
+
baseVersion: z.ZodNumber;
|
|
4926
|
+
savedBy: z.ZodString;
|
|
4927
|
+
savedAt: z.ZodNumber;
|
|
4928
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4929
|
+
documentId: z.ZodLiteral<"futurePlans">;
|
|
4930
|
+
content: z.ZodObject<{
|
|
4931
|
+
plans: z.ZodArray<z.ZodObject<{
|
|
4932
|
+
id: z.ZodString;
|
|
4933
|
+
title: z.ZodString;
|
|
4934
|
+
description: z.ZodString;
|
|
4935
|
+
order: z.ZodNumber;
|
|
4936
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
4937
|
+
mediaType: z.ZodOptional<z.ZodEnum<{
|
|
4938
|
+
image: "image";
|
|
4939
|
+
video: "video";
|
|
4940
|
+
audio: "audio";
|
|
4941
|
+
other: "other";
|
|
4942
|
+
}>>;
|
|
4943
|
+
}, z.core.$strip>>;
|
|
4944
|
+
}, z.core.$strip>;
|
|
4945
|
+
baseVersion: z.ZodNumber;
|
|
4946
|
+
savedBy: z.ZodString;
|
|
4947
|
+
savedAt: z.ZodNumber;
|
|
4948
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4949
|
+
documentId: z.ZodLiteral<"dmcaPolicy">;
|
|
4950
|
+
content: z.ZodObject<{
|
|
4951
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
4952
|
+
id: z.ZodString;
|
|
4953
|
+
heading: z.ZodString;
|
|
4954
|
+
level: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
4955
|
+
body: z.ZodString;
|
|
4956
|
+
order: z.ZodNumber;
|
|
4957
|
+
}, z.core.$strip>>;
|
|
4958
|
+
intro: z.ZodString;
|
|
4959
|
+
contactBlocks: z.ZodArray<z.ZodObject<{
|
|
4960
|
+
id: z.ZodString;
|
|
4961
|
+
heading: z.ZodString;
|
|
4962
|
+
order: z.ZodNumber;
|
|
4963
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
4964
|
+
id: z.ZodString;
|
|
4965
|
+
label: z.ZodString;
|
|
4966
|
+
value: z.ZodString;
|
|
4967
|
+
order: z.ZodNumber;
|
|
4968
|
+
}, z.core.$strip>>;
|
|
4969
|
+
}, z.core.$strip>>;
|
|
4970
|
+
}, z.core.$strip>;
|
|
4971
|
+
baseVersion: z.ZodNumber;
|
|
4972
|
+
savedBy: z.ZodString;
|
|
4973
|
+
savedAt: z.ZodNumber;
|
|
4974
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4975
|
+
documentId: z.ZodLiteral<"takeItDownPageCopy">;
|
|
4976
|
+
content: z.ZodObject<{
|
|
4977
|
+
strings: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
4978
|
+
}, z.core.$strip>;
|
|
4979
|
+
baseVersion: z.ZodNumber;
|
|
4980
|
+
savedBy: z.ZodString;
|
|
4981
|
+
savedAt: z.ZodNumber;
|
|
4982
|
+
}, z.core.$strip>], "documentId">;
|
|
4983
|
+
readonly 'publicDocumentReleases/{releaseId}': z.ZodObject<{
|
|
4984
|
+
releaseId: z.ZodString;
|
|
4985
|
+
documents: z.ZodArray<z.ZodObject<{
|
|
4986
|
+
documentId: z.ZodEnum<{
|
|
4987
|
+
futurePlans: "futurePlans";
|
|
4988
|
+
rulesAndAgreements: "rulesAndAgreements";
|
|
4989
|
+
termsOfService: "termsOfService";
|
|
4990
|
+
privacyPolicy: "privacyPolicy";
|
|
4991
|
+
takeItDownPageCopy: "takeItDownPageCopy";
|
|
4992
|
+
dmcaPolicy: "dmcaPolicy";
|
|
4993
|
+
}>;
|
|
4994
|
+
version: z.ZodNumber;
|
|
4995
|
+
}, z.core.$strict>>;
|
|
4996
|
+
requireAcceptance: z.ZodBoolean;
|
|
4997
|
+
requiredAcceptanceLevel: z.ZodNumber;
|
|
4998
|
+
publishedBy: z.ZodString;
|
|
4999
|
+
publishedAt: z.ZodNumber;
|
|
5000
|
+
}, z.core.$strip>;
|
|
4724
5001
|
readonly 'childSafetyCaseList/{caseId}': z.ZodObject<{
|
|
4725
5002
|
schemaVersion: z.ZodLiteral<1>;
|
|
4726
5003
|
caseId: z.ZodString;
|
|
@@ -4947,8 +5224,8 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
4947
5224
|
}, z.core.$strict>;
|
|
4948
5225
|
readonly 'childSafetyCases/{caseId}/childSafetyCaseAccounts/{uid}': z.ZodObject<{
|
|
4949
5226
|
role: z.ZodEnum<{
|
|
4950
|
-
uploader: "uploader";
|
|
4951
5227
|
requester: "requester";
|
|
5228
|
+
uploader: "uploader";
|
|
4952
5229
|
distributor: "distributor";
|
|
4953
5230
|
questionable: "questionable";
|
|
4954
5231
|
}>;
|
|
@@ -4970,8 +5247,8 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
4970
5247
|
}, z.core.$strict>;
|
|
4971
5248
|
readonly 'childSafetyCases/{caseId}/childSafetyCaseAccounts/{uid}/childSafetyCaseAccountHistory/{historyId}': z.ZodObject<{
|
|
4972
5249
|
role: z.ZodEnum<{
|
|
4973
|
-
uploader: "uploader";
|
|
4974
5250
|
requester: "requester";
|
|
5251
|
+
uploader: "uploader";
|
|
4975
5252
|
distributor: "distributor";
|
|
4976
5253
|
questionable: "questionable";
|
|
4977
5254
|
}>;
|
|
@@ -6724,6 +7001,20 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
6724
7001
|
registrationEnabled: z.ZodBoolean;
|
|
6725
7002
|
announcementMessage: z.ZodOptional<z.ZodString>;
|
|
6726
7003
|
rateLimitMultiplier: z.ZodOptional<z.ZodNumber>;
|
|
7004
|
+
publicDocumentVersions: z.ZodOptional<z.ZodObject<{
|
|
7005
|
+
documents: z.ZodRecord<z.ZodEnum<{
|
|
7006
|
+
futurePlans: "futurePlans";
|
|
7007
|
+
rulesAndAgreements: "rulesAndAgreements";
|
|
7008
|
+
termsOfService: "termsOfService";
|
|
7009
|
+
privacyPolicy: "privacyPolicy";
|
|
7010
|
+
takeItDownPageCopy: "takeItDownPageCopy";
|
|
7011
|
+
dmcaPolicy: "dmcaPolicy";
|
|
7012
|
+
}> & z.core.$partial, z.ZodObject<{
|
|
7013
|
+
currentVersion: z.ZodNumber;
|
|
7014
|
+
requiredVersion: z.ZodNumber;
|
|
7015
|
+
}, z.core.$strict>>;
|
|
7016
|
+
requiredAcceptanceLevel: z.ZodNumber;
|
|
7017
|
+
}, z.core.$strict>>;
|
|
6727
7018
|
}, z.core.$strip>;
|
|
6728
7019
|
readonly '_appConfig/futurePlans': z.ZodObject<{
|
|
6729
7020
|
lastUpdated: z.ZodNumber;
|
|
@@ -6780,6 +7071,7 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
6780
7071
|
}, z.core.$strip>>;
|
|
6781
7072
|
}, z.core.$strip>;
|
|
6782
7073
|
version: z.ZodOptional<z.ZodNumber>;
|
|
7074
|
+
lastUpdated: z.ZodOptional<z.ZodNumber>;
|
|
6783
7075
|
}, z.core.$strip>;
|
|
6784
7076
|
readonly '_appConfig/termsOfService': z.ZodObject<{
|
|
6785
7077
|
version: z.ZodNumber;
|
|
@@ -6808,6 +7100,29 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
6808
7100
|
lastUpdated: z.ZodNumber;
|
|
6809
7101
|
strings: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
6810
7102
|
}, z.core.$strip>;
|
|
7103
|
+
readonly '_appConfig/dmcaPolicy': z.ZodObject<{
|
|
7104
|
+
version: z.ZodNumber;
|
|
7105
|
+
lastUpdated: z.ZodNumber;
|
|
7106
|
+
intro: z.ZodString;
|
|
7107
|
+
contactBlocks: z.ZodArray<z.ZodObject<{
|
|
7108
|
+
id: z.ZodString;
|
|
7109
|
+
heading: z.ZodString;
|
|
7110
|
+
order: z.ZodNumber;
|
|
7111
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
7112
|
+
id: z.ZodString;
|
|
7113
|
+
label: z.ZodString;
|
|
7114
|
+
value: z.ZodString;
|
|
7115
|
+
order: z.ZodNumber;
|
|
7116
|
+
}, z.core.$strip>>;
|
|
7117
|
+
}, z.core.$strip>>;
|
|
7118
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
7119
|
+
id: z.ZodString;
|
|
7120
|
+
heading: z.ZodString;
|
|
7121
|
+
level: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
7122
|
+
body: z.ZodString;
|
|
7123
|
+
order: z.ZodNumber;
|
|
7124
|
+
}, z.core.$strip>>;
|
|
7125
|
+
}, z.core.$strip>;
|
|
6811
7126
|
readonly '_serverData/agePolicy': z.ZodObject<{
|
|
6812
7127
|
agePolicyVersion: z.ZodString;
|
|
6813
7128
|
registrationGracePeriodMinutes: z.ZodNumber;
|