@domino-sdk/relay 1.24.1 → 1.30.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 (58) hide show
  1. package/dist/{accounts-B31dWEYD.d.ts → accounts-DRPENuZe.d.ts} +1 -1
  2. package/dist/{attempt-captures-JDIgz2lY.d.ts → attempt-captures-nMDnKGdI.d.ts} +2 -2
  3. package/dist/authoring.d.ts +59 -60
  4. package/dist/authoring.js +7 -7
  5. package/dist/{automatic-outcomes-T9lEIvTj.d.ts → automatic-outcomes-CHiFP_U-.d.ts} +2 -2
  6. package/dist/avatar.d.ts +2 -2
  7. package/dist/browser.d.ts +10 -10
  8. package/dist/browser.js +10 -10
  9. package/dist/capability-error-FQGGb5xS.d.ts +71 -0
  10. package/dist/{chunk-UCZGXYCN.js → chunk-24BMKPCY.js} +10 -10
  11. package/dist/{chunk-MC6V6VMG.js → chunk-4OC7REYX.js} +1 -1
  12. package/dist/{chunk-JKFSDBQX.js → chunk-AOB3N4QO.js} +1 -1
  13. package/dist/{chunk-6UFXPKLA.js → chunk-BVEWY2ZL.js} +99 -39
  14. package/dist/{chunk-MRU7GX2V.js → chunk-C3KL5SGM.js} +21 -8
  15. package/dist/{chunk-WOGCRDFT.js → chunk-CCTZIHWN.js} +1 -1
  16. package/dist/{chunk-FE6SQTXF.js → chunk-CMGGWWH3.js} +2 -2
  17. package/dist/{chunk-G75JVB4D.js → chunk-DDA7G23P.js} +3 -3
  18. package/dist/{chunk-USVER53M.js → chunk-DP4YWFMY.js} +7 -0
  19. package/dist/{chunk-LR2HLHIF.js → chunk-FHOEVR3S.js} +595 -147
  20. package/dist/{chunk-B4EZ76WX.js → chunk-FPKBRUIC.js} +20 -3
  21. package/dist/{chunk-W33PYWYQ.js → chunk-JNBNL7FE.js} +2 -2
  22. package/dist/{chunk-AXQYGVOP.js → chunk-LPURBE7D.js} +1 -1
  23. package/dist/{chunk-GB26FIZT.js → chunk-MNL5NSC4.js} +8 -8
  24. package/dist/{chunk-FMQDD2MT.js → chunk-NFLNEKZ5.js} +47 -16
  25. package/dist/{chunk-ENBQ6UEE.js → chunk-P23AWV76.js} +3 -3
  26. package/dist/{chunk-JUQ2GNMD.js → chunk-PNCLJOUD.js} +2 -2
  27. package/dist/{chunk-E7MVYASS.js → chunk-W7PDXGYB.js} +1 -1
  28. package/dist/{client-HG0uMG0Q.d.ts → client-Ciy0g8Hx.d.ts} +123 -58
  29. package/dist/{deployments-DQY0PNUk.d.ts → deployments-V_BQ1PdE.d.ts} +184 -184
  30. package/dist/{groups-CfyRewkJ.d.ts → groups-sgKusEzF.d.ts} +26 -3
  31. package/dist/index.d.ts +13 -13
  32. package/dist/index.js +12 -10
  33. package/dist/{integrations-BMNtARU_.d.ts → integrations-CllF-kWg.d.ts} +1 -1
  34. package/dist/internal.d.ts +10 -10
  35. package/dist/internal.js +9 -9
  36. package/dist/{offers-CEwkAGsB.d.ts → offers-DzdzB2ZI.d.ts} +3 -3
  37. package/dist/{pages-D1xrbGJl.d.ts → pages-DFZThUH7.d.ts} +17 -3
  38. package/dist/{participant-activity-DYdUUhw2.d.ts → participant-activity-BPZiW7m7.d.ts} +1 -1
  39. package/dist/{participant-rewards-3duLb8YJ.d.ts → participant-rewards-BcWkBRn_.d.ts} +1 -1
  40. package/dist/portal-proxy.js +4 -4
  41. package/dist/{profiles-D29SS12z.d.ts → profiles-BHuQdzsW.d.ts} +1 -1
  42. package/dist/react/index.d.ts +13 -13
  43. package/dist/react/index.js +16 -15
  44. package/dist/{schema-D57mhL2q.d.ts → schema-DquhoBae.d.ts} +164 -2
  45. package/dist/schema.d.ts +441 -442
  46. package/dist/schema.js +30 -10
  47. package/dist/server/index.d.ts +10 -10
  48. package/dist/server/index.js +1001 -725
  49. package/dist/{streaks-CWyq8Px5.d.ts → streaks-0YuipsUQ.d.ts} +1 -1
  50. package/dist/{submission-input-DjXg0o-r.d.ts → submission-input-Dr0v6J9N.d.ts} +3 -3
  51. package/dist/{telegram-browser-DaP0Rawg.d.ts → telegram-browser-DJiawHY-.d.ts} +13 -5
  52. package/dist/testing.d.ts +8 -8
  53. package/dist/testing.js +15 -15
  54. package/dist/{transport-BNOvDy_4.d.ts → transport-BSGalAsT.d.ts} +6799 -3923
  55. package/dist/{wallet-CDyo-U4n.d.ts → wallet-t7uNDg9p.d.ts} +1 -1
  56. package/dist/{images-DwNmzqWv.d.ts → x-58jkoblN.d.ts} +100 -3
  57. package/package.json +1 -1
  58. package/dist/capability-error-oTd3eYFH.d.ts +0 -151
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  attemptCaptureSchema,
3
3
  capturedFactSchema
4
- } from "../chunk-G75JVB4D.js";
4
+ } from "../chunk-DDA7G23P.js";
5
5
  import {
6
6
  activityTypeSchema,
7
7
  activityTypes,
@@ -25,8 +25,8 @@ import {
25
25
  publishDeploymentSchema,
26
26
  rejectDeploymentSchema,
27
27
  submitDeploymentSchema
28
- } from "../chunk-UCZGXYCN.js";
29
- import "../chunk-MC6V6VMG.js";
28
+ } from "../chunk-24BMKPCY.js";
29
+ import "../chunk-4OC7REYX.js";
30
30
  import {
31
31
  DEFAULT_MANAGEMENT_TIMEOUT,
32
32
  ManagementError,
@@ -44,28 +44,30 @@ import {
44
44
  participantExchangeSchema,
45
45
  questConfiguration,
46
46
  sequenceCursorSchema
47
- } from "../chunk-FMQDD2MT.js";
47
+ } from "../chunk-NFLNEKZ5.js";
48
48
  import {
49
49
  parseImageExtraction,
50
50
  parseImageResult
51
- } from "../chunk-ENBQ6UEE.js";
51
+ } from "../chunk-P23AWV76.js";
52
52
  import {
53
- imageAssetArtifactSchema
54
- } from "../chunk-B4EZ76WX.js";
53
+ imageAssetArtifactSchema,
54
+ xUserLookupInputSchema,
55
+ xUserSchema
56
+ } from "../chunk-FPKBRUIC.js";
55
57
  import {
56
58
  sourceDataSchema,
57
59
  sourceRoles,
58
60
  validateQuestShape
59
- } from "../chunk-AXQYGVOP.js";
61
+ } from "../chunk-LPURBE7D.js";
60
62
  import {
61
63
  isIntegrationParticipantPath,
62
64
  isParticipantRoute,
63
65
  participantRoutePattern,
64
66
  participantRoutes
65
- } from "../chunk-USVER53M.js";
67
+ } from "../chunk-DP4YWFMY.js";
66
68
  import {
67
69
  withActionId
68
- } from "../chunk-E7MVYASS.js";
70
+ } from "../chunk-W7PDXGYB.js";
69
71
  import {
70
72
  allocateQuestSchema,
71
73
  allocatedQuestSchema,
@@ -83,7 +85,7 @@ import {
83
85
  rewardDeliveriesSchema,
84
86
  rewardDeliverySchema,
85
87
  saveQuestDraftSchema
86
- } from "../chunk-GB26FIZT.js";
88
+ } from "../chunk-MNL5NSC4.js";
87
89
  import {
88
90
  badgeMutationResultSchema,
89
91
  badgeMutationSchema,
@@ -101,6 +103,8 @@ import {
101
103
  engagementRuleVersionPageSchema,
102
104
  engagementVersionPageSchema,
103
105
  engagementVersionQuerySchema,
106
+ leaderboardExclusionGroupBindingSchema,
107
+ leaderboardExclusionGroupSchema,
104
108
  leaderboardExclusionSchema,
105
109
  leaderboardGroupSchema,
106
110
  leaderboardPageSchema,
@@ -133,15 +137,15 @@ import {
133
137
  referralQualificationSchema,
134
138
  referralRewardResolutionSchema,
135
139
  referralSuspensionSchema
136
- } from "../chunk-MRU7GX2V.js";
140
+ } from "../chunk-C3KL5SGM.js";
137
141
  import {
138
142
  telegramChatConnectionSchema,
139
143
  telegramChatIdSchema,
140
144
  telegramChatsSchema
141
- } from "../chunk-W33PYWYQ.js";
142
- import "../chunk-WOGCRDFT.js";
143
- import "../chunk-JKFSDBQX.js";
144
- import "../chunk-JUQ2GNMD.js";
145
+ } from "../chunk-JNBNL7FE.js";
146
+ import "../chunk-CCTZIHWN.js";
147
+ import "../chunk-AOB3N4QO.js";
148
+ import "../chunk-PNCLJOUD.js";
145
149
  import {
146
150
  CompletionSourceKind,
147
151
  addGroupMemberSchema,
@@ -193,6 +197,7 @@ import {
193
197
  projectGroupKey,
194
198
  publishedReleaseSchema,
195
199
  questSettingsInputSchema,
200
+ questSubmissionSchema,
196
201
  removeGroupMemberSchema,
197
202
  responseSchema,
198
203
  snapshotSchema,
@@ -200,6 +205,7 @@ import {
200
205
  solanaMainnet,
201
206
  staffDecisionSchema,
202
207
  stockItemSchema,
208
+ streakProgressSchema,
203
209
  submitSchema,
204
210
  trackerContentReadSchema,
205
211
  trackerContentSchema,
@@ -226,10 +232,10 @@ import {
226
232
  walletSignInNetworksSchema,
227
233
  walletUnlinkInputSchema,
228
234
  whereSchemaIssue
229
- } from "../chunk-6UFXPKLA.js";
235
+ } from "../chunk-BVEWY2ZL.js";
230
236
 
231
237
  // src/server/identity-links.ts
232
- import { z } from "zod";
238
+ import * as z from "zod";
233
239
  var walletIdentitySelectorSchema = walletUnlinkInputSchema.extend({
234
240
  kind: z.literal("wallet")
235
241
  });
@@ -275,247 +281,319 @@ var memberIdentityLinkPageSchema = z.object({
275
281
  nextCursor: pageCursorSchema.nullable()
276
282
  });
277
283
 
284
+ // src/server/identity-states.ts
285
+ import * as z2 from "zod";
286
+ var telegramIdentitySelectorSchema = z2.strictObject({
287
+ kind: z2.literal("telegram"),
288
+ subject: z2.string().min(1).max(4096)
289
+ });
290
+ var appIdentitySelectorSchema = z2.strictObject({
291
+ kind: z2.literal("app"),
292
+ appKind: appIdentityKindSchema,
293
+ subject: z2.string().min(1).max(256)
294
+ });
295
+ var memberIdentitySelectorSchema = z2.discriminatedUnion("kind", [
296
+ walletIdentitySelectorSchema,
297
+ oauthIdentitySelectorSchema,
298
+ telegramIdentitySelectorSchema,
299
+ appIdentitySelectorSchema
300
+ ]);
301
+ var state2 = {
302
+ /** Every identity state belongs to the member's project and environment. */
303
+ scope: z2.literal("project"),
304
+ /**
305
+ * What `expectedRevision` names. A wallet and an app identity count their own changes; an X,
306
+ * Discord or Telegram account shares its provider's selection revision with the member's other
307
+ * accounts of that provider, because the member selects one of them at a time.
308
+ */
309
+ revision: z2.number().int().safe().nonnegative(),
310
+ /** Whether trackers attribute records to the member through this identity. */
311
+ linked: z2.boolean(),
312
+ /** When the current link began; null while unlinked, or for a link older than link times. */
313
+ linkedAt: z2.number().int().safe().nonnegative().nullable(),
314
+ /** When an operator or the member unlinked a wallet or app identity; null otherwise. */
315
+ unlinkedAt: z2.number().int().safe().nonnegative().nullable(),
316
+ /** "member", or the operator or key that unlinked it. */
317
+ unlinkedBy: z2.string().nullable(),
318
+ canUnlink: z2.boolean(),
319
+ /**
320
+ * False while linked, and for an X, Discord or Telegram account while the member has selected
321
+ * another account of that provider: unlink that one first.
322
+ */
323
+ canRelink: z2.boolean(),
324
+ /**
325
+ * For a wallet: whether it signs the member in, which `setSignIn` changes on its own. Null for
326
+ * the other kinds: an app identity signs in exactly while it is linked, and an X, Discord or
327
+ * Telegram account signs in as its provider allows, whatever its link.
328
+ */
329
+ signIn: z2.boolean().nullable()
330
+ };
331
+ var memberIdentityStateSchema = z2.discriminatedUnion("kind", [
332
+ walletIdentitySelectorSchema.strip().extend(state2),
333
+ oauthIdentitySelectorSchema.strip().extend(state2),
334
+ telegramIdentitySelectorSchema.strip().extend(state2),
335
+ appIdentitySelectorSchema.strip().extend(state2)
336
+ ]);
337
+ var memberIdentityStatePageSchema = z2.object({
338
+ items: z2.array(memberIdentityStateSchema),
339
+ nextCursor: pageCursorSchema.nullable()
340
+ });
341
+ var command = {
342
+ actionId: z2.string().uuid().default(() => crypto.randomUUID()),
343
+ reason: z2.string().trim().min(1).max(500)
344
+ };
345
+ var memberIdentityLinkChangeInputSchema = z2.strictObject({
346
+ ...command,
347
+ identity: memberIdentitySelectorSchema,
348
+ expectedRevision: z2.number().int().safe().nonnegative()
349
+ });
350
+ var memberIdentitySignInInputSchema = z2.strictObject({
351
+ ...command,
352
+ identity: z2.discriminatedUnion("kind", [walletIdentitySelectorSchema]),
353
+ enabled: z2.boolean()
354
+ });
355
+
278
356
  // src/server/settlement-reviews.ts
279
- import { z as z2 } from "zod";
357
+ import * as z3 from "zod";
280
358
  var decision = {
281
- status: z2.enum(["pending", "approved", "rejected"]),
282
- rejectedAt: z2.number().int().safe().nonnegative().nullable(),
283
- rejectedBy: z2.string().nullable(),
284
- rejectionReason: z2.string().nullable()
359
+ status: z3.enum(["pending", "approved", "rejected"]),
360
+ rejectedAt: z3.number().int().safe().nonnegative().nullable(),
361
+ rejectedBy: z3.string().nullable(),
362
+ rejectionReason: z3.string().nullable()
285
363
  };
286
364
  var leaderboardSettlementReviewSummarySchema = leaderboardSettlementSummarySchema.extend(decision);
287
365
  var leaderboardSettlementReviewSchema = leaderboardSettlementSchema.extend(decision);
288
- var leaderboardSettlementReviewQuerySchema = z2.strictObject({
366
+ var leaderboardSettlementReviewQuerySchema = z3.strictObject({
289
367
  cursor: pageCursorSchema.optional(),
290
- limit: z2.coerce.number().int().min(1).max(100).default(25)
368
+ limit: z3.coerce.number().int().min(1).max(100).default(25)
291
369
  });
292
- var leaderboardSettlementReviewPageSchema = z2.object({
293
- items: z2.array(leaderboardSettlementReviewSummarySchema),
370
+ var leaderboardSettlementReviewPageSchema = z3.object({
371
+ items: z3.array(leaderboardSettlementReviewSummarySchema),
294
372
  nextCursor: pageCursorSchema.nullable()
295
373
  });
296
- var leaderboardSettlementRejectionSchema = z2.strictObject({
297
- actionId: z2.string().uuid().default(() => crypto.randomUUID()),
298
- expectedCreatedAt: z2.number().int().safe().nonnegative(),
299
- reason: z2.string().trim().min(1).max(500)
374
+ var leaderboardSettlementRejectionSchema = z3.strictObject({
375
+ actionId: z3.string().uuid().default(() => crypto.randomUUID()),
376
+ expectedCreatedAt: z3.number().int().safe().nonnegative(),
377
+ reason: z3.string().trim().min(1).max(500)
300
378
  });
301
379
 
302
380
  // src/server/inventory-items.ts
303
- import { z as z3 } from "zod";
304
- var inventoryItemStateSchema = z3.object({
381
+ import * as z4 from "zod";
382
+ var inventoryItemStateSchema = z4.object({
305
383
  item: identifier,
306
- name: z3.string().nullable(),
307
- available: z3.number().int().safe().nonnegative(),
308
- reserved: z3.number().int().safe().nonnegative(),
309
- allocated: z3.number().int().safe().nonnegative(),
310
- offers: z3.array(identifier),
311
- revision: z3.number().int().nonnegative(),
312
- archivedAt: z3.number().int().safe().nonnegative().nullable()
384
+ name: z4.string().nullable(),
385
+ available: z4.number().int().safe().nonnegative(),
386
+ reserved: z4.number().int().safe().nonnegative(),
387
+ allocated: z4.number().int().safe().nonnegative(),
388
+ offers: z4.array(identifier),
389
+ revision: z4.number().int().nonnegative(),
390
+ archivedAt: z4.number().int().safe().nonnegative().nullable()
313
391
  });
314
392
  var correction = {
315
- actionId: z3.string().uuid().default(() => crypto.randomUUID()),
316
- expectedRevision: z3.number().int().nonnegative(),
317
- reason: z3.string().trim().min(1).max(500)
393
+ actionId: z4.string().uuid().default(() => crypto.randomUUID()),
394
+ expectedRevision: z4.number().int().nonnegative(),
395
+ reason: z4.string().trim().min(1).max(500)
318
396
  };
319
- var inventoryItemActionSchema = z3.strictObject(correction);
320
- var inventoryItemRenameSchema = z3.strictObject({
397
+ var inventoryItemActionSchema = z4.strictObject(correction);
398
+ var inventoryItemRenameSchema = z4.strictObject({
321
399
  ...correction,
322
- name: z3.string().trim().min(1).max(200)
400
+ name: z4.string().trim().min(1).max(200)
323
401
  });
324
- var inventoryStockCorrectionSchema = z3.strictObject({
402
+ var inventoryStockCorrectionSchema = z4.strictObject({
325
403
  ...correction,
326
- delta: z3.number().int().safe()
404
+ delta: z4.number().int().safe()
327
405
  });
328
- var inventoryItemPageSchema = z3.object({
329
- items: z3.array(inventoryItemStateSchema),
406
+ var inventoryItemPageSchema = z4.object({
407
+ items: z4.array(inventoryItemStateSchema),
330
408
  nextCursor: pageCursorSchema.nullable()
331
409
  });
332
410
 
333
411
  // src/server/quest-enrollments.ts
334
- import { z as z4 } from "zod";
412
+ import * as z5 from "zod";
335
413
  var questEnrollmentStateSchema = questEnrollmentSchema.extend({
336
- revision: z4.number().int().nonnegative(),
337
- withdrawnAt: z4.number().int().safe().nonnegative().nullable(),
338
- withdrawalReason: z4.string().nullable()
414
+ revision: z5.number().int().nonnegative(),
415
+ withdrawnAt: z5.number().int().safe().nonnegative().nullable(),
416
+ withdrawalReason: z5.string().nullable()
339
417
  });
340
418
  var managedQuestEnrollmentSchema = questEnrollmentStateSchema.extend({
341
- title: z4.string(),
342
- key: z4.string().nullable()
419
+ title: z5.string(),
420
+ key: z5.string().nullable()
343
421
  });
344
- var questEnrollmentWithdrawalInputSchema = z4.object({
345
- actionId: z4.string().uuid().default(() => crypto.randomUUID()),
346
- expectedRevision: z4.number().int().nonnegative(),
347
- reason: z4.string().trim().min(1).max(500)
422
+ var questEnrollmentWithdrawalInputSchema = z5.object({
423
+ actionId: z5.string().uuid().default(() => crypto.randomUUID()),
424
+ expectedRevision: z5.number().int().nonnegative(),
425
+ reason: z5.string().trim().min(1).max(500)
348
426
  }).strict();
349
- var managedQuestEnrollmentPageSchema = z4.object({
350
- items: z4.array(managedQuestEnrollmentSchema),
427
+ var managedQuestEnrollmentPageSchema = z5.object({
428
+ items: z5.array(managedQuestEnrollmentSchema),
351
429
  nextCursor: pageCursorSchema.nullable()
352
430
  });
353
431
 
354
432
  // src/server/test-members.ts
355
- import { z as z5 } from "zod";
356
- var testMemberWalletSchema = z5.object({
433
+ import * as z6 from "zod";
434
+ var testMemberWalletSchema = z6.object({
357
435
  chain: walletChainSchema,
358
436
  /** CAIP-2 network, Cosmos only. */
359
437
  network: cosmosNetworkSchema.nullable(),
360
- address: z5.string()
438
+ address: z6.string()
361
439
  });
362
- var testMemberSchema = z5.object({
440
+ var testMemberSchema = z6.object({
363
441
  id: identifier,
364
- name: z5.string(),
365
- test: z5.literal(true),
442
+ name: z6.string(),
443
+ test: z6.literal(true),
366
444
  /** Current project-calendar date (YYYY-MM-DD), computed by the server. */
367
- today: z5.iso.date().optional(),
445
+ today: z6.iso.date().optional(),
368
446
  /** Number of calendar days advanced; absent means zero for older servers. */
369
- offsetDays: z5.number().int().min(0).optional(),
447
+ offsetDays: z6.number().int().min(0).optional(),
370
448
  /** Linked wallet addresses, by chain then newest first; absent from older servers. */
371
- wallets: z5.array(testMemberWalletSchema).optional()
449
+ wallets: z6.array(testMemberWalletSchema).optional()
372
450
  });
373
- var testMemberCreateSchema = z5.object({
451
+ var testMemberCreateSchema = z6.object({
374
452
  actionId: identifier,
375
- name: z5.string().trim().min(1).max(40)
453
+ name: z6.string().trim().min(1).max(40)
376
454
  }).strict();
377
455
  var testMemberActionSchema = submitSchema.omit({ member: true, faultAfterReview: true }).extend({
378
- operation: z5.literal("attempts.submit")
456
+ operation: z6.literal("attempts.submit")
379
457
  }).strict();
380
- var testMemberResetSchema = z5.object({ actionId: identifier }).strict();
381
- var testMemberAdvanceSchema = z5.object({
458
+ var testMemberResetSchema = z6.object({ actionId: identifier }).strict();
459
+ var testMemberAdvanceSchema = z6.object({
382
460
  actionId: identifier,
383
- days: z5.number().int().min(1).max(30)
461
+ days: z6.number().int().min(1).max(30)
384
462
  }).strict();
385
- var testMemberResetResultSchema = z5.object({
463
+ var testMemberResetResultSchema = z6.object({
386
464
  member: identifier,
387
- deleted: z5.literal(true)
465
+ deleted: z6.literal(true)
388
466
  });
389
- var testMemberWalletLinkSchema = z5.discriminatedUnion("chain", [
390
- z5.object({
467
+ var testMemberWalletLinkSchema = z6.discriminatedUnion("chain", [
468
+ z6.object({
391
469
  actionId: identifier,
392
- chain: z5.literal("solana"),
470
+ chain: z6.literal("solana"),
393
471
  address: solanaAddressSchema
394
472
  }).strict(),
395
- z5.object({
473
+ z6.object({
396
474
  actionId: identifier,
397
- chain: z5.literal("eip155"),
475
+ chain: z6.literal("eip155"),
398
476
  address: evmAddressSchema
399
477
  }).strict(),
400
- z5.object({
478
+ z6.object({
401
479
  actionId: identifier,
402
- chain: z5.literal("cosmos"),
480
+ chain: z6.literal("cosmos"),
403
481
  network: cosmosNetworkSchema,
404
482
  address: cosmosAddressSchema
405
483
  }).strict()
406
484
  ]);
407
- var testMemberWalletUnlinkSchema = z5.object({
485
+ var testMemberWalletUnlinkSchema = z6.object({
408
486
  actionId: identifier,
409
487
  chain: walletChainSchema,
410
- address: z5.string().min(1).max(100)
488
+ address: z6.string().min(1).max(100)
411
489
  }).strict();
412
- var testMemberHistoryQuerySchema = z5.object({
490
+ var testMemberHistoryQuerySchema = z6.object({
413
491
  /** Inclusive lower bound on credited activity time, in epoch milliseconds. */
414
- since: z5.coerce.number().int().nonnegative().safe().optional()
492
+ since: z6.coerce.number().int().nonnegative().safe().optional()
415
493
  });
416
- var testMemberHistorySchema = z5.object({
494
+ var testMemberHistorySchema = z6.object({
417
495
  /** Newest credited activity first, up to 500 attempts. */
418
- attempts: z5.array(
419
- attemptSchema.extend({ eligibleAt: z5.number().int().nonnegative().safe() })
496
+ attempts: z6.array(
497
+ attemptSchema.extend({ eligibleAt: z6.number().int().nonnegative().safe() })
420
498
  ),
421
499
  /** Tracker trigger outcomes that admitted no attempt, newest occurrence first, up to 500. */
422
- skipped: z5.array(
423
- z5.object({
500
+ skipped: z6.array(
501
+ z6.object({
424
502
  quest: identifier,
425
503
  tracker: identifier,
426
- record: z5.string(),
427
- code: z5.string().min(1),
428
- occurredAt: z5.number().int().nonnegative().safe()
504
+ record: z6.string(),
505
+ code: z6.string().min(1),
506
+ occurredAt: z6.number().int().nonnegative().safe()
429
507
  })
430
508
  ),
431
509
  /** False when older entries were omitted from either list. */
432
- complete: z5.boolean()
510
+ complete: z6.boolean()
433
511
  });
434
512
 
435
513
  // src/server/webhooks.ts
436
- import { z as z6 } from "zod";
514
+ import * as z7 from "zod";
437
515
  var PayoutSourceKind = {
438
516
  Quest: "quest",
439
517
  Leaderboard: "leaderboard",
440
518
  Engagement: "engagement",
441
519
  Manual: "manual"
442
520
  };
443
- var webhookEventSchema = z6.object({
444
- id: z6.string().uuid(),
445
- version: z6.literal(1),
521
+ var webhookEventSchema = z7.object({
522
+ id: z7.string().uuid(),
523
+ version: z7.literal(1),
446
524
  type: activityTypeSchema,
447
- createdAt: z6.number().int().nonnegative(),
448
- organization: z6.string(),
449
- project: z6.string(),
450
- environment: z6.enum(["test", "live"]),
451
- data: z6.record(z6.string(), z6.json())
525
+ createdAt: z7.number().int().nonnegative(),
526
+ organization: z7.string(),
527
+ project: z7.string(),
528
+ environment: z7.enum(["test", "live"]),
529
+ data: z7.record(z7.string(), z7.json())
452
530
  });
453
- var webhookControlInputSchema = z6.object({ actionId: z6.string().uuid().optional() }).strict();
454
- var webhookInputSchema = z6.object({
455
- url: z6.url().max(2048).refine((value) => {
456
- const url = new URL(value);
457
- return url.protocol === "https:" && !url.username && !url.password && !url.hash;
531
+ var webhookControlInputSchema = z7.object({ actionId: z7.string().uuid().optional() }).strict();
532
+ var webhookInputSchema = z7.object({
533
+ url: z7.url().max(2048).refine((value) => {
534
+ const url2 = new URL(value);
535
+ return url2.protocol === "https:" && !url2.username && !url2.password && !url2.hash;
458
536
  }, "Use an HTTPS URL without credentials or a fragment"),
459
- types: z6.array(activityTypeSchema).min(1).max(100).refine((v) => new Set(v).size === v.length)
537
+ types: z7.array(activityTypeSchema).min(1).max(100).refine((v) => new Set(v).size === v.length)
460
538
  }).strict();
461
- var webhookCreateInputSchema = webhookInputSchema.extend({ actionId: z6.string().uuid().optional() }).strict();
462
- var webhookRotateInputSchema = z6.object({ actionId: z6.string().uuid().optional() }).strict();
463
- var webhookUpdateSchema = webhookInputSchema.partial().extend({ enabled: z6.boolean().optional() }).strict();
464
- var webhookEndpointSchema = z6.object({
539
+ var webhookCreateInputSchema = webhookInputSchema.extend({ actionId: z7.string().uuid().optional() }).strict();
540
+ var webhookRotateInputSchema = z7.object({ actionId: z7.string().uuid().optional() }).strict();
541
+ var webhookUpdateSchema = webhookInputSchema.partial().extend({ enabled: z7.boolean().optional() }).strict();
542
+ var webhookEndpointSchema = z7.object({
465
543
  ...webhookInputSchema.shape,
466
- id: z6.string().uuid(),
467
- enabled: z6.boolean(),
468
- disabledReason: z6.string().nullable(),
469
- consecutiveFailures: z6.number().int().nonnegative(),
470
- createdAt: z6.number(),
471
- updatedAt: z6.number()
544
+ id: z7.string().uuid(),
545
+ enabled: z7.boolean(),
546
+ disabledReason: z7.string().nullable(),
547
+ consecutiveFailures: z7.number().int().nonnegative(),
548
+ createdAt: z7.number(),
549
+ updatedAt: z7.number()
472
550
  });
473
551
  var webhookEndpointStateSchema = webhookEndpointSchema.extend({
474
- revision: z6.number().int().nonnegative(),
475
- deletedAt: z6.number().int().safe().nonnegative().nullable()
552
+ revision: z7.number().int().nonnegative(),
553
+ deletedAt: z7.number().int().safe().nonnegative().nullable()
476
554
  });
477
- var webhookDeleteInputSchema = z6.strictObject({
478
- actionId: z6.string().uuid().default(() => crypto.randomUUID()),
479
- expectedRevision: z6.number().int().nonnegative(),
480
- reason: z6.string().trim().min(1).max(500)
555
+ var webhookDeleteInputSchema = z7.strictObject({
556
+ actionId: z7.string().uuid().default(() => crypto.randomUUID()),
557
+ expectedRevision: z7.number().int().nonnegative(),
558
+ reason: z7.string().trim().min(1).max(500)
481
559
  });
482
- var webhookStateQuerySchema = z6.strictObject({
560
+ var webhookStateQuerySchema = z7.strictObject({
483
561
  cursor: pageCursorSchema.optional(),
484
- limit: z6.coerce.number().int().min(1).max(100).default(50)
562
+ limit: z7.coerce.number().int().min(1).max(100).default(50)
485
563
  });
486
- var webhookStatePageSchema = z6.object({
487
- items: z6.array(webhookEndpointStateSchema),
564
+ var webhookStatePageSchema = z7.object({
565
+ items: z7.array(webhookEndpointStateSchema),
488
566
  nextCursor: pageCursorSchema.nullable()
489
567
  });
490
- var webhookSecretSchema = z6.object({
568
+ var webhookSecretSchema = z7.object({
491
569
  endpoint: webhookEndpointSchema,
492
- secret: z6.string(),
493
- previousValidUntil: z6.number().nullable()
570
+ secret: z7.string(),
571
+ previousValidUntil: z7.number().nullable()
494
572
  });
495
- var webhookDeliverySchema = z6.object({
496
- id: z6.string().uuid(),
497
- endpoint: z6.string().uuid(),
573
+ var webhookDeliverySchema = z7.object({
574
+ id: z7.string().uuid(),
575
+ endpoint: z7.string().uuid(),
498
576
  event: webhookEventSchema,
499
- status: z6.enum(["pending", "delivered", "failed", "skipped"]),
500
- attempts: z6.number().int().nonnegative(),
501
- responseStatus: z6.number().nullable(),
502
- lastError: z6.string().nullable(),
503
- createdAt: z6.number(),
504
- deliveredAt: z6.number().nullable(),
505
- replayOf: z6.string().uuid().nullable()
577
+ status: z7.enum(["pending", "delivered", "failed", "skipped"]),
578
+ attempts: z7.number().int().nonnegative(),
579
+ responseStatus: z7.number().nullable(),
580
+ lastError: z7.string().nullable(),
581
+ createdAt: z7.number(),
582
+ deliveredAt: z7.number().nullable(),
583
+ replayOf: z7.string().uuid().nullable()
506
584
  });
507
- var webhookQuerySchema = z6.object({
585
+ var webhookQuerySchema = z7.object({
508
586
  /** A page's `nextCursor`: the deliveries after it, newest first. */
509
587
  cursor: pageCursorSchema.optional(),
510
588
  /** @deprecated Use `cursor`. Removed in 2.0.0. */
511
- before: z6.string().uuid().optional(),
512
- limit: z6.coerce.number().int().min(1).max(100).default(50)
589
+ before: z7.string().uuid().optional(),
590
+ limit: z7.coerce.number().int().min(1).max(100).default(50)
513
591
  }).strict();
514
- var webhookDeliveryPageSchema = z6.object({
515
- items: z6.array(webhookDeliverySchema),
592
+ var webhookDeliveryPageSchema = z7.object({
593
+ items: z7.array(webhookDeliverySchema),
516
594
  nextCursor: pageCursorSchema.nullable().default(null),
517
595
  /** @deprecated Use `nextCursor`, passed back as `cursor`. Removed in 2.0.0. */
518
- next: z6.string().uuid().nullable()
596
+ next: z7.string().uuid().nullable()
519
597
  });
520
598
  var WEBHOOK_MAX_BYTES = 64 * 1024;
521
599
  async function verifyWebhook(input) {
@@ -559,8 +637,8 @@ async function verifyWebhook(input) {
559
637
  }
560
638
 
561
639
  // src/server/resource-lifecycle.ts
562
- import { z as z7 } from "zod";
563
- var resourceLifecycleKindSchema = z7.enum([
640
+ import * as z8 from "zod";
641
+ var resourceLifecycleKindSchema = z8.enum([
564
642
  "tracker",
565
643
  "referral",
566
644
  "leaderboard",
@@ -570,24 +648,24 @@ var resourceLifecycleKindSchema = z7.enum([
570
648
  "image",
571
649
  "point-ledger"
572
650
  ]);
573
- var managedResourceSchema = z7.object({
651
+ var managedResourceSchema = z8.object({
574
652
  kind: resourceLifecycleKindSchema,
575
653
  id: identifier,
576
654
  key: identifier.nullable(),
577
- title: z7.string(),
578
- archivedAt: z7.number().int().nonnegative().nullable()
655
+ title: z8.string(),
656
+ archivedAt: z8.number().int().nonnegative().nullable()
579
657
  });
580
- var resourceLifecycleInputSchema = z7.object({
581
- actionId: z7.string().uuid(),
658
+ var resourceLifecycleInputSchema = z8.object({
659
+ actionId: z8.string().uuid(),
582
660
  kind: resourceLifecycleKindSchema,
583
661
  resource: identifier,
584
- archived: z7.boolean(),
585
- reason: z7.string().trim().min(1).max(500),
586
- expectedArchivedAt: z7.number().int().nonnegative().nullable().optional()
662
+ archived: z8.boolean(),
663
+ reason: z8.string().trim().min(1).max(500),
664
+ expectedArchivedAt: z8.number().int().nonnegative().nullable().optional()
587
665
  }).strict();
588
- var resourceLifecycleResultSchema = z7.object({
666
+ var resourceLifecycleResultSchema = z8.object({
589
667
  resource: managedResourceSchema,
590
- changed: z7.boolean()
668
+ changed: z8.boolean()
591
669
  });
592
670
  var resourceLifecyclePaths = {
593
671
  tracker: "/trackers",
@@ -606,19 +684,19 @@ var resourceArchiveInputSchema = resourceLifecycleInputSchema.omit({
606
684
  });
607
685
 
608
686
  // src/server/index.ts
609
- import { z as z13 } from "zod";
687
+ import * as z14 from "zod";
610
688
 
611
689
  // src/server/hosting.ts
612
- import { z as z10 } from "zod";
690
+ import * as z11 from "zod";
613
691
 
614
692
  // src/server/schedules.ts
615
- import { z as z8 } from "zod";
693
+ import * as z9 from "zod";
616
694
  import { Cron } from "croner";
617
695
  var APP_SCHEDULE_LIMIT = 10;
618
696
  var APP_SCHEDULE_MIN_INTERVAL = 3e5;
619
697
  var APP_SCHEDULE_TIMEOUT = 3e4;
620
- var appScheduleNameSchema = z8.string().regex(/^[a-z][a-z0-9-]{0,63}$/);
621
- var appSchedulePathSchema = z8.string().min(2).max(512).refine((path) => {
698
+ var appScheduleNameSchema = z9.string().regex(/^[a-z][a-z0-9-]{0,63}$/);
699
+ var appSchedulePathSchema = z9.string().min(2).max(512).refine((path) => {
622
700
  if (!/^\/[a-zA-Z0-9_/-]+$/.test(path) || path.startsWith("//")) {
623
701
  return false;
624
702
  }
@@ -629,11 +707,11 @@ function interval(value) {
629
707
  const unit = value.slice(-1);
630
708
  return amount * (unit === "m" ? 6e4 : unit === "h" ? 36e5 : 864e5);
631
709
  }
632
- var everySchema = z8.string().regex(/^[1-9]\d{0,3}[mhd]$/).refine(
710
+ var everySchema = z9.string().regex(/^[1-9]\d{0,3}[mhd]$/).refine(
633
711
  (value) => interval(value) >= APP_SCHEDULE_MIN_INTERVAL && interval(value) <= 365 * 864e5,
634
712
  "Use an interval from 5 minutes to 365 days, such as 5m, 1h or 1d"
635
713
  );
636
- var cronSchema = z8.string().max(120).refine((value) => {
714
+ var cronSchema = z9.string().max(120).refine((value) => {
637
715
  const fields = value.trim().split(/\s+/);
638
716
  if (fields.length !== 5 || fields.some((field) => !/^[\d*,/-]+$/.test(field))) {
639
717
  return false;
@@ -658,15 +736,15 @@ var cronSchema = z8.string().max(120).refine((value) => {
658
736
  var declaration = {
659
737
  name: appScheduleNameSchema,
660
738
  path: appSchedulePathSchema,
661
- description: z8.string().min(1).max(500)
739
+ description: z9.string().min(1).max(500)
662
740
  };
663
- var everySchedule = z8.object({ ...declaration, every: everySchema });
664
- var cronSchedule = z8.object({ ...declaration, cron: cronSchema });
665
- var appScheduleSchema = z8.union([
741
+ var everySchedule = z9.object({ ...declaration, every: everySchema });
742
+ var cronSchedule = z9.object({ ...declaration, cron: cronSchema });
743
+ var appScheduleSchema = z9.union([
666
744
  everySchedule.strict(),
667
745
  cronSchedule.strict()
668
746
  ]);
669
- var appSchedulesSchema = z8.array(appScheduleSchema).max(APP_SCHEDULE_LIMIT).refine(
747
+ var appSchedulesSchema = z9.array(appScheduleSchema).max(APP_SCHEDULE_LIMIT).refine(
670
748
  (items) => new Set(items.map((item) => item.name)).size === items.length,
671
749
  "Schedule names must be unique"
672
750
  );
@@ -683,40 +761,40 @@ function nextScheduleRun(schedule, after) {
683
761
  }
684
762
  return next.getTime();
685
763
  }
686
- var appScheduleStateSchema = z8.enum(["active", "paused", "archived"]);
687
- var appScheduleRunSchema = z8.object({
688
- id: z8.string().uuid(),
689
- build: z8.string().uuid(),
690
- startedAt: z8.number(),
691
- scheduledAt: z8.number(),
692
- manual: z8.boolean(),
693
- status: z8.enum(["queued", "running", "succeeded", "failed", "uncertain"]),
694
- duration: z8.number().nullable(),
695
- error: z8.string().nullable()
764
+ var appScheduleStateSchema = z9.enum(["active", "paused", "archived"]);
765
+ var appScheduleRunSchema = z9.object({
766
+ id: z9.string().uuid(),
767
+ build: z9.string().uuid(),
768
+ startedAt: z9.number(),
769
+ scheduledAt: z9.number(),
770
+ manual: z9.boolean(),
771
+ status: z9.enum(["queued", "running", "succeeded", "failed", "uncertain"]),
772
+ duration: z9.number().nullable(),
773
+ error: z9.string().nullable()
696
774
  });
697
- var appScheduleListSchema = z8.object({
775
+ var appScheduleListSchema = z9.object({
698
776
  state: appScheduleStateSchema,
699
- schedules: z8.array(
700
- z8.object({
701
- declaration: z8.union([everySchedule, cronSchedule]),
702
- nextRun: z8.number().nullable(),
703
- blocked: z8.boolean(),
777
+ schedules: z9.array(
778
+ z9.object({
779
+ declaration: z9.union([everySchedule, cronSchedule]),
780
+ nextRun: z9.number().nullable(),
781
+ blocked: z9.boolean(),
704
782
  lastRun: appScheduleRunSchema.nullable()
705
783
  })
706
784
  )
707
785
  });
708
- var scheduledInvocationSchema = z8.object({
709
- id: z8.string().uuid(),
710
- build: z8.string().uuid(),
786
+ var scheduledInvocationSchema = z9.object({
787
+ id: z9.string().uuid(),
788
+ build: z9.string().uuid(),
711
789
  name: appScheduleNameSchema,
712
- scheduledAt: z8.number().int(),
713
- startedAt: z8.number().int(),
714
- manual: z8.boolean()
790
+ scheduledAt: z9.number().int(),
791
+ startedAt: z9.number().int(),
792
+ manual: z9.boolean()
715
793
  }).strict();
716
794
  async function verifyScheduledRequest(request, key) {
717
795
  const signature = request.headers.get("X-Domino-Schedule-Signature");
718
- const url = new URL(request.url);
719
- if (request.method !== "POST" || url.search !== "" || url.hash !== "" || !key || !signature || !/^[a-f0-9]{64}$/.test(signature)) {
796
+ const url2 = new URL(request.url);
797
+ if (request.method !== "POST" || url2.search !== "" || url2.hash !== "" || !key || !signature || !/^[a-f0-9]{64}$/.test(signature)) {
720
798
  return null;
721
799
  }
722
800
  const reader = request.clone().body?.getReader();
@@ -760,7 +838,7 @@ async function verifyScheduledRequest(request, key) {
760
838
  secret,
761
839
  bytes,
762
840
  new TextEncoder().encode(`POST
763
- ${url.pathname}
841
+ ${url2.pathname}
764
842
  ${body}`)
765
843
  );
766
844
  if (!valid) {
@@ -776,7 +854,7 @@ ${body}`)
776
854
  }
777
855
 
778
856
  // src/server/starters.ts
779
- import { z as z9 } from "zod";
857
+ import * as z10 from "zod";
780
858
  var starterTemplates = [
781
859
  {
782
860
  id: "campaign",
@@ -809,63 +887,63 @@ var starterTemplates = [
809
887
  summary: "A headless Worker with typed routes and interactive API docs, for plugging Domino into your own product."
810
888
  }
811
889
  ];
812
- var starterIdSchema = z9.enum(
890
+ var starterIdSchema = z10.enum(
813
891
  starterTemplates.map((template) => template.id)
814
892
  );
815
893
 
816
894
  // src/server/hosting.ts
817
- var outputPathSchema = z10.string().min(1).max(512).refine(
895
+ var outputPathSchema = z11.string().min(1).max(512).refine(
818
896
  (path) => path.split("/").every(
819
897
  (part) => /^[\w-][\w.-]*$/.test(part) && part !== "node_modules"
820
898
  ),
821
899
  "Expected a relative build output path without hidden segments"
822
900
  );
823
- var appRoutingSchema = z10.enum(["legacy", "transparent"]).default("legacy");
901
+ var appRoutingSchema = z11.enum(["legacy", "transparent"]).default("legacy");
824
902
  var APP_SECRET_LIMIT = 50;
825
903
  var APP_KV_LIMIT = 5;
826
904
  var APP_SQL_LIMIT = 5;
827
905
  var APP_MIGRATION_LIMIT = 100;
828
906
  var APP_MIGRATION_FILE_BYTES = 9e4;
829
907
  var APP_MIGRATION_TOTAL_BYTES = 1e6;
830
- var appSecretNameSchema = z10.string().regex(
908
+ var appSecretNameSchema = z11.string().regex(
831
909
  /^[A-Z_][A-Z0-9_]{0,63}$/,
832
910
  "Use 1-64 uppercase letters, digits, and underscores, not starting with a digit"
833
911
  ).refine(
834
912
  (name) => !name.startsWith("DOMINO_") && name !== "ASSETS",
835
913
  "DOMINO_ names and ASSETS are reserved for Domino's own bindings"
836
914
  );
837
- var appSecretValueSchema = z10.string().min(1).refine(
915
+ var appSecretValueSchema = z11.string().min(1).refine(
838
916
  (value) => new TextEncoder().encode(value).length <= 5120,
839
917
  "Secret values can be at most 5 KiB"
840
918
  );
841
- var appSecretInputSchema = z10.object({ value: appSecretValueSchema }).strict();
842
- var appSecretSchema = z10.object({
919
+ var appSecretInputSchema = z11.object({ value: appSecretValueSchema }).strict();
920
+ var appSecretSchema = z11.object({
843
921
  name: appSecretNameSchema,
844
- updatedAt: z10.number(),
845
- updatedBy: z10.string()
922
+ updatedAt: z11.number(),
923
+ updatedBy: z11.string()
846
924
  });
847
- var appSecretDeclarationSchema = z10.object({
848
- description: z10.string().trim().min(1).max(500),
849
- required: z10.boolean().default(true)
925
+ var appSecretDeclarationSchema = z11.object({
926
+ description: z11.string().trim().min(1).max(500),
927
+ required: z11.boolean().default(true)
850
928
  }).strict();
851
- var appSecretDeclarationsSchema = z10.record(appSecretNameSchema, appSecretDeclarationSchema).refine(
929
+ var appSecretDeclarationsSchema = z11.record(appSecretNameSchema, appSecretDeclarationSchema).refine(
852
930
  (secrets) => Object.keys(secrets).length <= APP_SECRET_LIMIT,
853
931
  `Declare at most ${APP_SECRET_LIMIT} app secrets`
854
932
  );
855
- var appSecretListSchema = z10.object({
856
- secrets: z10.array(appSecretSchema),
857
- declared: z10.array(appSecretDeclarationSchema.extend({ name: appSecretNameSchema })).default([])
933
+ var appSecretListSchema = z11.object({
934
+ secrets: z11.array(appSecretSchema),
935
+ declared: z11.array(appSecretDeclarationSchema.extend({ name: appSecretNameSchema })).default([])
858
936
  });
859
- var hostedAppSecretsSchema = z10.object({ secrets: z10.record(appSecretNameSchema, appSecretValueSchema) }).strict();
860
- var storageDescription = z10.object({
861
- description: z10.string().trim().min(1).max(500)
937
+ var hostedAppSecretsSchema = z11.object({ secrets: z11.record(appSecretNameSchema, appSecretValueSchema) }).strict();
938
+ var storageDescription = z11.object({
939
+ description: z11.string().trim().min(1).max(500)
862
940
  }).strict();
863
- var appStorageSchema = z10.object({
864
- kv: z10.record(appSecretNameSchema, storageDescription).refine(
941
+ var appStorageSchema = z11.object({
942
+ kv: z11.record(appSecretNameSchema, storageDescription).refine(
865
943
  (stores) => Object.keys(stores).length <= APP_KV_LIMIT,
866
944
  `Declare at most ${APP_KV_LIMIT} KV stores`
867
945
  ).default({}),
868
- sql: z10.record(
946
+ sql: z11.record(
869
947
  appSecretNameSchema,
870
948
  storageDescription.extend({
871
949
  migrations: outputPathSchema.optional()
@@ -875,60 +953,60 @@ var appStorageSchema = z10.object({
875
953
  `Declare at most ${APP_SQL_LIMIT} SQL stores`
876
954
  ).default({})
877
955
  }).strict();
878
- var appStorageKindSchema = z10.enum(["kv", "sql"]);
879
- var appStorageListSchema = z10.object({
880
- stores: z10.array(
881
- z10.object({
882
- kind: z10.string(),
956
+ var appStorageKindSchema = z11.enum(["kv", "sql"]);
957
+ var appStorageListSchema = z11.object({
958
+ stores: z11.array(
959
+ z11.object({
960
+ kind: z11.string(),
883
961
  name: appSecretNameSchema,
884
- createdAt: z10.number().nullable(),
885
- declared: z10.boolean(),
886
- description: z10.string().optional()
962
+ createdAt: z11.number().nullable(),
963
+ declared: z11.boolean(),
964
+ description: z11.string().optional()
887
965
  })
888
966
  )
889
967
  });
890
968
  var APP_STORAGE_ROW_LIMIT = 50;
891
969
  var APP_STORAGE_PREVIEW_CHARACTERS = 2e3;
892
- var appStorageCellSchema = z10.union([
893
- z10.string(),
894
- z10.number(),
895
- z10.null(),
896
- z10.object({ text: z10.string(), truncated: z10.literal(true) }),
897
- z10.object({ blob: z10.number().int().min(0) })
970
+ var appStorageCellSchema = z11.union([
971
+ z11.string(),
972
+ z11.number(),
973
+ z11.null(),
974
+ z11.object({ text: z11.string(), truncated: z11.literal(true) }),
975
+ z11.object({ blob: z11.number().int().min(0) })
898
976
  ]);
899
- var appStorageTablesSchema = z10.object({
900
- tables: z10.array(
977
+ var appStorageTablesSchema = z11.object({
978
+ tables: z11.array(
901
979
  /** `kind` is SQLite's: `table` or `view`. */
902
- z10.object({ name: z10.string(), kind: z10.string() })
980
+ z11.object({ name: z11.string(), kind: z11.string() })
903
981
  )
904
982
  });
905
- var appStorageRowsSchema = z10.object({
906
- table: z10.string(),
907
- columns: z10.array(z10.string()),
908
- rows: z10.array(z10.array(appStorageCellSchema)),
983
+ var appStorageRowsSchema = z11.object({
984
+ table: z11.string(),
985
+ columns: z11.array(z11.string()),
986
+ rows: z11.array(z11.array(appStorageCellSchema)),
909
987
  /** How many rows come before this page in storage order. */
910
- offset: z10.number().int().min(0),
911
- total: z10.number().int().min(0),
988
+ offset: z11.number().int().min(0),
989
+ total: z11.number().int().min(0),
912
990
  /** Pass back as `cursor` for the next page; null on the last one. */
913
991
  nextCursor: pageCursorSchema.nullable().default(null)
914
992
  });
915
- var appStorageKeysSchema = z10.object({
916
- keys: z10.array(
917
- z10.object({ name: z10.string(), expiration: z10.number().nullable() })
993
+ var appStorageKeysSchema = z11.object({
994
+ keys: z11.array(
995
+ z11.object({ name: z11.string(), expiration: z11.number().nullable() })
918
996
  ),
919
997
  /** Pass back as `cursor` for the next page; null on the last one. */
920
998
  nextCursor: pageCursorSchema.nullable().default(null),
921
999
  /** @deprecated Use `nextCursor`. Removed in 2.0.0. */
922
- cursor: z10.string().nullable()
1000
+ cursor: z11.string().nullable()
923
1001
  });
924
- var appStorageValueSchema = z10.object({
925
- key: z10.string(),
926
- size: z10.number().int().min(0),
1002
+ var appStorageValueSchema = z11.object({
1003
+ key: z11.string(),
1004
+ size: z11.number().int().min(0),
927
1005
  /** Null when the value is not UTF-8 text. */
928
- text: z10.string().nullable(),
929
- truncated: z10.boolean()
1006
+ text: z11.string().nullable(),
1007
+ truncated: z11.boolean()
930
1008
  });
931
- var appMigrationNameSchema = z10.string().max(255).regex(/^[\w-][\w.-]*\.sql$/);
1009
+ var appMigrationNameSchema = z11.string().max(255).regex(/^[\w-][\w.-]*\.sql$/);
932
1010
  function compareAppMigrations(a, b) {
933
1011
  const left = Number.parseInt(a.split("_")[0], 10);
934
1012
  const right = Number.parseInt(b.split("_")[0], 10);
@@ -945,12 +1023,12 @@ function compareAppMigrations(a, b) {
945
1023
  }
946
1024
  return a < b ? -1 : a > b ? 1 : 0;
947
1025
  }
948
- var appMigrationsSchema = z10.record(
1026
+ var appMigrationsSchema = z11.record(
949
1027
  appSecretNameSchema,
950
- z10.array(
951
- z10.object({
1028
+ z11.array(
1029
+ z11.object({
952
1030
  name: appMigrationNameSchema,
953
- sql: z10.string().min(1).refine(
1031
+ sql: z11.string().min(1).refine(
954
1032
  (sql) => new TextEncoder().encode(sql).length <= APP_MIGRATION_FILE_BYTES,
955
1033
  `A migration file must not exceed ${APP_MIGRATION_FILE_BYTES} bytes`
956
1034
  )
@@ -968,21 +1046,21 @@ var appMigrationsSchema = z10.record(
968
1046
  );
969
1047
  var appScripts = {
970
1048
  routing: appRoutingSchema,
971
- devScript: z10.string().regex(/^[\w:-]+$/),
972
- checkScript: z10.string().regex(/^[\w:-]+$/),
973
- buildScript: z10.string().regex(/^[\w:-]+$/)
1049
+ devScript: z11.string().regex(/^[\w:-]+$/),
1050
+ checkScript: z11.string().regex(/^[\w:-]+$/),
1051
+ buildScript: z11.string().regex(/^[\w:-]+$/)
974
1052
  };
975
1053
  var workerSettings = {
976
- runWorkerFirst: z10.boolean().default(false),
1054
+ runWorkerFirst: z11.boolean().default(false),
977
1055
  main: outputPathSchema.refine(
978
1056
  (path) => /\.m?js$/.test(path),
979
1057
  "Expected a compiled JavaScript entry"
980
1058
  ),
981
- compatibilityDate: z10.string().regex(/^\d{4}-\d{2}-\d{2}$/),
982
- compatibilityFlags: z10.array(z10.string().min(1)).max(50).default([]),
983
- vars: z10.record(
984
- z10.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).refine((name) => name !== "ASSETS"),
985
- z10.string()
1059
+ compatibilityDate: z11.string().regex(/^\d{4}-\d{2}-\d{2}$/),
1060
+ compatibilityFlags: z11.array(z11.string().min(1)).max(50).default([]),
1061
+ vars: z11.record(
1062
+ z11.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).refine((name) => name !== "ASSETS"),
1063
+ z11.string()
986
1064
  ).default({}),
987
1065
  secrets: appSecretDeclarationsSchema.default({}),
988
1066
  storage: appStorageSchema.optional(),
@@ -1011,62 +1089,62 @@ var distinctBindings = (worker, ctx) => {
1011
1089
  }
1012
1090
  }
1013
1091
  };
1014
- var hostedAppSchema = z10.discriminatedUnion("kind", [
1015
- z10.object({
1016
- kind: z10.literal("static"),
1092
+ var hostedAppSchema = z11.discriminatedUnion("kind", [
1093
+ z11.object({
1094
+ kind: z11.literal("static"),
1017
1095
  directory: outputPathSchema,
1018
1096
  ...appScripts
1019
1097
  }).strict(),
1020
- z10.object({
1021
- kind: z10.literal("worker"),
1098
+ z11.object({
1099
+ kind: z11.literal("worker"),
1022
1100
  directory: outputPathSchema,
1023
1101
  assetsDirectory: outputPathSchema.optional(),
1024
1102
  ...appScripts,
1025
1103
  ...workerSettings
1026
1104
  }).strict().superRefine(distinctBindings)
1027
1105
  ]);
1028
- var repositorySchema = z10.object({
1029
- id: z10.string().uuid(),
1106
+ var repositorySchema = z11.object({
1107
+ id: z11.string().uuid(),
1030
1108
  organization: identifier,
1031
1109
  project: identifier,
1032
- remote: z10.string().url(),
1033
- defaultBranch: z10.string(),
1034
- status: z10.enum(["provisioning", "ready"])
1110
+ remote: z11.string().url(),
1111
+ defaultBranch: z11.string(),
1112
+ status: z11.enum(["provisioning", "ready"])
1035
1113
  });
1036
- var createRepositorySchema = z10.object({
1114
+ var createRepositorySchema = z11.object({
1037
1115
  /** Omitted: the starter chosen at project setup, else `campaign`. */
1038
1116
  starter: starterIdSchema.optional()
1039
1117
  }).strict();
1040
- var deviceStartSchema = z10.object({
1041
- challenge: z10.string().regex(/^[a-f0-9]{64}$/)
1118
+ var deviceStartSchema = z11.object({
1119
+ challenge: z11.string().regex(/^[a-f0-9]{64}$/)
1042
1120
  }).strict();
1043
- var deviceRedeemSchema = z10.object({
1044
- id: z10.string().uuid(),
1045
- verifier: z10.string().min(43).max(128)
1121
+ var deviceRedeemSchema = z11.object({
1122
+ id: z11.string().uuid(),
1123
+ verifier: z11.string().min(43).max(128)
1046
1124
  }).strict();
1047
- var deviceApproveSchema = z10.object({
1048
- id: z10.string().uuid(),
1049
- code: z10.string().regex(/^[A-F0-9]{4}-[A-F0-9]{4}$/)
1125
+ var deviceApproveSchema = z11.object({
1126
+ id: z11.string().uuid(),
1127
+ code: z11.string().regex(/^[A-F0-9]{4}-[A-F0-9]{4}$/)
1050
1128
  }).strict();
1051
- var commitSchema = z10.string().regex(/^[a-f0-9]{40}$/);
1052
- var stageRequestSchema = z10.object({
1129
+ var commitSchema = z11.string().regex(/^[a-f0-9]{40}$/);
1130
+ var stageRequestSchema = z11.object({
1053
1131
  commit: commitSchema,
1054
- requestId: z10.string().uuid()
1132
+ requestId: z11.string().uuid()
1055
1133
  }).strict();
1056
- var buildIdentitySchema = z10.object({
1134
+ var buildIdentitySchema = z11.object({
1057
1135
  routing: appRoutingSchema,
1058
- slug: z10.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional(),
1059
- runtime: z10.enum(["simulation", "hosted-test"]).default("simulation"),
1060
- id: z10.string().uuid(),
1061
- repository: z10.string().uuid(),
1136
+ slug: z11.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional(),
1137
+ runtime: z11.enum(["simulation", "hosted-test"]).default("simulation"),
1138
+ id: z11.string().uuid(),
1139
+ repository: z11.string().uuid(),
1062
1140
  organization: identifier,
1063
1141
  project: identifier,
1064
1142
  commit: commitSchema,
1065
- createdAt: z10.number(),
1066
- actor: z10.string(),
1067
- commitMessage: z10.string().max(500).optional()
1143
+ createdAt: z11.number(),
1144
+ actor: z11.string(),
1145
+ commitMessage: z11.string().max(500).optional()
1068
1146
  });
1069
- var buildPhaseSchema = z10.enum([
1147
+ var buildPhaseSchema = z11.enum([
1070
1148
  "queued",
1071
1149
  "source",
1072
1150
  "install",
@@ -1076,72 +1154,72 @@ var buildPhaseSchema = z10.enum([
1076
1154
  "ready",
1077
1155
  "failed"
1078
1156
  ]);
1079
- var buildStatusSchema = z10.object({
1157
+ var buildStatusSchema = z11.object({
1080
1158
  phase: buildPhaseSchema,
1081
1159
  failedPhase: buildPhaseSchema.optional(),
1082
- updatedAt: z10.number(),
1083
- message: z10.string()
1160
+ updatedAt: z11.number(),
1161
+ message: z11.string()
1084
1162
  });
1085
1163
  var hostedBuildSchema = buildIdentitySchema.extend({
1086
1164
  ...buildStatusSchema.shape,
1087
- finished: z10.boolean(),
1088
- current: z10.boolean(),
1089
- stagingUrl: z10.string().url()
1165
+ finished: z11.boolean(),
1166
+ current: z11.boolean(),
1167
+ stagingUrl: z11.string().url()
1090
1168
  });
1091
- var stagingAccessModeSchema = z10.enum(["console", "password"]);
1092
- var stagingAccessSchema = z10.object({ mode: stagingAccessModeSchema });
1093
- var stagingAccessInputSchema = z10.discriminatedUnion("mode", [
1094
- z10.object({ mode: z10.literal("console") }).strict(),
1095
- z10.object({
1096
- mode: z10.literal("password"),
1097
- password: z10.string().min(8).max(128)
1169
+ var stagingAccessModeSchema = z11.enum(["console", "password"]);
1170
+ var stagingAccessSchema = z11.object({ mode: stagingAccessModeSchema });
1171
+ var stagingAccessInputSchema = z11.discriminatedUnion("mode", [
1172
+ z11.object({ mode: z11.literal("console") }).strict(),
1173
+ z11.object({
1174
+ mode: z11.literal("password"),
1175
+ password: z11.string().min(8).max(128)
1098
1176
  }).strict()
1099
1177
  ]);
1100
- var stagingPathSchema = z10.string().max(2048).refine(
1178
+ var stagingPathSchema = z11.string().max(2048).refine(
1101
1179
  (path) => path.startsWith("/") && !path.startsWith("//") && !path.includes("\\"),
1102
1180
  "Expected a path on the staging host"
1103
1181
  );
1104
- var stagingLinkSchema = z10.object({
1105
- url: z10.string().url(),
1106
- expiresAt: z10.number()
1182
+ var stagingLinkSchema = z11.object({
1183
+ url: z11.string().url(),
1184
+ expiresAt: z11.number()
1107
1185
  });
1108
- var buildSnapshotSchema = z10.object({
1109
- builds: z10.array(hostedBuildSchema),
1186
+ var buildSnapshotSchema = z11.object({
1187
+ builds: z11.array(hostedBuildSchema),
1110
1188
  current: hostedBuildSchema.nullable(),
1111
1189
  selected: hostedBuildSchema.nullable(),
1112
- logs: z10.string()
1190
+ logs: z11.string()
1113
1191
  });
1114
- var assetPathSchema = z10.string().max(512).refine(
1192
+ var assetPathSchema = z11.string().max(512).refine(
1115
1193
  (path) => path.startsWith("/") && // oxlint-disable-next-line no-control-regex -- Asset paths must reject control characters.
1116
1194
  !/[\\\u0000-\u001f?#%]/.test(path) && path.slice(1).split("/").every((part) => part.length > 0 && !part.startsWith(".")),
1117
1195
  "Expected a public asset path without hidden segments"
1118
1196
  );
1119
- var base64Schema = z10.string().regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
1197
+ var base64Schema = z11.string().regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
1120
1198
  var stagedDeploymentLimits = {
1121
1199
  /** Bytes of JSON, uncompressed. */
1122
1200
  size: 64e6,
1123
1201
  /** Bytes of the Brotli-compressed object. */
1124
1202
  compressedSize: 1e7
1125
1203
  };
1126
- var stagedDeploymentSchema = z10.object({
1127
- encoding: z10.literal("br"),
1128
- sha256: z10.string().regex(/^[0-9a-f]{64}$/),
1129
- compressedSize: z10.number().int().positive().max(stagedDeploymentLimits.compressedSize),
1130
- size: z10.number().int().positive().max(stagedDeploymentLimits.size)
1204
+ var stagedDeploymentSchema = z11.object({
1205
+ encoding: z11.literal("br"),
1206
+ sha256: z11.string().regex(/^[0-9a-f]{64}$/),
1207
+ compressedSize: z11.number().int().positive().max(stagedDeploymentLimits.compressedSize),
1208
+ size: z11.number().int().positive().max(stagedDeploymentLimits.size)
1131
1209
  }).strict();
1132
1210
  var stagedDeploymentContentSchema = stagedDeploymentSchema.extend({
1133
- content: z10.string().max(Math.ceil(stagedDeploymentLimits.compressedSize / 3) * 4)
1211
+ content: z11.string().max(Math.ceil(stagedDeploymentLimits.compressedSize / 3) * 4)
1134
1212
  }).strict();
1135
1213
  var stagedDeploymentKey = (build, sha256) => `builds/${build}/deployment/${sha256}.br`;
1136
1214
  var artifactFields = {
1137
1215
  routing: appRoutingSchema,
1138
- worker: z10.object({
1216
+ worker: z11.object({
1139
1217
  ...workerSettings,
1140
1218
  migrations: appMigrationsSchema.optional(),
1141
- modules: z10.array(
1142
- z10.object({
1219
+ modules: z11.array(
1220
+ z11.object({
1143
1221
  path: outputPathSchema.refine((path) => path !== "metadata"),
1144
- type: z10.enum([
1222
+ type: z11.enum([
1145
1223
  "application/javascript+module",
1146
1224
  "application/wasm",
1147
1225
  "text/plain",
@@ -1151,26 +1229,26 @@ var artifactFields = {
1151
1229
  }).strict()
1152
1230
  ).min(1).max(500)
1153
1231
  }).strict().superRefine(distinctBindings).optional(),
1154
- assets: z10.array(
1155
- z10.object({
1232
+ assets: z11.array(
1233
+ z11.object({
1156
1234
  path: assetPathSchema,
1157
1235
  content: base64Schema.max(14e6),
1158
- size: z10.number().int().min(0).max(1e7)
1236
+ size: z11.number().int().min(0).max(1e7)
1159
1237
  }).strict()
1160
1238
  ).max(500)
1161
1239
  };
1162
- var buildArtifactsSchema = z10.discriminatedUnion("format", [
1163
- z10.object({
1164
- format: z10.literal(1),
1240
+ var buildArtifactsSchema = z11.discriminatedUnion("format", [
1241
+ z11.object({
1242
+ format: z11.literal(1),
1165
1243
  ...artifactFields,
1166
- quests: z10.unknown(),
1167
- catalog: z10.unknown()
1244
+ quests: z11.unknown(),
1245
+ catalog: z11.unknown()
1168
1246
  }).strict(),
1169
- z10.object({
1170
- format: z10.literal(2),
1247
+ z11.object({
1248
+ format: z11.literal(2),
1171
1249
  ...artifactFields,
1172
1250
  deployment: stagedDeploymentSchema,
1173
- images: z10.array(imageAssetArtifactSchema).max(10)
1251
+ images: z11.array(imageAssetArtifactSchema).max(10)
1174
1252
  }).strict()
1175
1253
  ]).superRefine((value, ctx) => {
1176
1254
  if (value.worker) {
@@ -1222,39 +1300,39 @@ var buildArtifactsSchema = z10.discriminatedUnion("format", [
1222
1300
  });
1223
1301
 
1224
1302
  // src/server/development.ts
1225
- import { z as z11 } from "zod";
1226
- var developmentPreflightSchema = z11.object({
1227
- organization: z11.string(),
1228
- project: z11.string(),
1229
- environment: z11.enum(["test", "live"]),
1230
- identity: z11.object({
1231
- exchange: z11.literal("supported"),
1232
- activeIntegrations: z11.number().int().nonnegative()
1303
+ import * as z12 from "zod";
1304
+ var developmentPreflightSchema = z12.object({
1305
+ organization: z12.string(),
1306
+ project: z12.string(),
1307
+ environment: z12.enum(["test", "live"]),
1308
+ identity: z12.object({
1309
+ exchange: z12.literal("supported"),
1310
+ activeIntegrations: z12.number().int().nonnegative()
1233
1311
  }).optional(),
1234
- staging: z11.enum(["configured", "blocked"]),
1235
- development: z11.object({
1236
- status: z11.enum(["configured", "blocked"]),
1312
+ staging: z12.enum(["configured", "blocked"]),
1313
+ development: z12.object({
1314
+ status: z12.enum(["configured", "blocked"]),
1237
1315
  // How `domino dev` reaches the preview origin: a Cloudflare tunnel, or a direct route on a
1238
1316
  // local development stack. APIs that predate the field use tunnels.
1239
- transport: z11.enum(["tunnel", "direct"]).default("tunnel"),
1240
- missing: z11.array(z11.string()),
1241
- authentication: z11.array(z11.string())
1317
+ transport: z12.enum(["tunnel", "direct"]).default("tunnel"),
1318
+ missing: z12.array(z12.string()),
1319
+ authentication: z12.array(z12.string())
1242
1320
  }),
1243
- checks: z11.array(
1244
- z11.object({
1245
- id: z11.string(),
1246
- status: z11.enum(["ok", "error"]),
1247
- message: z11.string(),
1248
- missing: z11.array(z11.string()).optional(),
1249
- issues: z11.array(z11.string()).optional()
1321
+ checks: z12.array(
1322
+ z12.object({
1323
+ id: z12.string(),
1324
+ status: z12.enum(["ok", "error"]),
1325
+ message: z12.string(),
1326
+ missing: z12.array(z12.string()).optional(),
1327
+ issues: z12.array(z12.string()).optional()
1250
1328
  })
1251
1329
  )
1252
1330
  });
1253
1331
 
1254
1332
  // src/server/hosted.ts
1255
- import { z as z12 } from "zod";
1333
+ import * as z13 from "zod";
1256
1334
  var hostedKeyPermissions = ["read", "points", "ingest"];
1257
- var hostedKeyPermissionList = z12.array(z12.string()).transform(
1335
+ var hostedKeyPermissionList = z13.array(z13.string()).transform(
1258
1336
  (values) => values.filter(
1259
1337
  (value) => hostedKeyPermissions.includes(value)
1260
1338
  )
@@ -1266,17 +1344,17 @@ var hostedManagementBindings = [
1266
1344
  "DOMINO_PROJECT",
1267
1345
  "DOMINO_ENVIRONMENT"
1268
1346
  ];
1269
- var hostedKeySecretSchema = z12.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key");
1270
- var hostedKeySchema = z12.object({
1271
- id: z12.string().uuid(),
1347
+ var hostedKeySecretSchema = z13.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key");
1348
+ var hostedKeySchema = z13.object({
1349
+ id: z13.string().uuid(),
1272
1350
  token: hostedKeySecretSchema,
1273
1351
  organization: identifier,
1274
1352
  project: identifier,
1275
- environment: z12.enum(["test", "live"]),
1353
+ environment: z13.enum(["test", "live"]),
1276
1354
  permissions: hostedKeyPermissionList,
1277
- expiresAt: z12.number().nullable()
1355
+ expiresAt: z13.number().nullable()
1278
1356
  }).strict();
1279
- var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl: z12.string().url() }).strict();
1357
+ var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl: z13.string().url() }).strict();
1280
1358
  function hostedManagementClient(env) {
1281
1359
  const missing = hostedManagementBindings.filter((name) => !env[name]);
1282
1360
  if (missing.length) {
@@ -1284,7 +1362,7 @@ function hostedManagementClient(env) {
1284
1362
  `Missing ${missing.join(", ")}. Domino sets these for hosted apps and domino dev; update the project's vite.config.ts to forward them in development.`
1285
1363
  );
1286
1364
  }
1287
- const environment = z12.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
1365
+ const environment = z13.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
1288
1366
  const token = env.DOMINO_MANAGEMENT_KEY;
1289
1367
  return createManagementClient({
1290
1368
  baseUrl: env.DOMINO_API_URL.replace(/\/+$/, ""),
@@ -1296,9 +1374,9 @@ function hostedManagementClient(env) {
1296
1374
  }
1297
1375
 
1298
1376
  // src/server/index.ts
1299
- var environmentSchema = z13.enum(["test", "live"]);
1300
- var roleSchema = z13.enum(["editor", "reviewer", "staff"]);
1301
- var permissionSchema = z13.enum([
1377
+ var environmentSchema = z14.enum(["test", "live"]);
1378
+ var roleSchema = z14.enum(["editor", "reviewer", "staff"]);
1379
+ var permissionSchema = z14.enum([
1302
1380
  "read",
1303
1381
  "publish",
1304
1382
  "review",
@@ -1318,7 +1396,7 @@ var permissionSchema = z13.enum([
1318
1396
  */
1319
1397
  "enroll"
1320
1398
  ]);
1321
- var permissionListSchema = z13.array(z13.string()).transform(
1399
+ var permissionListSchema = z14.array(z14.string()).transform(
1322
1400
  (values) => values.filter(
1323
1401
  (value) => permissionSchema.safeParse(value).success
1324
1402
  )
@@ -1328,33 +1406,33 @@ var rolePermissions = {
1328
1406
  reviewer: ["read", "review"],
1329
1407
  staff: ["read", "confirm", "handover"]
1330
1408
  };
1331
- var projectSetupSchema = z13.object({
1332
- mode: z13.enum(["new", "existing"]),
1333
- brief: z13.string().trim().min(1).max(4e3)
1409
+ var projectSetupSchema = z14.object({
1410
+ mode: z14.enum(["new", "existing"]),
1411
+ brief: z14.string().trim().min(1).max(4e3)
1334
1412
  }).strict();
1335
- var operatorUserSchema = z13.object({
1336
- id: z13.string(),
1337
- name: z13.string().nullable(),
1338
- email: z13.string().nullable(),
1339
- avatar: z13.string().nullable()
1413
+ var operatorUserSchema = z14.object({
1414
+ id: z14.string(),
1415
+ name: z14.string().nullable(),
1416
+ email: z14.string().nullable(),
1417
+ avatar: z14.string().nullable()
1340
1418
  });
1341
- var projectSchema = z13.object({
1342
- slug: z13.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
1343
- createdBy: z13.string().nullable().optional(),
1419
+ var projectSchema = z14.object({
1420
+ slug: z14.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
1421
+ createdBy: z14.string().nullable().optional(),
1344
1422
  creator: operatorUserSchema.nullable().optional(),
1345
1423
  /** A response, so fields a newer server adds to the setup are dropped, not rejected. */
1346
- setup: z13.object(projectSetupSchema.shape).optional(),
1424
+ setup: z14.object(projectSetupSchema.shape).optional(),
1347
1425
  /** The starter chosen at setup. A plain string, so later starters still parse. */
1348
- starter: z13.string().optional(),
1349
- id: z13.string().min(1),
1426
+ starter: z14.string().optional(),
1427
+ id: z14.string().min(1),
1350
1428
  organization: identifier,
1351
1429
  project: identifier,
1352
- name: z13.string(),
1353
- subtitle: z13.string(),
1354
- initials: z13.string(),
1355
- color: z13.string(),
1430
+ name: z14.string(),
1431
+ subtitle: z14.string(),
1432
+ initials: z14.string(),
1433
+ color: z14.string(),
1356
1434
  permissions: permissionListSchema,
1357
- environments: z13.array(environmentSchema)
1435
+ environments: z14.array(environmentSchema)
1358
1436
  }).refine(
1359
1437
  (project) => !project.creator || project.creator.id === project.createdBy,
1360
1438
  {
@@ -1362,45 +1440,45 @@ var projectSchema = z13.object({
1362
1440
  path: ["creator"]
1363
1441
  }
1364
1442
  );
1365
- var projectInputSchema = z13.object({
1443
+ var projectInputSchema = z14.object({
1366
1444
  actionId: identifier,
1367
- name: z13.string().trim().min(1).max(80),
1445
+ name: z14.string().trim().min(1).max(80),
1368
1446
  setup: projectSetupSchema.optional(),
1369
1447
  /** The starter a new hosted app begins from, with `setup.mode` "new". */
1370
1448
  starter: starterIdSchema.optional()
1371
1449
  }).strict();
1372
- var projectUpdateInputSchema = z13.union([
1373
- z13.object({ name: projectInputSchema.shape.name }).strict(),
1374
- z13.object({
1450
+ var projectUpdateInputSchema = z14.union([
1451
+ z14.object({ name: projectInputSchema.shape.name }).strict(),
1452
+ z14.object({
1375
1453
  slug: projectSchema.shape.slug,
1376
- confirm: z13.string().min(1).max(80)
1454
+ confirm: z14.string().min(1).max(80)
1377
1455
  }).strict()
1378
1456
  ]);
1379
- var projectDeletionInputSchema = z13.object({ confirm: z13.string().min(1).max(80) }).strict();
1380
- var projectDeletionSchema = z13.object({
1457
+ var projectDeletionInputSchema = z14.object({ confirm: z14.string().min(1).max(80) }).strict();
1458
+ var projectDeletionSchema = z14.object({
1381
1459
  project: identifier,
1382
- purgeAfter: z13.number().int()
1460
+ purgeAfter: z14.number().int()
1383
1461
  });
1384
- var projectTransferInputSchema = z13.object({ organization: identifier, confirm: z13.string().min(1).max(80) }).strict();
1385
- var projectTransferSchema = z13.object({
1462
+ var projectTransferInputSchema = z14.object({ organization: identifier, confirm: z14.string().min(1).max(80) }).strict();
1463
+ var projectTransferSchema = z14.object({
1386
1464
  organization: identifier,
1387
1465
  project: identifier
1388
1466
  });
1389
- var grantSchema = z13.object({
1390
- subject: z13.string().min(1).max(200),
1391
- roles: z13.array(roleSchema),
1392
- environments: z13.array(environmentSchema)
1467
+ var grantSchema = z14.object({
1468
+ subject: z14.string().min(1).max(200),
1469
+ roles: z14.array(roleSchema),
1470
+ environments: z14.array(environmentSchema)
1393
1471
  }).strict();
1394
- var grantRecordSchema = z13.object(grantSchema.shape);
1395
- var stockAdditionSchema = z13.object({
1472
+ var grantRecordSchema = z14.object(grantSchema.shape);
1473
+ var stockAdditionSchema = z14.object({
1396
1474
  item: identifier,
1397
- quantity: z13.number().int(),
1475
+ quantity: z14.number().int(),
1398
1476
  actionId: identifier
1399
1477
  });
1400
- var completionRevokeSchema = z13.object({
1478
+ var completionRevokeSchema = z14.object({
1401
1479
  actionId: identifier,
1402
- reason: z13.string().trim().min(1).max(500),
1403
- freeOccurrence: z13.boolean().default(false)
1480
+ reason: z14.string().trim().min(1).max(500),
1481
+ freeOccurrence: z14.boolean().default(false)
1404
1482
  }).strict();
1405
1483
  var RevokedEntitlementOutcome = {
1406
1484
  /** No other completion grants the reward: it is void, after cancelling a handover in progress. */
@@ -1428,234 +1506,234 @@ var RevokedReferralOutcome = {
1428
1506
  /** Qualified on another accepted completion of the program's quest instead. */
1429
1507
  Requalified: "requalified"
1430
1508
  };
1431
- var entitlementOutcomeSchema = z13.string().min(1).max(64);
1432
- var deliveryOutcomeSchema = z13.string().min(1).max(64);
1433
- var referralOutcomeSchema = z13.string().min(1).max(64);
1434
- var completionRevocationSchema = z13.object({
1509
+ var entitlementOutcomeSchema = z14.string().min(1).max(64);
1510
+ var deliveryOutcomeSchema = z14.string().min(1).max(64);
1511
+ var referralOutcomeSchema = z14.string().min(1).max(64);
1512
+ var completionRevocationSchema = z14.object({
1435
1513
  completion: identifier,
1436
1514
  /** The quest ID, or the board ID when `source.kind` is `leaderboard`. */
1437
1515
  quest: identifier,
1438
1516
  member: identifier,
1439
1517
  /** What paid the revoked completion. `source.id` repeats `quest`. */
1440
1518
  source: completionSourceSchema.optional(),
1441
- revokedAt: z13.number(),
1442
- occurrenceFreed: z13.boolean(),
1443
- badges: z13.array(z13.object({ badge: identifier, stillAwarded: z13.boolean() })).optional(),
1444
- points: z13.array(
1445
- z13.object({
1519
+ revokedAt: z14.number(),
1520
+ occurrenceFreed: z14.boolean(),
1521
+ badges: z14.array(z14.object({ badge: identifier, stillAwarded: z14.boolean() })).optional(),
1522
+ points: z14.array(
1523
+ z14.object({
1446
1524
  entry: identifier,
1447
1525
  balance: identifier,
1448
1526
  reversal: identifier.nullable(),
1449
- reversed: z13.number().int(),
1450
- unreversed: z13.number().int()
1527
+ reversed: z14.number().int(),
1528
+ unreversed: z14.number().int()
1451
1529
  })
1452
1530
  ),
1453
- entitlements: z13.array(
1454
- z13.object({
1531
+ entitlements: z14.array(
1532
+ z14.object({
1455
1533
  entitlement: identifier,
1456
1534
  reward: identifier,
1457
1535
  outcome: entitlementOutcomeSchema,
1458
- status: z13.string()
1536
+ status: z14.string()
1459
1537
  })
1460
1538
  ),
1461
- deliveries: z13.array(
1462
- z13.object({
1463
- delivery: z13.string(),
1464
- roleId: z13.string(),
1539
+ deliveries: z14.array(
1540
+ z14.object({
1541
+ delivery: z14.string(),
1542
+ roleId: z14.string(),
1465
1543
  outcome: deliveryOutcomeSchema,
1466
1544
  /**
1467
1545
  * By Relay's records, another accepted, unrevoked completion of the member also granted this
1468
1546
  * role to the same Discord account and server. Relay does not read Discord's membership.
1469
1547
  */
1470
- stillGranted: z13.boolean()
1548
+ stillGranted: z14.boolean()
1471
1549
  })
1472
1550
  ),
1473
- referrals: z13.array(
1474
- z13.object({
1551
+ referrals: z14.array(
1552
+ z14.object({
1475
1553
  program: identifier,
1476
1554
  outcome: referralOutcomeSchema
1477
1555
  })
1478
1556
  ),
1479
- streakMilestone: z13.boolean()
1557
+ streakMilestone: z14.boolean()
1480
1558
  });
1481
- var accessSchema = z13.object({
1482
- actor: z13.string(),
1483
- organization: z13.string(),
1484
- admin: z13.boolean(),
1485
- local: z13.boolean(),
1486
- projects: z13.array(projectSchema)
1559
+ var accessSchema = z14.object({
1560
+ actor: z14.string(),
1561
+ organization: z14.string(),
1562
+ admin: z14.boolean(),
1563
+ local: z14.boolean(),
1564
+ projects: z14.array(projectSchema)
1487
1565
  });
1488
- var querySchema = z13.object({
1489
- q: z13.string().max(200).default(""),
1490
- filter: z13.string().max(50).default("all"),
1491
- offset: z13.coerce.number().int().min(0).max(1e6).default(0),
1492
- limit: z13.coerce.number().int().min(1).max(100).default(25)
1566
+ var querySchema = z14.object({
1567
+ q: z14.string().max(200).default(""),
1568
+ filter: z14.string().max(50).default("all"),
1569
+ offset: z14.coerce.number().int().min(0).max(1e6).default(0),
1570
+ limit: z14.coerce.number().int().min(1).max(100).default(25)
1493
1571
  });
1494
- var accountProfileSchema = z13.object({
1495
- name: z13.string().optional(),
1572
+ var accountProfileSchema = z14.object({
1573
+ name: z14.string().optional(),
1496
1574
  /** The account's handle, where the provider has one (X and Discord). */
1497
- username: z13.string().optional(),
1498
- email: z13.string().optional(),
1499
- emailVerified: z13.boolean().default(false),
1500
- imageUrl: z13.string().url().optional()
1575
+ username: z14.string().optional(),
1576
+ email: z14.string().optional(),
1577
+ emailVerified: z14.boolean().default(false),
1578
+ imageUrl: z14.string().url().optional()
1501
1579
  });
1502
- var memberAccountSchema = z13.object({
1580
+ var memberAccountSchema = z14.object({
1503
1581
  /** `wallet` for wallet sign-in, `account` for every other connected account. */
1504
- kind: z13.enum(["account", "wallet"]),
1505
- provider: z13.string(),
1506
- subject: z13.string(),
1507
- signInEnabled: z13.boolean(),
1582
+ kind: z14.enum(["account", "wallet"]),
1583
+ provider: z14.string(),
1584
+ subject: z14.string(),
1585
+ signInEnabled: z14.boolean(),
1508
1586
  profile: accountProfileSchema.optional()
1509
1587
  });
1510
- var operationSchema = z13.object({
1511
- target: z13.string(),
1512
- paused: z13.boolean(),
1513
- revision: z13.number().int(),
1514
- reason: z13.string(),
1515
- actor: z13.string().nullable(),
1516
- changedAt: z13.number()
1588
+ var operationSchema = z14.object({
1589
+ target: z14.string(),
1590
+ paused: z14.boolean(),
1591
+ revision: z14.number().int(),
1592
+ reason: z14.string(),
1593
+ actor: z14.string().nullable(),
1594
+ changedAt: z14.number()
1517
1595
  });
1518
- var operationInputSchema = z13.object({
1519
- target: z13.union([
1520
- z13.literal("redemptions"),
1521
- z13.string().regex(/^quest:[\w-]+$/)
1596
+ var operationInputSchema = z14.object({
1597
+ target: z14.union([
1598
+ z14.literal("redemptions"),
1599
+ z14.string().regex(/^quest:[\w-]+$/)
1522
1600
  ]),
1523
- paused: z13.boolean(),
1524
- revision: z13.number().int().nonnegative(),
1525
- reason: z13.string().trim().min(1).max(500),
1601
+ paused: z14.boolean(),
1602
+ revision: z14.number().int().nonnegative(),
1603
+ reason: z14.string().trim().min(1).max(500),
1526
1604
  actionId: identifier
1527
1605
  }).strict();
1528
- var questLifecycleInputSchema = z13.object({
1606
+ var questLifecycleInputSchema = z14.object({
1529
1607
  quest: identifier,
1530
1608
  expectedRelease: identifier.optional(),
1531
- archived: z13.boolean(),
1532
- reason: z13.string().trim().min(1).max(500),
1609
+ archived: z14.boolean(),
1610
+ reason: z14.string().trim().min(1).max(500),
1533
1611
  actionId: identifier
1534
1612
  }).strict();
1535
- var questLifecycleSchema = z13.object({
1613
+ var questLifecycleSchema = z14.object({
1536
1614
  quest: identifier,
1537
1615
  key: identifier.nullable(),
1538
- title: z13.string(),
1616
+ title: z14.string(),
1539
1617
  release: identifier,
1540
- lifecycle: z13.enum(["active", "paused", "archived"]),
1541
- changed: z13.boolean()
1618
+ lifecycle: z14.enum(["active", "paused", "archived"]),
1619
+ changed: z14.boolean()
1542
1620
  });
1543
- var memberSchema = z13.object({
1544
- id: z13.string(),
1545
- test: z13.boolean().optional(),
1546
- name: z13.string().nullable().optional(),
1547
- accounts: z13.array(memberAccountSchema).default([]),
1548
- attempts: z13.number(),
1549
- completions: z13.number(),
1550
- rewards: z13.number(),
1551
- lastActivity: z13.number().nullable()
1621
+ var memberSchema = z14.object({
1622
+ id: z14.string(),
1623
+ test: z14.boolean().optional(),
1624
+ name: z14.string().nullable().optional(),
1625
+ accounts: z14.array(memberAccountSchema).default([]),
1626
+ attempts: z14.number(),
1627
+ completions: z14.number(),
1628
+ rewards: z14.number(),
1629
+ lastActivity: z14.number().nullable()
1552
1630
  });
1553
- var personSchema = z13.object({
1554
- id: z13.string(),
1555
- test: z13.boolean().optional(),
1556
- name: z13.string().nullable().optional(),
1557
- accounts: z13.array(memberAccountSchema).default([])
1631
+ var personSchema = z14.object({
1632
+ id: z14.string(),
1633
+ test: z14.boolean().optional(),
1634
+ name: z14.string().nullable().optional(),
1635
+ accounts: z14.array(memberAccountSchema).default([])
1558
1636
  });
1559
- var metricsSchema = z13.object({
1560
- quests: z13.number(),
1561
- members: z13.number(),
1562
- attempts: z13.number(),
1563
- completions: z13.number(),
1564
- review: z13.number(),
1565
- failed: z13.number(),
1566
- entitlements: z13.number()
1637
+ var metricsSchema = z14.object({
1638
+ quests: z14.number(),
1639
+ members: z14.number(),
1640
+ attempts: z14.number(),
1641
+ completions: z14.number(),
1642
+ review: z14.number(),
1643
+ failed: z14.number(),
1644
+ entitlements: z14.number()
1567
1645
  });
1568
- var readinessSchema = z13.object({
1569
- checks: z13.array(
1570
- z13.object({
1571
- id: z13.string(),
1572
- status: z13.enum(["ready", "blocked"]),
1573
- title: z13.string(),
1574
- detail: z13.string()
1646
+ var readinessSchema = z14.object({
1647
+ checks: z14.array(
1648
+ z14.object({
1649
+ id: z14.string(),
1650
+ status: z14.enum(["ready", "blocked"]),
1651
+ title: z14.string(),
1652
+ detail: z14.string()
1575
1653
  })
1576
1654
  )
1577
1655
  });
1578
- var inventorySchema = z13.object({
1579
- item: z13.string(),
1580
- name: z13.string().nullable().default(null),
1581
- available: z13.number(),
1582
- reserved: z13.number(),
1583
- allocated: z13.number().default(0)
1656
+ var inventorySchema = z14.object({
1657
+ item: z14.string(),
1658
+ name: z14.string().nullable().default(null),
1659
+ available: z14.number(),
1660
+ reserved: z14.number(),
1661
+ allocated: z14.number().default(0)
1584
1662
  });
1585
- var auditRecordSchema = z13.object({
1586
- id: z13.string(),
1587
- action: z13.string(),
1588
- actor: z13.string().nullable(),
1663
+ var auditRecordSchema = z14.object({
1664
+ id: z14.string(),
1665
+ action: z14.string(),
1666
+ actor: z14.string().nullable(),
1589
1667
  user: operatorUserSchema.nullable().optional(),
1590
- detail: z13.string(),
1591
- at: z13.number(),
1592
- attempt: z13.string().nullable()
1593
- }).refine((record) => !record.user || record.user.id === record.actor, {
1668
+ detail: z14.string(),
1669
+ at: z14.number(),
1670
+ attempt: z14.string().nullable()
1671
+ }).refine((record4) => !record4.user || record4.user.id === record4.actor, {
1594
1672
  message: "User profile must match the recorded actor",
1595
1673
  path: ["user"]
1596
1674
  });
1597
- var pageSchema = z13.object({
1675
+ var pageSchema = z14.object({
1598
1676
  snapshot: snapshotSchema,
1599
- members: z13.array(memberSchema),
1600
- people: z13.array(personSchema).default([]),
1677
+ members: z14.array(memberSchema),
1678
+ people: z14.array(personSchema).default([]),
1601
1679
  metrics: metricsSchema,
1602
- total: z13.number(),
1603
- offset: z13.number(),
1604
- limit: z13.number(),
1605
- inventory: z13.array(inventorySchema),
1606
- operations: z13.array(operationSchema).default([]),
1607
- audit: z13.array(auditRecordSchema).default([]),
1608
- questCounts: z13.record(z13.string(), z13.number())
1680
+ total: z14.number(),
1681
+ offset: z14.number(),
1682
+ limit: z14.number(),
1683
+ inventory: z14.array(inventorySchema),
1684
+ operations: z14.array(operationSchema).default([]),
1685
+ audit: z14.array(auditRecordSchema).default([]),
1686
+ questCounts: z14.record(z14.string(), z14.number())
1609
1687
  });
1610
- var managedOAuthAccountBaseSchema = z13.object({
1611
- provider: z13.enum(["x", "discord"]),
1612
- revision: z13.number().int().nonnegative()
1688
+ var managedOAuthAccountBaseSchema = z14.object({
1689
+ provider: z14.enum(["x", "discord"]),
1690
+ revision: z14.number().int().nonnegative()
1613
1691
  });
1614
- var managedOAuthAccountSchema = z13.discriminatedUnion("status", [
1692
+ var managedOAuthAccountSchema = z14.discriminatedUnion("status", [
1615
1693
  managedOAuthAccountBaseSchema.extend({
1616
- status: z13.literal("connected"),
1617
- subject: z13.string().min(1),
1618
- linkedAt: z13.number()
1694
+ status: z14.literal("connected"),
1695
+ subject: z14.string().min(1),
1696
+ linkedAt: z14.number()
1619
1697
  }),
1620
- managedOAuthAccountBaseSchema.extend({ status: z13.literal("disconnected") })
1698
+ managedOAuthAccountBaseSchema.extend({ status: z14.literal("disconnected") })
1621
1699
  ]);
1622
1700
  var managedTelegramAccountBaseSchema = managedOAuthAccountBaseSchema.extend({
1623
- provider: z13.literal("telegram")
1701
+ provider: z14.literal("telegram")
1624
1702
  });
1625
- var managedTelegramAccountSchema = z13.discriminatedUnion("status", [
1703
+ var managedTelegramAccountSchema = z14.discriminatedUnion("status", [
1626
1704
  managedTelegramAccountBaseSchema.extend({
1627
- status: z13.literal("connected"),
1705
+ status: z14.literal("connected"),
1628
1706
  /** The numeric Telegram user ID. */
1629
- subject: z13.string().min(1),
1630
- linkedAt: z13.number()
1707
+ subject: z14.string().min(1),
1708
+ linkedAt: z14.number()
1631
1709
  }),
1632
1710
  managedTelegramAccountBaseSchema.extend({
1633
- status: z13.literal("disconnected")
1711
+ status: z14.literal("disconnected")
1634
1712
  })
1635
1713
  ]);
1636
- var memberOAuthUnlinkInputSchema = z13.object({
1637
- provider: z13.enum(["x", "discord"]),
1638
- subject: z13.string().min(1).max(4096),
1639
- revision: z13.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
1640
- reason: z13.string().trim().min(1).max(500)
1714
+ var memberOAuthUnlinkInputSchema = z14.object({
1715
+ provider: z14.enum(["x", "discord"]),
1716
+ subject: z14.string().min(1).max(4096),
1717
+ revision: z14.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
1718
+ reason: z14.string().trim().min(1).max(500)
1641
1719
  }).strict();
1642
1720
  var memberTelegramUnlinkInputSchema = memberOAuthUnlinkInputSchema.omit({ provider: true }).strict();
1643
1721
  var managedWalletSchema = linkedWalletSchema.extend({
1644
- status: z13.enum(["linked", "unlinked"]),
1645
- unlinkedAt: z13.number().int().nullable(),
1722
+ status: z14.enum(["linked", "unlinked"]),
1723
+ unlinkedAt: z14.number().int().nullable(),
1646
1724
  /** "member", or the operator or key that unlinked it. */
1647
- unlinkedBy: z13.string().nullable()
1725
+ unlinkedBy: z14.string().nullable()
1648
1726
  });
1649
1727
  var managedMemberIdentitySchema = memberIdentitySchema.extend({
1650
- status: z13.enum(["linked", "unlinked"]),
1651
- unlinkedAt: z13.number().int().nullable(),
1728
+ status: z14.enum(["linked", "unlinked"]),
1729
+ unlinkedAt: z14.number().int().nullable(),
1652
1730
  /** The operator or key that unlinked it. */
1653
- unlinkedBy: z13.string().nullable()
1731
+ unlinkedBy: z14.string().nullable()
1654
1732
  });
1655
- var memberIdentityChangeInputSchema = z13.object({
1733
+ var memberIdentityChangeInputSchema = z14.object({
1656
1734
  kind: appIdentityKindSchema,
1657
- subject: z13.string().min(1).max(256),
1658
- reason: z13.string().trim().min(1).max(500)
1735
+ subject: z14.string().min(1).max(256),
1736
+ reason: z14.string().trim().min(1).max(500)
1659
1737
  }).strict();
1660
1738
  var balanceCheckSchema = walletBalanceSchema.pick({
1661
1739
  chain: true,
@@ -1665,76 +1743,76 @@ var balanceCheckSchema = walletBalanceSchema.pick({
1665
1743
  wallets: true,
1666
1744
  observedAt: true
1667
1745
  }).extend({ attempt: identifier });
1668
- var walletBalanceChainsSchema = z13.object({
1669
- chains: z13.array(
1670
- z13.object({
1671
- chain: z13.union([
1672
- z13.literal(solanaMainnet),
1746
+ var walletBalanceChainsSchema = z14.object({
1747
+ chains: z14.array(
1748
+ z14.object({
1749
+ chain: z14.union([
1750
+ z14.literal(solanaMainnet),
1673
1751
  cosmosNetworkSchema,
1674
1752
  evmChainIdSchema
1675
1753
  ]),
1676
- name: z13.string(),
1677
- testnet: z13.boolean()
1754
+ name: z14.string(),
1755
+ testnet: z14.boolean()
1678
1756
  })
1679
1757
  )
1680
1758
  });
1681
- var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason: z13.string().trim().min(1).max(500) }).strict();
1759
+ var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason: z14.string().trim().min(1).max(500) }).strict();
1682
1760
  var memberWalletSignInInputSchema = walletUnlinkInputSchema.extend({
1683
- enabled: z13.boolean(),
1684
- reason: z13.string().trim().min(1).max(500)
1761
+ enabled: z14.boolean(),
1762
+ reason: z14.string().trim().min(1).max(500)
1685
1763
  }).strict();
1686
- var telegramBotIdSchema = z13.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789");
1687
- var participantSignInSchema = z13.object({
1688
- providers: z13.array(
1689
- z13.object({ provider: authProviderSchema, configured: z13.boolean() })
1764
+ var telegramBotIdSchema = z14.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789");
1765
+ var participantSignInSchema = z14.object({
1766
+ providers: z14.array(
1767
+ z14.object({ provider: authProviderSchema, configured: z14.boolean() })
1690
1768
  ),
1691
- email: z13.boolean(),
1769
+ email: z14.boolean(),
1692
1770
  /** Wallet families: `"solana"`, `"eip155"`, `"cosmos"`. */
1693
1771
  wallets: walletSignInNetworksSchema,
1694
1772
  /** Why participants cannot sign in to this project, or null. */
1695
- issue: z13.string().nullable(),
1773
+ issue: z14.string().nullable(),
1696
1774
  /**
1697
1775
  * Telegram, outside `providers` in SDK 1.x: whether Domino configured Telegram Login, and the
1698
1776
  * bot whose Mini App participants sign in from, or null when Mini App sign-in is off. Absent
1699
1777
  * from Relay versions without Telegram.
1700
1778
  */
1701
- telegram: z13.object({
1702
- login: z13.boolean(),
1779
+ telegram: z14.object({
1780
+ login: z14.boolean(),
1703
1781
  miniAppBotId: telegramBotIdSchema.nullable()
1704
1782
  }).optional(),
1705
- updatedAt: z13.number().nullable(),
1706
- updatedBy: z13.string().nullable()
1783
+ updatedAt: z14.number().nullable(),
1784
+ updatedBy: z14.string().nullable()
1707
1785
  });
1708
- var participantSignInInputSchema = z13.object({
1786
+ var participantSignInInputSchema = z14.object({
1709
1787
  wallets: walletSignInNetworksSchema,
1710
- telegram: z13.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
1788
+ telegram: z14.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
1711
1789
  }).strict();
1712
- var completionRevocationShortfallSchema = z13.object({
1790
+ var completionRevocationShortfallSchema = z14.object({
1713
1791
  completion: identifier,
1714
1792
  quest: identifier,
1715
- revokedAt: z13.number().int().nonnegative().safe(),
1716
- unreversedPoints: z13.record(identifier, z13.number().int().positive().safe())
1793
+ revokedAt: z14.number().int().nonnegative().safe(),
1794
+ unreversedPoints: z14.record(identifier, z14.number().int().positive().safe())
1717
1795
  });
1718
- var memberDetailSchema = z13.object({
1796
+ var memberDetailSchema = z14.object({
1719
1797
  snapshot: snapshotSchema,
1720
1798
  member: memberSchema,
1721
1799
  progress: memberProgressSchema,
1722
1800
  /** Up to 25 revoked completions with an unreversed point remainder, newest first. */
1723
- revocationShortfalls: z13.array(completionRevocationShortfallSchema).default([]),
1801
+ revocationShortfalls: z14.array(completionRevocationShortfallSchema).default([]),
1724
1802
  /** Current and historical campaign enrollment state, including inactive enrollments. */
1725
- campaignEnrollments: z13.array(campaignEnrollmentSchema).default([]),
1726
- passes: z13.array(
1727
- z13.object({
1728
- provider: z13.string(),
1729
- event: z13.string(),
1730
- subject: z13.string(),
1803
+ campaignEnrollments: z14.array(campaignEnrollmentSchema).default([]),
1804
+ passes: z14.array(
1805
+ z14.object({
1806
+ provider: z14.string(),
1807
+ event: z14.string(),
1808
+ subject: z14.string(),
1731
1809
  attempt: identifier.nullable()
1732
1810
  })
1733
1811
  ).default([]),
1734
1812
  /** Linked and unlinked wallets. */
1735
- wallets: z13.array(managedWalletSchema),
1813
+ wallets: z14.array(managedWalletSchema),
1736
1814
  /** The member's 10 most recent recorded balance reads, newest first. */
1737
- balanceChecks: z13.array(balanceCheckSchema),
1815
+ balanceChecks: z14.array(balanceCheckSchema),
1738
1816
  /** The member's participant profile in this project. */
1739
1817
  profile: managedProfileSchema.nullable(),
1740
1818
  /**
@@ -1742,126 +1820,139 @@ var memberDetailSchema = z13.object({
1742
1820
  * member ID: their selected X and Discord accounts and their `app:<name>` identities in this
1743
1821
  * project, including app identities an operator unlinked, by kind.
1744
1822
  */
1745
- identities: z13.array(managedMemberIdentitySchema)
1823
+ identities: z14.array(managedMemberIdentitySchema)
1824
+ });
1825
+ var managedMemberProgressSchema = z14.object({
1826
+ member: identifier,
1827
+ quests: z14.array(
1828
+ memberProgressSchema.shape.quests.element.extend({
1829
+ /** The streak as `members.get` reports it, without the list of qualifying days. */
1830
+ streak: streakProgressSchema.omit({ days: true }).nullable().optional()
1831
+ })
1832
+ ),
1833
+ /** The member's 25 most recent attempts, newest first. */
1834
+ attempts: snapshotSchema.shape.attempts,
1835
+ /** Each point balance the member has, by balance ID. */
1836
+ balances: snapshotSchema.shape.balances
1746
1837
  });
1747
- var stockInputSchema = z13.object({
1838
+ var stockInputSchema = z14.object({
1748
1839
  item: identifier,
1749
- quantity: z13.number().int().positive().max(1e6),
1840
+ quantity: z14.number().int().positive().max(1e6),
1750
1841
  actionId: identifier
1751
1842
  }).strict();
1752
- var ingestTrackerScopeSchema = z13.array(identifier).min(1).max(100).nullable();
1753
- var tokenScopeInputSchema = z13.object({ ingestTrackers: ingestTrackerScopeSchema }).strict();
1754
- var tokenInputSchema = z13.object({
1755
- name: z13.string().trim().min(1).max(80),
1843
+ var ingestTrackerScopeSchema = z14.array(identifier).min(1).max(100).nullable();
1844
+ var tokenScopeInputSchema = z14.object({ ingestTrackers: ingestTrackerScopeSchema }).strict();
1845
+ var tokenInputSchema = z14.object({
1846
+ name: z14.string().trim().min(1).max(80),
1756
1847
  project: identifier,
1757
1848
  environment: environmentSchema,
1758
- permissions: z13.array(permissionSchema).min(1),
1849
+ permissions: z14.array(permissionSchema).min(1),
1759
1850
  ingestTrackers: ingestTrackerScopeSchema.optional(),
1760
- days: z13.number().int().min(1).max(90).default(30)
1851
+ days: z14.number().int().min(1).max(90).default(30)
1761
1852
  }).strict();
1762
- var tokenSchema = z13.object({
1763
- id: z13.string(),
1764
- name: z13.string(),
1765
- project: z13.string(),
1853
+ var tokenSchema = z14.object({
1854
+ id: z14.string(),
1855
+ name: z14.string(),
1856
+ project: z14.string(),
1766
1857
  environment: environmentSchema,
1767
1858
  permissions: permissionListSchema,
1768
1859
  ingestTrackers: ingestTrackerScopeSchema.optional(),
1769
- expiresAt: z13.number()
1860
+ expiresAt: z14.number()
1770
1861
  });
1771
- var issuedTokenSchema = tokenSchema.extend({ token: z13.string() });
1772
- var teamSchema = z13.array(
1773
- z13.object({ id: z13.string(), label: z13.string() })
1862
+ var issuedTokenSchema = tokenSchema.extend({ token: z14.string() });
1863
+ var teamSchema = z14.array(
1864
+ z14.object({ id: z14.string(), label: z14.string() })
1774
1865
  );
1775
- var memberLookupSchema = z13.object({
1776
- provider: z13.string().min(1).max(200),
1777
- subject: z13.string().min(1).max(2048)
1866
+ var memberLookupSchema = z14.object({
1867
+ provider: z14.string().min(1).max(200),
1868
+ subject: z14.string().min(1).max(2048)
1778
1869
  }).strict();
1779
- var booleanQuery = z13.union([
1780
- z13.boolean(),
1781
- z13.enum(["true", "false"]).transform((v) => v === "true")
1870
+ var booleanQuery = z14.union([
1871
+ z14.boolean(),
1872
+ z14.enum(["true", "false"]).transform((v) => v === "true")
1782
1873
  ]);
1783
- var managedMemberQuerySchema = z13.strictObject({
1784
- q: z13.string().max(200).optional(),
1874
+ var managedMemberQuerySchema = z14.strictObject({
1875
+ q: z14.string().max(200).optional(),
1785
1876
  needsReview: booleanQuery.optional(),
1786
- limit: z13.coerce.number().int().min(1).max(100).optional(),
1877
+ limit: z14.coerce.number().int().min(1).max(100).optional(),
1787
1878
  cursor: pageCursorSchema.optional()
1788
1879
  });
1789
- var managedMemberPageSchema = z13.object({
1790
- items: z13.array(memberSchema),
1791
- total: z13.number().int().nonnegative(),
1792
- nextCursor: z13.string().nullable()
1880
+ var managedMemberPageSchema = z14.object({
1881
+ items: z14.array(memberSchema),
1882
+ total: z14.number().int().nonnegative(),
1883
+ nextCursor: z14.string().nullable()
1793
1884
  });
1794
1885
  var projectMetricsSchema = metricsSchema.extend({
1795
- completionsByQuest: z13.array(
1796
- z13.object({ quest: identifier, completions: z13.number() })
1886
+ completionsByQuest: z14.array(
1887
+ z14.object({ quest: identifier, completions: z14.number() })
1797
1888
  )
1798
1889
  });
1799
- var pageLimit = z13.coerce.number().int().min(1).max(100).optional();
1800
- var managedAttemptQuerySchema = z13.strictObject({
1801
- q: z13.string().max(200).optional(),
1802
- status: z13.string().min(1).max(50).optional(),
1890
+ var pageLimit = z14.coerce.number().int().min(1).max(100).optional();
1891
+ var managedAttemptQuerySchema = z14.strictObject({
1892
+ q: z14.string().max(200).optional(),
1893
+ status: z14.string().min(1).max(50).optional(),
1803
1894
  limit: pageLimit,
1804
1895
  cursor: pageCursorSchema.optional()
1805
1896
  });
1806
- var managedAttemptPageSchema = z13.object({
1807
- items: z13.array(attemptSchema),
1808
- releases: z13.array(publishedReleaseSchema),
1809
- people: z13.array(personSchema),
1810
- total: z13.number().int().nonnegative(),
1811
- nextCursor: z13.string().nullable()
1897
+ var managedAttemptPageSchema = z14.object({
1898
+ items: z14.array(attemptSchema),
1899
+ releases: z14.array(publishedReleaseSchema),
1900
+ people: z14.array(personSchema),
1901
+ total: z14.number().int().nonnegative(),
1902
+ nextCursor: z14.string().nullable()
1812
1903
  });
1813
- var managedReleaseQuerySchema = z13.strictObject({
1904
+ var managedReleaseQuerySchema = z14.strictObject({
1814
1905
  quest: identifier.optional(),
1815
1906
  limit: pageLimit,
1816
1907
  cursor: pageCursorSchema.optional()
1817
1908
  });
1818
- var managedReleasePageSchema = z13.object({
1819
- items: z13.array(publishedReleaseSchema),
1820
- nextCursor: z13.string().nullable()
1909
+ var managedReleasePageSchema = z14.object({
1910
+ items: z14.array(publishedReleaseSchema),
1911
+ nextCursor: z14.string().nullable()
1821
1912
  });
1822
- var managedAttemptSchema = z13.object({
1913
+ var managedAttemptSchema = z14.object({
1823
1914
  attempt: attemptSchema,
1824
1915
  release: publishedReleaseSchema.nullable(),
1825
- events: z13.array(eventSchema),
1916
+ events: z14.array(eventSchema),
1826
1917
  person: personSchema
1827
1918
  });
1828
- var managedEntitlementQuerySchema = z13.strictObject({
1829
- q: z13.string().max(200).optional(),
1830
- status: z13.string().min(1).max(50).optional(),
1919
+ var managedEntitlementQuerySchema = z14.strictObject({
1920
+ q: z14.string().max(200).optional(),
1921
+ status: z14.string().min(1).max(50).optional(),
1831
1922
  limit: pageLimit,
1832
1923
  cursor: pageCursorSchema.optional()
1833
1924
  });
1834
- var managedEntitlementPageSchema = z13.object({
1835
- items: z13.array(entitlementSchema),
1836
- people: z13.array(personSchema),
1837
- total: z13.number().int().nonnegative(),
1838
- nextCursor: z13.string().nullable()
1925
+ var managedEntitlementPageSchema = z14.object({
1926
+ items: z14.array(entitlementSchema),
1927
+ people: z14.array(personSchema),
1928
+ total: z14.number().int().nonnegative(),
1929
+ nextCursor: z14.string().nullable()
1839
1930
  });
1840
- var managedEntitlementSchema = z13.object({
1931
+ var managedEntitlementSchema = z14.object({
1841
1932
  entitlement: entitlementSchema,
1842
1933
  person: personSchema
1843
1934
  });
1844
1935
  var managedStockItemSchema = inventorySchema.extend({
1845
- offers: z13.array(identifier)
1936
+ offers: z14.array(identifier)
1846
1937
  });
1847
- var auditQuerySchema = z13.strictObject({
1848
- category: z13.enum(["reviews", "rewards", "configuration"]).optional(),
1849
- q: z13.string().max(200).optional(),
1938
+ var auditQuerySchema = z14.strictObject({
1939
+ category: z14.enum(["reviews", "rewards", "configuration"]).optional(),
1940
+ q: z14.string().max(200).optional(),
1850
1941
  limit: pageLimit,
1851
1942
  cursor: pageCursorSchema.optional()
1852
1943
  });
1853
1944
  var accessHistoryQuerySchema = auditQuerySchema.omit({
1854
1945
  category: true
1855
1946
  });
1856
- var auditPageSchema = z13.object({
1857
- items: z13.array(auditRecordSchema),
1858
- total: z13.number().int().nonnegative(),
1859
- nextCursor: z13.string().nullable()
1947
+ var auditPageSchema = z14.object({
1948
+ items: z14.array(auditRecordSchema),
1949
+ total: z14.number().int().nonnegative(),
1950
+ nextCursor: z14.string().nullable()
1860
1951
  });
1861
- var verifiedPassSchema = z13.object({
1952
+ var verifiedPassSchema = z14.object({
1862
1953
  provider: identifier,
1863
1954
  event: identifier,
1864
- subject: z13.string().min(1).max(2048),
1955
+ subject: z14.string().min(1).max(2048),
1865
1956
  member: identifier,
1866
1957
  quest: identifier
1867
1958
  }).strict();
@@ -1885,7 +1976,7 @@ function clientFailure(error) {
1885
1976
  return new ManagementError({
1886
1977
  kind: "client",
1887
1978
  code: ManagementErrorCode.InvalidInput,
1888
- message: error instanceof z13.ZodError ? `Invalid management request: ${z13.prettifyError(error)}` : error instanceof Error ? error.message : "Invalid management request",
1979
+ message: error instanceof z14.ZodError ? `Invalid management request: ${z14.prettifyError(error)}` : error instanceof Error ? error.message : "Invalid management request",
1889
1980
  cause: error
1890
1981
  });
1891
1982
  }
@@ -1923,7 +2014,7 @@ function managementClient(options) {
1923
2014
  call
1924
2015
  );
1925
2016
  }
1926
- const ok = z13.object({ ok: z13.literal(true) });
2017
+ const ok = z14.object({ ok: z14.literal(true) });
1927
2018
  function pointHistory(member, ledger, query = {}, call) {
1928
2019
  return get(
1929
2020
  `/points/${identifier.parse(member)}/${identifier.parse(ledger)}/history${queryString(typeof query === "number" ? { before: query } : pageQuerySchema.parse(query))}`,
@@ -2008,7 +2099,7 @@ function managementClient(options) {
2008
2099
  const input = isInput ? inputOrCall ?? {} : {};
2009
2100
  const options2 = isInput ? call : inputOrCall;
2010
2101
  return post(
2011
- `/webhooks/${z13.string().uuid().parse(id)}/rotate-secret`,
2102
+ `/webhooks/${z14.string().uuid().parse(id)}/rotate-secret`,
2012
2103
  webhookSecretSchema,
2013
2104
  webhookRotateInputSchema.parse(withActionId(input)),
2014
2105
  options2
@@ -2056,8 +2147,8 @@ function managementClient(options) {
2056
2147
  }
2057
2148
  return exchange(
2058
2149
  path,
2059
- z13.object({
2060
- status: z13.number(),
2150
+ z14.object({
2151
+ status: z14.number(),
2061
2152
  operationId: identifier.optional(),
2062
2153
  result: schema
2063
2154
  }),
@@ -2088,7 +2179,7 @@ function managementClient(options) {
2088
2179
  call
2089
2180
  ),
2090
2181
  ...resourceArchiveMethods("tracker"),
2091
- list: (call) => get("/trackers", z13.array(trackerStatusSchema), call),
2182
+ list: (call) => get("/trackers", z14.array(trackerStatusSchema), call),
2092
2183
  get: (reference, call) => get(
2093
2184
  `/trackers/${identifier.parse(reference)}`,
2094
2185
  trackerStatusSchema,
@@ -2204,7 +2295,7 @@ function managementClient(options) {
2204
2295
  engagementPublishSchema.parse(withActionId(input)),
2205
2296
  call
2206
2297
  ),
2207
- list: (call) => get("/engagement", z13.array(engagementRuleSchema), call),
2298
+ list: (call) => get("/engagement", z14.array(engagementRuleSchema), call),
2208
2299
  page: (input, call) => get(
2209
2300
  "/engagement/history" + queryString(engagementPageQuerySchema.parse(input)),
2210
2301
  engagementPageSchema,
@@ -2224,7 +2315,7 @@ function managementClient(options) {
2224
2315
  )
2225
2316
  },
2226
2317
  badges: {
2227
- list: (call) => get("/badges", z13.array(managedBadgeSchema), call),
2318
+ list: (call) => get("/badges", z14.array(managedBadgeSchema), call),
2228
2319
  create: (input, call) => create("/badges", managedBadgeSchema, createBadgeSchema, input, call),
2229
2320
  update: (badge, input, call) => {
2230
2321
  const body = badgePropertiesSchema.extend(badgeMutationSchema.shape).parse(withActionId(input));
@@ -2267,7 +2358,7 @@ function managementClient(options) {
2267
2358
  },
2268
2359
  pointLedgers: {
2269
2360
  unarchive: (ledger, input, call) => archiveResource("point-ledger", ledger, false, input, call),
2270
- list: (call) => get("/point-ledgers", z13.array(managedPointLedgerSchema), call),
2361
+ list: (call) => get("/point-ledgers", z14.array(managedPointLedgerSchema), call),
2271
2362
  /**
2272
2363
  * Creates a point ledger, with a stable `key` when code refers to it; requires `publish`. In
2273
2364
  * live, only a person in Console can create one.
@@ -2297,7 +2388,7 @@ function managementClient(options) {
2297
2388
  },
2298
2389
  points: {
2299
2390
  /** @deprecated Use `pointLedgers.list()`, which reads the same ledgers. Removed in 2.0.0. */
2300
- ledgers: (call) => get("/point-ledgers", z13.array(managedPointLedgerSchema), call),
2391
+ ledgers: (call) => get("/point-ledgers", z14.array(managedPointLedgerSchema), call),
2301
2392
  /** @deprecated Use `pointLedgers.create(input)`. Removed in 2.0.0. */
2302
2393
  createLedger: createPointLedger,
2303
2394
  /**
@@ -2335,7 +2426,7 @@ function managementClient(options) {
2335
2426
  referralHistorySchema,
2336
2427
  call
2337
2428
  ),
2338
- list: (call) => get("/referrals", z13.array(publishedReferralSchema), call),
2429
+ list: (call) => get("/referrals", z14.array(publishedReferralSchema), call),
2339
2430
  participants: referralParticipants,
2340
2431
  /**
2341
2432
  * Suspends or restores a member's referral relationship, with a reason; requires `publish`.
@@ -2398,7 +2489,7 @@ function managementClient(options) {
2398
2489
  },
2399
2490
  leaderboards: {
2400
2491
  ...resourceArchiveMethods("leaderboard"),
2401
- list: (call) => get("/leaderboards", z13.array(publishedLeaderboardSchema), call),
2492
+ list: (call) => get("/leaderboards", z14.array(publishedLeaderboardSchema), call),
2402
2493
  standings: (board, input = {}, call) => {
2403
2494
  const query = leaderboardQuerySchema.parse(input);
2404
2495
  return get(
@@ -2412,20 +2503,45 @@ function managementClient(options) {
2412
2503
  },
2413
2504
  history: (board, call) => get(
2414
2505
  `/leaderboards/${identifier.parse(board)}/history`,
2415
- z13.array(publishedLeaderboardSchema),
2506
+ z14.array(publishedLeaderboardSchema),
2416
2507
  call
2417
2508
  ),
2509
+ /** Current members of the board's exclusion group (`exclusionGroup`), by member ID. */
2418
2510
  exclusions: (board, call) => get(
2419
2511
  `/leaderboards/${identifier.parse(board)}/exclusions`,
2420
- z13.array(z13.object({ member: identifier })),
2512
+ z14.array(z14.object({ member: identifier })),
2421
2513
  call
2422
2514
  ),
2515
+ /**
2516
+ * Adds a member to, or removes one from, the board's exclusion group, creating the board's
2517
+ * generated group on its first exclusion. A board bound to a shared group changes that
2518
+ * group, so every board it moderates.
2519
+ */
2423
2520
  exclude: (board, input, call) => post(
2424
2521
  `/leaderboards/${identifier.parse(board)}/exclusions`,
2425
2522
  ok,
2426
2523
  leaderboardExclusionSchema.parse(withActionId(input)),
2427
2524
  call
2428
2525
  ),
2526
+ /**
2527
+ * The group whose members the board leaves out. Change its members with `groups.addMember`
2528
+ * and `groups.removeMember`, or with `exclude`.
2529
+ */
2530
+ exclusionGroup: (board, call) => get(
2531
+ `/leaderboards/${identifier.parse(board)}/exclusion-group`,
2532
+ leaderboardExclusionGroupSchema,
2533
+ call
2534
+ ),
2535
+ /**
2536
+ * Binds the board to another exclusion group, such as one shared by several boards, or back
2537
+ * to its generated group. Settlements read the group bound at their cutoff.
2538
+ */
2539
+ bindExclusionGroup: (board, input, call) => post(
2540
+ `/leaderboards/${identifier.parse(board)}/exclusion-group`,
2541
+ leaderboardExclusionGroupSchema,
2542
+ leaderboardExclusionGroupBindingSchema.parse(withActionId(input)),
2543
+ call
2544
+ ),
2429
2545
  /**
2430
2546
  * Adds a member to a group, creating the group (titled with its key) when it is new, or
2431
2547
  * removes one.
@@ -2458,7 +2574,7 @@ function managementClient(options) {
2458
2574
  ),
2459
2575
  settlements: (board, call) => get(
2460
2576
  `/leaderboards/${identifier.parse(board)}/settlements`,
2461
- z13.array(leaderboardSettlementSummarySchema),
2577
+ z14.array(leaderboardSettlementSummarySchema),
2462
2578
  call
2463
2579
  ),
2464
2580
  settlement: (settlement, call) => get(
@@ -2538,7 +2654,7 @@ function managementClient(options) {
2538
2654
  )
2539
2655
  },
2540
2656
  deployments: {
2541
- list: (call) => get("/deployments", z13.array(deploymentRecordSchema), call),
2657
+ list: (call) => get("/deployments", z14.array(deploymentRecordSchema), call),
2542
2658
  get: (deployment, call) => get(
2543
2659
  `/deployments/${identifier.parse(deployment)}`,
2544
2660
  deploymentRecordSchema,
@@ -2807,7 +2923,7 @@ function managementClient(options) {
2807
2923
  },
2808
2924
  operations: {
2809
2925
  /** Every paused or resumed operation: redemptions and each quest's participation; requires `read`. */
2810
- list: (call) => get("/operations", z13.array(operationSchema), call),
2926
+ list: (call) => get("/operations", z14.array(operationSchema), call),
2811
2927
  /**
2812
2928
  * Pauses or resumes redemptions or one quest's participation, against the `revision` the
2813
2929
  * operator saw, with a reason; requires `publish` permission.
@@ -2856,7 +2972,7 @@ function managementClient(options) {
2856
2972
  call
2857
2973
  ),
2858
2974
  /** Every stock item with its counts and the offers that sell it; requires `read` permission. */
2859
- list: (call) => get("/stock-items", z13.array(managedStockItemSchema), call),
2975
+ list: (call) => get("/stock-items", z14.array(managedStockItemSchema), call),
2860
2976
  createItem: (input, call) => create(
2861
2977
  "/stock-items",
2862
2978
  stockItemSchema,
@@ -2871,7 +2987,7 @@ function managementClient(options) {
2871
2987
  stockInputSchema.parse(withActionId(input)),
2872
2988
  call
2873
2989
  ),
2874
- catalog: (call) => get("/pickup-inventory", z13.array(pickupCatalogSchema), call),
2990
+ catalog: (call) => get("/pickup-inventory", z14.array(pickupCatalogSchema), call),
2875
2991
  configure: (input, call) => post(
2876
2992
  "/pickup-inventory",
2877
2993
  pickupCatalogSchema,
@@ -2897,10 +3013,10 @@ function managementClient(options) {
2897
3013
  offerControlSchema.omit({ enabled: true }).parse(withActionId(input)),
2898
3014
  call
2899
3015
  ),
2900
- list: (call) => get("/offers", z13.array(offerSchema), call),
3016
+ list: (call) => get("/offers", z14.array(offerSchema), call),
2901
3017
  redemptions: (input = {}, call) => get(
2902
3018
  `/redemptions${queryString({ member: input.member })}`,
2903
- z13.array(redemptionSchema),
3019
+ z14.array(redemptionSchema),
2904
3020
  call
2905
3021
  ),
2906
3022
  /** Pauses or resumes an offer at the revision the operator saw. */
@@ -2949,7 +3065,7 @@ function managementClient(options) {
2949
3065
  * them; API keys and project-scoped playground sessions cannot.
2950
3066
  */
2951
3067
  tokens: {
2952
- list: (call) => get("/tokens", z13.array(tokenSchema), call),
3068
+ list: (call) => get("/tokens", z14.array(tokenSchema), call),
2953
3069
  /**
2954
3070
  * Issues a key for one project and environment, limited to permissions the caller holds
2955
3071
  * there. The secret `token` is in this response only.
@@ -2957,14 +3073,14 @@ function managementClient(options) {
2957
3073
  create: (input, call) => post("/tokens", issuedTokenSchema, tokenInputSchema.parse(input), call),
2958
3074
  /** Replace a personal key's ingestion restriction without changing its secret. */
2959
3075
  scope: (id, input, call) => request(
2960
- `/tokens/${encodeURIComponent(z13.string().min(1).parse(id))}/scope`,
3076
+ `/tokens/${encodeURIComponent(z14.string().min(1).parse(id))}/scope`,
2961
3077
  tokenSchema,
2962
3078
  tokenScopeInputSchema.parse(input),
2963
3079
  "PUT",
2964
3080
  call
2965
3081
  ),
2966
3082
  revoke: (id, call) => request(
2967
- `/tokens/${encodeURIComponent(z13.string().min(1).parse(id))}`,
3083
+ `/tokens/${encodeURIComponent(z14.string().min(1).parse(id))}`,
2968
3084
  ok,
2969
3085
  void 0,
2970
3086
  "DELETE",
@@ -2973,7 +3089,7 @@ function managementClient(options) {
2973
3089
  },
2974
3090
  /** Who holds which roles on the client's project; organization administrators only. */
2975
3091
  grants: {
2976
- list: (call) => get("/grants", z13.array(grantRecordSchema), call),
3092
+ list: (call) => get("/grants", z14.array(grantRecordSchema), call),
2977
3093
  /** Replaces one person's roles and environments on the project. The audit log records it. */
2978
3094
  set: (input, call) => request(
2979
3095
  "/grants",
@@ -2990,7 +3106,7 @@ function managementClient(options) {
2990
3106
  /** Signed activity notifications for one project/environment; writes require publish permission. */
2991
3107
  webhooks: {
2992
3108
  state: (id, call) => get(
2993
- `/webhooks/${z13.string().uuid().parse(id)}/state`,
3109
+ `/webhooks/${z14.string().uuid().parse(id)}/state`,
2994
3110
  webhookEndpointStateSchema,
2995
3111
  call
2996
3112
  ),
@@ -3001,24 +3117,24 @@ function managementClient(options) {
3001
3117
  call
3002
3118
  ),
3003
3119
  delete: (id, input, call) => post(
3004
- `/webhooks/${z13.string().uuid().parse(id)}/delete`,
3120
+ `/webhooks/${z14.string().uuid().parse(id)}/delete`,
3005
3121
  webhookEndpointStateSchema,
3006
3122
  webhookDeleteInputSchema.parse(withActionId(input)),
3007
3123
  call
3008
3124
  ),
3009
3125
  pause: (id, input = {}, call) => post(
3010
- `/webhooks/${z13.string().uuid().parse(id)}/pause`,
3126
+ `/webhooks/${z14.string().uuid().parse(id)}/pause`,
3011
3127
  webhookEndpointSchema,
3012
3128
  webhookControlInputSchema.parse(withActionId(input)),
3013
3129
  call
3014
3130
  ),
3015
3131
  resume: (id, input = {}, call) => post(
3016
- `/webhooks/${z13.string().uuid().parse(id)}/resume`,
3132
+ `/webhooks/${z14.string().uuid().parse(id)}/resume`,
3017
3133
  webhookEndpointSchema,
3018
3134
  webhookControlInputSchema.parse(withActionId(input)),
3019
3135
  call
3020
3136
  ),
3021
- list: (call) => get("/webhooks", z13.array(webhookEndpointSchema), call),
3137
+ list: (call) => get("/webhooks", z14.array(webhookEndpointSchema), call),
3022
3138
  /** Pass an `actionId` to recover the endpoint and its secret after a lost answer. */
3023
3139
  create: (input, call) => post(
3024
3140
  "/webhooks",
@@ -3027,7 +3143,7 @@ function managementClient(options) {
3027
3143
  call
3028
3144
  ),
3029
3145
  update: (id, input, call) => request(
3030
- `/webhooks/${z13.string().uuid().parse(id)}`,
3146
+ `/webhooks/${z14.string().uuid().parse(id)}`,
3031
3147
  webhookEndpointSchema,
3032
3148
  webhookUpdateSchema.parse(input),
3033
3149
  "PUT",
@@ -3035,19 +3151,19 @@ function managementClient(options) {
3035
3151
  ),
3036
3152
  /** @deprecated Use pause. Removed in 2.0.0. */
3037
3153
  disable: (id, call) => post(
3038
- `/webhooks/${z13.string().uuid().parse(id)}/disable`,
3154
+ `/webhooks/${z14.string().uuid().parse(id)}/disable`,
3039
3155
  webhookEndpointSchema,
3040
3156
  {},
3041
3157
  call
3042
3158
  ),
3043
3159
  rotateSecret: rotateWebhookSecret,
3044
3160
  deliveries: (id, query = {}, call) => get(
3045
- `/webhooks/${z13.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
3161
+ `/webhooks/${z14.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
3046
3162
  webhookDeliveryPageSchema,
3047
3163
  call
3048
3164
  ),
3049
3165
  replay: (id, delivery, call) => post(
3050
- `/webhooks/${z13.string().uuid().parse(id)}/deliveries/${z13.string().uuid().parse(delivery)}/replay`,
3166
+ `/webhooks/${z14.string().uuid().parse(id)}/deliveries/${z14.string().uuid().parse(delivery)}/replay`,
3051
3167
  webhookDeliverySchema,
3052
3168
  {},
3053
3169
  call
@@ -3058,7 +3174,7 @@ function managementClient(options) {
3058
3174
  * environment. Organization administrators, from a Console session only.
3059
3175
  */
3060
3176
  identityIntegrations: {
3061
- list: (call) => get("/identity-integrations", z13.array(identityIntegrationSchema), call),
3177
+ list: (call) => get("/identity-integrations", z14.array(identityIntegrationSchema), call),
3062
3178
  /** The secret `token` is in this response only. */
3063
3179
  create: (input, call) => post(
3064
3180
  "/identity-integrations",
@@ -3068,7 +3184,7 @@ function managementClient(options) {
3068
3184
  ),
3069
3185
  /** Replaces the key's secret and extends it by 90 days; the old secret stops working. */
3070
3186
  rotate: (id, call) => post(
3071
- `/identity-integrations/${z13.string().uuid().parse(id)}/rotate`,
3187
+ `/identity-integrations/${z14.string().uuid().parse(id)}/rotate`,
3072
3188
  identityIntegrationSecretSchema,
3073
3189
  {},
3074
3190
  call
@@ -3080,7 +3196,7 @@ function managementClient(options) {
3080
3196
  */
3081
3197
  kinds: (call) => get(
3082
3198
  "/identity-integrations/kinds",
3083
- z13.array(identityKindClaimSchema),
3199
+ z14.array(identityKindClaimSchema),
3084
3200
  call
3085
3201
  ),
3086
3202
  /**
@@ -3088,8 +3204,8 @@ function managementClient(options) {
3088
3204
  * and keep attributing tracker records; unlink them on the member to stop that.
3089
3205
  */
3090
3206
  revoke: (id, call) => request(
3091
- `/identity-integrations/${z13.string().uuid().parse(id)}`,
3092
- z13.null(),
3207
+ `/identity-integrations/${z14.string().uuid().parse(id)}`,
3208
+ z14.null(),
3093
3209
  void 0,
3094
3210
  "DELETE",
3095
3211
  call
@@ -3140,7 +3256,7 @@ function managementClient(options) {
3140
3256
  resources: {
3141
3257
  list: (call) => get(
3142
3258
  "/resources",
3143
- z13.object({ resources: z13.array(managedResourceSchema) }),
3259
+ z14.object({ resources: z14.array(managedResourceSchema) }),
3144
3260
  call
3145
3261
  ),
3146
3262
  /** @deprecated Use the resource archive/unarchive methods. Removed in 2.0.0. */
@@ -3156,13 +3272,32 @@ function managementClient(options) {
3156
3272
  rewardDeliveriesSchema,
3157
3273
  call
3158
3274
  ),
3159
- /** Relinquish automatic removal for an external assignment; requires `review` and an audited reason. */
3275
+ /**
3276
+ * Relinquish automatic removal for an external assignment; requires `review` and an audited reason.
3277
+ *
3278
+ * @deprecated Use `discordRoles.preserve`. Removed in 2.0.0.
3279
+ */
3160
3280
  preserveRewardRole: (id, body, call) => post(
3161
3281
  `/reward-deliveries/${encodeURIComponent(id)}/preserve`,
3162
3282
  rewardDeliverySchema,
3163
3283
  body,
3164
3284
  call
3165
3285
  ),
3286
+ /** Operations of the Discord role reward kind on assignments it delivered. */
3287
+ discordRoles: {
3288
+ /**
3289
+ * Hands the role assignment a delivery made to an external administrator or bot: Relay stops
3290
+ * removing it automatically, in every project and environment that shares the assignment.
3291
+ * Never grants the role again or rewrites delivery history. Requires `review` permission and
3292
+ * a reason the audit log keeps. A delivery of another reward kind is refused with 409.
3293
+ */
3294
+ preserve: (delivery, input, call) => post(
3295
+ `/reward-deliveries/${encodeURIComponent(delivery)}/preserve`,
3296
+ rewardDeliverySchema,
3297
+ input,
3298
+ call
3299
+ )
3300
+ },
3166
3301
  retryRewardDelivery: (id, call) => post(
3167
3302
  `/reward-deliveries/${encodeURIComponent(id)}/retry`,
3168
3303
  rewardDeliverySchema,
@@ -3180,7 +3315,7 @@ function managementClient(options) {
3180
3315
  testMemberCreateSchema.parse(withActionId(input)),
3181
3316
  call
3182
3317
  ),
3183
- list: (call) => get("/test-members", z13.array(testMemberSchema), call),
3318
+ list: (call) => get("/test-members", z14.array(testMemberSchema), call),
3184
3319
  history: (member, query = {}, call) => get(
3185
3320
  `/test-members/${identifier.parse(member)}/history${queryString(testMemberHistoryQuerySchema.parse(query))}`,
3186
3321
  testMemberHistorySchema,
@@ -3225,6 +3360,53 @@ function managementClient(options) {
3225
3360
  },
3226
3361
  /** The project's members, as operators see them. */
3227
3362
  members: {
3363
+ /**
3364
+ * Every identity a member proved, by kind: wallets, X, Discord and Telegram accounts, and
3365
+ * `app:<name>` identities, each with its link, sign-in and the actions an operator can take.
3366
+ * Attribution (unlink, relink) and wallet sign-in are separate commands.
3367
+ */
3368
+ identityStates: {
3369
+ /** One page of the member's identities; requires `read` permission. */
3370
+ list: (member, query = {}, call) => get(
3371
+ `/members/${identifier.parse(member)}/identity-states${queryString(managementStateQuerySchema.parse(query))}`,
3372
+ memberIdentityStatePageSchema,
3373
+ call
3374
+ ),
3375
+ /**
3376
+ * Stops an identity attributing tracker records to the member, at the revision the
3377
+ * operator reviewed; requires `review` permission. The identity stays bound to the member.
3378
+ * Unlinking an app identity also ends the sessions its integration issued for it and
3379
+ * refuses its sign-in until it is relinked; other kinds keep their sign-in.
3380
+ */
3381
+ unlink: (member, input, call) => post(
3382
+ `/members/${identifier.parse(member)}/identity-states/unlink`,
3383
+ memberIdentityStateSchema,
3384
+ memberIdentityLinkChangeInputSchema.parse(withActionId(input)),
3385
+ call
3386
+ ),
3387
+ /**
3388
+ * Restores an unlinked identity's attribution for the same member, at the revision the
3389
+ * operator reviewed; requires `review` permission. Records it could not attribute are
3390
+ * decided again under each quest's historical policy.
3391
+ */
3392
+ relink: (member, input, call) => post(
3393
+ `/members/${identifier.parse(member)}/identity-states/relink`,
3394
+ memberIdentityStateSchema,
3395
+ memberIdentityLinkChangeInputSchema.parse(withActionId(input)),
3396
+ call
3397
+ ),
3398
+ /**
3399
+ * Turns sign-in with a member's wallet on or off in this project and environment, whatever
3400
+ * its link; requires `review` permission. Sessions it already issued run out within 8 hours.
3401
+ */
3402
+ setSignIn: (member, input, call) => post(
3403
+ `/members/${identifier.parse(member)}/identity-states/sign-in`,
3404
+ memberIdentityStateSchema,
3405
+ memberIdentitySignInInputSchema.parse(withActionId(input)),
3406
+ call
3407
+ )
3408
+ },
3409
+ /** @deprecated Use `identityStates`, which covers every identity kind. Removed in 2.0.0. */
3228
3410
  identityLinks: {
3229
3411
  /** Owned wallet links and exact owned OAuth choices; requires read permission. */
3230
3412
  list: (member, query = {}, call) => get(
@@ -3265,6 +3447,16 @@ function managementClient(options) {
3265
3447
  ),
3266
3448
  /** A member's detail: accounts, progress, passes, wallets and profile. */
3267
3449
  get: (member, call) => get(`/members/${encodeURIComponent(member)}`, memberDetailSchema, call),
3450
+ /**
3451
+ * A member's progress on each active quest, 25 most recent attempts and point balances,
3452
+ * without the quest releases and their evaluator code that `get` answers; requires `read`
3453
+ * permission. Use it for reads that run often or under a deadline.
3454
+ */
3455
+ progress: (member, call) => get(
3456
+ `/members/${encodeURIComponent(member)}/progress`,
3457
+ managedMemberProgressSchema,
3458
+ call
3459
+ ),
3268
3460
  /**
3269
3461
  * The one member of the client's project holding exactly this account, with `provider` and `subject` as a member's
3270
3462
  * `accounts` list them; requires `read` permission. Fails with 404 `member-not-found` when
@@ -3279,23 +3471,35 @@ function managementClient(options) {
3279
3471
  /** Who each member is: up to 100 distinct IDs; unknown IDs come back without accounts. */
3280
3472
  people: (members, call) => get(
3281
3473
  `/people${queryString({ ids: members.join(",") })}`,
3282
- z13.array(personSchema),
3474
+ z14.array(personSchema),
3283
3475
  call
3284
3476
  ),
3285
- /** Current X and Discord quest account selections; requires read permission. */
3477
+ /**
3478
+ * Current X and Discord quest account selections; requires read permission.
3479
+ *
3480
+ * @deprecated Use `identityStates.list`. Removed in 2.0.0.
3481
+ */
3286
3482
  oauthAccounts: (member, call) => get(
3287
3483
  `/members/${encodeURIComponent(member)}/oauth-accounts`,
3288
- z13.array(managedOAuthAccountSchema),
3484
+ z14.array(managedOAuthAccountSchema),
3289
3485
  call
3290
3486
  ),
3291
- /** Unlinks the reviewed selection in this project and environment, preserving ownership and sign-in. */
3487
+ /**
3488
+ * Unlinks the reviewed selection in this project and environment, preserving ownership and sign-in.
3489
+ *
3490
+ * @deprecated Use `identityStates.unlink`. Removed in 2.0.0.
3491
+ */
3292
3492
  unlinkOAuthAccount: (member, input, call) => post(
3293
3493
  `/members/${encodeURIComponent(member)}/oauth-accounts/unlink`,
3294
- z13.array(managedOAuthAccountSchema),
3494
+ z14.array(managedOAuthAccountSchema),
3295
3495
  memberOAuthUnlinkInputSchema.parse(input),
3296
3496
  call
3297
3497
  ),
3298
- /** The member's Telegram account selection; requires read permission. */
3498
+ /**
3499
+ * The member's Telegram account selection; requires read permission.
3500
+ *
3501
+ * @deprecated Use `identityStates.list`. Removed in 2.0.0.
3502
+ */
3299
3503
  telegramAccount: (member, call) => get(
3300
3504
  `/members/${encodeURIComponent(member)}/telegram-account`,
3301
3505
  managedTelegramAccountSchema,
@@ -3304,6 +3508,8 @@ function managementClient(options) {
3304
3508
  /**
3305
3509
  * Unlinks the member's reviewed Telegram account in this project and environment, as
3306
3510
  * `unlinkOAuthAccount` does for X and Discord; requires `review` permission.
3511
+ *
3512
+ * @deprecated Use `identityStates.unlink`. Removed in 2.0.0.
3307
3513
  */
3308
3514
  unlinkTelegramAccount: (member, input, call) => post(
3309
3515
  `/members/${encodeURIComponent(member)}/telegram-account/unlink`,
@@ -3311,10 +3517,14 @@ function managementClient(options) {
3311
3517
  memberTelegramUnlinkInputSchema.parse(input),
3312
3518
  call
3313
3519
  ),
3314
- /** Unlinks a member's wallet from the project with a reason; requires `review` permission. The address stays bound to the member. */
3520
+ /**
3521
+ * Unlinks a member's wallet from the project with a reason; requires `review` permission. The address stays bound to the member.
3522
+ *
3523
+ * @deprecated Use `identityStates.unlink`. Removed in 2.0.0.
3524
+ */
3315
3525
  unlinkWallet: (member, input, call) => post(
3316
3526
  `/members/${encodeURIComponent(member)}/wallets/unlink`,
3317
- z13.array(managedWalletSchema),
3527
+ z14.array(managedWalletSchema),
3318
3528
  memberWalletUnlinkInputSchema.parse(input),
3319
3529
  call
3320
3530
  ),
@@ -3322,27 +3532,35 @@ function managementClient(options) {
3322
3532
  * Unlinks one of a member's `app:<name>` identities with a reason; requires `review`
3323
3533
  * permission. It stops attributing tracker records, the member's sessions that the kind's
3324
3534
  * integration issued for it end, and signing in with it fails until it is relinked.
3535
+ *
3536
+ * @deprecated Use `identityStates.unlink`. Removed in 2.0.0.
3325
3537
  */
3326
3538
  unlinkIdentity: (member, input, call) => post(
3327
3539
  `/members/${encodeURIComponent(member)}/identities/unlink`,
3328
- z13.array(managedMemberIdentitySchema),
3540
+ z14.array(managedMemberIdentitySchema),
3329
3541
  memberIdentityChangeInputSchema.parse(input),
3330
3542
  call
3331
3543
  ),
3332
- /** Relinks an `app:<name>` identity an operator unlinked from this member, with a reason; requires `review` permission. */
3544
+ /**
3545
+ * Relinks an `app:<name>` identity an operator unlinked from this member, with a reason; requires `review` permission.
3546
+ *
3547
+ * @deprecated Use `identityStates.relink`. Removed in 2.0.0.
3548
+ */
3333
3549
  relinkIdentity: (member, input, call) => post(
3334
3550
  `/members/${encodeURIComponent(member)}/identities/relink`,
3335
- z13.array(managedMemberIdentitySchema),
3551
+ z14.array(managedMemberIdentitySchema),
3336
3552
  memberIdentityChangeInputSchema.parse(input),
3337
3553
  call
3338
3554
  ),
3339
3555
  /**
3340
3556
  * Enables or disables sign-in with a member's wallet in this project and environment, with a
3341
3557
  * reason; requires `review` permission. Sessions it already issued run out within 8 hours.
3558
+ *
3559
+ * @deprecated Use `identityStates.setSignIn`. Removed in 2.0.0.
3342
3560
  */
3343
3561
  setWalletSignIn: (member, input, call) => post(
3344
3562
  `/members/${encodeURIComponent(member)}/wallets/sign-in`,
3345
- z13.array(managedWalletSchema),
3563
+ z14.array(managedWalletSchema),
3346
3564
  memberWalletSignInInputSchema.parse(input),
3347
3565
  call
3348
3566
  )
@@ -3377,10 +3595,10 @@ function managementClient(options) {
3377
3595
  {},
3378
3596
  call
3379
3597
  ),
3380
- setState: (state2, call) => request(
3598
+ setState: (state3, call) => request(
3381
3599
  "/schedules/state",
3382
3600
  appScheduleListSchema,
3383
- { state: appScheduleStateSchema.parse(state2) },
3601
+ { state: appScheduleStateSchema.parse(state3) },
3384
3602
  "PUT",
3385
3603
  call
3386
3604
  ),
@@ -3514,7 +3732,7 @@ function managementClient(options) {
3514
3732
  * Each quest's current release, the most recently published first, archived quests
3515
3733
  * included; requires `read` permission.
3516
3734
  */
3517
- list: (call) => get("/quests/list", z13.array(publishedReleaseSchema), call),
3735
+ list: (call) => get("/quests/list", z14.array(publishedReleaseSchema), call),
3518
3736
  /** Pending and exhausted asynchronous balance checks. Requires read. */
3519
3737
  automaticScheduling: (query = {}, call) => get(
3520
3738
  `/quests/automatic-scheduling${queryString(automaticSchedulingQuerySchema.parse(query))}`,
@@ -3553,6 +3771,25 @@ function managementClient(options) {
3553
3771
  managedQuestEnrollmentPageSchema,
3554
3772
  call
3555
3773
  ),
3774
+ /**
3775
+ * A member's open quest submissions: drafts they started and have not submitted, newest
3776
+ * change first. Each expires 7 days after its last change. Requires `read`.
3777
+ */
3778
+ submissions: (member, call) => get(
3779
+ `/members/${encodeURIComponent(member)}/quest-submissions`,
3780
+ z14.object({ items: z14.array(questSubmissionSchema) }),
3781
+ call
3782
+ ),
3783
+ /**
3784
+ * Discards a member's open quest submission, such as one stuck on a changed quest; the
3785
+ * member starts a new one. Discarding again returns it. Requires `review` or `confirm`.
3786
+ */
3787
+ discardSubmission: (member, submission, call) => post(
3788
+ `/members/${encodeURIComponent(member)}/quest-submissions/${encodeURIComponent(submission)}/discard`,
3789
+ questSubmissionSchema,
3790
+ {},
3791
+ call
3792
+ ),
3556
3793
  withdraw: (quest, member, input, call) => post(
3557
3794
  `/quests/${encodeURIComponent(quest)}/enrollments/${encodeURIComponent(member)}/withdraw`,
3558
3795
  questEnrollmentStateSchema,
@@ -3602,6 +3839,21 @@ function managementClient(options) {
3602
3839
  call
3603
3840
  )
3604
3841
  },
3842
+ /** Public X data the project's configuration refers to by ID. */
3843
+ x: {
3844
+ /**
3845
+ * The X account that holds a handle, for the stable user ID that trackers, `--author`
3846
+ * filters, custom X identities and `ctx.x.follows({ userId })` take; requires `read`
3847
+ * permission. The handle may start with `@`. Fails with 404 `not-found` when X has no such
3848
+ * account. The answer can be up to a day old. Resolving a handle does not show who owns the
3849
+ * account, and a handle can later pass to another account; store the `id`, not the handle.
3850
+ */
3851
+ lookup: (input, call) => get(
3852
+ `/x/users/lookup${queryString(xUserLookupInputSchema.parse(input))}`,
3853
+ xUserSchema,
3854
+ call
3855
+ )
3856
+ },
3605
3857
  /**
3606
3858
  * The Telegram chats this project and environment connected through Domino's bot, which
3607
3859
  * `ctx.telegram.member()` and `telegram.reactions()` read. Telegram is not one of the
@@ -3661,6 +3913,12 @@ var managementResponseSchemas = lazyResponseReaders({
3661
3913
  get memberIdentityLinkPageSchema() {
3662
3914
  return knownResponse(memberIdentityLinkPageSchema);
3663
3915
  },
3916
+ get memberIdentityStatePageSchema() {
3917
+ return knownResponse(memberIdentityStatePageSchema);
3918
+ },
3919
+ get memberIdentityStateSchema() {
3920
+ return knownResponse(memberIdentityStateSchema);
3921
+ },
3664
3922
  get managedQuestEnrollmentPageSchema() {
3665
3923
  return knownResponse(managedQuestEnrollmentPageSchema);
3666
3924
  },
@@ -3853,6 +4111,9 @@ var managementResponseSchemas = lazyResponseReaders({
3853
4111
  get managedMemberPageSchema() {
3854
4112
  return knownResponse(managedMemberPageSchema);
3855
4113
  },
4114
+ get managedMemberProgressSchema() {
4115
+ return knownResponse(managedMemberProgressSchema);
4116
+ },
3856
4117
  get managedOAuthAccountSchema() {
3857
4118
  return knownResponse(managedOAuthAccountSchema);
3858
4119
  },
@@ -4041,6 +4302,9 @@ var managementResponseSchemas = lazyResponseReaders({
4041
4302
  },
4042
4303
  get webhookSecretSchema() {
4043
4304
  return knownResponse(webhookSecretSchema);
4305
+ },
4306
+ get xUserSchema() {
4307
+ return knownResponse(xUserSchema);
4044
4308
  }
4045
4309
  });
4046
4310
  var managementResponses = {
@@ -4048,6 +4312,8 @@ var managementResponses = {
4048
4312
  memberBadgesSchema: responseSchema(memberBadgesSchema),
4049
4313
  badgeMutationResultSchema: responseSchema(badgeMutationResultSchema),
4050
4314
  memberIdentityLinkPageSchema: responseSchema(memberIdentityLinkPageSchema),
4315
+ memberIdentityStatePageSchema: responseSchema(memberIdentityStatePageSchema),
4316
+ memberIdentityStateSchema: responseSchema(memberIdentityStateSchema),
4051
4317
  managedQuestEnrollmentPageSchema: responseSchema(
4052
4318
  managedQuestEnrollmentPageSchema
4053
4319
  ),
@@ -4130,6 +4396,7 @@ var managementResponses = {
4130
4396
  managedGroupSchema: responseSchema(managedGroupSchema),
4131
4397
  managedMemberIdentitySchema: responseSchema(managedMemberIdentitySchema),
4132
4398
  managedMemberPageSchema: responseSchema(managedMemberPageSchema),
4399
+ managedMemberProgressSchema: responseSchema(managedMemberProgressSchema),
4133
4400
  managedOAuthAccountSchema: responseSchema(managedOAuthAccountSchema),
4134
4401
  managedTelegramAccountSchema: responseSchema(managedTelegramAccountSchema),
4135
4402
  telegramChatsSchema: responseSchema(telegramChatsSchema),
@@ -4194,7 +4461,8 @@ var managementResponses = {
4194
4461
  webhookDeliveryPageSchema: responseSchema(webhookDeliveryPageSchema),
4195
4462
  webhookDeliverySchema: responseSchema(webhookDeliverySchema),
4196
4463
  webhookEndpointSchema: responseSchema(webhookEndpointSchema),
4197
- webhookSecretSchema: responseSchema(webhookSecretSchema)
4464
+ webhookSecretSchema: responseSchema(webhookSecretSchema),
4465
+ xUserSchema: responseSchema(xUserSchema)
4198
4466
  };
4199
4467
  export {
4200
4468
  APP_KV_LIMIT,
@@ -4224,6 +4492,7 @@ export {
4224
4492
  activityTypeSchema,
4225
4493
  activityTypes,
4226
4494
  addGroupMemberSchema,
4495
+ appIdentitySelectorSchema,
4227
4496
  appMigrationNameSchema,
4228
4497
  appRoutingSchema,
4229
4498
  appScheduleListSchema,
@@ -4324,6 +4593,7 @@ export {
4324
4593
  managedGroupSchema,
4325
4594
  managedMemberIdentitySchema,
4326
4595
  managedMemberPageSchema,
4596
+ managedMemberProgressSchema,
4327
4597
  managedMemberQuerySchema,
4328
4598
  managedOAuthAccountSchema,
4329
4599
  managedPointHistoryPageSchema,
@@ -4342,9 +4612,14 @@ export {
4342
4612
  memberAccountSchema,
4343
4613
  memberDetailSchema,
4344
4614
  memberIdentityChangeInputSchema,
4615
+ memberIdentityLinkChangeInputSchema,
4345
4616
  memberIdentityLinkPageSchema,
4346
4617
  memberIdentityLinkSchema,
4347
4618
  memberIdentitySchema,
4619
+ memberIdentitySelectorSchema,
4620
+ memberIdentitySignInInputSchema,
4621
+ memberIdentityStatePageSchema,
4622
+ memberIdentityStateSchema,
4348
4623
  memberLookupSchema,
4349
4624
  memberOAuthUnlinkInputSchema,
4350
4625
  memberSchema,
@@ -4417,6 +4692,7 @@ export {
4417
4692
  stockInputSchema,
4418
4693
  teamSchema,
4419
4694
  telegramBotIdSchema,
4695
+ telegramIdentitySelectorSchema,
4420
4696
  testMemberActionSchema,
4421
4697
  testMemberAdvanceSchema,
4422
4698
  testMemberCreateSchema,