@domino-sdk/relay 1.0.0-next.12 → 1.0.0-next.13

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 (34) hide show
  1. package/dist/authoring.d.ts +25 -25
  2. package/dist/authoring.js +10 -3
  3. package/dist/browser.d.ts +19 -26
  4. package/dist/browser.js +6 -6
  5. package/dist/{catalog-qrYne8qV.d.ts → catalog-C85V1NgW.d.ts} +73 -79
  6. package/dist/{chunk-YYD4QUBO.js → chunk-CRNQP7NV.js} +550 -470
  7. package/dist/{chunk-22J4K7ED.js → chunk-EZWNGI5B.js} +4 -4
  8. package/dist/{chunk-7Q4BGGT6.js → chunk-FXYJ4OMX.js} +1 -1
  9. package/dist/{chunk-4LBUTHD6.js → chunk-II7DRZSL.js} +1 -1
  10. package/dist/{chunk-NZA2TLBF.js → chunk-KS33GOUL.js} +23 -8
  11. package/dist/{chunk-LY7SXUNW.js → chunk-M64XHC42.js} +4 -4
  12. package/dist/{chunk-UW5CQHPQ.js → chunk-MNQI35OG.js} +3 -3
  13. package/dist/{chunk-5L7XZA4Y.js → chunk-OA2KMQVZ.js} +31 -25
  14. package/dist/{chunk-EWFB35JW.js → chunk-WQ24ILGO.js} +2 -2
  15. package/dist/{client-CW72TaAs.d.ts → client-Bf9PNUIi.d.ts} +18 -25
  16. package/dist/{deployments-Bc0dPSXN.d.ts → deployments-CNCP0JnD.d.ts} +269 -138
  17. package/dist/{images-D0Txfte6.d.ts → images-BG4pdO4y.d.ts} +1 -1
  18. package/dist/index.d.ts +5 -5
  19. package/dist/index.js +5 -5
  20. package/dist/internal.d.ts +3 -3
  21. package/dist/internal.js +4 -4
  22. package/dist/{observations-bFY4yv2K.d.ts → observations-CQ6IcNuQ.d.ts} +3 -3
  23. package/dist/portal-proxy.js +2 -2
  24. package/dist/react/index.d.ts +19 -27
  25. package/dist/react/index.js +7 -7
  26. package/dist/{referrals-CvSmxvjm.d.ts → referrals-KQfP4pBf.d.ts} +189 -102
  27. package/dist/{schema-ZfjL-d1N.d.ts → schema-BF_TQsmT.d.ts} +338 -47
  28. package/dist/schema.d.ts +8 -8
  29. package/dist/schema.js +28 -8
  30. package/dist/server/index.d.ts +542 -508
  31. package/dist/server/index.js +31 -7
  32. package/dist/{streaks-CwGReWGt.d.ts → streaks-CWyq8Px5.d.ts} +2 -4
  33. package/dist/{trackers-BsUh5Ky0.d.ts → trackers-W7nRdRr7.d.ts} +1 -1
  34. package/package.json +1 -1
@@ -588,7 +588,7 @@ function schemaCheckedReader(reader) {
588
588
  }
589
589
  const issues = trackerDataIssues(
590
590
  schema,
591
- page.items.map((record) => record.data)
591
+ page.items.map((record2) => record2.data)
592
592
  );
593
593
  const items = page.items.filter((_, index) => !issues[index]);
594
594
  return { ...page, items, excluded: page.items.length - items.length };
@@ -1103,64 +1103,131 @@ var contentPerformancePolicySchema = z6.strictObject({
1103
1103
  maxAgeMs: z6.number().int().positive().max(864e5).default(36e5)
1104
1104
  });
1105
1105
 
1106
- // src/streaks.ts
1106
+ // src/calendar.ts
1107
1107
  import { z as z7 } from "zod";
1108
- var communityTimeZoneSchema = z7.string().min(1).max(100).refine((zone) => {
1108
+ var timestamp3 = z7.number().int().safe();
1109
+ var fixedOffset = /^(?:[+-]|(?:Etc\/)?GMT[+-]\d|(?:EST|MST|HST)$)/i;
1110
+ function canonicalTimeZone(zone) {
1111
+ let resolved;
1109
1112
  try {
1110
- if (/^[+-]/.test(zone)) {
1111
- return false;
1112
- }
1113
- new Intl.DateTimeFormat("en", { timeZone: zone });
1114
- return true;
1113
+ resolved = new Intl.DateTimeFormat("en", {
1114
+ timeZone: zone
1115
+ }).resolvedOptions().timeZone;
1115
1116
  } catch {
1116
- return false;
1117
+ return null;
1117
1118
  }
1118
- }, "Use an IANA community timezone, such as Europe/Budapest");
1119
- var streakPolicySchema = z7.object({
1120
- kind: z7.literal("streak"),
1121
- days: z7.number().int().min(1).max(3650),
1122
- timeZone: communityTimeZoneSchema
1123
- }).strict();
1124
- var streakProgressSchema = z7.object({
1125
- goal: z7.number().int().positive(),
1126
- current: z7.number().int().nonnegative(),
1127
- best: z7.number().int().nonnegative(),
1119
+ if (resolved === "UTC") {
1120
+ return "UTC";
1121
+ }
1122
+ return fixedOffset.test(zone) || fixedOffset.test(resolved) ? null : resolved;
1123
+ }
1124
+ var timeZoneSchema = z7.string().min(1).max(100).transform((zone, ctx) => {
1125
+ const canonical = canonicalTimeZone(zone);
1126
+ if (canonical === null) {
1127
+ ctx.addIssue({
1128
+ code: "custom",
1129
+ message: fixedOffset.test(zone) ? "Use a named IANA timezone, such as Europe/Budapest or UTC. Fixed offsets have no daylight-saving rules." : "Use an IANA timezone name, such as Europe/Budapest or UTC"
1130
+ });
1131
+ return z7.NEVER;
1132
+ }
1133
+ return canonical;
1134
+ });
1135
+ var timeZoneNameSchema = z7.string().min(1).max(100);
1136
+ var movedTimeZone = (what) => `${what} no longer take a timeZone: they follow the project calendar. Set calendar.timeZone in relay.json or in Console settings.`;
1137
+ var record = (value) => typeof value === "object" && value !== null;
1138
+ function refuseStreakTimeZone(value, ctx) {
1139
+ if (record(value) && value.kind === "streak" && "timeZone" in value) {
1140
+ ctx.addIssue({
1141
+ code: "custom",
1142
+ path: ["timeZone"],
1143
+ message: movedTimeZone("Streaks")
1144
+ });
1145
+ }
1146
+ return value;
1147
+ }
1148
+ function refuseWindowTimeZone(value, ctx) {
1149
+ const window = record(value) ? value.window : void 0;
1150
+ if (record(window) && window.kind === "calendar" && "timeZone" in window) {
1151
+ ctx.addIssue({
1152
+ code: "custom",
1153
+ path: ["window", "timeZone"],
1154
+ message: movedTimeZone("Calendar leaderboard windows")
1155
+ });
1156
+ }
1157
+ return value;
1158
+ }
1159
+ var calendarPeriodSchema = z7.enum(["lifetime", "day", "week", "month"]);
1160
+ var projectCalendarSchema = z7.object({
1161
+ /** The timezone of the current calendar day. */
1162
+ timeZone: timeZoneNameSchema,
1163
+ /** The current calendar date, such as `2026-10-01`. */
1128
1164
  today: z7.string(),
1129
- todayQualified: z7.boolean(),
1130
- timeZone: communityTimeZoneSchema,
1131
- nextBoundary: z7.number().int(),
1132
- pendingTimeZone: z7.object({
1133
- timeZone: communityTimeZoneSchema,
1134
- effectiveAt: z7.number().int()
1165
+ /** When the current calendar day ends, in epoch milliseconds. */
1166
+ nextBoundary: timestamp3,
1167
+ /** A change that takes effect at the next day boundary, or null. */
1168
+ pending: z7.object({ timeZone: timeZoneNameSchema, effectiveAt: timestamp3 }).nullable(),
1169
+ /** The `calendar.timeZone` the last deployment that declared one set, or null. */
1170
+ declared: timeZoneNameSchema.nullable(),
1171
+ /**
1172
+ * A stored timezone the calendar no longer accepts, such as a fixed offset a streak named before
1173
+ * v1. The calendar reads it as UTC until an operator chooses a timezone. Null otherwise.
1174
+ */
1175
+ unsupported: z7.string().nullable().default(null)
1176
+ });
1177
+ var projectCalendarInputSchema = z7.object({
1178
+ actionId: identifier,
1179
+ timeZone: timeZoneSchema,
1180
+ reason: z7.string().trim().min(1).max(500)
1181
+ }).strict();
1182
+ var projectCalendarDeclarationSchema = z7.object({ timeZone: timeZoneSchema }).strict();
1183
+
1184
+ // src/streaks.ts
1185
+ import { z as z8 } from "zod";
1186
+ var streakPolicySchema = z8.object({
1187
+ kind: z8.literal("streak"),
1188
+ days: z8.number().int().min(1).max(3650)
1189
+ });
1190
+ var streakProgressSchema = z8.object({
1191
+ goal: z8.number().int().positive(),
1192
+ current: z8.number().int().nonnegative(),
1193
+ best: z8.number().int().nonnegative(),
1194
+ today: z8.string(),
1195
+ todayQualified: z8.boolean(),
1196
+ timeZone: timeZoneNameSchema,
1197
+ nextBoundary: z8.number().int(),
1198
+ pendingTimeZone: z8.object({
1199
+ timeZone: timeZoneNameSchema,
1200
+ effectiveAt: z8.number().int()
1135
1201
  }).nullable(),
1136
- days: z7.array(
1137
- z7.object({
1138
- day: z7.number().int(),
1139
- date: z7.string(),
1140
- timeZone: communityTimeZoneSchema,
1141
- occurredAt: z7.number().int()
1202
+ days: z8.array(
1203
+ z8.object({
1204
+ day: z8.number().int(),
1205
+ date: z8.string(),
1206
+ // The zone the day was recorded in, as stored: days from before v1 can name a fixed offset.
1207
+ timeZone: z8.string(),
1208
+ occurredAt: z8.number().int()
1142
1209
  })
1143
1210
  ),
1144
- milestone: z7.discriminatedUnion("status", [
1145
- z7.object({ status: z7.literal("pending") }),
1146
- z7.object({
1147
- status: z7.literal("awarded"),
1148
- completion: z7.string(),
1149
- achievedAt: z7.number().int()
1211
+ milestone: z8.discriminatedUnion("status", [
1212
+ z8.object({ status: z8.literal("pending") }),
1213
+ z8.object({
1214
+ status: z8.literal("awarded"),
1215
+ completion: z8.string(),
1216
+ achievedAt: z8.number().int()
1150
1217
  }),
1151
- z7.object({
1152
- status: z7.literal("budget-exhausted"),
1153
- budget: z7.string(),
1154
- achievedAt: z7.number().int()
1218
+ z8.object({
1219
+ status: z8.literal("budget-exhausted"),
1220
+ budget: z8.string(),
1221
+ achievedAt: z8.number().int()
1155
1222
  })
1156
1223
  ])
1157
1224
  });
1158
1225
 
1159
1226
  // src/tracker-triggers.ts
1160
- import { z as z8 } from "zod";
1161
- var timestamp3 = z8.number().int().safe().nonnegative().max(864e13);
1162
- var count2 = z8.number().int().safe().nonnegative();
1163
- var trackerTriggerModeSchema = z8.enum([
1227
+ import { z as z9 } from "zod";
1228
+ var timestamp4 = z9.number().int().safe().nonnegative().max(864e13);
1229
+ var count2 = z9.number().int().safe().nonnegative();
1230
+ var trackerTriggerModeSchema = z9.enum([
1164
1231
  "new-record",
1165
1232
  "new-observation",
1166
1233
  "data-changed"
@@ -1168,20 +1235,20 @@ var trackerTriggerModeSchema = z8.enum([
1168
1235
  function defaultTriggerMode(source) {
1169
1236
  return source === "x-search" ? "new-record" : "new-observation";
1170
1237
  }
1171
- var trackerBoundSchema = z8.union([
1172
- z8.number().finite(),
1173
- z8.strictObject({ setting: z8.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/) })
1238
+ var trackerBoundSchema = z9.union([
1239
+ z9.number().finite(),
1240
+ z9.strictObject({ setting: z9.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/) })
1174
1241
  ]);
1175
- var dataPath = z8.string().max(200).regex(
1242
+ var dataPath = z9.string().max(200).regex(
1176
1243
  /^[^.\s]+(\.[^.\s]+)*$/,
1177
1244
  "Use dot-separated keys, such as metrics.likes"
1178
1245
  );
1179
- var trackerConditionSchema = z8.union([
1180
- z8.strictObject({
1246
+ var trackerConditionSchema = z9.union([
1247
+ z9.strictObject({
1181
1248
  path: dataPath,
1182
- equals: z8.union([z8.string().max(1e3), z8.number().finite(), z8.boolean()])
1249
+ equals: z9.union([z9.string().max(1e3), z9.number().finite(), z9.boolean()])
1183
1250
  }),
1184
- z8.strictObject({
1251
+ z9.strictObject({
1185
1252
  path: dataPath,
1186
1253
  gt: trackerBoundSchema.optional(),
1187
1254
  gte: trackerBoundSchema.optional(),
@@ -1194,9 +1261,9 @@ var trackerConditionSchema = z8.union([
1194
1261
  "Compare with equals, gt, gte, lt or lte"
1195
1262
  )
1196
1263
  ]);
1197
- var trackerWhereSchema = z8.union([
1264
+ var trackerWhereSchema = z9.union([
1198
1265
  trackerConditionSchema,
1199
- z8.array(trackerConditionSchema).min(1).max(10)
1266
+ z9.array(trackerConditionSchema).min(1).max(10)
1200
1267
  ]);
1201
1268
  function whereConditions(where) {
1202
1269
  return where === void 0 ? [] : Array.isArray(where) ? where : [where];
@@ -1208,10 +1275,10 @@ function whereSettings(where) {
1208
1275
  )
1209
1276
  );
1210
1277
  }
1211
- var trackerTriggerPolicySchema = z8.strictObject({
1278
+ var trackerTriggerPolicySchema = z9.strictObject({
1212
1279
  /** The tracker's authoring key; publication binds it to the tracker's stable ID. */
1213
1280
  tracker: identifier,
1214
- source: z8.enum(["x-search", "custom"]),
1281
+ source: z9.enum(["x-search", "custom"]),
1215
1282
  /** Which observations fire; absent means the source's default (`defaultTriggerMode`). */
1216
1283
  on: trackerTriggerModeSchema.optional(),
1217
1284
  where: trackerWhereSchema.optional(),
@@ -1220,7 +1287,7 @@ var trackerTriggerPolicySchema = z8.strictObject({
1220
1287
  * a custom record. Relay attributes it through verified links; evaluators cannot redirect it.
1221
1288
  * Releases published before account roles store `"replied-to"` for `inReplyTo`.
1222
1289
  */
1223
- beneficiary: z8.union([accountRoleSchema, z8.literal("replied-to")])
1290
+ beneficiary: z9.union([accountRoleSchema, z9.literal("replied-to")])
1224
1291
  });
1225
1292
  function triggerMode(policy) {
1226
1293
  return policy.on ?? defaultTriggerMode(policy.source);
@@ -1229,52 +1296,52 @@ function beneficiaryRole(policy) {
1229
1296
  return policy.beneficiary === "replied-to" ? "inReplyTo" : policy.beneficiary;
1230
1297
  }
1231
1298
  var xLink = {
1232
- issuer: z8.string().min(1),
1299
+ issuer: z9.string().min(1),
1233
1300
  /** The account's stable user ID. */
1234
- subject: z8.string().min(1).max(256),
1301
+ subject: z9.string().min(1).max(256),
1235
1302
  /** The member's account selection revision. */
1236
1303
  revision: count2,
1237
1304
  /** When the member linked the account; null when unknown. */
1238
- linkedAt: timestamp3.nullable()
1305
+ linkedAt: timestamp4.nullable()
1239
1306
  };
1240
- var trackerAttributionSchema = z8.strictObject({
1307
+ var trackerAttributionSchema = z9.strictObject({
1241
1308
  member: identifier,
1242
- capturedAt: timestamp3,
1243
- account: z8.discriminatedUnion("provider", [
1244
- z8.strictObject({
1245
- provider: z8.literal("wallet"),
1309
+ capturedAt: timestamp4,
1310
+ account: z9.discriminatedUnion("provider", [
1311
+ z9.strictObject({
1312
+ provider: z9.literal("wallet"),
1246
1313
  /** Canonical CAIP-10 account ID, as the record names it. */
1247
- id: z8.string().min(5).max(256),
1314
+ id: z9.string().min(5).max(256),
1248
1315
  /** The wallet link's revision. */
1249
1316
  revision: count2,
1250
1317
  /** When the member verified the wallet. */
1251
- linkedAt: timestamp3.nullable()
1318
+ linkedAt: timestamp4.nullable()
1252
1319
  }),
1253
- z8.strictObject({ provider: z8.literal("x"), ...xLink }),
1254
- z8.strictObject({ provider: z8.literal("discord"), ...xLink }),
1255
- z8.strictObject({
1256
- provider: z8.literal("member"),
1320
+ z9.strictObject({ provider: z9.literal("x"), ...xLink }),
1321
+ z9.strictObject({ provider: z9.literal("discord"), ...xLink }),
1322
+ z9.strictObject({
1323
+ provider: z9.literal("member"),
1257
1324
  /** The member ID the record names. */
1258
1325
  id: identifier
1259
1326
  })
1260
1327
  ])
1261
1328
  });
1262
- var trackerTriggerRecordSchema = z8.strictObject({
1263
- id: z8.string().min(1).max(256),
1264
- source: z8.string(),
1265
- occurredAt: timestamp3,
1266
- observedAt: timestamp3,
1267
- firstSeenAt: timestamp3,
1268
- author: z8.strictObject({
1269
- id: z8.string().min(1).max(256),
1270
- verified: z8.boolean().nullable(),
1329
+ var trackerTriggerRecordSchema = z9.strictObject({
1330
+ id: z9.string().min(1).max(256),
1331
+ source: z9.string(),
1332
+ occurredAt: timestamp4,
1333
+ observedAt: timestamp4,
1334
+ firstSeenAt: timestamp4,
1335
+ author: z9.strictObject({
1336
+ id: z9.string().min(1).max(256),
1337
+ verified: z9.boolean().nullable(),
1271
1338
  kind: identityKindSchema.optional()
1272
1339
  }).nullable(),
1273
- accounts: z8.record(accountRoleSchema, trackerAccountSchema).optional(),
1274
- data: z8.record(z8.string(), z8.json()),
1275
- removed: z8.boolean()
1340
+ accounts: z9.record(accountRoleSchema, trackerAccountSchema).optional(),
1341
+ data: z9.record(z9.string(), z9.json()),
1342
+ removed: z9.boolean()
1276
1343
  });
1277
- var trackerTriggerContextSchema = z8.strictObject({
1344
+ var trackerTriggerContextSchema = z9.strictObject({
1278
1345
  /** The tracker's stable ID. */
1279
1346
  tracker: identifier,
1280
1347
  /** The tracker's authoring key. */
@@ -1283,10 +1350,10 @@ var trackerTriggerContextSchema = z8.strictObject({
1283
1350
  * The record account the attempt pays, as the quest's release names it. Releases published
1284
1351
  * before account roles name `inReplyTo` `"replied-to"`, which their bundled evaluators expect.
1285
1352
  */
1286
- beneficiary: z8.union([accountRoleSchema, z8.literal("replied-to")]),
1353
+ beneficiary: z9.union([accountRoleSchema, z9.literal("replied-to")]),
1287
1354
  record: trackerTriggerRecordSchema,
1288
1355
  /** The captured X post of this observation; null for custom trackers. */
1289
- x: z8.strictObject({
1356
+ x: z9.strictObject({
1290
1357
  evidence: trackerEvidenceSchema,
1291
1358
  content: xContentBodySchema
1292
1359
  }).nullable(),
@@ -1294,99 +1361,100 @@ var trackerTriggerContextSchema = z8.strictObject({
1294
1361
  });
1295
1362
 
1296
1363
  // src/observations.ts
1297
- import { z as z9 } from "zod";
1298
- var name = z9.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,199}$/);
1299
- var observationInputSchema = z9.object({
1364
+ import { z as z10 } from "zod";
1365
+ var name = z10.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,199}$/);
1366
+ var observationInputSchema = z10.object({
1300
1367
  id: name,
1301
1368
  source: name,
1302
1369
  type: name,
1303
1370
  member: identifier,
1304
- actor: z9.object({ provider: identifier, subject: z9.string().min(1).max(200) }).strict().optional(),
1305
- occurredAt: z9.number().int().nonnegative().max(864e13),
1306
- data: z9.record(z9.string(), z9.json())
1371
+ actor: z10.object({ provider: identifier, subject: z10.string().min(1).max(200) }).strict().optional(),
1372
+ occurredAt: z10.number().int().nonnegative().max(864e13),
1373
+ data: z10.record(z10.string(), z10.json())
1307
1374
  }).strict().refine(
1308
1375
  (value) => JSON.stringify(value.data).length <= 32768,
1309
1376
  "Observation data exceeds 32 KB"
1310
1377
  );
1311
1378
  var observationSchema = observationInputSchema.safeExtend({
1312
- receivedAt: z9.number().int().nonnegative()
1379
+ receivedAt: z10.number().int().nonnegative()
1313
1380
  });
1314
- var observationTriggerSchema = z9.object({ source: name, type: name }).strict();
1315
- var completionPolicySchema = z9.discriminatedUnion("kind", [
1381
+ var observationTriggerSchema = z10.object({ source: name, type: name }).strict();
1382
+ var completionPolicySchema = z10.discriminatedUnion("kind", [
1316
1383
  streakPolicySchema,
1317
- z9.object({ kind: z9.literal("once") }).strict(),
1318
- z9.object({ kind: z9.literal("keyed") }).strict()
1384
+ z10.object({ kind: z10.literal("once") }).strict(),
1385
+ z10.object({ kind: z10.literal("keyed") }).strict()
1319
1386
  ]);
1320
- var completionKeySchema = z9.string().min(1).max(500);
1321
- var budgetSchema = z9.object({
1387
+ var completionKeySchema = z10.string().min(1).max(500);
1388
+ var budgetSchema = z10.object({
1322
1389
  id: name,
1323
- scope: z9.enum(["member", "project"]),
1390
+ scope: z10.enum(["member", "project"]),
1324
1391
  /**
1325
- * `"day"` buckets by UTC date and `"week"` by ISO week (UTC, weeks start on Monday), both of
1326
- * the attempt's eligibility time; `"lifetime"` never resets.
1392
+ * The project calendar period of the attempt's eligibility time that one bucket covers:
1393
+ * `"day"`, `"week"` (ISO, starting on Monday) or `"month"` in the project timezone.
1394
+ * `"lifetime"` never resets.
1327
1395
  */
1328
- period: z9.enum(["lifetime", "day", "week"]),
1329
- limit: z9.number().int().positive().max(Number.MAX_SAFE_INTEGER),
1330
- cost: z9.union([
1331
- z9.number().int().positive().max(Number.MAX_SAFE_INTEGER),
1332
- z9.object({ balance: name }).strict()
1396
+ period: calendarPeriodSchema,
1397
+ limit: z10.number().int().positive().max(Number.MAX_SAFE_INTEGER),
1398
+ cost: z10.union([
1399
+ z10.number().int().positive().max(Number.MAX_SAFE_INTEGER),
1400
+ z10.object({ balance: name }).strict()
1333
1401
  ])
1334
1402
  }).strict();
1335
- var observationReceiptSchema = z9.object({
1403
+ var observationReceiptSchema = z10.object({
1336
1404
  id: name,
1337
1405
  source: name,
1338
- attempts: z9.array(z9.string()),
1339
- receivedAt: z9.number()
1340
- });
1341
- var discordReactionSchema = z9.object({
1342
- guildId: z9.string(),
1343
- channelId: z9.string(),
1344
- messageId: z9.string(),
1345
- userId: z9.string(),
1346
- messageAuthorId: z9.string().nullable().default(null),
1347
- actorRoles: z9.array(z9.string()).default([]),
1348
- emoji: z9.object({ id: z9.string().nullable(), name: z9.string() }),
1349
- messagePublishedAt: z9.number()
1406
+ attempts: z10.array(z10.string()),
1407
+ receivedAt: z10.number()
1408
+ });
1409
+ var discordReactionSchema = z10.object({
1410
+ guildId: z10.string(),
1411
+ channelId: z10.string(),
1412
+ messageId: z10.string(),
1413
+ userId: z10.string(),
1414
+ messageAuthorId: z10.string().nullable().default(null),
1415
+ actorRoles: z10.array(z10.string()).default([]),
1416
+ emoji: z10.object({ id: z10.string().nullable(), name: z10.string() }),
1417
+ messagePublishedAt: z10.number()
1350
1418
  }).strict();
1351
- var discordMessageSchema = z9.object({
1352
- guildId: z9.string(),
1353
- channelId: z9.string(),
1354
- messageId: z9.string(),
1355
- userId: z9.string(),
1356
- content: z9.string().nullable(),
1357
- replyTo: z9.string().nullable(),
1358
- publishedAt: z9.number()
1419
+ var discordMessageSchema = z10.object({
1420
+ guildId: z10.string(),
1421
+ channelId: z10.string(),
1422
+ messageId: z10.string(),
1423
+ userId: z10.string(),
1424
+ content: z10.string().nullable(),
1425
+ replyTo: z10.string().nullable(),
1426
+ publishedAt: z10.number()
1359
1427
  }).strict();
1360
1428
 
1361
1429
  // src/integrations.ts
1362
- import { z as z10 } from "zod";
1363
- var integrationProviderSchema = z10.enum(["discord"]);
1364
- var discordServerSchema = z10.object({
1365
- id: z10.string().regex(/^[0-9]{1,20}$/),
1366
- name: z10.string().min(1),
1367
- icon: z10.string().nullable()
1430
+ import { z as z11 } from "zod";
1431
+ var integrationProviderSchema = z11.enum(["discord"]);
1432
+ var discordServerSchema = z11.object({
1433
+ id: z11.string().regex(/^[0-9]{1,20}$/),
1434
+ name: z11.string().min(1),
1435
+ icon: z11.string().nullable()
1368
1436
  });
1369
- var projectIntegrationSchema = z10.object({
1437
+ var projectIntegrationSchema = z11.object({
1370
1438
  provider: integrationProviderSchema,
1371
- configured: z10.boolean(),
1372
- status: z10.enum(["disconnected", "ready", "attention"]),
1373
- revision: z10.number().int().nonnegative(),
1439
+ configured: z11.boolean(),
1440
+ status: z11.enum(["disconnected", "ready", "attention"]),
1441
+ revision: z11.number().int().nonnegative(),
1374
1442
  server: discordServerSchema.nullable(),
1375
- issue: z10.string().nullable(),
1376
- connectedAt: z10.number().default(0)
1443
+ issue: z11.string().nullable(),
1444
+ connectedAt: z11.number().default(0)
1377
1445
  });
1378
1446
 
1379
1447
  // src/submission-input.ts
1380
- import { z as z11 } from "zod";
1381
- var textOptionsSchema = z11.object({
1382
- required: z11.boolean().default(true),
1383
- minLength: z11.number().int().min(0).max(1e4).default(1),
1384
- maxLength: z11.number().int().min(1).max(1e4).default(1e4)
1448
+ import { z as z12 } from "zod";
1449
+ var textOptionsSchema = z12.object({
1450
+ required: z12.boolean().default(true),
1451
+ minLength: z12.number().int().min(0).max(1e4).default(1),
1452
+ maxLength: z12.number().int().min(1).max(1e4).default(1e4)
1385
1453
  }).strict().refine(
1386
1454
  (v) => v.minLength <= v.maxLength,
1387
1455
  "minLength must not exceed maxLength"
1388
1456
  );
1389
- var hostSchema = z11.string().min(1).max(253).refine((host) => {
1457
+ var hostSchema = z12.string().min(1).max(253).refine((host) => {
1390
1458
  if (!/^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/i.test(host) || host.includes("..")) {
1391
1459
  return false;
1392
1460
  }
@@ -1397,13 +1465,13 @@ var hostSchema = z11.string().min(1).max(253).refine((host) => {
1397
1465
  return false;
1398
1466
  }
1399
1467
  }, "Use a hostname without a scheme, path, port, or wildcard");
1400
- var urlOptionsSchema = z11.object({
1401
- required: z11.boolean().default(true),
1402
- allowedHosts: z11.array(hostSchema).min(1).max(100).optional()
1468
+ var urlOptionsSchema = z12.object({
1469
+ required: z12.boolean().default(true),
1470
+ allowedHosts: z12.array(hostSchema).min(1).max(100).optional()
1403
1471
  }).strict();
1404
- var textEvidenceSchema = z11.object({ kind: z11.literal("text"), value: z11.string().max(1e4) }).strict();
1405
- var urlEvidenceSchema = z11.object({ kind: z11.literal("url"), value: z11.string().max(2048) }).strict();
1406
- var valueEvidenceSchema = z11.discriminatedUnion("kind", [
1472
+ var textEvidenceSchema = z12.object({ kind: z12.literal("text"), value: z12.string().max(1e4) }).strict();
1473
+ var urlEvidenceSchema = z12.object({ kind: z12.literal("url"), value: z12.string().max(2048) }).strict();
1474
+ var valueEvidenceSchema = z12.discriminatedUnion("kind", [
1407
1475
  textEvidenceSchema,
1408
1476
  urlEvidenceSchema
1409
1477
  ]);
@@ -1466,22 +1534,22 @@ function xPostId(value) {
1466
1534
  }
1467
1535
 
1468
1536
  // src/quiz.ts
1469
- import { z as z12 } from "zod";
1470
- var quizId = z12.string().regex(/^[a-zA-Z0-9_-]+$/).max(100);
1471
- var quizChoiceSchema = z12.object({ id: quizId, label: z12.string().trim().min(1).max(500) }).strict();
1472
- var quizQuestionSchema = z12.object({
1537
+ import { z as z13 } from "zod";
1538
+ var quizId = z13.string().regex(/^[a-zA-Z0-9_-]+$/).max(100);
1539
+ var quizChoiceSchema = z13.object({ id: quizId, label: z13.string().trim().min(1).max(500) }).strict();
1540
+ var quizQuestionSchema = z13.object({
1473
1541
  id: quizId,
1474
- prompt: z12.string().trim().min(1).max(1e3),
1475
- choices: z12.array(quizChoiceSchema).min(2).max(8).refine(
1542
+ prompt: z13.string().trim().min(1).max(1e3),
1543
+ choices: z13.array(quizChoiceSchema).min(2).max(8).refine(
1476
1544
  (choices) => new Set(choices.map((choice) => choice.id)).size === choices.length,
1477
1545
  "Choice IDs must be unique"
1478
1546
  )
1479
1547
  }).strict();
1480
- var quizQuestionsSchema = z12.array(quizQuestionSchema).min(1).max(20).refine(
1548
+ var quizQuestionsSchema = z13.array(quizQuestionSchema).min(1).max(20).refine(
1481
1549
  (questions) => new Set(questions.map((question) => question.id)).size === questions.length,
1482
1550
  "Question IDs must be unique"
1483
1551
  );
1484
- var quizContentSchema = z12.array(
1552
+ var quizContentSchema = z13.array(
1485
1553
  quizQuestionSchema.extend({ correct: quizId }).refine(
1486
1554
  (question) => question.choices.some((choice) => choice.id === question.correct),
1487
1555
  "Choose a correct answer from the available choices"
@@ -1492,97 +1560,97 @@ var quizContentSchema = z12.array(
1492
1560
  );
1493
1561
 
1494
1562
  // src/resources.ts
1495
- import { z as z13 } from "zod";
1496
- var channelSourceSchema = z13.object({
1497
- provider: z13.literal("discord"),
1498
- resource: z13.literal("channel"),
1499
- types: z13.array(z13.enum(["text", "announcement"])).min(1)
1563
+ import { z as z14 } from "zod";
1564
+ var channelSourceSchema = z14.object({
1565
+ provider: z14.literal("discord"),
1566
+ resource: z14.literal("channel"),
1567
+ types: z14.array(z14.enum(["text", "announcement"])).min(1)
1500
1568
  }).strict();
1501
- var resourceSourceSchema = z13.union([
1502
- z13.object({
1503
- provider: z13.literal("domino"),
1504
- resource: z13.literal("point-ledger")
1569
+ var resourceSourceSchema = z14.union([
1570
+ z14.object({
1571
+ provider: z14.literal("domino"),
1572
+ resource: z14.literal("point-ledger")
1505
1573
  }).strict(),
1506
1574
  channelSourceSchema,
1507
- z13.object({
1508
- provider: z13.literal("discord"),
1509
- resource: z13.literal("role"),
1510
- assignable: z13.boolean().default(false)
1575
+ z14.object({
1576
+ provider: z14.literal("discord"),
1577
+ resource: z14.literal("role"),
1578
+ assignable: z14.boolean().default(false)
1511
1579
  }).strict()
1512
1580
  ]);
1513
- var resourceRequestSchema = z13.object({
1581
+ var resourceRequestSchema = z14.object({
1514
1582
  source: resourceSourceSchema,
1515
- query: z13.string().max(100).optional(),
1516
- cursor: z13.string().regex(/^\d{1,6}$/).optional(),
1517
- ids: z13.array(z13.string().min(1).max(100)).max(50).optional()
1583
+ query: z14.string().max(100).optional(),
1584
+ cursor: z14.string().regex(/^\d{1,6}$/).optional(),
1585
+ ids: z14.array(z14.string().min(1).max(100)).max(50).optional()
1518
1586
  }).strict();
1519
- var resourceOptionsSchema = z13.object({
1520
- revision: z13.number().int(),
1521
- options: z13.array(
1522
- z13.object({
1523
- id: z13.string(),
1524
- label: z13.string(),
1525
- description: z13.string().optional(),
1526
- group: z13.string().optional(),
1527
- disabledReason: z13.string().optional()
1587
+ var resourceOptionsSchema = z14.object({
1588
+ revision: z14.number().int(),
1589
+ options: z14.array(
1590
+ z14.object({
1591
+ id: z14.string(),
1592
+ label: z14.string(),
1593
+ description: z14.string().optional(),
1594
+ group: z14.string().optional(),
1595
+ disabledReason: z14.string().optional()
1528
1596
  })
1529
1597
  ),
1530
- cursor: z13.string().nullable()
1598
+ cursor: z14.string().nullable()
1531
1599
  });
1532
1600
 
1533
1601
  // src/settings.ts
1534
- import { z as z15 } from "zod";
1602
+ import { z as z16 } from "zod";
1535
1603
 
1536
1604
  // src/setting-values.ts
1537
- import { z as z14 } from "zod";
1538
- var settingInstant = z14.iso.datetime({ offset: true }).transform((value) => new Date(value).toISOString());
1539
- var settingResourceId = z14.union([
1540
- z14.literal(""),
1541
- z14.string().regex(/^\S{1,200}$/)
1605
+ import { z as z15 } from "zod";
1606
+ var settingInstant = z15.iso.datetime({ offset: true }).transform((value) => new Date(value).toISOString());
1607
+ var settingResourceId = z15.union([
1608
+ z15.literal(""),
1609
+ z15.string().regex(/^\S{1,200}$/)
1542
1610
  ]);
1543
1611
 
1544
1612
  // src/settings.ts
1545
- var base = { label: z15.string().min(1), description: z15.string().optional() };
1546
- var settingFieldSchema = z15.discriminatedUnion("kind", [
1547
- z15.object({ ...base, kind: z15.literal("point-ledger"), default: identifier }).strict(),
1548
- z15.object({ ...base, kind: z15.literal("datetime"), default: settingInstant }).strict(),
1549
- z15.object({
1613
+ var base = { label: z16.string().min(1), description: z16.string().optional() };
1614
+ var settingFieldSchema = z16.discriminatedUnion("kind", [
1615
+ z16.object({ ...base, kind: z16.literal("point-ledger"), default: identifier }).strict(),
1616
+ z16.object({ ...base, kind: z16.literal("datetime"), default: settingInstant }).strict(),
1617
+ z16.object({
1550
1618
  ...base,
1551
- kind: z15.literal("resource"),
1619
+ kind: z16.literal("resource"),
1552
1620
  default: settingResourceId,
1553
1621
  source: resourceSourceSchema
1554
1622
  }).strict(),
1555
- z15.object({ ...base, kind: z15.literal("quiz"), default: quizContentSchema }).strict(),
1556
- z15.object({
1623
+ z16.object({ ...base, kind: z16.literal("quiz"), default: quizContentSchema }).strict(),
1624
+ z16.object({
1557
1625
  ...base,
1558
- kind: z15.literal("text"),
1559
- default: z15.string(),
1560
- minLength: z15.number().int().nonnegative(),
1561
- maxLength: z15.number().int().positive(),
1562
- multiline: z15.boolean()
1626
+ kind: z16.literal("text"),
1627
+ default: z16.string(),
1628
+ minLength: z16.number().int().nonnegative(),
1629
+ maxLength: z16.number().int().positive(),
1630
+ multiline: z16.boolean()
1563
1631
  }).strict(),
1564
- z15.object({
1632
+ z16.object({
1565
1633
  ...base,
1566
- kind: z15.literal("integer"),
1567
- default: z15.number().int(),
1568
- min: z15.number().int(),
1569
- max: z15.number().int()
1634
+ kind: z16.literal("integer"),
1635
+ default: z16.number().int(),
1636
+ min: z16.number().int(),
1637
+ max: z16.number().int()
1570
1638
  }).strict(),
1571
- z15.object({ ...base, kind: z15.literal("boolean"), default: z15.boolean() }).strict(),
1572
- z15.object({
1639
+ z16.object({ ...base, kind: z16.literal("boolean"), default: z16.boolean() }).strict(),
1640
+ z16.object({
1573
1641
  ...base,
1574
- kind: z15.literal("choice"),
1575
- default: z15.string(),
1576
- options: z15.array(z15.string().min(1)).min(1)
1642
+ kind: z16.literal("choice"),
1643
+ default: z16.string(),
1644
+ options: z16.array(z16.string().min(1)).min(1)
1577
1645
  }).strict()
1578
1646
  ]);
1579
- var settingsFieldsSchema = z15.record(
1580
- z15.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/),
1647
+ var settingsFieldsSchema = z16.record(
1648
+ z16.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/),
1581
1649
  settingFieldSchema
1582
1650
  );
1583
- var settingsValuesSchema = z15.record(
1584
- z15.string(),
1585
- z15.union([z15.string(), z15.number().finite(), z15.boolean(), quizContentSchema])
1651
+ var settingsValuesSchema = z16.record(
1652
+ z16.string(),
1653
+ z16.union([z16.string(), z16.number().finite(), z16.boolean(), quizContentSchema])
1586
1654
  );
1587
1655
  function parseSettings(fields, input) {
1588
1656
  const shape = {};
@@ -1601,20 +1669,20 @@ function parseSettings(fields, input) {
1601
1669
  shape[key] = quizContentSchema.default(field.default);
1602
1670
  break;
1603
1671
  case "text":
1604
- shape[key] = z15.string().min(field.minLength).max(field.maxLength).default(field.default);
1672
+ shape[key] = z16.string().min(field.minLength).max(field.maxLength).default(field.default);
1605
1673
  break;
1606
1674
  case "integer":
1607
- shape[key] = z15.number().int().min(field.min).max(field.max).default(field.default);
1675
+ shape[key] = z16.number().int().min(field.min).max(field.max).default(field.default);
1608
1676
  break;
1609
1677
  case "boolean":
1610
- shape[key] = z15.boolean().default(field.default);
1678
+ shape[key] = z16.boolean().default(field.default);
1611
1679
  break;
1612
1680
  case "choice":
1613
- shape[key] = z15.enum(field.options).default(field.default);
1681
+ shape[key] = z16.enum(field.options).default(field.default);
1614
1682
  break;
1615
1683
  }
1616
1684
  }
1617
- return settingsValuesSchema.parse(z15.object(shape).strict().parse(input));
1685
+ return settingsValuesSchema.parse(z16.object(shape).strict().parse(input));
1618
1686
  }
1619
1687
  function missingResourceSettings(fields, values) {
1620
1688
  return Object.entries(fields).filter(([key, field]) => field.kind === "resource" && !values[key]).map(([key]) => key);
@@ -1624,43 +1692,43 @@ function compatibleSettingKinds(previous, next) {
1624
1692
  }
1625
1693
 
1626
1694
  // src/schema.ts
1627
- import { z as z16 } from "zod";
1628
- var pointsRewardSchema = z16.object({
1629
- kind: z16.literal("points").default("points"),
1695
+ import { z as z17 } from "zod";
1696
+ var pointsRewardSchema = z17.object({
1697
+ kind: z17.literal("points").default("points"),
1630
1698
  balance: identifier,
1631
- amount: z16.number().int().min(0).max(1e4)
1699
+ amount: z17.number().int().min(0).max(1e4)
1632
1700
  }).strict();
1633
- var tieredRewardDefinitionSchema = z16.object({
1701
+ var tieredRewardDefinitionSchema = z17.object({
1634
1702
  id: identifier,
1635
- title: z16.string().min(1).max(120),
1636
- tiers: z16.array(
1637
- z16.object({ id: identifier, title: z16.string().min(1).max(120) }).strict()
1703
+ title: z17.string().min(1).max(120),
1704
+ tiers: z17.array(
1705
+ z17.object({ id: identifier, title: z17.string().min(1).max(120) }).strict()
1638
1706
  ).min(1).max(20).refine(
1639
1707
  (tiers) => new Set(tiers.map((t) => t.id)).size === tiers.length,
1640
1708
  "Tier IDs must be unique"
1641
1709
  ),
1642
- inventory: z16.object({ kind: z16.literal("untracked") }).strict(),
1643
- fulfillment: z16.object({ kind: z16.literal("staff-handover") }).strict()
1710
+ inventory: z17.object({ kind: z17.literal("untracked") }).strict(),
1711
+ fulfillment: z17.object({ kind: z17.literal("staff-handover") }).strict()
1644
1712
  }).strict();
1645
- var tieredRewardReferenceSchema = z16.object({
1713
+ var tieredRewardReferenceSchema = z17.object({
1646
1714
  id: identifier,
1647
1715
  key: identifier.nullable()
1648
1716
  });
1649
- var tierRewardSchema = z16.object({
1650
- kind: z16.literal("tier"),
1717
+ var tierRewardSchema = z17.object({
1718
+ kind: z17.literal("tier"),
1651
1719
  reward: tieredRewardDefinitionSchema,
1652
1720
  tier: identifier
1653
1721
  }).strict().refine(
1654
1722
  (value) => value.reward.tiers.some((t) => t.id === value.tier),
1655
1723
  "Unknown reward tier"
1656
1724
  );
1657
- var integrationRewardSchema = z16.object({
1658
- kind: z16.literal("integration"),
1659
- provider: z16.literal("discord"),
1660
- action: z16.literal("grant-role"),
1661
- roleId: z16.string().regex(/^[0-9]{1,20}$/)
1725
+ var integrationRewardSchema = z17.object({
1726
+ kind: z17.literal("integration"),
1727
+ provider: z17.literal("discord"),
1728
+ action: z17.literal("grant-role"),
1729
+ roleId: z17.string().regex(/^[0-9]{1,20}$/)
1662
1730
  }).strict();
1663
- var rewardSchema = z16.union([
1731
+ var rewardSchema = z17.union([
1664
1732
  pointsRewardSchema,
1665
1733
  tierRewardSchema,
1666
1734
  integrationRewardSchema
@@ -1671,26 +1739,26 @@ function rewardKey(reward) {
1671
1739
  }
1672
1740
  return reward.kind === "points" ? "points:" + reward.balance : "tier:" + reward.reward.id;
1673
1741
  }
1674
- var triggerSchema = z16.union([
1675
- z16.object({
1676
- kind: z16.literal("manual"),
1677
- input: z16.literal("text"),
1742
+ var triggerSchema = z17.union([
1743
+ z17.object({
1744
+ kind: z17.literal("manual"),
1745
+ input: z17.literal("text"),
1678
1746
  constraints: textOptionsSchema,
1679
- actor: z16.enum(["member", "staff"]).optional()
1747
+ actor: z17.enum(["member", "staff"]).optional()
1680
1748
  }).strict(),
1681
- z16.object({
1682
- kind: z16.literal("manual"),
1683
- input: z16.literal("url"),
1749
+ z17.object({
1750
+ kind: z17.literal("manual"),
1751
+ input: z17.literal("url"),
1684
1752
  constraints: urlOptionsSchema,
1685
- actor: z16.enum(["member", "staff"]).optional()
1753
+ actor: z17.enum(["member", "staff"]).optional()
1686
1754
  }).strict(),
1687
- z16.object({
1688
- kind: z16.literal("manual"),
1689
- input: z16.enum(["photo", "quiz", "none"]),
1690
- actor: z16.enum(["member", "staff"]).optional()
1755
+ z17.object({
1756
+ kind: z17.literal("manual"),
1757
+ input: z17.enum(["photo", "quiz", "none"]),
1758
+ actor: z17.enum(["member", "staff"]).optional()
1691
1759
  }).strict(),
1692
- z16.object({
1693
- kind: z16.literal("automatic"),
1760
+ z17.object({
1761
+ kind: z17.literal("automatic"),
1694
1762
  observation: observationTriggerSchema.optional(),
1695
1763
  content: contentPolicySchema.optional(),
1696
1764
  tracker: trackerTriggerPolicySchema.optional()
@@ -1699,48 +1767,48 @@ var triggerSchema = z16.union([
1699
1767
  "Choose one automatic trigger source"
1700
1768
  )
1701
1769
  ]);
1702
- var prerequisiteSchema = z16.object({ quest: identifier });
1703
- var photoResultSchema = z16.object({
1704
- kind: z16.enum(["pass", "fail", "unclear"]),
1705
- reason: z16.string().min(1).max(2e3)
1770
+ var prerequisiteSchema = z17.object({ quest: identifier });
1771
+ var photoResultSchema = z17.object({
1772
+ kind: z17.enum(["pass", "fail", "unclear"]),
1773
+ reason: z17.string().min(1).max(2e3)
1706
1774
  }).strict();
1707
- var textReviewInputSchema = z16.object({
1708
- text: z16.string().min(1).max(16e3).refine((value) => value.trim().length > 0, "Text must not be blank"),
1709
- criteria: z16.string().trim().min(1).max(2e3)
1775
+ var textReviewInputSchema = z17.object({
1776
+ text: z17.string().min(1).max(16e3).refine((value) => value.trim().length > 0, "Text must not be blank"),
1777
+ criteria: z17.string().trim().min(1).max(2e3)
1710
1778
  }).strict();
1711
1779
  var textResultSchema = photoResultSchema;
1712
- var decisionSchema = z16.discriminatedUnion("kind", [
1713
- z16.object({
1714
- kind: z16.literal("accept"),
1715
- rewards: z16.array(rewardSchema).max(10),
1780
+ var decisionSchema = z17.discriminatedUnion("kind", [
1781
+ z17.object({
1782
+ kind: z17.literal("accept"),
1783
+ rewards: z17.array(rewardSchema).max(10),
1716
1784
  completionKey: completionKeySchema.optional()
1717
1785
  }).strict(),
1718
- z16.object({
1719
- kind: z16.literal("reject"),
1720
- reason: z16.string().min(1).max(2e3),
1786
+ z17.object({
1787
+ kind: z17.literal("reject"),
1788
+ reason: z17.string().min(1).max(2e3),
1721
1789
  /** The evaluator asked for human review, but review is off for the quest, so this is a reject. */
1722
- requestedReview: z16.literal(true).optional()
1790
+ requestedReview: z17.literal(true).optional()
1723
1791
  }).strict(),
1724
- z16.object({
1725
- kind: z16.literal("review"),
1726
- reason: z16.string().min(1).max(2e3),
1727
- rewards: z16.array(rewardSchema).max(10).optional(),
1792
+ z17.object({
1793
+ kind: z17.literal("review"),
1794
+ reason: z17.string().min(1).max(2e3),
1795
+ rewards: z17.array(rewardSchema).max(10).optional(),
1728
1796
  completionKey: completionKeySchema.optional()
1729
1797
  }).strict()
1730
1798
  ]);
1731
- var reviewModeSchema = z16.enum(["workers-ai"]);
1732
- var storedReviewModeSchema = z16.enum([
1799
+ var reviewModeSchema = z17.enum(["workers-ai"]);
1800
+ var storedReviewModeSchema = z17.enum([
1733
1801
  "fixture-pass",
1734
1802
  "fixture-fail",
1735
1803
  "fixture-unclear",
1736
1804
  "fixture-error",
1737
1805
  "workers-ai"
1738
1806
  ]);
1739
- var rewardBundleSchema = z16.array(rewardSchema).max(10).refine(
1807
+ var rewardBundleSchema = z17.array(rewardSchema).max(10).refine(
1740
1808
  (rewards) => new Set(rewards.map(rewardKey)).size === rewards.length,
1741
1809
  "Use one entry per balance or shared reward"
1742
1810
  );
1743
- var mediaUrlSchema = z16.string().max(2e3).refine((value) => {
1811
+ var mediaUrlSchema = z17.string().max(2e3).refine((value) => {
1744
1812
  if (/^\/(?!\/)[^\\\s]*$/.test(value)) {
1745
1813
  return true;
1746
1814
  }
@@ -1750,82 +1818,85 @@ var mediaUrlSchema = z16.string().max(2e3).refine((value) => {
1750
1818
  return false;
1751
1819
  }
1752
1820
  }, "Use an HTTPS URL or a same-site path beginning with /");
1753
- var questPresentationSchema = z16.object({
1821
+ var questPresentationSchema = z17.object({
1754
1822
  quiz: quizQuestionsSchema.optional(),
1755
- instructions: z16.string().max(4e3).optional(),
1756
- video: z16.object({
1823
+ instructions: z17.string().max(4e3).optional(),
1824
+ video: z17.object({
1757
1825
  url: mediaUrlSchema,
1758
1826
  poster: mediaUrlSchema.optional(),
1759
- captions: z16.object({
1827
+ captions: z17.object({
1760
1828
  url: mediaUrlSchema,
1761
- language: z16.string().min(2).max(20),
1762
- label: z16.string().min(1).max(80)
1829
+ language: z17.string().min(2).max(20),
1830
+ label: z17.string().min(1).max(80)
1763
1831
  }).strict().optional()
1764
1832
  }).strict().optional()
1765
1833
  }).strict();
1766
- var questProfileSchema = z16.object({ visible: z16.boolean() }).strict();
1767
- var questDescriptionSchema = z16.object({
1834
+ var questProfileSchema = z17.object({ visible: z17.boolean() }).strict();
1835
+ var questDescriptionSchema = z17.object({
1768
1836
  quest: identifier,
1769
- runtimeVersion: z16.union([z16.literal(1), z16.literal(2)]).default(1),
1770
- title: z16.string().min(1).max(120),
1837
+ runtimeVersion: z17.union([z17.literal(1), z17.literal(2)]).default(1),
1838
+ title: z17.string().min(1).max(120),
1771
1839
  presentation: questPresentationSchema.default({}),
1772
- integrations: z16.array(integrationProviderSchema).max(10).default([]),
1840
+ integrations: z17.array(integrationProviderSchema).max(10).default([]),
1773
1841
  fields: settingsFieldsSchema,
1774
1842
  values: settingsValuesSchema,
1775
1843
  rewards: rewardBundleSchema,
1776
- humanReview: z16.boolean(),
1844
+ humanReview: z17.boolean(),
1777
1845
  trigger: triggerSchema,
1778
1846
  performance: contentPerformancePolicySchema.optional(),
1779
- requires: z16.array(prerequisiteSchema).max(30).default([]),
1780
- completion: completionPolicySchema,
1781
- visibility: z16.enum(["visible", "hidden"]).default("visible"),
1847
+ requires: z17.array(prerequisiteSchema).max(30).default([]),
1848
+ completion: z17.preprocess(refuseStreakTimeZone, completionPolicySchema),
1849
+ visibility: z17.enum(["visible", "hidden"]).default("visible"),
1782
1850
  /**
1783
1851
  * Whether completions show on participant profiles (`/v1/profiles/:id/completions`). Absent
1784
1852
  * is hidden. Optional, not defaulted: releases carry the key only when the author sets it, so
1785
1853
  * clients and pods that predate it (strict release schemas) still read every other release.
1786
1854
  */
1787
1855
  profile: questProfileSchema.optional(),
1788
- budgets: z16.array(budgetSchema).max(20).default([])
1856
+ budgets: z17.array(budgetSchema).max(20).default([])
1789
1857
  }).strict();
1790
- var artifactSchema = z16.object({ code: z16.string().min(1).max(1e6) }).strict();
1858
+ var artifactSchema = z17.object({ code: z17.string().min(1).max(1e6) }).strict();
1791
1859
  var releaseSchema = artifactSchema.extend({
1792
1860
  settings: settingsValuesSchema,
1793
1861
  provider: reviewModeSchema,
1794
1862
  expectedRelease: identifier.nullable().optional(),
1795
- settingRenames: z16.record(z16.string(), z16.string()).optional()
1863
+ settingRenames: z17.record(z17.string(), z17.string()).optional()
1796
1864
  }).strict();
1797
- var batchReleaseSchema = z16.object({ releases: z16.array(releaseSchema).min(1).max(50) }).strict();
1798
- var questSettingsInputSchema = z16.object({
1865
+ var batchReleaseSchema = z17.object({ releases: z17.array(releaseSchema).min(1).max(50) }).strict();
1866
+ var questSettingsInputSchema = z17.object({
1799
1867
  quest: identifier,
1800
1868
  expectedRelease: identifier,
1801
1869
  set: settingsValuesSchema,
1802
- reset: z16.array(z16.string())
1870
+ reset: z17.array(z17.string())
1803
1871
  }).strict();
1804
- var storedReleaseSchema = questDescriptionSchema.extend({
1872
+ var storedQuestDescriptionSchema = questDescriptionSchema.extend({
1873
+ completion: completionPolicySchema
1874
+ });
1875
+ var storedReleaseSchema = storedQuestDescriptionSchema.extend({
1805
1876
  key: identifier.optional(),
1806
- code: z16.string(),
1877
+ code: z17.string(),
1807
1878
  provider: storedReviewModeSchema,
1808
1879
  id: identifier,
1809
- createdAt: z16.number(),
1810
- legacy: z16.boolean().default(false),
1811
- origin: z16.object({ typeVersion: identifier }).strict().optional(),
1812
- lifecycle: z16.enum(["active", "paused", "archived"]).default("active"),
1813
- configuration: z16.object({
1880
+ createdAt: z17.number(),
1881
+ legacy: z17.boolean().default(false),
1882
+ origin: z17.object({ typeVersion: identifier }).strict().optional(),
1883
+ lifecycle: z17.enum(["active", "paused", "archived"]).default("active"),
1884
+ configuration: z17.object({
1814
1885
  defaults: settingsValuesSchema,
1815
1886
  overrides: settingsValuesSchema,
1816
- preserved: z16.array(z16.string())
1887
+ preserved: z17.array(z17.string())
1817
1888
  }).strict().optional()
1818
1889
  });
1819
- var legacyReleaseSchema = z16.object({
1890
+ var legacyReleaseSchema = z17.object({
1820
1891
  quest: identifier,
1821
- title: z16.string(),
1822
- criteria: z16.string(),
1823
- humanReview: z16.boolean(),
1892
+ title: z17.string(),
1893
+ criteria: z17.string(),
1894
+ humanReview: z17.boolean(),
1824
1895
  rewards: rewardBundleSchema,
1825
- code: z16.string(),
1896
+ code: z17.string(),
1826
1897
  provider: storedReviewModeSchema,
1827
1898
  id: identifier,
1828
- createdAt: z16.number()
1899
+ createdAt: z17.number()
1829
1900
  }).transform((r) => {
1830
1901
  const { criteria, ...stored } = r;
1831
1902
  return storedReleaseSchema.parse({
@@ -1837,15 +1908,15 @@ var legacyReleaseSchema = z16.object({
1837
1908
  legacy: true
1838
1909
  });
1839
1910
  });
1840
- var publishedReleaseSchema = z16.union([
1911
+ var publishedReleaseSchema = z17.union([
1841
1912
  storedReleaseSchema,
1842
1913
  legacyReleaseSchema
1843
1914
  ]);
1844
- var templateSchema = z16.object({
1845
- code: z16.string(),
1915
+ var templateSchema = z17.object({
1916
+ code: z17.string(),
1846
1917
  definition: questDescriptionSchema
1847
1918
  });
1848
- var quizAnswersSchema = z16.record(identifier, identifier).refine(
1919
+ var quizAnswersSchema = z17.record(identifier, identifier).refine(
1849
1920
  (answers) => Object.keys(answers).length > 0 && Object.keys(answers).length <= 50,
1850
1921
  "Provide between 1 and 50 answers"
1851
1922
  ).transform(
@@ -1853,33 +1924,33 @@ var quizAnswersSchema = z16.record(identifier, identifier).refine(
1853
1924
  Object.entries(answers).sort(([a], [b]) => a.localeCompare(b))
1854
1925
  )
1855
1926
  );
1856
- var quizEvidenceSchema = z16.object({
1857
- kind: z16.literal("quiz"),
1927
+ var quizEvidenceSchema = z17.object({
1928
+ kind: z17.literal("quiz"),
1858
1929
  release: identifier.optional(),
1859
1930
  answers: quizAnswersSchema
1860
1931
  }).strict();
1861
- var submissionEvidenceSchema = z16.union([
1932
+ var submissionEvidenceSchema = z17.union([
1862
1933
  quizEvidenceSchema,
1863
1934
  textEvidenceSchema,
1864
1935
  urlEvidenceSchema
1865
1936
  ]);
1866
- var submitSchema = z16.object({
1937
+ var submitSchema = z17.object({
1867
1938
  actionId: identifier,
1868
1939
  quest: identifier,
1869
1940
  member: identifier,
1870
1941
  evidence: identifier.optional(),
1871
1942
  input: submissionEvidenceSchema.optional(),
1872
1943
  release: identifier.optional(),
1873
- faultAfterReview: z16.boolean().optional()
1944
+ faultAfterReview: z17.boolean().optional()
1874
1945
  }).strict();
1875
- var attemptSchema = z16.object({
1946
+ var attemptSchema = z17.object({
1876
1947
  id: identifier,
1877
1948
  release: identifier,
1878
1949
  quest: identifier,
1879
1950
  member: identifier,
1880
1951
  evidence: identifier.nullable(),
1881
1952
  input: submissionEvidenceSchema.optional(),
1882
- status: z16.enum([
1953
+ status: z17.enum([
1883
1954
  "queued",
1884
1955
  "evaluating",
1885
1956
  "accepted",
@@ -1888,75 +1959,75 @@ var attemptSchema = z16.object({
1888
1959
  "needs-review",
1889
1960
  "failed"
1890
1961
  ]),
1891
- reason: z16.string().nullable(),
1892
- retries: z16.number(),
1893
- generation: z16.number(),
1894
- completion: z16.string().nullable(),
1962
+ reason: z17.string().nullable(),
1963
+ retries: z17.number(),
1964
+ generation: z17.number(),
1965
+ completion: z17.string().nullable(),
1895
1966
  reviewRewards: rewardBundleSchema.nullable().default(null),
1896
1967
  /**
1897
1968
  * The evaluator asked for human review of a quest with review off, so Domino rejected the attempt
1898
1969
  * with the evaluator's reason. Only set on a rejected attempt.
1899
1970
  */
1900
- requestedReview: z16.boolean().default(false),
1901
- createdAt: z16.number()
1902
- });
1903
- var eventSchema = z16.object({
1904
- id: z16.number(),
1905
- attempt: z16.string().nullable(),
1906
- kind: z16.string(),
1907
- detail: z16.string(),
1908
- actor: z16.string().nullable().default(null),
1909
- at: z16.number()
1910
- });
1911
- var pickupSelectionSchema = z16.object({
1971
+ requestedReview: z17.boolean().default(false),
1972
+ createdAt: z17.number()
1973
+ });
1974
+ var eventSchema = z17.object({
1975
+ id: z17.number(),
1976
+ attempt: z17.string().nullable(),
1977
+ kind: z17.string(),
1978
+ detail: z17.string(),
1979
+ actor: z17.string().nullable().default(null),
1980
+ at: z17.number()
1981
+ });
1982
+ var pickupSelectionSchema = z17.object({
1912
1983
  item: identifier,
1913
- revision: z16.number().int().nonnegative()
1984
+ revision: z17.number().int().nonnegative()
1914
1985
  }).strict();
1915
- var pickupAllocationSchema = z16.object({
1986
+ var pickupAllocationSchema = z17.object({
1916
1987
  item: identifier,
1917
- label: z16.string().min(1).max(80)
1988
+ label: z17.string().min(1).max(80)
1918
1989
  }).strict();
1919
- var pickupPolicySchema = z16.discriminatedUnion("kind", [
1920
- z16.object({ kind: z16.literal("untracked") }).strict(),
1921
- z16.object({
1922
- kind: z16.literal("at-pickup"),
1923
- tiers: z16.array(
1924
- z16.object({
1990
+ var pickupPolicySchema = z17.discriminatedUnion("kind", [
1991
+ z17.object({ kind: z17.literal("untracked") }).strict(),
1992
+ z17.object({
1993
+ kind: z17.literal("at-pickup"),
1994
+ tiers: z17.array(
1995
+ z17.object({
1925
1996
  tier: identifier,
1926
- variants: z16.array(pickupAllocationSchema).min(1).max(100)
1997
+ variants: z17.array(pickupAllocationSchema).min(1).max(100)
1927
1998
  }).strict()
1928
1999
  ).min(1).max(100)
1929
2000
  }).strict()
1930
2001
  ]);
1931
- var pickupCatalogSchema = z16.object({
2002
+ var pickupCatalogSchema = z17.object({
1932
2003
  reward: tieredRewardDefinitionSchema,
1933
- revision: z16.number().int().nonnegative(),
2004
+ revision: z17.number().int().nonnegative(),
1934
2005
  policy: pickupPolicySchema
1935
2006
  });
1936
- var pickupAvailabilitySchema = z16.discriminatedUnion("kind", [
1937
- z16.object({ kind: z16.literal("untracked") }).strict(),
1938
- z16.object({
1939
- kind: z16.literal("at-pickup"),
1940
- revision: z16.number().int().nonnegative(),
1941
- variants: z16.array(
2007
+ var pickupAvailabilitySchema = z17.discriminatedUnion("kind", [
2008
+ z17.object({ kind: z17.literal("untracked") }).strict(),
2009
+ z17.object({
2010
+ kind: z17.literal("at-pickup"),
2011
+ revision: z17.number().int().nonnegative(),
2012
+ variants: z17.array(
1942
2013
  pickupAllocationSchema.extend({
1943
- available: z16.number().int().nonnegative()
2014
+ available: z17.number().int().nonnegative()
1944
2015
  })
1945
2016
  )
1946
2017
  }).strict()
1947
2018
  ]);
1948
- var configurePickupSchema = z16.object({
2019
+ var configurePickupSchema = z17.object({
1949
2020
  reward: identifier,
1950
- revision: z16.number().int().nonnegative(),
2021
+ revision: z17.number().int().nonnegative(),
1951
2022
  actionId: identifier,
1952
- policy: z16.discriminatedUnion("kind", [
1953
- z16.object({ kind: z16.literal("untracked") }).strict(),
1954
- z16.object({
1955
- kind: z16.literal("at-pickup"),
1956
- tiers: z16.array(
1957
- z16.object({
2023
+ policy: z17.discriminatedUnion("kind", [
2024
+ z17.object({ kind: z17.literal("untracked") }).strict(),
2025
+ z17.object({
2026
+ kind: z17.literal("at-pickup"),
2027
+ tiers: z17.array(
2028
+ z17.object({
1958
2029
  tier: identifier,
1959
- variants: z16.array(
2030
+ variants: z17.array(
1960
2031
  pickupAllocationSchema.extend({
1961
2032
  item: identifier.optional()
1962
2033
  })
@@ -1972,164 +2043,164 @@ var entitlementBase = {
1972
2043
  reward: tieredRewardDefinitionSchema,
1973
2044
  earnedTier: identifier,
1974
2045
  tier: identifier,
1975
- revision: z16.number().int().positive()
2046
+ revision: z17.number().int().positive()
1976
2047
  };
1977
- var entitlementSchema = z16.discriminatedUnion("status", [
1978
- z16.object({ ...entitlementBase, status: z16.literal("available") }).strict(),
1979
- z16.object({
2048
+ var entitlementSchema = z17.discriminatedUnion("status", [
2049
+ z17.object({ ...entitlementBase, status: z17.literal("available") }).strict(),
2050
+ z17.object({
1980
2051
  ...entitlementBase,
1981
- status: z16.literal("handing-over"),
2052
+ status: z17.literal("handing-over"),
1982
2053
  handover: identifier,
1983
- startedAt: z16.number(),
2054
+ startedAt: z17.number(),
1984
2055
  allocation: pickupAllocationSchema.optional()
1985
2056
  }).strict(),
1986
- z16.object({
2057
+ z17.object({
1987
2058
  ...entitlementBase,
1988
- status: z16.literal("collected"),
2059
+ status: z17.literal("collected"),
1989
2060
  handover: identifier,
1990
- startedAt: z16.number(),
2061
+ startedAt: z17.number(),
1991
2062
  allocation: pickupAllocationSchema.optional(),
1992
- collectedAt: z16.number()
2063
+ collectedAt: z17.number()
1993
2064
  }).strict()
1994
2065
  ]);
1995
- var beginHandoverSchema = z16.object({
2066
+ var beginHandoverSchema = z17.object({
1996
2067
  actionId: identifier,
1997
- revision: z16.number().int().positive(),
2068
+ revision: z17.number().int().positive(),
1998
2069
  selection: pickupSelectionSchema.optional()
1999
2070
  }).strict();
2000
- var confirmHandoverSchema = z16.object({ actionId: identifier, handover: identifier }).strict();
2001
- var completionRecordSchema = z16.object({
2002
- key: z16.string().default("once"),
2071
+ var confirmHandoverSchema = z17.object({ actionId: identifier, handover: identifier }).strict();
2072
+ var completionRecordSchema = z17.object({
2073
+ key: z17.string().default("once"),
2003
2074
  id: identifier,
2004
2075
  quest: identifier,
2005
2076
  member: identifier
2006
2077
  });
2007
- var questAvailabilitySchema = z16.discriminatedUnion("kind", [
2008
- z16.object({
2009
- kind: z16.literal("available"),
2010
- input: z16.enum(["photo", "quiz", "none", "text", "url"])
2078
+ var questAvailabilitySchema = z17.discriminatedUnion("kind", [
2079
+ z17.object({
2080
+ kind: z17.literal("available"),
2081
+ input: z17.enum(["photo", "quiz", "none", "text", "url"])
2011
2082
  }).strict(),
2012
- z16.object({ kind: z16.literal("completed") }).strict(),
2013
- z16.object({
2014
- kind: z16.literal("locked"),
2015
- missing: z16.array(z16.object({ quest: identifier, title: z16.string() })).min(1)
2083
+ z17.object({ kind: z17.literal("completed") }).strict(),
2084
+ z17.object({
2085
+ kind: z17.literal("locked"),
2086
+ missing: z17.array(z17.object({ quest: identifier, title: z17.string() })).min(1)
2016
2087
  }).strict(),
2017
- z16.object({ kind: z16.literal("staff-required") }).strict(),
2018
- z16.object({
2019
- kind: z16.literal("automatic"),
2088
+ z17.object({ kind: z17.literal("staff-required") }).strict(),
2089
+ z17.object({
2090
+ kind: z17.literal("automatic"),
2020
2091
  observation: observationTriggerSchema.optional()
2021
2092
  }).strict(),
2022
- z16.object({ kind: z16.literal("checking"), attempt: identifier }).strict(),
2023
- z16.object({ kind: z16.literal("needs-review"), attempt: identifier }).strict(),
2024
- z16.object({ kind: z16.literal("retryable"), attempt: identifier }).strict()
2093
+ z17.object({ kind: z17.literal("checking"), attempt: identifier }).strict(),
2094
+ z17.object({ kind: z17.literal("needs-review"), attempt: identifier }).strict(),
2095
+ z17.object({ kind: z17.literal("retryable"), attempt: identifier }).strict()
2025
2096
  ]);
2026
- var memberProgressSchema = z16.object({
2097
+ var memberProgressSchema = z17.object({
2027
2098
  member: identifier,
2028
- quests: z16.array(
2029
- z16.object({
2099
+ quests: z17.array(
2100
+ z17.object({
2030
2101
  quest: identifier,
2031
2102
  key: identifier.optional(),
2032
2103
  release: identifier.optional(),
2033
- title: z16.string(),
2104
+ title: z17.string(),
2034
2105
  presentation: questPresentationSchema.default({}),
2035
- connections: z16.array(authProviderSchema).default([]),
2106
+ connections: z17.array(authProviderSchema).default([]),
2036
2107
  trigger: triggerSchema,
2037
2108
  availability: questAvailabilitySchema,
2038
- completed: z16.boolean(),
2109
+ completed: z17.boolean(),
2039
2110
  completion: completionPolicySchema.default({ kind: "once" }),
2040
2111
  streak: streakProgressSchema.nullable().optional(),
2041
- completionCount: z16.number().int().nonnegative().default(0),
2042
- visibility: z16.enum(["visible", "hidden"]).default("visible"),
2043
- missing: z16.array(z16.object({ quest: identifier, title: z16.string() })),
2112
+ completionCount: z17.number().int().nonnegative().default(0),
2113
+ visibility: z17.enum(["visible", "hidden"]).default("visible"),
2114
+ missing: z17.array(z17.object({ quest: identifier, title: z17.string() })),
2044
2115
  attempt: attemptSchema.nullable()
2045
2116
  })
2046
2117
  ),
2047
- entitlements: z16.array(entitlementSchema)
2048
- });
2049
- var snapshotSchema = z16.object({
2050
- releases: z16.array(publishedReleaseSchema),
2051
- completions: z16.array(completionRecordSchema),
2052
- entitlements: z16.array(entitlementSchema),
2053
- attempts: z16.array(attemptSchema),
2054
- balances: z16.array(
2055
- z16.object({
2056
- member: z16.string(),
2057
- balance: z16.string(),
2058
- earned: z16.number(),
2059
- held: z16.number(),
2060
- available: z16.number()
2118
+ entitlements: z17.array(entitlementSchema)
2119
+ });
2120
+ var snapshotSchema = z17.object({
2121
+ releases: z17.array(publishedReleaseSchema),
2122
+ completions: z17.array(completionRecordSchema),
2123
+ entitlements: z17.array(entitlementSchema),
2124
+ attempts: z17.array(attemptSchema),
2125
+ balances: z17.array(
2126
+ z17.object({
2127
+ member: z17.string(),
2128
+ balance: z17.string(),
2129
+ earned: z17.number(),
2130
+ held: z17.number(),
2131
+ available: z17.number()
2061
2132
  })
2062
2133
  ),
2063
- events: z16.array(eventSchema)
2134
+ events: z17.array(eventSchema)
2064
2135
  });
2065
- var evidenceSchema = z16.object({
2136
+ var evidenceSchema = z17.object({
2066
2137
  id: identifier,
2067
2138
  member: identifier,
2068
- type: z16.enum(["image/jpeg", "image/png"]),
2069
- size: z16.number()
2139
+ type: z17.enum(["image/jpeg", "image/png"]),
2140
+ size: z17.number()
2070
2141
  });
2071
- var errorSchema = z16.object({
2072
- error: z16.string(),
2073
- code: z16.string().optional(),
2074
- missing: z16.array(z16.object({ quest: identifier, title: z16.string() })).optional()
2142
+ var errorSchema = z17.object({
2143
+ error: z17.string(),
2144
+ code: z17.string().optional(),
2145
+ missing: z17.array(z17.object({ quest: identifier, title: z17.string() })).optional()
2075
2146
  });
2076
- var staffDecisionSchema = z16.object({
2147
+ var staffDecisionSchema = z17.object({
2077
2148
  actionId: identifier,
2078
- generation: z16.number().int().nonnegative(),
2079
- decision: z16.enum(["accept", "reject"]),
2080
- reason: z16.string().trim().min(1).max(2e3)
2149
+ generation: z17.number().int().nonnegative(),
2150
+ decision: z17.enum(["accept", "reject"]),
2151
+ reason: z17.string().trim().min(1).max(2e3)
2081
2152
  }).strict();
2082
- var stockSchema = z16.object({ item: identifier, quantity: z16.number().int().min(0).max(1e4) }).strict();
2083
- var reservationSchema = z16.object({
2153
+ var stockSchema = z17.object({ item: identifier, quantity: z17.number().int().min(0).max(1e4) }).strict();
2154
+ var reservationSchema = z17.object({
2084
2155
  actionId: identifier,
2085
2156
  member: identifier,
2086
2157
  item: identifier,
2087
2158
  balance: identifier,
2088
- price: z16.number().int().positive().max(1e4)
2159
+ price: z17.number().int().positive().max(1e4)
2089
2160
  }).strict();
2090
2161
  var pageOptions = {
2091
- limit: z16.number().int().min(1).max(100).default(25),
2092
- cursor: z16.string().min(1).max(4096).optional()
2162
+ limit: z17.number().int().min(1).max(100).default(25),
2163
+ cursor: z17.string().min(1).max(4096).optional()
2093
2164
  };
2094
- var reviewListSchema = z16.object({
2165
+ var reviewListSchema = z17.object({
2095
2166
  ...pageOptions,
2096
2167
  member: identifier.optional(),
2097
2168
  quest: identifier.optional()
2098
2169
  }).strict();
2099
- var memberListSchema = z16.object({
2170
+ var memberListSchema = z17.object({
2100
2171
  ...pageOptions,
2101
2172
  prefix: identifier.optional()
2102
2173
  }).strict();
2103
- var reviewItemSchema = z16.object({
2174
+ var reviewItemSchema = z17.object({
2104
2175
  attempt: attemptSchema,
2105
- title: z16.string(),
2106
- checks: z16.array(
2107
- z16.object({ criteria: z16.string(), result: photoResultSchema })
2176
+ title: z17.string(),
2177
+ checks: z17.array(
2178
+ z17.object({ criteria: z17.string(), result: photoResultSchema })
2108
2179
  )
2109
2180
  });
2110
- var reviewPageSchema = z16.object({
2111
- items: z16.array(reviewItemSchema).max(100),
2112
- nextCursor: z16.string().nullable()
2181
+ var reviewPageSchema = z17.object({
2182
+ items: z17.array(reviewItemSchema).max(100),
2183
+ nextCursor: z17.string().nullable()
2113
2184
  });
2114
- var memberPageSchema = z16.object({
2115
- items: z16.array(z16.object({ member: identifier })).max(100),
2116
- nextCursor: z16.string().nullable()
2185
+ var memberPageSchema = z17.object({
2186
+ items: z17.array(z17.object({ member: identifier })).max(100),
2187
+ nextCursor: z17.string().nullable()
2117
2188
  });
2118
- var createStockItemSchema = z16.object({ actionId: identifier, name: z16.string().trim().min(1).max(80) }).strict();
2119
- var stockItemSchema = z16.object({ id: identifier, name: z16.string() });
2120
- var contentPerformanceSnapshotSchema = z16.strictObject({
2189
+ var createStockItemSchema = z17.object({ actionId: identifier, name: z17.string().trim().min(1).max(80) }).strict();
2190
+ var stockItemSchema = z17.object({ id: identifier, name: z17.string() });
2191
+ var contentPerformanceSnapshotSchema = z17.strictObject({
2121
2192
  contentAttempt: identifier,
2122
2193
  observation: identifier,
2123
- observedAt: z16.number().int().safe().nonnegative(),
2194
+ observedAt: z17.number().int().safe().nonnegative(),
2124
2195
  metrics: contentMetricsSchema,
2125
2196
  rewards: rewardBundleSchema
2126
2197
  });
2127
2198
  var contentPerformanceQuerySchema = contentQualificationQuerySchema.extend({
2128
- content: z16.string().min(1).max(256)
2199
+ content: z17.string().min(1).max(256)
2129
2200
  });
2130
- var contentPerformancePageSchema = z16.strictObject({
2131
- current: z16.strictObject({
2132
- state: z16.enum([
2201
+ var contentPerformancePageSchema = z17.strictObject({
2202
+ current: z17.strictObject({
2203
+ state: z17.enum([
2133
2204
  "content-pending",
2134
2205
  "content-unqualified",
2135
2206
  "waiting",
@@ -2140,19 +2211,19 @@ var contentPerformancePageSchema = z16.strictObject({
2140
2211
  "failed",
2141
2212
  "superseded"
2142
2213
  ]),
2143
- reason: z16.string().nullable(),
2214
+ reason: z17.string().nullable(),
2144
2215
  contentAttempt: identifier,
2145
2216
  attempt: identifier.nullable(),
2146
2217
  reward: contentQualificationSchema.shape.reward
2147
2218
  }),
2148
- items: z16.array(
2149
- z16.strictObject({
2219
+ items: z17.array(
2220
+ z17.strictObject({
2150
2221
  attempt: identifier,
2151
2222
  contentAttempt: identifier,
2152
2223
  observation: identifier,
2153
- observedAt: z16.number(),
2224
+ observedAt: z17.number(),
2154
2225
  metrics: contentMetricsSchema,
2155
- state: z16.enum([
2226
+ state: z17.enum([
2156
2227
  "pending",
2157
2228
  "qualified",
2158
2229
  "unqualified",
@@ -2160,7 +2231,7 @@ var contentPerformancePageSchema = z16.strictObject({
2160
2231
  "failed",
2161
2232
  "superseded"
2162
2233
  ]),
2163
- reason: z16.string().nullable()
2234
+ reason: z17.string().nullable()
2164
2235
  })
2165
2236
  ),
2166
2237
  nextCursor: pageCursorSchema.nullable()
@@ -2235,7 +2306,15 @@ export {
2235
2306
  contentMetricSchema,
2236
2307
  contentMetricsSchema,
2237
2308
  contentPerformancePolicySchema,
2238
- communityTimeZoneSchema,
2309
+ canonicalTimeZone,
2310
+ timeZoneSchema,
2311
+ timeZoneNameSchema,
2312
+ refuseStreakTimeZone,
2313
+ refuseWindowTimeZone,
2314
+ calendarPeriodSchema,
2315
+ projectCalendarSchema,
2316
+ projectCalendarInputSchema,
2317
+ projectCalendarDeclarationSchema,
2239
2318
  streakPolicySchema,
2240
2319
  streakProgressSchema,
2241
2320
  trackerTriggerModeSchema,
@@ -2309,6 +2388,7 @@ export {
2309
2388
  releaseSchema,
2310
2389
  batchReleaseSchema,
2311
2390
  questSettingsInputSchema,
2391
+ storedQuestDescriptionSchema,
2312
2392
  publishedReleaseSchema,
2313
2393
  templateSchema,
2314
2394
  quizAnswersSchema,