@domino-sdk/relay 1.70.0 → 1.72.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 (65) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/{accounts-B49TGZLk.d.ts → accounts-COLmXRbW.d.ts} +144 -11
  3. package/dist/{attempt-captures-Dn-oGE1o.d.ts → attempt-captures-CVl161qB.d.ts} +3 -2
  4. package/dist/authoring.d.ts +68 -25
  5. package/dist/authoring.js +12 -8
  6. package/dist/{automatic-outcomes-DeRyox-X.d.ts → automatic-outcomes-5l68PGr1.d.ts} +2 -2
  7. package/dist/browser.d.ts +9 -9
  8. package/dist/browser.js +11 -9
  9. package/dist/{catalog-CR_2iacf.d.ts → catalog-BR3g-1H9.d.ts} +41 -2
  10. package/dist/{chunk-NOQSKRSS.js → chunk-2UELTHW6.js} +12 -4
  11. package/dist/{chunk-SELJYCYY.js → chunk-3KKRXN5E.js} +1 -1
  12. package/dist/{chunk-4VDRNYUG.js → chunk-74SMLZZ5.js} +710 -677
  13. package/dist/{chunk-4BBDHTBF.js → chunk-ASBDB436.js} +1 -1
  14. package/dist/{chunk-3DUNFRKJ.js → chunk-BXUF3CRL.js} +32 -6
  15. package/dist/{chunk-BJ2W5ZVQ.js → chunk-CVJTIVAP.js} +1 -1
  16. package/dist/{chunk-FHOKCBTJ.js → chunk-ETGKC2SB.js} +1 -1
  17. package/dist/{chunk-XD6EUA27.js → chunk-FGZGL5PG.js} +1 -1
  18. package/dist/{chunk-OKKZPDCQ.js → chunk-GHBYWDEZ.js} +8 -1
  19. package/dist/{chunk-SDWG7CWQ.js → chunk-HN7DE2UN.js} +2 -2
  20. package/dist/{chunk-25WA4XYZ.js → chunk-I7XIBXT2.js} +74 -5
  21. package/dist/{chunk-UKUIE2ND.js → chunk-KIRXE37T.js} +6 -6
  22. package/dist/{chunk-VAGGGB6B.js → chunk-MDSSIOBC.js} +58 -1
  23. package/dist/{chunk-LZXDYSUH.js → chunk-PYZSCFMJ.js} +4 -0
  24. package/dist/{chunk-XZCTCSDG.js → chunk-QG6XVOOO.js} +153 -4
  25. package/dist/{chunk-2GVGZ7AN.js → chunk-TW4RABVS.js} +1 -1
  26. package/dist/{chunk-RYUM6X2K.js → chunk-UEVZ3TST.js} +29 -2
  27. package/dist/{chunk-HICAGUT5.js → chunk-VFHLMNYV.js} +1 -1
  28. package/dist/{chunk-RSZAYW3T.js → chunk-W6DBNBMT.js} +2 -2
  29. package/dist/{client-gJEheT2C.d.ts → client-B__hMWtK.d.ts} +104 -7
  30. package/dist/{dashboards-DZaB94sz.d.ts → dashboards-DXpjHnq-.d.ts} +3 -3
  31. package/dist/{deployments-QVGxC-fT.d.ts → deployments-CT2kQloT.d.ts} +199 -3
  32. package/dist/{identity-integration-BAJdzbdl.d.ts → identity-integration-ClX4oUAu.d.ts} +4 -4
  33. package/dist/index.d.ts +10 -10
  34. package/dist/index.js +7 -7
  35. package/dist/internal.d.ts +44 -26
  36. package/dist/internal.js +26 -50
  37. package/dist/{limits-UawUbr0S.d.ts → limits-B7wbnWhd.d.ts} +1 -1
  38. package/dist/{offers-0hqbnogq.d.ts → offers-D4pyeY9b.d.ts} +2 -2
  39. package/dist/portal-proxy.d.ts +2 -2
  40. package/dist/portal-proxy.js +10 -10
  41. package/dist/react/index.d.ts +31 -12
  42. package/dist/react/index.js +115 -41
  43. package/dist/{reward-deliveries-ARvt1UXb.d.ts → reward-deliveries-HGpj1VFz.d.ts} +1 -1
  44. package/dist/runtime/authoring.js +1 -1
  45. package/dist/runtime/chunks/A7G5P76B.js +1 -0
  46. package/dist/runtime/manifest.json +3 -3
  47. package/dist/runtime/schema.js +1 -1
  48. package/dist/schema.d.ts +40 -16
  49. package/dist/schema.js +7 -7
  50. package/dist/server/index.d.ts +12 -12
  51. package/dist/server/index.js +956 -576
  52. package/dist/{sign-in-providers-DCiufSGG.d.ts → sign-in-providers-lbOXCF8N.d.ts} +2 -2
  53. package/dist/solana.d.ts +12 -12
  54. package/dist/solana.js +8 -8
  55. package/dist/{telegram-browser-yx9WuNLX.d.ts → station-check-in-qBiaftfE.d.ts} +89 -7
  56. package/dist/{submission-input-C0DLv5Dj.d.ts → submission-input-U4aIkJuT.d.ts} +2 -2
  57. package/dist/telegram.d.ts +7 -7
  58. package/dist/testing.d.ts +15 -11
  59. package/dist/testing.js +23 -12
  60. package/dist/{tracker-data-CUopgomU.d.ts → tracker-data-2BYXZjsN.d.ts} +3 -3
  61. package/dist/{transport-e0uY1R7z.d.ts → transport-DcRXDZ1j.d.ts} +1838 -19
  62. package/dist/{wallet-CJTULM0Q.d.ts → wallet-BqswMAqZ.d.ts} +2 -2
  63. package/dist/{wallet-browser-DScvrvIj.d.ts → wallet-browser-B5r7u3xB.d.ts} +1 -1
  64. package/package.json +1 -1
  65. package/dist/runtime/chunks/447P2VLY.js +0 -1
@@ -279,6 +279,10 @@ function responseListSchema(schema) {
279
279
  import * as z4 from "zod";
280
280
  var pageCursorSchema = /* @__PURE__ */ (() => z4.string().min(1).max(4096))();
281
281
  var pageLimit = /* @__PURE__ */ (() => z4.coerce.number().int().min(1).max(100).optional())();
282
+ var booleanQuery = /* @__PURE__ */ (() => z4.union([
283
+ z4.boolean(),
284
+ z4.enum(["true", "false"]).transform((v) => v === "true")
285
+ ]))();
282
286
  var pageQuerySchema = /* @__PURE__ */ (() => z4.strictObject({
283
287
  cursor: pageCursorSchema.optional()
284
288
  }))();
@@ -1771,26 +1775,26 @@ function matches(schema, value, at, budget) {
1771
1775
  }
1772
1776
  }
1773
1777
  if (typeof value === "object" && value !== null && !Array.isArray(value)) {
1774
- const object26 = value;
1778
+ const object27 = value;
1775
1779
  const properties = schema.properties ?? {};
1776
1780
  const required = schema.required ?? [];
1777
1781
  charge(budget, required.length);
1778
1782
  for (const key of required) {
1779
- if (!Object.hasOwn(object26, key)) {
1783
+ if (!Object.hasOwn(object27, key)) {
1780
1784
  return issue(() => `missing required key "${clip(key, maxKeyText)}"`);
1781
1785
  }
1782
1786
  }
1783
1787
  const literals = literalsOf(schema);
1784
1788
  charge(budget, literals.length);
1785
1789
  for (const [key, property] of literals) {
1786
- if (Object.hasOwn(object26, key) && object26[key] !== property.const) {
1790
+ if (Object.hasOwn(object27, key) && object27[key] !== property.const) {
1787
1791
  return {
1788
1792
  at: { parent: at, key },
1789
1793
  reason: () => `expected ${JSON.stringify(property.const)}`
1790
1794
  };
1791
1795
  }
1792
1796
  }
1793
- const keys = Object.keys(object26);
1797
+ const keys = Object.keys(object27);
1794
1798
  charge(budget, keys.length);
1795
1799
  const names = schema.propertyNames?.enum;
1796
1800
  const allowed = names && setOf(schema.propertyNames, names);
@@ -1811,7 +1815,7 @@ function matches(schema, value, at, budget) {
1811
1815
  if (property && property !== true) {
1812
1816
  const found = matches(
1813
1817
  property,
1814
- object26[key],
1818
+ object27[key],
1815
1819
  { parent: at, key },
1816
1820
  budget
1817
1821
  );
@@ -2692,10 +2696,6 @@ var trackerOutcomeRetrySchema = /* @__PURE__ */ (() => z12.strictObject({
2692
2696
  record: externalId,
2693
2697
  observedAt: timestamp
2694
2698
  }))();
2695
- var booleanQuery = /* @__PURE__ */ (() => z12.union([
2696
- z12.boolean(),
2697
- z12.enum(["true", "false"]).transform((v) => v === "true")
2698
- ]))();
2699
2699
  var trackerQuerySchema = /* @__PURE__ */ (() => z12.object({
2700
2700
  author: externalId.optional(),
2701
2701
  member: identifier.optional(),
@@ -3590,7 +3590,8 @@ var questStationSchema = /* @__PURE__ */ (() => z26.object({
3590
3590
  key: referenceSchema,
3591
3591
  label: z26.string().trim().min(1).max(120),
3592
3592
  opensAt: timestamp4.optional(),
3593
- closesAt: timestamp4.optional()
3593
+ closesAt: timestamp4.optional(),
3594
+ proof: z26.enum(["transaction", "code"]).optional()
3594
3595
  }).strict().refine(
3595
3596
  (station) => endsAfterStart({ from: station.opensAt, until: station.closesAt }),
3596
3597
  { message: "A station must close after it opens", path: ["closesAt"] }
@@ -3599,22 +3600,31 @@ var questStationsSchema = /* @__PURE__ */ (() => z26.array(questStationSchema).m
3599
3600
  (stations) => new Set(stations.map((station) => station.key)).size === stations.length,
3600
3601
  "Give each station its own key"
3601
3602
  ))();
3602
- function stationRefusal(stations, reference, blockTime) {
3603
+ function stationRefusal(stations, reference, time, proof = "transaction") {
3603
3604
  const station = stations.find((station2) => station2.key === reference);
3604
3605
  if (!station) {
3605
3606
  return {
3606
3607
  code: "station-unknown",
3607
- message: reference === null ? "This quest completes only from a transaction whose memo names one of its stations" : `The memo names station "${reference}", which this quest does not have`
3608
+ message: reference === null ? "This quest completes only from a check-in at one of its stations" : proof === "code" ? `This quest has no station "${reference}"` : `The memo names station "${reference}", which this quest does not have`
3609
+ };
3610
+ }
3611
+ if ((station.proof ?? "transaction") !== proof) {
3612
+ return {
3613
+ code: "station-proof-mismatch",
3614
+ message: proof === "code" ? `Station "${station.key}" takes check-ins with signed transactions, not a code` : `Station "${station.key}" takes check-ins with its code, not transactions`
3608
3615
  };
3609
3616
  }
3610
- if (!inWindow({ from: station.opensAt, until: station.closesAt }, blockTime)) {
3617
+ if (!inWindow({ from: station.opensAt, until: station.closesAt }, time)) {
3611
3618
  return {
3612
3619
  code: "station-closed",
3613
- message: `Station "${station.key}" was closed when the transaction landed`
3620
+ message: proof === "code" ? `Station "${station.key}" is closed` : `Station "${station.key}" was closed when the transaction landed`
3614
3621
  };
3615
3622
  }
3616
3623
  return null;
3617
3624
  }
3625
+ var submittedStationCode = /* @__PURE__ */ (() => z26.string().min(1).max(256))();
3626
+ var stationCheckInSchema = /* @__PURE__ */ (() => z26.object({ code: submittedStationCode, actionId: identifier }).strict())();
3627
+ var stationCodeSubmissionSchema = /* @__PURE__ */ (() => stationCheckInSchema.extend({ quest: identifier, station: identifier, member: identifier }).strict())();
3618
3628
  var solanaTransactionSubmissionSchema = /* @__PURE__ */ (() => z26.object({
3619
3629
  quest: identifier,
3620
3630
  signature: solanaSignatureSchema,
@@ -3630,74 +3640,79 @@ var attemptActionSchema = /* @__PURE__ */ (() => z26.object({
3630
3640
  reference: z26.string().nullable()
3631
3641
  }))();
3632
3642
 
3633
- // src/resources.ts
3643
+ // src/galleries.ts
3634
3644
  import * as z27 from "zod";
3635
- var resourceSourceSchema = /* @__PURE__ */ (() => z27.union([
3636
- z27.strictObject({
3637
- provider: z27.literal("domino"),
3638
- resource: z27.literal("point-ledger")
3645
+ var galleryKinds = ["wall", "contest"];
3646
+ var questGallerySchema = /* @__PURE__ */ (() => z27.object({ kind: z27.string().min(1).max(40) }).strict())();
3647
+
3648
+ // src/resources.ts
3649
+ import * as z28 from "zod";
3650
+ var resourceSourceSchema = /* @__PURE__ */ (() => z28.union([
3651
+ z28.strictObject({
3652
+ provider: z28.literal("domino"),
3653
+ resource: z28.literal("point-ledger")
3639
3654
  }),
3640
3655
  discordResourceSourceSchema
3641
3656
  ]))();
3642
- var resourceRequestSchema = /* @__PURE__ */ (() => z27.object({
3657
+ var resourceRequestSchema = /* @__PURE__ */ (() => z28.object({
3643
3658
  source: resourceSourceSchema,
3644
- query: z27.string().max(100).optional(),
3645
- cursor: z27.string().regex(/^\d{1,6}$/).optional(),
3646
- ids: z27.array(z27.string().min(1).max(100)).max(50).optional()
3659
+ query: z28.string().max(100).optional(),
3660
+ cursor: z28.string().regex(/^\d{1,6}$/).optional(),
3661
+ ids: z28.array(z28.string().min(1).max(100)).max(50).optional()
3647
3662
  }).strict())();
3648
- var resourceOptionsSchema = /* @__PURE__ */ (() => z27.object({
3649
- revision: z27.number().int(),
3650
- options: z27.array(
3651
- z27.object({
3652
- id: z27.string(),
3653
- label: z27.string(),
3654
- description: z27.string().optional(),
3655
- group: z27.string().optional(),
3656
- disabledReason: z27.string().optional()
3663
+ var resourceOptionsSchema = /* @__PURE__ */ (() => z28.object({
3664
+ revision: z28.number().int(),
3665
+ options: z28.array(
3666
+ z28.object({
3667
+ id: z28.string(),
3668
+ label: z28.string(),
3669
+ description: z28.string().optional(),
3670
+ group: z28.string().optional(),
3671
+ disabledReason: z28.string().optional()
3657
3672
  })
3658
3673
  ),
3659
3674
  /** Pass back as `cursor` for the next page; null on the last one. */
3660
- nextCursor: z27.string().nullable().default(null),
3675
+ nextCursor: z28.string().nullable().default(null),
3661
3676
  /** @deprecated Use `nextCursor`. Removed in 2.0.0. */
3662
- cursor: z27.string().nullable()
3677
+ cursor: z28.string().nullable()
3663
3678
  }))();
3664
3679
 
3665
3680
  // src/settings.ts
3666
- import * as z29 from "zod";
3681
+ import * as z30 from "zod";
3667
3682
 
3668
3683
  // src/setting-values.ts
3669
- import * as z28 from "zod";
3684
+ import * as z29 from "zod";
3670
3685
  var settingInstant = /* @__PURE__ */ (() => offsetDateTimeSchema().transform(
3671
3686
  (value) => new Date(value).toISOString()
3672
3687
  ))();
3673
- var settingResourceId = /* @__PURE__ */ (() => z28.union([
3674
- z28.literal(""),
3675
- z28.string().regex(/^\S{1,200}$/)
3688
+ var settingResourceId = /* @__PURE__ */ (() => z29.union([
3689
+ z29.literal(""),
3690
+ z29.string().regex(/^\S{1,200}$/)
3676
3691
  ]))();
3677
3692
 
3678
3693
  // src/settings.ts
3679
- var base = /* @__PURE__ */ (() => ({ label: z29.string().min(1), description: z29.string().optional() }))();
3680
- var settingFieldSchema = /* @__PURE__ */ (() => z29.discriminatedUnion("kind", [
3681
- z29.object({
3694
+ var base = /* @__PURE__ */ (() => ({ label: z30.string().min(1), description: z30.string().optional() }))();
3695
+ var settingFieldSchema = /* @__PURE__ */ (() => z30.discriminatedUnion("kind", [
3696
+ z30.object({
3682
3697
  ...base,
3683
- kind: z29.literal("point-ledger"),
3684
- default: identifier.or(z29.literal(""))
3698
+ kind: z30.literal("point-ledger"),
3699
+ default: identifier.or(z30.literal(""))
3685
3700
  }).strict(),
3686
- z29.object({ ...base, kind: z29.literal("datetime"), default: settingInstant }).strict(),
3687
- z29.object({
3701
+ z30.object({ ...base, kind: z30.literal("datetime"), default: settingInstant }).strict(),
3702
+ z30.object({
3688
3703
  ...base,
3689
- kind: z29.literal("resource"),
3704
+ kind: z30.literal("resource"),
3690
3705
  default: settingResourceId,
3691
3706
  source: resourceSourceSchema
3692
3707
  }).strict(),
3693
- z29.object({ ...base, kind: z29.literal("quiz"), default: quizContentSchema }).strict(),
3694
- z29.object({
3708
+ z30.object({ ...base, kind: z30.literal("quiz"), default: quizContentSchema }).strict(),
3709
+ z30.object({
3695
3710
  ...base,
3696
- kind: z29.literal("text"),
3697
- default: z29.string(),
3698
- minLength: z29.number().int().nonnegative(),
3699
- maxLength: z29.number().int().positive(),
3700
- multiline: z29.boolean(),
3711
+ kind: z30.literal("text"),
3712
+ default: z30.string(),
3713
+ minLength: z30.number().int().nonnegative(),
3714
+ maxLength: z30.number().int().positive(),
3715
+ multiline: z30.boolean(),
3701
3716
  /**
3702
3717
  * A list Console offers the value from, beside free text: `telegram-chat` lists the
3703
3718
  * project's connected Telegram chats. Unknown pickers read as free text. Six pickers also
@@ -3713,40 +3728,40 @@ var settingFieldSchema = /* @__PURE__ */ (() => z29.discriminatedUnion("kind", [
3713
3728
  * (`settings.solanaProgram()`), which Relay also checks is
3714
3729
  * an executable program.
3715
3730
  */
3716
- picker: z29.string().optional(),
3731
+ picker: z30.string().optional(),
3717
3732
  /**
3718
3733
  * On an `amount` setting, the token's decimals: Console shows and edits the value in whole
3719
3734
  * tokens.
3720
3735
  */
3721
- decimals: z29.number().int().min(0).max(255).optional(),
3736
+ decimals: z30.number().int().min(0).max(255).optional(),
3722
3737
  /**
3723
3738
  * A value operators set in Console that never leaves Relay: management responses, the CLI
3724
3739
  * and Console withhold it, and the quest's code reads it as usual. Its `default` is `""`.
3725
3740
  */
3726
- secret: z29.literal(true).optional()
3741
+ secret: z30.literal(true).optional()
3727
3742
  }).strict(),
3728
- z29.object({
3743
+ z30.object({
3729
3744
  ...base,
3730
- kind: z29.literal("integer"),
3731
- default: z29.number().int(),
3732
- min: z29.number().int(),
3733
- max: z29.number().int()
3745
+ kind: z30.literal("integer"),
3746
+ default: z30.number().int(),
3747
+ min: z30.number().int(),
3748
+ max: z30.number().int()
3734
3749
  }).strict(),
3735
- z29.object({ ...base, kind: z29.literal("boolean"), default: z29.boolean() }).strict(),
3736
- z29.object({
3750
+ z30.object({ ...base, kind: z30.literal("boolean"), default: z30.boolean() }).strict(),
3751
+ z30.object({
3737
3752
  ...base,
3738
- kind: z29.literal("choice"),
3739
- default: z29.string(),
3740
- options: z29.array(z29.string().min(1)).min(1)
3753
+ kind: z30.literal("choice"),
3754
+ default: z30.string(),
3755
+ options: z30.array(z30.string().min(1)).min(1)
3741
3756
  }).strict()
3742
3757
  ]))();
3743
- var settingsFieldsSchema = /* @__PURE__ */ (() => z29.record(
3744
- z29.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/),
3758
+ var settingsFieldsSchema = /* @__PURE__ */ (() => z30.record(
3759
+ z30.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/),
3745
3760
  settingFieldSchema
3746
3761
  ))();
3747
- var settingsValuesSchema = /* @__PURE__ */ (() => z29.record(
3748
- z29.string(),
3749
- z29.union([z29.string(), z29.number().finite(), z29.boolean(), quizContentSchema])
3762
+ var settingsValuesSchema = /* @__PURE__ */ (() => z30.record(
3763
+ z30.string(),
3764
+ z30.union([z30.string(), z30.number().finite(), z30.boolean(), quizContentSchema])
3750
3765
  ))();
3751
3766
  function isAmount(value) {
3752
3767
  return value.length <= 100 && /^(0|[1-9][0-9]*)$/.test(value);
@@ -3758,10 +3773,10 @@ function isBoundSetting(field) {
3758
3773
  return field?.kind === "integer" || field?.kind === "text" && field.picker === "amount";
3759
3774
  }
3760
3775
  function textSettingSchema(field) {
3761
- const text = field.secret ? z29.string().max(field.maxLength).refine(
3776
+ const text = field.secret ? z30.string().max(field.maxLength).refine(
3762
3777
  (value) => value === "" || value.length >= field.minLength,
3763
3778
  `Use at least ${field.minLength} characters`
3764
- ) : z29.string().min(field.minLength).max(field.maxLength);
3779
+ ) : z30.string().min(field.minLength).max(field.maxLength);
3765
3780
  switch (field.picker) {
3766
3781
  case "amount":
3767
3782
  return text.refine(
@@ -3817,17 +3832,17 @@ function parseSettings(fields2, input) {
3817
3832
  shape[key] = textSettingSchema(field).default(field.default);
3818
3833
  break;
3819
3834
  case "integer":
3820
- shape[key] = z29.number().int().min(field.min).max(field.max).default(field.default);
3835
+ shape[key] = z30.number().int().min(field.min).max(field.max).default(field.default);
3821
3836
  break;
3822
3837
  case "boolean":
3823
- shape[key] = z29.boolean().default(field.default);
3838
+ shape[key] = z30.boolean().default(field.default);
3824
3839
  break;
3825
3840
  case "choice":
3826
- shape[key] = z29.enum(field.options).default(field.default);
3841
+ shape[key] = z30.enum(field.options).default(field.default);
3827
3842
  break;
3828
3843
  }
3829
3844
  }
3830
- return settingsValuesSchema.parse(z29.object(shape).strict().parse(input));
3845
+ return settingsValuesSchema.parse(z30.object(shape).strict().parse(input));
3831
3846
  }
3832
3847
  function missingResourceSettings(fields2, values2) {
3833
3848
  return Object.entries(fields2).filter(
@@ -3848,20 +3863,20 @@ function authoringKey(input) {
3848
3863
  }
3849
3864
 
3850
3865
  // src/campaigns.ts
3851
- import * as z30 from "zod";
3852
- var availabilityWindowSchema = /* @__PURE__ */ (() => z30.object({ from: timestamp4, until: timestamp4 }).strict().refine(endsAfterStart, {
3866
+ import * as z31 from "zod";
3867
+ var availabilityWindowSchema = /* @__PURE__ */ (() => z31.object({ from: timestamp4, until: timestamp4 }).strict().refine(endsAfterStart, {
3853
3868
  message: "Window end must follow its start",
3854
3869
  path: ["until"]
3855
3870
  }))();
3856
- var campaignDefinitionSchema = /* @__PURE__ */ (() => z30.object({
3871
+ var campaignDefinitionSchema = /* @__PURE__ */ (() => z31.object({
3857
3872
  key: identifier,
3858
- title: z30.string().trim().min(1).max(120),
3873
+ title: z31.string().trim().min(1).max(120),
3859
3874
  window: availabilityWindowSchema.optional(),
3860
- enrollment: z30.enum(["none", "required"]).default("none")
3875
+ enrollment: z31.enum(["none", "required"]).default("none")
3861
3876
  }).strict())();
3862
3877
  var campaignAuthoringSchema = /* @__PURE__ */ (() => campaignDefinitionSchema.omit({ key: true, title: true }).extend({
3863
3878
  ...authoringIdentityShape,
3864
- title: z30.string().trim().min(1).max(120).optional()
3879
+ title: z31.string().trim().min(1).max(120).optional()
3865
3880
  }).strict().transform((value) => {
3866
3881
  const normalized = value;
3867
3882
  return campaignDefinitionSchema.parse({
@@ -3875,42 +3890,42 @@ function defineCampaign(input) {
3875
3890
  var campaignViewSchema = /* @__PURE__ */ (() => campaignDefinitionSchema.extend({
3876
3891
  enrolledAt: timestamp4.nullable(),
3877
3892
  withdrawnAt: timestamp4.nullable().default(null),
3878
- withdrawalReason: z30.string().nullable().default(null)
3893
+ withdrawalReason: z31.string().nullable().default(null)
3879
3894
  }))();
3880
- var campaignEnrollmentInputSchema = /* @__PURE__ */ (() => z30.object({ actionId: identifier, campaign: identifier }).strict())();
3895
+ var campaignEnrollmentInputSchema = /* @__PURE__ */ (() => z31.object({ actionId: identifier, campaign: identifier }).strict())();
3881
3896
  var memberCampaignEnrollmentInputSchema = /* @__PURE__ */ (() => campaignEnrollmentInputSchema.extend({ member: identifier }))();
3882
3897
  var campaignWithdrawalInputSchema = campaignEnrollmentInputSchema;
3883
3898
  var memberCampaignWithdrawalInputSchema = /* @__PURE__ */ (() => campaignWithdrawalInputSchema.extend({
3884
3899
  member: identifier,
3885
- reason: z30.string().trim().min(1).max(500)
3900
+ reason: z31.string().trim().min(1).max(500)
3886
3901
  }))();
3887
- var campaignEnrollmentSchema = /* @__PURE__ */ (() => z30.object({
3902
+ var campaignEnrollmentSchema = /* @__PURE__ */ (() => z31.object({
3888
3903
  campaign: identifier,
3889
3904
  member: identifier,
3890
3905
  enrolledAt: timestamp4,
3891
3906
  withdrawnAt: timestamp4.nullable().default(null),
3892
- withdrawalReason: z30.string().nullable().default(null)
3907
+ withdrawalReason: z31.string().nullable().default(null)
3893
3908
  }))();
3894
3909
 
3895
3910
  // src/resource-handle.ts
3896
- import * as z31 from "zod";
3911
+ import * as z32 from "zod";
3897
3912
  function resourceHandle(_kind, definition) {
3898
3913
  return definition;
3899
3914
  }
3900
- var ledgerSettingSchema = /* @__PURE__ */ (() => identifier.or(z31.literal("")).brand())();
3915
+ var ledgerSettingSchema = /* @__PURE__ */ (() => identifier.or(z32.literal("")).brand())();
3901
3916
  function ledgerKey(ledger) {
3902
3917
  return typeof ledger === "string" ? ledger : ledger.key;
3903
3918
  }
3904
3919
 
3905
3920
  // src/groups.ts
3906
- import * as z32 from "zod";
3907
- var projectGroupSchema = /* @__PURE__ */ (() => z32.object({
3921
+ import * as z33 from "zod";
3922
+ var projectGroupSchema = /* @__PURE__ */ (() => z33.object({
3908
3923
  key: identifier,
3909
- title: z32.string().trim().min(1).max(120)
3924
+ title: z33.string().trim().min(1).max(120)
3910
3925
  }).strict())();
3911
3926
  var projectGroupAuthoringSchema = /* @__PURE__ */ (() => projectGroupSchema.omit({ key: true, title: true }).extend({
3912
3927
  ...authoringIdentityShape,
3913
- title: z32.string().trim().min(1).max(120).optional()
3928
+ title: z33.string().trim().min(1).max(120).optional()
3914
3929
  }).strict().transform((value) => {
3915
3930
  return projectGroupSchema.parse({
3916
3931
  ...value,
@@ -3923,93 +3938,93 @@ function defineGroup(input) {
3923
3938
  function projectGroupKey(group) {
3924
3939
  return identifier.parse(group.key);
3925
3940
  }
3926
- var groupTitle = /* @__PURE__ */ (() => z32.string().trim().min(1).max(120))();
3927
- var reason = /* @__PURE__ */ (() => z32.string().trim().min(1).max(1e3))();
3928
- var timestamp5 = /* @__PURE__ */ (() => z32.number().int().nonnegative().max(864e13))();
3929
- var createGroupSchema = /* @__PURE__ */ (() => z32.object({ actionId: identifier, key: identifier, title: groupTitle }).strict())();
3930
- var updateGroupSchema = /* @__PURE__ */ (() => z32.object({ title: groupTitle }).strict())();
3931
- var addGroupMemberSchema = /* @__PURE__ */ (() => z32.object({ actionId: identifier, member: identifier, reason }).strict())();
3932
- var removeGroupMemberSchema = /* @__PURE__ */ (() => z32.object({ actionId: identifier, reason }).strict())();
3933
- var groupArchiveInputSchema = /* @__PURE__ */ (() => z32.object({ reason: lifecycleReasonSchema.optional() }).strict())();
3934
- var groupPageQuerySchema = /* @__PURE__ */ (() => z32.strictObject({
3941
+ var groupTitle = /* @__PURE__ */ (() => z33.string().trim().min(1).max(120))();
3942
+ var reason = /* @__PURE__ */ (() => z33.string().trim().min(1).max(1e3))();
3943
+ var timestamp5 = /* @__PURE__ */ (() => z33.number().int().nonnegative().max(864e13))();
3944
+ var createGroupSchema = /* @__PURE__ */ (() => z33.object({ actionId: identifier, key: identifier, title: groupTitle }).strict())();
3945
+ var updateGroupSchema = /* @__PURE__ */ (() => z33.object({ title: groupTitle }).strict())();
3946
+ var addGroupMemberSchema = /* @__PURE__ */ (() => z33.object({ actionId: identifier, member: identifier, reason }).strict())();
3947
+ var removeGroupMemberSchema = /* @__PURE__ */ (() => z33.object({ actionId: identifier, reason }).strict())();
3948
+ var groupArchiveInputSchema = /* @__PURE__ */ (() => z33.object({ reason: lifecycleReasonSchema.optional() }).strict())();
3949
+ var groupPageQuerySchema = /* @__PURE__ */ (() => z33.strictObject({
3935
3950
  cursor: pageCursorSchema.optional(),
3936
3951
  /** Items per page, 1–100; the default is 50. */
3937
- limit: z32.number().int().min(1).max(100).optional()
3952
+ limit: z33.number().int().min(1).max(100).optional()
3938
3953
  }))();
3939
- var managedGroupSchema = /* @__PURE__ */ (() => z32.object({
3954
+ var managedGroupSchema = /* @__PURE__ */ (() => z33.object({
3940
3955
  key: identifier,
3941
- title: z32.string(),
3942
- members: z32.number().int().nonnegative(),
3956
+ title: z33.string(),
3957
+ members: z33.number().int().nonnegative(),
3943
3958
  createdAt: timestamp5,
3944
3959
  archivedAt: timestamp5.nullable()
3945
3960
  }))();
3946
- var groupPageSchema = /* @__PURE__ */ (() => z32.object({
3947
- items: z32.array(managedGroupSchema),
3961
+ var groupPageSchema = /* @__PURE__ */ (() => z33.object({
3962
+ items: z33.array(managedGroupSchema),
3948
3963
  nextCursor: pageCursorSchema.nullable()
3949
3964
  }))();
3950
- var groupMemberSchema = /* @__PURE__ */ (() => z32.object({
3965
+ var groupMemberSchema = /* @__PURE__ */ (() => z33.object({
3951
3966
  member: identifier,
3952
3967
  addedAt: timestamp5.nullable()
3953
3968
  }))();
3954
- var groupMemberPageSchema = /* @__PURE__ */ (() => z32.object({
3955
- items: z32.array(groupMemberSchema),
3969
+ var groupMemberPageSchema = /* @__PURE__ */ (() => z33.object({
3970
+ items: z33.array(groupMemberSchema),
3956
3971
  nextCursor: pageCursorSchema.nullable()
3957
3972
  }))();
3958
3973
 
3959
3974
  // src/prerequisites.ts
3960
- import * as z33 from "zod";
3961
- var amount = /* @__PURE__ */ (() => z33.number().int().safe().nonnegative())();
3975
+ import * as z34 from "zod";
3976
+ var amount = /* @__PURE__ */ (() => z34.number().int().safe().nonnegative())();
3962
3977
  var threshold = /* @__PURE__ */ (() => amount.positive())();
3963
- var completionPrerequisiteSchema = /* @__PURE__ */ (() => z33.discriminatedUnion("scope", [
3964
- z33.object({
3965
- kind: z33.literal("completion"),
3978
+ var completionPrerequisiteSchema = /* @__PURE__ */ (() => z34.discriminatedUnion("scope", [
3979
+ z34.object({
3980
+ kind: z34.literal("completion"),
3966
3981
  quest: identifier,
3967
- scope: z33.literal("ever")
3982
+ scope: z34.literal("ever")
3968
3983
  }).strict(),
3969
- z33.object({
3970
- kind: z33.literal("completion"),
3984
+ z34.object({
3985
+ kind: z34.literal("completion"),
3971
3986
  quest: identifier,
3972
- scope: z33.literal("period"),
3987
+ scope: z34.literal("period"),
3973
3988
  period: calendarPeriodSchema.exclude(["lifetime"])
3974
3989
  }).strict()
3975
3990
  ]))();
3976
- var balancePrerequisiteSchema = /* @__PURE__ */ (() => z33.object({
3977
- kind: z33.literal("balance"),
3991
+ var balancePrerequisiteSchema = /* @__PURE__ */ (() => z34.object({
3992
+ kind: z34.literal("balance"),
3978
3993
  balance: identifier,
3979
3994
  minimum: threshold
3980
3995
  }).strict())();
3981
- var groupPrerequisiteSchema = /* @__PURE__ */ (() => z33.object({ kind: z33.literal("group"), group: identifier, title: z33.string() }).strict())();
3982
- var prerequisiteSchema = /* @__PURE__ */ (() => z33.discriminatedUnion("kind", [
3996
+ var groupPrerequisiteSchema = /* @__PURE__ */ (() => z34.object({ kind: z34.literal("group"), group: identifier, title: z34.string() }).strict())();
3997
+ var prerequisiteSchema = /* @__PURE__ */ (() => z34.discriminatedUnion("kind", [
3983
3998
  completionPrerequisiteSchema,
3984
3999
  balancePrerequisiteSchema,
3985
4000
  groupPrerequisiteSchema
3986
4001
  ]))();
3987
- var missingPrerequisiteSchema = /* @__PURE__ */ (() => z33.union([
3988
- z33.object({
3989
- kind: z33.literal("completion"),
4002
+ var missingPrerequisiteSchema = /* @__PURE__ */ (() => z34.union([
4003
+ z34.object({
4004
+ kind: z34.literal("completion"),
3990
4005
  quest: identifier,
3991
- title: z33.string(),
3992
- scope: z33.literal("ever")
4006
+ title: z34.string(),
4007
+ scope: z34.literal("ever")
3993
4008
  }),
3994
- z33.object({
3995
- kind: z33.literal("completion"),
4009
+ z34.object({
4010
+ kind: z34.literal("completion"),
3996
4011
  quest: identifier,
3997
- title: z33.string(),
3998
- scope: z33.literal("period"),
4012
+ title: z34.string(),
4013
+ scope: z34.literal("period"),
3999
4014
  period: calendarPeriodSchema.exclude(["lifetime"]),
4000
- resetsAt: z33.number().int().safe()
4015
+ resetsAt: z34.number().int().safe()
4001
4016
  }),
4002
- z33.object({
4003
- kind: z33.literal("balance"),
4017
+ z34.object({
4018
+ kind: z34.literal("balance"),
4004
4019
  balance: identifier,
4005
- title: z33.string(),
4020
+ title: z34.string(),
4006
4021
  minimum: threshold,
4007
4022
  current: amount
4008
4023
  }),
4009
- z33.object({
4010
- kind: z33.literal("group"),
4024
+ z34.object({
4025
+ kind: z34.literal("group"),
4011
4026
  group: identifier,
4012
- title: z33.string()
4027
+ title: z34.string()
4013
4028
  })
4014
4029
  ]))();
4015
4030
  function completed(quest, options = {}) {
@@ -4040,29 +4055,29 @@ function inGroup(group) {
4040
4055
  var maxPointsAmount = 2147483647;
4041
4056
 
4042
4057
  // src/schema.ts
4043
- import * as z34 from "zod";
4044
- var pointsRewardSchema = /* @__PURE__ */ (() => z34.object({
4045
- kind: z34.literal("points").default("points"),
4058
+ import * as z35 from "zod";
4059
+ var pointsRewardSchema = /* @__PURE__ */ (() => z35.object({
4060
+ kind: z35.literal("points").default("points"),
4046
4061
  balance: identifier,
4047
- amount: z34.number().int().min(0).max(maxPointsAmount)
4062
+ amount: z35.number().int().min(0).max(maxPointsAmount)
4048
4063
  }).strict())();
4049
- var tieredRewardDefinitionSchema = /* @__PURE__ */ (() => z34.object({
4064
+ var tieredRewardDefinitionSchema = /* @__PURE__ */ (() => z35.object({
4050
4065
  /** An automatic achievement backed by the project badge catalog. */
4051
4066
  badge: identifier.optional(),
4052
4067
  /** Membership in the project group with this key, added when the reward is delivered. */
4053
4068
  group: identifier.optional(),
4054
4069
  id: identifier,
4055
- title: z34.string().min(1).max(120),
4056
- tiers: z34.array(
4057
- z34.object({ id: identifier, title: z34.string().min(1).max(120) }).strict()
4070
+ title: z35.string().min(1).max(120),
4071
+ tiers: z35.array(
4072
+ z35.object({ id: identifier, title: z35.string().min(1).max(120) }).strict()
4058
4073
  ).min(1).max(20).refine(
4059
4074
  (tiers) => new Set(tiers.map((t) => t.id)).size === tiers.length,
4060
4075
  "Tier IDs must be unique"
4061
4076
  ),
4062
- inventory: z34.object({ kind: z34.literal("untracked") }).strict(),
4063
- fulfillment: z34.discriminatedUnion("kind", [
4064
- z34.object({ kind: z34.literal("staff-handover") }).strict(),
4065
- z34.object({ kind: z34.literal("automatic") }).strict()
4077
+ inventory: z35.object({ kind: z35.literal("untracked") }).strict(),
4078
+ fulfillment: z35.discriminatedUnion("kind", [
4079
+ z35.object({ kind: z35.literal("staff-handover") }).strict(),
4080
+ z35.object({ kind: z35.literal("automatic") }).strict()
4066
4081
  ])
4067
4082
  }).strict().refine(
4068
4083
  (value) => value.badge === void 0 && value.group === void 0 || value.fulfillment.kind === "automatic" && value.tiers.length === 1 && value.tiers[0].id === "awarded",
@@ -4071,12 +4086,12 @@ var tieredRewardDefinitionSchema = /* @__PURE__ */ (() => z34.object({
4071
4086
  (value) => value.badge === void 0 || value.group === void 0,
4072
4087
  "A reward is either a badge or a group membership"
4073
4088
  ))();
4074
- var tieredRewardReferenceSchema = /* @__PURE__ */ (() => z34.object({
4089
+ var tieredRewardReferenceSchema = /* @__PURE__ */ (() => z35.object({
4075
4090
  id: identifier,
4076
4091
  key: identifier.nullable()
4077
4092
  }))();
4078
- var tierRewardSchema = /* @__PURE__ */ (() => z34.object({
4079
- kind: z34.literal("tier"),
4093
+ var tierRewardSchema = /* @__PURE__ */ (() => z35.object({
4094
+ kind: z35.literal("tier"),
4080
4095
  reward: tieredRewardDefinitionSchema,
4081
4096
  tier: identifier
4082
4097
  }).strict().refine(
@@ -4088,7 +4103,7 @@ var badgeRewardSchema = /* @__PURE__ */ (() => tierRewardSchema.transform(
4088
4103
  const badge = value.reward.badge;
4089
4104
  if (!badge || value.reward.fulfillment.kind !== "automatic" || value.reward.tiers.length !== 1 || value.tier !== "awarded") {
4090
4105
  context.addIssue({ code: "custom", message: "Invalid badge reward" });
4091
- return z34.NEVER;
4106
+ return z35.NEVER;
4092
4107
  }
4093
4108
  return { ...value, reward: { ...value.reward, badge } };
4094
4109
  }
@@ -4112,7 +4127,7 @@ var groupRewardSchema = /* @__PURE__ */ (() => tierRewardSchema.transform(
4112
4127
  const group = value.reward.group;
4113
4128
  if (!group || value.reward.fulfillment.kind !== "automatic" || value.reward.tiers.length !== 1 || value.tier !== "awarded") {
4114
4129
  context.addIssue({ code: "custom", message: "Invalid group reward" });
4115
- return z34.NEVER;
4130
+ return z35.NEVER;
4116
4131
  }
4117
4132
  return { ...value, reward: { ...value.reward, group } };
4118
4133
  }
@@ -4132,15 +4147,15 @@ function groupReward(key, title) {
4132
4147
  });
4133
4148
  }
4134
4149
  var integrationRewardSchema = discordRewardSchema;
4135
- var rewardSchema = /* @__PURE__ */ (() => z34.union([
4150
+ var rewardSchema = /* @__PURE__ */ (() => z35.union([
4136
4151
  pointsRewardSchema,
4137
4152
  tierRewardSchema,
4138
4153
  integrationRewardSchema
4139
4154
  ]))();
4140
- var rewardTypeSchema = /* @__PURE__ */ (() => z34.string())();
4141
- var rewardEntrySchema = /* @__PURE__ */ (() => z34.object({
4155
+ var rewardTypeSchema = /* @__PURE__ */ (() => z35.string())();
4156
+ var rewardEntrySchema = /* @__PURE__ */ (() => z35.object({
4142
4157
  type: rewardTypeSchema,
4143
- data: z34.record(z34.string(), z34.json())
4158
+ data: z35.record(z35.string(), z35.json())
4144
4159
  }))();
4145
4160
  function rewardKey(reward) {
4146
4161
  if (reward.kind === "tier" && reward.reward.badge) {
@@ -4154,39 +4169,39 @@ function rewardKey(reward) {
4154
4169
  }
4155
4170
  return reward.kind === "points" ? "points:" + reward.balance : "tier:" + reward.reward.id;
4156
4171
  }
4157
- var triggerSchema = /* @__PURE__ */ (() => z34.union([
4158
- z34.object({
4159
- kind: z34.literal("manual"),
4160
- input: z34.literal("text"),
4172
+ var triggerSchema = /* @__PURE__ */ (() => z35.union([
4173
+ z35.object({
4174
+ kind: z35.literal("manual"),
4175
+ input: z35.literal("text"),
4161
4176
  constraints: textOptionsSchema,
4162
- actor: z34.enum(["member", "staff"]).optional()
4177
+ actor: z35.enum(["member", "staff"]).optional()
4163
4178
  }).strict(),
4164
- z34.object({
4165
- kind: z34.literal("manual"),
4166
- input: z34.literal("url"),
4179
+ z35.object({
4180
+ kind: z35.literal("manual"),
4181
+ input: z35.literal("url"),
4167
4182
  constraints: urlOptionsSchema,
4168
- actor: z34.enum(["member", "staff"]).optional()
4183
+ actor: z35.enum(["member", "staff"]).optional()
4169
4184
  }).strict(),
4170
- z34.object({
4171
- kind: z34.literal("manual"),
4172
- input: z34.enum(["photo", "quiz", "none"]),
4173
- actor: z34.enum(["member", "staff"]).optional()
4185
+ z35.object({
4186
+ kind: z35.literal("manual"),
4187
+ input: z35.enum(["photo", "quiz", "none"]),
4188
+ actor: z35.enum(["member", "staff"]).optional()
4174
4189
  }).strict(),
4175
- z34.object({
4176
- kind: z34.literal("automatic"),
4190
+ z35.object({
4191
+ kind: z35.literal("automatic"),
4177
4192
  tracker: trackerTriggerPolicySchema.optional()
4178
4193
  }).strict()
4179
4194
  ]))();
4180
- var triggerResponseSchema = /* @__PURE__ */ (() => z34.union(
4195
+ var triggerResponseSchema = /* @__PURE__ */ (() => z35.union(
4181
4196
  triggerSchema.options.map((option) => option.strip())
4182
4197
  ))();
4183
- var photoResultSchema = /* @__PURE__ */ (() => z34.object({
4184
- kind: z34.enum(["pass", "fail", "unclear"]),
4185
- reason: z34.string().min(1).max(2e3)
4198
+ var photoResultSchema = /* @__PURE__ */ (() => z35.object({
4199
+ kind: z35.enum(["pass", "fail", "unclear"]),
4200
+ reason: z35.string().min(1).max(2e3)
4186
4201
  }).strict())();
4187
- var textReviewInputSchema = /* @__PURE__ */ (() => z34.object({
4188
- text: z34.string().min(1).max(16e3).refine((value) => value.trim().length > 0, "Text must not be blank"),
4189
- criteria: z34.string().trim().min(1).max(2e3)
4202
+ var textReviewInputSchema = /* @__PURE__ */ (() => z35.object({
4203
+ text: z35.string().min(1).max(16e3).refine((value) => value.trim().length > 0, "Text must not be blank"),
4204
+ criteria: z35.string().trim().min(1).max(2e3)
4190
4205
  }).strict())();
4191
4206
  var textResultSchema = photoResultSchema;
4192
4207
  var deferPolicy = {
@@ -4200,31 +4215,31 @@ var retryCooldownPolicy = {
4200
4215
  minMs: 1e3,
4201
4216
  maxMs: 6048e5
4202
4217
  };
4203
- var retryCooldownMsSchema = /* @__PURE__ */ (() => z34.number().int().min(limits.retryCooldown.minMs).max(limits.retryCooldown.maxMs))();
4204
- var evaluatorProgressSchema = /* @__PURE__ */ (() => z34.object({
4205
- current: z34.number().finite().nonnegative(),
4206
- target: z34.number().finite().positive(),
4207
- reason: z34.string().min(1).max(2e3)
4218
+ var retryCooldownMsSchema = /* @__PURE__ */ (() => z35.number().int().min(limits.retryCooldown.minMs).max(limits.retryCooldown.maxMs))();
4219
+ var evaluatorProgressSchema = /* @__PURE__ */ (() => z35.object({
4220
+ current: z35.number().finite().nonnegative(),
4221
+ target: z35.number().finite().positive(),
4222
+ reason: z35.string().min(1).max(2e3)
4208
4223
  }).refine((value) => value.current <= value.target, {
4209
4224
  message: "Progress current must not exceed target"
4210
4225
  }))();
4211
- var decisionSchema = /* @__PURE__ */ (() => z34.discriminatedUnion("kind", [
4212
- z34.strictObject({
4213
- kind: z34.literal("defer"),
4214
- reason: z34.string().min(1).max(2e3),
4215
- retryAfterMs: z34.number().int().min(limits.defer.minRetryAfterMs).max(limits.defer.maxRetryAfterMs).optional(),
4226
+ var decisionSchema = /* @__PURE__ */ (() => z35.discriminatedUnion("kind", [
4227
+ z35.strictObject({
4228
+ kind: z35.literal("defer"),
4229
+ reason: z35.string().min(1).max(2e3),
4230
+ retryAfterMs: z35.number().int().min(limits.defer.minRetryAfterMs).max(limits.defer.maxRetryAfterMs).optional(),
4216
4231
  /** Absolute Unix milliseconds; the platform can only shorten its existing deadline. */
4217
- until: z34.number().int().safe().nonnegative().optional()
4232
+ until: z35.number().int().safe().nonnegative().optional()
4218
4233
  }),
4219
- evaluatorProgressSchema.safeExtend({ kind: z34.literal("progress") }).strict(),
4220
- z34.object({
4221
- kind: z34.literal("accept"),
4222
- rewards: z34.array(rewardSchema).max(10),
4234
+ evaluatorProgressSchema.safeExtend({ kind: z35.literal("progress") }).strict(),
4235
+ z35.object({
4236
+ kind: z35.literal("accept"),
4237
+ rewards: z35.array(rewardSchema).max(10),
4223
4238
  completionKey: completionKeySchema.optional()
4224
4239
  }).strict(),
4225
- z34.object({
4226
- kind: z34.literal("reject"),
4227
- reason: z34.string().min(1).max(2e3),
4240
+ z35.object({
4241
+ kind: z35.literal("reject"),
4242
+ reason: z35.string().min(1).max(2e3),
4228
4243
  /**
4229
4244
  * A stable key for the rejection's cause, such as `wrong-answers`, stored as the attempt's
4230
4245
  * `code`: lowercase letters, digits and hyphens, at most 64 characters, and none of the
@@ -4232,28 +4247,28 @@ var decisionSchema = /* @__PURE__ */ (() => z34.discriminatedUnion("kind", [
4232
4247
  */
4233
4248
  code: rejectCodeSchema.optional(),
4234
4249
  /** The evaluator asked for human review, but review is off for the quest, so this is a reject. */
4235
- requestedReview: z34.literal(true).optional()
4250
+ requestedReview: z35.literal(true).optional()
4236
4251
  }).strict(),
4237
- z34.object({
4238
- kind: z34.literal("review"),
4239
- reason: z34.string().min(1).max(2e3),
4240
- rewards: z34.array(rewardSchema).max(10).optional(),
4252
+ z35.object({
4253
+ kind: z35.literal("review"),
4254
+ reason: z35.string().min(1).max(2e3),
4255
+ rewards: z35.array(rewardSchema).max(10).optional(),
4241
4256
  completionKey: completionKeySchema.optional()
4242
4257
  }).strict()
4243
4258
  ]))();
4244
- var reviewModeSchema = /* @__PURE__ */ (() => z34.enum(["workers-ai"]))();
4245
- var storedReviewModeSchema = /* @__PURE__ */ (() => z34.enum([
4259
+ var reviewModeSchema = /* @__PURE__ */ (() => z35.enum(["workers-ai"]))();
4260
+ var storedReviewModeSchema = /* @__PURE__ */ (() => z35.enum([
4246
4261
  "fixture-pass",
4247
4262
  "fixture-fail",
4248
4263
  "fixture-unclear",
4249
4264
  "fixture-error",
4250
4265
  "workers-ai"
4251
4266
  ]))();
4252
- var rewardBundleSchema = /* @__PURE__ */ (() => z34.array(rewardSchema).max(10).refine(
4267
+ var rewardBundleSchema = /* @__PURE__ */ (() => z35.array(rewardSchema).max(10).refine(
4253
4268
  (rewards) => new Set(rewards.map(rewardKey)).size === rewards.length,
4254
4269
  "Use one entry per balance or shared reward"
4255
4270
  ))();
4256
- var mediaUrlSchema = /* @__PURE__ */ (() => z34.string().max(2e3).refine((value) => {
4271
+ var mediaUrlSchema = /* @__PURE__ */ (() => z35.string().max(2e3).refine((value) => {
4257
4272
  if (/^\/(?!\/)[^\\\s]*$/.test(value)) {
4258
4273
  return true;
4259
4274
  }
@@ -4263,78 +4278,78 @@ var mediaUrlSchema = /* @__PURE__ */ (() => z34.string().max(2e3).refine((value)
4263
4278
  return false;
4264
4279
  }
4265
4280
  }, "Use an HTTPS URL or a same-site path beginning with /"))();
4266
- var questStepActionSchema = /* @__PURE__ */ (() => z34.discriminatedUnion("kind", [
4267
- z34.object({
4268
- kind: z34.literal("link"),
4281
+ var questStepActionSchema = /* @__PURE__ */ (() => z35.discriminatedUnion("kind", [
4282
+ z35.object({
4283
+ kind: z35.literal("link"),
4269
4284
  url: mediaUrlSchema.refine(
4270
4285
  (value) => value.startsWith("https://"),
4271
4286
  "Use an HTTPS URL"
4272
4287
  ),
4273
- label: z34.string().trim().min(1).max(120)
4288
+ label: z35.string().trim().min(1).max(120)
4274
4289
  }).strict()
4275
4290
  ]))();
4276
- var questStepSchema = /* @__PURE__ */ (() => z34.object({
4277
- title: z34.string().trim().min(1).max(120),
4278
- description: z34.string().max(4e3).optional(),
4291
+ var questStepSchema = /* @__PURE__ */ (() => z35.object({
4292
+ title: z35.string().trim().min(1).max(120),
4293
+ description: z35.string().max(4e3).optional(),
4279
4294
  action: questStepActionSchema.optional()
4280
4295
  }).strict())();
4281
- var questPresentationRequirementSchema = /* @__PURE__ */ (() => z34.discriminatedUnion("kind", [
4282
- z34.object({ kind: z34.literal("account"), provider: authProviderSchema }).strict(),
4283
- z34.object({ kind: z34.literal("wallet"), chain: walletChainSchema.optional() }).strict()
4296
+ var questPresentationRequirementSchema = /* @__PURE__ */ (() => z35.discriminatedUnion("kind", [
4297
+ z35.object({ kind: z35.literal("account"), provider: authProviderSchema }).strict(),
4298
+ z35.object({ kind: z35.literal("wallet"), chain: walletChainSchema.optional() }).strict()
4284
4299
  ]))();
4285
- var questPresentationContentSchema = /* @__PURE__ */ (() => z34.object({
4286
- steps: z34.array(questStepSchema).max(30).optional(),
4300
+ var questPresentationContentSchema = /* @__PURE__ */ (() => z35.object({
4301
+ steps: z35.array(questStepSchema).max(30).optional(),
4287
4302
  image: mediaUrlSchema.optional(),
4288
- imageAlt: z34.string().max(500).optional(),
4289
- requirements: z34.array(questPresentationRequirementSchema).max(10).optional()
4303
+ imageAlt: z35.string().max(500).optional(),
4304
+ requirements: z35.array(questPresentationRequirementSchema).max(10).optional()
4290
4305
  }).strict())();
4291
4306
  var questPresentationSchema = /* @__PURE__ */ (() => questPresentationContentSchema.extend({
4292
4307
  quiz: quizQuestionsSchema.optional(),
4293
- instructions: z34.string().max(4e3).optional(),
4294
- video: z34.object({
4308
+ instructions: z35.string().max(4e3).optional(),
4309
+ video: z35.object({
4295
4310
  url: mediaUrlSchema,
4296
4311
  poster: mediaUrlSchema.optional(),
4297
- captions: z34.object({
4312
+ captions: z35.object({
4298
4313
  url: mediaUrlSchema,
4299
- language: z34.string().min(2).max(20),
4300
- label: z34.string().min(1).max(80)
4314
+ language: z35.string().min(2).max(20),
4315
+ label: z35.string().min(1).max(80)
4301
4316
  }).strict().optional()
4302
4317
  }).strict().optional()
4303
4318
  }).strict())();
4304
- var questProfileSchema = /* @__PURE__ */ (() => z34.object({ visible: z34.boolean() }).strict())();
4319
+ var questProfileSchema = /* @__PURE__ */ (() => z35.object({ visible: z35.boolean() }).strict())();
4305
4320
  var evaluatorProtocol = 2;
4306
- var evaluatorProtocolSchema = /* @__PURE__ */ (() => z34.literal(evaluatorProtocol))();
4307
- var questDescriptionSchema = /* @__PURE__ */ (() => z34.object({
4321
+ var evaluatorProtocolSchema = /* @__PURE__ */ (() => z35.literal(evaluatorProtocol))();
4322
+ var questDescriptionSchema = /* @__PURE__ */ (() => z35.object({
4308
4323
  quest: identifier,
4309
4324
  evaluatorProtocol: evaluatorProtocolSchema,
4310
- title: z34.string().min(1).max(120),
4325
+ title: z35.string().min(1).max(120),
4311
4326
  presentation: questPresentationSchema.default({}),
4312
4327
  /** The declared modules this SDK knows. `integrationModules` lists every declared module. */
4313
- integrations: z34.array(evaluatorIntegrationProviderSchema).max(10).default([]),
4328
+ integrations: z35.array(evaluatorIntegrationProviderSchema).max(10).default([]),
4314
4329
  /**
4315
4330
  * Every integration module the quest declares, including providers this SDK does not know: the
4316
4331
  * open sibling of `integrations`. A description omits it when every module is in
4317
4332
  * `integrations`, as descriptions from older SDKs do; Relay's reads always include it.
4318
4333
  */
4319
- integrationModules: z34.array(integrationModuleProviderSchema).max(10).optional(),
4334
+ integrationModules: z35.array(integrationModuleProviderSchema).max(10).optional(),
4320
4335
  fields: settingsFieldsSchema,
4321
4336
  values: settingsValuesSchema,
4322
4337
  rewards: rewardBundleSchema,
4323
4338
  /** Messages Relay posts in connected chats and channels when a completion pays. */
4324
- announcements: z34.array(announcementSchema).max(3).optional(),
4325
- humanReview: z34.boolean(),
4339
+ announcements: z35.array(announcementSchema).max(3).optional(),
4340
+ humanReview: z35.boolean(),
4326
4341
  trigger: triggerSchema,
4327
4342
  performance: contentPerformancePolicySchema.optional(),
4328
- requires: z34.array(prerequisiteSchema).max(30).default([]),
4343
+ requires: z35.array(prerequisiteSchema).max(30).default([]),
4329
4344
  campaign: campaignDefinitionSchema.optional(),
4330
4345
  availability: availabilityWindowSchema.optional(),
4331
- completion: z34.preprocess(refuseStreakTimeZone, completionPolicySchema),
4332
- visibility: z34.enum(["visible", "hidden"]).default("visible"),
4346
+ completion: z35.preprocess(refuseStreakTimeZone, completionPolicySchema),
4347
+ visibility: z35.enum(["visible", "hidden"]).default("visible"),
4333
4348
  /** Whether completions show on participant profiles (`/v1/profiles/:id/completions`). */
4334
4349
  profile: questProfileSchema.default({ visible: false }),
4335
- budgets: z34.array(budgetSchema).max(20).default([]),
4350
+ budgets: z35.array(budgetSchema).max(20).default([]),
4336
4351
  /** Budgets counted per tracker record author; only on quests with a tracker trigger. */
4337
- authorBudgets: z34.array(authorBudgetSchema).max(20).optional(),
4352
+ authorBudgets: z35.array(authorBudgetSchema).max(20).optional(),
4338
4353
  /**
4339
4354
  * Milliseconds a member waits after an attempt is rejected (by the evaluator or a reviewer)
4340
4355
  * before submitting this quest again. Only for quests members submit. Omitted: no cooldown.
@@ -4351,25 +4366,30 @@ var questDescriptionSchema = /* @__PURE__ */ (() => z34.object({
4351
4366
  * one, inside the station's window. Only on quests a signed Solana transaction completes.
4352
4367
  * Experimental.
4353
4368
  */
4354
- stations: questStationsSchema.optional()
4369
+ stations: questStationsSchema.optional(),
4370
+ /**
4371
+ * The photo gallery its accepted photos make up, `{ kind: "wall" | "contest" }`. Only on a quest
4372
+ * whose input is a photo. Experimental.
4373
+ */
4374
+ gallery: questGallerySchema.optional()
4355
4375
  }).strict())();
4356
- var artifactSchema = /* @__PURE__ */ (() => z34.object({ code: z34.string().min(1).max(1e6) }).strict())();
4376
+ var artifactSchema = /* @__PURE__ */ (() => z35.object({ code: z35.string().min(1).max(1e6) }).strict())();
4357
4377
  var releaseSchema = /* @__PURE__ */ (() => artifactSchema.extend({
4358
4378
  /** The SDK runtime the code imports. Absent, the code bundles its own SDK. */
4359
4379
  runtime: sdkRuntimeReferenceSchema.optional(),
4360
4380
  settings: settingsValuesSchema,
4361
4381
  provider: reviewModeSchema,
4362
4382
  expectedRelease: identifier.nullable().optional(),
4363
- settingRenames: z34.record(z34.string(), z34.string()).optional()
4383
+ settingRenames: z35.record(z35.string(), z35.string()).optional()
4364
4384
  }).strict())();
4365
- var batchReleaseSchema = /* @__PURE__ */ (() => z34.object({
4366
- releases: z34.array(releaseSchema).min(1).max(limits.quests)
4385
+ var batchReleaseSchema = /* @__PURE__ */ (() => z35.object({
4386
+ releases: z35.array(releaseSchema).min(1).max(limits.quests)
4367
4387
  }).strict())();
4368
- var questSettingsInputSchema = /* @__PURE__ */ (() => z34.object({
4388
+ var questSettingsInputSchema = /* @__PURE__ */ (() => z35.object({
4369
4389
  quest: identifier,
4370
4390
  expectedRelease: identifier,
4371
4391
  set: settingsValuesSchema,
4372
- reset: z34.array(z34.string()),
4392
+ reset: z35.array(z35.string()),
4373
4393
  /** Replace the editable presentation fields; null restores the code defaults. */
4374
4394
  presentation: questPresentationContentSchema.nullable().optional(),
4375
4395
  /**
@@ -4377,7 +4397,7 @@ var questSettingsInputSchema = /* @__PURE__ */ (() => z34.object({
4377
4397
  * none on chain or to use another; null removes a pasted one. A pasted IDL takes precedence
4378
4398
  * over one the program publishes on chain.
4379
4399
  */
4380
- solanaIdls: z34.record(z34.string(), anchorIdlSchema.nullable()).optional()
4400
+ solanaIdls: z35.record(z35.string(), anchorIdlSchema.nullable()).optional()
4381
4401
  }).strict())();
4382
4402
  var storedQuestDescriptionSchema = /* @__PURE__ */ (() => questDescriptionSchema.extend({
4383
4403
  completion: completionPolicySchema
@@ -4388,20 +4408,20 @@ var publishedReleaseSchema = /* @__PURE__ */ (() => responseShape(
4388
4408
  * Every reward of the quest, kinds this SDK does not know included: the open sibling of
4389
4409
  * `rewards`, which keeps SDK 1.x's closed `Reward`. Absent from older Relay versions.
4390
4410
  */
4391
- rewardEntries: z34.array(rewardEntrySchema).optional(),
4411
+ rewardEntries: z35.array(rewardEntrySchema).optional(),
4392
4412
  key: identifier.optional(),
4393
- code: z34.string(),
4413
+ code: z35.string(),
4394
4414
  /** The SDK runtime `code` imports. Absent, the code bundles its own SDK. */
4395
4415
  runtime: sdkRuntimeReferenceSchema.optional(),
4396
4416
  provider: storedReviewModeSchema,
4397
4417
  id: identifier,
4398
- createdAt: z34.number(),
4399
- origin: z34.object({ typeVersion: identifier }).strict().optional(),
4400
- lifecycle: z34.enum(["active", "paused", "archived"]).default("active"),
4401
- configuration: z34.object({
4418
+ createdAt: z35.number(),
4419
+ origin: z35.object({ typeVersion: identifier }).strict().optional(),
4420
+ lifecycle: z35.enum(["active", "paused", "archived"]).default("active"),
4421
+ configuration: z35.object({
4402
4422
  defaults: settingsValuesSchema,
4403
4423
  overrides: settingsValuesSchema,
4404
- preserved: z34.array(z34.string()),
4424
+ preserved: z35.array(z35.string()),
4405
4425
  presentation: questPresentationContentSchema.optional(),
4406
4426
  presentationDefaults: questPresentationContentSchema.optional()
4407
4427
  }).strict().optional(),
@@ -4410,20 +4430,20 @@ var publishedReleaseSchema = /* @__PURE__ */ (() => responseShape(
4410
4430
  * `settings.solanaProgram()` setting key. Stored when the setting is saved; a setting without
4411
4431
  * an IDL has no entry.
4412
4432
  */
4413
- solanaIdls: z34.record(z34.string(), solanaProgramIdlSchema).optional(),
4433
+ solanaIdls: z35.record(z35.string(), solanaProgramIdlSchema).optional(),
4414
4434
  /**
4415
4435
  * The secret settings (`settings.text({ secret: true })`) that hold a value. Responses leave
4416
4436
  * every secret setting out of `values` and `configuration`; one not listed here is empty.
4417
4437
  * Absent when the release has no secret setting.
4418
4438
  */
4419
- withheldSettings: z34.array(z34.string()).optional()
4439
+ withheldSettings: z35.array(z35.string()).optional()
4420
4440
  })
4421
4441
  ))();
4422
- var templateSchema = /* @__PURE__ */ (() => z34.object({
4423
- code: z34.string(),
4442
+ var templateSchema = /* @__PURE__ */ (() => z35.object({
4443
+ code: z35.string(),
4424
4444
  definition: questDescriptionSchema
4425
4445
  }))();
4426
- var quizAnswersSchema = /* @__PURE__ */ (() => z34.record(identifier, identifier).refine(
4446
+ var quizAnswersSchema = /* @__PURE__ */ (() => z35.record(identifier, identifier).refine(
4427
4447
  (answers) => Object.keys(answers).length > 0 && Object.keys(answers).length <= 50,
4428
4448
  "Provide between 1 and 50 answers"
4429
4449
  ).transform(
@@ -4431,17 +4451,17 @@ var quizAnswersSchema = /* @__PURE__ */ (() => z34.record(identifier, identifier
4431
4451
  Object.entries(answers).sort(([a], [b]) => a.localeCompare(b))
4432
4452
  )
4433
4453
  ))();
4434
- var quizEvidenceSchema = /* @__PURE__ */ (() => z34.object({
4435
- kind: z34.literal("quiz"),
4454
+ var quizEvidenceSchema = /* @__PURE__ */ (() => z35.object({
4455
+ kind: z35.literal("quiz"),
4436
4456
  release: identifier.optional(),
4437
4457
  answers: quizAnswersSchema
4438
4458
  }).strict())();
4439
- var submissionEvidenceSchema = /* @__PURE__ */ (() => z34.union([
4459
+ var submissionEvidenceSchema = /* @__PURE__ */ (() => z35.union([
4440
4460
  quizEvidenceSchema,
4441
4461
  textEvidenceSchema,
4442
4462
  urlEvidenceSchema
4443
4463
  ]))();
4444
- var submitSchema = /* @__PURE__ */ (() => z34.object({
4464
+ var submitSchema = /* @__PURE__ */ (() => z35.object({
4445
4465
  actionId: identifier,
4446
4466
  quest: identifier,
4447
4467
  member: identifier,
@@ -4449,7 +4469,7 @@ var submitSchema = /* @__PURE__ */ (() => z34.object({
4449
4469
  input: submissionEvidenceSchema.optional(),
4450
4470
  release: identifier.optional(),
4451
4471
  /** @deprecated Relay refuses a submission that sets it to `true` and ignores `false`. Removed in 2.0.0. */
4452
- faultAfterReview: z34.boolean().optional()
4472
+ faultAfterReview: z35.boolean().optional()
4453
4473
  }).strict())();
4454
4474
  var AttemptStatus = {
4455
4475
  Queued: "queued",
@@ -4461,13 +4481,13 @@ var AttemptStatus = {
4461
4481
  NeedsReview: "needs-review",
4462
4482
  Failed: "failed"
4463
4483
  };
4464
- var attemptStatusSchema = /* @__PURE__ */ (() => z34.string())();
4484
+ var attemptStatusSchema = /* @__PURE__ */ (() => z35.string())();
4465
4485
  var AttemptCodeSource = {
4466
4486
  Relay: "relay",
4467
4487
  Evaluator: "evaluator"
4468
4488
  };
4469
- var attemptCodeSourceSchema = /* @__PURE__ */ (() => z34.string())();
4470
- var attemptSchema = /* @__PURE__ */ (() => z34.object({
4489
+ var attemptCodeSourceSchema = /* @__PURE__ */ (() => z35.string())();
4490
+ var attemptSchema = /* @__PURE__ */ (() => z35.object({
4471
4491
  id: identifier,
4472
4492
  release: identifier,
4473
4493
  quest: identifier,
@@ -4475,22 +4495,22 @@ var attemptSchema = /* @__PURE__ */ (() => z34.object({
4475
4495
  evidence: identifier.nullable(),
4476
4496
  input: submissionEvidenceSchema.optional(),
4477
4497
  status: attemptStatusSchema,
4478
- reason: z34.string().nullable(),
4479
- retries: z34.number(),
4480
- generation: z34.number(),
4481
- completion: z34.string().nullable(),
4498
+ reason: z35.string().nullable(),
4499
+ retries: z35.number(),
4500
+ generation: z35.number(),
4501
+ completion: z35.string().nullable(),
4482
4502
  reviewRewards: rewardBundleSchema.nullable().default(null),
4483
4503
  /** Scheduled reruns advance this number; failure retries preserve it. */
4484
- evaluationRun: z34.number().int().nonnegative().default(0),
4485
- deferCount: z34.number().int().nonnegative().default(0),
4486
- deferUntil: z34.number().int().safe().nullable().default(null),
4487
- nextEvaluationAt: z34.number().int().safe().nullable().default(null),
4504
+ evaluationRun: z35.number().int().nonnegative().default(0),
4505
+ deferCount: z35.number().int().nonnegative().default(0),
4506
+ deferUntil: z35.number().int().safe().nullable().default(null),
4507
+ nextEvaluationAt: z35.number().int().safe().nullable().default(null),
4488
4508
  /**
4489
4509
  * Open code: consumers must tolerate new values. Relay writes its own codes, such as
4490
4510
  * `budget-exhausted`; an attempt the evaluator rejected with `decision.reject({ reason, code })`
4491
4511
  * carries the evaluator's code in management reads, and null in responses to members.
4492
4512
  */
4493
- code: z34.string().nullable().default(null),
4513
+ code: z35.string().nullable().default(null),
4494
4514
  /**
4495
4515
  * Who wrote `code`: `relay` or `evaluator` (an `AttemptCodeSource`), null when `code` is null.
4496
4516
  * Open: consumers must tolerate new values. An evaluator can reject with a code Relay also writes,
@@ -4503,15 +4523,24 @@ var attemptSchema = /* @__PURE__ */ (() => z34.object({
4503
4523
  * The evaluator asked for human review of a quest with review off, so Domino rejected the attempt
4504
4524
  * with the evaluator's reason. Only set on a rejected attempt.
4505
4525
  */
4506
- requestedReview: z34.boolean().default(false),
4507
- createdAt: z34.number(),
4526
+ requestedReview: z35.boolean().default(false),
4527
+ createdAt: z35.number(),
4508
4528
  /**
4509
4529
  * The action that started the attempt: the signed Solana transaction an app's server submitted
4510
4530
  * with `management.attempts.submitSolanaTransaction()`. Absent for any other attempt.
4511
4531
  *
4512
4532
  * @experimental A minor release can change quest actions.
4513
4533
  */
4514
- action: attemptActionSchema.nullable().optional()
4534
+ action: attemptActionSchema.nullable().optional(),
4535
+ /**
4536
+ * The key of the code station the member checked in at, for an attempt a station's code started
4537
+ * (`management.attempts.submitStationCode()` or the participant client's `quests.checkIn()`).
4538
+ * Such an attempt carries no `action`; its evaluator reads `{ kind: "station-code", reference }`
4539
+ * in `ctx.action`. Absent for any other attempt.
4540
+ *
4541
+ * @experimental A minor release can change check-in stations.
4542
+ */
4543
+ station: z35.string().optional()
4515
4544
  }))();
4516
4545
  var QuestSubmissionStatus = {
4517
4546
  Open: "open",
@@ -4519,9 +4548,9 @@ var QuestSubmissionStatus = {
4519
4548
  Discarded: "discarded",
4520
4549
  Expired: "expired"
4521
4550
  };
4522
- var questSubmissionStatusSchema = /* @__PURE__ */ (() => z34.string())();
4551
+ var questSubmissionStatusSchema = /* @__PURE__ */ (() => z35.string())();
4523
4552
  var questSubmissionSchema = /* @__PURE__ */ (() => responseShape(
4524
- z34.object({
4553
+ z35.object({
4525
4554
  id: identifier,
4526
4555
  quest: identifier,
4527
4556
  member: identifier,
@@ -4531,85 +4560,85 @@ var questSubmissionSchema = /* @__PURE__ */ (() => responseShape(
4531
4560
  /** An uploaded photo's evidence ID. */
4532
4561
  evidence: identifier.nullable(),
4533
4562
  /** Submitting was refused because the quest changed: review the draft before submitting again. */
4534
- reviewRequired: z34.boolean(),
4563
+ reviewRequired: z35.boolean(),
4535
4564
  status: questSubmissionStatusSchema,
4536
4565
  /** The attempt a `submitted` submission admitted. */
4537
4566
  attempt: identifier.nullable(),
4538
- createdAt: z34.number(),
4539
- updatedAt: z34.number(),
4567
+ createdAt: z35.number(),
4568
+ updatedAt: z35.number(),
4540
4569
  /** When an open submission expires unless it changes again. */
4541
- expiresAt: z34.number()
4570
+ expiresAt: z35.number()
4542
4571
  })
4543
4572
  ))();
4544
- var questSubmissionUpdateSchema = /* @__PURE__ */ (() => z34.object({
4573
+ var questSubmissionUpdateSchema = /* @__PURE__ */ (() => z35.object({
4545
4574
  release: identifier.nullable().optional(),
4546
4575
  input: submissionEvidenceSchema.nullable().optional(),
4547
4576
  evidence: identifier.nullable().optional()
4548
4577
  }).strict())();
4549
4578
  var questSubmissionResultSchema = /* @__PURE__ */ (() => responseShape(
4550
- z34.object({
4579
+ z35.object({
4551
4580
  submission: questSubmissionSchema,
4552
4581
  attempt: attemptSchema,
4553
- replayed: z34.boolean()
4582
+ replayed: z35.boolean()
4554
4583
  })
4555
4584
  ))();
4556
- var eventSchema = /* @__PURE__ */ (() => z34.object({
4557
- id: z34.number(),
4558
- attempt: z34.string().nullable(),
4559
- kind: z34.string(),
4560
- detail: z34.string(),
4561
- actor: z34.string().nullable().default(null),
4562
- at: z34.number()
4563
- }))();
4564
- var pickupSelectionSchema = /* @__PURE__ */ (() => z34.object({
4585
+ var eventSchema = /* @__PURE__ */ (() => z35.object({
4586
+ id: z35.number(),
4587
+ attempt: z35.string().nullable(),
4588
+ kind: z35.string(),
4589
+ detail: z35.string(),
4590
+ actor: z35.string().nullable().default(null),
4591
+ at: z35.number()
4592
+ }))();
4593
+ var pickupSelectionSchema = /* @__PURE__ */ (() => z35.object({
4565
4594
  item: identifier,
4566
- revision: z34.number().int().nonnegative()
4595
+ revision: z35.number().int().nonnegative()
4567
4596
  }).strict())();
4568
- var pickupAllocationSchema = /* @__PURE__ */ (() => z34.object({
4597
+ var pickupAllocationSchema = /* @__PURE__ */ (() => z35.object({
4569
4598
  item: identifier,
4570
- label: z34.string().min(1).max(80)
4599
+ label: z35.string().min(1).max(80)
4571
4600
  }).strict())();
4572
- var pickupPolicySchema = /* @__PURE__ */ (() => z34.discriminatedUnion("kind", [
4573
- z34.object({ kind: z34.literal("untracked") }).strict(),
4574
- z34.object({
4575
- kind: z34.literal("at-pickup"),
4576
- tiers: z34.array(
4577
- z34.object({
4601
+ var pickupPolicySchema = /* @__PURE__ */ (() => z35.discriminatedUnion("kind", [
4602
+ z35.object({ kind: z35.literal("untracked") }).strict(),
4603
+ z35.object({
4604
+ kind: z35.literal("at-pickup"),
4605
+ tiers: z35.array(
4606
+ z35.object({
4578
4607
  tier: identifier,
4579
- variants: z34.array(pickupAllocationSchema).min(1).max(100)
4608
+ variants: z35.array(pickupAllocationSchema).min(1).max(100)
4580
4609
  }).strict()
4581
4610
  ).min(1).max(100)
4582
4611
  }).strict()
4583
4612
  ]))();
4584
- var pickupCatalogSchema = /* @__PURE__ */ (() => z34.object({
4613
+ var pickupCatalogSchema = /* @__PURE__ */ (() => z35.object({
4585
4614
  reward: tieredRewardDefinitionSchema,
4586
- revision: z34.number().int().nonnegative(),
4615
+ revision: z35.number().int().nonnegative(),
4587
4616
  policy: pickupPolicySchema
4588
4617
  }))();
4589
- var pickupAvailabilitySchema = /* @__PURE__ */ (() => z34.discriminatedUnion("kind", [
4590
- z34.object({ kind: z34.literal("untracked") }).strict(),
4591
- z34.object({
4592
- kind: z34.literal("at-pickup"),
4593
- revision: z34.number().int().nonnegative(),
4594
- variants: z34.array(
4618
+ var pickupAvailabilitySchema = /* @__PURE__ */ (() => z35.discriminatedUnion("kind", [
4619
+ z35.object({ kind: z35.literal("untracked") }).strict(),
4620
+ z35.object({
4621
+ kind: z35.literal("at-pickup"),
4622
+ revision: z35.number().int().nonnegative(),
4623
+ variants: z35.array(
4595
4624
  pickupAllocationSchema.extend({
4596
- available: z34.number().int().nonnegative()
4625
+ available: z35.number().int().nonnegative()
4597
4626
  })
4598
4627
  )
4599
4628
  }).strict()
4600
4629
  ]))();
4601
- var configurePickupSchema = /* @__PURE__ */ (() => z34.object({
4630
+ var configurePickupSchema = /* @__PURE__ */ (() => z35.object({
4602
4631
  reward: identifier,
4603
- revision: z34.number().int().nonnegative(),
4632
+ revision: z35.number().int().nonnegative(),
4604
4633
  actionId: identifier,
4605
- policy: z34.discriminatedUnion("kind", [
4606
- z34.object({ kind: z34.literal("untracked") }).strict(),
4607
- z34.object({
4608
- kind: z34.literal("at-pickup"),
4609
- tiers: z34.array(
4610
- z34.object({
4634
+ policy: z35.discriminatedUnion("kind", [
4635
+ z35.object({ kind: z35.literal("untracked") }).strict(),
4636
+ z35.object({
4637
+ kind: z35.literal("at-pickup"),
4638
+ tiers: z35.array(
4639
+ z35.object({
4611
4640
  tier: identifier,
4612
- variants: z34.array(
4641
+ variants: z35.array(
4613
4642
  pickupAllocationSchema.extend({
4614
4643
  item: identifier.optional()
4615
4644
  })
@@ -4619,10 +4648,10 @@ var configurePickupSchema = /* @__PURE__ */ (() => z34.object({
4619
4648
  }).strict()
4620
4649
  ])
4621
4650
  }).strict())();
4622
- var entitlementRecoverySchema = /* @__PURE__ */ (() => z34.object({
4651
+ var entitlementRecoverySchema = /* @__PURE__ */ (() => z35.object({
4623
4652
  completion: identifier,
4624
- reason: z34.string(),
4625
- flaggedAt: z34.number(),
4653
+ reason: z35.string(),
4654
+ flaggedAt: z35.number(),
4626
4655
  /** Null means no accepted completion currently earns this reward. */
4627
4656
  remainingTier: identifier.nullable()
4628
4657
  }))();
@@ -4632,40 +4661,40 @@ var entitlementBase = /* @__PURE__ */ (() => ({
4632
4661
  reward: tieredRewardDefinitionSchema,
4633
4662
  earnedTier: identifier,
4634
4663
  tier: identifier,
4635
- revision: z34.number().int().positive()
4664
+ revision: z35.number().int().positive()
4636
4665
  }))();
4637
- var entitlementStateSchema = /* @__PURE__ */ (() => z34.discriminatedUnion("status", [
4638
- z34.object({ ...entitlementBase, status: z34.literal("available") }).strict(),
4639
- z34.object({
4666
+ var entitlementStateSchema = /* @__PURE__ */ (() => z35.discriminatedUnion("status", [
4667
+ z35.object({ ...entitlementBase, status: z35.literal("available") }).strict(),
4668
+ z35.object({
4640
4669
  ...entitlementBase,
4641
- status: z34.literal("handing-over"),
4670
+ status: z35.literal("handing-over"),
4642
4671
  handover: identifier,
4643
- startedAt: z34.number(),
4672
+ startedAt: z35.number(),
4644
4673
  allocation: pickupAllocationSchema.optional()
4645
4674
  }).strict(),
4646
- z34.object({
4675
+ z35.object({
4647
4676
  ...entitlementBase,
4648
- status: z34.literal("collected"),
4677
+ status: z35.literal("collected"),
4649
4678
  handover: identifier,
4650
- startedAt: z34.number(),
4679
+ startedAt: z35.number(),
4651
4680
  allocation: pickupAllocationSchema.optional(),
4652
- collectedAt: z34.number(),
4681
+ collectedAt: z35.number(),
4653
4682
  recovery: entitlementRecoverySchema.optional()
4654
4683
  }).strict(),
4655
4684
  // An operator voided it: it can no longer be handed over. A quest grant of the same reward to
4656
4685
  // the member (the same grant key) makes it available again; a voided referral reward stays void.
4657
- z34.object({
4686
+ z35.object({
4658
4687
  ...entitlementBase,
4659
- status: z34.literal("void"),
4660
- voidedAt: z34.number()
4688
+ status: z35.literal("void"),
4689
+ voidedAt: z35.number()
4661
4690
  }).strict()
4662
4691
  ]))();
4663
- var tieredRewardReadSchema = /* @__PURE__ */ (() => z34.object({
4692
+ var tieredRewardReadSchema = /* @__PURE__ */ (() => z35.object({
4664
4693
  id: identifier,
4665
- title: z34.string(),
4666
- tiers: z34.array(z34.object({ id: identifier, title: z34.string() }).loose()),
4667
- inventory: z34.object({ kind: z34.string() }).loose(),
4668
- fulfillment: z34.object({ kind: z34.string() }).loose(),
4694
+ title: z35.string(),
4695
+ tiers: z35.array(z35.object({ id: identifier, title: z35.string() }).loose()),
4696
+ inventory: z35.object({ kind: z35.string() }).loose(),
4697
+ fulfillment: z35.object({ kind: z35.string() }).loose(),
4669
4698
  /**
4670
4699
  * The key given to defineTieredReward, or null for a reward created without one. Management
4671
4700
  * reads carry it; participant reads and Relay versions before it leave it out.
@@ -4678,63 +4707,63 @@ var entitlementReadBase = /* @__PURE__ */ (() => ({
4678
4707
  reward: tieredRewardReadSchema,
4679
4708
  earnedTier: identifier,
4680
4709
  tier: identifier,
4681
- revision: z34.number().int()
4710
+ revision: z35.number().int()
4682
4711
  }))();
4683
- var allocationReadSchema = /* @__PURE__ */ (() => z34.object({ item: identifier, label: z34.string() }).loose())();
4684
- var entitlementSchema = /* @__PURE__ */ (() => z34.union([
4685
- z34.discriminatedUnion("status", [
4686
- z34.object({ ...entitlementReadBase, status: z34.literal("available") }).loose(),
4687
- z34.object({
4712
+ var allocationReadSchema = /* @__PURE__ */ (() => z35.object({ item: identifier, label: z35.string() }).loose())();
4713
+ var entitlementSchema = /* @__PURE__ */ (() => z35.union([
4714
+ z35.discriminatedUnion("status", [
4715
+ z35.object({ ...entitlementReadBase, status: z35.literal("available") }).loose(),
4716
+ z35.object({
4688
4717
  ...entitlementReadBase,
4689
- status: z34.literal("handing-over"),
4718
+ status: z35.literal("handing-over"),
4690
4719
  handover: identifier,
4691
- startedAt: z34.number(),
4720
+ startedAt: z35.number(),
4692
4721
  allocation: allocationReadSchema.optional()
4693
4722
  }).loose(),
4694
- z34.object({
4723
+ z35.object({
4695
4724
  ...entitlementReadBase,
4696
- status: z34.literal("collected"),
4725
+ status: z35.literal("collected"),
4697
4726
  handover: identifier,
4698
- startedAt: z34.number(),
4727
+ startedAt: z35.number(),
4699
4728
  allocation: allocationReadSchema.optional(),
4700
- collectedAt: z34.number(),
4729
+ collectedAt: z35.number(),
4701
4730
  recovery: entitlementRecoverySchema.optional()
4702
4731
  }).loose(),
4703
- z34.object({
4732
+ z35.object({
4704
4733
  ...entitlementReadBase,
4705
- status: z34.literal("void"),
4706
- voidedAt: z34.number()
4734
+ status: z35.literal("void"),
4735
+ voidedAt: z35.number()
4707
4736
  }).loose()
4708
4737
  ]),
4709
- z34.object({ ...entitlementReadBase, status: z34.string() }).loose().transform(({ status, ...entitlement }) => ({
4738
+ z35.object({ ...entitlementReadBase, status: z35.string() }).loose().transform(({ status, ...entitlement }) => ({
4710
4739
  ...entitlement,
4711
4740
  status: "unsupported",
4712
4741
  reportedStatus: status
4713
4742
  }))
4714
4743
  ]))();
4715
- var beginHandoverSchema = /* @__PURE__ */ (() => z34.object({
4744
+ var beginHandoverSchema = /* @__PURE__ */ (() => z35.object({
4716
4745
  actionId: identifier,
4717
- revision: z34.number().int().positive(),
4746
+ revision: z35.number().int().positive(),
4718
4747
  selection: pickupSelectionSchema.optional()
4719
4748
  }).strict())();
4720
- var confirmHandoverSchema = /* @__PURE__ */ (() => z34.object({ actionId: identifier, handover: identifier }).strict())();
4721
- var entitlementCorrectionSchema = /* @__PURE__ */ (() => z34.object({
4749
+ var confirmHandoverSchema = /* @__PURE__ */ (() => z35.object({ actionId: identifier, handover: identifier }).strict())();
4750
+ var entitlementCorrectionSchema = /* @__PURE__ */ (() => z35.object({
4722
4751
  actionId: identifier,
4723
- revision: z34.number().int().positive(),
4724
- reason: z34.string().trim().min(1).max(500)
4752
+ revision: z35.number().int().positive(),
4753
+ reason: z35.string().trim().min(1).max(500)
4725
4754
  }).strict())();
4726
4755
  var CompletionSourceKind = {
4727
4756
  Quest: "quest",
4728
4757
  Leaderboard: "leaderboard"
4729
4758
  };
4730
- var completionSourceKindSchema = /* @__PURE__ */ (() => z34.string().min(1).max(64))();
4731
- var completionSourceSchema = /* @__PURE__ */ (() => z34.object({
4759
+ var completionSourceKindSchema = /* @__PURE__ */ (() => z35.string().min(1).max(64))();
4760
+ var completionSourceSchema = /* @__PURE__ */ (() => z35.object({
4732
4761
  kind: completionSourceKindSchema,
4733
4762
  id: identifier
4734
4763
  }))();
4735
- var completionRecordSchema = /* @__PURE__ */ (() => z34.object({
4764
+ var completionRecordSchema = /* @__PURE__ */ (() => z35.object({
4736
4765
  /** The occurrence the completion consumed. For a leaderboard prize, the settlement ID. */
4737
- key: z34.string().default("once"),
4766
+ key: z35.string().default("once"),
4738
4767
  id: identifier,
4739
4768
  /** The quest ID, or the board ID when `source.kind` is `leaderboard`. */
4740
4769
  quest: identifier,
@@ -4742,19 +4771,19 @@ var completionRecordSchema = /* @__PURE__ */ (() => z34.object({
4742
4771
  /** What paid the completion. `source.id` repeats `quest`. */
4743
4772
  source: completionSourceSchema.optional()
4744
4773
  }))();
4745
- var questAvailabilitySchema = /* @__PURE__ */ (() => z34.discriminatedUnion("kind", [
4746
- z34.object({
4747
- kind: z34.literal("available"),
4748
- input: z34.enum(["photo", "quiz", "none", "text", "url"])
4774
+ var questAvailabilitySchema = /* @__PURE__ */ (() => z35.discriminatedUnion("kind", [
4775
+ z35.object({
4776
+ kind: z35.literal("available"),
4777
+ input: z35.enum(["photo", "quiz", "none", "text", "url"])
4749
4778
  }).strict(),
4750
- z34.object({ kind: z34.literal("completed") }).strict(),
4751
- z34.object({
4752
- kind: z34.literal("locked"),
4753
- missing: z34.array(missingPrerequisiteSchema).min(1)
4779
+ z35.object({ kind: z35.literal("completed") }).strict(),
4780
+ z35.object({
4781
+ kind: z35.literal("locked"),
4782
+ missing: z35.array(missingPrerequisiteSchema).min(1)
4754
4783
  }).strict(),
4755
- z34.object({
4756
- kind: z34.literal("blocked"),
4757
- reason: z34.enum([
4784
+ z35.object({
4785
+ kind: z35.literal("blocked"),
4786
+ reason: z35.enum([
4758
4787
  "budget-exhausted",
4759
4788
  "connection-required",
4760
4789
  "wallet-required",
@@ -4763,56 +4792,56 @@ var questAvailabilitySchema = /* @__PURE__ */ (() => z34.discriminatedUnion("kin
4763
4792
  "enrollment-required"
4764
4793
  ]),
4765
4794
  /** Which window refused admission when `reason` is `outside-window`. */
4766
- window: z34.enum(["tracker", "quest"]).optional(),
4767
- resetsAt: z34.number().int().safe().optional()
4795
+ window: z35.enum(["tracker", "quest"]).optional(),
4796
+ resetsAt: z35.number().int().safe().optional()
4768
4797
  }).strict(),
4769
- z34.object({ kind: z34.literal("staff-required") }).strict(),
4770
- z34.object({ kind: z34.literal("automatic") }).strict(),
4771
- z34.object({ kind: z34.literal("checking"), attempt: identifier }).strict(),
4772
- z34.object({ kind: z34.literal("needs-review"), attempt: identifier }).strict(),
4773
- z34.object({ kind: z34.literal("retryable"), attempt: identifier }).strict()
4798
+ z35.object({ kind: z35.literal("staff-required") }).strict(),
4799
+ z35.object({ kind: z35.literal("automatic") }).strict(),
4800
+ z35.object({ kind: z35.literal("checking"), attempt: identifier }).strict(),
4801
+ z35.object({ kind: z35.literal("needs-review"), attempt: identifier }).strict(),
4802
+ z35.object({ kind: z35.literal("retryable"), attempt: identifier }).strict()
4774
4803
  ]))();
4775
- var questAvailabilityResponseSchema = /* @__PURE__ */ (() => z34.union(
4804
+ var questAvailabilityResponseSchema = /* @__PURE__ */ (() => z35.union(
4776
4805
  questAvailabilitySchema.options.map((option) => option.strip())
4777
4806
  ))();
4778
- var questBudgetViewSchema = /* @__PURE__ */ (() => z34.object({
4807
+ var questBudgetViewSchema = /* @__PURE__ */ (() => z35.object({
4779
4808
  id: identifier,
4780
- scope: z34.enum(["member", "project"]),
4781
- period: z34.enum(["day", "week", "month", "lifetime"]),
4782
- remaining: z34.number().int().safe().nonnegative(),
4783
- resetsAt: z34.number().int().safe().nullable()
4809
+ scope: z35.enum(["member", "project"]),
4810
+ period: z35.enum(["day", "week", "month", "lifetime"]),
4811
+ remaining: z35.number().int().safe().nonnegative(),
4812
+ resetsAt: z35.number().int().safe().nullable()
4784
4813
  }))();
4785
4814
  var memberProgressSchema = /* @__PURE__ */ (() => responseShape(
4786
- z34.object({
4815
+ z35.object({
4787
4816
  member: identifier,
4788
- quests: z34.array(
4789
- z34.object({
4817
+ quests: z35.array(
4818
+ z35.object({
4790
4819
  quest: identifier,
4791
4820
  key: identifier.optional(),
4792
4821
  release: identifier.optional(),
4793
- title: z34.string(),
4822
+ title: z35.string(),
4794
4823
  presentation: questPresentationSchema.default({}),
4795
- connections: z34.array(authProviderSchema).default([]),
4824
+ connections: z35.array(authProviderSchema).default([]),
4796
4825
  trigger: triggerResponseSchema,
4797
4826
  availability: questAvailabilityResponseSchema,
4798
- completed: z34.boolean(),
4827
+ completed: z35.boolean(),
4799
4828
  completion: completionPolicySchema.default({ kind: "once" }),
4800
4829
  streak: streakProgressSchema.nullable().optional(),
4801
4830
  counter: counterProgressSchema.nullable().optional(),
4802
4831
  /** Latest attempt's committed evaluator progress, while it remains deferred/evaluating. */
4803
4832
  progress: evaluatorProgressSchema.nullable().default(null),
4804
- completionCount: z34.number().int().nonnegative().default(0),
4805
- visibility: z34.enum(["visible", "hidden"]).default("visible"),
4806
- missing: z34.array(missingPrerequisiteSchema),
4833
+ completionCount: z35.number().int().nonnegative().default(0),
4834
+ visibility: z35.enum(["visible", "hidden"]).default("visible"),
4835
+ missing: z35.array(missingPrerequisiteSchema),
4807
4836
  campaign: campaignViewSchema.nullable().default(null),
4808
4837
  window: availabilityWindowSchema.nullable().default(null),
4809
- budgets: z34.array(questBudgetViewSchema).default([]),
4838
+ budgets: z35.array(questBudgetViewSchema).default([]),
4810
4839
  /**
4811
4840
  * Unix milliseconds when the member may submit again, while the quest's retry cooldown
4812
4841
  * after their rejected attempt runs. Until then a new attempt is refused with
4813
4842
  * `retry-cooldown`. Absent when no cooldown is running.
4814
4843
  */
4815
- retryAt: z34.number().int().safe().optional(),
4844
+ retryAt: z35.number().int().safe().optional(),
4816
4845
  /**
4817
4846
  * Unix milliseconds when the member may next submit the quest, while it waits on something
4818
4847
  * that ends by itself: the retry cooldown after a rejection, the completion cooldown after
@@ -4821,128 +4850,126 @@ var memberProgressSchema = /* @__PURE__ */ (() => responseShape(
4821
4850
  * several apply; use it for countdowns. Absent when the member can submit now, or when
4822
4851
  * nothing will reopen the quest (a used-up lifetime budget, a closed window).
4823
4852
  */
4824
- nextAvailableAt: z34.number().int().safe().optional(),
4853
+ nextAvailableAt: z35.number().int().safe().optional(),
4825
4854
  attempt: attemptSchema.nullable()
4826
4855
  })
4827
4856
  ),
4828
- entitlements: z34.array(entitlementSchema)
4857
+ entitlements: z35.array(entitlementSchema)
4829
4858
  })
4830
4859
  ))();
4831
4860
  var snapshotSchema = /* @__PURE__ */ (() => responseShape(
4832
- z34.object({
4833
- releases: z34.array(publishedReleaseSchema),
4834
- completions: z34.array(completionRecordSchema),
4835
- entitlements: z34.array(entitlementSchema),
4836
- attempts: z34.array(attemptSchema),
4837
- balances: z34.array(
4838
- z34.object({
4839
- member: z34.string(),
4840
- balance: z34.string(),
4841
- earned: z34.number(),
4842
- held: z34.number(),
4843
- available: z34.number()
4861
+ z35.object({
4862
+ releases: z35.array(publishedReleaseSchema),
4863
+ completions: z35.array(completionRecordSchema),
4864
+ entitlements: z35.array(entitlementSchema),
4865
+ attempts: z35.array(attemptSchema),
4866
+ balances: z35.array(
4867
+ z35.object({
4868
+ member: z35.string(),
4869
+ balance: z35.string(),
4870
+ earned: z35.number(),
4871
+ held: z35.number(),
4872
+ available: z35.number()
4844
4873
  })
4845
4874
  ),
4846
- events: z34.array(eventSchema)
4875
+ events: z35.array(eventSchema)
4847
4876
  })
4848
4877
  ))();
4849
- var evidenceSchema = /* @__PURE__ */ (() => z34.object({
4878
+ var evidenceSchema = /* @__PURE__ */ (() => z35.object({
4850
4879
  id: identifier,
4851
4880
  member: identifier,
4852
- type: z34.enum(["image/jpeg", "image/png"]),
4853
- size: z34.number()
4881
+ type: z35.enum(["image/jpeg", "image/png"]),
4882
+ size: z35.number()
4854
4883
  }))();
4855
- var errorSchema = /* @__PURE__ */ (() => z34.object({
4856
- error: z34.string(),
4857
- code: z34.string().optional(),
4884
+ var errorSchema = /* @__PURE__ */ (() => z35.object({
4885
+ error: z35.string(),
4886
+ code: z35.string().optional(),
4858
4887
  /** Which window refused admission when `code` is `outside-window`. */
4859
- window: z34.enum(["tracker", "quest"]).optional(),
4860
- missing: z34.array(missingPrerequisiteSchema).optional(),
4888
+ window: z35.enum(["tracker", "quest"]).optional(),
4889
+ missing: z35.array(missingPrerequisiteSchema).optional(),
4861
4890
  /**
4862
4891
  * Unix milliseconds when the member may submit again, when `code` is `retry-cooldown` or
4863
4892
  * `completion-cooldown`.
4864
4893
  */
4865
- retryAt: z34.number().int().safe().optional()
4894
+ retryAt: z35.number().int().safe().optional()
4866
4895
  }))();
4867
- var staffDecisionSchema = /* @__PURE__ */ (() => z34.object({
4868
- actionId: identifier,
4869
- generation: z34.number().int().nonnegative(),
4870
- decision: z34.enum(["accept", "reject"]),
4871
- reason: z34.string().trim().min(1).max(2e3)
4872
- }).strict())();
4873
- var acceptAnywaySchema = /* @__PURE__ */ (() => z34.object({
4896
+ var staffDecisionSchema = /* @__PURE__ */ (() => z35.object({
4874
4897
  actionId: identifier,
4875
- reason: z34.string().trim().min(1).max(2e3)
4898
+ generation: z35.number().int().nonnegative(),
4899
+ decision: z35.enum(["accept", "reject"]),
4900
+ reason: z35.string().trim().min(1).max(2e3)
4876
4901
  }).strict())();
4877
- var evidenceRedactionInputSchema = /* @__PURE__ */ (() => z34.object({
4902
+ var staffReasonInputSchema = /* @__PURE__ */ (() => z35.object({
4878
4903
  actionId: identifier,
4879
- reason: z34.string().trim().min(1).max(2e3)
4904
+ reason: z35.string().trim().min(1).max(2e3)
4880
4905
  }).strict())();
4881
- var evidenceRetentionInputSchema = /* @__PURE__ */ (() => z34.object({
4906
+ var acceptAnywaySchema = staffReasonInputSchema;
4907
+ var evidenceRedactionInputSchema = staffReasonInputSchema;
4908
+ var evidenceRetentionInputSchema = /* @__PURE__ */ (() => z35.object({
4882
4909
  actionId: identifier,
4883
4910
  quest: identifier,
4884
- decidedBefore: z34.number().int().nonnegative(),
4885
- reason: z34.string().trim().min(1).max(2e3)
4911
+ decidedBefore: z35.number().int().nonnegative(),
4912
+ reason: z35.string().trim().min(1).max(2e3)
4886
4913
  }).strict())();
4887
- var evidenceRetentionPeriodSchema = /* @__PURE__ */ (() => z34.union([
4888
- z34.object({ days: z34.number().int().min(1).max(3650) }).strict(),
4889
- z34.literal("keep")
4914
+ var evidenceRetentionPeriodSchema = /* @__PURE__ */ (() => z35.union([
4915
+ z35.object({ days: z35.number().int().min(1).max(3650) }).strict(),
4916
+ z35.literal("keep")
4890
4917
  ]))();
4891
- var evidenceRetentionSettingInputSchema = /* @__PURE__ */ (() => z34.object({
4918
+ var evidenceRetentionSettingInputSchema = /* @__PURE__ */ (() => z35.object({
4892
4919
  actionId: identifier,
4893
4920
  evidenceRetention: evidenceRetentionPeriodSchema
4894
4921
  }).strict())();
4895
- var stockSchema = /* @__PURE__ */ (() => z34.object({ item: identifier, quantity: z34.number().int().min(0).max(1e4) }).strict())();
4896
- var reservationSchema = /* @__PURE__ */ (() => z34.object({
4922
+ var stockSchema = /* @__PURE__ */ (() => z35.object({ item: identifier, quantity: z35.number().int().min(0).max(1e4) }).strict())();
4923
+ var reservationSchema = /* @__PURE__ */ (() => z35.object({
4897
4924
  actionId: identifier,
4898
4925
  member: identifier,
4899
4926
  item: identifier,
4900
4927
  balance: identifier,
4901
- price: z34.number().int().positive().max(1e4)
4928
+ price: z35.number().int().positive().max(1e4)
4902
4929
  }).strict())();
4903
4930
  var pageOptions = /* @__PURE__ */ (() => ({
4904
- limit: z34.number().int().min(1).max(100).default(25),
4905
- cursor: z34.string().min(1).max(4096).optional()
4931
+ limit: z35.number().int().min(1).max(100).default(25),
4932
+ cursor: z35.string().min(1).max(4096).optional()
4906
4933
  }))();
4907
- var reviewListSchema = /* @__PURE__ */ (() => z34.object({
4934
+ var reviewListSchema = /* @__PURE__ */ (() => z35.object({
4908
4935
  ...pageOptions,
4909
4936
  member: identifier.optional(),
4910
4937
  quest: identifier.optional()
4911
4938
  }).strict())();
4912
- var memberListSchema = /* @__PURE__ */ (() => z34.object({
4939
+ var memberListSchema = /* @__PURE__ */ (() => z35.object({
4913
4940
  ...pageOptions,
4914
4941
  prefix: identifier.optional()
4915
4942
  }).strict())();
4916
- var reviewItemSchema = /* @__PURE__ */ (() => z34.object({
4943
+ var reviewItemSchema = /* @__PURE__ */ (() => z35.object({
4917
4944
  attempt: attemptSchema,
4918
- title: z34.string(),
4919
- checks: z34.array(
4920
- z34.object({ criteria: z34.string(), result: photoResultSchema })
4945
+ title: z35.string(),
4946
+ checks: z35.array(
4947
+ z35.object({ criteria: z35.string(), result: photoResultSchema })
4921
4948
  )
4922
4949
  }))();
4923
- var reviewPageSchema = /* @__PURE__ */ (() => z34.object({
4924
- items: z34.array(reviewItemSchema).max(100),
4925
- nextCursor: z34.string().nullable()
4950
+ var reviewPageSchema = /* @__PURE__ */ (() => z35.object({
4951
+ items: z35.array(reviewItemSchema).max(100),
4952
+ nextCursor: z35.string().nullable()
4926
4953
  }))();
4927
- var memberPageSchema = /* @__PURE__ */ (() => z34.object({
4928
- items: z34.array(z34.object({ member: identifier })).max(100),
4929
- nextCursor: z34.string().nullable()
4954
+ var memberPageSchema = /* @__PURE__ */ (() => z35.object({
4955
+ items: z35.array(z35.object({ member: identifier })).max(100),
4956
+ nextCursor: z35.string().nullable()
4930
4957
  }))();
4931
- var createStockItemSchema = /* @__PURE__ */ (() => z34.object({ actionId: identifier, name: z34.string().trim().min(1).max(80) }).strict())();
4932
- var stockItemSchema = /* @__PURE__ */ (() => z34.object({ id: identifier, name: z34.string() }))();
4933
- var contentPerformanceSnapshotSchema = /* @__PURE__ */ (() => z34.strictObject({
4958
+ var createStockItemSchema = /* @__PURE__ */ (() => z35.object({ actionId: identifier, name: z35.string().trim().min(1).max(80) }).strict())();
4959
+ var stockItemSchema = /* @__PURE__ */ (() => z35.object({ id: identifier, name: z35.string() }))();
4960
+ var contentPerformanceSnapshotSchema = /* @__PURE__ */ (() => z35.strictObject({
4934
4961
  contentAttempt: identifier,
4935
4962
  observation: identifier,
4936
- observedAt: z34.number().int().safe().nonnegative(),
4963
+ observedAt: z35.number().int().safe().nonnegative(),
4937
4964
  metrics: contentMetricsSchema,
4938
4965
  rewards: rewardBundleSchema
4939
4966
  }))();
4940
4967
  var contentPerformanceQuerySchema = /* @__PURE__ */ (() => contentQualificationQuerySchema.extend({
4941
- content: z34.string().min(1).max(256)
4968
+ content: z35.string().min(1).max(256)
4942
4969
  }))();
4943
- var contentPerformancePageSchema = /* @__PURE__ */ (() => z34.strictObject({
4944
- current: z34.strictObject({
4945
- state: z34.enum([
4970
+ var contentPerformancePageSchema = /* @__PURE__ */ (() => z35.strictObject({
4971
+ current: z35.strictObject({
4972
+ state: z35.enum([
4946
4973
  "content-pending",
4947
4974
  "content-unqualified",
4948
4975
  "waiting",
@@ -4953,19 +4980,19 @@ var contentPerformancePageSchema = /* @__PURE__ */ (() => z34.strictObject({
4953
4980
  "failed",
4954
4981
  "superseded"
4955
4982
  ]),
4956
- reason: z34.string().nullable(),
4983
+ reason: z35.string().nullable(),
4957
4984
  contentAttempt: identifier,
4958
4985
  attempt: identifier.nullable(),
4959
4986
  reward: contentQualificationSchema.shape.reward
4960
4987
  }),
4961
- items: z34.array(
4962
- z34.strictObject({
4988
+ items: z35.array(
4989
+ z35.strictObject({
4963
4990
  attempt: identifier,
4964
4991
  contentAttempt: identifier,
4965
4992
  observation: identifier,
4966
- observedAt: z34.number(),
4993
+ observedAt: z35.number(),
4967
4994
  metrics: contentMetricsSchema,
4968
- state: z34.enum([
4995
+ state: z35.enum([
4969
4996
  "pending",
4970
4997
  "qualified",
4971
4998
  "unqualified",
@@ -4973,43 +5000,43 @@ var contentPerformancePageSchema = /* @__PURE__ */ (() => z34.strictObject({
4973
5000
  "failed",
4974
5001
  "superseded"
4975
5002
  ]),
4976
- reason: z34.string().nullable()
5003
+ reason: z35.string().nullable()
4977
5004
  })
4978
5005
  ),
4979
5006
  nextCursor: pageCursorSchema.nullable()
4980
5007
  }))();
4981
5008
 
4982
5009
  // src/point-ledgers.ts
4983
- import * as z35 from "zod";
4984
- var pointLedgerPropertiesSchema = /* @__PURE__ */ (() => z35.object({
4985
- name: z35.string().trim().min(1).max(120),
4986
- description: z35.string().trim().max(1e3).default("")
5010
+ import * as z36 from "zod";
5011
+ var pointLedgerPropertiesSchema = /* @__PURE__ */ (() => z36.object({
5012
+ name: z36.string().trim().min(1).max(120),
5013
+ description: z36.string().trim().max(1e3).default("")
4987
5014
  }).strict())();
4988
5015
  var createPointLedgerSchema = /* @__PURE__ */ (() => pointLedgerPropertiesSchema.extend({ actionId: identifier, key: identifier.optional() }).strict())();
4989
5016
  var pointLedgerSchema = /* @__PURE__ */ (() => pointLedgerPropertiesSchema.extend({
4990
5017
  id: identifier
4991
5018
  }))();
4992
5019
  var managedPointLedgerSchema = /* @__PURE__ */ (() => pointLedgerSchema.extend({
4993
- archivedAt: z35.number().int().nonnegative().nullable()
5020
+ archivedAt: z36.number().int().nonnegative().nullable()
4994
5021
  }))();
4995
5022
  var pointLedgerDeclarationSchema = /* @__PURE__ */ (() => pointLedgerPropertiesSchema.extend({ key: identifier }).strict())();
4996
- var pointLedgerArtifactSchema = /* @__PURE__ */ (() => z35.union([
5023
+ var pointLedgerArtifactSchema = /* @__PURE__ */ (() => z36.union([
4997
5024
  pointLedgerDeclarationSchema,
4998
- z35.object({ code: z35.string().min(1).max(2e6) }).strict()
5025
+ z36.object({ code: z36.string().min(1).max(2e6) }).strict()
4999
5026
  ]))();
5000
- var pointLedgerReferenceSchema = /* @__PURE__ */ (() => z35.object({
5027
+ var pointLedgerReferenceSchema = /* @__PURE__ */ (() => z36.object({
5001
5028
  id: identifier,
5002
5029
  key: identifier.nullable(),
5003
- name: z35.string()
5030
+ name: z36.string()
5004
5031
  }))();
5005
- var points = /* @__PURE__ */ (() => z35.number().int().safe())();
5006
- var pointBalanceSchema = /* @__PURE__ */ (() => z35.object({
5032
+ var points = /* @__PURE__ */ (() => z36.number().int().safe())();
5033
+ var pointBalanceSchema = /* @__PURE__ */ (() => z36.object({
5007
5034
  ledger: pointLedgerReferenceSchema,
5008
5035
  balance: points,
5009
5036
  available: points
5010
5037
  }))();
5011
- var pointBalancesSchema = /* @__PURE__ */ (() => z35.object({
5012
- items: z35.array(pointBalanceSchema)
5038
+ var pointBalancesSchema = /* @__PURE__ */ (() => z36.object({
5039
+ items: z36.array(pointBalanceSchema)
5013
5040
  }))();
5014
5041
  var PointEntryKind = {
5015
5042
  /** Points a quest completion, an engagement settlement or an operator awarded. */
@@ -5021,8 +5048,8 @@ var PointEntryKind = {
5021
5048
  /** Undoes part or all of an award or a positive adjustment (`reverses`). */
5022
5049
  Reverse: "reverse"
5023
5050
  };
5024
- var pointEntryKindSchema = /* @__PURE__ */ (() => z35.string().min(1).max(64))();
5025
- var pointEntrySchema = /* @__PURE__ */ (() => z35.object({
5051
+ var pointEntryKindSchema = /* @__PURE__ */ (() => z36.string().min(1).max(64))();
5052
+ var pointEntrySchema = /* @__PURE__ */ (() => z36.object({
5026
5053
  id: identifier,
5027
5054
  amount: points,
5028
5055
  kind: pointEntryKindSchema,
@@ -5034,29 +5061,29 @@ var pointEntrySchema = /* @__PURE__ */ (() => z35.object({
5034
5061
  * True for an opening balance a member import recorded (an `adjust`). Absent from Relay
5035
5062
  * versions without imports.
5036
5063
  */
5037
- imported: z35.boolean().optional()
5064
+ imported: z36.boolean().optional()
5038
5065
  }))();
5039
- var pointHistoryQuerySchema = /* @__PURE__ */ (() => z35.strictObject({
5066
+ var pointHistoryQuerySchema = /* @__PURE__ */ (() => z36.strictObject({
5040
5067
  ledger: identifier,
5041
5068
  cursor: pageCursorSchema.optional()
5042
5069
  }))();
5043
- var pointHistoryPageSchema = /* @__PURE__ */ (() => z35.object({
5044
- items: z35.array(pointEntrySchema),
5070
+ var pointHistoryPageSchema = /* @__PURE__ */ (() => z36.object({
5071
+ items: z36.array(pointEntrySchema),
5045
5072
  nextCursor: pageCursorSchema.nullable()
5046
5073
  }))();
5047
5074
 
5048
5075
  // src/profiles.ts
5049
- import * as z36 from "zod";
5050
- var count3 = /* @__PURE__ */ (() => z36.number().int().nonnegative().safe())();
5051
- var profileVisibilitySchema = /* @__PURE__ */ (() => z36.enum([
5076
+ import * as z37 from "zod";
5077
+ var count3 = /* @__PURE__ */ (() => z37.number().int().nonnegative().safe())();
5078
+ var profileVisibilitySchema = /* @__PURE__ */ (() => z37.enum([
5052
5079
  "private",
5053
5080
  "participants",
5054
5081
  "public"
5055
5082
  ]))();
5056
- var avatarProviderSchema = /* @__PURE__ */ (() => z36.enum(["x", "discord", "google"]))();
5057
- var profileDefaultProviderSchema = /* @__PURE__ */ (() => z36.enum(["x", "discord"]))();
5083
+ var avatarProviderSchema = /* @__PURE__ */ (() => z37.enum(["x", "discord", "google"]))();
5084
+ var profileDefaultProviderSchema = /* @__PURE__ */ (() => z37.enum(["x", "discord"]))();
5058
5085
  function orderedSources(sources) {
5059
- return z36.array(sources).max(sources.options.length).refine(
5086
+ return z37.array(sources).max(sources.options.length).refine(
5060
5087
  (values2) => new Set(values2).size === values2.length,
5061
5088
  "List each provider once"
5062
5089
  );
@@ -5066,46 +5093,46 @@ var profileDefaultsSchema = /* @__PURE__ */ (() => orderedSources(
5066
5093
  ))();
5067
5094
  var knownProfileDefaultSources = ["x", "discord", "sol"];
5068
5095
  var profileDefaultSourcesSchema = /* @__PURE__ */ (() => orderedSources(
5069
- z36.enum(knownProfileDefaultSources)
5096
+ z37.enum(knownProfileDefaultSources)
5070
5097
  ))();
5071
- var profileNameSourceSchema = /* @__PURE__ */ (() => z36.enum(["sol"]))();
5072
- var openValue = /* @__PURE__ */ (() => z36.string().min(1).max(64))();
5073
- var avatarSeedSchema = /* @__PURE__ */ (() => z36.string().min(1).max(100))();
5074
- var profileAvatarSchema = /* @__PURE__ */ (() => z36.discriminatedUnion("source", [
5075
- z36.object({
5076
- source: z36.literal("upload"),
5077
- url: z36.string().url(),
5098
+ var profileNameSourceSchema = /* @__PURE__ */ (() => z37.enum(["sol"]))();
5099
+ var openValue = /* @__PURE__ */ (() => z37.string().min(1).max(64))();
5100
+ var avatarSeedSchema = /* @__PURE__ */ (() => z37.string().min(1).max(100))();
5101
+ var profileAvatarSchema = /* @__PURE__ */ (() => z37.discriminatedUnion("source", [
5102
+ z37.object({
5103
+ source: z37.literal("upload"),
5104
+ url: z37.string().url(),
5078
5105
  seed: avatarSeedSchema
5079
5106
  }),
5080
- z36.object({
5081
- source: z36.literal("account"),
5107
+ z37.object({
5108
+ source: z37.literal("account"),
5082
5109
  provider: avatarProviderSchema,
5083
- url: z36.string().url(),
5110
+ url: z37.string().url(),
5084
5111
  seed: avatarSeedSchema
5085
5112
  }),
5086
- z36.object({ source: z36.literal("generated"), seed: avatarSeedSchema })
5113
+ z37.object({ source: z37.literal("generated"), seed: avatarSeedSchema })
5087
5114
  ]))();
5088
- var profileSummarySchema = /* @__PURE__ */ (() => z36.object({
5115
+ var profileSummarySchema = /* @__PURE__ */ (() => z37.object({
5089
5116
  id: identifier,
5090
- name: z36.string(),
5117
+ name: z37.string(),
5091
5118
  avatar: profileAvatarSchema
5092
5119
  }))();
5093
5120
  var invisible = /[\p{Cc}؜᠎​-‏‪-‮⁠-⁤⁦-⁩]/u;
5094
- var displayNameSchema = /* @__PURE__ */ (() => z36.string().max(200).transform((value) => value.normalize("NFC").replace(/\s+/g, " ").trim()).pipe(
5095
- z36.string().min(1, "Enter a name").max(40, "Use at most 40 characters").refine((value) => !invisible.test(value), "Use visible characters only")
5121
+ var displayNameSchema = /* @__PURE__ */ (() => z37.string().max(200).transform((value) => value.normalize("NFC").replace(/\s+/g, " ").trim()).pipe(
5122
+ z37.string().min(1, "Enter a name").max(40, "Use at most 40 characters").refine((value) => !invisible.test(value), "Use visible characters only")
5096
5123
  ))();
5097
- var profileUpdateSchema = /* @__PURE__ */ (() => z36.object({
5124
+ var profileUpdateSchema = /* @__PURE__ */ (() => z37.object({
5098
5125
  displayName: displayNameSchema.nullable().optional(),
5099
5126
  /** @experimental A minor release can change `.sol` names. */
5100
5127
  nameSource: profileNameSourceSchema.nullable().optional(),
5101
- avatar: z36.discriminatedUnion("source", [
5102
- z36.object({
5103
- source: z36.literal("account"),
5128
+ avatar: z37.discriminatedUnion("source", [
5129
+ z37.object({
5130
+ source: z37.literal("account"),
5104
5131
  provider: avatarProviderSchema
5105
5132
  }).strict(),
5106
- z36.object({ source: z36.literal("generated") }).strict()
5133
+ z37.object({ source: z37.literal("generated") }).strict()
5107
5134
  ]).nullable().optional(),
5108
- hidden: z36.boolean().optional()
5135
+ hidden: z37.boolean().optional()
5109
5136
  }).strict().refine(
5110
5137
  (value) => Object.values(value).some((field) => field !== void 0),
5111
5138
  "Change at least one field"
@@ -5115,27 +5142,27 @@ var profileUpdateSchema = /* @__PURE__ */ (() => z36.object({
5115
5142
  }))();
5116
5143
  var ownProfileSchema = /* @__PURE__ */ (() => profileSummarySchema.extend({
5117
5144
  /** The name the member chose, or null for the default. */
5118
- displayName: z36.string().nullable(),
5145
+ displayName: z37.string().nullable(),
5119
5146
  /** The avatar the member chose: `default` follows the project's defaults. */
5120
- avatarChoice: z36.enum(["default", "upload", "account", "generated"]),
5147
+ avatarChoice: z37.enum(["default", "upload", "account", "generated"]),
5121
5148
  /** The account of an `account` choice. */
5122
5149
  avatarProvider: avatarProviderSchema.nullable(),
5123
- hidden: z36.boolean(),
5150
+ hidden: z37.boolean(),
5124
5151
  /** An operator locked the name and avatar; the member can still hide the profile. */
5125
- locked: z36.boolean(),
5152
+ locked: z37.boolean(),
5126
5153
  /** Who can see profiles in this project, so the app can explain it. */
5127
5154
  visibility: profileVisibilitySchema,
5128
5155
  /** The member's connected accounts a picture or name can come from. */
5129
- options: z36.array(
5130
- z36.object({
5156
+ options: z37.array(
5157
+ z37.object({
5131
5158
  provider: avatarProviderSchema,
5132
- name: z36.string().nullable(),
5159
+ name: z37.string().nullable(),
5133
5160
  /**
5134
5161
  * The account's first name, where the provider sends one (Google does; X and Discord don't).
5135
5162
  * Only the member's own profile carries it.
5136
5163
  */
5137
- givenName: z36.string().nullable().default(null),
5138
- imageUrl: z36.string().url().nullable()
5164
+ givenName: z37.string().nullable().default(null),
5165
+ imageUrl: z37.string().url().nullable()
5139
5166
  })
5140
5167
  ),
5141
5168
  /**
@@ -5151,38 +5178,38 @@ var ownProfileSchema = /* @__PURE__ */ (() => profileSummarySchema.extend({
5151
5178
  *
5152
5179
  * @experimental A minor release can change `.sol` names.
5153
5180
  */
5154
- nameOptions: z36.array(z36.object({ source: openValue, name: z36.string() })).optional()
5181
+ nameOptions: z37.array(z37.object({ source: openValue, name: z37.string() })).optional()
5155
5182
  }))();
5156
- var cursor = /* @__PURE__ */ (() => z36.string().min(1).max(512))();
5157
- var profileCompletionQuerySchema = /* @__PURE__ */ (() => z36.object({
5158
- limit: z36.coerce.number().int().min(1).max(100).default(20),
5183
+ var cursor = /* @__PURE__ */ (() => z37.string().min(1).max(512))();
5184
+ var profileCompletionQuerySchema = /* @__PURE__ */ (() => z37.object({
5185
+ limit: z37.coerce.number().int().min(1).max(100).default(20),
5159
5186
  cursor: cursor.optional()
5160
5187
  }).strict())();
5161
- var profileCompletionSchema = /* @__PURE__ */ (() => z36.object({
5188
+ var profileCompletionSchema = /* @__PURE__ */ (() => z37.object({
5162
5189
  quest: identifier,
5163
5190
  key: identifier.optional(),
5164
- title: z36.string(),
5191
+ title: z37.string(),
5165
5192
  completions: count3.positive(),
5166
5193
  /** Null for completions recorded before completion times were. */
5167
5194
  lastCompletedAt: count3.nullable()
5168
5195
  }))();
5169
- var profileCompletionPageSchema = /* @__PURE__ */ (() => z36.object({
5170
- items: z36.array(profileCompletionSchema),
5196
+ var profileCompletionPageSchema = /* @__PURE__ */ (() => z37.object({
5197
+ items: z37.array(profileCompletionSchema),
5171
5198
  nextCursor: cursor.nullable()
5172
5199
  }))();
5173
- var profileReferralSchema = /* @__PURE__ */ (() => z36.object({
5200
+ var profileReferralSchema = /* @__PURE__ */ (() => z37.object({
5174
5201
  program: identifier,
5175
5202
  key: identifier.optional(),
5176
- title: z36.string(),
5203
+ title: z37.string(),
5177
5204
  /** Members this member invited. Invitations are shared by every program. */
5178
5205
  invited: count3,
5179
5206
  /** Invited members who qualified in this program. */
5180
5207
  qualified: count3,
5181
- milestones: z36.array(
5182
- z36.object({ id: identifier, count: count3, reached: z36.boolean() })
5208
+ milestones: z37.array(
5209
+ z37.object({ id: identifier, count: count3, reached: z37.boolean() })
5183
5210
  )
5184
5211
  }))();
5185
- var profileSettingsSchema = /* @__PURE__ */ (() => z36.object({
5212
+ var profileSettingsSchema = /* @__PURE__ */ (() => z37.object({
5186
5213
  visibility: profileVisibilitySchema,
5187
5214
  /** The `defaultSources` that are accounts, in order: `.sol` names are left out. */
5188
5215
  defaults: profileDefaultsSchema,
@@ -5192,9 +5219,9 @@ var profileSettingsSchema = /* @__PURE__ */ (() => z36.object({
5192
5219
  *
5193
5220
  * @experimental A minor release can change `.sol` names.
5194
5221
  */
5195
- defaultSources: z36.array(openValue).optional(),
5222
+ defaultSources: z37.array(openValue).optional(),
5196
5223
  revision: count3,
5197
- actor: z36.string().nullable(),
5224
+ actor: z37.string().nullable(),
5198
5225
  updatedAt: count3.nullable()
5199
5226
  }))();
5200
5227
  var profileSettingsInputSchema = /* @__PURE__ */ (() => profileSettingsSchema.omit({
@@ -5214,7 +5241,7 @@ var profileSettingsInputSchema = /* @__PURE__ */ (() => profileSettingsSchema.om
5214
5241
  actionId: identifier,
5215
5242
  /** The revision the change was made against; a newer one is a 409. */
5216
5243
  expectedRevision: count3,
5217
- reason: z36.string().trim().min(1).max(500)
5244
+ reason: z37.string().trim().min(1).max(500)
5218
5245
  }).strict().refine(
5219
5246
  (value) => !value.defaultSources || value.defaultSources.filter((source) => source !== "sol").join() === value.defaults.join(),
5220
5247
  {
@@ -5222,13 +5249,13 @@ var profileSettingsInputSchema = /* @__PURE__ */ (() => profileSettingsSchema.om
5222
5249
  path: ["defaults"]
5223
5250
  }
5224
5251
  ))();
5225
- var profileModerationSchema = /* @__PURE__ */ (() => z36.object({
5252
+ var profileModerationSchema = /* @__PURE__ */ (() => z37.object({
5226
5253
  actionId: identifier,
5227
- resetName: z36.boolean().default(false),
5228
- removeAvatar: z36.boolean().default(false),
5254
+ resetName: z37.boolean().default(false),
5255
+ removeAvatar: z37.boolean().default(false),
5229
5256
  /** True locks the name and avatar, false unlocks them. */
5230
- lock: z36.boolean().optional(),
5231
- reason: z36.string().trim().min(1).max(1e3)
5257
+ lock: z37.boolean().optional(),
5258
+ reason: z37.string().trim().min(1).max(1e3)
5232
5259
  }).strict().refine(
5233
5260
  (value) => value.resetName || value.removeAvatar || value.lock !== void 0,
5234
5261
  "Choose an action"
@@ -5236,59 +5263,59 @@ var profileModerationSchema = /* @__PURE__ */ (() => z36.object({
5236
5263
  var managedProfileSchema = /* @__PURE__ */ (() => ownProfileSchema.omit({ options: true, nameOptions: true }).extend({
5237
5264
  member: identifier,
5238
5265
  lockedAt: count3.nullable(),
5239
- lockedBy: z36.string().nullable(),
5240
- lockedReason: z36.string().nullable(),
5266
+ lockedBy: z37.string().nullable(),
5267
+ lockedReason: z37.string().nullable(),
5241
5268
  updatedAt: count3
5242
5269
  }))();
5243
5270
  var AVATAR_UPLOAD_LIMIT = 5 * 1024 * 1024;
5244
5271
  var avatarUploadTypes = ["image/jpeg", "image/png", "image/webp"];
5245
5272
 
5246
5273
  // src/leaderboards.ts
5247
- import * as z37 from "zod";
5248
- var integer = /* @__PURE__ */ (() => z37.number().int().safe())();
5274
+ import * as z38 from "zod";
5275
+ var integer = /* @__PURE__ */ (() => z38.number().int().safe())();
5249
5276
  var timestamp6 = /* @__PURE__ */ (() => integer.nonnegative().max(864e13))();
5250
- var leaderboardWindowSchema = /* @__PURE__ */ (() => z37.discriminatedUnion("kind", [
5251
- z37.object({ kind: z37.literal("all-time") }).strict(),
5252
- z37.object({ kind: z37.literal("fixed"), start: timestamp6, end: timestamp6 }).strict().refine((w) => w.end > w.start, "Window end must follow its start"),
5253
- z37.object({ kind: z37.literal("rolling"), days: integer.min(1).max(3660) }).strict(),
5277
+ var leaderboardWindowSchema = /* @__PURE__ */ (() => z38.discriminatedUnion("kind", [
5278
+ z38.object({ kind: z38.literal("all-time") }).strict(),
5279
+ z38.object({ kind: z38.literal("fixed"), start: timestamp6, end: timestamp6 }).strict().refine((w) => w.end > w.start, "Window end must follow its start"),
5280
+ z38.object({ kind: z38.literal("rolling"), days: integer.min(1).max(3660) }).strict(),
5254
5281
  // Not strict: boards published while a calendar window named its own `timeZone` keep reading,
5255
5282
  // and the field drops on parse. The authoring schema refuses it.
5256
- z37.object({
5257
- kind: z37.literal("calendar"),
5283
+ z38.object({
5284
+ kind: z38.literal("calendar"),
5258
5285
  /** The current day, week (ISO, starting on Monday) or month of the project calendar. */
5259
5286
  period: calendarPeriodSchema.exclude(["lifetime"])
5260
5287
  })
5261
5288
  ]))();
5262
5289
  var periodScore = /* @__PURE__ */ (() => ({
5263
5290
  window: leaderboardWindowSchema.default({ kind: "all-time" }),
5264
- quests: z37.array(identifier).min(1).max(100).optional()
5291
+ quests: z38.array(identifier).min(1).max(100).optional()
5265
5292
  }))();
5266
- var scoreSchema = /* @__PURE__ */ (() => z37.discriminatedUnion("kind", [
5267
- z37.object({ kind: z37.literal("balance") }).strict(),
5268
- z37.object({ kind: z37.literal("earned"), ...periodScore }).strict(),
5269
- z37.object({
5270
- kind: z37.literal("net"),
5293
+ var scoreSchema = /* @__PURE__ */ (() => z38.discriminatedUnion("kind", [
5294
+ z38.object({ kind: z38.literal("balance") }).strict(),
5295
+ z38.object({ kind: z38.literal("earned"), ...periodScore }).strict(),
5296
+ z38.object({
5297
+ kind: z38.literal("net"),
5271
5298
  window: leaderboardWindowSchema.default({ kind: "all-time" })
5272
5299
  }).strict()
5273
5300
  ]).default({ kind: "balance" }))();
5274
- var leaderboardPrizeRewardSchema = /* @__PURE__ */ (() => z37.union([
5301
+ var leaderboardPrizeRewardSchema = /* @__PURE__ */ (() => z38.union([
5275
5302
  pointsRewardSchema,
5276
5303
  tierRewardSchema
5277
5304
  ]))();
5278
- var leaderboardPrizeSchema = /* @__PURE__ */ (() => z37.object({
5279
- ranks: z37.tuple([integer.positive(), integer.positive()]).refine(([first, last]) => last >= first, {
5305
+ var leaderboardPrizeSchema = /* @__PURE__ */ (() => z38.object({
5306
+ ranks: z38.tuple([integer.positive(), integer.positive()]).refine(([first, last]) => last >= first, {
5280
5307
  message: "Prize rank range must end at or after it starts"
5281
5308
  }),
5282
- rewards: z37.array(leaderboardPrizeRewardSchema).min(1).max(20)
5309
+ rewards: z38.array(leaderboardPrizeRewardSchema).min(1).max(20)
5283
5310
  }).strict())();
5284
- var baseUnitsSchema = /* @__PURE__ */ (() => z37.string().regex(
5311
+ var baseUnitsSchema = /* @__PURE__ */ (() => z38.string().regex(
5285
5312
  /^(0|[1-9]\d{0,77})$/,
5286
5313
  'Use a whole number of base units, such as "1000000"'
5287
5314
  ))();
5288
- var leaderboardPoolUnitSchema = /* @__PURE__ */ (() => z37.union([
5289
- z37.literal("points"),
5290
- z37.object({
5291
- code: z37.string().trim().min(1).max(32),
5315
+ var leaderboardPoolUnitSchema = /* @__PURE__ */ (() => z38.union([
5316
+ z38.literal("points"),
5317
+ z38.object({
5318
+ code: z38.string().trim().min(1).max(32),
5292
5319
  decimals: integer.min(0).max(36)
5293
5320
  }).strict()
5294
5321
  ]))();
@@ -5330,12 +5357,12 @@ var refinePool = (pool, context) => {
5330
5357
  });
5331
5358
  }
5332
5359
  };
5333
- var leaderboardPoolSchema = /* @__PURE__ */ (() => z37.object(poolShape).strict().superRefine(refinePool))();
5334
- var leaderboardSettlementPolicySchema = /* @__PURE__ */ (() => z37.object({
5335
- at: z37.literal("window-end"),
5336
- ties: z37.enum(["shared", "earliest"]),
5360
+ var leaderboardPoolSchema = /* @__PURE__ */ (() => z38.object(poolShape).strict().superRefine(refinePool))();
5361
+ var leaderboardSettlementPolicySchema = /* @__PURE__ */ (() => z38.object({
5362
+ at: z38.literal("window-end"),
5363
+ ties: z38.enum(["shared", "earliest"]),
5337
5364
  /** Rank prizes. A board with a pool may list none. */
5338
- prizes: z37.array(leaderboardPrizeSchema).max(50),
5365
+ prizes: z38.array(leaderboardPrizeSchema).max(50),
5339
5366
  pool: leaderboardPoolSchema.optional()
5340
5367
  }).strict().superRefine((policy, context) => {
5341
5368
  if (!policy.prizes.length && !policy.pool) {
@@ -5367,10 +5394,10 @@ var leaderboardSettlementPolicySchema = /* @__PURE__ */ (() => z37.object({
5367
5394
  }
5368
5395
  }
5369
5396
  }))();
5370
- var leaderboardDefinitionObject = /* @__PURE__ */ (() => z37.object({
5397
+ var leaderboardDefinitionObject = /* @__PURE__ */ (() => z38.object({
5371
5398
  id: identifier,
5372
5399
  key: identifier.optional(),
5373
- title: z37.string().trim().min(1).max(120),
5400
+ title: z38.string().trim().min(1).max(120),
5374
5401
  /**
5375
5402
  * The point ledger the leaderboard ranks members by. Named `balance` from before ledger fields
5376
5403
  * were named `ledger` (docs/management-api.md#field-names); a points pool's `ledger` is the
@@ -5378,20 +5405,20 @@ var leaderboardDefinitionObject = /* @__PURE__ */ (() => z37.object({
5378
5405
  */
5379
5406
  balance: identifier,
5380
5407
  score: scoreSchema,
5381
- access: z37.enum(["participants", "public"]).default("participants"),
5408
+ access: z38.enum(["participants", "public"]).default("participants"),
5382
5409
  group: identifier.optional(),
5383
5410
  /**
5384
5411
  * List the project's eligible members who have no qualifying points, with a score of 0, ranked
5385
5412
  * after every member who scored and ordered by member ID. Omitted or false lists only members
5386
5413
  * with a qualifying entry. Settlements never include them.
5387
5414
  */
5388
- includeUnscored: z37.boolean().optional(),
5415
+ includeUnscored: z38.boolean().optional(),
5389
5416
  /**
5390
5417
  * How the live standings order equal scores. Omitted or `"shared"`: they share a rank. With
5391
5418
  * `"earliest"`, the member whose last counted entry is earlier ranks first (then member ID), and
5392
5419
  * every scored member gets its own rank: the order `settle.ties: "earliest"` uses.
5393
5420
  */
5394
- ties: z37.enum(["shared", "earliest"]).optional(),
5421
+ ties: z38.enum(["shared", "earliest"]).optional(),
5395
5422
  settle: leaderboardSettlementPolicySchema.optional()
5396
5423
  }).strict())();
5397
5424
  var validateSettlementWindow = (definition, context) => {
@@ -5409,70 +5436,70 @@ var leaderboardDefinitionResponseSchema = /* @__PURE__ */ (() => responseShape(
5409
5436
  ))();
5410
5437
  var leaderboardAuthoringSchema = /* @__PURE__ */ (() => leaderboardDefinitionObject.omit({ id: true }).extend({
5411
5438
  ...authoringIdentityShape,
5412
- score: z37.preprocess(refuseWindowTimeZone, scoreSchema),
5439
+ score: z38.preprocess(refuseWindowTimeZone, scoreSchema),
5413
5440
  group: identifier.optional()
5414
5441
  }).strict().superRefine(validateSettlementWindow))();
5415
- var leaderboardArtifactSchema = /* @__PURE__ */ (() => z37.union([
5442
+ var leaderboardArtifactSchema = /* @__PURE__ */ (() => z38.union([
5416
5443
  leaderboardAuthoringSchema,
5417
- z37.object({ code: z37.string().min(1).max(2e6) }).strict()
5444
+ z38.object({ code: z38.string().min(1).max(2e6) }).strict()
5418
5445
  ]))();
5419
- var publishedLeaderboardSchema = /* @__PURE__ */ (() => z37.object({
5420
- archivedAt: z37.number().int().nonnegative().nullable().optional(),
5446
+ var publishedLeaderboardSchema = /* @__PURE__ */ (() => z38.object({
5447
+ archivedAt: z38.number().int().nonnegative().nullable().optional(),
5421
5448
  version: identifier,
5422
5449
  definition: leaderboardDefinitionResponseSchema,
5423
5450
  publishedAt: timestamp6,
5424
- actor: z37.string().nullable()
5451
+ actor: z38.string().nullable()
5425
5452
  }))();
5426
- var leaderboardQuerySchema = /* @__PURE__ */ (() => z37.object({
5427
- limit: z37.coerce.number().int().min(1).max(100).default(25),
5428
- cursor: z37.string().max(4096).optional()
5453
+ var leaderboardQuerySchema = /* @__PURE__ */ (() => z38.object({
5454
+ limit: z38.coerce.number().int().min(1).max(100).default(25),
5455
+ cursor: z38.string().max(4096).optional()
5429
5456
  }).strict())();
5430
- var leaderboardRowSchema = /* @__PURE__ */ (() => z37.object({
5457
+ var leaderboardRowSchema = /* @__PURE__ */ (() => z38.object({
5431
5458
  /** The row's stable key: a pseudonym per board and member. */
5432
5459
  participant: identifier,
5433
5460
  member: identifier.optional(),
5434
5461
  /** The profile's name where the viewer can see it, otherwise the pseudonym's. */
5435
- name: z37.string(),
5462
+ name: z38.string(),
5436
5463
  score: integer,
5437
5464
  rank: integer.positive(),
5438
5465
  /** The member's profile, where visible to this viewer and not hidden by the member. */
5439
5466
  profile: profileSummarySchema.nullable()
5440
5467
  }))();
5441
- var leaderboardPageSchema = /* @__PURE__ */ (() => z37.object({
5468
+ var leaderboardPageSchema = /* @__PURE__ */ (() => z38.object({
5442
5469
  leaderboard: identifier,
5443
- title: z37.string(),
5470
+ title: z38.string(),
5444
5471
  version: identifier,
5445
- calculation: z37.enum(["balance", "earned", "net"]),
5446
- period: z37.object({ start: timestamp6.nullable(), end: timestamp6.nullable() }),
5472
+ calculation: z38.enum(["balance", "earned", "net"]),
5473
+ period: z38.object({ start: timestamp6.nullable(), end: timestamp6.nullable() }),
5447
5474
  calculatedAt: timestamp6,
5448
5475
  lastEntryAt: timestamp6.nullable(),
5449
5476
  total: integer.nonnegative(),
5450
- items: z37.array(leaderboardRowSchema),
5477
+ items: z38.array(leaderboardRowSchema),
5451
5478
  me: leaderboardRowSchema.nullable(),
5452
- nearby: z37.array(leaderboardRowSchema),
5453
- nextCursor: z37.string().nullable()
5479
+ nearby: z38.array(leaderboardRowSchema),
5480
+ nextCursor: z38.string().nullable()
5454
5481
  }))();
5455
- var leaderboardPlacementSchema = /* @__PURE__ */ (() => z37.object({
5482
+ var leaderboardPlacementSchema = /* @__PURE__ */ (() => z38.object({
5456
5483
  leaderboard: identifier,
5457
5484
  key: identifier.optional(),
5458
- title: z37.string(),
5485
+ title: z38.string(),
5459
5486
  profile: identifier,
5460
5487
  rank: integer.positive().nullable(),
5461
5488
  score: integer.nullable(),
5462
5489
  /** Ranked participants on the board. */
5463
5490
  total: integer.nonnegative()
5464
5491
  }))();
5465
- var leaderboardHistoryQuerySchema = /* @__PURE__ */ (() => z37.strictObject({
5492
+ var leaderboardHistoryQuerySchema = /* @__PURE__ */ (() => z38.strictObject({
5466
5493
  board: identifier,
5467
5494
  cursor: pageCursorSchema.optional()
5468
5495
  }))();
5469
- var leaderboardHistoryPageSchema = /* @__PURE__ */ (() => z37.object({
5496
+ var leaderboardHistoryPageSchema = /* @__PURE__ */ (() => z38.object({
5470
5497
  leaderboard: identifier,
5471
- period: z37.object({ start: timestamp6.nullable(), end: timestamp6.nullable() }),
5472
- items: z37.array(pointEntrySchema),
5498
+ period: z38.object({ start: timestamp6.nullable(), end: timestamp6.nullable() }),
5499
+ items: z38.array(pointEntrySchema),
5473
5500
  nextCursor: pageCursorSchema.nullable()
5474
5501
  }))();
5475
- var leaderboardPreviewSchema = /* @__PURE__ */ (() => z37.object({
5502
+ var leaderboardPreviewSchema = /* @__PURE__ */ (() => z38.object({
5476
5503
  published: publishedLeaderboardSchema,
5477
5504
  before: leaderboardPageSchema.nullable(),
5478
5505
  after: leaderboardPageSchema
@@ -5481,53 +5508,53 @@ var mutationBase = /* @__PURE__ */ (() => ({
5481
5508
  actionId: identifier,
5482
5509
  member: identifier,
5483
5510
  balance: identifier,
5484
- reason: z37.string().trim().min(1).max(1e3)
5511
+ reason: z38.string().trim().min(1).max(1e3)
5485
5512
  }))();
5486
5513
  var datedMutation = /* @__PURE__ */ (() => ({ ...mutationBase, effectiveAt: timestamp6.optional() }))();
5487
- var pointsMutationSchema = /* @__PURE__ */ (() => z37.discriminatedUnion("kind", [
5488
- z37.object({
5514
+ var pointsMutationSchema = /* @__PURE__ */ (() => z38.discriminatedUnion("kind", [
5515
+ z38.object({
5489
5516
  ...datedMutation,
5490
- kind: z37.literal("award"),
5491
- referralEligible: z37.boolean().optional(),
5517
+ kind: z38.literal("award"),
5518
+ referralEligible: z38.boolean().optional(),
5492
5519
  amount: integer.positive()
5493
5520
  }).strict(),
5494
- z37.object({
5521
+ z38.object({
5495
5522
  ...datedMutation,
5496
- kind: z37.literal("spend"),
5523
+ kind: z38.literal("spend"),
5497
5524
  amount: integer.positive()
5498
5525
  }).strict(),
5499
- z37.object({
5526
+ z38.object({
5500
5527
  ...datedMutation,
5501
- kind: z37.literal("adjust"),
5528
+ kind: z38.literal("adjust"),
5502
5529
  amount: integer.refine((n) => n !== 0)
5503
5530
  }).strict(),
5504
- z37.object({
5531
+ z38.object({
5505
5532
  ...datedMutation,
5506
- kind: z37.literal("set"),
5533
+ kind: z38.literal("set"),
5507
5534
  total: integer.nonnegative(),
5508
5535
  expectedTotal: integer.nonnegative(),
5509
- classification: z37.enum(["earned", "spend"])
5536
+ classification: z38.enum(["earned", "spend"])
5510
5537
  }).strict(),
5511
- z37.object({
5538
+ z38.object({
5512
5539
  ...mutationBase,
5513
- kind: z37.literal("reverse"),
5540
+ kind: z38.literal("reverse"),
5514
5541
  entry: identifier,
5515
5542
  amount: integer.positive()
5516
5543
  }).strict()
5517
5544
  ]))();
5518
- var pointsEntrySchema = /* @__PURE__ */ (() => z37.object({
5545
+ var pointsEntrySchema = /* @__PURE__ */ (() => z38.object({
5519
5546
  id: identifier,
5520
- completion: z37.string().nullable(),
5547
+ completion: z38.string().nullable(),
5521
5548
  member: identifier,
5522
5549
  balance: identifier,
5523
5550
  amount: integer,
5524
- kind: z37.enum(["award", "spend", "adjust", "reverse"]),
5551
+ kind: z38.enum(["award", "spend", "adjust", "reverse"]),
5525
5552
  effectiveAt: timestamp6,
5526
5553
  receivedAt: timestamp6,
5527
5554
  quest: identifier.nullable(),
5528
5555
  original: identifier.nullable(),
5529
- reason: z37.string(),
5530
- actor: z37.string().nullable(),
5556
+ reason: z38.string(),
5557
+ actor: z38.string().nullable(),
5531
5558
  /**
5532
5559
  * The member import whose opening balance this `adjust` is, or null. Imported entries emit no
5533
5560
  * `points.awarded` and count on balance leaderboards only. Absent from Relay versions without
@@ -5535,76 +5562,76 @@ var pointsEntrySchema = /* @__PURE__ */ (() => z37.object({
5535
5562
  */
5536
5563
  import: identifier.nullable().optional()
5537
5564
  }))();
5538
- var managedPointHistoryPageSchema = /* @__PURE__ */ (() => z37.object({
5539
- items: z37.array(pointsEntrySchema),
5565
+ var managedPointHistoryPageSchema = /* @__PURE__ */ (() => z38.object({
5566
+ items: z38.array(pointsEntrySchema),
5540
5567
  nextCursor: pageCursorSchema.nullable(),
5541
5568
  /** @deprecated Use `nextCursor`, passed back as `cursor`. Removed in 2.0.0. */
5542
- next: z37.number().nullable()
5569
+ next: z38.number().nullable()
5543
5570
  }))();
5544
- var pointsResultSchema = /* @__PURE__ */ (() => z37.object({
5571
+ var pointsResultSchema = /* @__PURE__ */ (() => z38.object({
5545
5572
  entry: pointsEntrySchema,
5546
5573
  total: integer.nonnegative()
5547
5574
  }))();
5548
- var pointsAccountSchema = /* @__PURE__ */ (() => z37.object({
5575
+ var pointsAccountSchema = /* @__PURE__ */ (() => z38.object({
5549
5576
  member: identifier,
5550
5577
  balance: identifier,
5551
5578
  total: integer.nonnegative(),
5552
5579
  held: integer.nonnegative()
5553
5580
  }))();
5554
- var leaderboardExclusionSchema = /* @__PURE__ */ (() => z37.object({
5581
+ var leaderboardExclusionSchema = /* @__PURE__ */ (() => z38.object({
5555
5582
  actionId: identifier,
5556
5583
  member: identifier,
5557
- excluded: z37.boolean(),
5558
- reason: z37.string().trim().min(1).max(1e3)
5584
+ excluded: z38.boolean(),
5585
+ reason: z38.string().trim().min(1).max(1e3)
5559
5586
  }).strict())();
5560
- var leaderboardExclusionGroupSchema = /* @__PURE__ */ (() => z37.object({
5587
+ var leaderboardExclusionGroupSchema = /* @__PURE__ */ (() => z38.object({
5561
5588
  leaderboard: identifier,
5562
5589
  group: identifier,
5563
- generated: z37.boolean(),
5590
+ generated: z38.boolean(),
5564
5591
  boundAt: timestamp6.nullable()
5565
5592
  }))();
5566
- var leaderboardExclusionGroupBindingSchema = /* @__PURE__ */ (() => z37.object({
5593
+ var leaderboardExclusionGroupBindingSchema = /* @__PURE__ */ (() => z38.object({
5567
5594
  actionId: identifier,
5568
5595
  group: identifier,
5569
- reason: z37.string().trim().min(1).max(1e3)
5596
+ reason: z38.string().trim().min(1).max(1e3)
5570
5597
  }).strict())();
5571
- var leaderboardGroupSchema = /* @__PURE__ */ (() => z37.object({
5598
+ var leaderboardGroupSchema = /* @__PURE__ */ (() => z38.object({
5572
5599
  actionId: identifier,
5573
5600
  member: identifier,
5574
- included: z37.boolean(),
5575
- reason: z37.string().trim().min(1).max(1e3)
5601
+ included: z38.boolean(),
5602
+ reason: z38.string().trim().min(1).max(1e3)
5576
5603
  }).strict())();
5577
- var leaderboardSettlementStatusSchema = /* @__PURE__ */ (() => z37.enum(["pending", "approved"]))();
5578
- var leaderboardSettlementSummarySchema = /* @__PURE__ */ (() => z37.object({
5604
+ var leaderboardSettlementStatusSchema = /* @__PURE__ */ (() => z38.enum(["pending", "approved"]))();
5605
+ var leaderboardSettlementSummarySchema = /* @__PURE__ */ (() => z38.object({
5579
5606
  id: identifier,
5580
5607
  leaderboard: identifier,
5581
5608
  version: identifier,
5582
- title: z37.string(),
5583
- period: z37.object({ start: timestamp6, end: timestamp6 }),
5584
- ties: z37.enum(["shared", "earliest"]),
5609
+ title: z38.string(),
5610
+ period: z38.object({ start: timestamp6, end: timestamp6 }),
5611
+ ties: z38.enum(["shared", "earliest"]),
5585
5612
  status: leaderboardSettlementStatusSchema,
5586
5613
  total: integer.nonnegative(),
5587
5614
  winners: integer.nonnegative(),
5588
5615
  createdAt: timestamp6,
5589
5616
  approvedAt: timestamp6.nullable(),
5590
- approvedBy: z37.string().nullable(),
5591
- approvalReason: z37.string().nullable()
5617
+ approvedBy: z38.string().nullable(),
5618
+ approvalReason: z38.string().nullable()
5592
5619
  }))();
5593
- var settlementPaymentSchema = /* @__PURE__ */ (() => z37.object({
5594
- status: z37.string(),
5620
+ var settlementPaymentSchema = /* @__PURE__ */ (() => z38.object({
5621
+ status: z38.string(),
5595
5622
  /** The CAIP-2 cluster of the batch that pays or paid the share; null when unpaid. */
5596
- network: z37.string().nullable(),
5623
+ network: z38.string().nullable(),
5597
5624
  /** The transaction that paid the share; null until paid. */
5598
- signature: z37.string().nullable(),
5625
+ signature: z38.string().nullable(),
5599
5626
  paidAt: timestamp6.nullable()
5600
5627
  }))();
5601
- var leaderboardSettlementRowSchema = /* @__PURE__ */ (() => z37.object({
5628
+ var leaderboardSettlementRowSchema = /* @__PURE__ */ (() => z38.object({
5602
5629
  member: identifier,
5603
5630
  score: integer,
5604
5631
  rank: integer.positive(),
5605
5632
  position: integer.positive(),
5606
5633
  scoredAt: timestamp6,
5607
- prizes: z37.array(integer.nonnegative()),
5634
+ prizes: z38.array(integer.nonnegative()),
5608
5635
  completion: identifier.nullable(),
5609
5636
  revokedAt: timestamp6.nullable(),
5610
5637
  /**
@@ -5618,33 +5645,33 @@ var leaderboardSettlementRowSchema = /* @__PURE__ */ (() => z37.object({
5618
5645
  */
5619
5646
  payment: settlementPaymentSchema.optional()
5620
5647
  }))();
5621
- var leaderboardSettlementPoolSchema = /* @__PURE__ */ (() => z37.object({
5648
+ var leaderboardSettlementPoolSchema = /* @__PURE__ */ (() => z38.object({
5622
5649
  ...poolShape,
5623
5650
  allocated: baseUnitsSchema,
5624
5651
  unallocated: baseUnitsSchema
5625
5652
  }))();
5626
- var leaderboardSettlementUnmeasuredSchema = /* @__PURE__ */ (() => z37.object({
5627
- content: z37.string(),
5653
+ var leaderboardSettlementUnmeasuredSchema = /* @__PURE__ */ (() => z38.object({
5654
+ content: z38.string(),
5628
5655
  member: identifier,
5629
5656
  /** When the last good measurement was observed, if Relay has one. */
5630
5657
  observedAt: timestamp6.nullable()
5631
5658
  }))();
5632
5659
  var leaderboardSettlementSchema = /* @__PURE__ */ (() => leaderboardSettlementSummarySchema.extend({
5633
- prizes: z37.array(leaderboardPrizeSchema),
5634
- excluded: z37.array(identifier),
5660
+ prizes: z38.array(leaderboardPrizeSchema),
5661
+ excluded: z38.array(identifier),
5635
5662
  /**
5636
5663
  * Content frozen at its last good measurement because its closing measurement never came; a
5637
5664
  * reviewer can retry measurement. Relay sends it for every settlement, empty when nothing is
5638
5665
  * missing.
5639
5666
  */
5640
- unmeasured: z37.array(leaderboardSettlementUnmeasuredSchema).optional(),
5667
+ unmeasured: z38.array(leaderboardSettlementUnmeasuredSchema).optional(),
5641
5668
  /** The settlement's pool prize, or null without one. Absent from Relay versions without pools. */
5642
5669
  pool: leaderboardSettlementPoolSchema.nullable().optional(),
5643
- rows: z37.array(leaderboardSettlementRowSchema)
5670
+ rows: z38.array(leaderboardSettlementRowSchema)
5644
5671
  }))();
5645
- var leaderboardSettlementApprovalSchema = /* @__PURE__ */ (() => z37.object({
5672
+ var leaderboardSettlementApprovalSchema = /* @__PURE__ */ (() => z38.object({
5646
5673
  actionId: identifier,
5647
- reason: z37.string().trim().min(1).max(500)
5674
+ reason: z38.string().trim().min(1).max(500)
5648
5675
  }).strict())();
5649
5676
 
5650
5677
  export {
@@ -5668,6 +5695,7 @@ export {
5668
5695
  responseListSchema,
5669
5696
  pageCursorSchema,
5670
5697
  pageLimit,
5698
+ booleanQuery,
5671
5699
  pageQuerySchema,
5672
5700
  paginate,
5673
5701
  managementStateQuerySchema,
@@ -5952,8 +5980,12 @@ export {
5952
5980
  takesSolanaTransaction,
5953
5981
  questStationsSchema,
5954
5982
  stationRefusal,
5983
+ stationCheckInSchema,
5984
+ stationCodeSubmissionSchema,
5955
5985
  solanaTransactionSubmissionSchema,
5956
5986
  attemptActionSchema,
5987
+ galleryKinds,
5988
+ questGallerySchema,
5957
5989
  resourceSourceSchema,
5958
5990
  resourceRequestSchema,
5959
5991
  resourceOptionsSchema,
@@ -6079,6 +6111,7 @@ export {
6079
6111
  evidenceSchema,
6080
6112
  errorSchema,
6081
6113
  staffDecisionSchema,
6114
+ staffReasonInputSchema,
6082
6115
  acceptAnywaySchema,
6083
6116
  evidenceRedactionInputSchema,
6084
6117
  evidenceRetentionInputSchema,