@domino-sdk/relay 1.69.0 → 1.71.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 (66) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/build.mjs +3 -0
  3. package/dist/{accounts-DD4gAOCe.d.ts → accounts-COLmXRbW.d.ts} +144 -13
  4. package/dist/{attempt-captures-CbuCmthd.d.ts → attempt-captures-CVl161qB.d.ts} +3 -2
  5. package/dist/authoring.d.ts +68 -25
  6. package/dist/authoring.js +15 -9
  7. package/dist/{automatic-outcomes-DE3vfi8g.d.ts → automatic-outcomes-5l68PGr1.d.ts} +2 -2
  8. package/dist/browser.d.ts +9 -9
  9. package/dist/browser.js +11 -9
  10. package/dist/{catalog-Cf3fHDNn.d.ts → catalog-BR3g-1H9.d.ts} +41 -2
  11. package/dist/{chunk-ME2KUAVJ.js → chunk-3KKRXN5E.js} +1 -1
  12. package/dist/{chunk-CQVKOD3B.js → chunk-74SMLZZ5.js} +723 -685
  13. package/dist/{chunk-CZ23KRVK.js → chunk-CVJTIVAP.js} +1 -1
  14. package/dist/{chunk-TCREFRPK.js → chunk-DDID5QX5.js} +153 -4
  15. package/dist/{chunk-WVK3G2J2.js → chunk-EMKYDGZ3.js} +1 -1
  16. package/dist/{chunk-2A3BJ262.js → chunk-FGZGL5PG.js} +1 -1
  17. package/dist/{chunk-GEVARKEV.js → chunk-GHBYWDEZ.js} +8 -1
  18. package/dist/{chunk-RKTMSTT7.js → chunk-HN7DE2UN.js} +2 -2
  19. package/dist/{chunk-LGGD7S5T.js → chunk-IDG2VPYG.js} +32 -6
  20. package/dist/{chunk-SWLW4VN3.js → chunk-KC4UB4ZX.js} +1 -1
  21. package/dist/{chunk-ODJGTFPY.js → chunk-KIRXE37T.js} +6 -6
  22. package/dist/{chunk-VAGGGB6B.js → chunk-MDSSIOBC.js} +58 -1
  23. package/dist/{chunk-BRROI4CH.js → chunk-OFSJYXGI.js} +12 -4
  24. package/dist/{chunk-LZXDYSUH.js → chunk-PYZSCFMJ.js} +4 -0
  25. package/dist/{chunk-UGM6DUB2.js → chunk-QMKTYPK6.js} +4 -3
  26. package/dist/{chunk-PO2ZDY27.js → chunk-TW4RABVS.js} +1 -1
  27. package/dist/{chunk-AZDZEQFK.js → chunk-UEVZ3TST.js} +29 -2
  28. package/dist/{chunk-DIXYVGXO.js → chunk-VFHLMNYV.js} +1 -1
  29. package/dist/{chunk-WNEQEDMU.js → chunk-W6DBNBMT.js} +2 -2
  30. package/dist/{client-6eSYOl8h.d.ts → client-B__hMWtK.d.ts} +104 -7
  31. package/dist/{dashboards-DCOAXL54.d.ts → dashboards-DXpjHnq-.d.ts} +3 -3
  32. package/dist/{deployments-BIfdCMd5.d.ts → deployments-CT2kQloT.d.ts} +199 -3
  33. package/dist/{identity-integration-BlfOn8rc.d.ts → identity-integration-ClX4oUAu.d.ts} +4 -4
  34. package/dist/index.d.ts +10 -10
  35. package/dist/index.js +7 -7
  36. package/dist/internal.d.ts +44 -26
  37. package/dist/internal.js +26 -50
  38. package/dist/{limits-Ctaeq23J.d.ts → limits-B7wbnWhd.d.ts} +1 -1
  39. package/dist/{offers-COqHGbHm.d.ts → offers-D4pyeY9b.d.ts} +2 -2
  40. package/dist/portal-proxy.d.ts +2 -2
  41. package/dist/portal-proxy.js +11 -10
  42. package/dist/react/index.d.ts +31 -12
  43. package/dist/react/index.js +116 -41
  44. package/dist/{reward-deliveries-DFhYGJdx.d.ts → reward-deliveries-HGpj1VFz.d.ts} +1 -1
  45. package/dist/runtime/authoring.js +1 -1
  46. package/dist/runtime/chunks/A7G5P76B.js +1 -0
  47. package/dist/runtime/manifest.json +3 -3
  48. package/dist/runtime/schema.js +1 -1
  49. package/dist/schema.d.ts +40 -16
  50. package/dist/schema.js +9 -7
  51. package/dist/server/index.d.ts +12 -12
  52. package/dist/server/index.js +944 -579
  53. package/dist/{sign-in-providers-C97mRNbG.d.ts → sign-in-providers-lbOXCF8N.d.ts} +2 -2
  54. package/dist/solana.d.ts +12 -12
  55. package/dist/solana.js +8 -8
  56. package/dist/{telegram-browser-gRMgGs7B.d.ts → station-check-in-qBiaftfE.d.ts} +89 -7
  57. package/dist/{submission-input-BD7nORuh.d.ts → submission-input-U4aIkJuT.d.ts} +2 -2
  58. package/dist/telegram.d.ts +7 -7
  59. package/dist/testing.d.ts +15 -11
  60. package/dist/testing.js +23 -12
  61. package/dist/{tracker-data-DQgX3FIc.d.ts → tracker-data-2BYXZjsN.d.ts} +3 -3
  62. package/dist/{transport-BLU8jrhg.d.ts → transport-fszraZPi.d.ts} +1736 -19
  63. package/dist/{wallet-CPAjrW4k.d.ts → wallet-BqswMAqZ.d.ts} +3 -1
  64. package/dist/{wallet-browser-BzPt_Qb5.d.ts → wallet-browser-B5r7u3xB.d.ts} +1 -1
  65. package/package.json +1 -1
  66. package/dist/runtime/chunks/HKAI5OQA.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  attemptCaptureSchema,
3
3
  capturedFactSchema
4
- } from "../chunk-GEVARKEV.js";
4
+ } from "../chunk-GHBYWDEZ.js";
5
5
  import {
6
6
  PayoutSourceKind,
7
7
  RestoredDeliveryOutcome,
@@ -41,7 +41,7 @@ import {
41
41
  webhookStatePageSchema,
42
42
  webhookStateQuerySchema,
43
43
  webhookUpdateSchema
44
- } from "../chunk-WNEQEDMU.js";
44
+ } from "../chunk-W6DBNBMT.js";
45
45
  import {
46
46
  DEFAULT_MANAGEMENT_TIMEOUT,
47
47
  ManagementError,
@@ -51,6 +51,7 @@ import {
51
51
  actionIdOf,
52
52
  canonicalWalletAddress,
53
53
  containsReferralIntegrationReward,
54
+ csvLines,
54
55
  hex,
55
56
  isManagementError,
56
57
  managementErrorSchema,
@@ -59,16 +60,16 @@ import {
59
60
  sequenceCursorSchema,
60
61
  solanaRpc,
61
62
  walletSignatureValid
62
- } from "../chunk-BRROI4CH.js";
63
+ } from "../chunk-OFSJYXGI.js";
63
64
  import {
64
65
  parseImageExtraction,
65
66
  parseImageResult
66
- } from "../chunk-RKTMSTT7.js";
67
+ } from "../chunk-HN7DE2UN.js";
67
68
  import {
68
69
  sourceDataSchema,
69
70
  sourceRoles,
70
71
  validateQuestShape
71
- } from "../chunk-AZDZEQFK.js";
72
+ } from "../chunk-UEVZ3TST.js";
72
73
  import {
73
74
  APP_KV_LIMIT,
74
75
  APP_MIGRATION_FILE_BYTES,
@@ -197,13 +198,13 @@ import {
197
198
  starterTemplates,
198
199
  starters,
199
200
  verifyScheduledRequest
200
- } from "../chunk-UGM6DUB2.js";
201
+ } from "../chunk-QMKTYPK6.js";
201
202
  import {
202
203
  isIntegrationParticipantPath,
203
204
  isParticipantRoute,
204
205
  participantRoutePattern,
205
206
  participantRoutes
206
- } from "../chunk-LZXDYSUH.js";
207
+ } from "../chunk-PYZSCFMJ.js";
207
208
  import {
208
209
  activityTypeSchema,
209
210
  activityTypes,
@@ -229,12 +230,12 @@ import {
229
230
  publishDeploymentSchema,
230
231
  rejectDeploymentSchema,
231
232
  submitDeploymentSchema
232
- } from "../chunk-ODJGTFPY.js";
233
+ } from "../chunk-KIRXE37T.js";
233
234
  import {
234
235
  xUserLookupInputSchema,
235
236
  xUserSchema,
236
237
  xUsernameSchema
237
- } from "../chunk-DIXYVGXO.js";
238
+ } from "../chunk-VFHLMNYV.js";
238
239
  import {
239
240
  analyticsBreakdowns,
240
241
  analyticsCatalog,
@@ -249,15 +250,15 @@ import {
249
250
  analyticsRanges,
250
251
  analyticsReadSchema,
251
252
  dashboardDefinitionSchema
252
- } from "../chunk-CZ23KRVK.js";
253
+ } from "../chunk-CVJTIVAP.js";
253
254
  import "../chunk-MWMCQLCG.js";
254
255
  import {
255
256
  withActionId
256
257
  } from "../chunk-5RLIPTL7.js";
257
258
  import {
258
259
  withQuery
259
- } from "../chunk-WVK3G2J2.js";
260
- import "../chunk-SWLW4VN3.js";
260
+ } from "../chunk-EMKYDGZ3.js";
261
+ import "../chunk-KC4UB4ZX.js";
261
262
  import {
262
263
  collectionBeginSchema,
263
264
  collectionPreviewSchema,
@@ -272,7 +273,7 @@ import {
272
273
  rewardDeliveriesSchema,
273
274
  rewardDeliveryQuerySchema,
274
275
  rewardDeliverySchema
275
- } from "../chunk-ME2KUAVJ.js";
276
+ } from "../chunk-3KKRXN5E.js";
276
277
  import {
277
278
  allocateQuestSchema,
278
279
  allocatedQuestSchema,
@@ -283,7 +284,7 @@ import {
283
284
  questDraftSchema,
284
285
  questPublicationPreviewSchema,
285
286
  saveQuestDraftSchema
286
- } from "../chunk-PO2ZDY27.js";
287
+ } from "../chunk-TW4RABVS.js";
287
288
  import {
288
289
  engagementBoundaryPageSchema,
289
290
  engagementChangePreviewInputSchema,
@@ -309,7 +310,7 @@ import {
309
310
  referralQualificationSchema,
310
311
  referralRewardResolutionSchema,
311
312
  referralSuspensionSchema
312
- } from "../chunk-2A3BJ262.js";
313
+ } from "../chunk-FGZGL5PG.js";
313
314
  import {
314
315
  CompletionSourceKind,
315
316
  acceptAnywaySchema,
@@ -324,6 +325,7 @@ import {
324
325
  base58Bytes,
325
326
  baseUnitsSchema,
326
327
  beginHandoverSchema,
328
+ booleanQuery,
327
329
  caip10,
328
330
  campaignEnrollmentSchema,
329
331
  completionKeySchema,
@@ -424,11 +426,14 @@ import {
424
426
  solanaDevnet,
425
427
  solanaMainnet,
426
428
  solanaMemoProgram,
427
- solanaSignatureSchema2 as solanaSignatureSchema,
429
+ solanaSignatureSchema,
428
430
  solanaTransactionFixtureInputSchema,
429
431
  solanaTransactionSubmissionSchema,
430
432
  staffDecisionSchema,
433
+ staffReasonInputSchema,
431
434
  stakeTrackerCreateSchema,
435
+ stationCheckInSchema,
436
+ stationCodeSubmissionSchema,
432
437
  stationRefusal,
433
438
  stockItemSchema,
434
439
  streakProgressSchema,
@@ -464,7 +469,7 @@ import {
464
469
  walletTransactionsSchema,
465
470
  walletUnlinkInputSchema,
466
471
  whereSchemaIssue
467
- } from "../chunk-CQVKOD3B.js";
472
+ } from "../chunk-74SMLZZ5.js";
468
473
  import {
469
474
  issueText
470
475
  } from "../chunk-VNEJH4NT.js";
@@ -762,13 +767,9 @@ var leaderboardSettlementExportSchema = /* @__PURE__ */ (() => z6.object({
762
767
  })
763
768
  )
764
769
  }))();
765
- var csvField = (value) => {
766
- const text = value == null ? "" : String(value);
767
- return /[",\r\n]/.test(text) ? `"${text.replaceAll('"', '""')}"` : text;
768
- };
769
770
  function settlementPayoutCsv(exported) {
770
771
  const unit = exported.pool === null ? "" : exported.pool.unit === "points" ? "points" : exported.pool.unit.code;
771
- return [
772
+ return csvLines([
772
773
  ["member", "score", "rank", "share", "amount", "unit", "wallets"],
773
774
  ...exported.rows.map((row) => [
774
775
  row.member,
@@ -781,7 +782,7 @@ function settlementPayoutCsv(exported) {
781
782
  (wallet) => `${wallet.provedOn ?? wallet.network ?? wallet.chain}:${wallet.address}`
782
783
  ).join(" ")
783
784
  ])
784
- ].map((fields) => fields.map(csvField).join(",")).join("\n");
785
+ ]);
785
786
  }
786
787
 
787
788
  // src/server/inventory-items.ts
@@ -1243,7 +1244,7 @@ var dashboardReadSchema = /* @__PURE__ */ (() => z11.object({
1243
1244
  }))();
1244
1245
 
1245
1246
  // src/server/index.ts
1246
- import * as z62 from "zod";
1247
+ import * as z63 from "zod";
1247
1248
 
1248
1249
  // src/server/client/http.ts
1249
1250
  import * as z14 from "zod";
@@ -1672,7 +1673,6 @@ import * as z18 from "zod";
1672
1673
  var timestamp2 = /* @__PURE__ */ (() => z18.number().int().safe().nonnegative())();
1673
1674
  var index = /* @__PURE__ */ (() => z18.number().int().safe().nonnegative())();
1674
1675
  var actionId = /* @__PURE__ */ (() => z18.string().uuid().default(() => crypto.randomUUID()))();
1675
- var signatureSchema = /* @__PURE__ */ (() => z18.string().min(64).max(88).regex(/^[1-9A-HJ-NP-Za-km-z]+$/))();
1676
1676
  var solanaPayoutMintSchema = /* @__PURE__ */ (() => z18.union([
1677
1677
  z18.literal("SOL"),
1678
1678
  solanaAddressSchema
@@ -1701,7 +1701,7 @@ var solanaPayoutInputSchema = /* @__PURE__ */ (() => z18.strictObject({
1701
1701
  var solanaPayoutConfirmationSchema = /* @__PURE__ */ (() => z18.strictObject({
1702
1702
  actionId,
1703
1703
  /** Signatures of transactions the team sent, which Relay reads first. */
1704
- signatures: z18.array(signatureSchema).max(100).default([])
1704
+ signatures: z18.array(solanaSignatureSchema).max(100).default([])
1705
1705
  }))();
1706
1706
  var batchSchema = /* @__PURE__ */ (() => z18.object({
1707
1707
  index,
@@ -3060,6 +3060,33 @@ function attempts({ get, post }) {
3060
3060
  solanaTransactionSubmissionSchema.parse(input),
3061
3061
  call
3062
3062
  ),
3063
+ /**
3064
+ * Checks a member in at a quest's code station (`proof: "code"`) with the code they entered,
3065
+ * for an app that checks codes in its own server; `member` is the member the app signed in,
3066
+ * such as `signedInMember`'s. Requires `ingest` permission, from a key not limited to selected
3067
+ * trackers. Relay checks the code against the one set for the station in this environment and
3068
+ * runs a normal attempt, which the quest's evaluator decides with `{ kind: "station-code",
3069
+ * reference: station }` in `ctx.action`; the attempt carries the station as `station`, not as
3070
+ * `action`. Resolves with the queued attempt, or with the first attempt when the `actionId`
3071
+ * was already submitted. The code is never stored, logged or answered.
3072
+ *
3073
+ * Refusals, in the order Relay checks them: 422 `station-unknown` when the quest has no such
3074
+ * station, 422 `station-proof-mismatch` when transactions prove it, 409
3075
+ * `station-code-not-set` while it has no code in this environment, 409 `station-revoked`
3076
+ * when an operator revoked it, 409 `station-closed` outside its window at submission, and 422
3077
+ * `station-code-invalid` for a wrong code. Only wrong codes count toward the guess limits: 10
3078
+ * per member and station per hour, and 600 per station per 10 minutes across members. While
3079
+ * either is spent, every check-in it covers, a right code included, answers 429 `rate-limited`
3080
+ * with `Retry-After`.
3081
+ *
3082
+ * @experimental A minor release can change this method and its result.
3083
+ */
3084
+ submitStationCode: (input, call) => post(
3085
+ "/attempts/station-code",
3086
+ attemptSchema,
3087
+ stationCodeSubmissionSchema.parse(withActionId(input)),
3088
+ call
3089
+ ),
3063
3090
  /**
3064
3091
  * Accepts or rejects an attempt waiting for review, at the `generation` the reviewer saw,
3065
3092
  * with a reason; requires `review` permission.
@@ -3276,6 +3303,215 @@ function completions({ get, post }) {
3276
3303
  }
3277
3304
  var completionsApi = (http) => completions(http);
3278
3305
 
3306
+ // src/server/galleries.ts
3307
+ import * as z31 from "zod";
3308
+ var gallerySchema = /* @__PURE__ */ (() => z31.object({
3309
+ /** The quest's ID. */
3310
+ quest: identifier,
3311
+ /** The key the quest is written under in code. */
3312
+ key: z31.string(),
3313
+ title: z31.string(),
3314
+ kind: z31.string(),
3315
+ photos: z31.number().int().nonnegative(),
3316
+ hiddenPhotos: z31.number().int().nonnegative()
3317
+ }))();
3318
+ var galleryListSchema = /* @__PURE__ */ (() => z31.object({ items: z31.array(gallerySchema) }))();
3319
+ var galleryHiddenFilterSchema = /* @__PURE__ */ (() => z31.enum(["include", "exclude", "only"]))();
3320
+ var galleryPhotoQuerySchema = /* @__PURE__ */ (() => z31.strictObject({
3321
+ quest: z31.string().min(1).max(200).optional(),
3322
+ day: z31.iso.date().optional(),
3323
+ hidden: galleryHiddenFilterSchema.optional(),
3324
+ winners: booleanQuery.optional(),
3325
+ cursor: pageCursorSchema.optional(),
3326
+ limit: pageLimit
3327
+ }))();
3328
+ var galleryExportQuerySchema = /* @__PURE__ */ (() => z31.strictObject({
3329
+ quest: z31.string().min(1).max(200).optional(),
3330
+ day: z31.iso.date().optional(),
3331
+ includeHidden: booleanQuery.optional(),
3332
+ cursor: pageCursorSchema.optional()
3333
+ }))();
3334
+ var galleryPhotoHiddenSchema = evidenceRedactionSchema;
3335
+ var galleryWinnerRewardSchema = /* @__PURE__ */ (() => z31.object({
3336
+ quest: identifier,
3337
+ attempt: identifier
3338
+ }))();
3339
+ var galleryWinnerSchema = /* @__PURE__ */ (() => z31.object({
3340
+ at: z31.number(),
3341
+ actor: z31.string().nullable(),
3342
+ reward: galleryWinnerRewardSchema.nullable()
3343
+ }))();
3344
+ var galleryPhotoSchema = /* @__PURE__ */ (() => z31.object({
3345
+ attempt: identifier,
3346
+ quest: identifier,
3347
+ member: identifier,
3348
+ name: z31.string().nullable(),
3349
+ evidence: identifier,
3350
+ submittedAt: z31.number().int().nonnegative(),
3351
+ decidedAt: z31.number().int().nonnegative().nullable(),
3352
+ hidden: galleryPhotoHiddenSchema.nullable(),
3353
+ winner: galleryWinnerSchema.nullable()
3354
+ }))();
3355
+ var galleryPhotoPageSchema = /* @__PURE__ */ (() => z31.object({
3356
+ items: z31.array(galleryPhotoSchema),
3357
+ nextCursor: pageCursorSchema.nullable()
3358
+ }))();
3359
+ var galleryPhotoHideInputSchema = staffReasonInputSchema;
3360
+ var galleryPhotoHideResultSchema = /* @__PURE__ */ (() => z31.object({
3361
+ attempt: identifier,
3362
+ hidden: galleryPhotoHiddenSchema.nullable()
3363
+ }))();
3364
+ var galleryWinnerMarkInputSchema = /* @__PURE__ */ (() => z31.object({
3365
+ actionId: identifier,
3366
+ reward: z31.object({ quest: identifier }).strict().optional()
3367
+ }).strict())();
3368
+ var galleryWinnerUnmarkInputSchema = /* @__PURE__ */ (() => z31.object({ actionId: identifier }).strict())();
3369
+ var galleryWinnerResultSchema = /* @__PURE__ */ (() => z31.object({
3370
+ attempt: identifier,
3371
+ winner: galleryWinnerSchema.nullable()
3372
+ }))();
3373
+
3374
+ // src/server/client/galleries.ts
3375
+ function galleries({ get, post, raw }) {
3376
+ const hiding = (action) => pathFirst(
3377
+ "attempt",
3378
+ (attempt, body, call) => post(
3379
+ `/galleries/photos/${identifier.parse(attempt)}/${action}`,
3380
+ galleryPhotoHideResultSchema,
3381
+ galleryPhotoHideInputSchema.parse(withActionId(body)),
3382
+ call
3383
+ )
3384
+ );
3385
+ return {
3386
+ /**
3387
+ * The project's photo galleries: each quest whose current release declares `gallery`, with its
3388
+ * key, title, kind and how many photos it holds, visible (`photos`) and hidden
3389
+ * (`hiddenPhotos`); requires `review` permission.
3390
+ *
3391
+ * @experimental A minor release can change photo galleries.
3392
+ */
3393
+ list: (call) => get("/galleries", galleryListSchema, call),
3394
+ /**
3395
+ * One page of gallery photos, newest submission first, `limit` at a time (1 to 100, 100 by
3396
+ * default): accepted attempts with
3397
+ * photo evidence that was not deleted, of every gallery or of one `quest` (ID or key), and of
3398
+ * one project-calendar `day` (`YYYY-MM-DD`) of submission; requires `review` permission.
3399
+ * `hidden` is `include` (the default: every photo, each with its `hidden`), `exclude` or
3400
+ * `only`, for the photos a reviewer hid; `winners: true` answers only contest winners, each
3401
+ * with its `winner`. Pass
3402
+ * a page's `nextCursor` back as `cursor` for the next page. Evidence that staff, the retention
3403
+ * pass or a member's erasure deleted leaves the gallery with it. Fails with 404 `not-found`
3404
+ * for a quest that is not a gallery.
3405
+ *
3406
+ * @experimental A minor release can change photo galleries.
3407
+ */
3408
+ photos: (query = {}, call) => get(
3409
+ `/galleries/photos${queryString(galleryPhotoQuerySchema.parse(query))}`,
3410
+ galleryPhotoPageSchema,
3411
+ call
3412
+ ),
3413
+ /**
3414
+ * One part of a gallery export, as a zip that streams; requires `review` permission. The zip
3415
+ * holds, oldest submission first, the accepted photos of every gallery or of one `quest` (ID or
3416
+ * key), of one project-calendar `day` (`YYYY-MM-DD`), the hidden ones only with
3417
+ * `includeHidden: true`. Each photo is `<day>/<quest key>/<attempt>.jpg` or `.png`, a copy
3418
+ * re-encoded at its full size with EXIF orientation applied and no EXIF, GPS, XMP or other
3419
+ * metadata, and `manifest.csv` lists them: `file, attempt, quest, quest_title, member,
3420
+ * display_name, submitted_at, winner`, and `hidden` with `includeHidden`; a photo that can't
3421
+ * be re-encoded (over 25 megapixels, say) is listed in `skipped.csv` instead. A part holds at most
3422
+ * 1,000 photos and 2 GiB of stored photos, which keeps it a plain zip every unzip tool opens
3423
+ * and one download a few minutes long: pass `nextCursor` back as `cursor` for the next part
3424
+ * until it is null. Answers `{ body, photos, nextCursor }`; read `body` to the end, or cancel
3425
+ * it. A connection that drops, or storage that fails, mid-part errors `body` rather than ending
3426
+ * the zip early. Records a `gallery-exported` audit event per part. Fails with 404 `not-found`
3427
+ * for a quest that is not a gallery, and 503 when evidence storage fails before the zip starts.
3428
+ *
3429
+ * @experimental A minor release can change photo galleries.
3430
+ */
3431
+ export: async (query = {}, call) => {
3432
+ const response = await raw(
3433
+ `/galleries/export${queryString(galleryExportQuerySchema.parse(query))}`,
3434
+ call
3435
+ );
3436
+ if (!response.body) {
3437
+ throw new TypeError("The gallery export answered no zip");
3438
+ }
3439
+ return {
3440
+ body: response.body,
3441
+ photos: Number(response.headers.get("X-Domino-Photos") ?? 0),
3442
+ nextCursor: response.headers.get("X-Domino-Next-Cursor")
3443
+ };
3444
+ },
3445
+ /**
3446
+ * Hides a gallery photo, by its attempt, with a reason (1 to 2000 characters); requires
3447
+ * `review` permission. Presentation only: the attempt, its completion and rewards stay. A
3448
+ * contest winner can't be hidden (409 `gallery-photo-winner`): unmark it first.
3449
+ * Answers `{ attempt, hidden }`; hiding a hidden photo answers its hiding as it is and
3450
+ * records nothing, and replaying the action ID returns the first answer. Records a
3451
+ * `gallery-photo-hidden` audit event. An attempt whose photo is not in a gallery, or whose
3452
+ * evidence was deleted, fails with 404 `not-found`. Takes the attempt first,
3453
+ * `hide(attempt, { reason })`, or inside the input.
3454
+ *
3455
+ * @experimental A minor release can change photo galleries.
3456
+ */
3457
+ hide: hiding("hide"),
3458
+ /**
3459
+ * Shows a hidden gallery photo again, with a reason; requires `review` permission. Answers
3460
+ * `{ attempt, hidden: null }`; unhiding a photo that shows records nothing, and replaying
3461
+ * the action ID returns the first answer. Records a `gallery-photo-unhidden` audit event.
3462
+ * Fails as `hide` does.
3463
+ *
3464
+ * @experimental A minor release can change photo galleries.
3465
+ */
3466
+ unhide: hiding("unhide"),
3467
+ /**
3468
+ * Marks a contest photo, by its attempt, as a winner; requires `review` permission. A contest
3469
+ * has any number of winners. With `reward: { quest }` (ID or key), the mark also confirms that
3470
+ * staff-confirmed quest for the photo's member, as `attempts.confirm` does, which also requires
3471
+ * `confirm` permission (403 `permission-required` without it): its rules, rewards, budgets and
3472
+ * webhooks apply. The confirmation's action ID comes from the photo's attempt, so marking the
3473
+ * same photo again never pays twice. A refused confirmation (`member-banned`, a completion
3474
+ * limit, …) fails with its own error and saves no mark. Answers
3475
+ * `{ attempt, winner: { at, actor, reward: { quest, attempt } | null } }`; marking a winner
3476
+ * answers its mark as it is, and replaying the action ID returns the first answer. Records a
3477
+ * `gallery-winner-marked` audit event. A wall gallery's photo fails with 409
3478
+ * `gallery-not-contest`, a hidden photo with 409 `gallery-photo-hidden`, and an attempt whose
3479
+ * photo is not in a gallery with 404 `not-found`. Takes the attempt first,
3480
+ * `markWinner(attempt, { reward })`, or inside the input.
3481
+ *
3482
+ * @experimental A minor release can change photo galleries.
3483
+ */
3484
+ markWinner: pathFirst(
3485
+ "attempt",
3486
+ (attempt, body, call) => post(
3487
+ `/galleries/photos/${identifier.parse(attempt)}/mark-winner`,
3488
+ galleryWinnerResultSchema,
3489
+ galleryWinnerMarkInputSchema.parse(withActionId(body)),
3490
+ call
3491
+ )
3492
+ ),
3493
+ /**
3494
+ * Takes a photo's winner mark back; requires `review` permission. The reward the mark paid
3495
+ * stays: revoke its completion to take it back. Answers `{ attempt, winner: null }`; unmarking
3496
+ * a photo that is no winner records nothing, and replaying the action ID returns the first
3497
+ * answer. Records a `gallery-winner-unmarked` audit event. An attempt whose photo is not in a
3498
+ * gallery fails with 404 `not-found`.
3499
+ *
3500
+ * @experimental A minor release can change photo galleries.
3501
+ */
3502
+ unmarkWinner: pathFirst(
3503
+ "attempt",
3504
+ (attempt, body, call) => post(
3505
+ `/galleries/photos/${identifier.parse(attempt)}/unmark-winner`,
3506
+ galleryWinnerResultSchema,
3507
+ galleryWinnerUnmarkInputSchema.parse(withActionId(body)),
3508
+ call
3509
+ )
3510
+ )
3511
+ };
3512
+ }
3513
+ var galleriesApi = (http) => galleries(http);
3514
+
3279
3515
  // src/server/client/handover.ts
3280
3516
  function handover({ post }) {
3281
3517
  return {
@@ -3310,20 +3546,20 @@ function handover({ post }) {
3310
3546
  var handoverApi = (http) => handover(http);
3311
3547
 
3312
3548
  // src/server/entitlements.ts
3313
- import * as z31 from "zod";
3314
- var managedEntitlementQuerySchema = /* @__PURE__ */ (() => z31.strictObject({
3315
- q: z31.string().max(200).optional(),
3316
- status: z31.string().min(1).max(50).optional(),
3549
+ import * as z32 from "zod";
3550
+ var managedEntitlementQuerySchema = /* @__PURE__ */ (() => z32.strictObject({
3551
+ q: z32.string().max(200).optional(),
3552
+ status: z32.string().min(1).max(50).optional(),
3317
3553
  limit: pageLimit,
3318
3554
  cursor: pageCursorSchema.optional()
3319
3555
  }))();
3320
- var managedEntitlementPageSchema = /* @__PURE__ */ (() => z31.object({
3321
- items: z31.array(entitlementSchema),
3322
- people: z31.array(personSchema),
3323
- total: z31.number().int().nonnegative(),
3324
- nextCursor: z31.string().nullable()
3556
+ var managedEntitlementPageSchema = /* @__PURE__ */ (() => z32.object({
3557
+ items: z32.array(entitlementSchema),
3558
+ people: z32.array(personSchema),
3559
+ total: z32.number().int().nonnegative(),
3560
+ nextCursor: z32.string().nullable()
3325
3561
  }))();
3326
- var managedEntitlementSchema = /* @__PURE__ */ (() => z31.object({
3562
+ var managedEntitlementSchema = /* @__PURE__ */ (() => z32.object({
3327
3563
  entitlement: entitlementSchema,
3328
3564
  person: personSchema
3329
3565
  }))();
@@ -3415,11 +3651,11 @@ function collection({ post }) {
3415
3651
  var collectionApi = (http) => collection(http);
3416
3652
 
3417
3653
  // src/server/client/operations.ts
3418
- import * as z32 from "zod";
3654
+ import * as z33 from "zod";
3419
3655
  function operations({ get, post }) {
3420
3656
  return {
3421
3657
  /** Every paused or resumed operation: redemptions and each quest's participation; requires `read`. */
3422
- list: (call) => get("/operations", z32.array(operationSchema), call),
3658
+ list: (call) => get("/operations", z33.array(operationSchema), call),
3423
3659
  /**
3424
3660
  * Pauses or resumes redemptions or one quest's participation, against the `revision` the
3425
3661
  * operator saw, with a reason; requires `publish` permission.
@@ -3455,7 +3691,7 @@ function redemptions(http) {
3455
3691
  var redemptionsApi = (http) => redemptions(http);
3456
3692
 
3457
3693
  // src/server/client/inventory.ts
3458
- import * as z33 from "zod";
3694
+ import * as z34 from "zod";
3459
3695
  function inventory({ create, get, post }) {
3460
3696
  return {
3461
3697
  /** Includes archived items and revision fences; requires read permission. */
@@ -3489,7 +3725,7 @@ function inventory({ create, get, post }) {
3489
3725
  call
3490
3726
  ),
3491
3727
  /** Every stock item with its counts and the offers that sell it; requires `read` permission. */
3492
- list: (call) => get("/stock-items", z33.array(managedStockItemSchema), call),
3728
+ list: (call) => get("/stock-items", z34.array(managedStockItemSchema), call),
3493
3729
  createItem: (input, call) => create(
3494
3730
  "/stock-items",
3495
3731
  stockItemSchema,
@@ -3504,7 +3740,7 @@ function inventory({ create, get, post }) {
3504
3740
  stockInputSchema.parse(withActionId(input)),
3505
3741
  call
3506
3742
  ),
3507
- catalog: (call) => get("/pickup-inventory", z33.array(pickupCatalogSchema), call),
3743
+ catalog: (call) => get("/pickup-inventory", z34.array(pickupCatalogSchema), call),
3508
3744
  configure: (input, call) => post(
3509
3745
  "/pickup-inventory",
3510
3746
  pickupCatalogSchema,
@@ -3521,7 +3757,7 @@ function inventory({ create, get, post }) {
3521
3757
  var inventoryApi = (http) => inventory(http);
3522
3758
 
3523
3759
  // src/server/client/offers.ts
3524
- import * as z34 from "zod";
3760
+ import * as z35 from "zod";
3525
3761
  function offers({ get, post }) {
3526
3762
  return {
3527
3763
  /**
@@ -3559,7 +3795,7 @@ function offers({ get, post }) {
3559
3795
  ),
3560
3796
  call
3561
3797
  ),
3562
- list: (call) => get("/offers", z34.array(offerSchema), call),
3798
+ list: (call) => get("/offers", z35.array(offerSchema), call),
3563
3799
  /**
3564
3800
  * Every redemption, or one member's, newest first, in one unbounded response.
3565
3801
  *
@@ -3567,7 +3803,7 @@ function offers({ get, post }) {
3567
3803
  */
3568
3804
  redemptions: (input = {}, call) => get(
3569
3805
  `/redemptions${queryString({ member: input.member })}`,
3570
- z34.array(redemptionSchema),
3806
+ z35.array(redemptionSchema),
3571
3807
  call
3572
3808
  ),
3573
3809
  /** Pauses or resumes an offer at the revision the operator saw. */
@@ -3592,16 +3828,16 @@ function offers({ get, post }) {
3592
3828
  var offersApi = (http) => offers(http);
3593
3829
 
3594
3830
  // src/server/client/tokens.ts
3595
- import * as z37 from "zod";
3831
+ import * as z38 from "zod";
3596
3832
 
3597
3833
  // src/server/api-keys.ts
3598
- import * as z36 from "zod";
3834
+ import * as z37 from "zod";
3599
3835
 
3600
3836
  // src/server/permissions.ts
3601
- import * as z35 from "zod";
3602
- var environmentSchema = /* @__PURE__ */ (() => z35.enum(["test", "live"]))();
3603
- var roleSchema = /* @__PURE__ */ (() => z35.enum(["editor", "reviewer", "staff"]))();
3604
- var permissionSchema = /* @__PURE__ */ (() => z35.enum([
3837
+ import * as z36 from "zod";
3838
+ var environmentSchema = /* @__PURE__ */ (() => z36.enum(["test", "live"]))();
3839
+ var roleSchema = /* @__PURE__ */ (() => z36.enum(["editor", "reviewer", "staff"]))();
3840
+ var permissionSchema = /* @__PURE__ */ (() => z36.enum([
3605
3841
  "read",
3606
3842
  "publish",
3607
3843
  "review",
@@ -3621,7 +3857,7 @@ var permissionSchema = /* @__PURE__ */ (() => z35.enum([
3621
3857
  */
3622
3858
  "enroll"
3623
3859
  ]))();
3624
- var permissionListSchema = /* @__PURE__ */ (() => z35.array(z35.string()).transform(
3860
+ var permissionListSchema = /* @__PURE__ */ (() => z36.array(z36.string()).transform(
3625
3861
  (values) => values.filter(
3626
3862
  (value) => permissionSchema.safeParse(value).success
3627
3863
  )
@@ -3631,8 +3867,8 @@ var rolePermissions = {
3631
3867
  reviewer: ["read", "review"],
3632
3868
  staff: ["read", "confirm", "handover"]
3633
3869
  };
3634
- var projectRoleSchema = /* @__PURE__ */ (() => z35.enum([...roleSchema.options, "viewer"]))();
3635
- var projectPermissionSchema = /* @__PURE__ */ (() => z35.enum([
3870
+ var projectRoleSchema = /* @__PURE__ */ (() => z36.enum([...roleSchema.options, "viewer"]))();
3871
+ var projectPermissionSchema = /* @__PURE__ */ (() => z36.enum([
3636
3872
  ...permissionSchema.options,
3637
3873
  "dashboards"
3638
3874
  ]))();
@@ -3644,55 +3880,55 @@ var projectRolePermissions = {
3644
3880
  };
3645
3881
 
3646
3882
  // src/server/api-keys.ts
3647
- var ingestTrackerScopeSchema = /* @__PURE__ */ (() => z36.array(identifier).min(1).max(100).nullable())();
3648
- var tokenScopeInputSchema = /* @__PURE__ */ (() => z36.object({ ingestTrackers: ingestTrackerScopeSchema }).strict())();
3649
- var tokenInputSchema = /* @__PURE__ */ (() => z36.object({
3650
- name: z36.string().trim().min(1).max(80),
3883
+ var ingestTrackerScopeSchema = /* @__PURE__ */ (() => z37.array(identifier).min(1).max(100).nullable())();
3884
+ var tokenScopeInputSchema = /* @__PURE__ */ (() => z37.object({ ingestTrackers: ingestTrackerScopeSchema }).strict())();
3885
+ var tokenInputSchema = /* @__PURE__ */ (() => z37.object({
3886
+ name: z37.string().trim().min(1).max(80),
3651
3887
  project: identifier,
3652
3888
  environment: environmentSchema,
3653
- permissions: z36.array(permissionSchema).min(1),
3889
+ permissions: z37.array(permissionSchema).min(1),
3654
3890
  ingestTrackers: ingestTrackerScopeSchema.optional(),
3655
- days: z36.number().int().min(1).max(90).default(30)
3891
+ days: z37.number().int().min(1).max(90).default(30)
3656
3892
  }).strict())();
3657
- var tokenSchema = /* @__PURE__ */ (() => z36.object({
3658
- id: z36.string(),
3659
- name: z36.string(),
3660
- project: z36.string(),
3893
+ var tokenSchema = /* @__PURE__ */ (() => z37.object({
3894
+ id: z37.string(),
3895
+ name: z37.string(),
3896
+ project: z37.string(),
3661
3897
  environment: environmentSchema,
3662
3898
  permissions: permissionListSchema,
3663
3899
  ingestTrackers: ingestTrackerScopeSchema.optional(),
3664
- expiresAt: z36.number()
3900
+ expiresAt: z37.number()
3665
3901
  }))();
3666
- var issuedTokenSchema = /* @__PURE__ */ (() => tokenSchema.extend({ token: z36.string() }))();
3667
- var serviceKeyInputSchema = /* @__PURE__ */ (() => z36.object({
3668
- name: z36.string().trim().min(1).max(80),
3669
- permissions: z36.array(permissionSchema).min(1).refine(
3902
+ var issuedTokenSchema = /* @__PURE__ */ (() => tokenSchema.extend({ token: z37.string() }))();
3903
+ var serviceKeyInputSchema = /* @__PURE__ */ (() => z37.object({
3904
+ name: z37.string().trim().min(1).max(80),
3905
+ permissions: z37.array(permissionSchema).min(1).refine(
3670
3906
  (permissions) => !permissions.includes("access"),
3671
3907
  "Service keys cannot hold the access permission"
3672
3908
  ),
3673
3909
  /** Days until the first secret expires. Omit it for a key that never expires. */
3674
- expiresInDays: z36.number().int().min(1).max(3650).optional()
3910
+ expiresInDays: z37.number().int().min(1).max(3650).optional()
3675
3911
  }).strict())();
3676
- var serviceKeySchema = /* @__PURE__ */ (() => z36.object({
3677
- id: z36.string().uuid(),
3678
- organization: z36.string(),
3679
- project: z36.string(),
3912
+ var serviceKeySchema = /* @__PURE__ */ (() => z37.object({
3913
+ id: z37.string().uuid(),
3914
+ organization: z37.string(),
3915
+ project: z37.string(),
3680
3916
  environment: environmentSchema,
3681
- name: z36.string(),
3917
+ name: z37.string(),
3682
3918
  permissions: permissionListSchema,
3683
3919
  /** The Clerk user ID of the administrator who created it. */
3684
- createdBy: z36.string(),
3685
- createdAt: z36.number(),
3920
+ createdBy: z37.string(),
3921
+ createdAt: z37.number(),
3686
3922
  /** The latest use of any of its secrets, revoked ones included; null when none was used. */
3687
- lastUsedAt: z36.number().nullable(),
3923
+ lastUsedAt: z37.number().nullable(),
3688
3924
  /** Its working secrets, oldest first. Any of them authenticates the key. */
3689
- secrets: z36.array(credentialSecretSchema)
3925
+ secrets: z37.array(credentialSecretSchema)
3690
3926
  }))();
3691
3927
  var issuedServiceKeySchema = /* @__PURE__ */ (() => serviceKeySchema.extend({
3692
- secret: z36.string().uuid(),
3693
- token: z36.string()
3928
+ secret: z37.string().uuid(),
3929
+ token: z37.string()
3694
3930
  }))();
3695
- var automationKeyPermissionSchema = /* @__PURE__ */ (() => z36.enum([
3931
+ var automationKeyPermissionSchema = /* @__PURE__ */ (() => z37.enum([
3696
3932
  "read",
3697
3933
  "publish",
3698
3934
  "inventory",
@@ -3700,47 +3936,47 @@ var automationKeyPermissionSchema = /* @__PURE__ */ (() => z36.enum([
3700
3936
  "ingest",
3701
3937
  "enroll"
3702
3938
  ]))();
3703
- var automationKeyInputSchema = /* @__PURE__ */ (() => z36.object({
3704
- name: z36.string().trim().min(1).max(80),
3705
- permissions: z36.array(automationKeyPermissionSchema).min(1),
3939
+ var automationKeyInputSchema = /* @__PURE__ */ (() => z37.object({
3940
+ name: z37.string().trim().min(1).max(80),
3941
+ permissions: z37.array(automationKeyPermissionSchema).min(1),
3706
3942
  /**
3707
3943
  * The projects it reaches. Omit it for every project of the organization, current and future.
3708
3944
  * An empty list, allowed only with `createProjects`, reaches only the projects it creates.
3709
3945
  */
3710
- projects: z36.array(identifier).max(100).optional(),
3946
+ projects: z37.array(identifier).max(100).optional(),
3711
3947
  /** Whether it may create projects. A project it creates joins its `projects` list. */
3712
- createProjects: z36.boolean().default(false),
3948
+ createProjects: z37.boolean().default(false),
3713
3949
  /** Days until the first secret expires. Omit it for a key that never expires. */
3714
- expiresInDays: z36.number().int().min(1).max(3650).optional()
3950
+ expiresInDays: z37.number().int().min(1).max(3650).optional()
3715
3951
  }).strict().refine((key2) => key2.projects?.length !== 0 || key2.createProjects, {
3716
3952
  message: "Choose a project, or let the key create projects",
3717
3953
  path: ["projects"]
3718
3954
  }))();
3719
- var automationKeySchema = /* @__PURE__ */ (() => z36.object({
3720
- id: z36.string().uuid(),
3721
- organization: z36.string(),
3722
- name: z36.string(),
3955
+ var automationKeySchema = /* @__PURE__ */ (() => z37.object({
3956
+ id: z37.string().uuid(),
3957
+ organization: z37.string(),
3958
+ name: z37.string(),
3723
3959
  permissions: permissionListSchema,
3724
3960
  /** The projects it reaches; null for every project of the organization. */
3725
- projects: z36.array(z36.string()).nullable(),
3726
- createProjects: z36.boolean(),
3961
+ projects: z37.array(z37.string()).nullable(),
3962
+ createProjects: z37.boolean(),
3727
3963
  /** The Clerk user ID of the administrator who created it. */
3728
- createdBy: z36.string(),
3729
- createdAt: z36.number(),
3964
+ createdBy: z37.string(),
3965
+ createdAt: z37.number(),
3730
3966
  /** The latest use of any of its secrets, revoked ones included; null when none was used. */
3731
- lastUsedAt: z36.number().nullable(),
3967
+ lastUsedAt: z37.number().nullable(),
3732
3968
  /** Its working secrets, oldest first. Any of them authenticates the key. */
3733
- secrets: z36.array(credentialSecretSchema)
3969
+ secrets: z37.array(credentialSecretSchema)
3734
3970
  }))();
3735
3971
  var issuedAutomationKeySchema = /* @__PURE__ */ (() => automationKeySchema.extend({
3736
- secret: z36.string().uuid(),
3737
- token: z36.string()
3972
+ secret: z37.string().uuid(),
3973
+ token: z37.string()
3738
3974
  }))();
3739
3975
 
3740
3976
  // src/server/client/tokens.ts
3741
3977
  function tokens({ get, post, request }) {
3742
3978
  return {
3743
- list: (call) => get("/tokens", z37.array(tokenSchema), call),
3979
+ list: (call) => get("/tokens", z38.array(tokenSchema), call),
3744
3980
  /**
3745
3981
  * Issues a key for one project and environment, limited to permissions the caller holds
3746
3982
  * there. It expires after `days`, 1 to 90 (default 30). The secret `token` is in this
@@ -3749,14 +3985,14 @@ function tokens({ get, post, request }) {
3749
3985
  create: (input, call) => post("/tokens", issuedTokenSchema, tokenInputSchema.parse(input), call),
3750
3986
  /** Replace a personal key's ingestion restriction without changing its secret. */
3751
3987
  scope: (id, input, call) => request(
3752
- `/tokens/${encodeURIComponent(z37.string().min(1).parse(id))}/scope`,
3988
+ `/tokens/${encodeURIComponent(z38.string().min(1).parse(id))}/scope`,
3753
3989
  tokenSchema,
3754
3990
  tokenScopeInputSchema.parse(input),
3755
3991
  "PUT",
3756
3992
  call
3757
3993
  ),
3758
3994
  revoke: (id, call) => request(
3759
- `/tokens/${encodeURIComponent(z37.string().min(1).parse(id))}`,
3995
+ `/tokens/${encodeURIComponent(z38.string().min(1).parse(id))}`,
3760
3996
  ok,
3761
3997
  void 0,
3762
3998
  "DELETE",
@@ -3767,10 +4003,10 @@ function tokens({ get, post, request }) {
3767
4003
  var tokensApi = (http) => tokens(http);
3768
4004
 
3769
4005
  // src/server/client/service-keys.ts
3770
- import * as z38 from "zod";
4006
+ import * as z39 from "zod";
3771
4007
  function serviceKeys({ get, post, request }) {
3772
4008
  return {
3773
- list: (call) => get("/service-keys", z38.array(serviceKeySchema), call),
4009
+ list: (call) => get("/service-keys", z39.array(serviceKeySchema), call),
3774
4010
  /** The secret `token` is in this response only. */
3775
4011
  create: (input, call) => post(
3776
4012
  "/service-keys",
@@ -3783,14 +4019,14 @@ function serviceKeys({ get, post, request }) {
3783
4019
  * them with `revokeSecret`. The new `token` is in this response only.
3784
4020
  */
3785
4021
  addSecret: (id, input = {}, call) => post(
3786
- `/service-keys/${z38.string().uuid().parse(id)}/secrets`,
4022
+ `/service-keys/${z39.string().uuid().parse(id)}/secrets`,
3787
4023
  issuedServiceKeySchema,
3788
4024
  credentialSecretInputSchema.parse(input),
3789
4025
  call
3790
4026
  ),
3791
4027
  /** Stops one secret working. A key's last secret cannot be revoked; revoke the key instead. */
3792
4028
  revokeSecret: (id, secret, call) => request(
3793
- `/service-keys/${z38.string().uuid().parse(id)}/secrets/${z38.string().uuid().parse(secret)}`,
4029
+ `/service-keys/${z39.string().uuid().parse(id)}/secrets/${z39.string().uuid().parse(secret)}`,
3794
4030
  serviceKeySchema,
3795
4031
  void 0,
3796
4032
  "DELETE",
@@ -3798,8 +4034,8 @@ function serviceKeys({ get, post, request }) {
3798
4034
  ),
3799
4035
  /** Deletes the key; every secret stops working. */
3800
4036
  revoke: (id, call) => request(
3801
- `/service-keys/${z38.string().uuid().parse(id)}`,
3802
- z38.null(),
4037
+ `/service-keys/${z39.string().uuid().parse(id)}`,
4038
+ z39.null(),
3803
4039
  void 0,
3804
4040
  "DELETE",
3805
4041
  call
@@ -3809,10 +4045,10 @@ function serviceKeys({ get, post, request }) {
3809
4045
  var serviceKeysApi = (http) => serviceKeys(http);
3810
4046
 
3811
4047
  // src/server/client/automation-keys.ts
3812
- import * as z39 from "zod";
4048
+ import * as z40 from "zod";
3813
4049
  function automationKeys({ get, post, request }) {
3814
4050
  return {
3815
- list: (call) => get("/automation-keys", z39.array(automationKeySchema), call),
4051
+ list: (call) => get("/automation-keys", z40.array(automationKeySchema), call),
3816
4052
  /** The secret `token` is in this response only. */
3817
4053
  create: (input, call) => post(
3818
4054
  "/automation-keys",
@@ -3825,14 +4061,14 @@ function automationKeys({ get, post, request }) {
3825
4061
  * them with `revokeSecret`. The new `token` is in this response only.
3826
4062
  */
3827
4063
  addSecret: (id, input = {}, call) => post(
3828
- `/automation-keys/${z39.string().uuid().parse(id)}/secrets`,
4064
+ `/automation-keys/${z40.string().uuid().parse(id)}/secrets`,
3829
4065
  issuedAutomationKeySchema,
3830
4066
  credentialSecretInputSchema.parse(input),
3831
4067
  call
3832
4068
  ),
3833
4069
  /** Stops one secret working. A key's last secret cannot be revoked; revoke the key instead. */
3834
4070
  revokeSecret: (id, secret, call) => request(
3835
- `/automation-keys/${z39.string().uuid().parse(id)}/secrets/${z39.string().uuid().parse(secret)}`,
4071
+ `/automation-keys/${z40.string().uuid().parse(id)}/secrets/${z40.string().uuid().parse(secret)}`,
3836
4072
  automationKeySchema,
3837
4073
  void 0,
3838
4074
  "DELETE",
@@ -3840,8 +4076,8 @@ function automationKeys({ get, post, request }) {
3840
4076
  ),
3841
4077
  /** Deletes the key; every secret stops working. */
3842
4078
  revoke: (id, call) => request(
3843
- `/automation-keys/${z39.string().uuid().parse(id)}`,
3844
- z39.null(),
4079
+ `/automation-keys/${z40.string().uuid().parse(id)}`,
4080
+ z40.null(),
3845
4081
  void 0,
3846
4082
  "DELETE",
3847
4083
  call
@@ -3851,26 +4087,26 @@ function automationKeys({ get, post, request }) {
3851
4087
  var automationKeysApi = (http) => automationKeys(http);
3852
4088
 
3853
4089
  // src/server/client/grants.ts
3854
- import * as z41 from "zod";
4090
+ import * as z42 from "zod";
3855
4091
 
3856
4092
  // src/server/grants.ts
3857
- import * as z40 from "zod";
3858
- var grantSchema = /* @__PURE__ */ (() => z40.object({
3859
- subject: z40.string().min(1).max(200),
3860
- roles: z40.array(roleSchema),
3861
- environments: z40.array(environmentSchema)
4093
+ import * as z41 from "zod";
4094
+ var grantSchema = /* @__PURE__ */ (() => z41.object({
4095
+ subject: z41.string().min(1).max(200),
4096
+ roles: z41.array(roleSchema),
4097
+ environments: z41.array(environmentSchema)
3862
4098
  }).strict())();
3863
- var projectGrantSchema = /* @__PURE__ */ (() => z40.object({
4099
+ var projectGrantSchema = /* @__PURE__ */ (() => z41.object({
3864
4100
  subject: grantSchema.shape.subject,
3865
- roles: z40.array(projectRoleSchema),
4101
+ roles: z41.array(projectRoleSchema),
3866
4102
  environments: grantSchema.shape.environments,
3867
4103
  /**
3868
4104
  * When the grant stops giving access (epoch ms). Omit it, or send null, for a grant without
3869
4105
  * an end. An ended grant stays listed, so the project's access shows who had it and until when.
3870
4106
  */
3871
- expiresAt: z40.number().int().positive().nullable().optional()
4107
+ expiresAt: z41.number().int().positive().nullable().optional()
3872
4108
  }).strict())();
3873
- var grantRecordSchema = /* @__PURE__ */ (() => z40.object({
4109
+ var grantRecordSchema = /* @__PURE__ */ (() => z41.object({
3874
4110
  ...grantSchema.shape,
3875
4111
  /**
3876
4112
  * Every role the grant gives, `viewer` included, which `roles` leaves out. Absent from Relay
@@ -3878,23 +4114,23 @@ var grantRecordSchema = /* @__PURE__ */ (() => z40.object({
3878
4114
  *
3879
4115
  * @experimental
3880
4116
  */
3881
- projectRoles: z40.array(z40.string()).optional(),
4117
+ projectRoles: z41.array(z41.string()).optional(),
3882
4118
  /**
3883
4119
  * When the grant stops giving access (epoch ms), or null for no end. A grant past it is still
3884
4120
  * listed and gives no permission.
3885
4121
  *
3886
4122
  * @experimental
3887
4123
  */
3888
- expiresAt: z40.number().nullable().optional()
4124
+ expiresAt: z41.number().nullable().optional()
3889
4125
  }))();
3890
- var teamSchema = /* @__PURE__ */ (() => z40.array(
3891
- z40.object({ id: z40.string(), label: z40.string() })
4126
+ var teamSchema = /* @__PURE__ */ (() => z41.array(
4127
+ z41.object({ id: z41.string(), label: z41.string() })
3892
4128
  ))();
3893
4129
 
3894
4130
  // src/server/client/grants.ts
3895
4131
  function grants({ get, request }) {
3896
4132
  return {
3897
- list: (call) => get("/grants", z41.array(grantRecordSchema), call),
4133
+ list: (call) => get("/grants", z42.array(grantRecordSchema), call),
3898
4134
  /**
3899
4135
  * Replaces one person's roles, environments and end date on the project. The audit log
3900
4136
  * records it. `viewer` and `expiresAt` are experimental.
@@ -3919,14 +4155,14 @@ function team({ get }) {
3919
4155
  var teamApi = (http) => team(http);
3920
4156
 
3921
4157
  // src/server/client/webhooks.ts
3922
- import * as z42 from "zod";
4158
+ import * as z43 from "zod";
3923
4159
  function webhooks({ get, post, request }) {
3924
4160
  function rotateWebhookSecret(id, inputOrCall, call) {
3925
4161
  const isInput = call !== void 0 || inputOrCall !== void 0 && "actionId" in inputOrCall;
3926
4162
  const input = isInput ? inputOrCall ?? {} : {};
3927
4163
  const options = isInput ? call : inputOrCall;
3928
4164
  return post(
3929
- `/webhooks/${z42.string().uuid().parse(id)}/rotate-secret`,
4165
+ `/webhooks/${z43.string().uuid().parse(id)}/rotate-secret`,
3930
4166
  webhookSecretSchema,
3931
4167
  webhookRotateInputSchema.parse(withActionId(input)),
3932
4168
  options
@@ -3934,7 +4170,7 @@ function webhooks({ get, post, request }) {
3934
4170
  }
3935
4171
  return {
3936
4172
  state: (id, call) => get(
3937
- `/webhooks/${z42.string().uuid().parse(id)}/state`,
4173
+ `/webhooks/${z43.string().uuid().parse(id)}/state`,
3938
4174
  webhookEndpointStateSchema,
3939
4175
  call
3940
4176
  ),
@@ -3945,24 +4181,24 @@ function webhooks({ get, post, request }) {
3945
4181
  call
3946
4182
  ),
3947
4183
  delete: (id, input, call) => post(
3948
- `/webhooks/${z42.string().uuid().parse(id)}/delete`,
4184
+ `/webhooks/${z43.string().uuid().parse(id)}/delete`,
3949
4185
  webhookEndpointStateSchema,
3950
4186
  webhookDeleteInputSchema.parse(withActionId(input)),
3951
4187
  call
3952
4188
  ),
3953
4189
  pause: (id, input = {}, call) => post(
3954
- `/webhooks/${z42.string().uuid().parse(id)}/pause`,
4190
+ `/webhooks/${z43.string().uuid().parse(id)}/pause`,
3955
4191
  webhookEndpointSchema,
3956
4192
  webhookControlInputSchema.parse(withActionId(input)),
3957
4193
  call
3958
4194
  ),
3959
4195
  resume: (id, input = {}, call) => post(
3960
- `/webhooks/${z42.string().uuid().parse(id)}/resume`,
4196
+ `/webhooks/${z43.string().uuid().parse(id)}/resume`,
3961
4197
  webhookEndpointSchema,
3962
4198
  webhookControlInputSchema.parse(withActionId(input)),
3963
4199
  call
3964
4200
  ),
3965
- list: (call) => get("/webhooks", z42.array(webhookEndpointSchema), call),
4201
+ list: (call) => get("/webhooks", z43.array(webhookEndpointSchema), call),
3966
4202
  /** Pass an `actionId` to recover the endpoint and its secret after a lost answer. */
3967
4203
  create: (input, call) => post(
3968
4204
  "/webhooks",
@@ -3971,7 +4207,7 @@ function webhooks({ get, post, request }) {
3971
4207
  call
3972
4208
  ),
3973
4209
  update: (id, input, call) => request(
3974
- `/webhooks/${z42.string().uuid().parse(id)}`,
4210
+ `/webhooks/${z43.string().uuid().parse(id)}`,
3975
4211
  webhookEndpointSchema,
3976
4212
  webhookUpdateSchema.parse(input),
3977
4213
  "PUT",
@@ -3979,14 +4215,14 @@ function webhooks({ get, post, request }) {
3979
4215
  ),
3980
4216
  /** @deprecated Use pause. Removed in 2.0.0. */
3981
4217
  disable: (id, call) => post(
3982
- `/webhooks/${z42.string().uuid().parse(id)}/disable`,
4218
+ `/webhooks/${z43.string().uuid().parse(id)}/disable`,
3983
4219
  webhookEndpointSchema,
3984
4220
  {},
3985
4221
  call
3986
4222
  ),
3987
4223
  rotateSecret: rotateWebhookSecret,
3988
4224
  deliveries: (id, query = {}, call) => get(
3989
- `/webhooks/${z42.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
4225
+ `/webhooks/${z43.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
3990
4226
  webhookDeliveryPageSchema,
3991
4227
  call
3992
4228
  ),
@@ -3996,7 +4232,7 @@ function webhooks({ get, post, request }) {
3996
4232
  */
3997
4233
  replay: (id, delivery, ...rest) => actionCommand(
3998
4234
  (webhook, input, call) => post(
3999
- `/webhooks/${z42.string().uuid().parse(webhook)}/deliveries/${z42.string().uuid().parse(delivery)}/replay`,
4235
+ `/webhooks/${z43.string().uuid().parse(webhook)}/deliveries/${z43.string().uuid().parse(delivery)}/replay`,
4000
4236
  webhookDeliverySchema,
4001
4237
  webhookControlInputSchema.parse(input),
4002
4238
  call
@@ -4007,7 +4243,7 @@ function webhooks({ get, post, request }) {
4007
4243
  var webhooksApi = (http) => webhooks(http);
4008
4244
 
4009
4245
  // src/server/client/identity-integrations.ts
4010
- import * as z43 from "zod";
4246
+ import * as z44 from "zod";
4011
4247
  function identityIntegrations({
4012
4248
  exchange,
4013
4249
  get,
@@ -4015,7 +4251,7 @@ function identityIntegrations({
4015
4251
  request
4016
4252
  }) {
4017
4253
  return {
4018
- list: (call) => get("/identity-integrations", z43.array(identityIntegrationSchema), call),
4254
+ list: (call) => get("/identity-integrations", z44.array(identityIntegrationSchema), call),
4019
4255
  /** The secret `token` is in this response only. */
4020
4256
  create: (input, call) => post(
4021
4257
  "/identity-integrations",
@@ -4045,7 +4281,7 @@ function identityIntegrations({
4045
4281
  * @deprecated Use `addSecret`, then `revokeSecret` the old secret once your app uses the new one.
4046
4282
  */
4047
4283
  rotate: (id, call) => post(
4048
- `/identity-integrations/${z43.string().uuid().parse(id)}/rotate`,
4284
+ `/identity-integrations/${z44.string().uuid().parse(id)}/rotate`,
4049
4285
  identityIntegrationSecretSchema,
4050
4286
  {},
4051
4287
  call
@@ -4055,7 +4291,7 @@ function identityIntegrations({
4055
4291
  * revoke them with `revokeSecret`. The new `token` is in this response only.
4056
4292
  */
4057
4293
  addSecret: (id, input = {}, call) => post(
4058
- `/identity-integrations/${z43.string().uuid().parse(id)}/secrets`,
4294
+ `/identity-integrations/${z44.string().uuid().parse(id)}/secrets`,
4059
4295
  identityIntegrationSecretSchema,
4060
4296
  credentialSecretInputSchema.parse(input),
4061
4297
  call
@@ -4065,7 +4301,7 @@ function identityIntegrations({
4065
4301
  * environment instead of answering it, as `createIntoAppSecret` does.
4066
4302
  */
4067
4303
  addSecretIntoAppSecret: (id, appSecret, input = {}, call) => post(
4068
- `/identity-integrations/${z43.string().uuid().parse(id)}/secrets`,
4304
+ `/identity-integrations/${z44.string().uuid().parse(id)}/secrets`,
4069
4305
  identityIntegrationAppSecretSchema,
4070
4306
  {
4071
4307
  ...credentialSecretInputSchema.parse(input),
@@ -4078,7 +4314,7 @@ function identityIntegrations({
4078
4314
  * revoked; disconnect the integration with `revoke` instead.
4079
4315
  */
4080
4316
  revokeSecret: (id, secret, call) => request(
4081
- `/identity-integrations/${z43.string().uuid().parse(id)}/secrets/${z43.string().uuid().parse(secret)}`,
4317
+ `/identity-integrations/${z44.string().uuid().parse(id)}/secrets/${z44.string().uuid().parse(secret)}`,
4082
4318
  identityIntegrationSchema,
4083
4319
  void 0,
4084
4320
  "DELETE",
@@ -4086,7 +4322,7 @@ function identityIntegrations({
4086
4322
  ),
4087
4323
  /** Makes one secret never expire. */
4088
4324
  removeSecretExpiry: (id, secret, call) => request(
4089
- `/identity-integrations/${z43.string().uuid().parse(id)}/secrets/${z43.string().uuid().parse(secret)}/expiry`,
4325
+ `/identity-integrations/${z44.string().uuid().parse(id)}/secrets/${z44.string().uuid().parse(secret)}/expiry`,
4090
4326
  identityIntegrationSchema,
4091
4327
  void 0,
4092
4328
  "DELETE",
@@ -4099,7 +4335,7 @@ function identityIntegrations({
4099
4335
  */
4100
4336
  kinds: (call) => get(
4101
4337
  "/identity-integrations/kinds",
4102
- z43.array(identityKindClaimSchema),
4338
+ z44.array(identityKindClaimSchema),
4103
4339
  call
4104
4340
  ),
4105
4341
  /**
@@ -4111,7 +4347,7 @@ function identityIntegrations({
4111
4347
  setAccountVouching: (id, input, call) => (
4112
4348
  // The action ID's receipt makes a repeat apply once, so the client may resend it.
4113
4349
  exchange(
4114
- `/identity-integrations/${z43.string().uuid().parse(id)}/account-vouching`,
4350
+ `/identity-integrations/${z44.string().uuid().parse(id)}/account-vouching`,
4115
4351
  identityIntegrationSchema,
4116
4352
  identityIntegrationAccountVouchingInputSchema.parse(
4117
4353
  withActionId(input)
@@ -4126,8 +4362,8 @@ function identityIntegrations({
4126
4362
  * and keep attributing tracker records; unlink them on the member to stop that.
4127
4363
  */
4128
4364
  revoke: (id, call) => request(
4129
- `/identity-integrations/${z43.string().uuid().parse(id)}`,
4130
- z43.null(),
4365
+ `/identity-integrations/${z44.string().uuid().parse(id)}`,
4366
+ z44.null(),
4131
4367
  void 0,
4132
4368
  "DELETE",
4133
4369
  call
@@ -4137,35 +4373,35 @@ function identityIntegrations({
4137
4373
  var identityIntegrationsApi = (http) => identityIntegrations(http);
4138
4374
 
4139
4375
  // src/server/audit.ts
4140
- import * as z44 from "zod";
4141
- var auditRecordSchema = /* @__PURE__ */ (() => z44.object({
4142
- id: z44.string(),
4143
- action: z44.string(),
4144
- actor: z44.string().nullable(),
4376
+ import * as z45 from "zod";
4377
+ var auditRecordSchema = /* @__PURE__ */ (() => z45.object({
4378
+ id: z45.string(),
4379
+ action: z45.string(),
4380
+ actor: z45.string().nullable(),
4145
4381
  user: operatorUserSchema.nullable().optional(),
4146
- detail: z44.string(),
4147
- at: z44.number(),
4148
- attempt: z44.string().nullable()
4382
+ detail: z45.string(),
4383
+ at: z45.number(),
4384
+ attempt: z45.string().nullable()
4149
4385
  }).refine((record3) => !record3.user || record3.user.id === record3.actor, {
4150
4386
  message: "User profile must match the recorded actor",
4151
4387
  path: ["user"]
4152
4388
  }))();
4153
- var auditQuerySchema = /* @__PURE__ */ (() => z44.strictObject({
4154
- category: z44.enum(["reviews", "rewards", "configuration"]).optional(),
4155
- q: z44.string().max(200).optional(),
4389
+ var auditQuerySchema = /* @__PURE__ */ (() => z45.strictObject({
4390
+ category: z45.enum(["reviews", "rewards", "configuration"]).optional(),
4391
+ q: z45.string().max(200).optional(),
4156
4392
  limit: pageLimit,
4157
4393
  cursor: pageCursorSchema.optional()
4158
4394
  }))();
4159
4395
  var auditListQuerySchema = /* @__PURE__ */ (() => auditQuerySchema.extend({
4160
- category: z44.enum(["reviews", "rewards", "configuration", "test-members"]).optional()
4396
+ category: z45.enum(["reviews", "rewards", "configuration", "test-members"]).optional()
4161
4397
  }))();
4162
4398
  var accessHistoryQuerySchema = /* @__PURE__ */ (() => auditQuerySchema.omit({
4163
4399
  category: true
4164
4400
  }))();
4165
- var auditPageSchema = /* @__PURE__ */ (() => z44.object({
4166
- items: z44.array(auditRecordSchema),
4167
- total: z44.number().int().nonnegative(),
4168
- nextCursor: z44.string().nullable()
4401
+ var auditPageSchema = /* @__PURE__ */ (() => z45.object({
4402
+ items: z45.array(auditRecordSchema),
4403
+ total: z45.number().int().nonnegative(),
4404
+ nextCursor: z45.string().nullable()
4169
4405
  }))();
4170
4406
 
4171
4407
  // src/server/client/audit.ts
@@ -4262,7 +4498,7 @@ function discordRoles({ get, post }) {
4262
4498
  var discordRolesApi = (http) => discordRoles(http);
4263
4499
 
4264
4500
  // src/server/client/test-members.ts
4265
- import * as z45 from "zod";
4501
+ import * as z46 from "zod";
4266
4502
  function testMembers({ get, post }) {
4267
4503
  return {
4268
4504
  create: (input, call) => post(
@@ -4271,7 +4507,7 @@ function testMembers({ get, post }) {
4271
4507
  testMemberCreateSchema.parse(withActionId(input)),
4272
4508
  call
4273
4509
  ),
4274
- list: (call) => get("/test-members", z45.array(testMemberSchema), call),
4510
+ list: (call) => get("/test-members", z46.array(testMemberSchema), call),
4275
4511
  history: (member, query = {}, call) => get(
4276
4512
  `/test-members/${identifier.parse(member)}/history${queryString(testMemberHistoryQuerySchema.parse(query))}`,
4277
4513
  testMemberHistorySchema,
@@ -4290,7 +4526,7 @@ function testMembers({ get, post }) {
4290
4526
  */
4291
4527
  uploadEvidence: (member, file, input = {}, call) => {
4292
4528
  const { actionId: actionId3 } = withActionId(
4293
- z45.object({ actionId: identifier.optional() }).strict().parse(input)
4529
+ z46.object({ actionId: identifier.optional() }).strict().parse(input)
4294
4530
  );
4295
4531
  return post(
4296
4532
  `/test-members/${identifier.parse(member)}/evidence`,
@@ -4549,79 +4785,79 @@ function memberImports({ get, post }) {
4549
4785
  var memberImportsApi = (http) => memberImports(http);
4550
4786
 
4551
4787
  // src/server/client/members.ts
4552
- import * as z50 from "zod";
4788
+ import * as z51 from "zod";
4553
4789
 
4554
4790
  // src/server/members.ts
4555
- import * as z48 from "zod";
4791
+ import * as z49 from "zod";
4556
4792
 
4557
4793
  // src/server/member-bans.ts
4558
- import * as z46 from "zod";
4559
- var memberBanRollbackSchema = /* @__PURE__ */ (() => z46.object({
4560
- completions: z46.boolean().default(false),
4561
- referralPayouts: z46.boolean().default(false),
4562
- pointAwards: z46.boolean().default(false)
4794
+ import * as z47 from "zod";
4795
+ var memberBanRollbackSchema = /* @__PURE__ */ (() => z47.object({
4796
+ completions: z47.boolean().default(false),
4797
+ referralPayouts: z47.boolean().default(false),
4798
+ pointAwards: z47.boolean().default(false)
4563
4799
  }).strict())();
4564
- var banReason = /* @__PURE__ */ (() => z46.string().trim().min(1).max(500))();
4565
- var memberBanInputSchema = /* @__PURE__ */ (() => z46.object({
4800
+ var banReason = /* @__PURE__ */ (() => z47.string().trim().min(1).max(500))();
4801
+ var memberBanInputSchema = /* @__PURE__ */ (() => z47.object({
4566
4802
  actionId: identifier,
4567
4803
  reason: banReason,
4568
4804
  rollback: memberBanRollbackSchema.optional()
4569
4805
  }).strict())();
4570
- var memberBanPreviewInputSchema = /* @__PURE__ */ (() => z46.object({ rollback: memberBanRollbackSchema.optional() }).strict())();
4571
- var memberUnbanInputSchema = /* @__PURE__ */ (() => z46.object({
4806
+ var memberBanPreviewInputSchema = /* @__PURE__ */ (() => z47.object({ rollback: memberBanRollbackSchema.optional() }).strict())();
4807
+ var memberUnbanInputSchema = /* @__PURE__ */ (() => z47.object({
4572
4808
  actionId: identifier,
4573
4809
  reason: banReason,
4574
- restoreCompletions: z46.boolean().default(false)
4810
+ restoreCompletions: z47.boolean().default(false)
4575
4811
  }).strict())();
4576
- var points2 = /* @__PURE__ */ (() => z46.number().int().nonnegative())();
4577
- var memberBanOutcomeSchema = /* @__PURE__ */ (() => z46.object({
4812
+ var points2 = /* @__PURE__ */ (() => z47.number().int().nonnegative())();
4813
+ var memberBanOutcomeSchema = /* @__PURE__ */ (() => z47.object({
4578
4814
  attemptsRejected: points2,
4579
4815
  completionsRevoked: points2,
4580
4816
  completionsRestored: points2,
4581
- completionsKept: z46.array(
4582
- z46.object({ completion: identifier, code: z46.string() })
4817
+ completionsKept: z47.array(
4818
+ z47.object({ completion: identifier, code: z47.string() })
4583
4819
  ),
4584
4820
  entriesReversed: points2,
4585
4821
  referralAccounts: points2,
4586
- points: z46.array(
4587
- z46.object({ ledger: identifier, reversed: points2, unreversed: points2 })
4822
+ points: z47.array(
4823
+ z47.object({ ledger: identifier, reversed: points2, unreversed: points2 })
4588
4824
  ),
4589
- referralDebt: z46.array(z46.object({ ledger: identifier, amount: points2 }))
4825
+ referralDebt: z47.array(z47.object({ ledger: identifier, amount: points2 }))
4590
4826
  }))();
4591
- var runStatusSchema = /* @__PURE__ */ (() => z46.string())();
4592
- var runSchema = /* @__PURE__ */ (() => z46.object({
4827
+ var runStatusSchema = /* @__PURE__ */ (() => z47.string())();
4828
+ var runSchema = /* @__PURE__ */ (() => z47.object({
4593
4829
  status: runStatusSchema,
4594
- finishedAt: z46.number().int().nullable(),
4830
+ finishedAt: z47.number().int().nullable(),
4595
4831
  outcome: memberBanOutcomeSchema.nullable()
4596
4832
  }))();
4597
- var memberBanSchema = /* @__PURE__ */ (() => z46.object({
4833
+ var memberBanSchema = /* @__PURE__ */ (() => z47.object({
4598
4834
  id: identifier,
4599
4835
  member: identifier,
4600
- reason: z46.string(),
4601
- bannedAt: z46.number().int(),
4602
- bannedBy: z46.string().nullable(),
4836
+ reason: z47.string(),
4837
+ bannedAt: z47.number().int(),
4838
+ bannedBy: z47.string().nullable(),
4603
4839
  rollback: runSchema.extend({
4604
- completions: z46.boolean(),
4605
- referralPayouts: z46.boolean(),
4606
- pointAwards: z46.boolean()
4840
+ completions: z47.boolean(),
4841
+ referralPayouts: z47.boolean(),
4842
+ pointAwards: z47.boolean()
4607
4843
  }),
4608
- unban: z46.object({
4609
- reason: z46.string(),
4610
- unbannedAt: z46.number().int(),
4611
- by: z46.string().nullable(),
4612
- restoreCompletions: z46.boolean(),
4844
+ unban: z47.object({
4845
+ reason: z47.string(),
4846
+ unbannedAt: z47.number().int(),
4847
+ by: z47.string().nullable(),
4848
+ restoreCompletions: z47.boolean(),
4613
4849
  restore: runSchema.nullable()
4614
4850
  }).nullable()
4615
4851
  }))();
4616
- var memberBanPreviewSchema = /* @__PURE__ */ (() => z46.object({
4852
+ var memberBanPreviewSchema = /* @__PURE__ */ (() => z47.object({
4617
4853
  member: identifier,
4618
- banned: z46.boolean(),
4854
+ banned: z47.boolean(),
4619
4855
  attempts: points2,
4620
4856
  completions: points2,
4621
4857
  entries: points2,
4622
4858
  referralAccounts: points2,
4623
- points: z46.array(
4624
- z46.object({
4859
+ points: z47.array(
4860
+ z47.object({
4625
4861
  ledger: identifier,
4626
4862
  completions: points2,
4627
4863
  pointAwards: points2,
@@ -4632,11 +4868,11 @@ var memberBanPreviewSchema = /* @__PURE__ */ (() => z46.object({
4632
4868
  referralDebt: points2
4633
4869
  })
4634
4870
  ),
4635
- inviters: z46.array(
4636
- z46.object({
4871
+ inviters: z47.array(
4872
+ z47.object({
4637
4873
  member: identifier,
4638
- ledgers: z46.array(
4639
- z46.object({
4874
+ ledgers: z47.array(
4875
+ z47.object({
4640
4876
  ledger: identifier,
4641
4877
  bonus: points2,
4642
4878
  reversed: points2,
@@ -4648,13 +4884,13 @@ var memberBanPreviewSchema = /* @__PURE__ */ (() => z46.object({
4648
4884
  }))();
4649
4885
 
4650
4886
  // src/server/wallets.ts
4651
- import * as z47 from "zod";
4887
+ import * as z48 from "zod";
4652
4888
  var managedWalletSchema = /* @__PURE__ */ (() => linkedWalletSchema.extend({
4653
4889
  /**
4654
4890
  * True when the organization vouched for the wallet (a member import, or an app login's server at
4655
4891
  * sign-in), and the member has not proved it since. Absent from Relay versions without imports.
4656
4892
  */
4657
- imported: z47.boolean().optional(),
4893
+ imported: z48.boolean().optional(),
4658
4894
  /**
4659
4895
  * The app login that vouched for the wallet at sign-in, while `imported` is true and no member
4660
4896
  * import attached it. Absent from Relay versions without it.
@@ -4668,11 +4904,11 @@ var managedWalletSchema = /* @__PURE__ */ (() => linkedWalletSchema.extend({
4668
4904
  *
4669
4905
  * @experimental A minor release can change `.sol` names.
4670
4906
  */
4671
- name: z47.string().optional(),
4672
- status: z47.enum(["linked", "unlinked"]),
4673
- unlinkedAt: z47.number().int().nullable(),
4907
+ name: z48.string().optional(),
4908
+ status: z48.enum(["linked", "unlinked"]),
4909
+ unlinkedAt: z48.number().int().nullable(),
4674
4910
  /** "member", or the operator or key that unlinked it. */
4675
- unlinkedBy: z47.string().nullable()
4911
+ unlinkedBy: z48.string().nullable()
4676
4912
  }))();
4677
4913
  var balanceCheckSchema = /* @__PURE__ */ (() => walletBalanceSchema.pick({
4678
4914
  chain: true,
@@ -4682,66 +4918,66 @@ var balanceCheckSchema = /* @__PURE__ */ (() => walletBalanceSchema.pick({
4682
4918
  wallets: true,
4683
4919
  observedAt: true
4684
4920
  }).extend({ attempt: identifier }))();
4685
- var walletBalanceChainsSchema = /* @__PURE__ */ (() => z47.object({
4686
- chains: z47.array(
4687
- z47.object({
4688
- chain: z47.union([
4689
- z47.literal(solanaMainnet),
4690
- z47.literal(solanaDevnet),
4921
+ var walletBalanceChainsSchema = /* @__PURE__ */ (() => z48.object({
4922
+ chains: z48.array(
4923
+ z48.object({
4924
+ chain: z48.union([
4925
+ z48.literal(solanaMainnet),
4926
+ z48.literal(solanaDevnet),
4691
4927
  cosmosNetworkSchema,
4692
4928
  evmChainIdSchema
4693
4929
  ]),
4694
- name: z47.string(),
4695
- testnet: z47.boolean()
4930
+ name: z48.string(),
4931
+ testnet: z48.boolean()
4696
4932
  })
4697
4933
  )
4698
4934
  }))();
4699
- var memberWalletUnlinkInputSchema = /* @__PURE__ */ (() => walletUnlinkInputSchema.extend({ reason: z47.string().trim().min(1).max(500) }).strict())();
4935
+ var memberWalletUnlinkInputSchema = /* @__PURE__ */ (() => walletUnlinkInputSchema.extend({ reason: z48.string().trim().min(1).max(500) }).strict())();
4700
4936
  var memberWalletSignInInputSchema = /* @__PURE__ */ (() => walletUnlinkInputSchema.extend({
4701
- enabled: z47.boolean(),
4702
- reason: z47.string().trim().min(1).max(500)
4937
+ enabled: z48.boolean(),
4938
+ reason: z48.string().trim().min(1).max(500)
4703
4939
  }).strict())();
4704
4940
 
4705
4941
  // src/server/members.ts
4706
- var memberSchema = /* @__PURE__ */ (() => z48.object({
4707
- id: z48.string(),
4708
- test: z48.boolean().optional(),
4709
- name: z48.string().nullable().optional(),
4710
- accounts: z48.array(memberAccountSchema).default([]),
4942
+ var memberSchema = /* @__PURE__ */ (() => z49.object({
4943
+ id: z49.string(),
4944
+ test: z49.boolean().optional(),
4945
+ name: z49.string().nullable().optional(),
4946
+ accounts: z49.array(memberAccountSchema).default([]),
4711
4947
  /** The member's linked app identities, by kind. Absent from Relay versions without it. */
4712
- appIdentities: z48.array(memberAppIdentitySchema).optional(),
4713
- attempts: z48.number(),
4714
- completions: z48.number(),
4715
- rewards: z48.number(),
4716
- lastActivity: z48.number().nullable(),
4948
+ appIdentities: z49.array(memberAppIdentitySchema).optional(),
4949
+ attempts: z49.number(),
4950
+ completions: z49.number(),
4951
+ rewards: z49.number(),
4952
+ lastActivity: z49.number().nullable(),
4717
4953
  /**
4718
4954
  * When the customer erased the member (`members.erase`), in Unix milliseconds: it keeps its ID
4719
4955
  * and accounting, with no profile, accounts or identities. Absent on a member that was not erased.
4720
4956
  */
4721
- erasedAt: z48.number().optional(),
4957
+ erasedAt: z49.number().optional(),
4722
4958
  /**
4723
4959
  * When an operator banned the member (`members.ban`), in Unix milliseconds. Absent on a member
4724
4960
  * who is not banned now.
4725
4961
  *
4726
4962
  * @experimental A minor release can change member bans.
4727
4963
  */
4728
- bannedAt: z48.number().optional()
4964
+ bannedAt: z49.number().optional()
4729
4965
  }))();
4730
- var managedOAuthAccountBaseSchema = /* @__PURE__ */ (() => z48.object({
4731
- provider: z48.enum(["x", "discord"]),
4732
- revision: z48.number().int().nonnegative()
4966
+ var managedOAuthAccountBaseSchema = /* @__PURE__ */ (() => z49.object({
4967
+ provider: z49.enum(["x", "discord"]),
4968
+ revision: z49.number().int().nonnegative()
4733
4969
  }))();
4734
- var managedOAuthAccountSchema = /* @__PURE__ */ (() => z48.discriminatedUnion("status", [
4970
+ var managedOAuthAccountSchema = /* @__PURE__ */ (() => z49.discriminatedUnion("status", [
4735
4971
  managedOAuthAccountBaseSchema.extend({
4736
- status: z48.literal("connected"),
4737
- subject: z48.string().min(1),
4738
- linkedAt: z48.number(),
4972
+ status: z49.literal("connected"),
4973
+ subject: z49.string().min(1),
4974
+ linkedAt: z49.number(),
4739
4975
  /**
4740
4976
  * True when the organization vouched for the account, not the member's proof: a member import
4741
4977
  * attached it, or an app login's server did at sign-in (`vouchedBy`). Absent from Relay
4742
4978
  * versions without imports.
4743
4979
  */
4744
- imported: z48.boolean().optional(),
4980
+ imported: z49.boolean().optional(),
4745
4981
  /**
4746
4982
  * The app login that vouched for the account at sign-in, for an account with `imported` set
4747
4983
  * that no member import attached. Absent from Relay versions without it.
@@ -4751,26 +4987,26 @@ var managedOAuthAccountSchema = /* @__PURE__ */ (() => z48.discriminatedUnion("s
4751
4987
  * True for a real account an operator linked to a test member without OAuth
4752
4988
  * (`testMembers.linkAccount`). Absent from Relay versions without it.
4753
4989
  */
4754
- testLinked: z48.boolean().optional(),
4990
+ testLinked: z49.boolean().optional(),
4755
4991
  ...identitySourceFields
4756
4992
  }),
4757
- managedOAuthAccountBaseSchema.extend({ status: z48.literal("disconnected") })
4993
+ managedOAuthAccountBaseSchema.extend({ status: z49.literal("disconnected") })
4758
4994
  ]))();
4759
4995
  var managedTelegramAccountBaseSchema = /* @__PURE__ */ (() => managedOAuthAccountBaseSchema.extend({
4760
- provider: z48.literal("telegram")
4996
+ provider: z49.literal("telegram")
4761
4997
  }))();
4762
- var managedTelegramAccountSchema = /* @__PURE__ */ (() => z48.discriminatedUnion("status", [
4998
+ var managedTelegramAccountSchema = /* @__PURE__ */ (() => z49.discriminatedUnion("status", [
4763
4999
  managedTelegramAccountBaseSchema.extend({
4764
- status: z48.literal("connected"),
5000
+ status: z49.literal("connected"),
4765
5001
  /** The numeric Telegram user ID. */
4766
- subject: z48.string().min(1),
4767
- linkedAt: z48.number(),
5002
+ subject: z49.string().min(1),
5003
+ linkedAt: z49.number(),
4768
5004
  /**
4769
5005
  * True when the organization vouched for the account, not the member's proof: a member import
4770
5006
  * attached it, or an app login's server did at sign-in (`vouchedBy`). Absent from Relay
4771
5007
  * versions without it.
4772
5008
  */
4773
- imported: z48.boolean().optional(),
5009
+ imported: z49.boolean().optional(),
4774
5010
  /**
4775
5011
  * The app login that vouched for the account at sign-in, for an account with `imported` set
4776
5012
  * that no member import attached. Absent from Relay versions without it.
@@ -4779,14 +5015,14 @@ var managedTelegramAccountSchema = /* @__PURE__ */ (() => z48.discriminatedUnion
4779
5015
  ...identitySourceFields
4780
5016
  }),
4781
5017
  managedTelegramAccountBaseSchema.extend({
4782
- status: z48.literal("disconnected")
5018
+ status: z49.literal("disconnected")
4783
5019
  })
4784
5020
  ]))();
4785
- var memberOAuthUnlinkInputSchema = /* @__PURE__ */ (() => z48.object({
4786
- provider: z48.enum(["x", "discord"]),
4787
- subject: z48.string().min(1).max(4096),
4788
- revision: z48.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
4789
- reason: z48.string().trim().min(1).max(500)
5021
+ var memberOAuthUnlinkInputSchema = /* @__PURE__ */ (() => z49.object({
5022
+ provider: z49.enum(["x", "discord"]),
5023
+ subject: z49.string().min(1).max(4096),
5024
+ revision: z49.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
5025
+ reason: z49.string().trim().min(1).max(500)
4790
5026
  }).strict())();
4791
5027
  var memberTelegramUnlinkInputSchema = /* @__PURE__ */ (() => memberOAuthUnlinkInputSchema.omit({ provider: true }).strict())();
4792
5028
  var managedMemberIdentitySchema = /* @__PURE__ */ (() => memberIdentitySchema.extend({
@@ -4795,7 +5031,7 @@ var managedMemberIdentitySchema = /* @__PURE__ */ (() => memberIdentitySchema.ex
4795
5031
  * login's server at sign-in), until the member links that provider's account, or signs in with
4796
5032
  * the X account, through Domino. Absent from Relay versions without imports.
4797
5033
  */
4798
- imported: z48.boolean().optional(),
5034
+ imported: z49.boolean().optional(),
4799
5035
  /**
4800
5036
  * The app login that vouched for the account at sign-in, for an `imported` account no member
4801
5037
  * import attached. Absent from Relay versions without it.
@@ -4805,40 +5041,40 @@ var managedMemberIdentitySchema = /* @__PURE__ */ (() => memberIdentitySchema.ex
4805
5041
  * True for a real X or Discord account an operator linked to a test member without OAuth
4806
5042
  * (`testMembers.linkAccount`). Absent from Relay versions without it.
4807
5043
  */
4808
- testLinked: z48.boolean().optional(),
5044
+ testLinked: z49.boolean().optional(),
4809
5045
  ...identitySourceFields,
4810
- status: z48.enum(["linked", "unlinked"]),
4811
- unlinkedAt: z48.number().int().nullable(),
5046
+ status: z49.enum(["linked", "unlinked"]),
5047
+ unlinkedAt: z49.number().int().nullable(),
4812
5048
  /** The operator or key that unlinked it. */
4813
- unlinkedBy: z48.string().nullable()
5049
+ unlinkedBy: z49.string().nullable()
4814
5050
  }))();
4815
- var memberIdentityChangeInputSchema = /* @__PURE__ */ (() => z48.object({
5051
+ var memberIdentityChangeInputSchema = /* @__PURE__ */ (() => z49.object({
4816
5052
  kind: appIdentityKindSchema,
4817
- subject: z48.string().min(1).max(256),
4818
- reason: z48.string().trim().min(1).max(500)
5053
+ subject: z49.string().min(1).max(256),
5054
+ reason: z49.string().trim().min(1).max(500)
4819
5055
  }).strict())();
4820
- var memberDetailSchema = /* @__PURE__ */ (() => z48.object({
5056
+ var memberDetailSchema = /* @__PURE__ */ (() => z49.object({
4821
5057
  snapshot: snapshotSchema,
4822
5058
  member: memberSchema,
4823
5059
  progress: memberProgressSchema,
4824
5060
  /** Up to 25 revoked completions with an unreversed point remainder, newest first. */
4825
- revocationShortfalls: z48.array(completionRevocationShortfallSchema).default([]),
5061
+ revocationShortfalls: z49.array(completionRevocationShortfallSchema).default([]),
4826
5062
  /** Up to 25 revoked completions, newest first. Relay older than restore leaves it out. */
4827
- revokedCompletions: z48.array(revokedCompletionSchema).optional(),
5063
+ revokedCompletions: z49.array(revokedCompletionSchema).optional(),
4828
5064
  /** Current and historical campaign enrollment state, including inactive enrollments. */
4829
- campaignEnrollments: z48.array(campaignEnrollmentSchema).default([]),
4830
- passes: z48.array(
4831
- z48.object({
4832
- provider: z48.string(),
4833
- event: z48.string(),
4834
- subject: z48.string(),
5065
+ campaignEnrollments: z49.array(campaignEnrollmentSchema).default([]),
5066
+ passes: z49.array(
5067
+ z49.object({
5068
+ provider: z49.string(),
5069
+ event: z49.string(),
5070
+ subject: z49.string(),
4835
5071
  attempt: identifier.nullable()
4836
5072
  })
4837
5073
  ).default([]),
4838
5074
  /** Linked and unlinked wallets. */
4839
- wallets: z48.array(managedWalletSchema),
5075
+ wallets: z49.array(managedWalletSchema),
4840
5076
  /** The member's 10 most recent recorded balance reads, newest first. */
4841
- balanceChecks: z48.array(balanceCheckSchema),
5077
+ balanceChecks: z49.array(balanceCheckSchema),
4842
5078
  /** The member's participant profile in this project. */
4843
5079
  profile: managedProfileSchema.nullable(),
4844
5080
  /**
@@ -4846,20 +5082,20 @@ var memberDetailSchema = /* @__PURE__ */ (() => z48.object({
4846
5082
  * member ID: their selected X and Discord accounts and their `app:<name>` identities in this
4847
5083
  * project, including app identities an operator unlinked, by kind.
4848
5084
  */
4849
- identities: z48.array(managedMemberIdentitySchema),
5085
+ identities: z49.array(managedMemberIdentitySchema),
4850
5086
  /**
4851
5087
  * The creator accounts the member linked (a YouTube channel), whose content managed tracker
4852
5088
  * sources attribute to them. Absent from Relay versions without creator accounts.
4853
5089
  */
4854
- creatorAccounts: z48.array(managedCreatorAccountSchema).optional(),
5090
+ creatorAccounts: z49.array(managedCreatorAccountSchema).optional(),
4855
5091
  /**
4856
5092
  * Who invited the member, when they accepted, and the member import that recorded it, or null
4857
5093
  * when nobody invited them. Absent from Relay versions before imported referrals.
4858
5094
  */
4859
- referral: z48.object({
5095
+ referral: z49.object({
4860
5096
  inviter: identifier,
4861
- acceptedAt: z48.number().int().nonnegative(),
4862
- suspended: z48.boolean(),
5097
+ acceptedAt: z49.number().int().nonnegative(),
5098
+ suspended: z49.boolean(),
4863
5099
  import: identifier.nullable()
4864
5100
  }).nullable().optional(),
4865
5101
  /**
@@ -4870,9 +5106,9 @@ var memberDetailSchema = /* @__PURE__ */ (() => z48.object({
4870
5106
  */
4871
5107
  ban: memberBanSchema.nullable().optional()
4872
5108
  }))();
4873
- var managedMemberProgressSchema = /* @__PURE__ */ (() => z48.object({
5109
+ var managedMemberProgressSchema = /* @__PURE__ */ (() => z49.object({
4874
5110
  member: identifier,
4875
- quests: z48.array(
5111
+ quests: z49.array(
4876
5112
  memberProgressSchema.shape.quests.element.extend({
4877
5113
  /** The streak as `members.get` reports it, without the list of qualifying days. */
4878
5114
  streak: streakProgressSchema.omit({ days: true }).nullable().optional()
@@ -4883,10 +5119,10 @@ var managedMemberProgressSchema = /* @__PURE__ */ (() => z48.object({
4883
5119
  /** Each point balance the member has, by balance ID. */
4884
5120
  balances: snapshotSchema.shape.balances
4885
5121
  }))();
4886
- var memberLookupSchema = /* @__PURE__ */ (() => z48.union([
4887
- z48.object({
4888
- provider: z48.string().min(1).max(200),
4889
- subject: z48.string().min(1).max(2048)
5122
+ var memberLookupSchema = /* @__PURE__ */ (() => z49.union([
5123
+ z49.object({
5124
+ provider: z49.string().min(1).max(200),
5125
+ subject: z49.string().min(1).max(2048)
4890
5126
  }).strict(),
4891
5127
  identityReferenceSchema.transform(
4892
5128
  (reference) => reference.kind === "wallet" ? { provider: reference.chain, subject: reference.address } : { provider: reference.kind, subject: reference.subject }
@@ -4897,50 +5133,46 @@ var memberLookupSchema = /* @__PURE__ */ (() => z48.union([
4897
5133
  subject: address
4898
5134
  }))
4899
5135
  ]))();
4900
- var booleanQuery = /* @__PURE__ */ (() => z48.union([
4901
- z48.boolean(),
4902
- z48.enum(["true", "false"]).transform((v) => v === "true")
4903
- ]))();
4904
- var managedMemberQuerySchema = /* @__PURE__ */ (() => z48.strictObject({
4905
- q: z48.string().max(200).optional(),
5136
+ var managedMemberQuerySchema = /* @__PURE__ */ (() => z49.strictObject({
5137
+ q: z49.string().max(200).optional(),
4906
5138
  needsReview: booleanQuery.optional(),
4907
- limit: z48.coerce.number().int().min(1).max(100).optional(),
5139
+ limit: z49.coerce.number().int().min(1).max(100).optional(),
4908
5140
  cursor: pageCursorSchema.optional()
4909
5141
  }))();
4910
- var managedMemberPageSchema = /* @__PURE__ */ (() => z48.object({
4911
- items: z48.array(memberSchema),
4912
- total: z48.number().int().nonnegative(),
4913
- nextCursor: z48.string().nullable()
5142
+ var managedMemberPageSchema = /* @__PURE__ */ (() => z49.object({
5143
+ items: z49.array(memberSchema),
5144
+ total: z49.number().int().nonnegative(),
5145
+ nextCursor: z49.string().nullable()
4914
5146
  }))();
4915
5147
 
4916
5148
  // src/server/member-erasure.ts
4917
- import * as z49 from "zod";
5149
+ import * as z50 from "zod";
4918
5150
  var memberErasureInputSchema = evidenceRedactionInputSchema;
4919
- var memberErasureDeletedSchema = /* @__PURE__ */ (() => z49.object({
5151
+ var memberErasureDeletedSchema = /* @__PURE__ */ (() => z50.object({
4920
5152
  /** The profile: display name and avatar. 0 or 1. */
4921
- profiles: z49.number().int().nonnegative(),
5153
+ profiles: z50.number().int().nonnegative(),
4922
5154
  /** Sign-in identities. */
4923
- identities: z49.number().int().nonnegative(),
5155
+ identities: z50.number().int().nonnegative(),
4924
5156
  /** Linked X, Discord, Telegram, Google, Apple and email accounts. */
4925
- accounts: z49.number().int().nonnegative(),
5157
+ accounts: z50.number().int().nonnegative(),
4926
5158
  /** `app:<name>` identities your app's integration or an import gave. */
4927
- appIdentities: z49.number().int().nonnegative(),
5159
+ appIdentities: z50.number().int().nonnegative(),
4928
5160
  /** Linked wallet addresses. */
4929
- wallets: z49.number().int().nonnegative(),
5161
+ wallets: z50.number().int().nonnegative(),
4930
5162
  /** Signed-in sessions, ended at once. */
4931
- sessions: z49.number().int().nonnegative(),
5163
+ sessions: z50.number().int().nonnegative(),
4932
5164
  /** Marketing consent records. */
4933
- consents: z49.number().int().nonnegative(),
5165
+ consents: z50.number().int().nonnegative(),
4934
5166
  /** Leaderboard aliases. */
4935
- aliases: z49.number().int().nonnegative(),
5167
+ aliases: z50.number().int().nonnegative(),
4936
5168
  /** Attempts whose submitted evidence (photo, text, URL or answers) was deleted. */
4937
- evidence: z49.number().int().nonnegative(),
5169
+ evidence: z50.number().int().nonnegative(),
4938
5170
  /** Tracker records the member's accounts authored, whose stored content was forgotten. */
4939
- records: z49.number().int().nonnegative()
5171
+ records: z50.number().int().nonnegative()
4940
5172
  }))();
4941
- var memberErasureResultSchema = /* @__PURE__ */ (() => z49.object({
5173
+ var memberErasureResultSchema = /* @__PURE__ */ (() => z50.object({
4942
5174
  member: identifier,
4943
- erasedAt: z49.number().int(),
5175
+ erasedAt: z50.number().int(),
4944
5176
  deleted: memberErasureDeletedSchema
4945
5177
  }))();
4946
5178
 
@@ -5163,7 +5395,7 @@ function members({ get, post }) {
5163
5395
  /** Who each member is: up to 100 distinct IDs; unknown IDs come back without accounts. */
5164
5396
  people: (members2, call) => get(
5165
5397
  `/people${queryString({ ids: members2.join(",") })}`,
5166
- z50.array(personSchema),
5398
+ z51.array(personSchema),
5167
5399
  call
5168
5400
  ),
5169
5401
  /**
@@ -5173,7 +5405,7 @@ function members({ get, post }) {
5173
5405
  */
5174
5406
  oauthAccounts: (member, call) => get(
5175
5407
  `/members/${encodeURIComponent(member)}/oauth-accounts`,
5176
- z50.array(managedOAuthAccountSchema),
5408
+ z51.array(managedOAuthAccountSchema),
5177
5409
  call
5178
5410
  ),
5179
5411
  /**
@@ -5185,7 +5417,7 @@ function members({ get, post }) {
5185
5417
  */
5186
5418
  unlinkOAuthAccount: (member, input, call) => post(
5187
5419
  `/members/${encodeURIComponent(member)}/oauth-accounts/unlink`,
5188
- z50.array(managedOAuthAccountSchema),
5420
+ z51.array(managedOAuthAccountSchema),
5189
5421
  expectedRevision(memberOAuthUnlinkInputSchema).parse(input),
5190
5422
  call
5191
5423
  ),
@@ -5268,7 +5500,7 @@ function members({ get, post }) {
5268
5500
  */
5269
5501
  unlinkWallet: (member, input, call) => post(
5270
5502
  `/members/${encodeURIComponent(member)}/wallets/unlink`,
5271
- z50.array(managedWalletSchema),
5503
+ z51.array(managedWalletSchema),
5272
5504
  memberWalletUnlinkInputSchema.parse(input),
5273
5505
  call
5274
5506
  ),
@@ -5281,7 +5513,7 @@ function members({ get, post }) {
5281
5513
  */
5282
5514
  unlinkIdentity: (member, input, call) => post(
5283
5515
  `/members/${encodeURIComponent(member)}/identities/unlink`,
5284
- z50.array(managedMemberIdentitySchema),
5516
+ z51.array(managedMemberIdentitySchema),
5285
5517
  memberIdentityChangeInputSchema.parse(input),
5286
5518
  call
5287
5519
  ),
@@ -5292,7 +5524,7 @@ function members({ get, post }) {
5292
5524
  */
5293
5525
  relinkIdentity: (member, input, call) => post(
5294
5526
  `/members/${encodeURIComponent(member)}/identities/relink`,
5295
- z50.array(managedMemberIdentitySchema),
5527
+ z51.array(managedMemberIdentitySchema),
5296
5528
  memberIdentityChangeInputSchema.parse(input),
5297
5529
  call
5298
5530
  ),
@@ -5304,7 +5536,7 @@ function members({ get, post }) {
5304
5536
  */
5305
5537
  setWalletSignIn: (member, input, call) => post(
5306
5538
  `/members/${encodeURIComponent(member)}/wallets/sign-in`,
5307
- z50.array(managedWalletSchema),
5539
+ z51.array(managedWalletSchema),
5308
5540
  memberWalletSignInInputSchema.parse(input),
5309
5541
  call
5310
5542
  )
@@ -5354,76 +5586,76 @@ function domains({ get, post, raw }) {
5354
5586
  var domainsApi = (http) => domains(http);
5355
5587
 
5356
5588
  // src/server/connections.ts
5357
- import { z as z51 } from "zod";
5358
- var connectionPluginSchema = /* @__PURE__ */ (() => z51.string().max(40).regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "Use a kebab-case plugin ID"))();
5589
+ import { z as z52 } from "zod";
5590
+ var connectionPluginSchema = /* @__PURE__ */ (() => z52.string().max(40).regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "Use a kebab-case plugin ID"))();
5359
5591
  var knownConnectionStatuses = [
5360
5592
  "disconnected",
5361
5593
  "ready",
5362
5594
  "attention"
5363
5595
  ];
5364
- var connectionStatusSchema = /* @__PURE__ */ (() => z51.string().min(1))();
5596
+ var connectionStatusSchema = /* @__PURE__ */ (() => z52.string().min(1))();
5365
5597
  var knownConnectionReconnectReasons = ["revoked", "expired"];
5366
- var reconnectReasonSchema = /* @__PURE__ */ (() => z51.string().min(1))();
5367
- var connectionSecretFieldSchema = /* @__PURE__ */ (() => z51.object({
5368
- name: z51.string(),
5369
- label: z51.string(),
5370
- help: z51.string().nullable(),
5371
- set: z51.boolean()
5372
- }))();
5373
- var connectionSchema = /* @__PURE__ */ (() => z51.object({
5374
- plugin: z51.string(),
5375
- name: z51.string(),
5376
- environment: z51.enum(["test", "live"]),
5598
+ var reconnectReasonSchema = /* @__PURE__ */ (() => z52.string().min(1))();
5599
+ var connectionSecretFieldSchema = /* @__PURE__ */ (() => z52.object({
5600
+ name: z52.string(),
5601
+ label: z52.string(),
5602
+ help: z52.string().nullable(),
5603
+ set: z52.boolean()
5604
+ }))();
5605
+ var connectionSchema = /* @__PURE__ */ (() => z52.object({
5606
+ plugin: z52.string(),
5607
+ name: z52.string(),
5608
+ environment: z52.enum(["test", "live"]),
5377
5609
  status: connectionStatusSchema,
5378
- issue: z51.string().nullable(),
5379
- config: z51.record(z51.string(), z51.unknown()).nullable(),
5380
- configSchema: z51.record(z51.string(), z51.unknown()),
5381
- secrets: z51.array(connectionSecretFieldSchema),
5382
- revision: z51.number().int().nonnegative(),
5383
- connectedAt: z51.number().nullable(),
5384
- connectedBy: z51.string().nullable(),
5385
- updatedAt: z51.number().nullable(),
5610
+ issue: z52.string().nullable(),
5611
+ config: z52.record(z52.string(), z52.unknown()).nullable(),
5612
+ configSchema: z52.record(z52.string(), z52.unknown()),
5613
+ secrets: z52.array(connectionSecretFieldSchema),
5614
+ revision: z52.number().int().nonnegative(),
5615
+ connectedAt: z52.number().nullable(),
5616
+ connectedBy: z52.string().nullable(),
5617
+ updatedAt: z52.number().nullable(),
5386
5618
  // A Relay from before OAuth connections answers none.
5387
5619
  reconnectReason: reconnectReasonSchema.nullable().default(null),
5388
5620
  // A Relay from before dry runs answers none.
5389
- dryRun: z51.boolean().default(false)
5621
+ dryRun: z52.boolean().default(false)
5390
5622
  }))();
5391
- var connectionPageSchema = /* @__PURE__ */ (() => z51.object({
5392
- items: z51.array(connectionSchema),
5393
- nextCursor: z51.string().nullable()
5623
+ var connectionPageSchema = /* @__PURE__ */ (() => z52.object({
5624
+ items: z52.array(connectionSchema),
5625
+ nextCursor: z52.string().nullable()
5394
5626
  }))();
5395
- var actionId2 = /* @__PURE__ */ (() => z51.string().uuid().default(() => crypto.randomUUID()))();
5396
- var config = /* @__PURE__ */ (() => z51.record(z51.string(), z51.unknown()))();
5397
- var secrets = /* @__PURE__ */ (() => z51.record(z51.string().max(64), z51.string().min(1).max(8192)))();
5398
- var connectionConnectInputSchema = /* @__PURE__ */ (() => z51.strictObject({
5627
+ var actionId2 = /* @__PURE__ */ (() => z52.string().uuid().default(() => crypto.randomUUID()))();
5628
+ var config = /* @__PURE__ */ (() => z52.record(z52.string(), z52.unknown()))();
5629
+ var secrets = /* @__PURE__ */ (() => z52.record(z52.string().max(64), z52.string().min(1).max(8192)))();
5630
+ var connectionConnectInputSchema = /* @__PURE__ */ (() => z52.strictObject({
5399
5631
  config,
5400
5632
  secrets: secrets.default({}),
5401
- dryRun: z51.boolean().optional(),
5633
+ dryRun: z52.boolean().optional(),
5402
5634
  actionId: actionId2
5403
5635
  }))();
5404
- var connectionAuthorizeInputSchema = /* @__PURE__ */ (() => z51.strictObject({
5636
+ var connectionAuthorizeInputSchema = /* @__PURE__ */ (() => z52.strictObject({
5405
5637
  config: config.default({}),
5406
- returnTo: z51.string().url().max(2048).optional(),
5638
+ returnTo: z52.string().url().max(2048).optional(),
5407
5639
  actionId: actionId2
5408
5640
  }))();
5409
- var connectionAuthorizationSchema = /* @__PURE__ */ (() => z51.object({
5410
- authorizationUrl: z51.string().url(),
5411
- expiresAt: z51.number()
5641
+ var connectionAuthorizationSchema = /* @__PURE__ */ (() => z52.object({
5642
+ authorizationUrl: z52.string().url(),
5643
+ expiresAt: z52.number()
5412
5644
  }))();
5413
- var connectionAuthorizationCompleteInputSchema = /* @__PURE__ */ (() => z51.strictObject({
5414
- code: z51.string().min(1).max(200)
5645
+ var connectionAuthorizationCompleteInputSchema = /* @__PURE__ */ (() => z52.strictObject({
5646
+ code: z52.string().min(1).max(200)
5415
5647
  }))();
5416
- var connectionUpdateInputSchema = /* @__PURE__ */ (() => z51.strictObject({
5648
+ var connectionUpdateInputSchema = /* @__PURE__ */ (() => z52.strictObject({
5417
5649
  config: config.optional(),
5418
5650
  secrets: secrets.optional(),
5419
- expectedRevision: z51.number().int().nonnegative().optional(),
5651
+ expectedRevision: z52.number().int().nonnegative().optional(),
5420
5652
  actionId: actionId2
5421
5653
  }).refine(
5422
5654
  (input) => input.config !== void 0 || Object.keys(input.secrets ?? {}).length,
5423
5655
  { message: "Change the config, a secret, or both" }
5424
5656
  ))();
5425
- var connectionDisconnectInputSchema = /* @__PURE__ */ (() => z51.strictObject({
5426
- expectedRevision: z51.number().int().nonnegative().optional(),
5657
+ var connectionDisconnectInputSchema = /* @__PURE__ */ (() => z52.strictObject({
5658
+ expectedRevision: z52.number().int().nonnegative().optional(),
5427
5659
  actionId: actionId2
5428
5660
  }))();
5429
5661
  var knownPluginSlots = [
@@ -5434,29 +5666,29 @@ var knownPluginSlots = [
5434
5666
  "evaluator-capability",
5435
5667
  "identity"
5436
5668
  ];
5437
- var pluginSlotSchema = /* @__PURE__ */ (() => z51.string().min(1))();
5438
- var pluginSchema = /* @__PURE__ */ (() => z51.object({
5439
- id: z51.string(),
5440
- name: z51.string(),
5441
- slots: z51.array(pluginSlotSchema),
5442
- configSchema: z51.record(z51.string(), z51.unknown()),
5443
- secrets: z51.array(
5444
- z51.object({
5445
- name: z51.string(),
5446
- label: z51.string(),
5447
- help: z51.string().nullable()
5669
+ var pluginSlotSchema = /* @__PURE__ */ (() => z52.string().min(1))();
5670
+ var pluginSchema = /* @__PURE__ */ (() => z52.object({
5671
+ id: z52.string(),
5672
+ name: z52.string(),
5673
+ slots: z52.array(pluginSlotSchema),
5674
+ configSchema: z52.record(z52.string(), z52.unknown()),
5675
+ secrets: z52.array(
5676
+ z52.object({
5677
+ name: z52.string(),
5678
+ label: z52.string(),
5679
+ help: z52.string().nullable()
5448
5680
  })
5449
5681
  ),
5450
- events: z51.array(z51.string()),
5682
+ events: z52.array(z52.string()),
5451
5683
  // A Relay from before OAuth connections answers none.
5452
- oauth: z51.object({ configured: z51.boolean(), scopes: z51.array(z51.string()) }).nullable().default(null),
5453
- console: z51.object({ component: z51.string() }).nullable().default(null),
5684
+ oauth: z52.object({ configured: z52.boolean(), scopes: z52.array(z52.string()) }).nullable().default(null),
5685
+ console: z52.object({ component: z52.string() }).nullable().default(null),
5454
5686
  // A Relay from before dry runs answers none.
5455
- dryRun: z51.boolean().default(false)
5687
+ dryRun: z52.boolean().default(false)
5456
5688
  }))();
5457
- var pluginPageSchema = /* @__PURE__ */ (() => z51.object({
5458
- items: z51.array(pluginSchema),
5459
- nextCursor: z51.string().nullable()
5689
+ var pluginPageSchema = /* @__PURE__ */ (() => z52.object({
5690
+ items: z52.array(pluginSchema),
5691
+ nextCursor: z52.string().nullable()
5460
5692
  }))();
5461
5693
  var knownConnectionSyncKinds = ["connect", "resync"];
5462
5694
  var knownConnectionSyncStatuses = [
@@ -5464,53 +5696,53 @@ var knownConnectionSyncStatuses = [
5464
5696
  "finished",
5465
5697
  "failed"
5466
5698
  ];
5467
- var connectionSyncSchema = /* @__PURE__ */ (() => z51.object({
5468
- kind: z51.string().min(1),
5469
- status: z51.string().min(1),
5470
- done: z51.number().int().nonnegative(),
5471
- total: z51.number().int().nonnegative().nullable(),
5472
- startedAt: z51.number(),
5473
- finishedAt: z51.number().nullable()
5474
- }))();
5475
- var connectionActivitySchema = /* @__PURE__ */ (() => z51.object({
5476
- plugin: z51.string(),
5477
- environment: z51.enum(["test", "live"]),
5699
+ var connectionSyncSchema = /* @__PURE__ */ (() => z52.object({
5700
+ kind: z52.string().min(1),
5701
+ status: z52.string().min(1),
5702
+ done: z52.number().int().nonnegative(),
5703
+ total: z52.number().int().nonnegative().nullable(),
5704
+ startedAt: z52.number(),
5705
+ finishedAt: z52.number().nullable()
5706
+ }))();
5707
+ var connectionActivitySchema = /* @__PURE__ */ (() => z52.object({
5708
+ plugin: z52.string(),
5709
+ environment: z52.enum(["test", "live"]),
5478
5710
  status: connectionStatusSchema,
5479
- dryRun: z51.boolean(),
5480
- lastSyncAt: z51.number().nullable(),
5481
- failingSince: z51.number().nullable(),
5482
- consecutiveFailures: z51.number().int().nonnegative(),
5483
- members: z51.object({
5484
- synced: z51.number().int().nonnegative(),
5485
- skipped: z51.array(
5486
- z51.object({
5487
- reason: z51.string(),
5488
- members: z51.number().int().nonnegative()
5711
+ dryRun: z52.boolean(),
5712
+ lastSyncAt: z52.number().nullable(),
5713
+ failingSince: z52.number().nullable(),
5714
+ consecutiveFailures: z52.number().int().nonnegative(),
5715
+ members: z52.object({
5716
+ synced: z52.number().int().nonnegative(),
5717
+ skipped: z52.array(
5718
+ z52.object({
5719
+ reason: z52.string(),
5720
+ members: z52.number().int().nonnegative()
5489
5721
  })
5490
5722
  )
5491
5723
  }),
5492
5724
  sync: connectionSyncSchema.nullable(),
5493
- errors: z51.array(
5494
- z51.object({ at: z51.number(), kind: z51.string(), message: z51.string() })
5725
+ errors: z52.array(
5726
+ z52.object({ at: z52.number(), kind: z52.string(), message: z52.string() })
5495
5727
  )
5496
5728
  }))();
5497
- var connectionDryRunRequestSchema = /* @__PURE__ */ (() => z51.object({
5498
- id: z51.string(),
5499
- at: z51.number(),
5500
- member: z51.string().nullable(),
5501
- method: z51.string(),
5502
- path: z51.string(),
5503
- body: z51.unknown()
5729
+ var connectionDryRunRequestSchema = /* @__PURE__ */ (() => z52.object({
5730
+ id: z52.string(),
5731
+ at: z52.number(),
5732
+ member: z52.string().nullable(),
5733
+ method: z52.string(),
5734
+ path: z52.string(),
5735
+ body: z52.unknown()
5504
5736
  }))();
5505
- var connectionDryRunPageSchema = /* @__PURE__ */ (() => z51.object({
5506
- items: z51.array(connectionDryRunRequestSchema),
5507
- nextCursor: z51.string().nullable()
5737
+ var connectionDryRunPageSchema = /* @__PURE__ */ (() => z52.object({
5738
+ items: z52.array(connectionDryRunRequestSchema),
5739
+ nextCursor: z52.string().nullable()
5508
5740
  }))();
5509
- var connectionDryRunQuerySchema = /* @__PURE__ */ (() => z51.strictObject({
5510
- cursor: z51.string().min(1).max(40).optional(),
5511
- limit: z51.number().int().min(1).max(100).optional()
5741
+ var connectionDryRunQuerySchema = /* @__PURE__ */ (() => z52.strictObject({
5742
+ cursor: z52.string().min(1).max(40).optional(),
5743
+ limit: z52.number().int().min(1).max(100).optional()
5512
5744
  }))();
5513
- var connectionResyncInputSchema = /* @__PURE__ */ (() => z51.strictObject({ actionId: actionId2 }))();
5745
+ var connectionResyncInputSchema = /* @__PURE__ */ (() => z52.strictObject({ actionId: actionId2 }))();
5514
5746
 
5515
5747
  // src/server/client/connections.ts
5516
5748
  function connectionPath(plugin) {
@@ -5692,7 +5924,7 @@ function schedules({ request, get, post }) {
5692
5924
  var schedulesApi = (http) => schedules(http);
5693
5925
 
5694
5926
  // src/server/client/storage.ts
5695
- import * as z52 from "zod";
5927
+ import * as z53 from "zod";
5696
5928
  function storage({ get, post, raw }) {
5697
5929
  function clear(kind, name, input, call) {
5698
5930
  const path = `/storage/${kind}/${appSecretNameSchema.parse(name)}/clear`;
@@ -5736,7 +5968,7 @@ function storage({ get, post, raw }) {
5736
5968
  `/storage/sql/${appSecretNameSchema.parse(name)}/cell?${new URLSearchParams(
5737
5969
  {
5738
5970
  table,
5739
- row: String(z52.number().int().min(0).parse(options.row)),
5971
+ row: String(z53.number().int().min(0).parse(options.row)),
5740
5972
  column: options.column,
5741
5973
  ...options.cursor === void 0 ? {} : { cursor: pageCursorSchema.parse(options.cursor) }
5742
5974
  }
@@ -5848,61 +6080,83 @@ function campaigns({ post }) {
5848
6080
  var campaignsApi = (http) => campaigns(http);
5849
6081
 
5850
6082
  // src/server/client/quests.ts
5851
- import * as z55 from "zod";
6083
+ import * as z56 from "zod";
5852
6084
 
5853
6085
  // src/server/quests.ts
5854
- import * as z53 from "zod";
5855
- var questLifecycleInputSchema = /* @__PURE__ */ (() => z53.object({
6086
+ import * as z54 from "zod";
6087
+ var questLifecycleInputSchema = /* @__PURE__ */ (() => z54.object({
5856
6088
  quest: identifier,
5857
6089
  expectedRelease: identifier.optional(),
5858
- archived: z53.boolean(),
5859
- reason: z53.string().trim().min(1).max(500),
6090
+ archived: z54.boolean(),
6091
+ reason: z54.string().trim().min(1).max(500),
5860
6092
  actionId: identifier
5861
6093
  }).strict())();
5862
- var questLifecycleSchema = /* @__PURE__ */ (() => z53.object({
6094
+ var questLifecycleSchema = /* @__PURE__ */ (() => z54.object({
5863
6095
  quest: identifier,
5864
6096
  key: identifier.nullable(),
5865
- title: z53.string(),
6097
+ title: z54.string(),
5866
6098
  release: identifier,
5867
- lifecycle: z53.enum(["active", "paused", "archived"]),
5868
- changed: z53.boolean()
6099
+ lifecycle: z54.enum(["active", "paused", "archived"]),
6100
+ changed: z54.boolean()
5869
6101
  }))();
5870
6102
 
5871
6103
  // src/server/quest-stations.ts
5872
- import * as z54 from "zod";
6104
+ import * as z55 from "zod";
5873
6105
  var stationOperationTarget = (quest, station) => `station:${quest}:${station}`;
5874
- var stationRevocationInputSchema = /* @__PURE__ */ (() => z54.object({
5875
- reason: z54.string().trim().min(1).max(500),
6106
+ var stationRevocationInputSchema = /* @__PURE__ */ (() => z55.object({
6107
+ reason: z55.string().trim().min(1).max(500),
5876
6108
  actionId: identifier
5877
6109
  }).strict())();
5878
- var stationRevocationSchema = /* @__PURE__ */ (() => z54.object({
6110
+ var stationRevocationSchema = /* @__PURE__ */ (() => z55.object({
5879
6111
  quest: identifier,
5880
- station: z54.string(),
5881
- revoked: z54.boolean(),
5882
- reason: z54.string().nullable(),
5883
- actor: z54.string().nullable(),
6112
+ station: z55.string(),
6113
+ revoked: z55.boolean(),
6114
+ reason: z55.string().nullable(),
6115
+ actor: z55.string().nullable(),
5884
6116
  /** When it was last revoked or restored, epoch milliseconds. */
5885
- changedAt: z54.number().nullable(),
5886
- changed: z54.boolean()
5887
- }))();
5888
- var questStationStateSchema = /* @__PURE__ */ (() => z54.object({
5889
- key: z54.string(),
5890
- label: z54.string(),
5891
- opensAt: z54.number().optional(),
5892
- closesAt: z54.number().optional(),
5893
- status: z54.string(),
5894
- revocation: z54.object({
5895
- revoked: z54.boolean(),
5896
- reason: z54.string(),
5897
- actor: z54.string().nullable(),
5898
- changedAt: z54.number()
6117
+ changedAt: z55.number().nullable(),
6118
+ changed: z55.boolean()
6119
+ }))();
6120
+ var questStationStateSchema = /* @__PURE__ */ (() => z55.object({
6121
+ key: z55.string(),
6122
+ label: z55.string(),
6123
+ opensAt: z55.number().optional(),
6124
+ closesAt: z55.number().optional(),
6125
+ proof: z55.string().optional(),
6126
+ codeSet: z55.boolean().optional(),
6127
+ status: z55.string(),
6128
+ revocation: z55.object({
6129
+ revoked: z55.boolean(),
6130
+ reason: z55.string(),
6131
+ actor: z55.string().nullable(),
6132
+ changedAt: z55.number()
5899
6133
  }).nullable(),
5900
- completions: z54.number().int().nonnegative()
6134
+ completions: z55.number().int().nonnegative()
6135
+ }))();
6136
+ var stationCodeSchema = /* @__PURE__ */ (() => z55.string().min(6).max(64).regex(/^[A-Za-z0-9_-]+$/, "use letters, digits, - or _"))();
6137
+ var stationCodeInputSchema = /* @__PURE__ */ (() => z55.object({ code: stationCodeSchema, actionId: identifier }).strict())();
6138
+ var stationCodeGenerateInputSchema = /* @__PURE__ */ (() => z55.object({ actionId: identifier }).strict())();
6139
+ var stationScanPageSchema = /* @__PURE__ */ (() => z55.string().max(2048).refine((value) => {
6140
+ try {
6141
+ return new URL(value).protocol === "https:";
6142
+ } catch {
6143
+ return false;
6144
+ }
6145
+ }, "Use the https URL of your app's scan page"))();
6146
+ var stationCodeStateSchema = /* @__PURE__ */ (() => z55.object({
6147
+ quest: z55.string(),
6148
+ station: z55.string(),
6149
+ codeSet: z55.boolean(),
6150
+ replaced: z55.boolean()
6151
+ }))();
6152
+ var generatedStationCodeSchema = /* @__PURE__ */ (() => stationCodeStateSchema.extend({
6153
+ code: z55.string()
5901
6154
  }))();
5902
6155
 
5903
6156
  // src/server/client/quests.ts
5904
6157
  function quests(http) {
5905
- const { get, post } = http;
6158
+ const { get, post, exchange, raw } = http;
6159
+ const codePath = (quest, key2) => `/quests/${identifier.parse(quest)}/stations/${encodeURIComponent(key2)}/code`;
5906
6160
  const station = (verb) => (quest, key2, input, call) => post(
5907
6161
  `/quests/${identifier.parse(quest)}/stations/${encodeURIComponent(key2)}/${verb}`,
5908
6162
  stationRevocationSchema,
@@ -5938,7 +6192,7 @@ function quests(http) {
5938
6192
  */
5939
6193
  list: (quest, call) => get(
5940
6194
  `/quests/${identifier.parse(quest)}/stations`,
5941
- z55.array(questStationStateSchema),
6195
+ z56.array(questStationStateSchema),
5942
6196
  call
5943
6197
  ),
5944
6198
  /**
@@ -5957,20 +6211,89 @@ function quests(http) {
5957
6211
  *
5958
6212
  * @experimental A minor release can change check-in stations.
5959
6213
  */
5960
- restore: station("restore")
6214
+ restore: station("restore"),
6215
+ /**
6216
+ * Sets a code station's code in this environment, replacing any it had; requires `publish`.
6217
+ * Codes are environment bindings: test's and live's are separate, a promotion never copies
6218
+ * them, and a CLI session may set one in live. The answer never carries the code. A station
6219
+ * a transaction proves is refused with 422 `station-proof-mismatch`, one the quest's
6220
+ * current release lacks with 404 `not-found`, and a deployment that can't seal codes
6221
+ * answers 503 `not-configured`.
6222
+ *
6223
+ * @experimental A minor release can change check-in stations.
6224
+ */
6225
+ setCode: (quest, key2, input, call) => (
6226
+ // The action ID's receipt makes a repeat apply once, so the client may resend it.
6227
+ exchange(
6228
+ codePath(quest, key2),
6229
+ stationCodeStateSchema,
6230
+ stationCodeInputSchema.parse(withActionId(input)),
6231
+ "PUT",
6232
+ call,
6233
+ true
6234
+ )
6235
+ ),
6236
+ /**
6237
+ * Generates a code station's code in this environment, replacing any it had, and answers
6238
+ * it this once: 12 characters from an alphabet without look-alikes (no `0`/`O`, `1`/`I`/`l`).
6239
+ * No later read answers it. A retry with the same `actionId` answers the same code. Requires
6240
+ * `publish`, and is refused as `setCode` is.
6241
+ *
6242
+ * @experimental A minor release can change check-in stations.
6243
+ */
6244
+ generateCode: (quest, key2, input = {}, call) => post(
6245
+ `${codePath(quest, key2)}/generate`,
6246
+ generatedStationCodeSchema,
6247
+ stationCodeGenerateInputSchema.parse(withActionId(input)),
6248
+ call
6249
+ ),
6250
+ /**
6251
+ * Clears a code station's code in this environment; requires `publish`. Until it gets
6252
+ * another, the station takes no check-ins there. Clearing a station without a code changes
6253
+ * nothing (`replaced: false`).
6254
+ *
6255
+ * @experimental A minor release can change check-in stations.
6256
+ */
6257
+ clearCode: (quest, key2, call) => exchange(
6258
+ codePath(quest, key2),
6259
+ stationCodeStateSchema,
6260
+ void 0,
6261
+ "DELETE",
6262
+ call,
6263
+ true
6264
+ ),
6265
+ /**
6266
+ * A code station's printable QR code in this environment, as SVG: a link to your app's scan
6267
+ * page `url` (https) with the quest key, station key and the station's code added as `quest`,
6268
+ * `station` and `code` query parameters, and the station's label under it. Requires
6269
+ * `publish`, as the code it carries does. A station without a code is refused with 409
6270
+ * `station-code-not-set`, a station a transaction proves with 422 `station-proof-mismatch`,
6271
+ * and a `url` that is not https with 422 `validation-failed`.
6272
+ *
6273
+ * @experimental A minor release can change check-in stations.
6274
+ */
6275
+ codeQr: async (quest, key2, input, call) => {
6276
+ const response = await raw(
6277
+ `${codePath(quest, key2)}/qr${queryString({
6278
+ url: stationScanPageSchema.parse(input.url)
6279
+ })}`,
6280
+ call
6281
+ );
6282
+ return response.text();
6283
+ }
5961
6284
  },
5962
6285
  /**
5963
6286
  * Each quest's current release, the most recently published first, archived quests
5964
6287
  * included; requires `read` permission.
5965
6288
  */
5966
- list: (call) => get("/quests/list", z55.array(publishedReleaseSchema), call),
6289
+ list: (call) => get("/quests/list", z56.array(publishedReleaseSchema), call),
5967
6290
  /**
5968
6291
  * `list` without each release's evaluator `code`; requires `read` permission. Code is most of
5969
6292
  * a release's size, up to a megabyte each, so use this to show or match quests.
5970
6293
  */
5971
6294
  listWithoutCode: (call) => get(
5972
6295
  "/quests/list-without-code",
5973
- z55.array(publishedReleaseSchema.omit({ code: true })),
6296
+ z56.array(publishedReleaseSchema.omit({ code: true })),
5974
6297
  call
5975
6298
  ),
5976
6299
  /** Pending and exhausted asynchronous balance checks. Requires read. */
@@ -6017,7 +6340,7 @@ function quests(http) {
6017
6340
  */
6018
6341
  submissions: (member, call) => get(
6019
6342
  `/members/${encodeURIComponent(member)}/quest-submissions`,
6020
- z55.object({ items: z55.array(questSubmissionSchema) }),
6343
+ z56.object({ items: z56.array(questSubmissionSchema) }),
6021
6344
  call
6022
6345
  ),
6023
6346
  /**
@@ -6127,15 +6450,15 @@ function solana({ post }) {
6127
6450
  var solanaApi = (http) => solana(http);
6128
6451
 
6129
6452
  // src/server/client/discord.ts
6130
- import * as z56 from "zod";
6453
+ import * as z57 from "zod";
6131
6454
  function discord({ get, post }) {
6132
6455
  return {
6133
6456
  /** The project's Discord connection: its server and status; requires `read` permission. */
6134
6457
  connection: async (call) => {
6135
- const list = await get("/integrations", z56.array(z56.unknown()), call);
6458
+ const list = await get("/integrations", z57.array(z57.unknown()), call);
6136
6459
  return projectIntegrationSchema.parse(
6137
6460
  list.find(
6138
- (item) => z56.object({ provider: z56.literal("discord") }).safeParse(item).success
6461
+ (item) => z57.object({ provider: z57.literal("discord") }).safeParse(item).success
6139
6462
  )
6140
6463
  );
6141
6464
  },
@@ -6198,31 +6521,31 @@ function telegram({ request, get, post }) {
6198
6521
  var telegramApi = (http) => telegram(http);
6199
6522
 
6200
6523
  // src/server/projects.ts
6201
- import * as z57 from "zod";
6202
- var projectSetupSchema = /* @__PURE__ */ (() => z57.object({
6203
- mode: z57.enum(["new", "existing"]),
6204
- brief: z57.string().trim().min(1).max(4e3)
6524
+ import * as z58 from "zod";
6525
+ var projectSetupSchema = /* @__PURE__ */ (() => z58.object({
6526
+ mode: z58.enum(["new", "existing"]),
6527
+ brief: z58.string().trim().min(1).max(4e3)
6205
6528
  }).strict())();
6206
- var projectSchema = /* @__PURE__ */ (() => z57.object({
6529
+ var projectSchema = /* @__PURE__ */ (() => z58.object({
6207
6530
  /**
6208
6531
  * Names the project's hosted addresses. The server gives a new project, and accepts in a
6209
6532
  * slug change, only slugs of at least 3 characters that Domino does not reserve. This schema
6210
6533
  * checks only the format, so it parses every slug that exists.
6211
6534
  */
6212
- slug: z57.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
6213
- createdBy: z57.string().nullable().optional(),
6535
+ slug: z58.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
6536
+ createdBy: z58.string().nullable().optional(),
6214
6537
  creator: operatorUserSchema.nullable().optional(),
6215
6538
  /** A response, so fields a newer server adds to the setup are dropped, not rejected. */
6216
- setup: z57.object(projectSetupSchema.shape).optional(),
6539
+ setup: z58.object(projectSetupSchema.shape).optional(),
6217
6540
  /** The starter chosen at setup. A plain string, so later starters still parse. */
6218
- starter: z57.string().optional(),
6219
- id: z57.string().min(1),
6541
+ starter: z58.string().optional(),
6542
+ id: z58.string().min(1),
6220
6543
  organization: identifier,
6221
6544
  project: identifier,
6222
- name: z57.string(),
6223
- subtitle: z57.string(),
6224
- initials: z57.string(),
6225
- color: z57.string(),
6545
+ name: z58.string(),
6546
+ subtitle: z58.string(),
6547
+ initials: z58.string(),
6548
+ color: z58.string(),
6226
6549
  permissions: permissionListSchema,
6227
6550
  /**
6228
6551
  * Every permission the caller holds here, `dashboards` included, which `permissions` leaves
@@ -6230,8 +6553,8 @@ var projectSchema = /* @__PURE__ */ (() => z57.object({
6230
6553
  *
6231
6554
  * @experimental
6232
6555
  */
6233
- projectPermissions: z57.array(z57.string()).optional(),
6234
- environments: z57.array(environmentSchema)
6556
+ projectPermissions: z58.array(z58.string()).optional(),
6557
+ environments: z58.array(environmentSchema)
6235
6558
  }).refine(
6236
6559
  (project) => !project.creator || project.creator.id === project.createdBy,
6237
6560
  {
@@ -6239,103 +6562,103 @@ var projectSchema = /* @__PURE__ */ (() => z57.object({
6239
6562
  path: ["creator"]
6240
6563
  }
6241
6564
  ))();
6242
- var projectCreateInputSchema = /* @__PURE__ */ (() => z57.object({
6565
+ var projectCreateInputSchema = /* @__PURE__ */ (() => z58.object({
6243
6566
  actionId: identifier,
6244
- name: z57.string().trim().min(1).max(80),
6567
+ name: z58.string().trim().min(1).max(80),
6245
6568
  setup: projectSetupSchema.optional(),
6246
6569
  /** The starter a new hosted app begins from, with `setup.mode` "new". */
6247
6570
  starter: offeredStarterSchema.optional()
6248
6571
  }).strict())();
6249
- var projectInputSchema = /* @__PURE__ */ (() => z57.object({
6572
+ var projectInputSchema = /* @__PURE__ */ (() => z58.object({
6250
6573
  actionId: identifier,
6251
- name: z57.string().trim().min(1).max(80),
6574
+ name: z58.string().trim().min(1).max(80),
6252
6575
  setup: projectSetupSchema.optional(),
6253
6576
  /** The starter a new hosted app begins from, with `setup.mode` "new". */
6254
6577
  starter: starterIdSchema.optional()
6255
6578
  }).strict())();
6256
- var projectUpdateInputSchema = /* @__PURE__ */ (() => z57.union([
6257
- z57.object({ name: projectCreateInputSchema.shape.name }).strict(),
6258
- z57.object({
6579
+ var projectUpdateInputSchema = /* @__PURE__ */ (() => z58.union([
6580
+ z58.object({ name: projectCreateInputSchema.shape.name }).strict(),
6581
+ z58.object({
6259
6582
  slug: projectSchema.shape.slug,
6260
- confirm: z57.string().min(1).max(80)
6583
+ confirm: z58.string().min(1).max(80)
6261
6584
  }).strict()
6262
6585
  ]))();
6263
- var projectDeletionInputSchema = /* @__PURE__ */ (() => z57.object({ confirm: z57.string().min(1).max(80) }).strict())();
6264
- var projectDeletionSchema = /* @__PURE__ */ (() => z57.object({
6586
+ var projectDeletionInputSchema = /* @__PURE__ */ (() => z58.object({ confirm: z58.string().min(1).max(80) }).strict())();
6587
+ var projectDeletionSchema = /* @__PURE__ */ (() => z58.object({
6265
6588
  project: identifier,
6266
- purgeAfter: z57.number().int()
6589
+ purgeAfter: z58.number().int()
6267
6590
  }))();
6268
- var projectTransferInputSchema = /* @__PURE__ */ (() => z57.object({ organization: identifier, confirm: z57.string().min(1).max(80) }).strict())();
6269
- var projectTransferSchema = /* @__PURE__ */ (() => z57.object({
6591
+ var projectTransferInputSchema = /* @__PURE__ */ (() => z58.object({ organization: identifier, confirm: z58.string().min(1).max(80) }).strict())();
6592
+ var projectTransferSchema = /* @__PURE__ */ (() => z58.object({
6270
6593
  organization: identifier,
6271
6594
  project: identifier
6272
6595
  }))();
6273
- var accessSchema = /* @__PURE__ */ (() => z57.object({
6274
- actor: z57.string(),
6275
- organization: z57.string(),
6276
- admin: z57.boolean(),
6277
- local: z57.boolean(),
6278
- projects: z57.array(projectSchema),
6596
+ var accessSchema = /* @__PURE__ */ (() => z58.object({
6597
+ actor: z58.string(),
6598
+ organization: z58.string(),
6599
+ admin: z58.boolean(),
6600
+ local: z58.boolean(),
6601
+ projects: z58.array(projectSchema),
6279
6602
  /** The credential's own kind and scope, when it is an organization automation key. */
6280
- credential: z57.object({
6281
- kind: z57.string(),
6282
- id: z57.string(),
6283
- name: z57.string(),
6603
+ credential: z58.object({
6604
+ kind: z58.string(),
6605
+ id: z58.string(),
6606
+ name: z58.string(),
6284
6607
  /** The projects it reaches; null for every project of the organization. */
6285
- projects: z57.array(z57.string()).nullable(),
6286
- createProjects: z57.boolean(),
6608
+ projects: z58.array(z58.string()).nullable(),
6609
+ createProjects: z58.boolean(),
6287
6610
  permissions: permissionListSchema
6288
6611
  }).optional()
6289
6612
  }))();
6290
- var readinessSchema = /* @__PURE__ */ (() => z57.object({
6291
- checks: z57.array(
6292
- z57.object({
6293
- id: z57.string(),
6294
- status: z57.enum(["ready", "blocked"]),
6295
- title: z57.string(),
6296
- detail: z57.string()
6613
+ var readinessSchema = /* @__PURE__ */ (() => z58.object({
6614
+ checks: z58.array(
6615
+ z58.object({
6616
+ id: z58.string(),
6617
+ status: z58.enum(["ready", "blocked"]),
6618
+ title: z58.string(),
6619
+ detail: z58.string()
6297
6620
  })
6298
6621
  )
6299
6622
  }))();
6300
6623
 
6301
6624
  // src/server/page.ts
6302
- import * as z58 from "zod";
6303
- var querySchema = /* @__PURE__ */ (() => z58.object({
6304
- q: z58.string().max(200).default(""),
6305
- filter: z58.string().max(50).default("all"),
6306
- offset: z58.coerce.number().int().min(0).max(1e6).default(0),
6307
- limit: z58.coerce.number().int().min(1).max(100).default(25)
6625
+ import * as z59 from "zod";
6626
+ var querySchema = /* @__PURE__ */ (() => z59.object({
6627
+ q: z59.string().max(200).default(""),
6628
+ filter: z59.string().max(50).default("all"),
6629
+ offset: z59.coerce.number().int().min(0).max(1e6).default(0),
6630
+ limit: z59.coerce.number().int().min(1).max(100).default(25)
6308
6631
  }))();
6309
- var pageSchema = /* @__PURE__ */ (() => z58.object({
6632
+ var pageSchema = /* @__PURE__ */ (() => z59.object({
6310
6633
  snapshot: snapshotSchema,
6311
- members: z58.array(memberSchema),
6312
- people: z58.array(personSchema).default([]),
6634
+ members: z59.array(memberSchema),
6635
+ people: z59.array(personSchema).default([]),
6313
6636
  metrics: metricsSchema,
6314
- total: z58.number(),
6315
- offset: z58.number(),
6316
- limit: z58.number(),
6317
- inventory: z58.array(inventorySchema),
6318
- operations: z58.array(operationSchema).default([]),
6319
- audit: z58.array(auditRecordSchema).default([]),
6320
- questCounts: z58.record(z58.string(), z58.number())
6637
+ total: z59.number(),
6638
+ offset: z59.number(),
6639
+ limit: z59.number(),
6640
+ inventory: z59.array(inventorySchema),
6641
+ operations: z59.array(operationSchema).default([]),
6642
+ audit: z59.array(auditRecordSchema).default([]),
6643
+ questCounts: z59.record(z59.string(), z59.number())
6321
6644
  }))();
6322
6645
 
6323
6646
  // src/server/participant-sign-in.ts
6324
- import * as z59 from "zod";
6325
- var telegramBotIdSchema = /* @__PURE__ */ (() => z59.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789"))();
6326
- var participantSignInTelegramSchema = /* @__PURE__ */ (() => z59.object({
6327
- login: z59.boolean(),
6647
+ import * as z60 from "zod";
6648
+ var telegramBotIdSchema = /* @__PURE__ */ (() => z60.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789"))();
6649
+ var participantSignInTelegramSchema = /* @__PURE__ */ (() => z60.object({
6650
+ login: z60.boolean(),
6328
6651
  miniAppBotId: telegramBotIdSchema.nullable()
6329
6652
  }))();
6330
- var participantSignInSchema = /* @__PURE__ */ (() => z59.object({
6331
- providers: z59.array(
6332
- z59.object({ provider: authProviderSchema, configured: z59.boolean() })
6653
+ var participantSignInSchema = /* @__PURE__ */ (() => z60.object({
6654
+ providers: z60.array(
6655
+ z60.object({ provider: authProviderSchema, configured: z60.boolean() })
6333
6656
  ),
6334
- email: z59.boolean(),
6657
+ email: z60.boolean(),
6335
6658
  /** Wallet families: `"solana"`, `"eip155"`, `"cosmos"`. */
6336
6659
  wallets: walletSignInNetworksSchema,
6337
6660
  /** Why participants cannot sign in to this project, or null. */
6338
- issue: z59.string().nullable(),
6661
+ issue: z60.string().nullable(),
6339
6662
  /**
6340
6663
  * Telegram, outside `providers` in SDK 1.x: whether Domino configured Telegram Login, and the
6341
6664
  * bot whose Mini App participants sign in from, or null when Mini App sign-in is off. Absent
@@ -6347,10 +6670,10 @@ var participantSignInSchema = /* @__PURE__ */ (() => z59.object({
6347
6670
  * members can link accounts that trackers like `youtube.shorts()` read. Absent from older Relay
6348
6671
  * versions.
6349
6672
  */
6350
- creatorAccounts: z59.array(
6351
- z59.object({
6673
+ creatorAccounts: z60.array(
6674
+ z60.object({
6352
6675
  provider: creatorAccountProviderSchema,
6353
- configured: z59.boolean()
6676
+ configured: z60.boolean()
6354
6677
  })
6355
6678
  ).optional(),
6356
6679
  /**
@@ -6358,13 +6681,13 @@ var participantSignInSchema = /* @__PURE__ */ (() => z59.object({
6358
6681
  * the open sibling of `providers`, which SDK 1.x keeps to `AuthProvider`. A newer Relay may list
6359
6682
  * providers this SDK does not know. Absent from older Relay versions.
6360
6683
  */
6361
- signInProviders: z59.array(signInProviderOptionSchema).optional(),
6362
- updatedAt: z59.number().nullable(),
6363
- updatedBy: z59.string().nullable()
6684
+ signInProviders: z60.array(signInProviderOptionSchema).optional(),
6685
+ updatedAt: z60.number().nullable(),
6686
+ updatedBy: z60.string().nullable()
6364
6687
  }))();
6365
- var participantSignInInputSchema = /* @__PURE__ */ (() => z59.object({
6688
+ var participantSignInInputSchema = /* @__PURE__ */ (() => z60.object({
6366
6689
  wallets: walletSignInNetworksSchema,
6367
- telegram: z59.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
6690
+ telegram: z60.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
6368
6691
  }).strict())();
6369
6692
 
6370
6693
  // src/server/wallet-sign-in.ts
@@ -6912,9 +7235,9 @@ function decodeSolanaTransaction(transaction2) {
6912
7235
  }
6913
7236
 
6914
7237
  // src/server/hosted.ts
6915
- import * as z60 from "zod";
7238
+ import * as z61 from "zod";
6916
7239
  var hostedKeyPermissions = ["read", "points", "ingest"];
6917
- var hostedKeyPermissionList = /* @__PURE__ */ (() => z60.array(z60.string()).transform(
7240
+ var hostedKeyPermissionList = /* @__PURE__ */ (() => z61.array(z61.string()).transform(
6918
7241
  (values) => values.filter(
6919
7242
  (value) => hostedKeyPermissions.includes(value)
6920
7243
  )
@@ -6926,17 +7249,17 @@ var hostedManagementBindings = [
6926
7249
  "DOMINO_PROJECT",
6927
7250
  "DOMINO_ENVIRONMENT"
6928
7251
  ];
6929
- var hostedKeySecretSchema = /* @__PURE__ */ (() => z60.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key"))();
6930
- var hostedKeySchema = /* @__PURE__ */ (() => z60.object({
6931
- id: z60.string().uuid(),
7252
+ var hostedKeySecretSchema = /* @__PURE__ */ (() => z61.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key"))();
7253
+ var hostedKeySchema = /* @__PURE__ */ (() => z61.object({
7254
+ id: z61.string().uuid(),
6932
7255
  token: hostedKeySecretSchema,
6933
7256
  organization: identifier,
6934
7257
  project: identifier,
6935
- environment: z60.enum(["test", "live"]),
7258
+ environment: z61.enum(["test", "live"]),
6936
7259
  permissions: hostedKeyPermissionList,
6937
- expiresAt: z60.number().nullable()
7260
+ expiresAt: z61.number().nullable()
6938
7261
  }).strict())();
6939
- var hostedDeploymentKeySchema = /* @__PURE__ */ (() => hostedKeySchema.extend({ apiUrl: z60.string().url() }).strict())();
7262
+ var hostedDeploymentKeySchema = /* @__PURE__ */ (() => hostedKeySchema.extend({ apiUrl: z61.string().url() }).strict())();
6940
7263
  function hostedManagementClient(env) {
6941
7264
  const missing = hostedManagementBindings.filter((name) => !env[name]);
6942
7265
  if (missing.length) {
@@ -6944,7 +7267,7 @@ function hostedManagementClient(env) {
6944
7267
  `Missing ${missing.join(", ")}. Domino sets these for hosted apps and domino dev; update the project's vite.config.ts to forward them in development.`
6945
7268
  );
6946
7269
  }
6947
- const environment = z60.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
7270
+ const environment = z61.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
6948
7271
  const token = env.DOMINO_MANAGEMENT_KEY;
6949
7272
  return createManagementClient({
6950
7273
  baseUrl: env.DOMINO_API_URL.replace(/\/+$/, ""),
@@ -7531,6 +7854,12 @@ function openStation(card, request) {
7531
7854
  throw new QuestActionRefusal(`"${card.title}" has no station "${key2}"`, 404);
7532
7855
  }
7533
7856
  const station = card.stations.find((item) => item.key === key2);
7857
+ if (refusal?.code === "station-proof-mismatch") {
7858
+ throw new QuestActionRefusal(
7859
+ `${station.label} takes check-ins with its code, not a transaction`,
7860
+ 422
7861
+ );
7862
+ }
7534
7863
  if (refusal) {
7535
7864
  throw new QuestActionRefusal(`${station.label} is closed`, 409);
7536
7865
  }
@@ -7610,31 +7939,31 @@ async function findAndSubmit(client, card, chain, find) {
7610
7939
  }
7611
7940
 
7612
7941
  // src/server/development.ts
7613
- import * as z61 from "zod";
7614
- var developmentPreflightSchema = /* @__PURE__ */ (() => z61.object({
7615
- organization: z61.string(),
7616
- project: z61.string(),
7617
- environment: z61.enum(["test", "live"]),
7618
- identity: z61.object({
7619
- exchange: z61.literal("supported"),
7620
- activeIntegrations: z61.number().int().nonnegative()
7942
+ import * as z62 from "zod";
7943
+ var developmentPreflightSchema = /* @__PURE__ */ (() => z62.object({
7944
+ organization: z62.string(),
7945
+ project: z62.string(),
7946
+ environment: z62.enum(["test", "live"]),
7947
+ identity: z62.object({
7948
+ exchange: z62.literal("supported"),
7949
+ activeIntegrations: z62.number().int().nonnegative()
7621
7950
  }).optional(),
7622
- staging: z61.enum(["configured", "blocked"]),
7623
- development: z61.object({
7624
- status: z61.enum(["configured", "blocked"]),
7951
+ staging: z62.enum(["configured", "blocked"]),
7952
+ development: z62.object({
7953
+ status: z62.enum(["configured", "blocked"]),
7625
7954
  // How `domino dev` reaches the preview origin: a Cloudflare tunnel, or a direct route on a
7626
7955
  // local development stack. APIs that predate the field use tunnels.
7627
- transport: z61.enum(["tunnel", "direct"]).default("tunnel"),
7628
- missing: z61.array(z61.string()),
7629
- authentication: z61.array(z61.string())
7956
+ transport: z62.enum(["tunnel", "direct"]).default("tunnel"),
7957
+ missing: z62.array(z62.string()),
7958
+ authentication: z62.array(z62.string())
7630
7959
  }),
7631
- checks: z61.array(
7632
- z61.object({
7633
- id: z61.string(),
7634
- status: z61.enum(["ok", "error"]),
7635
- message: z61.string(),
7636
- missing: z61.array(z61.string()).optional(),
7637
- issues: z61.array(z61.string()).optional()
7960
+ checks: z62.array(
7961
+ z62.object({
7962
+ id: z62.string(),
7963
+ status: z62.enum(["ok", "error"]),
7964
+ message: z62.string(),
7965
+ missing: z62.array(z62.string()).optional(),
7966
+ issues: z62.array(z62.string()).optional()
7638
7967
  })
7639
7968
  )
7640
7969
  }))();
@@ -7647,7 +7976,7 @@ function clientFailure(error) {
7647
7976
  return new ManagementError({
7648
7977
  kind: "client",
7649
7978
  code: ManagementErrorCode.InvalidInput,
7650
- message: error instanceof z62.ZodError ? `Invalid management request: ${issueText(error.issues)}` : error instanceof Error ? error.message : "Invalid management request",
7979
+ message: error instanceof z63.ZodError ? `Invalid management request: ${issueText(error.issues)}` : error instanceof Error ? error.message : "Invalid management request",
7651
7980
  cause: error
7652
7981
  });
7653
7982
  }
@@ -7691,8 +8020,8 @@ function managementClient(options) {
7691
8020
  }
7692
8021
  return exchange(
7693
8022
  path,
7694
- z62.object({
7695
- status: z62.number(),
8023
+ z63.object({
8024
+ status: z63.number(),
7696
8025
  operationId: identifier.optional(),
7697
8026
  result: schema
7698
8027
  }),
@@ -7747,6 +8076,15 @@ function managementClient(options) {
7747
8076
  attempts: attemptsApi(http),
7748
8077
  passes: passesApi(http),
7749
8078
  completions: completionsApi(http),
8079
+ /**
8080
+ * Photo galleries: photo quests that declare `gallery`, and their accepted photos by day and
8081
+ * quest, which reviewers hide and unhide, and contest winners, which reviewers mark and may
8082
+ * reward. Reads, hiding and marking need `review`, as downloading a photo does; a mark's
8083
+ * reward also needs `confirm`.
8084
+ *
8085
+ * @experimental A minor release can change these methods and their result.
8086
+ */
8087
+ galleries: galleriesApi(http),
7750
8088
  /** Staff handover of a member's reward entitlement; requires `handover` permission. */
7751
8089
  handover: handoverApi(http),
7752
8090
  /** Members' reward entitlements; corrections require `review` permission. */
@@ -8089,6 +8427,10 @@ var managementResponseTables = /* @__PURE__ */ (() => responseTables({
8089
8427
  managedMemberIdentitySchema: () => managedMemberIdentitySchema,
8090
8428
  managedMemberPageSchema: () => managedMemberPageSchema,
8091
8429
  managedMemberProgressSchema: () => managedMemberProgressSchema,
8430
+ galleryListSchema: () => galleryListSchema,
8431
+ galleryPhotoPageSchema: () => galleryPhotoPageSchema,
8432
+ galleryPhotoHideResultSchema: () => galleryPhotoHideResultSchema,
8433
+ galleryWinnerResultSchema: () => galleryWinnerResultSchema,
8092
8434
  memberCompletionPageSchema: () => memberCompletionPageSchema,
8093
8435
  memberConsentHistorySchema: () => memberConsentHistorySchema,
8094
8436
  memberConsentListSchema: () => memberConsentListSchema,
@@ -8355,6 +8697,22 @@ export {
8355
8697
  evidenceRetentionResultSchema,
8356
8698
  evidenceRetentionSettingSchema,
8357
8699
  expectedRevision,
8700
+ galleryExportQuerySchema,
8701
+ galleryHiddenFilterSchema,
8702
+ galleryListSchema,
8703
+ galleryPhotoHiddenSchema,
8704
+ galleryPhotoHideInputSchema,
8705
+ galleryPhotoHideResultSchema,
8706
+ galleryPhotoPageSchema,
8707
+ galleryPhotoQuerySchema,
8708
+ galleryPhotoSchema,
8709
+ gallerySchema,
8710
+ galleryWinnerMarkInputSchema,
8711
+ galleryWinnerResultSchema,
8712
+ galleryWinnerRewardSchema,
8713
+ galleryWinnerSchema,
8714
+ galleryWinnerUnmarkInputSchema,
8715
+ generatedStationCodeSchema,
8358
8716
  grantRecordSchema,
8359
8717
  grantSchema,
8360
8718
  groupArchiveInputSchema,
@@ -8615,9 +8973,16 @@ export {
8615
8973
  starterIdSchema,
8616
8974
  starterTemplates,
8617
8975
  starters,
8976
+ stationCheckInSchema,
8977
+ stationCodeGenerateInputSchema,
8978
+ stationCodeInputSchema,
8979
+ stationCodeSchema,
8980
+ stationCodeStateSchema,
8981
+ stationCodeSubmissionSchema,
8618
8982
  stationOperationTarget,
8619
8983
  stationRevocationInputSchema,
8620
8984
  stationRevocationSchema,
8985
+ stationScanPageSchema,
8621
8986
  stockAdditionSchema,
8622
8987
  stockInputSchema,
8623
8988
  takesSolanaTransaction,