@domino-sdk/relay 1.59.0 → 1.61.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 (61) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/{accounts-CVonEkdb.d.ts → accounts-DoabriBX.d.ts} +4 -1
  3. package/dist/{integrations-DrbKQSTD.d.ts → announcements-CHx3-HBw.d.ts} +48 -42
  4. package/dist/{attempt-captures-DBj-rxak.d.ts → attempt-captures-DYnJVkfg.d.ts} +1 -1
  5. package/dist/authoring.d.ts +161 -29
  6. package/dist/authoring.js +116 -36
  7. package/dist/{automatic-outcomes-FS9okvBP.d.ts → automatic-outcomes-If88LR9f.d.ts} +1 -1
  8. package/dist/avatar.d.ts +1 -1
  9. package/dist/browser.d.ts +19 -10
  10. package/dist/browser.js +12 -10
  11. package/dist/{capability-error-DDJl0LY-.d.ts → capability-error-DufwG3G0.d.ts} +21 -1
  12. package/dist/{chunk-2LKGAL63.js → chunk-24I4R732.js} +39 -2
  13. package/dist/{chunk-UEMLYPKJ.js → chunk-3Y3L2F54.js} +34 -5
  14. package/dist/{chunk-YRSU2X2P.js → chunk-5I54XBK2.js} +2 -2
  15. package/dist/{chunk-KBCTII6C.js → chunk-7A4J67ZL.js} +1 -1
  16. package/dist/{chunk-LDLOB2UZ.js → chunk-DHXDBAJF.js} +4 -4
  17. package/dist/{chunk-W42KMMH5.js → chunk-DYXDZFKA.js} +5 -2
  18. package/dist/{chunk-TZJT5CRF.js → chunk-EN3M5Z4J.js} +1 -1
  19. package/dist/{chunk-IBROKMFV.js → chunk-L77O64I4.js} +1 -1
  20. package/dist/{chunk-EQF4ID47.js → chunk-PPB7HALD.js} +12 -2
  21. package/dist/{chunk-KYUQEZZA.js → chunk-QEAS4ZGS.js} +1 -1
  22. package/dist/{chunk-6U5WWH3W.js → chunk-QNUHWK7R.js} +9 -4
  23. package/dist/{chunk-YMWRLAAP.js → chunk-RHBS5FJL.js} +8 -2
  24. package/dist/chunk-SE4PFJPT.js +247 -0
  25. package/dist/{chunk-577DG2IT.js → chunk-SKGTNTLF.js} +12 -12
  26. package/dist/{chunk-M2JQPDUX.js → chunk-VURRFVNP.js} +9 -9
  27. package/dist/{chunk-R4S6BFOH.js → chunk-XBV2CK2H.js} +1 -1
  28. package/dist/{chunk-AWWCEP7F.js → chunk-ZDJLPN4L.js} +815 -592
  29. package/dist/{client-3b9HjSzZ.d.ts → client-C51w7fMb.d.ts} +12 -7
  30. package/dist/{deployments-BydFVj4Q.d.ts → deployments-kWoHFaqj.d.ts} +786 -2
  31. package/dist/{groups-CFuTfFqG.d.ts → groups-CqcA2Ycs.d.ts} +4 -1
  32. package/dist/index.d.ts +10 -10
  33. package/dist/index.js +9 -9
  34. package/dist/{analytics-URV-mxjH.d.ts → integrations-B3y36OaB.d.ts} +55 -1
  35. package/dist/internal.d.ts +11 -11
  36. package/dist/internal.js +8 -8
  37. package/dist/{offers-DAfe1O3_.d.ts → offers-BoV4ryUc.d.ts} +3 -2
  38. package/dist/{pages-ChDVLrgR.d.ts → pages-K7-KjSXw.d.ts} +147 -2
  39. package/dist/{participant-activity-iciCEs_8.d.ts → participant-activity-DHL8QYks.d.ts} +4 -0
  40. package/dist/portal-proxy.js +3 -3
  41. package/dist/react/index.d.ts +20 -15
  42. package/dist/react/index.js +143 -14
  43. package/dist/runtime/authoring.js +1 -1
  44. package/dist/runtime/chunks/5QVFB4TU.js +1 -0
  45. package/dist/runtime/manifest.json +3 -3
  46. package/dist/runtime/schema.js +1 -1
  47. package/dist/{schema-BA0nRRlt.d.ts → schema-CZ6Rj0ZF.d.ts} +142 -2
  48. package/dist/schema.d.ts +113 -18
  49. package/dist/schema.js +37 -21
  50. package/dist/server/index.d.ts +11 -11
  51. package/dist/server/index.js +346 -41
  52. package/dist/{submission-input-DxQ6RnKo.d.ts → submission-input-C54Q8yAD.d.ts} +2 -2
  53. package/dist/{telegram-browser-o3OIxGrJ.d.ts → telegram-browser-BUceZIGZ.d.ts} +7 -4
  54. package/dist/testing.d.ts +7 -7
  55. package/dist/testing.js +8 -8
  56. package/dist/{transport-D_Eqf78J.d.ts → transport-BrX9pIGN.d.ts} +5374 -62
  57. package/dist/{wallet-B06zvDXp.d.ts → wallet-CIqFoxdm.d.ts} +8 -1
  58. package/dist/{x-C28SNifw.d.ts → x-D1PGi8Sq.d.ts} +2 -2
  59. package/package.json +1 -1
  60. package/dist/chunk-XGXDINGM.js +0 -357
  61. package/dist/runtime/chunks/BG43KQ2T.js +0 -1
@@ -508,7 +508,9 @@ var discordResourceSourceSchema = z6.union([
508
508
  z6.strictObject({
509
509
  provider: z6.literal("discord"),
510
510
  resource: z6.literal("channel"),
511
- types: z6.array(z6.enum(["text", "announcement"])).min(1)
511
+ types: z6.array(z6.enum(["text", "announcement"])).min(1),
512
+ /** List channels Domino's bot cannot post in as unavailable, for an announcement's channel. */
513
+ postable: z6.literal(true).optional()
512
514
  }),
513
515
  z6.strictObject({
514
516
  provider: z6.literal("discord"),
@@ -923,26 +925,26 @@ function matches(schema, value, at, budget) {
923
925
  }
924
926
  }
925
927
  if (typeof value === "object" && value !== null && !Array.isArray(value)) {
926
- const object20 = value;
928
+ const object21 = value;
927
929
  const properties = schema.properties ?? {};
928
930
  const required = schema.required ?? [];
929
931
  charge(budget, required.length);
930
932
  for (const key of required) {
931
- if (!Object.hasOwn(object20, key)) {
933
+ if (!Object.hasOwn(object21, key)) {
932
934
  return issue(() => `missing required key "${clip(key, maxKeyText)}"`);
933
935
  }
934
936
  }
935
937
  const literals = literalsOf(schema);
936
938
  charge(budget, literals.length);
937
939
  for (const [key, property] of literals) {
938
- if (Object.hasOwn(object20, key) && object20[key] !== property.const) {
940
+ if (Object.hasOwn(object21, key) && object21[key] !== property.const) {
939
941
  return {
940
942
  at: { parent: at, key },
941
943
  reason: () => `expected ${JSON.stringify(property.const)}`
942
944
  };
943
945
  }
944
946
  }
945
- const keys = Object.keys(object20);
947
+ const keys = Object.keys(object21);
946
948
  charge(budget, keys.length);
947
949
  const names = schema.propertyNames?.enum;
948
950
  const allowed = names && setOf(schema.propertyNames, names);
@@ -963,7 +965,7 @@ function matches(schema, value, at, budget) {
963
965
  if (property && property !== true) {
964
966
  const found = matches(
965
967
  property,
966
- object20[key],
968
+ object21[key],
967
969
  { parent: at, key },
968
970
  budget
969
971
  );
@@ -2344,6 +2346,7 @@ var budgetSchema = z18.object({
2344
2346
  z18.object({ balance: name }).strict()
2345
2347
  ])
2346
2348
  }).strict();
2349
+ var authorBudgetSchema = budgetSchema.extend({ scope: z18.literal("author") }).strict();
2347
2350
  var memberCompletionSchema = z18.object({
2348
2351
  quest: z18.string().min(1).max(200),
2349
2352
  key: completionKeySchema,
@@ -2369,17 +2372,213 @@ var projectIntegrationSchema = z19.object({
2369
2372
  issue: z19.string().nullable(),
2370
2373
  connectedAt: z19.number().default(0)
2371
2374
  });
2375
+ var organizationDiscordServersSchema = z19.object({
2376
+ servers: z19.array(discordServerSchema)
2377
+ });
2372
2378
 
2373
- // src/wallet.ts
2379
+ // src/announcement-template.ts
2380
+ var announcementPlaceholders = [
2381
+ "beneficiary",
2382
+ "author",
2383
+ "quest",
2384
+ "points",
2385
+ "rewards"
2386
+ ];
2387
+ var placeholderNames = new Set(announcementPlaceholders);
2388
+ function parseAnnouncementTemplate(text) {
2389
+ const segments = [];
2390
+ let literal18 = "";
2391
+ let index = 0;
2392
+ while (index < text.length) {
2393
+ const char = text[index];
2394
+ if (char === "{" && text[index + 1] === "{") {
2395
+ literal18 += "{";
2396
+ index += 2;
2397
+ continue;
2398
+ }
2399
+ if (char === "}" && text[index + 1] === "}") {
2400
+ literal18 += "}";
2401
+ index += 2;
2402
+ continue;
2403
+ }
2404
+ if (char === "}") {
2405
+ return { error: "Write }} for a literal } in an announcement" };
2406
+ }
2407
+ if (char !== "{") {
2408
+ literal18 += char;
2409
+ index += 1;
2410
+ continue;
2411
+ }
2412
+ const end = text.indexOf("}", index);
2413
+ const name2 = end === -1 ? "" : text.slice(index + 1, end);
2414
+ if (!placeholderNames.has(name2)) {
2415
+ return {
2416
+ error: `Unknown announcement placeholder {${name2}}: use ${announcementPlaceholders.map((known) => `{${known}}`).join(", ")}, or {{ for a literal {`
2417
+ };
2418
+ }
2419
+ if (literal18) {
2420
+ segments.push({ kind: "text", text: literal18 });
2421
+ literal18 = "";
2422
+ }
2423
+ segments.push({
2424
+ kind: "placeholder",
2425
+ name: name2
2426
+ });
2427
+ index = end + 1;
2428
+ }
2429
+ if (literal18) {
2430
+ segments.push({ kind: "text", text: literal18 });
2431
+ }
2432
+ return { segments };
2433
+ }
2434
+
2435
+ // src/telegram.ts
2374
2436
  import * as z20 from "zod";
2375
- var solanaAddressSchema = z20.string().min(32).max(44).regex(/^[1-9A-HJ-NP-Za-km-z]+$/);
2376
- var walletChainSchema = z20.enum(["solana", "eip155", "cosmos"]);
2437
+ var telegramSignInMethodsSchema = z20.object({
2438
+ /** Telegram Login, the OpenID Connect sign-in Domino configures for the platform. */
2439
+ login: z20.boolean(),
2440
+ /** Mini App sign-in, which the project enables in Console with its bot's ID. */
2441
+ miniApp: z20.boolean()
2442
+ });
2443
+ var telegramAccountConnectionSchema = accountConnectionSchema.extend({
2444
+ provider: z20.literal("telegram")
2445
+ });
2446
+ var telegramInitDataSchema = z20.string().min(1, "Pass the Mini App's Telegram.WebApp.initData").max(8192);
2447
+ var telegramMiniAppSignInSchema = z20.object({
2448
+ initData: telegramInitDataSchema,
2449
+ mode: z20.enum(["sign-in", "connect"])
2450
+ }).strict();
2451
+ var telegramChatIdSchema = z20.string().regex(
2452
+ /^-?[1-9][0-9]{0,19}$/,
2453
+ "Use the chat's numeric ID, such as -1001234567890"
2454
+ );
2455
+ var telegramChatSchema = z20.object({
2456
+ /** The numeric chat ID, as a string. */
2457
+ id: telegramChatIdSchema,
2458
+ /** `group`, `supergroup` or `channel`; a later Telegram may add others. */
2459
+ type: z20.string(),
2460
+ title: z20.string(),
2461
+ /** The public @username, without the @, or null for a private chat. */
2462
+ username: z20.string().nullable(),
2463
+ status: z20.string(),
2464
+ issue: z20.string().nullable(),
2465
+ /**
2466
+ * Whether Domino's bot may post in the chat, as announcements do: as an administrator of a
2467
+ * group, or with the right to post in a channel. Absent from older Relay versions.
2468
+ */
2469
+ canPost: z20.boolean().optional(),
2470
+ connectedAt: z20.number()
2471
+ });
2472
+ var telegramChatsSchema = z20.object({
2473
+ configured: z20.boolean(),
2474
+ /** Domino's bot, the one operators add to their chats. */
2475
+ bot: z20.object({ username: z20.string() }).nullable(),
2476
+ chats: z20.array(telegramChatSchema)
2477
+ });
2478
+ var telegramChatConnectionSchema = z20.object({
2479
+ url: z20.string(),
2480
+ expiresAt: z20.number()
2481
+ });
2482
+ var telegramMemberInputSchema = z20.object({
2483
+ chat: z20.string().regex(
2484
+ /^(-?[1-9][0-9]{0,19}|@[A-Za-z][A-Za-z0-9_]{3,31})$/,
2485
+ "Name a chat the project connected, by its numeric ID or @username"
2486
+ )
2487
+ }).strict();
2488
+ var telegramChatMemberSchema = z20.object({
2489
+ /** The numeric Telegram user ID. */
2490
+ userId: z20.string(),
2491
+ username: z20.string().nullable(),
2492
+ status: z20.custom(
2493
+ (value) => typeof value === "string"
2494
+ ),
2495
+ /** Whether they are in the chat now: a creator, administrator, member, or restricted member. */
2496
+ isMember: z20.boolean(),
2497
+ /** Whether they are its creator or an administrator. */
2498
+ isAdmin: z20.boolean(),
2499
+ /** When a paid subscription or a restriction ends, epoch milliseconds; null when it does not. */
2500
+ untilDate: z20.number().nullable()
2501
+ });
2502
+ var telegramReactionDataSchema = z20.object({
2503
+ /** The chat's numeric ID, as a string. */
2504
+ chatId: z20.string(),
2505
+ /** `group` or `supergroup`: channel reactions are anonymous and never recorded. */
2506
+ chatType: z20.string(),
2507
+ messageId: z20.number(),
2508
+ /** `emoji`, `custom_emoji` or `paid`. */
2509
+ reactionType: z20.string(),
2510
+ /** The emoji, such as "❤", for an `emoji` reaction; null otherwise. */
2511
+ emoji: z20.string().nullable(),
2512
+ /** The custom emoji's ID for a `custom_emoji` reaction; null otherwise. */
2513
+ customEmojiId: z20.string().nullable(),
2514
+ /**
2515
+ * `creator` or `administrator` for one of the chat's administrators, read at most ten minutes
2516
+ * before Relay recorded the reaction; `member` for anyone else.
2517
+ */
2518
+ reactorStatus: z20.string(),
2519
+ /** Whether the reactor was the chat's creator or an administrator then. */
2520
+ reactorIsAdmin: z20.boolean()
2521
+ });
2522
+ var telegramMessageDataSchema = z20.object({
2523
+ /** The chat's numeric ID, as a string. */
2524
+ chatId: z20.string(),
2525
+ /** `group` or `supergroup`: channel posts are authored by the channel and never recorded. */
2526
+ chatType: z20.string(),
2527
+ messageId: z20.number(),
2528
+ /** The ID of the message it replies to in the same chat; null when it is not a reply. */
2529
+ replyToMessageId: z20.number().nullable(),
2530
+ /**
2531
+ * The message thread it belongs to: the forum topic in a supergroup with topics, or the reply
2532
+ * thread otherwise. Null when Telegram names none.
2533
+ */
2534
+ threadId: z20.number().nullable()
2535
+ });
2536
+
2537
+ // src/announcements.ts
2538
+ import * as z21 from "zod";
2539
+ var announcementTextSchema = z21.string().trim().min(1).max(1e3).superRefine((text, context) => {
2540
+ const parsed = parseAnnouncementTemplate(text);
2541
+ if ("error" in parsed) {
2542
+ context.addIssue({ code: "custom", message: parsed.error });
2543
+ }
2544
+ });
2545
+ var announcementFields = {
2546
+ action: z21.literal("post-message"),
2547
+ text: announcementTextSchema,
2548
+ /**
2549
+ * Post as a reply to the message that triggered the completion: the message itself, or the
2550
+ * message a reaction was added to. Only when that message is in the same chat or channel; the
2551
+ * post is a plain message otherwise.
2552
+ */
2553
+ replyToTriggeringMessage: z21.boolean().optional()
2554
+ };
2555
+ var telegramAnnouncementSchema = z21.strictObject({
2556
+ provider: z21.literal("telegram"),
2557
+ /** The chat's numeric ID, as `settings.telegramChat()` holds it. */
2558
+ chat: telegramChatIdSchema,
2559
+ ...announcementFields
2560
+ });
2561
+ var discordAnnouncementSchema = z21.strictObject({
2562
+ provider: z21.literal("discord"),
2563
+ /** The channel's ID, as a `discord.channels()` resource setting holds it. */
2564
+ channel: z21.string().regex(/^[0-9]{1,20}$/),
2565
+ ...announcementFields
2566
+ });
2567
+ var announcementSchema = z21.discriminatedUnion("provider", [
2568
+ telegramAnnouncementSchema,
2569
+ discordAnnouncementSchema
2570
+ ]);
2571
+
2572
+ // src/wallet.ts
2573
+ import * as z22 from "zod";
2574
+ var solanaAddressSchema = z22.string().min(32).max(44).regex(/^[1-9A-HJ-NP-Za-km-z]+$/);
2575
+ var walletChainSchema = z22.enum(["solana", "eip155", "cosmos"]);
2377
2576
  var cosmosNetworkPattern = /^cosmos:[-_a-zA-Z0-9]{1,32}$/;
2378
- var cosmosNetworkSchema = z20.custom(
2577
+ var cosmosNetworkSchema = z22.custom(
2379
2578
  (value) => typeof value === "string" && cosmosNetworkPattern.test(value),
2380
2579
  "Use a Cosmos network: cosmos:<chain ID>"
2381
2580
  );
2382
- var cosmosDenomSchema = z20.string().regex(
2581
+ var cosmosDenomSchema = z22.string().regex(
2383
2582
  /^[a-zA-Z][a-zA-Z0-9/:._-]{2,127}$/,
2384
2583
  "Use a Cosmos bank denomination such as uatom or uosmo"
2385
2584
  );
@@ -2405,51 +2604,51 @@ function cosmosChain(chain) {
2405
2604
  return { ...value, network };
2406
2605
  }
2407
2606
  var solanaMainnet = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
2408
- var evmAddressSchema = z20.string().regex(/^0x[0-9a-fA-F]{40}$/);
2409
- var cosmosAddressSchema = z20.string().min(8).max(90).regex(
2607
+ var evmAddressSchema = z22.string().regex(/^0x[0-9a-fA-F]{40}$/);
2608
+ var cosmosAddressSchema = z22.string().min(8).max(90).regex(
2410
2609
  /^(?:[a-z][a-z0-9]{0,82}1[02-9ac-hj-np-z]{38,}|[A-Z][A-Z0-9]{0,82}1[02-9AC-HJ-NP-Z]{38,})$/
2411
2610
  );
2412
- var walletAddressInputSchema = z20.discriminatedUnion("chain", [
2413
- z20.object({ chain: z20.literal("solana"), address: solanaAddressSchema }).strict(),
2414
- z20.object({
2415
- chain: z20.literal("eip155"),
2611
+ var walletAddressInputSchema = z22.discriminatedUnion("chain", [
2612
+ z22.object({ chain: z22.literal("solana"), address: solanaAddressSchema }).strict(),
2613
+ z22.object({
2614
+ chain: z22.literal("eip155"),
2416
2615
  address: evmAddressSchema,
2417
2616
  /** Shown in the sign-in message's Chain ID line only: links are chain-agnostic. Defaults to 1. */
2418
- chainId: z20.number().int().positive().safe().optional()
2617
+ chainId: z22.number().int().positive().safe().optional()
2419
2618
  }).strict(),
2420
- z20.object({
2421
- chain: z20.literal("cosmos"),
2619
+ z22.object({
2620
+ chain: z22.literal("cosmos"),
2422
2621
  network: cosmosNetworkSchema,
2423
2622
  address: cosmosAddressSchema
2424
2623
  }).strict()
2425
2624
  ]);
2426
- var walletMessageChallengeSchema = z20.object({
2427
- id: z20.string().min(1).max(200),
2428
- purpose: z20.enum(["link", "sign-in"]),
2625
+ var walletMessageChallengeSchema = z22.object({
2626
+ id: z22.string().min(1).max(200),
2627
+ purpose: z22.enum(["link", "sign-in"]),
2429
2628
  chain: walletChainSchema,
2430
2629
  network: cosmosNetworkSchema.nullable(),
2431
2630
  /** Canonical (base58, EIP-55 or lowercase bech32). The signer must sign with this address. */
2432
- address: z20.string(),
2433
- message: z20.string().max(4096),
2434
- expiresAt: z20.number().int()
2631
+ address: z22.string(),
2632
+ message: z22.string().max(4096),
2633
+ expiresAt: z22.number().int()
2435
2634
  });
2436
- var walletSignatureSchema = z20.object({
2437
- challenge: z20.string().min(1).max(200),
2635
+ var walletSignatureSchema = z22.object({
2636
+ challenge: z22.string().min(1).max(200),
2438
2637
  /** solana: base58, 64 bytes · eip155: 0x and 130 hex digits (65 bytes) · cosmos: base64, 64 bytes (r‖s) */
2439
- signature: z20.string().min(1).max(256),
2638
+ signature: z22.string().min(1).max(256),
2440
2639
  /** cosmos only: the base64 33-byte compressed secp256k1 key from signArbitrary's pub_key.value */
2441
- publicKey: z20.string().max(128).optional()
2640
+ publicKey: z22.string().max(128).optional()
2442
2641
  }).strict();
2443
- var linkedWalletSchema = z20.object({
2642
+ var linkedWalletSchema = z22.object({
2444
2643
  chain: walletChainSchema,
2445
2644
  network: cosmosNetworkSchema.nullable(),
2446
- address: z20.string(),
2447
- verifiedAt: z20.number().int().nonnegative(),
2448
- revision: z20.number().int().positive(),
2645
+ address: z22.string(),
2646
+ verifiedAt: z22.number().int().nonnegative(),
2647
+ revision: z22.number().int().positive(),
2449
2648
  /** True when this wallet can sign in: it was first used through wallet sign-in. Linking never enables sign-in. */
2450
- signIn: z20.boolean()
2649
+ signIn: z22.boolean()
2451
2650
  });
2452
- var walletUnlinkInputSchema = z20.object({ chain: walletChainSchema, address: z20.string().min(1).max(100) }).strict();
2651
+ var walletUnlinkInputSchema = z22.object({ chain: walletChainSchema, address: z22.string().min(1).max(100) }).strict();
2453
2652
  async function walletAddressInput(signer) {
2454
2653
  const address = await signer.address();
2455
2654
  switch (signer.chain) {
@@ -2473,8 +2672,8 @@ async function walletAddressInput(signer) {
2473
2672
  }
2474
2673
  var WALLETS_PER_CHAIN = 5;
2475
2674
  var walletSignInFamilies = ["solana", "eip155", "cosmos"];
2476
- var walletSignInNetworkSchema = z20.enum(walletSignInFamilies);
2477
- var walletSignInNetworksSchema = z20.array(walletSignInNetworkSchema).max(walletSignInFamilies.length).refine((values2) => new Set(values2).size === values2.length, {
2675
+ var walletSignInNetworkSchema = z22.enum(walletSignInFamilies);
2676
+ var walletSignInNetworksSchema = z22.array(walletSignInNetworkSchema).max(walletSignInFamilies.length).refine((values2) => new Set(values2).size === values2.length, {
2478
2677
  message: "Duplicate wallet family"
2479
2678
  }).transform(
2480
2679
  (values2) => walletSignInFamilies.filter((family) => values2.includes(family))
@@ -2499,40 +2698,40 @@ function caip10(wallet, network) {
2499
2698
  function isEvmChainId(value) {
2500
2699
  return /^eip155:[1-9][0-9]{0,15}$/.test(value);
2501
2700
  }
2502
- var evmChainIdSchema = z20.custom(
2701
+ var evmChainIdSchema = z22.custom(
2503
2702
  (value) => typeof value === "string" && isEvmChainId(value),
2504
2703
  'Use an EVM chain ID such as "eip155:8453"'
2505
2704
  );
2506
- var units = z20.string().regex(/^(0|[1-9][0-9]*)$/);
2705
+ var units = z22.string().regex(/^(0|[1-9][0-9]*)$/);
2507
2706
  var walletBalanceSchema = responseShape(
2508
- z20.object({
2707
+ z22.object({
2509
2708
  /** Canonical CAIP-2 ID for Solana, EVM or a supported Cosmos SDK chain. */
2510
- chain: z20.string(),
2709
+ chain: z22.string(),
2511
2710
  /** The canonical mint, EIP-55 contract or Cosmos bank denom; null for a native coin. */
2512
- token: z20.string().nullable(),
2711
+ token: z22.string().nullable(),
2513
2712
  /** Null when token metadata does not report decimals. */
2514
- decimals: z20.number().int().min(0).max(255).nullable(),
2713
+ decimals: z22.number().int().min(0).max(255).nullable(),
2515
2714
  /** The sum over `wallets`. */
2516
2715
  total: units,
2517
- wallets: z20.array(
2518
- z20.object({ address: z20.string(), amount: units }).strict()
2716
+ wallets: z22.array(
2717
+ z22.object({ address: z22.string(), amount: units }).strict()
2519
2718
  ),
2520
2719
  /** Solana: lowest slot. EVM: approximate latest block. Cosmos: the fixed queried block. */
2521
- at: z20.object({ kind: z20.enum(["slot", "block"]), number: units }).strict(),
2522
- observedAt: z20.number().int().nonnegative()
2720
+ at: z22.object({ kind: z22.enum(["slot", "block"]), number: units }).strict(),
2721
+ observedAt: z22.number().int().nonnegative()
2523
2722
  }).strict()
2524
2723
  );
2525
- var walletBalanceSampleSchema = z20.object({
2724
+ var walletBalanceSampleSchema = z22.object({
2526
2725
  /** The balance in base units, as a decimal integer string. */
2527
- amount: z20.string(),
2726
+ amount: z22.string(),
2528
2727
  /** The token's decimals; null when token metadata does not report them. */
2529
- decimals: z20.number().int().min(0).max(255).nullable(),
2728
+ decimals: z22.number().int().min(0).max(255).nullable(),
2530
2729
  /**
2531
2730
  * Where the run read: the EVM block number or Cosmos height every wallet of the run was read at,
2532
2731
  * or on Solana the slot this wallet's answer reflects (at or after the run's pinned slot), as
2533
2732
  * a decimal integer string.
2534
2733
  */
2535
- block: z20.string()
2734
+ block: z22.string()
2536
2735
  });
2537
2736
  var nftCollectionPattern = /^(eip155:[1-9][0-9]{0,15})\/(erc721|erc1155):(0x[0-9a-fA-F]{40})(?:\/(0|[1-9][0-9]{0,77}))?$/;
2538
2737
  var solanaNftCollectionPrefix = `${solanaMainnet}/nft:`;
@@ -2561,20 +2760,20 @@ function isNftCollection(value) {
2561
2760
  return parseNftCollection(value) !== null;
2562
2761
  }
2563
2762
  var walletNftsSchema = responseShape(
2564
- z20.object({
2763
+ z22.object({
2565
2764
  /** The collection read, in canonical form: an EVM contract EIP-55 checksummed. */
2566
- collection: z20.string(),
2765
+ collection: z22.string(),
2567
2766
  /** The collection's chain, canonical CAIP-2. */
2568
- chain: z20.string(),
2569
- standard: z20.enum(["erc721", "erc1155", "metaplex"]),
2767
+ chain: z22.string(),
2768
+ standard: z22.enum(["erc721", "erc1155", "metaplex"]),
2570
2769
  /** How many the wallets hold together: the sum over `wallets`. */
2571
2770
  total: units,
2572
- wallets: z20.array(
2573
- z20.object({ address: z20.string(), count: units }).strict()
2771
+ wallets: z22.array(
2772
+ z22.object({ address: z22.string(), count: units }).strict()
2574
2773
  ),
2575
2774
  /** Solana: the lowest slot of the reads. EVM: the approximate latest block. */
2576
- at: z20.object({ kind: z20.enum(["slot", "block"]), number: units }).strict(),
2577
- observedAt: z20.number().int().nonnegative()
2775
+ at: z22.object({ kind: z22.enum(["slot", "block"]), number: units }).strict(),
2776
+ observedAt: z22.number().int().nonnegative()
2578
2777
  }).strict()
2579
2778
  );
2580
2779
  var integerType = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
@@ -2625,50 +2824,50 @@ function parseContractCall(value) {
2625
2824
  function isContractCall(value) {
2626
2825
  return parseContractCall(value) !== null;
2627
2826
  }
2628
- var signedUnits = z20.string().regex(/^(0|-?[1-9][0-9]*)$/);
2827
+ var signedUnits = z22.string().regex(/^(0|-?[1-9][0-9]*)$/);
2629
2828
  var walletCallSchema = responseShape(
2630
- z20.object({
2829
+ z22.object({
2631
2830
  /** The call read, canonical: the contract EIP-55 checksummed, the signature without names. */
2632
- call: z20.string(),
2831
+ call: z22.string(),
2633
2832
  /** The contract's chain, canonical CAIP-2. */
2634
- chain: z20.string(),
2833
+ chain: z22.string(),
2635
2834
  /** The contract, EIP-55 checksummed. */
2636
- contract: z20.string(),
2835
+ contract: z22.string(),
2637
2836
  /** The return value's ABI type, such as `"uint256"` or `"bool"`. */
2638
- returns: z20.string(),
2837
+ returns: z22.string(),
2639
2838
  /** The sum of the wallets' values when the function returns an integer; null otherwise. */
2640
2839
  total: signedUnits.nullable(),
2641
- wallets: z20.array(
2642
- z20.object({
2643
- address: z20.string(),
2840
+ wallets: z22.array(
2841
+ z22.object({
2842
+ address: z22.string(),
2644
2843
  /** An integer as a decimal string, a bool, or an EIP-55 address. */
2645
- value: z20.union([z20.string(), z20.boolean()])
2844
+ value: z22.union([z22.string(), z22.boolean()])
2646
2845
  }).strict()
2647
2846
  ),
2648
2847
  /** The block every call read. */
2649
- at: z20.object({ kind: z20.enum(["block"]), number: units }).strict(),
2650
- observedAt: z20.number().int().nonnegative()
2848
+ at: z22.object({ kind: z22.enum(["block"]), number: units }).strict(),
2849
+ observedAt: z22.number().int().nonnegative()
2651
2850
  }).strict()
2652
2851
  );
2653
2852
  var walletDelegationsSchema = responseShape(
2654
- z20.object({
2655
- chain: z20.string(),
2853
+ z22.object({
2854
+ chain: z22.string(),
2656
2855
  /** The chain's staking denomination, such as `uatom`: every amount is in its base units. */
2657
- denom: z20.string(),
2856
+ denom: z22.string(),
2658
2857
  /** The validator the read counted, or null for every validator. */
2659
- validator: z20.string().nullable(),
2858
+ validator: z22.string().nullable(),
2660
2859
  /** The sum over `wallets`. */
2661
2860
  total: units,
2662
- wallets: z20.array(
2663
- z20.object({ address: z20.string(), amount: units }).strict()
2861
+ wallets: z22.array(
2862
+ z22.object({ address: z22.string(), amount: units }).strict()
2664
2863
  ),
2665
2864
  /** What the wallets delegate to each validator, summed over the wallets; none at zero. */
2666
- validators: z20.array(
2667
- z20.object({ validator: z20.string(), amount: units }).strict()
2865
+ validators: z22.array(
2866
+ z22.object({ validator: z22.string(), amount: units }).strict()
2668
2867
  ),
2669
2868
  /** The block every request read. */
2670
- at: z20.object({ kind: z20.enum(["block"]), number: units }).strict(),
2671
- observedAt: z20.number().int().nonnegative()
2869
+ at: z22.object({ kind: z22.enum(["block"]), number: units }).strict(),
2870
+ observedAt: z22.number().int().nonnegative()
2672
2871
  }).strict()
2673
2872
  );
2674
2873
  var contractEventPattern = /^(eip155:[1-9][0-9]{0,15}):(0x[0-9a-fA-F]{40})\s+(?:event\s+)?([A-Za-z_$][A-Za-z0-9_$]*)\s*\(([^()]*)\)\s*;?$/;
@@ -2725,135 +2924,135 @@ function isContractEvent(value) {
2725
2924
  }
2726
2925
  var maxWalletEventLogs = 1e3;
2727
2926
  var maxWalletEventLookback = 30 * 24 * 60 * 60 * 1e3;
2728
- var walletEventScalarSchema = z20.union([z20.string(), z20.boolean()]);
2729
- var walletEventValueSchema = z20.union([
2927
+ var walletEventScalarSchema = z22.union([z22.string(), z22.boolean()]);
2928
+ var walletEventValueSchema = z22.union([
2730
2929
  walletEventScalarSchema,
2731
- z20.array(walletEventScalarSchema)
2930
+ z22.array(walletEventScalarSchema)
2732
2931
  ]);
2733
2932
  var walletEventsSchema = responseShape(
2734
- z20.object({
2933
+ z22.object({
2735
2934
  /** The event read, in canonical form: the contract EIP-55 checksummed. */
2736
- event: z20.string(),
2935
+ event: z22.string(),
2737
2936
  /** The event's chain, canonical CAIP-2. */
2738
- chain: z20.string(),
2739
- contract: z20.string(),
2937
+ chain: z22.string(),
2938
+ contract: z22.string(),
2740
2939
  /** The earliest block time read, in epoch milliseconds: `since`, or the activation. */
2741
- since: z20.number().int().nonnegative(),
2940
+ since: z22.number().int().nonnegative(),
2742
2941
  /**
2743
2942
  * The newest block read: the chain's `finalized` block, or its `safe` block on a chain without
2744
2943
  * finality. Events in later blocks are not read yet.
2745
2944
  */
2746
- at: z20.object({ kind: z20.enum(["block"]), number: units }).strict(),
2747
- finality: z20.enum(["finalized", "safe"]),
2945
+ at: z22.object({ kind: z22.enum(["block"]), number: units }).strict(),
2946
+ finality: z22.enum(["finalized", "safe"]),
2748
2947
  /** The matching events, oldest first. */
2749
- logs: z20.array(
2750
- z20.object({
2948
+ logs: z22.array(
2949
+ z22.object({
2751
2950
  /** The member's linked wallet the `account` argument names. */
2752
- wallet: z20.string(),
2951
+ wallet: z22.string(),
2753
2952
  block: units,
2754
2953
  /** The block's time, in epoch milliseconds. */
2755
- timestamp: z20.number().int().nonnegative(),
2756
- tx: z20.string(),
2757
- logIndex: z20.number().int().nonnegative(),
2954
+ timestamp: z22.number().int().nonnegative(),
2955
+ tx: z22.string(),
2956
+ logIndex: z22.number().int().nonnegative(),
2758
2957
  /** Every argument, by name. */
2759
- args: z20.record(z20.string(), walletEventValueSchema)
2958
+ args: z22.record(z22.string(), walletEventValueSchema)
2760
2959
  }).strict()
2761
2960
  ).max(maxWalletEventLogs),
2762
- observedAt: z20.number().int().nonnegative()
2961
+ observedAt: z22.number().int().nonnegative()
2763
2962
  }).strict()
2764
2963
  );
2765
2964
  function isSolanaProgram(value) {
2766
2965
  return solanaAddressSchema.safeParse(value).success;
2767
2966
  }
2768
- var anchorIdlSchema = z20.record(z20.string(), z20.json());
2769
- var solanaProgramIdlSchema = z20.object({
2967
+ var anchorIdlSchema = z22.record(z22.string(), z22.json());
2968
+ var solanaProgramIdlSchema = z22.object({
2770
2969
  /** The program the setting held when the IDL was stored. */
2771
- program: z20.string(),
2772
- source: z20.string(),
2970
+ program: z22.string(),
2971
+ source: z22.string(),
2773
2972
  idl: anchorIdlSchema
2774
2973
  }).strict();
2775
2974
  var maxWalletTransactions = 1e3;
2776
2975
  var maxWalletTransactionLookback = 30 * 24 * 60 * 60 * 1e3;
2777
2976
  var walletTransactionsSchema = responseShape(
2778
- z20.object({
2779
- program: z20.string(),
2977
+ z22.object({
2978
+ program: z22.string(),
2780
2979
  /** Solana mainnet's CAIP-2 ID. */
2781
- chain: z20.string(),
2980
+ chain: z22.string(),
2782
2981
  /** The mint whose associated token accounts were read, or null for the wallets themselves. */
2783
- mint: z20.string().nullable(),
2982
+ mint: z22.string().nullable(),
2784
2983
  /** The earliest block time read, in epoch milliseconds: `since`, or the activation. */
2785
- since: z20.number().int().nonnegative(),
2984
+ since: z22.number().int().nonnegative(),
2786
2985
  /** The newest finalized slot read. Transactions in later slots are not read yet. */
2787
- at: z20.object({ kind: z20.enum(["slot"]), number: units }).strict(),
2986
+ at: z22.object({ kind: z22.enum(["slot"]), number: units }).strict(),
2788
2987
  /**
2789
2988
  * False when a wallet had more than {@link maxWalletTransactions} transactions to read since
2790
2989
  * `since`: its newest ones are returned and older ones are not.
2791
2990
  */
2792
- complete: z20.boolean(),
2991
+ complete: z22.boolean(),
2793
2992
  /** The matching transactions, oldest first: one entry per linked wallet a transaction touched. */
2794
- transactions: z20.array(
2795
- z20.object({
2993
+ transactions: z22.array(
2994
+ z22.object({
2796
2995
  /** The member's linked wallet whose history holds the transaction. */
2797
- wallet: z20.string(),
2798
- signature: z20.string(),
2996
+ wallet: z22.string(),
2997
+ signature: z22.string(),
2799
2998
  slot: units,
2800
2999
  /** The block's time, in epoch milliseconds. */
2801
- timestamp: z20.number().int().nonnegative(),
3000
+ timestamp: z22.number().int().nonnegative(),
2802
3001
  /**
2803
3002
  * Whether the wallet signed the transaction. False for one someone else signed that only
2804
3003
  * touched the wallet, such as a transfer into it. Check it before rewarding an action.
2805
3004
  * Results captured before Relay reported it read as false.
2806
3005
  */
2807
- signer: z20.boolean().default(false),
3006
+ signer: z22.boolean().default(false),
2808
3007
  /**
2809
3008
  * Every program the transaction invoked, in call order: each top-level instruction's
2810
3009
  * program, then the programs it called.
2811
3010
  */
2812
- programs: z20.array(z20.string()),
3011
+ programs: z22.array(z22.string()),
2813
3012
  /**
2814
3013
  * The wallet's balance changes: `"SOL"` from its lamports (rent included, the fee left out
2815
3014
  * when the wallet paid it), and
2816
3015
  * each mint from the token accounts it owns. Mints whose balance did not change are left out.
2817
3016
  */
2818
- balanceChanges: z20.array(
2819
- z20.object({ mint: z20.string(), delta: signedUnits }).strict()
3017
+ balanceChanges: z22.array(
3018
+ z22.object({ mint: z22.string(), delta: signedUnits }).strict()
2820
3019
  ),
2821
3020
  /**
2822
3021
  * The program's instructions in the transaction, top-level and inner, in call order,
2823
3022
  * decoded with the program's Anchor IDL. Instructions the IDL does not describe are left
2824
3023
  * out. Absent when the program's setting has no IDL.
2825
3024
  */
2826
- instructions: z20.array(
2827
- z20.object({
3025
+ instructions: z22.array(
3026
+ z22.object({
2828
3027
  /** The instruction's name, as the IDL spells it. */
2829
- name: z20.string(),
3028
+ name: z22.string(),
2830
3029
  /**
2831
3030
  * Its arguments by name: integers up to 32 bits and floats as numbers, wider
2832
3031
  * integers as decimal strings, public keys in base58, `bytes` and arrays as arrays,
2833
3032
  * an absent option as null, and an enum as `{ Variant: fields }`.
2834
3033
  */
2835
- args: z20.record(z20.string(), z20.json()),
3034
+ args: z22.record(z22.string(), z22.json()),
2836
3035
  /** The accounts the IDL names, by name: each a base58 address. */
2837
- accounts: z20.record(z20.string(), z20.string())
3036
+ accounts: z22.record(z22.string(), z22.string())
2838
3037
  }).strict()
2839
3038
  ).optional()
2840
3039
  }).strict()
2841
3040
  ),
2842
- observedAt: z20.number().int().nonnegative()
3041
+ observedAt: z22.number().int().nonnegative()
2843
3042
  }).strict()
2844
3043
  );
2845
3044
 
2846
3045
  // src/submission-input.ts
2847
- import * as z21 from "zod";
2848
- var textOptionsSchema = z21.object({
2849
- required: z21.boolean().default(true),
2850
- minLength: z21.number().int().min(0).max(1e4).default(1),
2851
- maxLength: z21.number().int().min(1).max(1e4).default(1e4)
3046
+ import * as z23 from "zod";
3047
+ var textOptionsSchema = z23.object({
3048
+ required: z23.boolean().default(true),
3049
+ minLength: z23.number().int().min(0).max(1e4).default(1),
3050
+ maxLength: z23.number().int().min(1).max(1e4).default(1e4)
2852
3051
  }).strict().refine(
2853
3052
  (v) => v.minLength <= v.maxLength,
2854
3053
  "minLength must not exceed maxLength"
2855
3054
  );
2856
- var hostSchema = z21.string().min(1).max(253).refine((host) => {
3055
+ var hostSchema = z23.string().min(1).max(253).refine((host) => {
2857
3056
  if (!/^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/i.test(host) || host.includes("..")) {
2858
3057
  return false;
2859
3058
  }
@@ -2864,13 +3063,13 @@ var hostSchema = z21.string().min(1).max(253).refine((host) => {
2864
3063
  return false;
2865
3064
  }
2866
3065
  }, "Use a hostname without a scheme, path, port, or wildcard");
2867
- var urlOptionsSchema = z21.object({
2868
- required: z21.boolean().default(true),
2869
- allowedHosts: z21.array(hostSchema).min(1).max(100).optional()
3066
+ var urlOptionsSchema = z23.object({
3067
+ required: z23.boolean().default(true),
3068
+ allowedHosts: z23.array(hostSchema).min(1).max(100).optional()
2870
3069
  }).strict();
2871
- var textEvidenceSchema = z21.object({ kind: z21.literal("text"), value: z21.string().max(1e4) }).strict();
2872
- var urlEvidenceSchema = z21.object({ kind: z21.literal("url"), value: z21.string().max(2048) }).strict();
2873
- var valueEvidenceSchema = z21.discriminatedUnion("kind", [
3070
+ var textEvidenceSchema = z23.object({ kind: z23.literal("text"), value: z23.string().max(1e4) }).strict();
3071
+ var urlEvidenceSchema = z23.object({ kind: z23.literal("url"), value: z23.string().max(2048) }).strict();
3072
+ var valueEvidenceSchema = z23.discriminatedUnion("kind", [
2874
3073
  textEvidenceSchema,
2875
3074
  urlEvidenceSchema
2876
3075
  ]);
@@ -2933,22 +3132,22 @@ function xPostId(value) {
2933
3132
  }
2934
3133
 
2935
3134
  // src/quiz.ts
2936
- import * as z22 from "zod";
2937
- var quizId = z22.string().regex(/^[a-zA-Z0-9_-]+$/).max(100);
2938
- var quizChoiceSchema = z22.object({ id: quizId, label: z22.string().trim().min(1).max(500) }).strict();
2939
- var quizQuestionSchema = z22.object({
3135
+ import * as z24 from "zod";
3136
+ var quizId = z24.string().regex(/^[a-zA-Z0-9_-]+$/).max(100);
3137
+ var quizChoiceSchema = z24.object({ id: quizId, label: z24.string().trim().min(1).max(500) }).strict();
3138
+ var quizQuestionSchema = z24.object({
2940
3139
  id: quizId,
2941
- prompt: z22.string().trim().min(1).max(1e3),
2942
- choices: z22.array(quizChoiceSchema).min(2).max(8).refine(
3140
+ prompt: z24.string().trim().min(1).max(1e3),
3141
+ choices: z24.array(quizChoiceSchema).min(2).max(8).refine(
2943
3142
  (choices) => new Set(choices.map((choice) => choice.id)).size === choices.length,
2944
3143
  "Choice IDs must be unique"
2945
3144
  )
2946
3145
  }).strict();
2947
- var quizQuestionsSchema = z22.array(quizQuestionSchema).min(1).max(20).refine(
3146
+ var quizQuestionsSchema = z24.array(quizQuestionSchema).min(1).max(20).refine(
2948
3147
  (questions) => new Set(questions.map((question) => question.id)).size === questions.length,
2949
3148
  "Question IDs must be unique"
2950
3149
  );
2951
- var quizContentSchema = z22.array(
3150
+ var quizContentSchema = z24.array(
2952
3151
  quizQuestionSchema.extend({ correct: quizId }).refine(
2953
3152
  (question) => question.choices.some((choice) => choice.id === question.correct),
2954
3153
  "Choose a correct answer from the available choices"
@@ -2959,73 +3158,73 @@ var quizContentSchema = z22.array(
2959
3158
  );
2960
3159
 
2961
3160
  // src/resources.ts
2962
- import * as z23 from "zod";
2963
- var resourceSourceSchema = z23.union([
2964
- z23.strictObject({
2965
- provider: z23.literal("domino"),
2966
- resource: z23.literal("point-ledger")
3161
+ import * as z25 from "zod";
3162
+ var resourceSourceSchema = z25.union([
3163
+ z25.strictObject({
3164
+ provider: z25.literal("domino"),
3165
+ resource: z25.literal("point-ledger")
2967
3166
  }),
2968
3167
  discordResourceSourceSchema
2969
3168
  ]);
2970
- var resourceRequestSchema = z23.object({
3169
+ var resourceRequestSchema = z25.object({
2971
3170
  source: resourceSourceSchema,
2972
- query: z23.string().max(100).optional(),
2973
- cursor: z23.string().regex(/^\d{1,6}$/).optional(),
2974
- ids: z23.array(z23.string().min(1).max(100)).max(50).optional()
3171
+ query: z25.string().max(100).optional(),
3172
+ cursor: z25.string().regex(/^\d{1,6}$/).optional(),
3173
+ ids: z25.array(z25.string().min(1).max(100)).max(50).optional()
2975
3174
  }).strict();
2976
- var resourceOptionsSchema = z23.object({
2977
- revision: z23.number().int(),
2978
- options: z23.array(
2979
- z23.object({
2980
- id: z23.string(),
2981
- label: z23.string(),
2982
- description: z23.string().optional(),
2983
- group: z23.string().optional(),
2984
- disabledReason: z23.string().optional()
3175
+ var resourceOptionsSchema = z25.object({
3176
+ revision: z25.number().int(),
3177
+ options: z25.array(
3178
+ z25.object({
3179
+ id: z25.string(),
3180
+ label: z25.string(),
3181
+ description: z25.string().optional(),
3182
+ group: z25.string().optional(),
3183
+ disabledReason: z25.string().optional()
2985
3184
  })
2986
3185
  ),
2987
3186
  /** Pass back as `cursor` for the next page; null on the last one. */
2988
- nextCursor: z23.string().nullable().default(null),
3187
+ nextCursor: z25.string().nullable().default(null),
2989
3188
  /** @deprecated Use `nextCursor`. Removed in 2.0.0. */
2990
- cursor: z23.string().nullable()
3189
+ cursor: z25.string().nullable()
2991
3190
  });
2992
3191
 
2993
3192
  // src/settings.ts
2994
- import * as z25 from "zod";
3193
+ import * as z27 from "zod";
2995
3194
 
2996
3195
  // src/setting-values.ts
2997
- import * as z24 from "zod";
3196
+ import * as z26 from "zod";
2998
3197
  var settingInstant = offsetDateTimeSchema().transform(
2999
3198
  (value) => new Date(value).toISOString()
3000
3199
  );
3001
- var settingResourceId = z24.union([
3002
- z24.literal(""),
3003
- z24.string().regex(/^\S{1,200}$/)
3200
+ var settingResourceId = z26.union([
3201
+ z26.literal(""),
3202
+ z26.string().regex(/^\S{1,200}$/)
3004
3203
  ]);
3005
3204
 
3006
3205
  // src/settings.ts
3007
- var base = { label: z25.string().min(1), description: z25.string().optional() };
3008
- var settingFieldSchema = z25.discriminatedUnion("kind", [
3009
- z25.object({
3206
+ var base = { label: z27.string().min(1), description: z27.string().optional() };
3207
+ var settingFieldSchema = z27.discriminatedUnion("kind", [
3208
+ z27.object({
3010
3209
  ...base,
3011
- kind: z25.literal("point-ledger"),
3012
- default: identifier.or(z25.literal(""))
3210
+ kind: z27.literal("point-ledger"),
3211
+ default: identifier.or(z27.literal(""))
3013
3212
  }).strict(),
3014
- z25.object({ ...base, kind: z25.literal("datetime"), default: settingInstant }).strict(),
3015
- z25.object({
3213
+ z27.object({ ...base, kind: z27.literal("datetime"), default: settingInstant }).strict(),
3214
+ z27.object({
3016
3215
  ...base,
3017
- kind: z25.literal("resource"),
3216
+ kind: z27.literal("resource"),
3018
3217
  default: settingResourceId,
3019
3218
  source: resourceSourceSchema
3020
3219
  }).strict(),
3021
- z25.object({ ...base, kind: z25.literal("quiz"), default: quizContentSchema }).strict(),
3022
- z25.object({
3220
+ z27.object({ ...base, kind: z27.literal("quiz"), default: quizContentSchema }).strict(),
3221
+ z27.object({
3023
3222
  ...base,
3024
- kind: z25.literal("text"),
3025
- default: z25.string(),
3026
- minLength: z25.number().int().nonnegative(),
3027
- maxLength: z25.number().int().positive(),
3028
- multiline: z25.boolean(),
3223
+ kind: z27.literal("text"),
3224
+ default: z27.string(),
3225
+ minLength: z27.number().int().nonnegative(),
3226
+ maxLength: z27.number().int().positive(),
3227
+ multiline: z27.boolean(),
3029
3228
  /**
3030
3229
  * A list Console offers the value from, beside free text: `telegram-chat` lists the
3031
3230
  * project's connected Telegram chats. Unknown pickers read as free text. Six pickers also
@@ -3040,35 +3239,35 @@ var settingFieldSchema = z25.discriminatedUnion("kind", [
3040
3239
  * `ctx.wallet.transactions()` reads (`settings.solanaProgram()`), which Relay also checks is
3041
3240
  * an executable program.
3042
3241
  */
3043
- picker: z25.string().optional(),
3242
+ picker: z27.string().optional(),
3044
3243
  /**
3045
3244
  * On an `amount` setting, the token's decimals: Console shows and edits the value in whole
3046
3245
  * tokens.
3047
3246
  */
3048
- decimals: z25.number().int().min(0).max(255).optional()
3247
+ decimals: z27.number().int().min(0).max(255).optional()
3049
3248
  }).strict(),
3050
- z25.object({
3249
+ z27.object({
3051
3250
  ...base,
3052
- kind: z25.literal("integer"),
3053
- default: z25.number().int(),
3054
- min: z25.number().int(),
3055
- max: z25.number().int()
3251
+ kind: z27.literal("integer"),
3252
+ default: z27.number().int(),
3253
+ min: z27.number().int(),
3254
+ max: z27.number().int()
3056
3255
  }).strict(),
3057
- z25.object({ ...base, kind: z25.literal("boolean"), default: z25.boolean() }).strict(),
3058
- z25.object({
3256
+ z27.object({ ...base, kind: z27.literal("boolean"), default: z27.boolean() }).strict(),
3257
+ z27.object({
3059
3258
  ...base,
3060
- kind: z25.literal("choice"),
3061
- default: z25.string(),
3062
- options: z25.array(z25.string().min(1)).min(1)
3259
+ kind: z27.literal("choice"),
3260
+ default: z27.string(),
3261
+ options: z27.array(z27.string().min(1)).min(1)
3063
3262
  }).strict()
3064
3263
  ]);
3065
- var settingsFieldsSchema = z25.record(
3066
- z25.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/),
3264
+ var settingsFieldsSchema = z27.record(
3265
+ z27.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/),
3067
3266
  settingFieldSchema
3068
3267
  );
3069
- var settingsValuesSchema = z25.record(
3070
- z25.string(),
3071
- z25.union([z25.string(), z25.number().finite(), z25.boolean(), quizContentSchema])
3268
+ var settingsValuesSchema = z27.record(
3269
+ z27.string(),
3270
+ z27.union([z27.string(), z27.number().finite(), z27.boolean(), quizContentSchema])
3072
3271
  );
3073
3272
  function isAmount(value) {
3074
3273
  return value.length <= 100 && /^(0|[1-9][0-9]*)$/.test(value);
@@ -3080,7 +3279,7 @@ function isBoundSetting(field) {
3080
3279
  return field?.kind === "integer" || field?.kind === "text" && field.picker === "amount";
3081
3280
  }
3082
3281
  function textSettingSchema(field) {
3083
- const text = z25.string().min(field.minLength).max(field.maxLength);
3282
+ const text = z27.string().min(field.minLength).max(field.maxLength);
3084
3283
  switch (field.picker) {
3085
3284
  case "amount":
3086
3285
  return text.refine(
@@ -3136,17 +3335,17 @@ function parseSettings(fields2, input) {
3136
3335
  shape[key] = textSettingSchema(field).default(field.default);
3137
3336
  break;
3138
3337
  case "integer":
3139
- shape[key] = z25.number().int().min(field.min).max(field.max).default(field.default);
3338
+ shape[key] = z27.number().int().min(field.min).max(field.max).default(field.default);
3140
3339
  break;
3141
3340
  case "boolean":
3142
- shape[key] = z25.boolean().default(field.default);
3341
+ shape[key] = z27.boolean().default(field.default);
3143
3342
  break;
3144
3343
  case "choice":
3145
- shape[key] = z25.enum(field.options).default(field.default);
3344
+ shape[key] = z27.enum(field.options).default(field.default);
3146
3345
  break;
3147
3346
  }
3148
3347
  }
3149
- return settingsValuesSchema.parse(z25.object(shape).strict().parse(input));
3348
+ return settingsValuesSchema.parse(z27.object(shape).strict().parse(input));
3150
3349
  }
3151
3350
  function missingResourceSettings(fields2, values2) {
3152
3351
  return Object.entries(fields2).filter(
@@ -3167,21 +3366,21 @@ function authoringKey(input) {
3167
3366
  }
3168
3367
 
3169
3368
  // src/campaigns.ts
3170
- import * as z26 from "zod";
3171
- var timestamp4 = z26.number().int().safe().nonnegative();
3172
- var availabilityWindowSchema = z26.object({ from: timestamp4, until: timestamp4 }).strict().refine((window) => window.until > window.from, {
3369
+ import * as z28 from "zod";
3370
+ var timestamp4 = z28.number().int().safe().nonnegative();
3371
+ var availabilityWindowSchema = z28.object({ from: timestamp4, until: timestamp4 }).strict().refine((window) => window.until > window.from, {
3173
3372
  message: "Window end must follow its start",
3174
3373
  path: ["until"]
3175
3374
  });
3176
- var campaignDefinitionSchema = z26.object({
3375
+ var campaignDefinitionSchema = z28.object({
3177
3376
  key: identifier,
3178
- title: z26.string().trim().min(1).max(120),
3377
+ title: z28.string().trim().min(1).max(120),
3179
3378
  window: availabilityWindowSchema.optional(),
3180
- enrollment: z26.enum(["none", "required"]).default("none")
3379
+ enrollment: z28.enum(["none", "required"]).default("none")
3181
3380
  }).strict();
3182
3381
  var campaignAuthoringSchema = campaignDefinitionSchema.omit({ key: true, title: true }).extend({
3183
3382
  ...authoringIdentityShape,
3184
- title: z26.string().trim().min(1).max(120).optional()
3383
+ title: z28.string().trim().min(1).max(120).optional()
3185
3384
  }).strict().transform((value) => {
3186
3385
  const normalized = value;
3187
3386
  return campaignDefinitionSchema.parse({
@@ -3195,42 +3394,42 @@ function defineCampaign(input) {
3195
3394
  var campaignViewSchema = campaignDefinitionSchema.extend({
3196
3395
  enrolledAt: timestamp4.nullable(),
3197
3396
  withdrawnAt: timestamp4.nullable().default(null),
3198
- withdrawalReason: z26.string().nullable().default(null)
3397
+ withdrawalReason: z28.string().nullable().default(null)
3199
3398
  });
3200
- var campaignEnrollmentInputSchema = z26.object({ actionId: identifier, campaign: identifier }).strict();
3399
+ var campaignEnrollmentInputSchema = z28.object({ actionId: identifier, campaign: identifier }).strict();
3201
3400
  var memberCampaignEnrollmentInputSchema = campaignEnrollmentInputSchema.extend({ member: identifier });
3202
3401
  var campaignWithdrawalInputSchema = campaignEnrollmentInputSchema;
3203
3402
  var memberCampaignWithdrawalInputSchema = campaignWithdrawalInputSchema.extend({
3204
3403
  member: identifier,
3205
- reason: z26.string().trim().min(1).max(500)
3404
+ reason: z28.string().trim().min(1).max(500)
3206
3405
  });
3207
- var campaignEnrollmentSchema = z26.object({
3406
+ var campaignEnrollmentSchema = z28.object({
3208
3407
  campaign: identifier,
3209
3408
  member: identifier,
3210
3409
  enrolledAt: timestamp4,
3211
3410
  withdrawnAt: timestamp4.nullable().default(null),
3212
- withdrawalReason: z26.string().nullable().default(null)
3411
+ withdrawalReason: z28.string().nullable().default(null)
3213
3412
  });
3214
3413
 
3215
3414
  // src/resource-handle.ts
3216
- import * as z27 from "zod";
3415
+ import * as z29 from "zod";
3217
3416
  function resourceHandle(_kind, definition) {
3218
3417
  return definition;
3219
3418
  }
3220
- var ledgerSettingSchema = identifier.or(z27.literal("")).brand();
3419
+ var ledgerSettingSchema = identifier.or(z29.literal("")).brand();
3221
3420
  function ledgerKey(ledger) {
3222
3421
  return typeof ledger === "string" ? ledger : ledger.key;
3223
3422
  }
3224
3423
 
3225
3424
  // src/groups.ts
3226
- import * as z28 from "zod";
3227
- var projectGroupSchema = z28.object({
3425
+ import * as z30 from "zod";
3426
+ var projectGroupSchema = z30.object({
3228
3427
  key: identifier,
3229
- title: z28.string().trim().min(1).max(120)
3428
+ title: z30.string().trim().min(1).max(120)
3230
3429
  }).strict();
3231
3430
  var projectGroupAuthoringSchema = projectGroupSchema.omit({ key: true, title: true }).extend({
3232
3431
  ...authoringIdentityShape,
3233
- title: z28.string().trim().min(1).max(120).optional()
3432
+ title: z30.string().trim().min(1).max(120).optional()
3234
3433
  }).strict().transform((value) => {
3235
3434
  return projectGroupSchema.parse({
3236
3435
  ...value,
@@ -3243,93 +3442,93 @@ function defineGroup(input) {
3243
3442
  function projectGroupKey(group) {
3244
3443
  return identifier.parse(group.key);
3245
3444
  }
3246
- var groupTitle = z28.string().trim().min(1).max(120);
3247
- var reason = z28.string().trim().min(1).max(1e3);
3248
- var timestamp5 = z28.number().int().nonnegative().max(864e13);
3249
- var createGroupSchema = z28.object({ actionId: identifier, key: identifier, title: groupTitle }).strict();
3250
- var updateGroupSchema = z28.object({ title: groupTitle }).strict();
3251
- var addGroupMemberSchema = z28.object({ actionId: identifier, member: identifier, reason }).strict();
3252
- var removeGroupMemberSchema = z28.object({ actionId: identifier, reason }).strict();
3253
- var groupArchiveInputSchema = z28.object({ reason: lifecycleReasonSchema.optional() }).strict();
3254
- var groupPageQuerySchema = z28.strictObject({
3445
+ var groupTitle = z30.string().trim().min(1).max(120);
3446
+ var reason = z30.string().trim().min(1).max(1e3);
3447
+ var timestamp5 = z30.number().int().nonnegative().max(864e13);
3448
+ var createGroupSchema = z30.object({ actionId: identifier, key: identifier, title: groupTitle }).strict();
3449
+ var updateGroupSchema = z30.object({ title: groupTitle }).strict();
3450
+ var addGroupMemberSchema = z30.object({ actionId: identifier, member: identifier, reason }).strict();
3451
+ var removeGroupMemberSchema = z30.object({ actionId: identifier, reason }).strict();
3452
+ var groupArchiveInputSchema = z30.object({ reason: lifecycleReasonSchema.optional() }).strict();
3453
+ var groupPageQuerySchema = z30.strictObject({
3255
3454
  cursor: pageCursorSchema.optional(),
3256
3455
  /** Items per page, 1–100; the default is 50. */
3257
- limit: z28.number().int().min(1).max(100).optional()
3456
+ limit: z30.number().int().min(1).max(100).optional()
3258
3457
  });
3259
- var managedGroupSchema = z28.object({
3458
+ var managedGroupSchema = z30.object({
3260
3459
  key: identifier,
3261
- title: z28.string(),
3262
- members: z28.number().int().nonnegative(),
3460
+ title: z30.string(),
3461
+ members: z30.number().int().nonnegative(),
3263
3462
  createdAt: timestamp5,
3264
3463
  archivedAt: timestamp5.nullable()
3265
3464
  });
3266
- var groupPageSchema = z28.object({
3267
- items: z28.array(managedGroupSchema),
3465
+ var groupPageSchema = z30.object({
3466
+ items: z30.array(managedGroupSchema),
3268
3467
  nextCursor: pageCursorSchema.nullable()
3269
3468
  });
3270
- var groupMemberSchema = z28.object({
3469
+ var groupMemberSchema = z30.object({
3271
3470
  member: identifier,
3272
3471
  addedAt: timestamp5.nullable()
3273
3472
  });
3274
- var groupMemberPageSchema = z28.object({
3275
- items: z28.array(groupMemberSchema),
3473
+ var groupMemberPageSchema = z30.object({
3474
+ items: z30.array(groupMemberSchema),
3276
3475
  nextCursor: pageCursorSchema.nullable()
3277
3476
  });
3278
3477
 
3279
3478
  // src/prerequisites.ts
3280
- import * as z29 from "zod";
3281
- var amount = z29.number().int().safe().nonnegative();
3479
+ import * as z31 from "zod";
3480
+ var amount = z31.number().int().safe().nonnegative();
3282
3481
  var threshold = amount.positive();
3283
- var completionPrerequisiteSchema = z29.discriminatedUnion("scope", [
3284
- z29.object({
3285
- kind: z29.literal("completion"),
3482
+ var completionPrerequisiteSchema = z31.discriminatedUnion("scope", [
3483
+ z31.object({
3484
+ kind: z31.literal("completion"),
3286
3485
  quest: identifier,
3287
- scope: z29.literal("ever")
3486
+ scope: z31.literal("ever")
3288
3487
  }).strict(),
3289
- z29.object({
3290
- kind: z29.literal("completion"),
3488
+ z31.object({
3489
+ kind: z31.literal("completion"),
3291
3490
  quest: identifier,
3292
- scope: z29.literal("period"),
3491
+ scope: z31.literal("period"),
3293
3492
  period: calendarPeriodSchema.exclude(["lifetime"])
3294
3493
  }).strict()
3295
3494
  ]);
3296
- var balancePrerequisiteSchema = z29.object({
3297
- kind: z29.literal("balance"),
3495
+ var balancePrerequisiteSchema = z31.object({
3496
+ kind: z31.literal("balance"),
3298
3497
  balance: identifier,
3299
3498
  minimum: threshold
3300
3499
  }).strict();
3301
- var groupPrerequisiteSchema = z29.object({ kind: z29.literal("group"), group: identifier, title: z29.string() }).strict();
3302
- var prerequisiteSchema = z29.discriminatedUnion("kind", [
3500
+ var groupPrerequisiteSchema = z31.object({ kind: z31.literal("group"), group: identifier, title: z31.string() }).strict();
3501
+ var prerequisiteSchema = z31.discriminatedUnion("kind", [
3303
3502
  completionPrerequisiteSchema,
3304
3503
  balancePrerequisiteSchema,
3305
3504
  groupPrerequisiteSchema
3306
3505
  ]);
3307
- var missingPrerequisiteSchema = z29.union([
3308
- z29.object({
3309
- kind: z29.literal("completion"),
3506
+ var missingPrerequisiteSchema = z31.union([
3507
+ z31.object({
3508
+ kind: z31.literal("completion"),
3310
3509
  quest: identifier,
3311
- title: z29.string(),
3312
- scope: z29.literal("ever")
3510
+ title: z31.string(),
3511
+ scope: z31.literal("ever")
3313
3512
  }),
3314
- z29.object({
3315
- kind: z29.literal("completion"),
3513
+ z31.object({
3514
+ kind: z31.literal("completion"),
3316
3515
  quest: identifier,
3317
- title: z29.string(),
3318
- scope: z29.literal("period"),
3516
+ title: z31.string(),
3517
+ scope: z31.literal("period"),
3319
3518
  period: calendarPeriodSchema.exclude(["lifetime"]),
3320
- resetsAt: z29.number().int().safe()
3519
+ resetsAt: z31.number().int().safe()
3321
3520
  }),
3322
- z29.object({
3323
- kind: z29.literal("balance"),
3521
+ z31.object({
3522
+ kind: z31.literal("balance"),
3324
3523
  balance: identifier,
3325
- title: z29.string(),
3524
+ title: z31.string(),
3326
3525
  minimum: threshold,
3327
3526
  current: amount
3328
3527
  }),
3329
- z29.object({
3330
- kind: z29.literal("group"),
3528
+ z31.object({
3529
+ kind: z31.literal("group"),
3331
3530
  group: identifier,
3332
- title: z29.string()
3531
+ title: z31.string()
3333
3532
  })
3334
3533
  ]);
3335
3534
  function completed(quest, options = {}) {
@@ -3360,29 +3559,29 @@ function inGroup(group) {
3360
3559
  var maxPointsAmount = 2147483647;
3361
3560
 
3362
3561
  // src/schema.ts
3363
- import * as z30 from "zod";
3364
- var pointsRewardSchema = z30.object({
3365
- kind: z30.literal("points").default("points"),
3562
+ import * as z32 from "zod";
3563
+ var pointsRewardSchema = z32.object({
3564
+ kind: z32.literal("points").default("points"),
3366
3565
  balance: identifier,
3367
- amount: z30.number().int().min(0).max(maxPointsAmount)
3566
+ amount: z32.number().int().min(0).max(maxPointsAmount)
3368
3567
  }).strict();
3369
- var tieredRewardDefinitionSchema = z30.object({
3568
+ var tieredRewardDefinitionSchema = z32.object({
3370
3569
  /** An automatic achievement backed by the project badge catalog. */
3371
3570
  badge: identifier.optional(),
3372
3571
  /** Membership in the project group with this key, added when the reward is delivered. */
3373
3572
  group: identifier.optional(),
3374
3573
  id: identifier,
3375
- title: z30.string().min(1).max(120),
3376
- tiers: z30.array(
3377
- z30.object({ id: identifier, title: z30.string().min(1).max(120) }).strict()
3574
+ title: z32.string().min(1).max(120),
3575
+ tiers: z32.array(
3576
+ z32.object({ id: identifier, title: z32.string().min(1).max(120) }).strict()
3378
3577
  ).min(1).max(20).refine(
3379
3578
  (tiers) => new Set(tiers.map((t) => t.id)).size === tiers.length,
3380
3579
  "Tier IDs must be unique"
3381
3580
  ),
3382
- inventory: z30.object({ kind: z30.literal("untracked") }).strict(),
3383
- fulfillment: z30.discriminatedUnion("kind", [
3384
- z30.object({ kind: z30.literal("staff-handover") }).strict(),
3385
- z30.object({ kind: z30.literal("automatic") }).strict()
3581
+ inventory: z32.object({ kind: z32.literal("untracked") }).strict(),
3582
+ fulfillment: z32.discriminatedUnion("kind", [
3583
+ z32.object({ kind: z32.literal("staff-handover") }).strict(),
3584
+ z32.object({ kind: z32.literal("automatic") }).strict()
3386
3585
  ])
3387
3586
  }).strict().refine(
3388
3587
  (value) => value.badge === void 0 && value.group === void 0 || value.fulfillment.kind === "automatic" && value.tiers.length === 1 && value.tiers[0].id === "awarded",
@@ -3391,12 +3590,12 @@ var tieredRewardDefinitionSchema = z30.object({
3391
3590
  (value) => value.badge === void 0 || value.group === void 0,
3392
3591
  "A reward is either a badge or a group membership"
3393
3592
  );
3394
- var tieredRewardReferenceSchema = z30.object({
3593
+ var tieredRewardReferenceSchema = z32.object({
3395
3594
  id: identifier,
3396
3595
  key: identifier.nullable()
3397
3596
  });
3398
- var tierRewardSchema = z30.object({
3399
- kind: z30.literal("tier"),
3597
+ var tierRewardSchema = z32.object({
3598
+ kind: z32.literal("tier"),
3400
3599
  reward: tieredRewardDefinitionSchema,
3401
3600
  tier: identifier
3402
3601
  }).strict().refine(
@@ -3408,7 +3607,7 @@ var badgeRewardSchema = tierRewardSchema.transform(
3408
3607
  const badge = value.reward.badge;
3409
3608
  if (!badge || value.reward.fulfillment.kind !== "automatic" || value.reward.tiers.length !== 1 || value.tier !== "awarded") {
3410
3609
  context.addIssue({ code: "custom", message: "Invalid badge reward" });
3411
- return z30.NEVER;
3610
+ return z32.NEVER;
3412
3611
  }
3413
3612
  return { ...value, reward: { ...value.reward, badge } };
3414
3613
  }
@@ -3432,7 +3631,7 @@ var groupRewardSchema = tierRewardSchema.transform(
3432
3631
  const group = value.reward.group;
3433
3632
  if (!group || value.reward.fulfillment.kind !== "automatic" || value.reward.tiers.length !== 1 || value.tier !== "awarded") {
3434
3633
  context.addIssue({ code: "custom", message: "Invalid group reward" });
3435
- return z30.NEVER;
3634
+ return z32.NEVER;
3436
3635
  }
3437
3636
  return { ...value, reward: { ...value.reward, group } };
3438
3637
  }
@@ -3452,7 +3651,7 @@ function groupReward(key, title) {
3452
3651
  });
3453
3652
  }
3454
3653
  var integrationRewardSchema = discordRewardSchema;
3455
- var rewardSchema = z30.union([
3654
+ var rewardSchema = z32.union([
3456
3655
  pointsRewardSchema,
3457
3656
  tierRewardSchema,
3458
3657
  integrationRewardSchema
@@ -3469,39 +3668,39 @@ function rewardKey(reward) {
3469
3668
  }
3470
3669
  return reward.kind === "points" ? "points:" + reward.balance : "tier:" + reward.reward.id;
3471
3670
  }
3472
- var triggerSchema = z30.union([
3473
- z30.object({
3474
- kind: z30.literal("manual"),
3475
- input: z30.literal("text"),
3671
+ var triggerSchema = z32.union([
3672
+ z32.object({
3673
+ kind: z32.literal("manual"),
3674
+ input: z32.literal("text"),
3476
3675
  constraints: textOptionsSchema,
3477
- actor: z30.enum(["member", "staff"]).optional()
3676
+ actor: z32.enum(["member", "staff"]).optional()
3478
3677
  }).strict(),
3479
- z30.object({
3480
- kind: z30.literal("manual"),
3481
- input: z30.literal("url"),
3678
+ z32.object({
3679
+ kind: z32.literal("manual"),
3680
+ input: z32.literal("url"),
3482
3681
  constraints: urlOptionsSchema,
3483
- actor: z30.enum(["member", "staff"]).optional()
3682
+ actor: z32.enum(["member", "staff"]).optional()
3484
3683
  }).strict(),
3485
- z30.object({
3486
- kind: z30.literal("manual"),
3487
- input: z30.enum(["photo", "quiz", "none"]),
3488
- actor: z30.enum(["member", "staff"]).optional()
3684
+ z32.object({
3685
+ kind: z32.literal("manual"),
3686
+ input: z32.enum(["photo", "quiz", "none"]),
3687
+ actor: z32.enum(["member", "staff"]).optional()
3489
3688
  }).strict(),
3490
- z30.object({
3491
- kind: z30.literal("automatic"),
3689
+ z32.object({
3690
+ kind: z32.literal("automatic"),
3492
3691
  tracker: trackerTriggerPolicySchema.optional()
3493
3692
  }).strict()
3494
3693
  ]);
3495
- var triggerResponseSchema = z30.union(
3694
+ var triggerResponseSchema = z32.union(
3496
3695
  triggerSchema.options.map((option) => option.strip())
3497
3696
  );
3498
- var photoResultSchema = z30.object({
3499
- kind: z30.enum(["pass", "fail", "unclear"]),
3500
- reason: z30.string().min(1).max(2e3)
3697
+ var photoResultSchema = z32.object({
3698
+ kind: z32.enum(["pass", "fail", "unclear"]),
3699
+ reason: z32.string().min(1).max(2e3)
3501
3700
  }).strict();
3502
- var textReviewInputSchema = z30.object({
3503
- text: z30.string().min(1).max(16e3).refine((value) => value.trim().length > 0, "Text must not be blank"),
3504
- criteria: z30.string().trim().min(1).max(2e3)
3701
+ var textReviewInputSchema = z32.object({
3702
+ text: z32.string().min(1).max(16e3).refine((value) => value.trim().length > 0, "Text must not be blank"),
3703
+ criteria: z32.string().trim().min(1).max(2e3)
3505
3704
  }).strict();
3506
3705
  var textResultSchema = photoResultSchema;
3507
3706
  var deferPolicy = {
@@ -3515,31 +3714,31 @@ var retryCooldownPolicy = {
3515
3714
  minMs: 1e3,
3516
3715
  maxMs: 6048e5
3517
3716
  };
3518
- var retryCooldownMsSchema = z30.number().int().min(retryCooldownPolicy.minMs).max(retryCooldownPolicy.maxMs);
3519
- var evaluatorProgressSchema = z30.object({
3520
- current: z30.number().finite().nonnegative(),
3521
- target: z30.number().finite().positive(),
3522
- reason: z30.string().min(1).max(2e3)
3717
+ var retryCooldownMsSchema = z32.number().int().min(retryCooldownPolicy.minMs).max(retryCooldownPolicy.maxMs);
3718
+ var evaluatorProgressSchema = z32.object({
3719
+ current: z32.number().finite().nonnegative(),
3720
+ target: z32.number().finite().positive(),
3721
+ reason: z32.string().min(1).max(2e3)
3523
3722
  }).refine((value) => value.current <= value.target, {
3524
3723
  message: "Progress current must not exceed target"
3525
3724
  });
3526
- var decisionSchema = z30.discriminatedUnion("kind", [
3527
- z30.strictObject({
3528
- kind: z30.literal("defer"),
3529
- reason: z30.string().min(1).max(2e3),
3530
- retryAfterMs: z30.number().int().min(deferPolicy.minRetryAfterMs).max(deferPolicy.maxRetryAfterMs).optional(),
3725
+ var decisionSchema = z32.discriminatedUnion("kind", [
3726
+ z32.strictObject({
3727
+ kind: z32.literal("defer"),
3728
+ reason: z32.string().min(1).max(2e3),
3729
+ retryAfterMs: z32.number().int().min(deferPolicy.minRetryAfterMs).max(deferPolicy.maxRetryAfterMs).optional(),
3531
3730
  /** Absolute Unix milliseconds; the platform can only shorten its existing deadline. */
3532
- until: z30.number().int().safe().nonnegative().optional()
3731
+ until: z32.number().int().safe().nonnegative().optional()
3533
3732
  }),
3534
- evaluatorProgressSchema.safeExtend({ kind: z30.literal("progress") }).strict(),
3535
- z30.object({
3536
- kind: z30.literal("accept"),
3537
- rewards: z30.array(rewardSchema).max(10),
3733
+ evaluatorProgressSchema.safeExtend({ kind: z32.literal("progress") }).strict(),
3734
+ z32.object({
3735
+ kind: z32.literal("accept"),
3736
+ rewards: z32.array(rewardSchema).max(10),
3538
3737
  completionKey: completionKeySchema.optional()
3539
3738
  }).strict(),
3540
- z30.object({
3541
- kind: z30.literal("reject"),
3542
- reason: z30.string().min(1).max(2e3),
3739
+ z32.object({
3740
+ kind: z32.literal("reject"),
3741
+ reason: z32.string().min(1).max(2e3),
3543
3742
  /**
3544
3743
  * A stable key for the rejection's cause, such as `wrong-answers`, stored as the attempt's
3545
3744
  * `code`: lowercase letters, digits and hyphens, at most 64 characters, and none of the
@@ -3547,28 +3746,28 @@ var decisionSchema = z30.discriminatedUnion("kind", [
3547
3746
  */
3548
3747
  code: rejectCodeSchema.optional(),
3549
3748
  /** The evaluator asked for human review, but review is off for the quest, so this is a reject. */
3550
- requestedReview: z30.literal(true).optional()
3749
+ requestedReview: z32.literal(true).optional()
3551
3750
  }).strict(),
3552
- z30.object({
3553
- kind: z30.literal("review"),
3554
- reason: z30.string().min(1).max(2e3),
3555
- rewards: z30.array(rewardSchema).max(10).optional(),
3751
+ z32.object({
3752
+ kind: z32.literal("review"),
3753
+ reason: z32.string().min(1).max(2e3),
3754
+ rewards: z32.array(rewardSchema).max(10).optional(),
3556
3755
  completionKey: completionKeySchema.optional()
3557
3756
  }).strict()
3558
3757
  ]);
3559
- var reviewModeSchema = z30.enum(["workers-ai"]);
3560
- var storedReviewModeSchema = z30.enum([
3758
+ var reviewModeSchema = z32.enum(["workers-ai"]);
3759
+ var storedReviewModeSchema = z32.enum([
3561
3760
  "fixture-pass",
3562
3761
  "fixture-fail",
3563
3762
  "fixture-unclear",
3564
3763
  "fixture-error",
3565
3764
  "workers-ai"
3566
3765
  ]);
3567
- var rewardBundleSchema = z30.array(rewardSchema).max(10).refine(
3766
+ var rewardBundleSchema = z32.array(rewardSchema).max(10).refine(
3568
3767
  (rewards) => new Set(rewards.map(rewardKey)).size === rewards.length,
3569
3768
  "Use one entry per balance or shared reward"
3570
3769
  );
3571
- var mediaUrlSchema = z30.string().max(2e3).refine((value) => {
3770
+ var mediaUrlSchema = z32.string().max(2e3).refine((value) => {
3572
3771
  if (/^\/(?!\/)[^\\\s]*$/.test(value)) {
3573
3772
  return true;
3574
3773
  }
@@ -3578,67 +3777,71 @@ var mediaUrlSchema = z30.string().max(2e3).refine((value) => {
3578
3777
  return false;
3579
3778
  }
3580
3779
  }, "Use an HTTPS URL or a same-site path beginning with /");
3581
- var questStepActionSchema = z30.discriminatedUnion("kind", [
3582
- z30.object({
3583
- kind: z30.literal("link"),
3780
+ var questStepActionSchema = z32.discriminatedUnion("kind", [
3781
+ z32.object({
3782
+ kind: z32.literal("link"),
3584
3783
  url: mediaUrlSchema.refine(
3585
3784
  (value) => value.startsWith("https://"),
3586
3785
  "Use an HTTPS URL"
3587
3786
  ),
3588
- label: z30.string().trim().min(1).max(120)
3787
+ label: z32.string().trim().min(1).max(120)
3589
3788
  }).strict()
3590
3789
  ]);
3591
- var questStepSchema = z30.object({
3592
- title: z30.string().trim().min(1).max(120),
3593
- description: z30.string().max(4e3).optional(),
3790
+ var questStepSchema = z32.object({
3791
+ title: z32.string().trim().min(1).max(120),
3792
+ description: z32.string().max(4e3).optional(),
3594
3793
  action: questStepActionSchema.optional()
3595
3794
  }).strict();
3596
- var questPresentationRequirementSchema = z30.discriminatedUnion("kind", [
3597
- z30.object({ kind: z30.literal("account"), provider: authProviderSchema }).strict(),
3598
- z30.object({ kind: z30.literal("wallet"), chain: walletChainSchema.optional() }).strict()
3795
+ var questPresentationRequirementSchema = z32.discriminatedUnion("kind", [
3796
+ z32.object({ kind: z32.literal("account"), provider: authProviderSchema }).strict(),
3797
+ z32.object({ kind: z32.literal("wallet"), chain: walletChainSchema.optional() }).strict()
3599
3798
  ]);
3600
- var questPresentationContentSchema = z30.object({
3601
- steps: z30.array(questStepSchema).max(30).optional(),
3799
+ var questPresentationContentSchema = z32.object({
3800
+ steps: z32.array(questStepSchema).max(30).optional(),
3602
3801
  image: mediaUrlSchema.optional(),
3603
- imageAlt: z30.string().max(500).optional(),
3604
- requirements: z30.array(questPresentationRequirementSchema).max(10).optional()
3802
+ imageAlt: z32.string().max(500).optional(),
3803
+ requirements: z32.array(questPresentationRequirementSchema).max(10).optional()
3605
3804
  }).strict();
3606
3805
  var questPresentationSchema = questPresentationContentSchema.extend({
3607
3806
  quiz: quizQuestionsSchema.optional(),
3608
- instructions: z30.string().max(4e3).optional(),
3609
- video: z30.object({
3807
+ instructions: z32.string().max(4e3).optional(),
3808
+ video: z32.object({
3610
3809
  url: mediaUrlSchema,
3611
3810
  poster: mediaUrlSchema.optional(),
3612
- captions: z30.object({
3811
+ captions: z32.object({
3613
3812
  url: mediaUrlSchema,
3614
- language: z30.string().min(2).max(20),
3615
- label: z30.string().min(1).max(80)
3813
+ language: z32.string().min(2).max(20),
3814
+ label: z32.string().min(1).max(80)
3616
3815
  }).strict().optional()
3617
3816
  }).strict().optional()
3618
3817
  }).strict();
3619
- var questProfileSchema = z30.object({ visible: z30.boolean() }).strict();
3818
+ var questProfileSchema = z32.object({ visible: z32.boolean() }).strict();
3620
3819
  var evaluatorProtocol = 2;
3621
- var evaluatorProtocolSchema = z30.literal(evaluatorProtocol);
3622
- var questDescriptionSchema = z30.object({
3820
+ var evaluatorProtocolSchema = z32.literal(evaluatorProtocol);
3821
+ var questDescriptionSchema = z32.object({
3623
3822
  quest: identifier,
3624
3823
  evaluatorProtocol: evaluatorProtocolSchema,
3625
- title: z30.string().min(1).max(120),
3824
+ title: z32.string().min(1).max(120),
3626
3825
  presentation: questPresentationSchema.default({}),
3627
- integrations: z30.array(evaluatorIntegrationProviderSchema).max(10).default([]),
3826
+ integrations: z32.array(evaluatorIntegrationProviderSchema).max(10).default([]),
3628
3827
  fields: settingsFieldsSchema,
3629
3828
  values: settingsValuesSchema,
3630
3829
  rewards: rewardBundleSchema,
3631
- humanReview: z30.boolean(),
3830
+ /** Messages Relay posts in connected chats and channels when a completion pays. */
3831
+ announcements: z32.array(announcementSchema).max(3).optional(),
3832
+ humanReview: z32.boolean(),
3632
3833
  trigger: triggerSchema,
3633
3834
  performance: contentPerformancePolicySchema.optional(),
3634
- requires: z30.array(prerequisiteSchema).max(30).default([]),
3835
+ requires: z32.array(prerequisiteSchema).max(30).default([]),
3635
3836
  campaign: campaignDefinitionSchema.optional(),
3636
3837
  availability: availabilityWindowSchema.optional(),
3637
- completion: z30.preprocess(refuseStreakTimeZone, completionPolicySchema),
3638
- visibility: z30.enum(["visible", "hidden"]).default("visible"),
3838
+ completion: z32.preprocess(refuseStreakTimeZone, completionPolicySchema),
3839
+ visibility: z32.enum(["visible", "hidden"]).default("visible"),
3639
3840
  /** Whether completions show on participant profiles (`/v1/profiles/:id/completions`). */
3640
3841
  profile: questProfileSchema.default({ visible: false }),
3641
- budgets: z30.array(budgetSchema).max(20).default([]),
3842
+ budgets: z32.array(budgetSchema).max(20).default([]),
3843
+ /** Budgets counted per tracker record author; only on quests with a tracker trigger. */
3844
+ authorBudgets: z32.array(authorBudgetSchema).max(20).optional(),
3642
3845
  /**
3643
3846
  * Milliseconds a member waits after an attempt is rejected (by the evaluator or a reviewer)
3644
3847
  * before submitting this quest again. Only for quests members submit. Omitted: no cooldown.
@@ -3651,23 +3854,23 @@ var questDescriptionSchema = z30.object({
3651
3854
  */
3652
3855
  completionCooldownMs: retryCooldownMsSchema.optional()
3653
3856
  }).strict();
3654
- var artifactSchema = z30.object({ code: z30.string().min(1).max(1e6) }).strict();
3857
+ var artifactSchema = z32.object({ code: z32.string().min(1).max(1e6) }).strict();
3655
3858
  var releaseSchema = artifactSchema.extend({
3656
3859
  /** The SDK runtime the code imports. Absent, the code bundles its own SDK. */
3657
3860
  runtime: sdkRuntimeReferenceSchema.optional(),
3658
3861
  settings: settingsValuesSchema,
3659
3862
  provider: reviewModeSchema,
3660
3863
  expectedRelease: identifier.nullable().optional(),
3661
- settingRenames: z30.record(z30.string(), z30.string()).optional()
3864
+ settingRenames: z32.record(z32.string(), z32.string()).optional()
3662
3865
  }).strict();
3663
- var batchReleaseSchema = z30.object({
3664
- releases: z30.array(releaseSchema).min(1).max(questScaleLimits.quests)
3866
+ var batchReleaseSchema = z32.object({
3867
+ releases: z32.array(releaseSchema).min(1).max(questScaleLimits.quests)
3665
3868
  }).strict();
3666
- var questSettingsInputSchema = z30.object({
3869
+ var questSettingsInputSchema = z32.object({
3667
3870
  quest: identifier,
3668
3871
  expectedRelease: identifier,
3669
3872
  set: settingsValuesSchema,
3670
- reset: z30.array(z30.string()),
3873
+ reset: z32.array(z32.string()),
3671
3874
  /** Replace the editable presentation fields; null restores the code defaults. */
3672
3875
  presentation: questPresentationContentSchema.nullable().optional(),
3673
3876
  /**
@@ -3675,7 +3878,7 @@ var questSettingsInputSchema = z30.object({
3675
3878
  * none on chain; null removes a pasted one. An IDL the program publishes on chain takes
3676
3879
  * precedence.
3677
3880
  */
3678
- solanaIdls: z30.record(z30.string(), anchorIdlSchema.nullable()).optional()
3881
+ solanaIdls: z32.record(z32.string(), anchorIdlSchema.nullable()).optional()
3679
3882
  }).strict();
3680
3883
  var storedQuestDescriptionSchema = questDescriptionSchema.extend({
3681
3884
  completion: completionPolicySchema
@@ -3683,18 +3886,18 @@ var storedQuestDescriptionSchema = questDescriptionSchema.extend({
3683
3886
  var publishedReleaseSchema = responseShape(
3684
3887
  storedQuestDescriptionSchema.extend({
3685
3888
  key: identifier.optional(),
3686
- code: z30.string(),
3889
+ code: z32.string(),
3687
3890
  /** The SDK runtime `code` imports. Absent, the code bundles its own SDK. */
3688
3891
  runtime: sdkRuntimeReferenceSchema.optional(),
3689
3892
  provider: storedReviewModeSchema,
3690
3893
  id: identifier,
3691
- createdAt: z30.number(),
3692
- origin: z30.object({ typeVersion: identifier }).strict().optional(),
3693
- lifecycle: z30.enum(["active", "paused", "archived"]).default("active"),
3694
- configuration: z30.object({
3894
+ createdAt: z32.number(),
3895
+ origin: z32.object({ typeVersion: identifier }).strict().optional(),
3896
+ lifecycle: z32.enum(["active", "paused", "archived"]).default("active"),
3897
+ configuration: z32.object({
3695
3898
  defaults: settingsValuesSchema,
3696
3899
  overrides: settingsValuesSchema,
3697
- preserved: z30.array(z30.string()),
3900
+ preserved: z32.array(z32.string()),
3698
3901
  presentation: questPresentationContentSchema.optional(),
3699
3902
  presentationDefaults: questPresentationContentSchema.optional()
3700
3903
  }).strict().optional(),
@@ -3703,14 +3906,14 @@ var publishedReleaseSchema = responseShape(
3703
3906
  * `settings.solanaProgram()` setting key. Stored when the setting is saved; a setting without
3704
3907
  * an IDL has no entry.
3705
3908
  */
3706
- solanaIdls: z30.record(z30.string(), solanaProgramIdlSchema).optional()
3909
+ solanaIdls: z32.record(z32.string(), solanaProgramIdlSchema).optional()
3707
3910
  })
3708
3911
  );
3709
- var templateSchema = z30.object({
3710
- code: z30.string(),
3912
+ var templateSchema = z32.object({
3913
+ code: z32.string(),
3711
3914
  definition: questDescriptionSchema
3712
3915
  });
3713
- var quizAnswersSchema = z30.record(identifier, identifier).refine(
3916
+ var quizAnswersSchema = z32.record(identifier, identifier).refine(
3714
3917
  (answers) => Object.keys(answers).length > 0 && Object.keys(answers).length <= 50,
3715
3918
  "Provide between 1 and 50 answers"
3716
3919
  ).transform(
@@ -3718,17 +3921,17 @@ var quizAnswersSchema = z30.record(identifier, identifier).refine(
3718
3921
  Object.entries(answers).sort(([a], [b]) => a.localeCompare(b))
3719
3922
  )
3720
3923
  );
3721
- var quizEvidenceSchema = z30.object({
3722
- kind: z30.literal("quiz"),
3924
+ var quizEvidenceSchema = z32.object({
3925
+ kind: z32.literal("quiz"),
3723
3926
  release: identifier.optional(),
3724
3927
  answers: quizAnswersSchema
3725
3928
  }).strict();
3726
- var submissionEvidenceSchema = z30.union([
3929
+ var submissionEvidenceSchema = z32.union([
3727
3930
  quizEvidenceSchema,
3728
3931
  textEvidenceSchema,
3729
3932
  urlEvidenceSchema
3730
3933
  ]);
3731
- var submitSchema = z30.object({
3934
+ var submitSchema = z32.object({
3732
3935
  actionId: identifier,
3733
3936
  quest: identifier,
3734
3937
  member: identifier,
@@ -3736,7 +3939,7 @@ var submitSchema = z30.object({
3736
3939
  input: submissionEvidenceSchema.optional(),
3737
3940
  release: identifier.optional(),
3738
3941
  /** @deprecated Relay refuses a submission that sets it to `true` and ignores `false`. Removed in 2.0.0. */
3739
- faultAfterReview: z30.boolean().optional()
3942
+ faultAfterReview: z32.boolean().optional()
3740
3943
  }).strict();
3741
3944
  var AttemptStatus = {
3742
3945
  Queued: "queued",
@@ -3748,8 +3951,8 @@ var AttemptStatus = {
3748
3951
  NeedsReview: "needs-review",
3749
3952
  Failed: "failed"
3750
3953
  };
3751
- var attemptStatusSchema = z30.string();
3752
- var attemptSchema = z30.object({
3954
+ var attemptStatusSchema = z32.string();
3955
+ var attemptSchema = z32.object({
3753
3956
  id: identifier,
3754
3957
  release: identifier,
3755
3958
  quest: identifier,
@@ -3757,29 +3960,29 @@ var attemptSchema = z30.object({
3757
3960
  evidence: identifier.nullable(),
3758
3961
  input: submissionEvidenceSchema.optional(),
3759
3962
  status: attemptStatusSchema,
3760
- reason: z30.string().nullable(),
3761
- retries: z30.number(),
3762
- generation: z30.number(),
3763
- completion: z30.string().nullable(),
3963
+ reason: z32.string().nullable(),
3964
+ retries: z32.number(),
3965
+ generation: z32.number(),
3966
+ completion: z32.string().nullable(),
3764
3967
  reviewRewards: rewardBundleSchema.nullable().default(null),
3765
3968
  /** Scheduled reruns advance this number; failure retries preserve it. */
3766
- evaluationRun: z30.number().int().nonnegative().default(0),
3767
- deferCount: z30.number().int().nonnegative().default(0),
3768
- deferUntil: z30.number().int().safe().nullable().default(null),
3769
- nextEvaluationAt: z30.number().int().safe().nullable().default(null),
3969
+ evaluationRun: z32.number().int().nonnegative().default(0),
3970
+ deferCount: z32.number().int().nonnegative().default(0),
3971
+ deferUntil: z32.number().int().safe().nullable().default(null),
3972
+ nextEvaluationAt: z32.number().int().safe().nullable().default(null),
3770
3973
  /**
3771
3974
  * Open code: consumers must tolerate new values. Relay writes its own codes, such as
3772
3975
  * `budget-exhausted`; an attempt the evaluator rejected with `decision.reject({ reason, code })`
3773
3976
  * carries the evaluator's code in management reads, and null in responses to members.
3774
3977
  */
3775
- code: z30.string().nullable().default(null),
3978
+ code: z32.string().nullable().default(null),
3776
3979
  progress: evaluatorProgressSchema.nullable().default(null),
3777
3980
  /**
3778
3981
  * The evaluator asked for human review of a quest with review off, so Domino rejected the attempt
3779
3982
  * with the evaluator's reason. Only set on a rejected attempt.
3780
3983
  */
3781
- requestedReview: z30.boolean().default(false),
3782
- createdAt: z30.number()
3984
+ requestedReview: z32.boolean().default(false),
3985
+ createdAt: z32.number()
3783
3986
  });
3784
3987
  var QuestSubmissionStatus = {
3785
3988
  Open: "open",
@@ -3787,9 +3990,9 @@ var QuestSubmissionStatus = {
3787
3990
  Discarded: "discarded",
3788
3991
  Expired: "expired"
3789
3992
  };
3790
- var questSubmissionStatusSchema = z30.string();
3993
+ var questSubmissionStatusSchema = z32.string();
3791
3994
  var questSubmissionSchema = responseShape(
3792
- z30.object({
3995
+ z32.object({
3793
3996
  id: identifier,
3794
3997
  quest: identifier,
3795
3998
  member: identifier,
@@ -3799,85 +4002,85 @@ var questSubmissionSchema = responseShape(
3799
4002
  /** An uploaded photo's evidence ID. */
3800
4003
  evidence: identifier.nullable(),
3801
4004
  /** Submitting was refused because the quest changed: review the draft before submitting again. */
3802
- reviewRequired: z30.boolean(),
4005
+ reviewRequired: z32.boolean(),
3803
4006
  status: questSubmissionStatusSchema,
3804
4007
  /** The attempt a `submitted` submission admitted. */
3805
4008
  attempt: identifier.nullable(),
3806
- createdAt: z30.number(),
3807
- updatedAt: z30.number(),
4009
+ createdAt: z32.number(),
4010
+ updatedAt: z32.number(),
3808
4011
  /** When an open submission expires unless it changes again. */
3809
- expiresAt: z30.number()
4012
+ expiresAt: z32.number()
3810
4013
  })
3811
4014
  );
3812
- var questSubmissionUpdateSchema = z30.object({
4015
+ var questSubmissionUpdateSchema = z32.object({
3813
4016
  release: identifier.nullable().optional(),
3814
4017
  input: submissionEvidenceSchema.nullable().optional(),
3815
4018
  evidence: identifier.nullable().optional()
3816
4019
  }).strict();
3817
4020
  var questSubmissionResultSchema = responseShape(
3818
- z30.object({
4021
+ z32.object({
3819
4022
  submission: questSubmissionSchema,
3820
4023
  attempt: attemptSchema,
3821
- replayed: z30.boolean()
4024
+ replayed: z32.boolean()
3822
4025
  })
3823
4026
  );
3824
- var eventSchema = z30.object({
3825
- id: z30.number(),
3826
- attempt: z30.string().nullable(),
3827
- kind: z30.string(),
3828
- detail: z30.string(),
3829
- actor: z30.string().nullable().default(null),
3830
- at: z30.number()
4027
+ var eventSchema = z32.object({
4028
+ id: z32.number(),
4029
+ attempt: z32.string().nullable(),
4030
+ kind: z32.string(),
4031
+ detail: z32.string(),
4032
+ actor: z32.string().nullable().default(null),
4033
+ at: z32.number()
3831
4034
  });
3832
- var pickupSelectionSchema = z30.object({
4035
+ var pickupSelectionSchema = z32.object({
3833
4036
  item: identifier,
3834
- revision: z30.number().int().nonnegative()
4037
+ revision: z32.number().int().nonnegative()
3835
4038
  }).strict();
3836
- var pickupAllocationSchema = z30.object({
4039
+ var pickupAllocationSchema = z32.object({
3837
4040
  item: identifier,
3838
- label: z30.string().min(1).max(80)
4041
+ label: z32.string().min(1).max(80)
3839
4042
  }).strict();
3840
- var pickupPolicySchema = z30.discriminatedUnion("kind", [
3841
- z30.object({ kind: z30.literal("untracked") }).strict(),
3842
- z30.object({
3843
- kind: z30.literal("at-pickup"),
3844
- tiers: z30.array(
3845
- z30.object({
4043
+ var pickupPolicySchema = z32.discriminatedUnion("kind", [
4044
+ z32.object({ kind: z32.literal("untracked") }).strict(),
4045
+ z32.object({
4046
+ kind: z32.literal("at-pickup"),
4047
+ tiers: z32.array(
4048
+ z32.object({
3846
4049
  tier: identifier,
3847
- variants: z30.array(pickupAllocationSchema).min(1).max(100)
4050
+ variants: z32.array(pickupAllocationSchema).min(1).max(100)
3848
4051
  }).strict()
3849
4052
  ).min(1).max(100)
3850
4053
  }).strict()
3851
4054
  ]);
3852
- var pickupCatalogSchema = z30.object({
4055
+ var pickupCatalogSchema = z32.object({
3853
4056
  reward: tieredRewardDefinitionSchema,
3854
- revision: z30.number().int().nonnegative(),
4057
+ revision: z32.number().int().nonnegative(),
3855
4058
  policy: pickupPolicySchema
3856
4059
  });
3857
- var pickupAvailabilitySchema = z30.discriminatedUnion("kind", [
3858
- z30.object({ kind: z30.literal("untracked") }).strict(),
3859
- z30.object({
3860
- kind: z30.literal("at-pickup"),
3861
- revision: z30.number().int().nonnegative(),
3862
- variants: z30.array(
4060
+ var pickupAvailabilitySchema = z32.discriminatedUnion("kind", [
4061
+ z32.object({ kind: z32.literal("untracked") }).strict(),
4062
+ z32.object({
4063
+ kind: z32.literal("at-pickup"),
4064
+ revision: z32.number().int().nonnegative(),
4065
+ variants: z32.array(
3863
4066
  pickupAllocationSchema.extend({
3864
- available: z30.number().int().nonnegative()
4067
+ available: z32.number().int().nonnegative()
3865
4068
  })
3866
4069
  )
3867
4070
  }).strict()
3868
4071
  ]);
3869
- var configurePickupSchema = z30.object({
4072
+ var configurePickupSchema = z32.object({
3870
4073
  reward: identifier,
3871
- revision: z30.number().int().nonnegative(),
4074
+ revision: z32.number().int().nonnegative(),
3872
4075
  actionId: identifier,
3873
- policy: z30.discriminatedUnion("kind", [
3874
- z30.object({ kind: z30.literal("untracked") }).strict(),
3875
- z30.object({
3876
- kind: z30.literal("at-pickup"),
3877
- tiers: z30.array(
3878
- z30.object({
4076
+ policy: z32.discriminatedUnion("kind", [
4077
+ z32.object({ kind: z32.literal("untracked") }).strict(),
4078
+ z32.object({
4079
+ kind: z32.literal("at-pickup"),
4080
+ tiers: z32.array(
4081
+ z32.object({
3879
4082
  tier: identifier,
3880
- variants: z30.array(
4083
+ variants: z32.array(
3881
4084
  pickupAllocationSchema.extend({
3882
4085
  item: identifier.optional()
3883
4086
  })
@@ -3887,10 +4090,10 @@ var configurePickupSchema = z30.object({
3887
4090
  }).strict()
3888
4091
  ])
3889
4092
  }).strict();
3890
- var entitlementRecoverySchema = z30.object({
4093
+ var entitlementRecoverySchema = z32.object({
3891
4094
  completion: identifier,
3892
- reason: z30.string(),
3893
- flaggedAt: z30.number(),
4095
+ reason: z32.string(),
4096
+ flaggedAt: z32.number(),
3894
4097
  /** Null means no accepted completion currently earns this reward. */
3895
4098
  remainingTier: identifier.nullable()
3896
4099
  });
@@ -3900,40 +4103,40 @@ var entitlementBase = {
3900
4103
  reward: tieredRewardDefinitionSchema,
3901
4104
  earnedTier: identifier,
3902
4105
  tier: identifier,
3903
- revision: z30.number().int().positive()
4106
+ revision: z32.number().int().positive()
3904
4107
  };
3905
- var entitlementStateSchema = z30.discriminatedUnion("status", [
3906
- z30.object({ ...entitlementBase, status: z30.literal("available") }).strict(),
3907
- z30.object({
4108
+ var entitlementStateSchema = z32.discriminatedUnion("status", [
4109
+ z32.object({ ...entitlementBase, status: z32.literal("available") }).strict(),
4110
+ z32.object({
3908
4111
  ...entitlementBase,
3909
- status: z30.literal("handing-over"),
4112
+ status: z32.literal("handing-over"),
3910
4113
  handover: identifier,
3911
- startedAt: z30.number(),
4114
+ startedAt: z32.number(),
3912
4115
  allocation: pickupAllocationSchema.optional()
3913
4116
  }).strict(),
3914
- z30.object({
4117
+ z32.object({
3915
4118
  ...entitlementBase,
3916
- status: z30.literal("collected"),
4119
+ status: z32.literal("collected"),
3917
4120
  handover: identifier,
3918
- startedAt: z30.number(),
4121
+ startedAt: z32.number(),
3919
4122
  allocation: pickupAllocationSchema.optional(),
3920
- collectedAt: z30.number(),
4123
+ collectedAt: z32.number(),
3921
4124
  recovery: entitlementRecoverySchema.optional()
3922
4125
  }).strict(),
3923
4126
  // An operator voided it: it can no longer be handed over. A quest grant of the same reward to
3924
4127
  // the member (the same grant key) makes it available again; a voided referral reward stays void.
3925
- z30.object({
4128
+ z32.object({
3926
4129
  ...entitlementBase,
3927
- status: z30.literal("void"),
3928
- voidedAt: z30.number()
4130
+ status: z32.literal("void"),
4131
+ voidedAt: z32.number()
3929
4132
  }).strict()
3930
4133
  ]);
3931
- var tieredRewardReadSchema = z30.object({
4134
+ var tieredRewardReadSchema = z32.object({
3932
4135
  id: identifier,
3933
- title: z30.string(),
3934
- tiers: z30.array(z30.object({ id: identifier, title: z30.string() }).loose()),
3935
- inventory: z30.object({ kind: z30.string() }).loose(),
3936
- fulfillment: z30.object({ kind: z30.string() }).loose()
4136
+ title: z32.string(),
4137
+ tiers: z32.array(z32.object({ id: identifier, title: z32.string() }).loose()),
4138
+ inventory: z32.object({ kind: z32.string() }).loose(),
4139
+ fulfillment: z32.object({ kind: z32.string() }).loose()
3937
4140
  }).loose();
3938
4141
  var entitlementReadBase = {
3939
4142
  id: identifier,
@@ -3941,63 +4144,63 @@ var entitlementReadBase = {
3941
4144
  reward: tieredRewardReadSchema,
3942
4145
  earnedTier: identifier,
3943
4146
  tier: identifier,
3944
- revision: z30.number().int()
4147
+ revision: z32.number().int()
3945
4148
  };
3946
- var allocationReadSchema = z30.object({ item: identifier, label: z30.string() }).loose();
3947
- var entitlementSchema = z30.union([
3948
- z30.discriminatedUnion("status", [
3949
- z30.object({ ...entitlementReadBase, status: z30.literal("available") }).loose(),
3950
- z30.object({
4149
+ var allocationReadSchema = z32.object({ item: identifier, label: z32.string() }).loose();
4150
+ var entitlementSchema = z32.union([
4151
+ z32.discriminatedUnion("status", [
4152
+ z32.object({ ...entitlementReadBase, status: z32.literal("available") }).loose(),
4153
+ z32.object({
3951
4154
  ...entitlementReadBase,
3952
- status: z30.literal("handing-over"),
4155
+ status: z32.literal("handing-over"),
3953
4156
  handover: identifier,
3954
- startedAt: z30.number(),
4157
+ startedAt: z32.number(),
3955
4158
  allocation: allocationReadSchema.optional()
3956
4159
  }).loose(),
3957
- z30.object({
4160
+ z32.object({
3958
4161
  ...entitlementReadBase,
3959
- status: z30.literal("collected"),
4162
+ status: z32.literal("collected"),
3960
4163
  handover: identifier,
3961
- startedAt: z30.number(),
4164
+ startedAt: z32.number(),
3962
4165
  allocation: allocationReadSchema.optional(),
3963
- collectedAt: z30.number(),
4166
+ collectedAt: z32.number(),
3964
4167
  recovery: entitlementRecoverySchema.optional()
3965
4168
  }).loose(),
3966
- z30.object({
4169
+ z32.object({
3967
4170
  ...entitlementReadBase,
3968
- status: z30.literal("void"),
3969
- voidedAt: z30.number()
4171
+ status: z32.literal("void"),
4172
+ voidedAt: z32.number()
3970
4173
  }).loose()
3971
4174
  ]),
3972
- z30.object({ ...entitlementReadBase, status: z30.string() }).loose().transform(({ status, ...entitlement }) => ({
4175
+ z32.object({ ...entitlementReadBase, status: z32.string() }).loose().transform(({ status, ...entitlement }) => ({
3973
4176
  ...entitlement,
3974
4177
  status: "unsupported",
3975
4178
  reportedStatus: status
3976
4179
  }))
3977
4180
  ]);
3978
- var beginHandoverSchema = z30.object({
4181
+ var beginHandoverSchema = z32.object({
3979
4182
  actionId: identifier,
3980
- revision: z30.number().int().positive(),
4183
+ revision: z32.number().int().positive(),
3981
4184
  selection: pickupSelectionSchema.optional()
3982
4185
  }).strict();
3983
- var confirmHandoverSchema = z30.object({ actionId: identifier, handover: identifier }).strict();
3984
- var entitlementCorrectionSchema = z30.object({
4186
+ var confirmHandoverSchema = z32.object({ actionId: identifier, handover: identifier }).strict();
4187
+ var entitlementCorrectionSchema = z32.object({
3985
4188
  actionId: identifier,
3986
- revision: z30.number().int().positive(),
3987
- reason: z30.string().trim().min(1).max(500)
4189
+ revision: z32.number().int().positive(),
4190
+ reason: z32.string().trim().min(1).max(500)
3988
4191
  }).strict();
3989
4192
  var CompletionSourceKind = {
3990
4193
  Quest: "quest",
3991
4194
  Leaderboard: "leaderboard"
3992
4195
  };
3993
- var completionSourceKindSchema = z30.string().min(1).max(64);
3994
- var completionSourceSchema = z30.object({
4196
+ var completionSourceKindSchema = z32.string().min(1).max(64);
4197
+ var completionSourceSchema = z32.object({
3995
4198
  kind: completionSourceKindSchema,
3996
4199
  id: identifier
3997
4200
  });
3998
- var completionRecordSchema = z30.object({
4201
+ var completionRecordSchema = z32.object({
3999
4202
  /** The occurrence the completion consumed. For a leaderboard prize, the settlement ID. */
4000
- key: z30.string().default("once"),
4203
+ key: z32.string().default("once"),
4001
4204
  id: identifier,
4002
4205
  /** The quest ID, or the board ID when `source.kind` is `leaderboard`. */
4003
4206
  quest: identifier,
@@ -4005,19 +4208,19 @@ var completionRecordSchema = z30.object({
4005
4208
  /** What paid the completion. `source.id` repeats `quest`. */
4006
4209
  source: completionSourceSchema.optional()
4007
4210
  });
4008
- var questAvailabilitySchema = z30.discriminatedUnion("kind", [
4009
- z30.object({
4010
- kind: z30.literal("available"),
4011
- input: z30.enum(["photo", "quiz", "none", "text", "url"])
4211
+ var questAvailabilitySchema = z32.discriminatedUnion("kind", [
4212
+ z32.object({
4213
+ kind: z32.literal("available"),
4214
+ input: z32.enum(["photo", "quiz", "none", "text", "url"])
4012
4215
  }).strict(),
4013
- z30.object({ kind: z30.literal("completed") }).strict(),
4014
- z30.object({
4015
- kind: z30.literal("locked"),
4016
- missing: z30.array(missingPrerequisiteSchema).min(1)
4216
+ z32.object({ kind: z32.literal("completed") }).strict(),
4217
+ z32.object({
4218
+ kind: z32.literal("locked"),
4219
+ missing: z32.array(missingPrerequisiteSchema).min(1)
4017
4220
  }).strict(),
4018
- z30.object({
4019
- kind: z30.literal("blocked"),
4020
- reason: z30.enum([
4221
+ z32.object({
4222
+ kind: z32.literal("blocked"),
4223
+ reason: z32.enum([
4021
4224
  "budget-exhausted",
4022
4225
  "connection-required",
4023
4226
  "wallet-required",
@@ -4026,56 +4229,56 @@ var questAvailabilitySchema = z30.discriminatedUnion("kind", [
4026
4229
  "enrollment-required"
4027
4230
  ]),
4028
4231
  /** Which window refused admission when `reason` is `outside-window`. */
4029
- window: z30.enum(["tracker", "quest"]).optional(),
4030
- resetsAt: z30.number().int().safe().optional()
4232
+ window: z32.enum(["tracker", "quest"]).optional(),
4233
+ resetsAt: z32.number().int().safe().optional()
4031
4234
  }).strict(),
4032
- z30.object({ kind: z30.literal("staff-required") }).strict(),
4033
- z30.object({ kind: z30.literal("automatic") }).strict(),
4034
- z30.object({ kind: z30.literal("checking"), attempt: identifier }).strict(),
4035
- z30.object({ kind: z30.literal("needs-review"), attempt: identifier }).strict(),
4036
- z30.object({ kind: z30.literal("retryable"), attempt: identifier }).strict()
4235
+ z32.object({ kind: z32.literal("staff-required") }).strict(),
4236
+ z32.object({ kind: z32.literal("automatic") }).strict(),
4237
+ z32.object({ kind: z32.literal("checking"), attempt: identifier }).strict(),
4238
+ z32.object({ kind: z32.literal("needs-review"), attempt: identifier }).strict(),
4239
+ z32.object({ kind: z32.literal("retryable"), attempt: identifier }).strict()
4037
4240
  ]);
4038
- var questAvailabilityResponseSchema = z30.union(
4241
+ var questAvailabilityResponseSchema = z32.union(
4039
4242
  questAvailabilitySchema.options.map((option) => option.strip())
4040
4243
  );
4041
- var questBudgetViewSchema = z30.object({
4244
+ var questBudgetViewSchema = z32.object({
4042
4245
  id: identifier,
4043
- scope: z30.enum(["member", "project"]),
4044
- period: z30.enum(["day", "week", "month", "lifetime"]),
4045
- remaining: z30.number().int().safe().nonnegative(),
4046
- resetsAt: z30.number().int().safe().nullable()
4246
+ scope: z32.enum(["member", "project"]),
4247
+ period: z32.enum(["day", "week", "month", "lifetime"]),
4248
+ remaining: z32.number().int().safe().nonnegative(),
4249
+ resetsAt: z32.number().int().safe().nullable()
4047
4250
  });
4048
4251
  var memberProgressSchema = responseShape(
4049
- z30.object({
4252
+ z32.object({
4050
4253
  member: identifier,
4051
- quests: z30.array(
4052
- z30.object({
4254
+ quests: z32.array(
4255
+ z32.object({
4053
4256
  quest: identifier,
4054
4257
  key: identifier.optional(),
4055
4258
  release: identifier.optional(),
4056
- title: z30.string(),
4259
+ title: z32.string(),
4057
4260
  presentation: questPresentationSchema.default({}),
4058
- connections: z30.array(authProviderSchema).default([]),
4261
+ connections: z32.array(authProviderSchema).default([]),
4059
4262
  trigger: triggerResponseSchema,
4060
4263
  availability: questAvailabilityResponseSchema,
4061
- completed: z30.boolean(),
4264
+ completed: z32.boolean(),
4062
4265
  completion: completionPolicySchema.default({ kind: "once" }),
4063
4266
  streak: streakProgressSchema.nullable().optional(),
4064
4267
  counter: counterProgressSchema.nullable().optional(),
4065
4268
  /** Latest attempt's committed evaluator progress, while it remains deferred/evaluating. */
4066
4269
  progress: evaluatorProgressSchema.nullable().default(null),
4067
- completionCount: z30.number().int().nonnegative().default(0),
4068
- visibility: z30.enum(["visible", "hidden"]).default("visible"),
4069
- missing: z30.array(missingPrerequisiteSchema),
4270
+ completionCount: z32.number().int().nonnegative().default(0),
4271
+ visibility: z32.enum(["visible", "hidden"]).default("visible"),
4272
+ missing: z32.array(missingPrerequisiteSchema),
4070
4273
  campaign: campaignViewSchema.nullable().default(null),
4071
4274
  window: availabilityWindowSchema.nullable().default(null),
4072
- budgets: z30.array(questBudgetViewSchema).default([]),
4275
+ budgets: z32.array(questBudgetViewSchema).default([]),
4073
4276
  /**
4074
4277
  * Unix milliseconds when the member may submit again, while the quest's retry cooldown
4075
4278
  * after their rejected attempt runs. Until then a new attempt is refused with
4076
4279
  * `retry-cooldown`. Absent when no cooldown is running.
4077
4280
  */
4078
- retryAt: z30.number().int().safe().optional(),
4281
+ retryAt: z32.number().int().safe().optional(),
4079
4282
  /**
4080
4283
  * Unix milliseconds when the member may next submit the quest, while it waits on something
4081
4284
  * that ends by itself: the retry cooldown after a rejection, the completion cooldown after
@@ -4084,110 +4287,110 @@ var memberProgressSchema = responseShape(
4084
4287
  * several apply; use it for countdowns. Absent when the member can submit now, or when
4085
4288
  * nothing will reopen the quest (a used-up lifetime budget, a closed window).
4086
4289
  */
4087
- nextAvailableAt: z30.number().int().safe().optional(),
4290
+ nextAvailableAt: z32.number().int().safe().optional(),
4088
4291
  attempt: attemptSchema.nullable()
4089
4292
  })
4090
4293
  ),
4091
- entitlements: z30.array(entitlementSchema)
4294
+ entitlements: z32.array(entitlementSchema)
4092
4295
  })
4093
4296
  );
4094
4297
  var snapshotSchema = responseShape(
4095
- z30.object({
4096
- releases: z30.array(publishedReleaseSchema),
4097
- completions: z30.array(completionRecordSchema),
4098
- entitlements: z30.array(entitlementSchema),
4099
- attempts: z30.array(attemptSchema),
4100
- balances: z30.array(
4101
- z30.object({
4102
- member: z30.string(),
4103
- balance: z30.string(),
4104
- earned: z30.number(),
4105
- held: z30.number(),
4106
- available: z30.number()
4298
+ z32.object({
4299
+ releases: z32.array(publishedReleaseSchema),
4300
+ completions: z32.array(completionRecordSchema),
4301
+ entitlements: z32.array(entitlementSchema),
4302
+ attempts: z32.array(attemptSchema),
4303
+ balances: z32.array(
4304
+ z32.object({
4305
+ member: z32.string(),
4306
+ balance: z32.string(),
4307
+ earned: z32.number(),
4308
+ held: z32.number(),
4309
+ available: z32.number()
4107
4310
  })
4108
4311
  ),
4109
- events: z30.array(eventSchema)
4312
+ events: z32.array(eventSchema)
4110
4313
  })
4111
4314
  );
4112
- var evidenceSchema = z30.object({
4315
+ var evidenceSchema = z32.object({
4113
4316
  id: identifier,
4114
4317
  member: identifier,
4115
- type: z30.enum(["image/jpeg", "image/png"]),
4116
- size: z30.number()
4318
+ type: z32.enum(["image/jpeg", "image/png"]),
4319
+ size: z32.number()
4117
4320
  });
4118
- var errorSchema = z30.object({
4119
- error: z30.string(),
4120
- code: z30.string().optional(),
4321
+ var errorSchema = z32.object({
4322
+ error: z32.string(),
4323
+ code: z32.string().optional(),
4121
4324
  /** Which window refused admission when `code` is `outside-window`. */
4122
- window: z30.enum(["tracker", "quest"]).optional(),
4123
- missing: z30.array(missingPrerequisiteSchema).optional(),
4325
+ window: z32.enum(["tracker", "quest"]).optional(),
4326
+ missing: z32.array(missingPrerequisiteSchema).optional(),
4124
4327
  /**
4125
4328
  * Unix milliseconds when the member may submit again, when `code` is `retry-cooldown` or
4126
4329
  * `completion-cooldown`.
4127
4330
  */
4128
- retryAt: z30.number().int().safe().optional()
4331
+ retryAt: z32.number().int().safe().optional()
4129
4332
  });
4130
- var staffDecisionSchema = z30.object({
4333
+ var staffDecisionSchema = z32.object({
4131
4334
  actionId: identifier,
4132
- generation: z30.number().int().nonnegative(),
4133
- decision: z30.enum(["accept", "reject"]),
4134
- reason: z30.string().trim().min(1).max(2e3)
4335
+ generation: z32.number().int().nonnegative(),
4336
+ decision: z32.enum(["accept", "reject"]),
4337
+ reason: z32.string().trim().min(1).max(2e3)
4135
4338
  }).strict();
4136
- var acceptAnywaySchema = z30.object({
4339
+ var acceptAnywaySchema = z32.object({
4137
4340
  actionId: identifier,
4138
- reason: z30.string().trim().min(1).max(2e3)
4341
+ reason: z32.string().trim().min(1).max(2e3)
4139
4342
  }).strict();
4140
- var stockSchema = z30.object({ item: identifier, quantity: z30.number().int().min(0).max(1e4) }).strict();
4141
- var reservationSchema = z30.object({
4343
+ var stockSchema = z32.object({ item: identifier, quantity: z32.number().int().min(0).max(1e4) }).strict();
4344
+ var reservationSchema = z32.object({
4142
4345
  actionId: identifier,
4143
4346
  member: identifier,
4144
4347
  item: identifier,
4145
4348
  balance: identifier,
4146
- price: z30.number().int().positive().max(1e4)
4349
+ price: z32.number().int().positive().max(1e4)
4147
4350
  }).strict();
4148
4351
  var pageOptions = {
4149
- limit: z30.number().int().min(1).max(100).default(25),
4150
- cursor: z30.string().min(1).max(4096).optional()
4352
+ limit: z32.number().int().min(1).max(100).default(25),
4353
+ cursor: z32.string().min(1).max(4096).optional()
4151
4354
  };
4152
- var reviewListSchema = z30.object({
4355
+ var reviewListSchema = z32.object({
4153
4356
  ...pageOptions,
4154
4357
  member: identifier.optional(),
4155
4358
  quest: identifier.optional()
4156
4359
  }).strict();
4157
- var memberListSchema = z30.object({
4360
+ var memberListSchema = z32.object({
4158
4361
  ...pageOptions,
4159
4362
  prefix: identifier.optional()
4160
4363
  }).strict();
4161
- var reviewItemSchema = z30.object({
4364
+ var reviewItemSchema = z32.object({
4162
4365
  attempt: attemptSchema,
4163
- title: z30.string(),
4164
- checks: z30.array(
4165
- z30.object({ criteria: z30.string(), result: photoResultSchema })
4366
+ title: z32.string(),
4367
+ checks: z32.array(
4368
+ z32.object({ criteria: z32.string(), result: photoResultSchema })
4166
4369
  )
4167
4370
  });
4168
- var reviewPageSchema = z30.object({
4169
- items: z30.array(reviewItemSchema).max(100),
4170
- nextCursor: z30.string().nullable()
4371
+ var reviewPageSchema = z32.object({
4372
+ items: z32.array(reviewItemSchema).max(100),
4373
+ nextCursor: z32.string().nullable()
4171
4374
  });
4172
- var memberPageSchema = z30.object({
4173
- items: z30.array(z30.object({ member: identifier })).max(100),
4174
- nextCursor: z30.string().nullable()
4375
+ var memberPageSchema = z32.object({
4376
+ items: z32.array(z32.object({ member: identifier })).max(100),
4377
+ nextCursor: z32.string().nullable()
4175
4378
  });
4176
- var createStockItemSchema = z30.object({ actionId: identifier, name: z30.string().trim().min(1).max(80) }).strict();
4177
- var stockItemSchema = z30.object({ id: identifier, name: z30.string() });
4178
- var contentPerformanceSnapshotSchema = z30.strictObject({
4379
+ var createStockItemSchema = z32.object({ actionId: identifier, name: z32.string().trim().min(1).max(80) }).strict();
4380
+ var stockItemSchema = z32.object({ id: identifier, name: z32.string() });
4381
+ var contentPerformanceSnapshotSchema = z32.strictObject({
4179
4382
  contentAttempt: identifier,
4180
4383
  observation: identifier,
4181
- observedAt: z30.number().int().safe().nonnegative(),
4384
+ observedAt: z32.number().int().safe().nonnegative(),
4182
4385
  metrics: contentMetricsSchema,
4183
4386
  rewards: rewardBundleSchema
4184
4387
  });
4185
4388
  var contentPerformanceQuerySchema = contentQualificationQuerySchema.extend({
4186
- content: z30.string().min(1).max(256)
4389
+ content: z32.string().min(1).max(256)
4187
4390
  });
4188
- var contentPerformancePageSchema = z30.strictObject({
4189
- current: z30.strictObject({
4190
- state: z30.enum([
4391
+ var contentPerformancePageSchema = z32.strictObject({
4392
+ current: z32.strictObject({
4393
+ state: z32.enum([
4191
4394
  "content-pending",
4192
4395
  "content-unqualified",
4193
4396
  "waiting",
@@ -4198,19 +4401,19 @@ var contentPerformancePageSchema = z30.strictObject({
4198
4401
  "failed",
4199
4402
  "superseded"
4200
4403
  ]),
4201
- reason: z30.string().nullable(),
4404
+ reason: z32.string().nullable(),
4202
4405
  contentAttempt: identifier,
4203
4406
  attempt: identifier.nullable(),
4204
4407
  reward: contentQualificationSchema.shape.reward
4205
4408
  }),
4206
- items: z30.array(
4207
- z30.strictObject({
4409
+ items: z32.array(
4410
+ z32.strictObject({
4208
4411
  attempt: identifier,
4209
4412
  contentAttempt: identifier,
4210
4413
  observation: identifier,
4211
- observedAt: z30.number(),
4414
+ observedAt: z32.number(),
4212
4415
  metrics: contentMetricsSchema,
4213
- state: z30.enum([
4416
+ state: z32.enum([
4214
4417
  "pending",
4215
4418
  "qualified",
4216
4419
  "unqualified",
@@ -4218,7 +4421,7 @@ var contentPerformancePageSchema = z30.strictObject({
4218
4421
  "failed",
4219
4422
  "superseded"
4220
4423
  ]),
4221
- reason: z30.string().nullable()
4424
+ reason: z32.string().nullable()
4222
4425
  })
4223
4426
  ),
4224
4427
  nextCursor: pageCursorSchema.nullable()
@@ -4392,12 +4595,32 @@ export {
4392
4595
  completionPolicySchema,
4393
4596
  completionKeySchema,
4394
4597
  budgetSchema,
4598
+ authorBudgetSchema,
4395
4599
  memberCompletionSchema,
4396
4600
  maxMemberCompletions,
4397
4601
  evaluatorIntegrationProviderSchema,
4398
4602
  integrationProviderSchema,
4399
4603
  discordServerSchema,
4400
4604
  projectIntegrationSchema,
4605
+ organizationDiscordServersSchema,
4606
+ announcementPlaceholders,
4607
+ parseAnnouncementTemplate,
4608
+ telegramSignInMethodsSchema,
4609
+ telegramAccountConnectionSchema,
4610
+ telegramInitDataSchema,
4611
+ telegramMiniAppSignInSchema,
4612
+ telegramChatIdSchema,
4613
+ telegramChatSchema,
4614
+ telegramChatsSchema,
4615
+ telegramChatConnectionSchema,
4616
+ telegramMemberInputSchema,
4617
+ telegramChatMemberSchema,
4618
+ telegramReactionDataSchema,
4619
+ telegramMessageDataSchema,
4620
+ announcementTextSchema,
4621
+ telegramAnnouncementSchema,
4622
+ discordAnnouncementSchema,
4623
+ announcementSchema,
4401
4624
  solanaAddressSchema,
4402
4625
  walletChainSchema,
4403
4626
  cosmosNetworkSchema,