@ttt-productions/ttt-core 0.8.0 → 0.10.0
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/doc-schemas/audit.d.ts +2 -2
- package/dist/doc-schemas/commissions.d.ts +4 -4
- package/dist/doc-schemas/messaging.d.ts +112 -12
- package/dist/doc-schemas/messaging.d.ts.map +1 -1
- package/dist/doc-schemas/messaging.js +27 -2
- package/dist/doc-schemas/messaging.js.map +1 -1
- package/dist/doc-schemas/moderation.d.ts +50 -44
- package/dist/doc-schemas/moderation.d.ts.map +1 -1
- package/dist/doc-schemas/moderation.js +13 -6
- package/dist/doc-schemas/moderation.js.map +1 -1
- package/dist/doc-schemas/notifications.d.ts +154 -4
- package/dist/doc-schemas/notifications.d.ts.map +1 -1
- package/dist/doc-schemas/notifications.js +37 -0
- package/dist/doc-schemas/notifications.js.map +1 -1
- package/dist/doc-schemas/operational.d.ts +82 -0
- package/dist/doc-schemas/operational.d.ts.map +1 -1
- package/dist/doc-schemas/operational.js +30 -0
- package/dist/doc-schemas/operational.js.map +1 -1
- package/dist/doc-schemas/registry.d.ts +713 -82
- package/dist/doc-schemas/registry.d.ts.map +1 -1
- package/dist/doc-schemas/registry.js +35 -36
- package/dist/doc-schemas/registry.js.map +1 -1
- package/dist/doc-schemas/report-docs.d.ts +91 -0
- package/dist/doc-schemas/report-docs.d.ts.map +1 -1
- package/dist/doc-schemas/report-docs.js +22 -0
- package/dist/doc-schemas/report-docs.js.map +1 -1
- package/dist/doc-schemas/social.d.ts +56 -0
- package/dist/doc-schemas/social.d.ts.map +1 -1
- package/dist/doc-schemas/social.js +24 -0
- package/dist/doc-schemas/social.js.map +1 -1
- package/dist/doc-schemas/system.d.ts +25 -0
- package/dist/doc-schemas/system.d.ts.map +1 -1
- package/dist/doc-schemas/system.js +13 -0
- package/dist/doc-schemas/system.js.map +1 -1
- package/dist/doc-schemas/work-project.d.ts +0 -61
- package/dist/doc-schemas/work-project.d.ts.map +1 -1
- package/dist/doc-schemas/work-project.js +0 -10
- package/dist/doc-schemas/work-project.js.map +1 -1
- package/dist/media/target-info.d.ts +12 -12
- package/dist/paths/collections.d.ts +1 -1
- package/dist/paths/collections.d.ts.map +1 -1
- package/dist/paths/collections.js +2 -1
- package/dist/paths/collections.js.map +1 -1
- package/dist/paths/path-builders.d.ts +0 -1
- package/dist/paths/path-builders.d.ts.map +1 -1
- package/dist/paths/path-builders.js +0 -1
- package/dist/paths/path-builders.js.map +1 -1
- package/dist/schemas/chat.d.ts +29 -29
- package/dist/types/work-project.d.ts +1 -1
- package/dist/types/work-project.d.ts.map +1 -1
- package/dist/types/work-project.js.map +1 -1
- package/package.json +1 -1
|
@@ -22,8 +22,8 @@ export declare const NotificationDocSchema: z.ZodObject<{
|
|
|
22
22
|
createdAt: number;
|
|
23
23
|
updatedAt: number;
|
|
24
24
|
metadata: Record<string, unknown>;
|
|
25
|
-
dedupKey: string;
|
|
26
25
|
category: string;
|
|
26
|
+
dedupKey: string;
|
|
27
27
|
targetUserId: string | null;
|
|
28
28
|
count: number;
|
|
29
29
|
latestActorIds: string[];
|
|
@@ -37,8 +37,8 @@ export declare const NotificationDocSchema: z.ZodObject<{
|
|
|
37
37
|
createdAt: number;
|
|
38
38
|
updatedAt: number;
|
|
39
39
|
metadata: Record<string, unknown>;
|
|
40
|
-
dedupKey: string;
|
|
41
40
|
category: string;
|
|
41
|
+
dedupKey: string;
|
|
42
42
|
targetUserId: string | null;
|
|
43
43
|
count: number;
|
|
44
44
|
latestActorIds: string[];
|
|
@@ -91,8 +91,8 @@ export declare const NotificationHistoryDocSchema: z.ZodObject<{
|
|
|
91
91
|
createdAt: number;
|
|
92
92
|
updatedAt: number;
|
|
93
93
|
metadata: Record<string, unknown>;
|
|
94
|
-
dedupKey: string;
|
|
95
94
|
category: string;
|
|
95
|
+
dedupKey: string;
|
|
96
96
|
targetUserId: string | null;
|
|
97
97
|
count: number;
|
|
98
98
|
latestActorIds: string[];
|
|
@@ -112,8 +112,8 @@ export declare const NotificationHistoryDocSchema: z.ZodObject<{
|
|
|
112
112
|
createdAt: number;
|
|
113
113
|
updatedAt: number;
|
|
114
114
|
metadata: Record<string, unknown>;
|
|
115
|
-
dedupKey: string;
|
|
116
115
|
category: string;
|
|
116
|
+
dedupKey: string;
|
|
117
117
|
targetUserId: string | null;
|
|
118
118
|
count: number;
|
|
119
119
|
latestActorIds: string[];
|
|
@@ -151,4 +151,154 @@ export declare const PendingNotificationSchema: z.ZodObject<{
|
|
|
151
151
|
targetUserId: string | null;
|
|
152
152
|
actorId: string;
|
|
153
153
|
}>;
|
|
154
|
+
export declare const FollowerReleaseJobSchema: z.ZodObject<{
|
|
155
|
+
jobId: z.ZodString;
|
|
156
|
+
workProjectId: z.ZodString;
|
|
157
|
+
workTitle: z.ZodString;
|
|
158
|
+
hallItemId: z.ZodString;
|
|
159
|
+
hallItemTitle: z.ZodString;
|
|
160
|
+
hallSubItemType: z.ZodEnum<["chapter", "track", "episode"]>;
|
|
161
|
+
stewardUid: z.ZodString;
|
|
162
|
+
canonRealmId: z.ZodNullable<z.ZodString>;
|
|
163
|
+
status: z.ZodEnum<["pending", "complete", "failed"]>;
|
|
164
|
+
phase: z.ZodEnum<["work", "realm"]>;
|
|
165
|
+
cursor: z.ZodNullable<z.ZodString>;
|
|
166
|
+
totalSent: z.ZodNumber;
|
|
167
|
+
createdAt: z.ZodNumber;
|
|
168
|
+
updatedAt: z.ZodNumber;
|
|
169
|
+
}, "strip", z.ZodTypeAny, {
|
|
170
|
+
status: "pending" | "failed" | "complete";
|
|
171
|
+
hallItemId: string;
|
|
172
|
+
workProjectId: string;
|
|
173
|
+
createdAt: number;
|
|
174
|
+
updatedAt: number;
|
|
175
|
+
workTitle: string;
|
|
176
|
+
hallItemTitle: string;
|
|
177
|
+
hallSubItemType: "chapter" | "track" | "episode";
|
|
178
|
+
jobId: string;
|
|
179
|
+
stewardUid: string;
|
|
180
|
+
canonRealmId: string | null;
|
|
181
|
+
phase: "work" | "realm";
|
|
182
|
+
cursor: string | null;
|
|
183
|
+
totalSent: number;
|
|
184
|
+
}, {
|
|
185
|
+
status: "pending" | "failed" | "complete";
|
|
186
|
+
hallItemId: string;
|
|
187
|
+
workProjectId: string;
|
|
188
|
+
createdAt: number;
|
|
189
|
+
updatedAt: number;
|
|
190
|
+
workTitle: string;
|
|
191
|
+
hallItemTitle: string;
|
|
192
|
+
hallSubItemType: "chapter" | "track" | "episode";
|
|
193
|
+
jobId: string;
|
|
194
|
+
stewardUid: string;
|
|
195
|
+
canonRealmId: string | null;
|
|
196
|
+
phase: "work" | "realm";
|
|
197
|
+
cursor: string | null;
|
|
198
|
+
totalSent: number;
|
|
199
|
+
}>;
|
|
200
|
+
export type FollowerReleaseJob = z.infer<typeof FollowerReleaseJobSchema>;
|
|
201
|
+
export declare const NotificationBroadcastJobSchema: z.ZodObject<{
|
|
202
|
+
jobId: z.ZodString;
|
|
203
|
+
selector: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
204
|
+
kind: z.ZodLiteral<"allActiveUsers">;
|
|
205
|
+
}, "strict", z.ZodTypeAny, {
|
|
206
|
+
kind: "allActiveUsers";
|
|
207
|
+
}, {
|
|
208
|
+
kind: "allActiveUsers";
|
|
209
|
+
}>, z.ZodObject<{
|
|
210
|
+
kind: z.ZodLiteral<"explicitUids">;
|
|
211
|
+
uids: z.ZodArray<z.ZodString, "many">;
|
|
212
|
+
}, "strict", z.ZodTypeAny, {
|
|
213
|
+
kind: "explicitUids";
|
|
214
|
+
uids: string[];
|
|
215
|
+
}, {
|
|
216
|
+
kind: "explicitUids";
|
|
217
|
+
uids: string[];
|
|
218
|
+
}>, z.ZodObject<{
|
|
219
|
+
kind: z.ZodLiteral<"workMembers">;
|
|
220
|
+
workProjectId: z.ZodString;
|
|
221
|
+
}, "strict", z.ZodTypeAny, {
|
|
222
|
+
workProjectId: string;
|
|
223
|
+
kind: "workMembers";
|
|
224
|
+
}, {
|
|
225
|
+
workProjectId: string;
|
|
226
|
+
kind: "workMembers";
|
|
227
|
+
}>, z.ZodObject<{
|
|
228
|
+
kind: z.ZodLiteral<"realmMembers">;
|
|
229
|
+
workRealmId: z.ZodString;
|
|
230
|
+
}, "strict", z.ZodTypeAny, {
|
|
231
|
+
workRealmId: string;
|
|
232
|
+
kind: "realmMembers";
|
|
233
|
+
}, {
|
|
234
|
+
workRealmId: string;
|
|
235
|
+
kind: "realmMembers";
|
|
236
|
+
}>, z.ZodObject<{
|
|
237
|
+
kind: z.ZodLiteral<"allArtisans">;
|
|
238
|
+
}, "strict", z.ZodTypeAny, {
|
|
239
|
+
kind: "allArtisans";
|
|
240
|
+
}, {
|
|
241
|
+
kind: "allArtisans";
|
|
242
|
+
}>]>;
|
|
243
|
+
title: z.ZodString;
|
|
244
|
+
message: z.ZodString;
|
|
245
|
+
actorUid: z.ZodString;
|
|
246
|
+
actorSystemRole: z.ZodOptional<z.ZodString>;
|
|
247
|
+
status: z.ZodEnum<["pending", "complete", "failed"]>;
|
|
248
|
+
cursor: z.ZodNullable<z.ZodString>;
|
|
249
|
+
totalSent: z.ZodNumber;
|
|
250
|
+
createdAt: z.ZodNumber;
|
|
251
|
+
updatedAt: z.ZodNumber;
|
|
252
|
+
}, "strip", z.ZodTypeAny, {
|
|
253
|
+
message: string;
|
|
254
|
+
status: "pending" | "failed" | "complete";
|
|
255
|
+
title: string;
|
|
256
|
+
createdAt: number;
|
|
257
|
+
actorUid: string;
|
|
258
|
+
updatedAt: number;
|
|
259
|
+
selector: {
|
|
260
|
+
kind: "allActiveUsers";
|
|
261
|
+
} | {
|
|
262
|
+
kind: "explicitUids";
|
|
263
|
+
uids: string[];
|
|
264
|
+
} | {
|
|
265
|
+
workProjectId: string;
|
|
266
|
+
kind: "workMembers";
|
|
267
|
+
} | {
|
|
268
|
+
workRealmId: string;
|
|
269
|
+
kind: "realmMembers";
|
|
270
|
+
} | {
|
|
271
|
+
kind: "allArtisans";
|
|
272
|
+
};
|
|
273
|
+
jobId: string;
|
|
274
|
+
cursor: string | null;
|
|
275
|
+
totalSent: number;
|
|
276
|
+
actorSystemRole?: string | undefined;
|
|
277
|
+
}, {
|
|
278
|
+
message: string;
|
|
279
|
+
status: "pending" | "failed" | "complete";
|
|
280
|
+
title: string;
|
|
281
|
+
createdAt: number;
|
|
282
|
+
actorUid: string;
|
|
283
|
+
updatedAt: number;
|
|
284
|
+
selector: {
|
|
285
|
+
kind: "allActiveUsers";
|
|
286
|
+
} | {
|
|
287
|
+
kind: "explicitUids";
|
|
288
|
+
uids: string[];
|
|
289
|
+
} | {
|
|
290
|
+
workProjectId: string;
|
|
291
|
+
kind: "workMembers";
|
|
292
|
+
} | {
|
|
293
|
+
workRealmId: string;
|
|
294
|
+
kind: "realmMembers";
|
|
295
|
+
} | {
|
|
296
|
+
kind: "allArtisans";
|
|
297
|
+
};
|
|
298
|
+
jobId: string;
|
|
299
|
+
cursor: string | null;
|
|
300
|
+
totalSent: number;
|
|
301
|
+
actorSystemRole?: string | undefined;
|
|
302
|
+
}>;
|
|
303
|
+
export type NotificationBroadcastJob = z.infer<typeof NotificationBroadcastJobSchema>;
|
|
154
304
|
//# sourceMappingURL=notifications.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/notifications.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/notifications.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAehC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIvC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;EAQpC,CAAC;AAKH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAenC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAK1E,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAazC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
// Canonical TYPES live in @ttt-productions/notification-core; parity is asserted in
|
|
6
6
|
// parity.test.ts so these schemas cannot silently drift from the package types.
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
+
import { BroadcastAudienceSelectorSchema } from '../schemas/notification.js';
|
|
8
9
|
export const NotificationDocSchema = z.object({
|
|
9
10
|
id: z.string(),
|
|
10
11
|
type: z.string(),
|
|
@@ -39,4 +40,40 @@ export const PendingNotificationSchema = z.object({
|
|
|
39
40
|
metadata: z.record(z.string(), z.unknown()),
|
|
40
41
|
createdAt: z.number(),
|
|
41
42
|
});
|
|
43
|
+
// followerReleaseJobs/{jobId} — Cloud-Functions-only fan-out job: enqueueFollowerReleaseJob (post
|
|
44
|
+
// Hall-publish) → processFollowerReleaseJobs drains Work followers, then canon-Realm followers.
|
|
45
|
+
// (functions/src/notifications/followerReleaseJobs.ts)
|
|
46
|
+
export const FollowerReleaseJobSchema = z.object({
|
|
47
|
+
jobId: z.string(),
|
|
48
|
+
workProjectId: z.string(),
|
|
49
|
+
workTitle: z.string(),
|
|
50
|
+
hallItemId: z.string(),
|
|
51
|
+
hallItemTitle: z.string(),
|
|
52
|
+
hallSubItemType: z.enum(['chapter', 'track', 'episode']),
|
|
53
|
+
stewardUid: z.string(),
|
|
54
|
+
canonRealmId: z.string().nullable(),
|
|
55
|
+
status: z.enum(['pending', 'complete', 'failed']),
|
|
56
|
+
phase: z.enum(['work', 'realm']),
|
|
57
|
+
cursor: z.string().nullable(),
|
|
58
|
+
totalSent: z.number(),
|
|
59
|
+
createdAt: z.number(),
|
|
60
|
+
updatedAt: z.number(),
|
|
61
|
+
});
|
|
62
|
+
// notificationBroadcastJobs/{jobId} — Cloud-Functions-only admin-broadcast fan-out job:
|
|
63
|
+
// createNotificationBroadcast stores the audience selector (never a resolved uid list);
|
|
64
|
+
// processNotificationBroadcastJobs drains it. (functions/src/notifications/createNotificationBroadcast.ts)
|
|
65
|
+
export const NotificationBroadcastJobSchema = z.object({
|
|
66
|
+
jobId: z.string(),
|
|
67
|
+
selector: BroadcastAudienceSelectorSchema,
|
|
68
|
+
title: z.string(),
|
|
69
|
+
message: z.string(),
|
|
70
|
+
actorUid: z.string(),
|
|
71
|
+
// ctx.admin (a SystemRole role string); modeled loosely — SystemRole is a ttt-prod-only union.
|
|
72
|
+
actorSystemRole: z.string().optional(),
|
|
73
|
+
status: z.enum(['pending', 'complete', 'failed']),
|
|
74
|
+
cursor: z.string().nullable(),
|
|
75
|
+
totalSent: z.number(),
|
|
76
|
+
createdAt: z.number(),
|
|
77
|
+
updatedAt: z.number(),
|
|
78
|
+
});
|
|
42
79
|
//# sourceMappingURL=notifications.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/doc-schemas/notifications.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,kFAAkF;AAClF,8EAA8E;AAC9E,6EAA6E;AAC7E,oFAAoF;AACpF,gFAAgF;AAEhF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
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EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;IACjD,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAGH,wFAAwF;AACxF,wFAAwF;AACxF,2GAA2G;AAC3G,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,QAAQ,EAAE,+BAA+B;IACzC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,+FAA+F;IAC/F,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC"}
|
|
@@ -45,4 +45,86 @@ export declare const StakeShareAuditEventSchema: z.ZodObject<{
|
|
|
45
45
|
afterStakeShares: number | null;
|
|
46
46
|
}>;
|
|
47
47
|
export type StakeShareAuditEvent = z.infer<typeof StakeShareAuditEventSchema>;
|
|
48
|
+
export declare const ShortLinkSchema: z.ZodObject<{
|
|
49
|
+
shortId: z.ZodString;
|
|
50
|
+
shortUrl: z.ZodString;
|
|
51
|
+
destinationUrl: z.ZodString;
|
|
52
|
+
type: z.ZodEnum<["audition", "audition-entry"]>;
|
|
53
|
+
metadata: z.ZodObject<{
|
|
54
|
+
auditionId: z.ZodString;
|
|
55
|
+
auditionEntryId: z.ZodNullable<z.ZodString>;
|
|
56
|
+
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
auditionId: string;
|
|
58
|
+
auditionEntryId: string | null;
|
|
59
|
+
}, {
|
|
60
|
+
auditionId: string;
|
|
61
|
+
auditionEntryId: string | null;
|
|
62
|
+
}>;
|
|
63
|
+
createdAt: z.ZodNumber;
|
|
64
|
+
createdBy: z.ZodString;
|
|
65
|
+
clicks: z.ZodNumber;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
type: "audition" | "audition-entry";
|
|
68
|
+
createdAt: number;
|
|
69
|
+
createdBy: string;
|
|
70
|
+
shortId: string;
|
|
71
|
+
shortUrl: string;
|
|
72
|
+
metadata: {
|
|
73
|
+
auditionId: string;
|
|
74
|
+
auditionEntryId: string | null;
|
|
75
|
+
};
|
|
76
|
+
destinationUrl: string;
|
|
77
|
+
clicks: number;
|
|
78
|
+
}, {
|
|
79
|
+
type: "audition" | "audition-entry";
|
|
80
|
+
createdAt: number;
|
|
81
|
+
createdBy: string;
|
|
82
|
+
shortId: string;
|
|
83
|
+
shortUrl: string;
|
|
84
|
+
metadata: {
|
|
85
|
+
auditionId: string;
|
|
86
|
+
auditionEntryId: string | null;
|
|
87
|
+
};
|
|
88
|
+
destinationUrl: string;
|
|
89
|
+
clicks: number;
|
|
90
|
+
}>;
|
|
91
|
+
export type ShortLink = z.infer<typeof ShortLinkSchema>;
|
|
92
|
+
export declare const FeedbackAliasSchema: z.ZodObject<{
|
|
93
|
+
canonicalId: z.ZodString;
|
|
94
|
+
originalType: z.ZodString;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
canonicalId: string;
|
|
97
|
+
originalType: string;
|
|
98
|
+
}, {
|
|
99
|
+
canonicalId: string;
|
|
100
|
+
originalType: string;
|
|
101
|
+
}>;
|
|
102
|
+
export type FeedbackAlias = z.infer<typeof FeedbackAliasSchema>;
|
|
103
|
+
export declare const UserSuggestionSchema: z.ZodObject<{
|
|
104
|
+
suggestionText: z.ZodString;
|
|
105
|
+
count: z.ZodNumber;
|
|
106
|
+
submittedBy: z.ZodArray<z.ZodObject<{
|
|
107
|
+
userId: z.ZodString;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
userId: string;
|
|
110
|
+
}, {
|
|
111
|
+
userId: string;
|
|
112
|
+
}>, "many">;
|
|
113
|
+
lastSubmitted: z.ZodNumber;
|
|
114
|
+
}, "strip", z.ZodTypeAny, {
|
|
115
|
+
count: number;
|
|
116
|
+
suggestionText: string;
|
|
117
|
+
submittedBy: {
|
|
118
|
+
userId: string;
|
|
119
|
+
}[];
|
|
120
|
+
lastSubmitted: number;
|
|
121
|
+
}, {
|
|
122
|
+
count: number;
|
|
123
|
+
suggestionText: string;
|
|
124
|
+
submittedBy: {
|
|
125
|
+
userId: string;
|
|
126
|
+
}[];
|
|
127
|
+
lastSubmitted: number;
|
|
128
|
+
}>;
|
|
129
|
+
export type UserSuggestion = z.infer<typeof UserSuggestionSchema>;
|
|
48
130
|
//# sourceMappingURL=operational.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operational.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/operational.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,yBAAyB;;;;;;;;;EAGpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAI5E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"operational.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/operational.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,yBAAyB;;;;;;;;;EAGpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAI5E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAI9E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAIxD,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAKhE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;EAK/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -21,4 +21,34 @@ export const StakeShareAuditEventSchema = z.object({
|
|
|
21
21
|
createdAt: z.number(),
|
|
22
22
|
source: z.string(),
|
|
23
23
|
});
|
|
24
|
+
// shortLinks/{shortId} — short link to an Audition / AuditionEntry, with a click counter.
|
|
25
|
+
// (functions/src/utility/createShortLink.ts)
|
|
26
|
+
export const ShortLinkSchema = z.object({
|
|
27
|
+
shortId: z.string(),
|
|
28
|
+
shortUrl: z.string(),
|
|
29
|
+
destinationUrl: z.string(),
|
|
30
|
+
type: z.enum(['audition', 'audition-entry']),
|
|
31
|
+
metadata: z.object({
|
|
32
|
+
auditionId: z.string(),
|
|
33
|
+
auditionEntryId: z.string().nullable(),
|
|
34
|
+
}),
|
|
35
|
+
createdAt: z.number(),
|
|
36
|
+
createdBy: z.string(),
|
|
37
|
+
clicks: z.number(),
|
|
38
|
+
});
|
|
39
|
+
// feedbackAliases/{aliasId} — Console-managed map collapsing a synonym suggestion onto a canonical
|
|
40
|
+
// one; read by submitFeedback, no callable writes it. (firestore.rules §3F / submitFeedback.ts)
|
|
41
|
+
export const FeedbackAliasSchema = z.object({
|
|
42
|
+
canonicalId: z.string(),
|
|
43
|
+
originalType: z.string(),
|
|
44
|
+
});
|
|
45
|
+
// feedbackSubmissions/{feedbackType}/userSuggestions/{suggestionId} — an aggregated user
|
|
46
|
+
// suggestion with its deduped submitter list + count. The path nests the feedbackSubmissions +
|
|
47
|
+
// userSuggestions registry segments. (functions/src/utility/submitFeedback.ts)
|
|
48
|
+
export const UserSuggestionSchema = z.object({
|
|
49
|
+
suggestionText: z.string(),
|
|
50
|
+
count: z.number(),
|
|
51
|
+
submittedBy: z.array(z.object({ userId: z.string() })),
|
|
52
|
+
lastSubmitted: z.number(),
|
|
53
|
+
});
|
|
24
54
|
//# sourceMappingURL=operational.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operational.js","sourceRoot":"","sources":["../../src/doc-schemas/operational.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,kGAAkG;AAElG,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,6FAA6F;AAC7F,8EAA8E;AAC9E,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;CACxB,CAAC,CAAC;AAGH,8FAA8F;AAC9F,sE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