@domino-sdk/relay 1.0.0-next.8 → 1.0.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.
Files changed (59) hide show
  1. package/README.md +1 -1
  2. package/dist/activity-DeKJsRry.d.ts +9112 -0
  3. package/dist/authoring.d.ts +1135 -285
  4. package/dist/authoring.js +545 -269
  5. package/dist/automatic-outcomes-B1xrETxm.d.ts +758 -0
  6. package/dist/avatar.d.ts +2 -2
  7. package/dist/browser-DFe7sWSN.d.ts +4154 -0
  8. package/dist/browser.d.ts +11 -2528
  9. package/dist/browser.js +8 -6
  10. package/dist/capability-error-DNMwKmlL.d.ts +458 -0
  11. package/dist/{chunk-V7EZUZ3Z.js → chunk-36HTX2BM.js} +389 -169
  12. package/dist/chunk-6QJ3LADK.js +112 -0
  13. package/dist/{chunk-77H7APVD.js → chunk-BGGKNIRP.js} +1 -1
  14. package/dist/chunk-EYH5RDIE.js +496 -0
  15. package/dist/chunk-GQKYAQM6.js +84 -0
  16. package/dist/chunk-GUP7YRR4.js +42 -0
  17. package/dist/{chunk-V5R2DMGY.js → chunk-GZ6FJAXN.js} +380 -128
  18. package/dist/chunk-JON5SESL.js +2986 -0
  19. package/dist/chunk-MC6V6VMG.js +49 -0
  20. package/dist/chunk-NPGENI7K.js +37 -0
  21. package/dist/chunk-VFHHLN6A.js +284 -0
  22. package/dist/chunk-WJSSJ7AF.js +151 -0
  23. package/dist/{chunk-QBOHLT7M.js → chunk-XFMSUPNS.js} +1 -1
  24. package/dist/{chunk-6A6K5RUD.js → chunk-ZVIRG24J.js} +145 -42
  25. package/dist/{client-CK4nwt7V.d.ts → client-XiuFnug_.d.ts} +2193 -562
  26. package/dist/{submission-input-C9qm9ixd.d.ts → groups-Ck-OxzjD.d.ts} +919 -1142
  27. package/dist/identity-integration-GxAHdKR2.d.ts +58 -0
  28. package/dist/{images--vZ9U0kr.d.ts → images-Dv-P5VBw.d.ts} +2 -2
  29. package/dist/index.d.ts +13 -9
  30. package/dist/index.js +17 -6
  31. package/dist/internal.d.ts +82 -43
  32. package/dist/internal.js +58 -90
  33. package/dist/offers-Cy-e4o5x.d.ts +431 -0
  34. package/dist/{pages-BzqJuI69.d.ts → outcomes-kVB-Juzs.d.ts} +2386 -1490
  35. package/dist/pages-BBYD21IE.d.ts +359 -0
  36. package/dist/participant-rewards-3duLb8YJ.d.ts +668 -0
  37. package/dist/portal-proxy.js +22 -4
  38. package/dist/{profiles-DDMFBRKe.d.ts → profiles-D2aFcOxu.d.ts} +15 -15
  39. package/dist/react/index.d.ts +3122 -1011
  40. package/dist/react/index.js +1627 -779
  41. package/dist/request-error-DWduJCGV.d.ts +62 -0
  42. package/dist/schema-DfJzH2ci.d.ts +5644 -0
  43. package/dist/schema.d.ts +15 -4216
  44. package/dist/schema.js +322 -81
  45. package/dist/server/index.d.ts +81498 -0
  46. package/dist/server/index.js +2520 -0
  47. package/dist/{streaks-CwGReWGt.d.ts → streaks-CWyq8Px5.d.ts} +2 -4
  48. package/dist/submission-input-BZkm6ohU.d.ts +290 -0
  49. package/dist/vite.d.ts +1 -1
  50. package/dist/vite.js +1 -0
  51. package/dist/{wallet-BGOfFkG9.d.ts → wallet-YssWxGg8.d.ts} +35 -38
  52. package/package.json +8 -2
  53. package/dist/chunk-MRIURJE3.js +0 -257
  54. package/dist/chunk-VARGF4JS.js +0 -1733
  55. package/dist/chunk-ZWY3R6B3.js +0 -26
  56. package/dist/collection-BGneJ6Bk.d.ts +0 -114
  57. package/dist/integrations-C3Sp558f.d.ts +0 -1297
  58. package/dist/point-ledgers-iS00Z_v0.d.ts +0 -37
  59. package/dist/schema-pnuWqvGn.d.ts +0 -3396
@@ -1,1733 +0,0 @@
1
- // src/accounts.ts
2
- import { z } from "zod";
3
- var authProviderSchema = z.enum(["google", "apple", "x", "discord"]);
4
- var accountConnectionSchema = z.object({
5
- provider: authProviderSchema,
6
- configured: z.boolean(),
7
- status: z.enum(["disconnected", "connected", "reconnect"]),
8
- subject: z.string().nullable(),
9
- revision: z.number().int().nonnegative()
10
- });
11
- var discordMemberInputSchema = z.object({}).strict();
12
- var discordMessageInputSchema = z.object({
13
- channelId: z.string().regex(/^[0-9]{1,20}$/),
14
- messageId: z.string().regex(/^[0-9]{1,20}$/)
15
- }).strict();
16
- var discordMemberSchema = z.object({
17
- userId: z.string().regex(/^[0-9]{1,20}$/).nullable().default(null),
18
- nickname: z.string().nullable().default(null),
19
- displayName: z.string().nullable().default(null),
20
- boostingSince: z.string().datetime({ offset: true }).nullable().default(null),
21
- roles: z.array(z.string().regex(/^[0-9]{1,20}$/)),
22
- joinedAt: z.string().datetime({ offset: true }).nullable(),
23
- pending: z.boolean()
24
- });
25
-
26
- // src/identifier.ts
27
- import { z as z2 } from "zod";
28
- var identifier = z2.string().min(1).max(100).regex(/^[a-zA-Z0-9_-]+$/);
29
-
30
- // src/pages.ts
31
- import { z as z3 } from "zod";
32
- var pageCursorSchema = z3.string().min(1).max(4096);
33
- var pageQuerySchema = z3.strictObject({
34
- cursor: pageCursorSchema.optional()
35
- });
36
-
37
- // src/trackers.ts
38
- import { z as z4 } from "zod";
39
- var timestamp = z4.number().int().safe().nonnegative().max(864e13);
40
- var count = z4.number().int().safe().nonnegative();
41
- var externalId = z4.string().min(1).max(256);
42
- var metric = count.nullable().default(null);
43
- var xTweetSchema = z4.looseObject({
44
- id: externalId,
45
- userId: externalId,
46
- content: z4.string(),
47
- createdAt: z4.iso.datetime({ offset: true }),
48
- author: z4.looseObject({
49
- id: externalId,
50
- username: z4.string(),
51
- name: z4.string(),
52
- verified: z4.boolean().nullable().default(null)
53
- }),
54
- likeCount: metric,
55
- replyCount: metric,
56
- retweetCount: metric,
57
- quoteCount: metric,
58
- viewCount: metric,
59
- bookmarkCount: metric,
60
- isReply: z4.boolean(),
61
- isRetweet: z4.boolean(),
62
- isQuoteTweet: z4.boolean()
63
- });
64
- var xContentBodySchema = z4.strictObject({
65
- version: z4.literal(1),
66
- id: z4.string().min(1),
67
- authorId: z4.string().min(1),
68
- publishedAt: timestamp,
69
- text: z4.string(),
70
- isReply: z4.boolean(),
71
- isRetweet: z4.boolean(),
72
- isQuoteTweet: z4.boolean(),
73
- media: z4.array(z4.strictObject({ type: z4.string(), url: z4.string() })).nullable(),
74
- mentionedAuthorIds: z4.array(z4.string().min(1)).nullable(),
75
- videoLengthSeconds: z4.number().nonnegative().nullable(),
76
- references: z4.strictObject({
77
- replyId: z4.string().nullable(),
78
- replyAuthorId: z4.string().nullable(),
79
- quoteId: z4.string().nullable(),
80
- quoteAuthorId: z4.string().nullable(),
81
- repostId: z4.string().nullable(),
82
- repostAuthorId: z4.string().nullable()
83
- })
84
- });
85
- var trackerContentQuerySchema = z4.strictObject({
86
- id: externalId,
87
- observation: z4.string().regex(/^observation_[a-f0-9]{64}$/)
88
- });
89
- var trackerContentReadSchema = trackerContentQuerySchema.extend({
90
- member: identifier
91
- });
92
- var attributionContext = { member: identifier, capturedAt: timestamp };
93
- var trackerEvidenceSchema = z4.strictObject({
94
- contentRevision: identifier,
95
- observation: identifier
96
- });
97
- var trackerContentSchema = z4.strictObject({
98
- tracker: identifier,
99
- source: z4.literal("x"),
100
- evidence: trackerEvidenceSchema,
101
- content: xContentBodySchema,
102
- observedAt: timestamp,
103
- removed: z4.boolean(),
104
- attribution: z4.discriminatedUnion("kind", [
105
- z4.strictObject({
106
- ...attributionContext,
107
- kind: z4.literal("linked"),
108
- account: z4.strictObject({
109
- provider: z4.literal("x"),
110
- issuer: z4.string().min(1),
111
- subject: externalId,
112
- revision: count,
113
- linkedAt: timestamp.nullable()
114
- })
115
- }),
116
- z4.strictObject({ ...attributionContext, kind: z4.literal("unlinked") }),
117
- z4.strictObject({
118
- ...attributionContext,
119
- kind: z4.literal("different-author")
120
- })
121
- ])
122
- });
123
- var identityKindSchema = z4.enum(["wallet", "x", "discord", "member"]);
124
- var accountRoleSchema = z4.string().regex(
125
- /^[a-zA-Z][a-zA-Z0-9_]{0,39}$/,
126
- "Name roles like author or recipient: a letter, then letters, digits or underscores"
127
- );
128
- var xAccountRoles = ["author", "inReplyTo"];
129
- var distinct = (values) => new Set(values).size === values.length;
130
- var xSearchSourceSchema = z4.object({
131
- kind: z4.literal("x-search"),
132
- query: z4.string().trim().min(1).max(2e3)
133
- }).strict();
134
- var customSourceSchema = z4.object({
135
- kind: z4.literal("custom"),
136
- namespace: identifier,
137
- /**
138
- * The identity kinds a record's author and named accounts can be, attributed to members
139
- * through verified links. Omitted when authors are opaque IDs, which no quest can pay.
140
- */
141
- identities: z4.array(identityKindSchema).min(1).max(4).refine(distinct, "List each identity kind once").optional(),
142
- /** Roles of the named accounts records can carry besides their author, such as `recipient`. */
143
- accounts: z4.array(accountRoleSchema).min(1).max(10).refine(distinct, "List each account role once").refine(
144
- (roles) => !roles.includes("author"),
145
- "author is every record's own role; name other accounts"
146
- ).optional(),
147
- /**
148
- * How trackers published before identity kinds stored `identities: ["wallet"]`. Reads return
149
- * those definitions as stored; write `identities` instead.
150
- *
151
- * @deprecated Use `identities: ["wallet"]`.
152
- */
153
- authors: z4.literal("wallet").optional()
154
- }).strict().refine(
155
- (source) => !(source.authors && source.identities),
156
- "Use identities, not authors"
157
- ).refine(
158
- (source) => !source.accounts || source.identities,
159
- "Named accounts need identities"
160
- );
161
- var trackerSourceSchema = z4.discriminatedUnion("kind", [
162
- xSearchSourceSchema,
163
- customSourceSchema
164
- ]);
165
- function sourceIdentities(source) {
166
- if (source.kind === "x-search") {
167
- return ["x"];
168
- }
169
- return source.identities ?? (source.authors === "wallet" ? ["wallet"] : void 0);
170
- }
171
- var windowSchema = z4.object({ start: timestamp, end: timestamp.optional() }).strict().refine(
172
- (w) => w.end === void 0 || w.end > w.start,
173
- "End must follow start"
174
- );
175
- var trackerDefinitionSchema = z4.object({
176
- key: identifier,
177
- title: z4.string().trim().min(1).max(120),
178
- source: trackerSourceSchema,
179
- window: windowSchema,
180
- refreshSeconds: z4.number().int().min(300).max(86400).default(21600),
181
- maxPages: z4.number().int().min(1).max(1e3).default(60)
182
- }).strict();
183
- var trackerArtifactSchema = z4.union([
184
- trackerDefinitionSchema,
185
- z4.object({ code: z4.string().min(1).max(2e6) }).strict()
186
- ]);
187
- var publishedTrackerSchema = z4.object({
188
- id: identifier,
189
- version: identifier,
190
- definition: trackerDefinitionSchema,
191
- publishedAt: timestamp,
192
- actor: z4.string().nullable()
193
- });
194
- var trackerStatusSchema = z4.object({
195
- published: publishedTrackerSchema,
196
- paused: z4.boolean(),
197
- state: z4.enum(["idle", "syncing", "error", "complete"]),
198
- lastStartedAt: timestamp.nullable(),
199
- lastCompletedAt: timestamp.nullable(),
200
- nextSyncAt: timestamp.nullable(),
201
- coverage: z4.enum(["unknown", "partial", "complete"]),
202
- error: z4.string().nullable(),
203
- records: count
204
- });
205
- var trackerControlSchema = z4.object({
206
- actionId: identifier,
207
- action: z4.enum(["pause", "resume", "refresh"])
208
- }).strict();
209
- var trackerAccountSchema = z4.strictObject({
210
- kind: identityKindSchema.optional(),
211
- id: externalId
212
- });
213
- var trackerRecordInputSchema = z4.object({
214
- id: externalId,
215
- occurredAt: timestamp,
216
- observedAt: timestamp,
217
- author: z4.object({
218
- id: externalId,
219
- verified: z4.boolean().nullable().default(null),
220
- /** The author's identity kind; needed when the source names more than one. */
221
- kind: identityKindSchema.optional()
222
- }).strict().nullable().default(null),
223
- /** Named accounts besides the author, by the roles the custom source declares. */
224
- accounts: z4.record(accountRoleSchema, trackerAccountSchema).refine(
225
- (accounts) => Object.keys(accounts).length <= 10,
226
- "At most 10 accounts"
227
- ).optional(),
228
- data: z4.record(z4.string(), z4.json()),
229
- removed: z4.boolean().default(false)
230
- }).strict().refine(
231
- (v) => new TextEncoder().encode(JSON.stringify(v.data)).byteLength <= 131072,
232
- "Record exceeds 128 KB"
233
- );
234
- var trackerRecordSchema = trackerRecordInputSchema.safeExtend({
235
- source: z4.string(),
236
- firstSeenAt: timestamp,
237
- /** Present only when includeEvidence is true; custom sources have no X evidence. */
238
- evidence: trackerEvidenceSchema.nullable().optional()
239
- });
240
- var trackerIngestSchema = z4.object({
241
- actionId: identifier,
242
- records: z4.array(trackerRecordInputSchema).min(1).max(100)
243
- }).strict();
244
- var trackerIngestResultSchema = z4.object({
245
- stored: count,
246
- /** Tracker-trigger decisions this ingest caused. Absent from servers without tracker triggers. */
247
- admissions: z4.object({
248
- admitted: count,
249
- skipped: count,
250
- /**
251
- * Observations a quest's firing mode selected but its `where` filter did not match, counted
252
- * per quest like `admitted` and `skipped`. They record no outcome. Present only when
253
- * nonzero.
254
- */
255
- filtered: count.optional()
256
- }).optional()
257
- });
258
- var trackerOutcomeFields = {
259
- /** Stable quest ID. */
260
- quest: identifier,
261
- /** Stable tracker ID. */
262
- tracker: identifier,
263
- record: externalId,
264
- observedAt: timestamp,
265
- /** The release admitted, or the one active when the observation was skipped. */
266
- release: identifier,
267
- /** The account attribution resolved or failed to resolve, such as a CAIP-10 wallet ID. */
268
- account: z4.string().nullable(),
269
- createdAt: timestamp,
270
- updatedAt: timestamp,
271
- /** Null for automatic decisions; the staff actor after a retry. */
272
- actor: z4.string().nullable()
273
- };
274
- var trackerSkipCodes = [
275
- /** The quest is paused or no longer active. */
276
- "quest-paused",
277
- /** The record occurred before the quest was published. */
278
- "before-activation",
279
- /** The record is marked removed. */
280
- "record-removed",
281
- /** The captured X post of this observation cannot be read. */
282
- "content-unavailable",
283
- /** The record has no account in the beneficiary role, such as a post that is not a reply. */
284
- "no-account",
285
- /**
286
- * The beneficiary account is the record's author account, such as a reply to oneself, or both
287
- * belong to the same member. A different account is judged once it resolves to a member, after
288
- * `unlinked-account` and `ambiguous-account`.
289
- */
290
- "beneficiary-is-author",
291
- /** No member has verified the beneficiary account. */
292
- "unlinked-account",
293
- /** More than one member has the beneficiary account. */
294
- "ambiguous-account",
295
- /** The attributed member has not joined the project. */
296
- "not-joined",
297
- /** The attributed member has not completed the quest's prerequisites. */
298
- "prerequisites-incomplete"
299
- ];
300
- var trackerOutcomeSchema = z4.discriminatedUnion("state", [
301
- z4.strictObject({
302
- ...trackerOutcomeFields,
303
- state: z4.literal("admitted"),
304
- code: z4.null(),
305
- reason: z4.null(),
306
- /** The attributed member. */
307
- member: identifier,
308
- /** The admitted attempt. Its evaluation, decision and rewards live on the attempt. */
309
- attempt: identifier
310
- }),
311
- z4.strictObject({
312
- ...trackerOutcomeFields,
313
- state: z4.literal("skipped"),
314
- /** Why the observation was skipped, as one of `trackerSkipCodes`. */
315
- code: z4.string().min(1),
316
- /** Why the observation was skipped, for people. */
317
- reason: z4.string(),
318
- /** The attributed member, when attribution got that far. */
319
- member: identifier.nullable(),
320
- attempt: identifier.nullable()
321
- })
322
- ]);
323
- var trackerOutcomeQuerySchema = z4.strictObject({
324
- /** Quest key or ID. */
325
- quest: identifier.optional(),
326
- record: externalId.optional(),
327
- member: identifier.optional(),
328
- state: z4.enum(["admitted", "skipped"]).optional(),
329
- /** Only skips with this code, such as `unlinked-account`. */
330
- code: z4.string().min(1).max(100).optional(),
331
- limit: z4.coerce.number().int().min(1).max(100).default(25),
332
- /** Opaque cursor from `next`: older outcomes. */
333
- before: z4.string().max(512).optional()
334
- });
335
- var trackerOutcomePageSchema = z4.strictObject({
336
- /** Newest first. */
337
- items: z4.array(trackerOutcomeSchema).max(100),
338
- next: z4.string().nullable()
339
- });
340
- var trackerOutcomeRetrySchema = z4.strictObject({
341
- actionId: identifier,
342
- /** Quest key or ID. */
343
- quest: identifier,
344
- record: externalId,
345
- observedAt: timestamp
346
- });
347
- var booleanQuery = z4.union([
348
- z4.boolean(),
349
- z4.enum(["true", "false"]).transform((v) => v === "true")
350
- ]);
351
- var trackerQuerySchema = z4.object({
352
- author: externalId.optional(),
353
- member: identifier.optional(),
354
- verified: booleanQuery.optional(),
355
- since: z4.coerce.number().int().safe().nonnegative().optional(),
356
- until: z4.coerce.number().int().safe().nonnegative().optional(),
357
- removed: booleanQuery.default(false),
358
- minLikes: z4.coerce.number().int().safe().nonnegative().optional(),
359
- minViews: z4.coerce.number().int().safe().nonnegative().optional(),
360
- limit: z4.coerce.number().int().min(1).max(100).default(25),
361
- cursor: z4.string().max(2048).optional(),
362
- includeEvidence: booleanQuery.optional()
363
- }).strict().refine(
364
- (q) => q.since === void 0 || q.until === void 0 || q.until > q.since,
365
- "Until must follow since"
366
- );
367
- var trackerPageSchema = z4.object({
368
- tracker: identifier,
369
- items: z4.array(trackerRecordSchema),
370
- nextCursor: z4.string().nullable(),
371
- total: count,
372
- status: trackerStatusSchema
373
- });
374
- var trackerSummarySchema = z4.object({
375
- records: count,
376
- authors: count,
377
- metrics: z4.object({
378
- likes: count,
379
- replies: count,
380
- reposts: count,
381
- quotes: count,
382
- views: count,
383
- bookmarks: count
384
- }),
385
- missingMetrics: count,
386
- status: trackerStatusSchema
387
- });
388
- var trackerPreviewLimits = {
389
- pages: 3,
390
- posts: 100,
391
- days: 30
392
- };
393
- var trackerPreviewInputSchema = z4.object({
394
- query: xSearchSourceSchema.shape.query,
395
- /** Start of the searched window. The window ends when the sample is fetched. */
396
- since: timestamp
397
- }).strict();
398
- var trackerPreviewSchema = z4.object({
399
- query: z4.string(),
400
- since: timestamp,
401
- fetchedAt: timestamp,
402
- pages: count,
403
- /** Every match in the sample, newest first, verified or not. */
404
- posts: z4.array(xTweetSchema).max(trackerPreviewLimits.posts),
405
- /** X had more matches than the sample holds. */
406
- more: z4.boolean()
407
- });
408
-
409
- // src/content.ts
410
- import { z as z5 } from "zod";
411
- var timestamp2 = z5.number().int().safe().nonnegative().max(864e13);
412
- var contentPolicySchema = z5.strictObject({
413
- tracker: identifier,
414
- window: trackerDefinitionSchema.shape.window,
415
- enrollment: z5.enum(["none", "required"]).default("none"),
416
- posts: z5.enum(["after-enrollment", "since-start"]).default("after-enrollment"),
417
- historical: z5.enum(["automatic", "claim", "staff"]).default("claim")
418
- });
419
- var admittedContentSchema = xContentBodySchema.extend({
420
- tracker: identifier,
421
- revision: identifier,
422
- observation: identifier,
423
- attribution: trackerContentSchema.shape.attribution.options[0],
424
- enrolledAt: timestamp2.nullable(),
425
- completionKey: z5.string().min(1).max(200)
426
- });
427
- var contentEnrollmentInputSchema = z5.strictObject({
428
- actionId: identifier,
429
- quest: identifier,
430
- member: identifier
431
- });
432
- var contentEnrollmentSchema = z5.strictObject({
433
- quest: identifier,
434
- member: identifier,
435
- enrolledAt: timestamp2
436
- });
437
- var contentReleaseInputSchema = contentEnrollmentInputSchema.extend({
438
- content: z5.string().min(1).max(256)
439
- });
440
- var contentAdmissionSchema = z5.strictObject({
441
- quest: identifier,
442
- content: z5.string().min(1).max(256),
443
- release: identifier,
444
- state: z5.enum(["pending", "admitted", "excluded"]),
445
- reason: z5.string().nullable(),
446
- attempt: identifier.nullable()
447
- });
448
- var contentAdmissionQuerySchema = z5.strictObject({
449
- quest: identifier,
450
- member: identifier.optional(),
451
- content: z5.string().min(1).max(256).optional(),
452
- cursor: pageCursorSchema.optional()
453
- });
454
- var contentAdmissionPageSchema = z5.strictObject({
455
- items: z5.array(contentAdmissionSchema),
456
- nextCursor: pageCursorSchema.nullable()
457
- });
458
- var contentQualificationDecisionSchema = z5.strictObject({
459
- kind: z5.enum(["accept", "reject", "review", "superseded"]),
460
- reason: z5.string().nullable()
461
- });
462
- var contentQualificationQuerySchema = z5.strictObject({
463
- quest: identifier,
464
- member: identifier.optional(),
465
- content: z5.string().min(1).max(256).optional(),
466
- cursor: pageCursorSchema.optional()
467
- });
468
- var contentQualificationSchema = z5.strictObject({
469
- quest: identifier,
470
- content: z5.string(),
471
- member: identifier,
472
- release: identifier,
473
- attempt: identifier,
474
- revision: identifier,
475
- observation: identifier,
476
- current: z5.boolean(),
477
- state: z5.enum([
478
- "pending",
479
- "qualified",
480
- "unqualified",
481
- "needs-review",
482
- "failed",
483
- "superseded",
484
- "stale",
485
- "blocked",
486
- "unavailable"
487
- ]),
488
- reason: z5.string().nullable(),
489
- reward: z5.strictObject({
490
- attempt: identifier.nullable(),
491
- completion: identifier.nullable(),
492
- state: z5.enum(["unresolved", "awarded", "excluded"])
493
- })
494
- });
495
- var contentQualificationPageSchema = z5.strictObject({
496
- items: z5.array(contentQualificationSchema),
497
- nextCursor: pageCursorSchema.nullable()
498
- });
499
- var contentMetricSchema = z5.enum([
500
- "likes",
501
- "replies",
502
- "reposts",
503
- "quotes",
504
- "views",
505
- "bookmarks"
506
- ]);
507
- var contentMetricsSchema = z5.partialRecord(
508
- contentMetricSchema,
509
- z5.number().int().safe().nonnegative()
510
- );
511
- var contentPerformancePolicySchema = z5.strictObject({
512
- metrics: z5.array(contentMetricSchema).min(1).max(6).refine(
513
- (values) => new Set(values).size === values.length,
514
- "Metrics must be unique"
515
- ),
516
- maxAgeMs: z5.number().int().positive().max(864e5).default(36e5)
517
- });
518
-
519
- // src/streaks.ts
520
- import { z as z6 } from "zod";
521
- var communityTimeZoneSchema = z6.string().min(1).max(100).refine((zone) => {
522
- try {
523
- if (/^[+-]/.test(zone)) {
524
- return false;
525
- }
526
- new Intl.DateTimeFormat("en", { timeZone: zone });
527
- return true;
528
- } catch {
529
- return false;
530
- }
531
- }, "Use an IANA community timezone, such as Europe/Budapest");
532
- var streakPolicySchema = z6.object({
533
- kind: z6.literal("streak"),
534
- days: z6.number().int().min(1).max(3650),
535
- timeZone: communityTimeZoneSchema
536
- }).strict();
537
- var streakProgressSchema = z6.object({
538
- goal: z6.number().int().positive(),
539
- current: z6.number().int().nonnegative(),
540
- best: z6.number().int().nonnegative(),
541
- today: z6.string(),
542
- todayQualified: z6.boolean(),
543
- timeZone: communityTimeZoneSchema,
544
- nextBoundary: z6.number().int(),
545
- pendingTimeZone: z6.object({
546
- timeZone: communityTimeZoneSchema,
547
- effectiveAt: z6.number().int()
548
- }).nullable(),
549
- days: z6.array(
550
- z6.object({
551
- day: z6.number().int(),
552
- date: z6.string(),
553
- timeZone: communityTimeZoneSchema,
554
- occurredAt: z6.number().int()
555
- })
556
- ),
557
- milestone: z6.discriminatedUnion("status", [
558
- z6.object({ status: z6.literal("pending") }),
559
- z6.object({
560
- status: z6.literal("awarded"),
561
- completion: z6.string(),
562
- achievedAt: z6.number().int()
563
- }),
564
- z6.object({
565
- status: z6.literal("budget-exhausted"),
566
- budget: z6.string(),
567
- achievedAt: z6.number().int()
568
- })
569
- ])
570
- });
571
-
572
- // src/tracker-triggers.ts
573
- import { z as z7 } from "zod";
574
- var timestamp3 = z7.number().int().safe().nonnegative().max(864e13);
575
- var count2 = z7.number().int().safe().nonnegative();
576
- var trackerTriggerModeSchema = z7.enum([
577
- "new-record",
578
- "new-observation",
579
- "data-changed"
580
- ]);
581
- function defaultTriggerMode(source) {
582
- return source === "x-search" ? "new-record" : "new-observation";
583
- }
584
- var trackerBoundSchema = z7.union([
585
- z7.number().finite(),
586
- z7.strictObject({ setting: z7.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/) })
587
- ]);
588
- var dataPath = z7.string().max(200).regex(
589
- /^[^.\s]+(\.[^.\s]+)*$/,
590
- "Use dot-separated keys, such as metrics.likes"
591
- );
592
- var trackerWhereSchema = z7.union([
593
- z7.strictObject({
594
- path: dataPath,
595
- equals: z7.union([z7.string().max(1e3), z7.number().finite(), z7.boolean()])
596
- }),
597
- z7.strictObject({
598
- path: dataPath,
599
- gt: trackerBoundSchema.optional(),
600
- gte: trackerBoundSchema.optional(),
601
- lt: trackerBoundSchema.optional(),
602
- lte: trackerBoundSchema.optional()
603
- }).refine(
604
- (where) => [where.gt, where.gte, where.lt, where.lte].some(
605
- (bound) => bound !== void 0
606
- ),
607
- "Compare with equals, gt, gte, lt or lte"
608
- )
609
- ]);
610
- var trackerTriggerPolicySchema = z7.strictObject({
611
- /** The tracker's authoring key; publication binds it to the tracker's stable ID. */
612
- tracker: identifier,
613
- source: z7.enum(["x-search", "custom"]),
614
- /** Which observations fire; absent means the source's default (`defaultTriggerMode`). */
615
- on: trackerTriggerModeSchema.optional(),
616
- where: trackerWhereSchema.optional(),
617
- /**
618
- * The record account the quest pays: `author`, `inReplyTo` for an X post, or a named account of
619
- * a custom record. Relay attributes it through verified links; evaluators cannot redirect it.
620
- * Releases published before account roles store `"replied-to"` for `inReplyTo`.
621
- */
622
- beneficiary: z7.union([accountRoleSchema, z7.literal("replied-to")])
623
- });
624
- function triggerMode(policy) {
625
- return policy.on ?? defaultTriggerMode(policy.source);
626
- }
627
- function beneficiaryRole(policy) {
628
- return policy.beneficiary === "replied-to" ? "inReplyTo" : policy.beneficiary;
629
- }
630
- var xLink = {
631
- issuer: z7.string().min(1),
632
- /** The account's stable user ID. */
633
- subject: z7.string().min(1).max(256),
634
- /** The member's account selection revision. */
635
- revision: count2,
636
- /** When the member linked the account; null when unknown. */
637
- linkedAt: timestamp3.nullable()
638
- };
639
- var trackerAttributionSchema = z7.strictObject({
640
- member: identifier,
641
- capturedAt: timestamp3,
642
- account: z7.discriminatedUnion("provider", [
643
- z7.strictObject({
644
- provider: z7.literal("wallet"),
645
- /** Canonical CAIP-10 account ID, as the record names it. */
646
- id: z7.string().min(5).max(256),
647
- /** The wallet link's revision. */
648
- revision: count2,
649
- /** When the member verified the wallet. */
650
- linkedAt: timestamp3.nullable()
651
- }),
652
- z7.strictObject({ provider: z7.literal("x"), ...xLink }),
653
- z7.strictObject({ provider: z7.literal("discord"), ...xLink }),
654
- z7.strictObject({
655
- provider: z7.literal("member"),
656
- /** The member ID the record names. */
657
- id: identifier
658
- })
659
- ])
660
- });
661
- var trackerTriggerRecordSchema = z7.strictObject({
662
- id: z7.string().min(1).max(256),
663
- source: z7.string(),
664
- occurredAt: timestamp3,
665
- observedAt: timestamp3,
666
- firstSeenAt: timestamp3,
667
- author: z7.strictObject({
668
- id: z7.string().min(1).max(256),
669
- verified: z7.boolean().nullable(),
670
- kind: identityKindSchema.optional()
671
- }).nullable(),
672
- accounts: z7.record(accountRoleSchema, trackerAccountSchema).optional(),
673
- data: z7.record(z7.string(), z7.json()),
674
- removed: z7.boolean()
675
- });
676
- var trackerTriggerContextSchema = z7.strictObject({
677
- /** The tracker's stable ID. */
678
- tracker: identifier,
679
- /** The tracker's authoring key. */
680
- key: identifier,
681
- /**
682
- * The record account the attempt pays, as the quest's release names it. Releases published
683
- * before account roles name `inReplyTo` `"replied-to"`, which their bundled evaluators expect.
684
- */
685
- beneficiary: z7.union([accountRoleSchema, z7.literal("replied-to")]),
686
- record: trackerTriggerRecordSchema,
687
- /** The captured X post of this observation; null for custom trackers. */
688
- x: z7.strictObject({
689
- evidence: trackerEvidenceSchema,
690
- content: xContentBodySchema
691
- }).nullable(),
692
- attribution: trackerAttributionSchema
693
- });
694
-
695
- // src/observations.ts
696
- import { z as z8 } from "zod";
697
- var name = z8.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,199}$/);
698
- var observationInputSchema = z8.object({
699
- id: name,
700
- source: name,
701
- type: name,
702
- member: identifier,
703
- actor: z8.object({ provider: identifier, subject: z8.string().min(1).max(200) }).strict().optional(),
704
- occurredAt: z8.number().int().nonnegative().max(864e13),
705
- data: z8.record(z8.string(), z8.json())
706
- }).strict().refine(
707
- (value) => JSON.stringify(value.data).length <= 32768,
708
- "Observation data exceeds 32 KB"
709
- );
710
- var observationSchema = observationInputSchema.safeExtend({
711
- receivedAt: z8.number().int().nonnegative()
712
- });
713
- var observationTriggerSchema = z8.object({ source: name, type: name }).strict();
714
- var completionPolicySchema = z8.discriminatedUnion("kind", [
715
- streakPolicySchema,
716
- z8.object({ kind: z8.literal("once") }).strict(),
717
- z8.object({ kind: z8.literal("keyed") }).strict()
718
- ]);
719
- var completionKeySchema = z8.string().min(1).max(500);
720
- var budgetSchema = z8.object({
721
- id: name,
722
- scope: z8.enum(["member", "project"]),
723
- /**
724
- * `"day"` buckets by UTC date and `"week"` by ISO week (UTC, weeks start on Monday), both of
725
- * the attempt's eligibility time; `"lifetime"` never resets.
726
- */
727
- period: z8.enum(["lifetime", "day", "week"]),
728
- limit: z8.number().int().positive().max(Number.MAX_SAFE_INTEGER),
729
- cost: z8.union([
730
- z8.number().int().positive().max(Number.MAX_SAFE_INTEGER),
731
- z8.object({ balance: name }).strict()
732
- ])
733
- }).strict();
734
- var observationReceiptSchema = z8.object({
735
- id: name,
736
- source: name,
737
- attempts: z8.array(z8.string()),
738
- receivedAt: z8.number()
739
- });
740
- var discordReactionSchema = z8.object({
741
- guildId: z8.string(),
742
- channelId: z8.string(),
743
- messageId: z8.string(),
744
- userId: z8.string(),
745
- messageAuthorId: z8.string().nullable().default(null),
746
- actorRoles: z8.array(z8.string()).default([]),
747
- emoji: z8.object({ id: z8.string().nullable(), name: z8.string() }),
748
- messagePublishedAt: z8.number()
749
- }).strict();
750
- var discordMessageSchema = z8.object({
751
- guildId: z8.string(),
752
- channelId: z8.string(),
753
- messageId: z8.string(),
754
- userId: z8.string(),
755
- content: z8.string().nullable(),
756
- replyTo: z8.string().nullable(),
757
- publishedAt: z8.number()
758
- }).strict();
759
-
760
- // src/integrations.ts
761
- import { z as z9 } from "zod";
762
- var integrationProviderSchema = z9.enum(["discord"]);
763
- var discordServerSchema = z9.object({
764
- id: z9.string().regex(/^[0-9]{1,20}$/),
765
- name: z9.string().min(1),
766
- icon: z9.string().nullable()
767
- });
768
- var projectIntegrationSchema = z9.object({
769
- provider: integrationProviderSchema,
770
- configured: z9.boolean(),
771
- status: z9.enum(["disconnected", "ready", "attention"]),
772
- revision: z9.number().int().nonnegative(),
773
- server: discordServerSchema.nullable(),
774
- issue: z9.string().nullable(),
775
- connectedAt: z9.number().default(0)
776
- });
777
-
778
- // src/submission-input.ts
779
- import { z as z10 } from "zod";
780
- var textOptionsSchema = z10.object({
781
- required: z10.boolean().default(true),
782
- minLength: z10.number().int().min(0).max(1e4).default(1),
783
- maxLength: z10.number().int().min(1).max(1e4).default(1e4)
784
- }).strict().refine(
785
- (v) => v.minLength <= v.maxLength,
786
- "minLength must not exceed maxLength"
787
- );
788
- var hostSchema = z10.string().min(1).max(253).refine((host) => {
789
- if (!/^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/i.test(host) || host.includes("..")) {
790
- return false;
791
- }
792
- try {
793
- const url = new URL(`https://${host}`);
794
- return url.hostname === host.toLowerCase() && !url.port && !url.username && !url.password && url.pathname === "/" && !url.search && !url.hash;
795
- } catch {
796
- return false;
797
- }
798
- }, "Use a hostname without a scheme, path, port, or wildcard");
799
- var urlOptionsSchema = z10.object({
800
- required: z10.boolean().default(true),
801
- allowedHosts: z10.array(hostSchema).min(1).max(100).optional()
802
- }).strict();
803
- var textEvidenceSchema = z10.object({ kind: z10.literal("text"), value: z10.string().max(1e4) }).strict();
804
- var urlEvidenceSchema = z10.object({ kind: z10.literal("url"), value: z10.string().max(2048) }).strict();
805
- var valueEvidenceSchema = z10.discriminatedUnion("kind", [
806
- textEvidenceSchema,
807
- urlEvidenceSchema
808
- ]);
809
- function validateSubmissionValue(input, contract) {
810
- const maximum = input.kind === "text" ? 1e4 : 2048;
811
- if (input.value.length > maximum) {
812
- return `Enter no more than ${maximum} characters`;
813
- }
814
- if (input.kind !== contract.input) {
815
- return `This quest requires ${contract.input} input`;
816
- }
817
- if (!input.value.trim()) {
818
- return contract.constraints.required ? "This field is required" : null;
819
- }
820
- if (contract.input === "text") {
821
- if (input.value.length < contract.constraints.minLength) {
822
- return `Enter at least ${contract.constraints.minLength} characters`;
823
- }
824
- if (input.value.length > contract.constraints.maxLength) {
825
- return `Enter no more than ${contract.constraints.maxLength} characters`;
826
- }
827
- return null;
828
- }
829
- const url = parseHttpUrl(input.value);
830
- if (!url) {
831
- return "Enter a valid HTTP or HTTPS URL without credentials";
832
- }
833
- if (contract.constraints.allowedHosts && !contract.constraints.allowedHosts.some(
834
- (host) => host.toLowerCase() === url.hostname.toLowerCase()
835
- )) {
836
- return `Use a URL hosted on: ${contract.constraints.allowedHosts.join(", ")}`;
837
- }
838
- return null;
839
- }
840
- function parseHttpUrl(value) {
841
- if (value !== value.trim() || /[\\\s]/.test(value) || !/^https?:\/\//i.test(value)) {
842
- return null;
843
- }
844
- try {
845
- const url = new URL(value);
846
- return ["http:", "https:"].includes(url.protocol) && !url.username && !url.password ? url : null;
847
- } catch {
848
- return null;
849
- }
850
- }
851
- function xPostId(value) {
852
- const url = parseHttpUrl(value);
853
- if (!url || url.port || ![
854
- "x.com",
855
- "www.x.com",
856
- "twitter.com",
857
- "www.twitter.com",
858
- "mobile.twitter.com"
859
- ].includes(url.hostname)) {
860
- return null;
861
- }
862
- return /^\/(?:[A-Za-z0-9_]+|i\/web)\/status\/([0-9]{1,20})\/?$/.exec(
863
- url.pathname
864
- )?.[1] ?? null;
865
- }
866
-
867
- // src/quiz.ts
868
- import { z as z11 } from "zod";
869
- var quizId = z11.string().regex(/^[a-zA-Z0-9_-]+$/).max(100);
870
- var quizChoiceSchema = z11.object({ id: quizId, label: z11.string().trim().min(1).max(500) }).strict();
871
- var quizQuestionSchema = z11.object({
872
- id: quizId,
873
- prompt: z11.string().trim().min(1).max(1e3),
874
- choices: z11.array(quizChoiceSchema).min(2).max(8).refine(
875
- (choices) => new Set(choices.map((choice) => choice.id)).size === choices.length,
876
- "Choice IDs must be unique"
877
- )
878
- }).strict();
879
- var quizQuestionsSchema = z11.array(quizQuestionSchema).min(1).max(20).refine(
880
- (questions) => new Set(questions.map((question) => question.id)).size === questions.length,
881
- "Question IDs must be unique"
882
- );
883
- var quizContentSchema = z11.array(
884
- quizQuestionSchema.extend({ correct: quizId }).refine(
885
- (question) => question.choices.some((choice) => choice.id === question.correct),
886
- "Choose a correct answer from the available choices"
887
- )
888
- ).min(1).max(20).refine(
889
- (questions) => new Set(questions.map((question) => question.id)).size === questions.length,
890
- "Question IDs must be unique"
891
- );
892
-
893
- // src/resources.ts
894
- import { z as z12 } from "zod";
895
- var channelSourceSchema = z12.object({
896
- provider: z12.literal("discord"),
897
- resource: z12.literal("channel"),
898
- types: z12.array(z12.enum(["text", "announcement"])).min(1)
899
- }).strict();
900
- var resourceSourceSchema = z12.union([
901
- z12.object({
902
- provider: z12.literal("domino"),
903
- resource: z12.literal("point-ledger")
904
- }).strict(),
905
- channelSourceSchema,
906
- z12.object({
907
- provider: z12.literal("discord"),
908
- resource: z12.literal("role"),
909
- assignable: z12.boolean().default(false)
910
- }).strict()
911
- ]);
912
- var resourceRequestSchema = z12.object({
913
- source: resourceSourceSchema,
914
- query: z12.string().max(100).optional(),
915
- cursor: z12.string().regex(/^\d{1,6}$/).optional(),
916
- ids: z12.array(z12.string().min(1).max(100)).max(50).optional()
917
- }).strict();
918
- var resourceOptionsSchema = z12.object({
919
- revision: z12.number().int(),
920
- options: z12.array(
921
- z12.object({
922
- id: z12.string(),
923
- label: z12.string(),
924
- description: z12.string().optional(),
925
- group: z12.string().optional(),
926
- disabledReason: z12.string().optional()
927
- })
928
- ),
929
- cursor: z12.string().nullable()
930
- });
931
-
932
- // src/settings.ts
933
- import { z as z14 } from "zod";
934
-
935
- // src/setting-values.ts
936
- import { z as z13 } from "zod";
937
- var settingInstant = z13.iso.datetime({ offset: true }).transform((value) => new Date(value).toISOString());
938
- var settingResourceId = z13.union([
939
- z13.literal(""),
940
- z13.string().regex(/^\S{1,200}$/)
941
- ]);
942
-
943
- // src/settings.ts
944
- var base = { label: z14.string().min(1), description: z14.string().optional() };
945
- var settingFieldSchema = z14.discriminatedUnion("kind", [
946
- z14.object({ ...base, kind: z14.literal("point-ledger"), default: identifier }).strict(),
947
- z14.object({ ...base, kind: z14.literal("datetime"), default: settingInstant }).strict(),
948
- z14.object({
949
- ...base,
950
- kind: z14.literal("resource"),
951
- default: settingResourceId,
952
- source: resourceSourceSchema
953
- }).strict(),
954
- z14.object({ ...base, kind: z14.literal("quiz"), default: quizContentSchema }).strict(),
955
- z14.object({
956
- ...base,
957
- kind: z14.literal("text"),
958
- default: z14.string(),
959
- minLength: z14.number().int().nonnegative(),
960
- maxLength: z14.number().int().positive(),
961
- multiline: z14.boolean()
962
- }).strict(),
963
- z14.object({
964
- ...base,
965
- kind: z14.literal("integer"),
966
- default: z14.number().int(),
967
- min: z14.number().int(),
968
- max: z14.number().int()
969
- }).strict(),
970
- z14.object({ ...base, kind: z14.literal("boolean"), default: z14.boolean() }).strict(),
971
- z14.object({
972
- ...base,
973
- kind: z14.literal("choice"),
974
- default: z14.string(),
975
- options: z14.array(z14.string().min(1)).min(1)
976
- }).strict()
977
- ]);
978
- var settingsFieldsSchema = z14.record(
979
- z14.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/),
980
- settingFieldSchema
981
- );
982
- var settingsValuesSchema = z14.record(
983
- z14.string(),
984
- z14.union([z14.string(), z14.number().finite(), z14.boolean(), quizContentSchema])
985
- );
986
- function parseSettings(fields, input) {
987
- const shape = {};
988
- for (const [key, field] of Object.entries(fields)) {
989
- switch (field.kind) {
990
- case "point-ledger":
991
- shape[key] = identifier.default(field.default);
992
- break;
993
- case "datetime":
994
- shape[key] = settingInstant.default(field.default);
995
- break;
996
- case "resource":
997
- shape[key] = settingResourceId.default(field.default);
998
- break;
999
- case "quiz":
1000
- shape[key] = quizContentSchema.default(field.default);
1001
- break;
1002
- case "text":
1003
- shape[key] = z14.string().min(field.minLength).max(field.maxLength).default(field.default);
1004
- break;
1005
- case "integer":
1006
- shape[key] = z14.number().int().min(field.min).max(field.max).default(field.default);
1007
- break;
1008
- case "boolean":
1009
- shape[key] = z14.boolean().default(field.default);
1010
- break;
1011
- case "choice":
1012
- shape[key] = z14.enum(field.options).default(field.default);
1013
- break;
1014
- }
1015
- }
1016
- return settingsValuesSchema.parse(z14.object(shape).strict().parse(input));
1017
- }
1018
- function missingResourceSettings(fields, values) {
1019
- return Object.entries(fields).filter(([key, field]) => field.kind === "resource" && !values[key]).map(([key]) => key);
1020
- }
1021
- function compatibleSettingKinds(previous, next) {
1022
- return previous.kind === next.kind || previous.kind === "text" && (next.kind === "resource" || next.kind === "datetime" || next.kind === "point-ledger");
1023
- }
1024
-
1025
- // src/schema.ts
1026
- import { z as z15 } from "zod";
1027
- var pointsRewardSchema = z15.object({
1028
- kind: z15.literal("points").default("points"),
1029
- balance: identifier,
1030
- amount: z15.number().int().min(0).max(1e4)
1031
- }).strict();
1032
- var tieredRewardDefinitionSchema = z15.object({
1033
- id: identifier,
1034
- title: z15.string().min(1).max(120),
1035
- tiers: z15.array(
1036
- z15.object({ id: identifier, title: z15.string().min(1).max(120) }).strict()
1037
- ).min(1).max(20).refine(
1038
- (tiers) => new Set(tiers.map((t) => t.id)).size === tiers.length,
1039
- "Tier IDs must be unique"
1040
- ),
1041
- inventory: z15.object({ kind: z15.literal("untracked") }).strict(),
1042
- fulfillment: z15.object({ kind: z15.literal("staff-handover") }).strict()
1043
- }).strict();
1044
- var tieredRewardReferenceSchema = z15.object({
1045
- id: identifier,
1046
- key: identifier.nullable()
1047
- });
1048
- var tierRewardSchema = z15.object({
1049
- kind: z15.literal("tier"),
1050
- reward: tieredRewardDefinitionSchema,
1051
- tier: identifier
1052
- }).strict().refine(
1053
- (value) => value.reward.tiers.some((t) => t.id === value.tier),
1054
- "Unknown reward tier"
1055
- );
1056
- var integrationRewardSchema = z15.object({
1057
- kind: z15.literal("integration"),
1058
- provider: z15.literal("discord"),
1059
- action: z15.literal("grant-role"),
1060
- roleId: z15.string().regex(/^[0-9]{1,20}$/)
1061
- }).strict();
1062
- var rewardSchema = z15.union([
1063
- pointsRewardSchema,
1064
- tierRewardSchema,
1065
- integrationRewardSchema
1066
- ]);
1067
- function rewardKey(reward) {
1068
- if (reward.kind === "integration") {
1069
- return `integration:${reward.provider}:${reward.action}:${reward.roleId}`;
1070
- }
1071
- return reward.kind === "points" ? "points:" + reward.balance : "tier:" + reward.reward.id;
1072
- }
1073
- var triggerSchema = z15.union([
1074
- z15.object({
1075
- kind: z15.literal("manual"),
1076
- input: z15.literal("text"),
1077
- constraints: textOptionsSchema,
1078
- actor: z15.enum(["member", "staff"]).optional()
1079
- }).strict(),
1080
- z15.object({
1081
- kind: z15.literal("manual"),
1082
- input: z15.literal("url"),
1083
- constraints: urlOptionsSchema,
1084
- actor: z15.enum(["member", "staff"]).optional()
1085
- }).strict(),
1086
- z15.object({
1087
- kind: z15.literal("manual"),
1088
- input: z15.enum(["photo", "quiz", "none"]),
1089
- actor: z15.enum(["member", "staff"]).optional()
1090
- }).strict(),
1091
- z15.object({
1092
- kind: z15.literal("automatic"),
1093
- observation: observationTriggerSchema.optional(),
1094
- content: contentPolicySchema.optional(),
1095
- tracker: trackerTriggerPolicySchema.optional()
1096
- }).strict().refine(
1097
- (value) => [value.observation, value.content, value.tracker].filter(Boolean).length <= 1,
1098
- "Choose one automatic trigger source"
1099
- )
1100
- ]);
1101
- var prerequisiteSchema = z15.object({ quest: identifier });
1102
- var photoResultSchema = z15.object({
1103
- kind: z15.enum(["pass", "fail", "unclear"]),
1104
- reason: z15.string().min(1).max(2e3)
1105
- }).strict();
1106
- var textReviewInputSchema = z15.object({
1107
- text: z15.string().min(1).max(16e3).refine((value) => value.trim().length > 0, "Text must not be blank"),
1108
- criteria: z15.string().trim().min(1).max(2e3)
1109
- }).strict();
1110
- var textResultSchema = photoResultSchema;
1111
- var decisionSchema = z15.discriminatedUnion("kind", [
1112
- z15.object({
1113
- kind: z15.literal("accept"),
1114
- rewards: z15.array(rewardSchema).max(10),
1115
- completionKey: completionKeySchema.optional()
1116
- }).strict(),
1117
- z15.object({
1118
- kind: z15.literal("reject"),
1119
- reason: z15.string().min(1).max(2e3),
1120
- /** The evaluator asked for human review, but review is off for the quest, so this is a reject. */
1121
- requestedReview: z15.literal(true).optional()
1122
- }).strict(),
1123
- z15.object({
1124
- kind: z15.literal("review"),
1125
- reason: z15.string().min(1).max(2e3),
1126
- rewards: z15.array(rewardSchema).max(10).optional(),
1127
- completionKey: completionKeySchema.optional()
1128
- }).strict()
1129
- ]);
1130
- var reviewModeSchema = z15.enum(["workers-ai"]);
1131
- var storedReviewModeSchema = z15.enum([
1132
- "fixture-pass",
1133
- "fixture-fail",
1134
- "fixture-unclear",
1135
- "fixture-error",
1136
- "workers-ai"
1137
- ]);
1138
- var rewardBundleSchema = z15.array(rewardSchema).max(10).refine(
1139
- (rewards) => new Set(rewards.map(rewardKey)).size === rewards.length,
1140
- "Use one entry per balance or shared reward"
1141
- );
1142
- var mediaUrlSchema = z15.string().max(2e3).refine((value) => {
1143
- if (/^\/(?!\/)[^\\\s]*$/.test(value)) {
1144
- return true;
1145
- }
1146
- try {
1147
- return new URL(value).protocol === "https:";
1148
- } catch {
1149
- return false;
1150
- }
1151
- }, "Use an HTTPS URL or a same-site path beginning with /");
1152
- var questPresentationSchema = z15.object({
1153
- quiz: quizQuestionsSchema.optional(),
1154
- instructions: z15.string().max(4e3).optional(),
1155
- video: z15.object({
1156
- url: mediaUrlSchema,
1157
- poster: mediaUrlSchema.optional(),
1158
- captions: z15.object({
1159
- url: mediaUrlSchema,
1160
- language: z15.string().min(2).max(20),
1161
- label: z15.string().min(1).max(80)
1162
- }).strict().optional()
1163
- }).strict().optional()
1164
- }).strict();
1165
- var questProfileSchema = z15.object({ visible: z15.boolean() }).strict();
1166
- var questDescriptionSchema = z15.object({
1167
- quest: identifier,
1168
- runtimeVersion: z15.union([z15.literal(1), z15.literal(2)]).default(1),
1169
- title: z15.string().min(1).max(120),
1170
- presentation: questPresentationSchema.default({}),
1171
- integrations: z15.array(integrationProviderSchema).max(10).default([]),
1172
- fields: settingsFieldsSchema,
1173
- values: settingsValuesSchema,
1174
- rewards: rewardBundleSchema,
1175
- humanReview: z15.boolean(),
1176
- trigger: triggerSchema,
1177
- performance: contentPerformancePolicySchema.optional(),
1178
- requires: z15.array(prerequisiteSchema).max(30).default([]),
1179
- completion: completionPolicySchema,
1180
- visibility: z15.enum(["visible", "hidden"]).default("visible"),
1181
- /**
1182
- * Whether completions show on participant profiles (`/v1/profiles/:id/completions`). Absent
1183
- * is hidden. Optional, not defaulted: releases carry the key only when the author sets it, so
1184
- * clients and pods that predate it (strict release schemas) still read every other release.
1185
- */
1186
- profile: questProfileSchema.optional(),
1187
- budgets: z15.array(budgetSchema).max(20).default([])
1188
- }).strict();
1189
- var artifactSchema = z15.object({ code: z15.string().min(1).max(1e6) }).strict();
1190
- var releaseSchema = artifactSchema.extend({
1191
- settings: settingsValuesSchema,
1192
- provider: reviewModeSchema,
1193
- expectedRelease: identifier.nullable().optional(),
1194
- settingRenames: z15.record(z15.string(), z15.string()).optional()
1195
- }).strict();
1196
- var batchReleaseSchema = z15.object({ releases: z15.array(releaseSchema).min(1).max(50) }).strict();
1197
- var questSettingsInputSchema = z15.object({
1198
- quest: identifier,
1199
- expectedRelease: identifier,
1200
- set: settingsValuesSchema,
1201
- reset: z15.array(z15.string())
1202
- }).strict();
1203
- var storedReleaseSchema = questDescriptionSchema.extend({
1204
- key: identifier.optional(),
1205
- code: z15.string(),
1206
- provider: storedReviewModeSchema,
1207
- id: identifier,
1208
- createdAt: z15.number(),
1209
- legacy: z15.boolean().default(false),
1210
- origin: z15.object({ typeVersion: identifier }).strict().optional(),
1211
- lifecycle: z15.enum(["active", "paused", "archived"]).default("active"),
1212
- configuration: z15.object({
1213
- defaults: settingsValuesSchema,
1214
- overrides: settingsValuesSchema,
1215
- preserved: z15.array(z15.string())
1216
- }).strict().optional()
1217
- });
1218
- var legacyReleaseSchema = z15.object({
1219
- quest: identifier,
1220
- title: z15.string(),
1221
- criteria: z15.string(),
1222
- humanReview: z15.boolean(),
1223
- rewards: rewardBundleSchema,
1224
- code: z15.string(),
1225
- provider: storedReviewModeSchema,
1226
- id: identifier,
1227
- createdAt: z15.number()
1228
- }).transform((r) => {
1229
- const { criteria, ...stored } = r;
1230
- return storedReleaseSchema.parse({
1231
- ...stored,
1232
- fields: {},
1233
- values: { criteria, humanReview: r.humanReview },
1234
- trigger: { kind: "manual", input: "photo" },
1235
- completion: { kind: "once" },
1236
- legacy: true
1237
- });
1238
- });
1239
- var publishedReleaseSchema = z15.union([
1240
- storedReleaseSchema,
1241
- legacyReleaseSchema
1242
- ]);
1243
- var templateSchema = z15.object({
1244
- code: z15.string(),
1245
- definition: questDescriptionSchema
1246
- });
1247
- var quizAnswersSchema = z15.record(identifier, identifier).refine(
1248
- (answers) => Object.keys(answers).length > 0 && Object.keys(answers).length <= 50,
1249
- "Provide between 1 and 50 answers"
1250
- ).transform(
1251
- (answers) => Object.fromEntries(
1252
- Object.entries(answers).sort(([a], [b]) => a.localeCompare(b))
1253
- )
1254
- );
1255
- var quizEvidenceSchema = z15.object({
1256
- kind: z15.literal("quiz"),
1257
- release: identifier.optional(),
1258
- answers: quizAnswersSchema
1259
- }).strict();
1260
- var submissionEvidenceSchema = z15.union([
1261
- quizEvidenceSchema,
1262
- textEvidenceSchema,
1263
- urlEvidenceSchema
1264
- ]);
1265
- var submitSchema = z15.object({
1266
- actionId: identifier,
1267
- quest: identifier,
1268
- member: identifier,
1269
- evidence: identifier.optional(),
1270
- input: submissionEvidenceSchema.optional(),
1271
- release: identifier.optional(),
1272
- faultAfterReview: z15.boolean().optional()
1273
- }).strict();
1274
- var attemptSchema = z15.object({
1275
- id: identifier,
1276
- release: identifier,
1277
- quest: identifier,
1278
- member: identifier,
1279
- evidence: identifier.nullable(),
1280
- input: submissionEvidenceSchema.optional(),
1281
- status: z15.enum([
1282
- "queued",
1283
- "evaluating",
1284
- "accepted",
1285
- "progressed",
1286
- "rejected",
1287
- "needs-review",
1288
- "failed"
1289
- ]),
1290
- reason: z15.string().nullable(),
1291
- retries: z15.number(),
1292
- generation: z15.number(),
1293
- completion: z15.string().nullable(),
1294
- reviewRewards: rewardBundleSchema.nullable().default(null),
1295
- /**
1296
- * The evaluator asked for human review of a quest with review off, so Domino rejected the attempt
1297
- * with the evaluator's reason. Only set on a rejected attempt.
1298
- */
1299
- requestedReview: z15.boolean().default(false),
1300
- createdAt: z15.number()
1301
- });
1302
- var eventSchema = z15.object({
1303
- id: z15.number(),
1304
- attempt: z15.string().nullable(),
1305
- kind: z15.string(),
1306
- detail: z15.string(),
1307
- actor: z15.string().nullable().default(null),
1308
- at: z15.number()
1309
- });
1310
- var pickupSelectionSchema = z15.object({
1311
- item: identifier,
1312
- revision: z15.number().int().nonnegative()
1313
- }).strict();
1314
- var pickupAllocationSchema = z15.object({
1315
- item: identifier,
1316
- label: z15.string().min(1).max(80)
1317
- }).strict();
1318
- var pickupPolicySchema = z15.discriminatedUnion("kind", [
1319
- z15.object({ kind: z15.literal("untracked") }).strict(),
1320
- z15.object({
1321
- kind: z15.literal("at-pickup"),
1322
- tiers: z15.array(
1323
- z15.object({
1324
- tier: identifier,
1325
- variants: z15.array(pickupAllocationSchema).min(1).max(100)
1326
- }).strict()
1327
- ).min(1).max(100)
1328
- }).strict()
1329
- ]);
1330
- var pickupCatalogSchema = z15.object({
1331
- reward: tieredRewardDefinitionSchema,
1332
- revision: z15.number().int().nonnegative(),
1333
- policy: pickupPolicySchema
1334
- });
1335
- var pickupAvailabilitySchema = z15.discriminatedUnion("kind", [
1336
- z15.object({ kind: z15.literal("untracked") }).strict(),
1337
- z15.object({
1338
- kind: z15.literal("at-pickup"),
1339
- revision: z15.number().int().nonnegative(),
1340
- variants: z15.array(
1341
- pickupAllocationSchema.extend({
1342
- available: z15.number().int().nonnegative()
1343
- })
1344
- )
1345
- }).strict()
1346
- ]);
1347
- var configurePickupSchema = z15.object({
1348
- reward: identifier,
1349
- revision: z15.number().int().nonnegative(),
1350
- actionId: identifier,
1351
- policy: z15.discriminatedUnion("kind", [
1352
- z15.object({ kind: z15.literal("untracked") }).strict(),
1353
- z15.object({
1354
- kind: z15.literal("at-pickup"),
1355
- tiers: z15.array(
1356
- z15.object({
1357
- tier: identifier,
1358
- variants: z15.array(
1359
- pickupAllocationSchema.extend({
1360
- item: identifier.optional()
1361
- })
1362
- ).min(1).max(100)
1363
- }).strict()
1364
- ).min(1).max(100)
1365
- }).strict()
1366
- ])
1367
- }).strict();
1368
- var entitlementBase = {
1369
- id: identifier,
1370
- member: identifier,
1371
- reward: tieredRewardDefinitionSchema,
1372
- earnedTier: identifier,
1373
- tier: identifier,
1374
- revision: z15.number().int().positive()
1375
- };
1376
- var entitlementSchema = z15.discriminatedUnion("status", [
1377
- z15.object({ ...entitlementBase, status: z15.literal("available") }).strict(),
1378
- z15.object({
1379
- ...entitlementBase,
1380
- status: z15.literal("handing-over"),
1381
- handover: identifier,
1382
- startedAt: z15.number(),
1383
- allocation: pickupAllocationSchema.optional()
1384
- }).strict(),
1385
- z15.object({
1386
- ...entitlementBase,
1387
- status: z15.literal("collected"),
1388
- handover: identifier,
1389
- startedAt: z15.number(),
1390
- allocation: pickupAllocationSchema.optional(),
1391
- collectedAt: z15.number()
1392
- }).strict()
1393
- ]);
1394
- var beginHandoverSchema = z15.object({
1395
- actionId: identifier,
1396
- revision: z15.number().int().positive(),
1397
- selection: pickupSelectionSchema.optional()
1398
- }).strict();
1399
- var confirmHandoverSchema = z15.object({ actionId: identifier, handover: identifier }).strict();
1400
- var completionRecordSchema = z15.object({
1401
- key: z15.string().default("once"),
1402
- id: identifier,
1403
- quest: identifier,
1404
- member: identifier
1405
- });
1406
- var questAvailabilitySchema = z15.discriminatedUnion("kind", [
1407
- z15.object({
1408
- kind: z15.literal("available"),
1409
- input: z15.enum(["photo", "quiz", "none", "text", "url"])
1410
- }).strict(),
1411
- z15.object({ kind: z15.literal("completed") }).strict(),
1412
- z15.object({
1413
- kind: z15.literal("locked"),
1414
- missing: z15.array(z15.object({ quest: identifier, title: z15.string() })).min(1)
1415
- }).strict(),
1416
- z15.object({ kind: z15.literal("staff-required") }).strict(),
1417
- z15.object({
1418
- kind: z15.literal("automatic"),
1419
- observation: observationTriggerSchema.optional()
1420
- }).strict(),
1421
- z15.object({ kind: z15.literal("checking"), attempt: identifier }).strict(),
1422
- z15.object({ kind: z15.literal("needs-review"), attempt: identifier }).strict(),
1423
- z15.object({ kind: z15.literal("retryable"), attempt: identifier }).strict()
1424
- ]);
1425
- var memberProgressSchema = z15.object({
1426
- member: identifier,
1427
- quests: z15.array(
1428
- z15.object({
1429
- quest: identifier,
1430
- key: identifier.optional(),
1431
- release: identifier.optional(),
1432
- title: z15.string(),
1433
- presentation: questPresentationSchema.default({}),
1434
- connections: z15.array(authProviderSchema).default([]),
1435
- trigger: triggerSchema,
1436
- availability: questAvailabilitySchema,
1437
- completed: z15.boolean(),
1438
- completion: completionPolicySchema.default({ kind: "once" }),
1439
- streak: streakProgressSchema.nullable().optional(),
1440
- completionCount: z15.number().int().nonnegative().default(0),
1441
- visibility: z15.enum(["visible", "hidden"]).default("visible"),
1442
- missing: z15.array(z15.object({ quest: identifier, title: z15.string() })),
1443
- attempt: attemptSchema.nullable()
1444
- })
1445
- ),
1446
- entitlements: z15.array(entitlementSchema)
1447
- });
1448
- var snapshotSchema = z15.object({
1449
- releases: z15.array(publishedReleaseSchema),
1450
- completions: z15.array(completionRecordSchema),
1451
- entitlements: z15.array(entitlementSchema),
1452
- attempts: z15.array(attemptSchema),
1453
- balances: z15.array(
1454
- z15.object({
1455
- member: z15.string(),
1456
- balance: z15.string(),
1457
- earned: z15.number(),
1458
- held: z15.number(),
1459
- available: z15.number()
1460
- })
1461
- ),
1462
- events: z15.array(eventSchema)
1463
- });
1464
- var evidenceSchema = z15.object({
1465
- id: identifier,
1466
- member: identifier,
1467
- type: z15.enum(["image/jpeg", "image/png"]),
1468
- size: z15.number()
1469
- });
1470
- var errorSchema = z15.object({
1471
- error: z15.string(),
1472
- code: z15.string().optional(),
1473
- missing: z15.array(z15.object({ quest: identifier, title: z15.string() })).optional()
1474
- });
1475
- var staffDecisionSchema = z15.object({
1476
- actionId: identifier,
1477
- generation: z15.number().int().nonnegative(),
1478
- decision: z15.enum(["accept", "reject"]),
1479
- reason: z15.string().trim().min(1).max(2e3)
1480
- }).strict();
1481
- var stockSchema = z15.object({ item: identifier, quantity: z15.number().int().min(0).max(1e4) }).strict();
1482
- var reservationSchema = z15.object({
1483
- actionId: identifier,
1484
- member: identifier,
1485
- item: identifier,
1486
- balance: identifier,
1487
- price: z15.number().int().positive().max(1e4)
1488
- }).strict();
1489
- var pageOptions = {
1490
- limit: z15.number().int().min(1).max(100).default(25),
1491
- cursor: z15.string().min(1).max(4096).optional()
1492
- };
1493
- var reviewListSchema = z15.object({
1494
- ...pageOptions,
1495
- member: identifier.optional(),
1496
- quest: identifier.optional()
1497
- }).strict();
1498
- var memberListSchema = z15.object({
1499
- ...pageOptions,
1500
- prefix: identifier.optional()
1501
- }).strict();
1502
- var reviewItemSchema = z15.object({
1503
- attempt: attemptSchema,
1504
- title: z15.string(),
1505
- checks: z15.array(
1506
- z15.object({ criteria: z15.string(), result: photoResultSchema })
1507
- )
1508
- });
1509
- var reviewPageSchema = z15.object({
1510
- items: z15.array(reviewItemSchema).max(100),
1511
- nextCursor: z15.string().nullable()
1512
- });
1513
- var memberPageSchema = z15.object({
1514
- items: z15.array(z15.object({ member: identifier })).max(100),
1515
- nextCursor: z15.string().nullable()
1516
- });
1517
- var createStockItemSchema = z15.object({ actionId: identifier, name: z15.string().trim().min(1).max(80) }).strict();
1518
- var stockItemSchema = z15.object({ id: identifier, name: z15.string() });
1519
- var contentPerformanceSnapshotSchema = z15.strictObject({
1520
- contentAttempt: identifier,
1521
- observation: identifier,
1522
- observedAt: z15.number().int().safe().nonnegative(),
1523
- metrics: contentMetricsSchema,
1524
- rewards: rewardBundleSchema
1525
- });
1526
- var contentPerformanceQuerySchema = contentQualificationQuerySchema.extend({
1527
- content: z15.string().min(1).max(256)
1528
- });
1529
- var contentPerformancePageSchema = z15.strictObject({
1530
- current: z15.strictObject({
1531
- state: z15.enum([
1532
- "content-pending",
1533
- "content-unqualified",
1534
- "waiting",
1535
- "pending",
1536
- "qualified",
1537
- "unqualified",
1538
- "needs-review",
1539
- "failed",
1540
- "superseded"
1541
- ]),
1542
- reason: z15.string().nullable(),
1543
- contentAttempt: identifier,
1544
- attempt: identifier.nullable(),
1545
- reward: contentQualificationSchema.shape.reward
1546
- }),
1547
- items: z15.array(
1548
- z15.strictObject({
1549
- attempt: identifier,
1550
- contentAttempt: identifier,
1551
- observation: identifier,
1552
- observedAt: z15.number(),
1553
- metrics: contentMetricsSchema,
1554
- state: z15.enum([
1555
- "pending",
1556
- "qualified",
1557
- "unqualified",
1558
- "needs-review",
1559
- "failed",
1560
- "superseded"
1561
- ]),
1562
- reason: z15.string().nullable()
1563
- })
1564
- ),
1565
- nextCursor: pageCursorSchema.nullable()
1566
- });
1567
-
1568
- export {
1569
- authProviderSchema,
1570
- accountConnectionSchema,
1571
- discordMemberInputSchema,
1572
- discordMessageInputSchema,
1573
- discordMemberSchema,
1574
- identifier,
1575
- pageCursorSchema,
1576
- pageQuerySchema,
1577
- xTweetSchema,
1578
- xContentBodySchema,
1579
- trackerContentQuerySchema,
1580
- trackerContentReadSchema,
1581
- trackerEvidenceSchema,
1582
- trackerContentSchema,
1583
- identityKindSchema,
1584
- accountRoleSchema,
1585
- xAccountRoles,
1586
- xSearchSourceSchema,
1587
- customSourceSchema,
1588
- trackerSourceSchema,
1589
- sourceIdentities,
1590
- trackerDefinitionSchema,
1591
- trackerArtifactSchema,
1592
- publishedTrackerSchema,
1593
- trackerStatusSchema,
1594
- trackerControlSchema,
1595
- trackerAccountSchema,
1596
- trackerRecordInputSchema,
1597
- trackerRecordSchema,
1598
- trackerIngestSchema,
1599
- trackerIngestResultSchema,
1600
- trackerSkipCodes,
1601
- trackerOutcomeSchema,
1602
- trackerOutcomeQuerySchema,
1603
- trackerOutcomePageSchema,
1604
- trackerOutcomeRetrySchema,
1605
- trackerQuerySchema,
1606
- trackerPageSchema,
1607
- trackerSummarySchema,
1608
- trackerPreviewLimits,
1609
- trackerPreviewInputSchema,
1610
- trackerPreviewSchema,
1611
- contentPolicySchema,
1612
- admittedContentSchema,
1613
- contentEnrollmentInputSchema,
1614
- contentEnrollmentSchema,
1615
- contentReleaseInputSchema,
1616
- contentAdmissionSchema,
1617
- contentAdmissionQuerySchema,
1618
- contentAdmissionPageSchema,
1619
- contentQualificationDecisionSchema,
1620
- contentQualificationQuerySchema,
1621
- contentQualificationSchema,
1622
- contentQualificationPageSchema,
1623
- contentMetricSchema,
1624
- contentMetricsSchema,
1625
- contentPerformancePolicySchema,
1626
- communityTimeZoneSchema,
1627
- streakPolicySchema,
1628
- streakProgressSchema,
1629
- trackerTriggerModeSchema,
1630
- defaultTriggerMode,
1631
- trackerBoundSchema,
1632
- trackerWhereSchema,
1633
- trackerTriggerPolicySchema,
1634
- triggerMode,
1635
- beneficiaryRole,
1636
- trackerAttributionSchema,
1637
- trackerTriggerRecordSchema,
1638
- trackerTriggerContextSchema,
1639
- observationInputSchema,
1640
- observationSchema,
1641
- observationTriggerSchema,
1642
- completionPolicySchema,
1643
- completionKeySchema,
1644
- budgetSchema,
1645
- observationReceiptSchema,
1646
- discordReactionSchema,
1647
- discordMessageSchema,
1648
- integrationProviderSchema,
1649
- discordServerSchema,
1650
- projectIntegrationSchema,
1651
- textOptionsSchema,
1652
- urlOptionsSchema,
1653
- textEvidenceSchema,
1654
- urlEvidenceSchema,
1655
- valueEvidenceSchema,
1656
- validateSubmissionValue,
1657
- xPostId,
1658
- quizChoiceSchema,
1659
- quizQuestionSchema,
1660
- quizQuestionsSchema,
1661
- quizContentSchema,
1662
- resourceSourceSchema,
1663
- resourceRequestSchema,
1664
- resourceOptionsSchema,
1665
- settingInstant,
1666
- settingResourceId,
1667
- settingFieldSchema,
1668
- settingsFieldsSchema,
1669
- settingsValuesSchema,
1670
- parseSettings,
1671
- missingResourceSettings,
1672
- compatibleSettingKinds,
1673
- pointsRewardSchema,
1674
- tieredRewardDefinitionSchema,
1675
- tieredRewardReferenceSchema,
1676
- tierRewardSchema,
1677
- integrationRewardSchema,
1678
- rewardSchema,
1679
- rewardKey,
1680
- triggerSchema,
1681
- prerequisiteSchema,
1682
- photoResultSchema,
1683
- textReviewInputSchema,
1684
- textResultSchema,
1685
- decisionSchema,
1686
- reviewModeSchema,
1687
- storedReviewModeSchema,
1688
- rewardBundleSchema,
1689
- mediaUrlSchema,
1690
- questPresentationSchema,
1691
- questProfileSchema,
1692
- questDescriptionSchema,
1693
- artifactSchema,
1694
- releaseSchema,
1695
- batchReleaseSchema,
1696
- questSettingsInputSchema,
1697
- publishedReleaseSchema,
1698
- templateSchema,
1699
- quizAnswersSchema,
1700
- quizEvidenceSchema,
1701
- submissionEvidenceSchema,
1702
- submitSchema,
1703
- attemptSchema,
1704
- eventSchema,
1705
- pickupSelectionSchema,
1706
- pickupAllocationSchema,
1707
- pickupPolicySchema,
1708
- pickupCatalogSchema,
1709
- pickupAvailabilitySchema,
1710
- configurePickupSchema,
1711
- entitlementSchema,
1712
- beginHandoverSchema,
1713
- confirmHandoverSchema,
1714
- completionRecordSchema,
1715
- questAvailabilitySchema,
1716
- memberProgressSchema,
1717
- snapshotSchema,
1718
- evidenceSchema,
1719
- errorSchema,
1720
- staffDecisionSchema,
1721
- stockSchema,
1722
- reservationSchema,
1723
- reviewListSchema,
1724
- memberListSchema,
1725
- reviewItemSchema,
1726
- reviewPageSchema,
1727
- memberPageSchema,
1728
- createStockItemSchema,
1729
- stockItemSchema,
1730
- contentPerformanceSnapshotSchema,
1731
- contentPerformanceQuerySchema,
1732
- contentPerformancePageSchema
1733
- };