@ttt-productions/ttt-core 0.79.90 → 0.79.92
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-claims.d.ts +14 -0
- package/dist/constants/admin-claims.d.ts.map +1 -0
- package/dist/constants/admin-claims.js +14 -0
- package/dist/constants/admin-claims.js.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/doc-schemas/commissions.d.ts +6 -0
- package/dist/doc-schemas/commissions.d.ts.map +1 -1
- package/dist/doc-schemas/commissions.js +5 -3
- package/dist/doc-schemas/commissions.js.map +1 -1
- package/dist/doc-schemas/media-assets.d.ts +101 -6
- package/dist/doc-schemas/media-assets.d.ts.map +1 -1
- package/dist/doc-schemas/media-assets.js +29 -19
- package/dist/doc-schemas/media-assets.js.map +1 -1
- package/dist/doc-schemas/notification-ledger.d.ts +99 -5
- package/dist/doc-schemas/notification-ledger.d.ts.map +1 -1
- package/dist/doc-schemas/notification-ledger.js +94 -16
- package/dist/doc-schemas/notification-ledger.js.map +1 -1
- package/dist/doc-schemas/registry.d.ts +38 -14
- package/dist/doc-schemas/registry.d.ts.map +1 -1
- package/dist/doc-schemas/registry.js +30 -39
- package/dist/doc-schemas/registry.js.map +1 -1
- package/dist/media/index.d.ts +1 -0
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +1 -0
- package/dist/media/index.js.map +1 -1
- package/dist/media/publication/index.d.ts +2 -0
- package/dist/media/publication/index.d.ts.map +1 -0
- package/dist/media/publication/index.js +2 -0
- package/dist/media/publication/index.js.map +1 -0
- package/dist/media/publication/publication-args.d.ts +541 -0
- package/dist/media/publication/publication-args.d.ts.map +1 -0
- package/dist/media/publication/publication-args.js +184 -0
- package/dist/media/publication/publication-args.js.map +1 -0
- package/dist/media/target-info.d.ts.map +1 -1
- package/dist/media/target-info.js +4 -5
- package/dist/media/target-info.js.map +1 -1
- package/dist/paths/collection-groups.d.ts +1 -0
- package/dist/paths/collection-groups.d.ts.map +1 -1
- package/dist/paths/collection-groups.js +1 -0
- package/dist/paths/collection-groups.js.map +1 -1
- package/dist/paths/collections.d.ts +0 -3
- package/dist/paths/collections.d.ts.map +1 -1
- package/dist/paths/collections.js +2 -10
- package/dist/paths/collections.js.map +1 -1
- package/dist/paths/path-builders.d.ts +0 -2
- package/dist/paths/path-builders.d.ts.map +1 -1
- package/dist/paths/path-builders.js +2 -7
- package/dist/paths/path-builders.js.map +1 -1
- package/dist/schemas/admin.d.ts +8 -2
- package/dist/schemas/admin.d.ts.map +1 -1
- package/dist/schemas/admin.js +10 -8
- package/dist/schemas/admin.js.map +1 -1
- package/dist/schemas/hall-library.d.ts +10 -3
- package/dist/schemas/hall-library.d.ts.map +1 -1
- package/dist/schemas/hall-library.js +30 -24
- package/dist/schemas/hall-library.js.map +1 -1
- package/dist/schemas/notification.d.ts +1 -1
- package/dist/schemas/users.d.ts +5 -0
- package/dist/schemas/users.d.ts.map +1 -1
- package/dist/schemas/users.js +15 -11
- package/dist/schemas/users.js.map +1 -1
- package/dist/upload-variables/create-admin-audition-variables.d.ts.map +1 -1
- package/dist/upload-variables/create-admin-audition-variables.js +2 -1
- package/dist/upload-variables/create-admin-audition-variables.js.map +1 -1
- package/dist/upload-variables/create-work-project-audition-variables.d.ts.map +1 -1
- package/dist/upload-variables/create-work-project-audition-variables.js +2 -1
- package/dist/upload-variables/create-work-project-audition-variables.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The custom claims an admin account carries (value `true`). The claim is a fast check only: every
|
|
3
|
+
* server-side admin decision — a Cloud Function and the Firestore and Storage rules alike — also
|
|
4
|
+
* requires the account on the live admin roster (`_systemData/adminList`), so a removed admin loses
|
|
5
|
+
* access at once.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ADMIN_CLAIM = "isAdmin";
|
|
8
|
+
/**
|
|
9
|
+
* The custom claim a junior admin account carries (value `true`), synced from the live admin
|
|
10
|
+
* roster's junior admin list. No rules file reads it, and the backend grants it nothing while junior
|
|
11
|
+
* admin is switched off there.
|
|
12
|
+
*/
|
|
13
|
+
export declare const JR_ADMIN_CLAIM = "isJrAdmin";
|
|
14
|
+
//# sourceMappingURL=admin-claims.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-claims.d.ts","sourceRoot":"","sources":["../../src/constants/admin-claims.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,YAAY,CAAC;AAErC;;;;GAIG;AACH,eAAO,MAAM,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The custom claims an admin account carries (value `true`). The claim is a fast check only: every
|
|
3
|
+
* server-side admin decision — a Cloud Function and the Firestore and Storage rules alike — also
|
|
4
|
+
* requires the account on the live admin roster (`_systemData/adminList`), so a removed admin loses
|
|
5
|
+
* access at once.
|
|
6
|
+
*/
|
|
7
|
+
export const ADMIN_CLAIM = 'isAdmin';
|
|
8
|
+
/**
|
|
9
|
+
* The custom claim a junior admin account carries (value `true`), synced from the live admin
|
|
10
|
+
* roster's junior admin list. No rules file reads it, and the backend grants it nothing while junior
|
|
11
|
+
* admin is switched off there.
|
|
12
|
+
*/
|
|
13
|
+
export const JR_ADMIN_CLAIM = 'isJrAdmin';
|
|
14
|
+
//# sourceMappingURL=admin-claims.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-claims.js","sourceRoot":"","sources":["../../src/constants/admin-claims.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC;AAErC;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC","sourcesContent":["/**\n * The custom claims an admin account carries (value `true`). The claim is a fast check only: every\n * server-side admin decision — a Cloud Function and the Firestore and Storage rules alike — also\n * requires the account on the live admin roster (`_systemData/adminList`), so a removed admin loses\n * access at once.\n */\nexport const ADMIN_CLAIM = 'isAdmin';\n\n/**\n * The custom claim a junior admin account carries (value `true`), synced from the live admin\n * roster's junior admin list. No rules file reads it, and the backend grants it nothing while junior\n * admin is switched off there.\n */\nexport const JR_ADMIN_CLAIM = 'isJrAdmin';\n"]}
|
|
@@ -11,6 +11,7 @@ export * from './craft-skill-statements.js';
|
|
|
11
11
|
export * from './publish-attestations.js';
|
|
12
12
|
export * from './pledge-and-bouquet-copy.js';
|
|
13
13
|
export * from './public-documents.js';
|
|
14
|
+
export * from './admin-claims.js';
|
|
14
15
|
export * from './legal-review-notice-state.js';
|
|
15
16
|
export * from './legal-review-notice.js';
|
|
16
17
|
export * from './safety-confirmation-phrases.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC"}
|
package/dist/constants/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export * from './craft-skill-statements.js';
|
|
|
11
11
|
export * from './publish-attestations.js';
|
|
12
12
|
export * from './pledge-and-bouquet-copy.js';
|
|
13
13
|
export * from './public-documents.js';
|
|
14
|
+
export * from './admin-claims.js';
|
|
14
15
|
export * from './legal-review-notice-state.js';
|
|
15
16
|
export * from './legal-review-notice.js';
|
|
16
17
|
export * from './safety-confirmation-phrases.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC","sourcesContent":["export * from './analytics.js';\nexport * from './app-mode.js';\nexport * from './business.js';\nexport * from './text-fields.js';\nexport * from './chat.js';\nexport * from './conversation-files.js';\nexport * from './moderation.js';\nexport * from './options.js';\nexport * from './admin-labels.js';\nexport * from './craft-skill-statements.js';\nexport * from './publish-attestations.js';\nexport * from './pledge-and-bouquet-copy.js';\nexport * from './public-documents.js';\nexport * from './legal-review-notice-state.js';\nexport * from './legal-review-notice.js';\nexport * from './safety-confirmation-phrases.js';\nexport * from './safety-telemetry-patterns.js';\nexport * from './safety-active-statuses.js';\nexport * from './telemetry-content-policy.js';\nexport * from './pagination.js';\nexport * from './release-flags.js';\nexport * from './retention.js';\nexport * from './scheduled-jobs.js';\nexport * from './media-download.js';\nexport * from './media-processing.js';\nexport * from './storage-keys.js';\nexport * from './company-mascots.js';\nexport * from './center-stage-rooms.js';\nexport * from './audition-deadlines.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC","sourcesContent":["export * from './analytics.js';\nexport * from './app-mode.js';\nexport * from './business.js';\nexport * from './text-fields.js';\nexport * from './chat.js';\nexport * from './conversation-files.js';\nexport * from './moderation.js';\nexport * from './options.js';\nexport * from './admin-labels.js';\nexport * from './craft-skill-statements.js';\nexport * from './publish-attestations.js';\nexport * from './pledge-and-bouquet-copy.js';\nexport * from './public-documents.js';\nexport * from './admin-claims.js';\nexport * from './legal-review-notice-state.js';\nexport * from './legal-review-notice.js';\nexport * from './safety-confirmation-phrases.js';\nexport * from './safety-telemetry-patterns.js';\nexport * from './safety-active-statuses.js';\nexport * from './telemetry-content-policy.js';\nexport * from './pagination.js';\nexport * from './release-flags.js';\nexport * from './retention.js';\nexport * from './scheduled-jobs.js';\nexport * from './media-download.js';\nexport * from './media-processing.js';\nexport * from './storage-keys.js';\nexport * from './company-mascots.js';\nexport * from './center-stage-rooms.js';\nexport * from './audition-deadlines.js';\n"]}
|
|
@@ -126,6 +126,12 @@ export declare const AuditionTypeSchema: z.ZodEnum<{
|
|
|
126
126
|
workAudition: "workAudition";
|
|
127
127
|
}>;
|
|
128
128
|
export type AuditionType = z.infer<typeof AuditionTypeSchema>;
|
|
129
|
+
/** How an audition takes entries: anyone may reply (`open`), or the creating Work posts the options (`curated`). */
|
|
130
|
+
export declare const AuditionModeSchema: z.ZodEnum<{
|
|
131
|
+
open: "open";
|
|
132
|
+
curated: "curated";
|
|
133
|
+
}>;
|
|
134
|
+
export type AuditionMode = z.infer<typeof AuditionModeSchema>;
|
|
129
135
|
export declare const AuditionSchema: z.ZodObject<{
|
|
130
136
|
auditionId: z.ZodString;
|
|
131
137
|
type: z.ZodEnum<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commissions.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/commissions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,0BAA0B;;;;;;;;;;iBAUrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,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AEhE,eAAO,MAAM,sBAAsB;;;;;;iBAIjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -84,13 +84,15 @@ export const CreateCommissionProposalTextResultSchema = z.object({
|
|
|
84
84
|
proposal: CommissionProposalSchema,
|
|
85
85
|
});
|
|
86
86
|
export const AuditionTypeSchema = z.enum(['platformAudition', 'sponsoredAudition', 'workAudition']);
|
|
87
|
+
/** How an audition takes entries: anyone may reply (`open`), or the creating Work posts the options (`curated`). */
|
|
88
|
+
export const AuditionModeSchema = z.enum(['open', 'curated']);
|
|
87
89
|
export const AuditionSchema = z.object({
|
|
88
90
|
auditionId: z.string(),
|
|
89
91
|
type: AuditionTypeSchema,
|
|
90
92
|
title: z.string(),
|
|
91
93
|
description: z.string(),
|
|
92
94
|
videoAssetId: z.string(),
|
|
93
|
-
// Auditions are VIDEO ONLY
|
|
95
|
+
// Auditions are VIDEO ONLY. Paired with the required videoAssetId (both
|
|
94
96
|
// always present — the MEDIA-101 shape, not a required-asset/optional-kind mismatch),
|
|
95
97
|
// derived from the ONE canonical stored-kind union narrowed to video — never an inline
|
|
96
98
|
// re-declared union (ARCH-102).
|
|
@@ -105,7 +107,7 @@ export const AuditionSchema = z.object({
|
|
|
105
107
|
// Curated vs open. 'open' (default when absent — existing auditions): anyone may post reply
|
|
106
108
|
// entries AND vote. 'curated': the creating work posts the option entries itself (min 2, max 8,
|
|
107
109
|
// each `isCreatorOption: true`) and users may ONLY vote — community reply entries are rejected.
|
|
108
|
-
mode:
|
|
110
|
+
mode: AuditionModeSchema.optional(),
|
|
109
111
|
// Curated atomic-reveal state (only meaningful when mode === 'curated'). The prompt + all N option
|
|
110
112
|
// videos upload as ONE fixed batch; the audition stays non-votable + off the public board until the
|
|
111
113
|
// WHOLE batch is live and every video passed moderation:
|
|
@@ -145,7 +147,7 @@ export const AuditionEntrySchema = z.object({
|
|
|
145
147
|
auditionId: z.string(),
|
|
146
148
|
workProjectId: z.string().optional(),
|
|
147
149
|
videoAssetId: z.string(),
|
|
148
|
-
// Audition entries are VIDEO ONLY
|
|
150
|
+
// Audition entries are VIDEO ONLY — same video-only pairing as the audition
|
|
149
151
|
// prompt above; derived from the canonical stored-kind union narrowed to video.
|
|
150
152
|
mediaType: ContentMediaKindSchema.extract(['video']),
|
|
151
153
|
createdBy: userRefSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commissions.js","sourceRoot":"","sources":["../../src/doc-schemas/commissions.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,qFAAqF;AACrF,iDAAiD;AAEjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAEpD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,+EAA+E;IAC/E,yFAAyF;IACzF,wFAAwF;IACxF,8CAA8C;IAC9C,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,2BAA2B,GAAG,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M,EAAE,CAAC,QAAQ,EAAE;IAC9B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,kFAAkF;IAClF,+FAA+F;IAC/F,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACvC,iFAAiF;IACjF,kDAAkD;IAClD,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;IACnB,QAAQ,EAAE,wBAAwB,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,uBAAuB,EAAE,CAAC,CAAC,MAAM,EAAE;IACnC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,2BAA2B,EAAE,aAAa;CAC3C,CAAC,CAAC","sourcesContent":["// Commission + Audition Firestore document SCHEMAS — commissionListings/{id} and its\n// commissionProposals, auditionBoard/{id} and its auditionEntries, plus the per-user\n// auditionVotes doc. Types inferred via z.infer.\n\nimport { z } from 'zod';\nimport { CommissionProposalStatusSchema } from '../schemas/commissions.js';\nimport { stakeSharesOfferedSchema } from '../schemas/atoms.js';\nimport { AuditionDeadlineSchema } from '../constants/audition-deadlines.js';\nimport { ContentMediaKindSchema } from './media-assets.js';\nimport { ModerationHiddenBySchema } from './moderation.js';\n\nconst userRefSchema = z.object({ uid: z.string() });\n\nexport const CommissionAttachmentSchema = z.object({\n pendingMediaId: z.string().optional(),\n name: z.string(),\n mediaAssetId: z.string(),\n // The stored content kind (image/video/audio). Set once by the upload pipeline\n // (getSimplifiedMediaType) and written by the commissionListingMedia publication adapter\n // as z.enum(['image','video','audio']); derived here from the ONE canonical stored-kind\n // union (ARCH-102), never a widened `string`.\n type: ContentMediaKindSchema,\n size: z.number(),\n});\nexport type CommissionAttachment = z.infer<typeof CommissionAttachmentSchema>;\n\nexport const FullCommissionListingSchema = z.object({\n commissionListingId: z.string(),\n title: z.string(),\n description: z.string(),\n commissionAttachment: CommissionAttachmentSchema.optional(),\n requiredTradeProfessions: z.array(z.string()),\n stakeSharesOffered: stakeSharesOfferedSchema,\n createdAt: z.number(),\n createdBy: userRefSchema,\n // Work reference only — title/description are NOT snapshotted (Display Identity Invariant:\n // resolve at render from publicWorkProjects by id, fallback label if the work is gone).\n // `type` (Tales/Tunes/Television) is an immutable classification, not display text, and IS\n // consumed by a commission-board type filter/index, so it stays — mirroring the\n // GuildInviteConversation `workProject: { workProjectId, type }` precedent.\n workProjectAssociatedWith: z.object({\n workProjectId: z.string(),\n type: z.string(),\n }),\n status: z.enum(['open', 'closed']),\n closedAt: z.number().optional(), // set by the close write, together with status 'closed'\n savedProposalArtisans: z.array(z.string()),\n shortId: z.string().optional(),\n shortUrl: z.string().optional(),\n // Admin moderation hide (reversible). When true the listing is suppressed from\n // the commission board; restored by clearing it.\n hidden: z.boolean(),\n hiddenBy: ModerationHiddenBySchema.optional(),\n});\nexport type FullCommissionListing = z.infer<typeof FullCommissionListingSchema>;\n\nexport const CommissionProposalSchema = z.object({\n commissionProposalId: z.string(),\n commissionListingId: z.string(),\n workProjectId: z.string(),\n proposalText: z.string(),\n proposalFileAssetId: z.string().optional(),\n // The attached file's stored content kind, inspected by the upload pipeline — the same union\n // the listing attachment's `type` derives from (ARCH-102).\n proposalFileType: ContentMediaKindSchema.optional(),\n createdBy: userRefSchema,\n createdOn: z.number(),\n status: CommissionProposalStatusSchema,\n guildInviteId: z.string().optional(),\n invitedOn: z.number().optional(),\n acceptedOn: z.number().optional(),\n rejectedAt: z.number().optional(),\n // [EUAS-006] Admin moderation hide (reversible) — matches the listing/audition/entry pattern. When\n // true the proposal's TEXT is suppressed from the board (tombstoned for ordinary viewers); restored\n // by clearing it. Optional so existing/seeded proposals don't need backfilling pre-launch.\n hidden: z.boolean().optional(),\n hiddenBy: ModerationHiddenBySchema.optional(),\n});\nexport type CommissionProposal = z.infer<typeof CommissionProposalSchema>;\n\n// Authoritative result of the createCommissionProposalText callable — the created item,\n// exactly as the transaction committed it; the client seeds its proposal caches from this\n// instead of refetching. Declared HERE (not schemas/commissions.ts) because it composes\n// CommissionProposalSchema and this module already imports schemas/commissions.js\n// (CommissionProposalStatusSchema) — the reverse runtime import would be a module cycle.\n// Re-exported on the ./schemas subpath via schemas/index.ts. Non-strict (server → client\n// result posture).\nexport const CreateCommissionProposalTextResultSchema = z.object({\n success: z.literal(true),\n commissionListingId: z.string().min(1),\n commissionProposalId: z.string().min(1),\n /** The proposal doc exactly as committed. */\n proposal: CommissionProposalSchema,\n});\nexport type CreateCommissionProposalTextResult = z.infer<typeof CreateCommissionProposalTextResultSchema>;\n\nexport const AuditionTypeSchema = z.enum(['platformAudition', 'sponsoredAudition', 'workAudition']);\nexport type AuditionType = z.infer<typeof AuditionTypeSchema>;\n\nexport const AuditionSchema = z.object({\n auditionId: z.string(),\n type: AuditionTypeSchema,\n title: z.string(),\n description: z.string(),\n videoAssetId: z.string(),\n // Auditions are VIDEO ONLY (DJ ruling). Paired with the required videoAssetId (both\n // always present — the MEDIA-101 shape, not a required-asset/optional-kind mismatch),\n // derived from the ONE canonical stored-kind union narrowed to video — never an inline\n // re-declared union (ARCH-102).\n mediaType: ContentMediaKindSchema.extract(['video']),\n // The poster's two deadlines (epoch ms) — see constants/audition-deadlines.ts: entries are\n // in time when SUBMITTED before `entriesCloseAt`; votes are in time before `auditionCloseAt`.\n entriesCloseAt: AuditionDeadlineSchema,\n auditionCloseAt: AuditionDeadlineSchema,\n createdOn: z.number(),\n createdBy: userRefSchema,\n workProjectId: z.string().optional(),\n // Curated vs open. 'open' (default when absent — existing auditions): anyone may post reply\n // entries AND vote. 'curated': the creating work posts the option entries itself (min 2, max 8,\n // each `isCreatorOption: true`) and users may ONLY vote — community reply entries are rejected.\n mode: z.enum(['open', 'curated']).optional(),\n // Curated atomic-reveal state (only meaningful when mode === 'curated'). The prompt + all N option\n // videos upload as ONE fixed batch; the audition stays non-votable + off the public board until the\n // WHOLE batch is live and every video passed moderation:\n // 'assembling' — batch still processing/moderating; not votable, not on the board (status stays\n // 'pendingReview'), only the creator sees a \"preparing…\" state.\n // 'ready' — all N+1 landed and approved; the reveal flips status → 'open', or straight to\n // 'closed' when the audition's close has already passed. A curated audition\n // closed after its reveal keeps 'ready' (only its status changes).\n // 'failed' — any video in the batch was rejected by moderation, or the batch was still\n // assembling a day after creation; the whole audition fails. status stays\n // non-open; only the creator sees it (on the project page) to Edit & resubmit or\n // Discard.\n // 'closed' — the audition was closed (by its creator or an admin) while still\n // 'assembling', BEFORE any reveal; terminal, so an option video that finishes\n // afterwards lands silently and never reveals it.\n curatedAssemblyStatus: z.enum(['assembling', 'ready', 'failed', 'closed']).optional(),\n // The fixed number of creator option videos submitted at create-time (2..8). Used to know when the\n // whole batch has landed (all expected entries approved → reveal).\n expectedOptionCount: z.number().int().optional(),\n // Set when curatedAssemblyStatus === 'failed': which video was rejected, for the creator-only\n // failed-audition surface on the project page.\n curatedFailureReason: z.string().optional(),\n sponsoredAuditionAmountUSD: z.number().optional(),\n stakeSharesOffered: stakeSharesOfferedSchema.optional(),\n status: z.enum(['open', 'closed', 'pendingReview']),\n closedAt: z.number().optional(), // set by the close write, together with status 'closed'\n auditionEntryCount: z.number().optional(),\n shortId: z.string().optional(),\n shortUrl: z.string().optional(),\n // Admin moderation hide (reversible). When true the audition is suppressed from\n // the audition board; restored by clearing it.\n hidden: z.boolean(),\n hiddenBy: ModerationHiddenBySchema.optional(),\n});\nexport type Audition = z.infer<typeof AuditionSchema>;\n\nexport const AuditionEntrySchema = z.object({\n auditionEntryId: z.string(),\n auditionId: z.string(),\n workProjectId: z.string().optional(),\n videoAssetId: z.string(),\n // Audition entries are VIDEO ONLY (DJ ruling) — same video-only pairing as the audition\n // prompt above; derived from the canonical stored-kind union narrowed to video.\n mediaType: ContentMediaKindSchema.extract(['video']),\n createdBy: userRefSchema,\n createdAt: z.number(),\n votes: z.number(),\n shortId: z.string().optional(),\n shortUrl: z.string().optional(),\n // Curated-mode option: true when this entry is a work-authored voting option on a\n // `mode: 'curated'` audition (posted by the creating work at creation), not a community reply.\n isCreatorOption: z.boolean().optional(),\n // Admin moderation hide (reversible). When true the entry is suppressed from the\n // audition's entry list; restored by clearing it.\n hidden: z.boolean(),\n hiddenBy: ModerationHiddenBySchema.optional(),\n});\nexport type AuditionEntry = z.infer<typeof AuditionEntrySchema>;\n\nexport const UserAuditionVoteSchema = z.object({\n votedForAuditionEntryId: z.string(),\n votedOn: z.number(),\n auditionEntryArtisanCreator: userRefSchema,\n});\nexport type UserAuditionVote = z.infer<typeof UserAuditionVoteSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"commissions.js","sourceRoot":"","sources":["../../src/doc-schemas/commissions.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,qFAAqF;AACrF,iDAAiD;AAEjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAEpD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,+EAA+E;IAC/E,yFAAyF;IACzF,wFAAwF;IACxF,8CAA8C;IAC9C,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EA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AAC,CAAC;IACpD,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,kFAAkF;IAClF,+FAA+F;IAC/F,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACvC,iFAAiF;IACjF,kDAAkD;IAClD,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;IACnB,QAAQ,EAAE,wBAAwB,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,uBAAuB,EAAE,CAAC,CAAC,MAAM,EAAE;IACnC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,2BAA2B,EAAE,aAAa;CAC3C,CAAC,CAAC","sourcesContent":["// Commission + Audition Firestore document SCHEMAS — commissionListings/{id} and its\n// commissionProposals, auditionBoard/{id} and its auditionEntries, plus the per-user\n// auditionVotes doc. Types inferred via z.infer.\n\nimport { z } from 'zod';\nimport { CommissionProposalStatusSchema } from '../schemas/commissions.js';\nimport { stakeSharesOfferedSchema } from '../schemas/atoms.js';\nimport { AuditionDeadlineSchema } from '../constants/audition-deadlines.js';\nimport { ContentMediaKindSchema } from './media-assets.js';\nimport { ModerationHiddenBySchema } from './moderation.js';\n\nconst userRefSchema = z.object({ uid: z.string() });\n\nexport const CommissionAttachmentSchema = z.object({\n pendingMediaId: z.string().optional(),\n name: z.string(),\n mediaAssetId: z.string(),\n // The stored content kind (image/video/audio). Set once by the upload pipeline\n // (getSimplifiedMediaType) and written by the commissionListingMedia publication adapter\n // as z.enum(['image','video','audio']); derived here from the ONE canonical stored-kind\n // union (ARCH-102), never a widened `string`.\n type: ContentMediaKindSchema,\n size: z.number(),\n});\nexport type CommissionAttachment = z.infer<typeof CommissionAttachmentSchema>;\n\nexport const FullCommissionListingSchema = z.object({\n commissionListingId: z.string(),\n title: z.string(),\n description: z.string(),\n commissionAttachment: CommissionAttachmentSchema.optional(),\n requiredTradeProfessions: z.array(z.string()),\n stakeSharesOffered: stakeSharesOfferedSchema,\n createdAt: z.number(),\n createdBy: userRefSchema,\n // Work reference only — title/description are NOT snapshotted (Display Identity Invariant:\n // resolve at render from publicWorkProjects by id, fallback label if the work is gone).\n // `type` (Tales/Tunes/Television) is an immutable classification, not display text, and IS\n // consumed by a commission-board type filter/index, so it stays — mirroring the\n // GuildInviteConversation `workProject: { workProjectId, type }` precedent.\n workProjectAssociatedWith: z.object({\n workProjectId: z.string(),\n type: z.string(),\n }),\n status: z.enum(['open', 'closed']),\n closedAt: z.number().optional(), // set by the close write, together with status 'closed'\n savedProposalArtisans: z.array(z.string()),\n shortId: z.string().optional(),\n shortUrl: z.string().optional(),\n // Admin moderation hide (reversible). When true the listing is suppressed from\n // the commission board; restored by clearing it.\n hidden: z.boolean(),\n hiddenBy: ModerationHiddenBySchema.optional(),\n});\nexport type FullCommissionListing = z.infer<typeof FullCommissionListingSchema>;\n\nexport const CommissionProposalSchema = z.object({\n commissionProposalId: z.string(),\n commissionListingId: z.string(),\n workProjectId: z.string(),\n proposalText: z.string(),\n proposalFileAssetId: z.string().optional(),\n // The attached file's stored content kind, inspected by the upload pipeline — the same union\n // the listing attachment's `type` derives from (ARCH-102).\n proposalFileType: ContentMediaKindSchema.optional(),\n createdBy: userRefSchema,\n createdOn: z.number(),\n status: CommissionProposalStatusSchema,\n guildInviteId: z.string().optional(),\n invitedOn: z.number().optional(),\n acceptedOn: z.number().optional(),\n rejectedAt: z.number().optional(),\n // [EUAS-006] Admin moderation hide (reversible) — matches the listing/audition/entry pattern. When\n // true the proposal's TEXT is suppressed from the board (tombstoned for ordinary viewers); restored\n // by clearing it. Optional so existing/seeded proposals don't need backfilling pre-launch.\n hidden: z.boolean().optional(),\n hiddenBy: ModerationHiddenBySchema.optional(),\n});\nexport type CommissionProposal = z.infer<typeof CommissionProposalSchema>;\n\n// Authoritative result of the createCommissionProposalText callable — the created item,\n// exactly as the transaction committed it; the client seeds its proposal caches from this\n// instead of refetching. Declared HERE (not schemas/commissions.ts) because it composes\n// CommissionProposalSchema and this module already imports schemas/commissions.js\n// (CommissionProposalStatusSchema) — the reverse runtime import would be a module cycle.\n// Re-exported on the ./schemas subpath via schemas/index.ts. Non-strict (server → client\n// result posture).\nexport const CreateCommissionProposalTextResultSchema = z.object({\n success: z.literal(true),\n commissionListingId: z.string().min(1),\n commissionProposalId: z.string().min(1),\n /** The proposal doc exactly as committed. */\n proposal: CommissionProposalSchema,\n});\nexport type CreateCommissionProposalTextResult = z.infer<typeof CreateCommissionProposalTextResultSchema>;\n\nexport const AuditionTypeSchema = z.enum(['platformAudition', 'sponsoredAudition', 'workAudition']);\nexport type AuditionType = z.infer<typeof AuditionTypeSchema>;\n\n/** How an audition takes entries: anyone may reply (`open`), or the creating Work posts the options (`curated`). */\nexport const AuditionModeSchema = z.enum(['open', 'curated']);\nexport type AuditionMode = z.infer<typeof AuditionModeSchema>;\n\nexport const AuditionSchema = z.object({\n auditionId: z.string(),\n type: AuditionTypeSchema,\n title: z.string(),\n description: z.string(),\n videoAssetId: z.string(),\n // Auditions are VIDEO ONLY. Paired with the required videoAssetId (both\n // always present — the MEDIA-101 shape, not a required-asset/optional-kind mismatch),\n // derived from the ONE canonical stored-kind union narrowed to video — never an inline\n // re-declared union (ARCH-102).\n mediaType: ContentMediaKindSchema.extract(['video']),\n // The poster's two deadlines (epoch ms) — see constants/audition-deadlines.ts: entries are\n // in time when SUBMITTED before `entriesCloseAt`; votes are in time before `auditionCloseAt`.\n entriesCloseAt: AuditionDeadlineSchema,\n auditionCloseAt: AuditionDeadlineSchema,\n createdOn: z.number(),\n createdBy: userRefSchema,\n workProjectId: z.string().optional(),\n // Curated vs open. 'open' (default when absent — existing auditions): anyone may post reply\n // entries AND vote. 'curated': the creating work posts the option entries itself (min 2, max 8,\n // each `isCreatorOption: true`) and users may ONLY vote — community reply entries are rejected.\n mode: AuditionModeSchema.optional(),\n // Curated atomic-reveal state (only meaningful when mode === 'curated'). The prompt + all N option\n // videos upload as ONE fixed batch; the audition stays non-votable + off the public board until the\n // WHOLE batch is live and every video passed moderation:\n // 'assembling' — batch still processing/moderating; not votable, not on the board (status stays\n // 'pendingReview'), only the creator sees a \"preparing…\" state.\n // 'ready' — all N+1 landed and approved; the reveal flips status → 'open', or straight to\n // 'closed' when the audition's close has already passed. A curated audition\n // closed after its reveal keeps 'ready' (only its status changes).\n // 'failed' — any video in the batch was rejected by moderation, or the batch was still\n // assembling a day after creation; the whole audition fails. status stays\n // non-open; only the creator sees it (on the project page) to Edit & resubmit or\n // Discard.\n // 'closed' — the audition was closed (by its creator or an admin) while still\n // 'assembling', BEFORE any reveal; terminal, so an option video that finishes\n // afterwards lands silently and never reveals it.\n curatedAssemblyStatus: z.enum(['assembling', 'ready', 'failed', 'closed']).optional(),\n // The fixed number of creator option videos submitted at create-time (2..8). Used to know when the\n // whole batch has landed (all expected entries approved → reveal).\n expectedOptionCount: z.number().int().optional(),\n // Set when curatedAssemblyStatus === 'failed': which video was rejected, for the creator-only\n // failed-audition surface on the project page.\n curatedFailureReason: z.string().optional(),\n sponsoredAuditionAmountUSD: z.number().optional(),\n stakeSharesOffered: stakeSharesOfferedSchema.optional(),\n status: z.enum(['open', 'closed', 'pendingReview']),\n closedAt: z.number().optional(), // set by the close write, together with status 'closed'\n auditionEntryCount: z.number().optional(),\n shortId: z.string().optional(),\n shortUrl: z.string().optional(),\n // Admin moderation hide (reversible). When true the audition is suppressed from\n // the audition board; restored by clearing it.\n hidden: z.boolean(),\n hiddenBy: ModerationHiddenBySchema.optional(),\n});\nexport type Audition = z.infer<typeof AuditionSchema>;\n\nexport const AuditionEntrySchema = z.object({\n auditionEntryId: z.string(),\n auditionId: z.string(),\n workProjectId: z.string().optional(),\n videoAssetId: z.string(),\n // Audition entries are VIDEO ONLY — same video-only pairing as the audition\n // prompt above; derived from the canonical stored-kind union narrowed to video.\n mediaType: ContentMediaKindSchema.extract(['video']),\n createdBy: userRefSchema,\n createdAt: z.number(),\n votes: z.number(),\n shortId: z.string().optional(),\n shortUrl: z.string().optional(),\n // Curated-mode option: true when this entry is a work-authored voting option on a\n // `mode: 'curated'` audition (posted by the creating work at creation), not a community reply.\n isCreatorOption: z.boolean().optional(),\n // Admin moderation hide (reversible). When true the entry is suppressed from the\n // audition's entry list; restored by clearing it.\n hidden: z.boolean(),\n hiddenBy: ModerationHiddenBySchema.optional(),\n});\nexport type AuditionEntry = z.infer<typeof AuditionEntrySchema>;\n\nexport const UserAuditionVoteSchema = z.object({\n votedForAuditionEntryId: z.string(),\n votedOn: z.number(),\n auditionEntryArtisanCreator: userRefSchema,\n});\nexport type UserAuditionVote = z.infer<typeof UserAuditionVoteSchema>;\n"]}
|
|
@@ -63,12 +63,10 @@ export declare const MediaVariantKeySchema: z.ZodEnum<{
|
|
|
63
63
|
main: "main";
|
|
64
64
|
}>;
|
|
65
65
|
export type MediaVariantKey = z.infer<typeof MediaVariantKeySchema>;
|
|
66
|
-
/** Why this asset was created from its source
|
|
66
|
+
/** Why this asset was created from its source.
|
|
67
67
|
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* Conversation File is an ORIGINAL (`original`), never a chat derivative; nothing
|
|
71
|
-
* ever set the retired value. */
|
|
68
|
+
* Chat is text-only and owns no media, so no copy is ever made for a chat message. A
|
|
69
|
+
* Conversation File is an ORIGINAL (`original`), never a derivative. */
|
|
72
70
|
export declare const MediaCopyReasonSchema: z.ZodEnum<{
|
|
73
71
|
original: "original";
|
|
74
72
|
variant: "variant";
|
|
@@ -80,7 +78,7 @@ export declare const MediaCopyReasonSchema: z.ZodEnum<{
|
|
|
80
78
|
}>;
|
|
81
79
|
export type MediaCopyReason = z.infer<typeof MediaCopyReasonSchema>;
|
|
82
80
|
/**
|
|
83
|
-
* Canonical media origin lineage
|
|
81
|
+
* Canonical media origin lineage. A copy INHERITS
|
|
84
82
|
* rootIngestId/rootAssetId/originatingUploaderUid/originatingUploadEventId/
|
|
85
83
|
* originalUploadCreatedAt/rootSha256/originalSha256 unchanged; it sets its own
|
|
86
84
|
* sourceAssetId/variantSha256s/copyReason/copyActorUid/currentOwner*. Client
|
|
@@ -599,6 +597,103 @@ export declare const MediaAssetSchema: z.ZodObject<{
|
|
|
599
597
|
updatedAt: z.ZodNumber;
|
|
600
598
|
}, z.core.$strict>;
|
|
601
599
|
export type MediaAsset = z.infer<typeof MediaAssetSchema>;
|
|
600
|
+
/** What the Hall-media orphan reaper's asset phase reads of a candidate asset. */
|
|
601
|
+
export declare const MediaAssetReapCandidateSchema: z.ZodObject<{
|
|
602
|
+
mediaAssetId: z.ZodString;
|
|
603
|
+
ownerId: z.ZodString;
|
|
604
|
+
createdAt: z.ZodNumber;
|
|
605
|
+
publicationState: z.ZodOptional<z.ZodEnum<{
|
|
606
|
+
unpublished: "unpublished";
|
|
607
|
+
published: "published";
|
|
608
|
+
retired: "retired";
|
|
609
|
+
}>>;
|
|
610
|
+
retirement: z.ZodOptional<z.ZodObject<{
|
|
611
|
+
requestedAt: z.ZodNumber;
|
|
612
|
+
pendingVariantKeys: z.ZodArray<z.ZodString>;
|
|
613
|
+
attemptCount: z.ZodNumber;
|
|
614
|
+
nextAttemptAt: z.ZodNumber;
|
|
615
|
+
lastDeferral: z.ZodOptional<z.ZodEnum<{
|
|
616
|
+
failed: "failed";
|
|
617
|
+
held: "held";
|
|
618
|
+
}>>;
|
|
619
|
+
lastError: z.ZodOptional<z.ZodObject<{
|
|
620
|
+
code: z.ZodString;
|
|
621
|
+
message: z.ZodString;
|
|
622
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
623
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
624
|
+
at: z.ZodOptional<z.ZodNumber>;
|
|
625
|
+
}, z.core.$strict>>;
|
|
626
|
+
}, z.core.$strict>>;
|
|
627
|
+
}, z.core.$strip>;
|
|
628
|
+
export type MediaAssetReapCandidate = z.infer<typeof MediaAssetReapCandidateSchema>;
|
|
629
|
+
/** What a copy's safety-hold check reads of its source asset. */
|
|
630
|
+
export declare const MediaAssetCopySourceHoldFieldsSchema: z.ZodObject<{
|
|
631
|
+
mediaAssetId: z.ZodString;
|
|
632
|
+
originLineage: z.ZodOptional<z.ZodObject<{
|
|
633
|
+
lineageVersion: z.ZodLiteral<1>;
|
|
634
|
+
rootIngestId: z.ZodString;
|
|
635
|
+
rootAssetId: z.ZodString;
|
|
636
|
+
sourceAssetId: z.ZodOptional<z.ZodString>;
|
|
637
|
+
originatingUploaderUid: z.ZodString;
|
|
638
|
+
originatingUploadEventId: z.ZodString;
|
|
639
|
+
originalUploadCreatedAt: z.ZodNumber;
|
|
640
|
+
rootSha256: z.ZodString;
|
|
641
|
+
originalSha256: z.ZodOptional<z.ZodString>;
|
|
642
|
+
variantSha256s: z.ZodRecord<z.ZodEnum<{
|
|
643
|
+
full: "full";
|
|
644
|
+
small: "small";
|
|
645
|
+
poster: "poster";
|
|
646
|
+
medium: "medium";
|
|
647
|
+
main: "main";
|
|
648
|
+
}> & z.core.$partial, z.ZodString>;
|
|
649
|
+
copyReason: z.ZodEnum<{
|
|
650
|
+
original: "original";
|
|
651
|
+
variant: "variant";
|
|
652
|
+
hall_publish: "hall_publish";
|
|
653
|
+
profile_derivative: "profile_derivative";
|
|
654
|
+
moderation_copy: "moderation_copy";
|
|
655
|
+
evidence_copy: "evidence_copy";
|
|
656
|
+
other: "other";
|
|
657
|
+
}>;
|
|
658
|
+
createdFromOwnerType: z.ZodOptional<z.ZodEnum<{
|
|
659
|
+
workProject: "workProject";
|
|
660
|
+
audition: "audition";
|
|
661
|
+
hallItem: "hallItem";
|
|
662
|
+
craftSkill: "craftSkill";
|
|
663
|
+
commissionListing: "commissionListing";
|
|
664
|
+
commissionProposal: "commissionProposal";
|
|
665
|
+
auditionEntry: "auditionEntry";
|
|
666
|
+
conversationFile: "conversationFile";
|
|
667
|
+
userProfile: "userProfile";
|
|
668
|
+
squareStreetzPost: "squareStreetzPost";
|
|
669
|
+
workContent: "workContent";
|
|
670
|
+
realmFile: "realmFile";
|
|
671
|
+
safetyEvidence: "safetyEvidence";
|
|
672
|
+
systemContent: "systemContent";
|
|
673
|
+
}>>;
|
|
674
|
+
createdFromOwnerId: z.ZodOptional<z.ZodString>;
|
|
675
|
+
copyActorUid: z.ZodOptional<z.ZodString>;
|
|
676
|
+
currentOwnerType: z.ZodEnum<{
|
|
677
|
+
workProject: "workProject";
|
|
678
|
+
audition: "audition";
|
|
679
|
+
hallItem: "hallItem";
|
|
680
|
+
craftSkill: "craftSkill";
|
|
681
|
+
commissionListing: "commissionListing";
|
|
682
|
+
commissionProposal: "commissionProposal";
|
|
683
|
+
auditionEntry: "auditionEntry";
|
|
684
|
+
conversationFile: "conversationFile";
|
|
685
|
+
userProfile: "userProfile";
|
|
686
|
+
squareStreetzPost: "squareStreetzPost";
|
|
687
|
+
workContent: "workContent";
|
|
688
|
+
realmFile: "realmFile";
|
|
689
|
+
safetyEvidence: "safetyEvidence";
|
|
690
|
+
systemContent: "systemContent";
|
|
691
|
+
}>;
|
|
692
|
+
currentOwnerId: z.ZodString;
|
|
693
|
+
}, z.core.$strict>>;
|
|
694
|
+
legalHold: z.ZodBoolean;
|
|
695
|
+
}, z.core.$strip>;
|
|
696
|
+
export type MediaAssetCopySourceHoldFields = z.infer<typeof MediaAssetCopySourceHoldFieldsSchema>;
|
|
602
697
|
/**
|
|
603
698
|
* Where an asset stands on retirement — the one reading a caller that must not delete a record
|
|
604
699
|
* naming media before its media is gone (account erasure) decides from: `absent` (no asset doc),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-assets.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/media-assets.ts"],"names":[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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA0J3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAM1D,kFAAkF;AAClF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,iEAAiE;AACjE,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI/C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAElG;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAElF,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,kBAAkB,GAAG,YAAY,CAAC,GAAG,SAAS,GACrE,4BAA4B,CAK9B;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,kBAAkB,GAAG,kBAAkB,CAEhG;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,OAAO,EAAE,kBAAkB,GAAG,kBAAkB,CAEjG"}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// media ONLY by `*AssetId` fields — never URLs. Serving authority is the
|
|
4
4
|
// gateway Worker (cookie/grant + KV blocklist); this doc is the server-side
|
|
5
5
|
// truth the edge records derive from. NO client reads, NO client writes.
|
|
6
|
-
// See ttt-prod docs/design/media-assets-and-protected-serving.md.
|
|
7
6
|
import { z } from 'zod';
|
|
8
7
|
import { StructuredErrorSchema } from '@ttt-productions/edge-protocol-core';
|
|
9
8
|
import { TIMED_MEDIA_MAIN_OUTPUT_KEY, VIDEO_POSTER_OUTPUT_KEY } from '@ttt-productions/media-schemas';
|
|
@@ -28,8 +27,7 @@ export const MediaAssetOwnerTypeSchema = z.enum([
|
|
|
28
27
|
'audition',
|
|
29
28
|
'auditionEntry',
|
|
30
29
|
// A file in a conversation's flat Conversation Files list (guild-invite or
|
|
31
|
-
// admin-support).
|
|
32
|
-
// messages no longer own media.
|
|
30
|
+
// admin-support). Chat messages own no media.
|
|
33
31
|
'conversationFile',
|
|
34
32
|
// Realm shared files are the deliberate MUTATE-IN-PLACE exception: a promoted work file
|
|
35
33
|
// keeps its ONE `workFile`-owned asset doc and flips tier in place, so no asset is ever
|
|
@@ -41,7 +39,7 @@ export const MediaAssetOwnerTypeSchema = z.enum([
|
|
|
41
39
|
// An admin video held by a system video slot; the owner id is the slot id.
|
|
42
40
|
'systemContent',
|
|
43
41
|
]);
|
|
44
|
-
// ===== Media origin lineage
|
|
42
|
+
// ===== Media origin lineage =====
|
|
45
43
|
// One canonical lineage used by media, CSAM, and safety. Embedded on every
|
|
46
44
|
// media asset + every copy.
|
|
47
45
|
/** The ONE canonical stored content media kind (what the pipeline produces and the
|
|
@@ -65,12 +63,10 @@ export const MEDIA_VARIANT_KEYS = [
|
|
|
65
63
|
VIDEO_POSTER_OUTPUT_KEY,
|
|
66
64
|
];
|
|
67
65
|
export const MediaVariantKeySchema = z.enum(MEDIA_VARIANT_KEYS);
|
|
68
|
-
/** Why this asset was created from its source
|
|
66
|
+
/** Why this asset was created from its source.
|
|
69
67
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* Conversation File is an ORIGINAL (`original`), never a chat derivative; nothing
|
|
73
|
-
* ever set the retired value. */
|
|
68
|
+
* Chat is text-only and owns no media, so no copy is ever made for a chat message. A
|
|
69
|
+
* Conversation File is an ORIGINAL (`original`), never a derivative. */
|
|
74
70
|
export const MediaCopyReasonSchema = z.enum([
|
|
75
71
|
'original',
|
|
76
72
|
'variant',
|
|
@@ -81,7 +77,7 @@ export const MediaCopyReasonSchema = z.enum([
|
|
|
81
77
|
'other',
|
|
82
78
|
]);
|
|
83
79
|
/**
|
|
84
|
-
* Canonical media origin lineage
|
|
80
|
+
* Canonical media origin lineage. A copy INHERITS
|
|
85
81
|
* rootIngestId/rootAssetId/originatingUploaderUid/originatingUploadEventId/
|
|
86
82
|
* originalUploadCreatedAt/rootSha256/originalSha256 unchanged; it sets its own
|
|
87
83
|
* sourceAssetId/variantSha256s/copyReason/copyActorUid/currentOwner*. Client
|
|
@@ -96,10 +92,10 @@ export const MediaOriginLineageV1Schema = z.object({
|
|
|
96
92
|
rootAssetId: z.string().min(1), // first asset created from that ingest
|
|
97
93
|
sourceAssetId: z.string().min(1).optional(), // immediate parent copied from (absent on the root)
|
|
98
94
|
originatingUploaderUid: z.string().min(1), // set server-side at first accepted ingest; IMMUTABLE; inherited
|
|
99
|
-
// May be '' for a
|
|
95
|
+
// May be '' for a copy synthesized from a source with no known upload event.
|
|
100
96
|
originatingUploadEventId: z.string(),
|
|
101
97
|
originalUploadCreatedAt: z.number(),
|
|
102
|
-
// '' until content hashing
|
|
98
|
+
// '' until content hashing fills in the real sha256.
|
|
103
99
|
// NOT z.string().min(1): the media pipeline does not compute a content hash at finalize yet,
|
|
104
100
|
// so a freshly-ingested asset legitimately carries an empty rootSha256 until it is hashed.
|
|
105
101
|
rootSha256: z.string(),
|
|
@@ -202,8 +198,6 @@ export const REALM_FILE_ACTIVE_STATUS_VALUES = [
|
|
|
202
198
|
];
|
|
203
199
|
export const RealmFileActiveStatusSchema = z.enum(REALM_FILE_ACTIVE_STATUS_VALUES);
|
|
204
200
|
// ===== Serving authority (Durable Object) + publication gating =====
|
|
205
|
-
// See ttt-prod docs/design/media-assets-and-protected-serving.md (the design owner
|
|
206
|
-
// for the Durable Object serving authority and publication gating).
|
|
207
201
|
/** Whether the canonical serving record has been applied to the DO authority. */
|
|
208
202
|
export const MediaAuthoritySyncStateSchema = z.enum(['pending', 'applied', 'deadLetter']);
|
|
209
203
|
/** Whether the asset is referenced by a visible owner doc. Orthogonal to the
|
|
@@ -363,8 +357,7 @@ export const MediaAssetSchema = z.object({
|
|
|
363
357
|
retentionPolicy: MediaRetentionPolicySchema,
|
|
364
358
|
legalHold: z.boolean(),
|
|
365
359
|
originalDeletedAt: z.number().optional(),
|
|
366
|
-
// T&S provenance lineage
|
|
367
|
-
// before the lineage rollout still parse; set server-side at first accepted
|
|
360
|
+
// T&S provenance lineage. Optional so an asset that carries no lineage still parses; set server-side at first accepted
|
|
368
361
|
// ingest, inherited unchanged by every copy/variant. Never client-supplied.
|
|
369
362
|
originLineage: MediaOriginLineageV1Schema.optional(),
|
|
370
363
|
// ===== Realm shared-files seam (request → steward approval → foldered pool) =====
|
|
@@ -390,8 +383,8 @@ export const MediaAssetSchema = z.object({
|
|
|
390
383
|
realmFileShareRequestId: z.string().min(1).optional(),
|
|
391
384
|
realmFileShareRequestedByUid: z.string().min(1).optional(),
|
|
392
385
|
realmFileShareRequestedAt: z.number().optional(),
|
|
393
|
-
// Serving authority + publication gating.
|
|
394
|
-
//
|
|
386
|
+
// Serving authority + publication gating. Optional so an asset with no
|
|
387
|
+
// authority state still parses: absent authorityVersion ⇒
|
|
395
388
|
// 0/never-applied, absent publicationState ⇒ 'unpublished'. Every
|
|
396
389
|
// serving-record mutation increments authorityVersion in an authoritative txn.
|
|
397
390
|
authorityVersion: z.number().int().nonnegative().optional(),
|
|
@@ -402,7 +395,7 @@ export const MediaAssetSchema = z.object({
|
|
|
402
395
|
authorityAppliedAt: z.number().optional(),
|
|
403
396
|
publishedAt: z.number().optional(),
|
|
404
397
|
lastAuthorityError: StructuredErrorSchema.optional(),
|
|
405
|
-
// Authority-sync retry ledger
|
|
398
|
+
// Authority-sync retry ledger: the scheduled worker bumps attemptCount + sets a backoff
|
|
406
399
|
// nextAttemptAt on a transient apply failure, and dead-letters (authoritySyncState='deadLetter')
|
|
407
400
|
// past a threshold. Absent ⇒ 0 attempts / immediately due.
|
|
408
401
|
authoritySyncAttemptCount: z.number().int().nonnegative().optional(),
|
|
@@ -482,6 +475,23 @@ export const MediaAssetSchema = z.object({
|
|
|
482
475
|
forbid(path, value, `${path} must be cleared once the request is resolved (realmFileCanonStatus is "${val.realmFileCanonStatus}")`);
|
|
483
476
|
}
|
|
484
477
|
});
|
|
478
|
+
// Field projections of an asset doc for readers that need only a few of its fields. Each composes
|
|
479
|
+
// the canonical field schemas and strips every other key, and none runs MediaAssetSchema's
|
|
480
|
+
// whole-doc refinement, so a doc with unrelated stored fields still yields the fields read.
|
|
481
|
+
/** What the Hall-media orphan reaper's asset phase reads of a candidate asset. */
|
|
482
|
+
export const MediaAssetReapCandidateSchema = z.object({
|
|
483
|
+
mediaAssetId: MediaAssetSchema.shape.mediaAssetId,
|
|
484
|
+
ownerId: MediaAssetSchema.shape.ownerId,
|
|
485
|
+
createdAt: MediaAssetSchema.shape.createdAt,
|
|
486
|
+
publicationState: MediaAssetSchema.shape.publicationState,
|
|
487
|
+
retirement: MediaAssetSchema.shape.retirement,
|
|
488
|
+
});
|
|
489
|
+
/** What a copy's safety-hold check reads of its source asset. */
|
|
490
|
+
export const MediaAssetCopySourceHoldFieldsSchema = z.object({
|
|
491
|
+
mediaAssetId: MediaAssetSchema.shape.mediaAssetId,
|
|
492
|
+
originLineage: MediaAssetSchema.shape.originLineage,
|
|
493
|
+
legalHold: MediaAssetSchema.shape.legalHold,
|
|
494
|
+
});
|
|
485
495
|
export function mediaAssetRetirementStanding(asset) {
|
|
486
496
|
if (asset === undefined)
|
|
487
497
|
return 'absent';
|