@domino-sdk/relay 1.54.0 → 1.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +1859 -0
  2. package/dist/analytics-URV-mxjH.d.ts +482 -0
  3. package/dist/{attempt-captures-QC4kTA44.d.ts → attempt-captures-CxxO7DeD.d.ts} +1 -1
  4. package/dist/authoring.d.ts +277 -40
  5. package/dist/authoring.js +142 -14
  6. package/dist/{automatic-outcomes-CVyZHxir.d.ts → automatic-outcomes-DxW_v5Wc.d.ts} +5 -2
  7. package/dist/avatar.d.ts +1 -1
  8. package/dist/browser.d.ts +7 -7
  9. package/dist/browser.js +10 -10
  10. package/dist/{capability-error-FQGGb5xS.d.ts → capability-error-DSd8EMQC.d.ts} +76 -2
  11. package/dist/{chunk-RP4LLEON.js → chunk-ABJ4G47X.js} +1 -1
  12. package/dist/{chunk-IELNFM3V.js → chunk-BHHUSBSD.js} +97 -8
  13. package/dist/chunk-BJYMTCWG.js +950 -0
  14. package/dist/{chunk-K6TVMNU4.js → chunk-CK7HO32Z.js} +1 -1
  15. package/dist/{chunk-GTQJSDBS.js → chunk-CXKXPB7K.js} +32 -16
  16. package/dist/{chunk-TL5TL5RD.js → chunk-G6XVBYH7.js} +4 -4
  17. package/dist/{chunk-S2PMKZSX.js → chunk-H2MD6E7Z.js} +21 -2
  18. package/dist/{chunk-YVC3B72P.js → chunk-INSWI2VZ.js} +1 -1
  19. package/dist/{chunk-XFAYQFRO.js → chunk-KBVH4XZC.js} +1 -1
  20. package/dist/{chunk-MLIXJPKL.js → chunk-MHPKEVEW.js} +1 -0
  21. package/dist/{chunk-7BNCLWAO.js → chunk-MNU6UPXY.js} +1 -1
  22. package/dist/{chunk-JL7J3EQQ.js → chunk-NK6EER33.js} +46 -16
  23. package/dist/{chunk-QIDQWXSF.js → chunk-OTITLABX.js} +2 -2
  24. package/dist/{chunk-53JMTUWG.js → chunk-QNQNKIAA.js} +1 -1
  25. package/dist/{chunk-ZJ3FVZRP.js → chunk-RBPMT53S.js} +132 -99
  26. package/dist/chunk-ULQU7KC4.js +704 -0
  27. package/dist/chunk-VSHV7FEA.js +344 -0
  28. package/dist/{chunk-LPHXTZDA.js → chunk-W5U2WXG3.js} +2 -2
  29. package/dist/{client-CzNtl8UO.d.ts → client-bX3oTpRu.d.ts} +111 -8
  30. package/dist/{deployments-ovtqtAcx.d.ts → deployments-D3lxfQMB.d.ts} +1436 -185
  31. package/dist/{groups-B5R1RCsl.d.ts → groups-DPE004_V.d.ts} +135 -139
  32. package/dist/index.d.ts +8 -8
  33. package/dist/index.js +9 -9
  34. package/dist/integrations-CcD5NPEA.d.ts +633 -0
  35. package/dist/internal.d.ts +11 -10
  36. package/dist/internal.js +9 -9
  37. package/dist/{offers-CH1RZekg.d.ts → offers-CtzMeB7O.d.ts} +207 -2
  38. package/dist/{pages-BTlOg8sl.d.ts → pages-BlLqB8ZQ.d.ts} +82 -2
  39. package/dist/portal-proxy.d.ts +11 -1
  40. package/dist/portal-proxy.js +27 -6
  41. package/dist/{profiles-Cdv4BSd_.d.ts → profiles-BoOK03cR.d.ts} +2 -0
  42. package/dist/react/index.d.ts +566 -13
  43. package/dist/react/index.js +105 -15
  44. package/dist/runtime/authoring.js +1 -1
  45. package/dist/runtime/chunks/NDB42VFF.js +1 -0
  46. package/dist/runtime/manifest.json +3 -3
  47. package/dist/runtime/schema.js +1 -1
  48. package/dist/{schema-BJ9bOgpN.d.ts → schema-C4m9RhCR.d.ts} +166 -6
  49. package/dist/schema.d.ts +383 -79
  50. package/dist/schema.js +105 -41
  51. package/dist/server/index.d.ts +11 -10
  52. package/dist/server/index.js +1590 -1175
  53. package/dist/{submission-input-BNah53go.d.ts → submission-input-wTiYGdgA.d.ts} +2 -2
  54. package/dist/{telegram-browser-C36j_6v-.d.ts → telegram-browser-Bh3i0HiH.d.ts} +1 -1
  55. package/dist/testing.d.ts +85 -12
  56. package/dist/testing.js +322 -37
  57. package/dist/{transport-C8BlCzmF.d.ts → transport-CnKA-_RL.d.ts} +7625 -1265
  58. package/dist/vite.d.ts +54 -1
  59. package/dist/vite.js +35 -0
  60. package/dist/{x-BfQcsDp0.d.ts → x-1czZFVUW.d.ts} +1 -1
  61. package/package.json +3 -2
  62. package/dist/chunk-2NUD237O.js +0 -102
  63. package/dist/chunk-CCE2JWES.js +0 -1083
  64. package/dist/integrations-CllF-kWg.d.ts +0 -314
  65. package/dist/runtime/chunks/AVRVSLHX.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  attemptCaptureSchema,
3
3
  capturedFactSchema
4
- } from "../chunk-7BNCLWAO.js";
4
+ } from "../chunk-MNU6UPXY.js";
5
5
  import {
6
6
  activityTypeSchema,
7
7
  activityTypes,
@@ -27,7 +27,22 @@ import {
27
27
  publishDeploymentSchema,
28
28
  rejectDeploymentSchema,
29
29
  submitDeploymentSchema
30
- } from "../chunk-GTQJSDBS.js";
30
+ } from "../chunk-CXKXPB7K.js";
31
+ import {
32
+ analyticsBreakdowns,
33
+ analyticsCatalog,
34
+ analyticsCatalogSchema,
35
+ analyticsCharts,
36
+ analyticsFilters,
37
+ analyticsMetricIds,
38
+ analyticsMetricQuerySchema,
39
+ analyticsMetricResultSchema,
40
+ analyticsQueryLimit,
41
+ analyticsQuerySchema,
42
+ analyticsRanges,
43
+ analyticsReadSchema,
44
+ dashboardDefinitionSchema
45
+ } from "../chunk-ULQU7KC4.js";
31
46
  import "../chunk-4OC7REYX.js";
32
47
  import {
33
48
  DEFAULT_MANAGEMENT_TIMEOUT,
@@ -48,31 +63,31 @@ import {
48
63
  participantExchangeSchema,
49
64
  questConfiguration,
50
65
  sequenceCursorSchema
51
- } from "../chunk-TL5TL5RD.js";
66
+ } from "../chunk-G6XVBYH7.js";
52
67
  import {
53
68
  parseImageExtraction,
54
69
  parseImageResult
55
- } from "../chunk-LPHXTZDA.js";
70
+ } from "../chunk-W5U2WXG3.js";
56
71
  import {
57
72
  imageAssetArtifactSchema,
58
73
  xUserLookupInputSchema,
59
74
  xUserSchema,
60
75
  xUsernameSchema
61
- } from "../chunk-K6TVMNU4.js";
76
+ } from "../chunk-CK7HO32Z.js";
62
77
  import {
63
78
  sourceDataSchema,
64
79
  sourceRoles,
65
80
  validateQuestShape
66
- } from "../chunk-S2PMKZSX.js";
81
+ } from "../chunk-H2MD6E7Z.js";
67
82
  import {
68
83
  isIntegrationParticipantPath,
69
84
  isParticipantRoute,
70
85
  participantRoutePattern,
71
86
  participantRoutes
72
- } from "../chunk-MLIXJPKL.js";
87
+ } from "../chunk-MHPKEVEW.js";
73
88
  import {
74
89
  withActionId
75
- } from "../chunk-YVC3B72P.js";
90
+ } from "../chunk-INSWI2VZ.js";
76
91
  import {
77
92
  allocateQuestSchema,
78
93
  allocatedQuestSchema,
@@ -81,6 +96,7 @@ import {
81
96
  collectionBeginSchema,
82
97
  collectionPreviewSchema,
83
98
  collectionResolveSchema,
99
+ creatorAccountProviderSchema,
84
100
  memberEnrollmentInputSchema,
85
101
  publishQuestDraftSchema,
86
102
  questCatalogSchema,
@@ -91,13 +107,13 @@ import {
91
107
  rewardDeliveryQuerySchema,
92
108
  rewardDeliverySchema,
93
109
  saveQuestDraftSchema
94
- } from "../chunk-ZJ3FVZRP.js";
110
+ } from "../chunk-RBPMT53S.js";
95
111
  import {
96
112
  badgeMutationResultSchema,
97
113
  badgeMutationSchema,
98
114
  badgePropertiesSchema,
115
+ baseUnitsSchema,
99
116
  createBadgeSchema,
100
- createPointLedgerSchema,
101
117
  engagementBoundaryPageSchema,
102
118
  engagementChangePreviewInputSchema,
103
119
  engagementChangePreviewSchema,
@@ -116,23 +132,17 @@ import {
116
132
  leaderboardPageSchema,
117
133
  leaderboardQuerySchema,
118
134
  leaderboardSettlementApprovalSchema,
135
+ leaderboardSettlementPoolSchema,
119
136
  leaderboardSettlementSchema,
120
137
  leaderboardSettlementSummarySchema,
121
138
  managedBadgeSchema,
122
139
  managedPointHistoryPageSchema,
123
- managedPointLedgerSchema,
124
- managedProfileSchema,
125
140
  memberBadgesSchema,
126
141
  offerControlSchema,
127
142
  offerSchema,
128
- pointLedgerPropertiesSchema,
129
- pointLedgerSchema,
130
143
  pointsAccountSchema,
131
144
  pointsMutationSchema,
132
145
  pointsResultSchema,
133
- profileModerationSchema,
134
- profileSettingsInputSchema,
135
- profileSettingsSchema,
136
146
  publishedLeaderboardSchema,
137
147
  publishedReferralSchema,
138
148
  redemptionCancellationSchema,
@@ -145,15 +155,23 @@ import {
145
155
  referralQualificationSchema,
146
156
  referralRewardResolutionSchema,
147
157
  referralSuspensionSchema
148
- } from "../chunk-CCE2JWES.js";
158
+ } from "../chunk-BJYMTCWG.js";
149
159
  import {
160
+ createPointLedgerSchema,
161
+ managedPointLedgerSchema,
162
+ managedProfileSchema,
163
+ pointLedgerPropertiesSchema,
164
+ pointLedgerSchema,
165
+ profileModerationSchema,
166
+ profileSettingsInputSchema,
167
+ profileSettingsSchema,
150
168
  telegramChatConnectionSchema,
151
169
  telegramChatIdSchema,
152
170
  telegramChatsSchema
153
- } from "../chunk-2NUD237O.js";
154
- import "../chunk-XFAYQFRO.js";
155
- import "../chunk-RP4LLEON.js";
156
- import "../chunk-53JMTUWG.js";
171
+ } from "../chunk-VSHV7FEA.js";
172
+ import "../chunk-KBVH4XZC.js";
173
+ import "../chunk-ABJ4G47X.js";
174
+ import "../chunk-QNQNKIAA.js";
157
175
  import {
158
176
  CompletionSourceKind,
159
177
  addGroupMemberSchema,
@@ -243,7 +261,7 @@ import {
243
261
  walletSignInNetworksSchema,
244
262
  walletUnlinkInputSchema,
245
263
  whereSchemaIssue
246
- } from "../chunk-IELNFM3V.js";
264
+ } from "../chunk-BHHUSBSD.js";
247
265
 
248
266
  // src/server/identity-links.ts
249
267
  import * as z from "zod";
@@ -364,124 +382,191 @@ var memberIdentitySignInInputSchema = z2.strictObject({
364
382
  enabled: z2.boolean()
365
383
  });
366
384
 
367
- // src/server/settlement-reviews.ts
385
+ // src/server/creator-accounts.ts
368
386
  import * as z3 from "zod";
387
+ var managedCreatorAccountSchema = z3.object({
388
+ provider: creatorAccountProviderSchema,
389
+ /** The platform's account ID, such as a YouTube channel ID (`UC…`) or a TikTok `open_id`. */
390
+ subject: z3.string().min(1),
391
+ revision: z3.number().int().nonnegative(),
392
+ /** When the member linked it, epoch milliseconds. */
393
+ linkedAt: z3.number().int().nonnegative().nullable(),
394
+ status: z3.enum(["connected", "needs-reconnect"]),
395
+ /** Why the member must link it again: `revoked`, `expired` or `missing-scope`. */
396
+ reason: z3.string().optional(),
397
+ /** The public name, handle and picture the platform reported at link time. */
398
+ profile: z3.object({
399
+ name: z3.string().optional(),
400
+ username: z3.string().optional(),
401
+ imageUrl: z3.string().optional()
402
+ }).nullable()
403
+ });
404
+ var managedCreatorAccountsSchema = z3.object({
405
+ accounts: z3.array(managedCreatorAccountSchema)
406
+ });
407
+ var memberCreatorAccountUnlinkInputSchema = z3.strictObject({
408
+ provider: creatorAccountProviderSchema,
409
+ subject: z3.string().min(1).max(4096),
410
+ revision: z3.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
411
+ reason: z3.string().trim().min(1).max(500)
412
+ });
413
+
414
+ // src/server/settlement-reviews.ts
415
+ import * as z4 from "zod";
416
+ var timestamp = z4.number().int().safe().nonnegative();
369
417
  var decision = {
370
- status: z3.enum(["pending", "approved", "rejected"]),
371
- rejectedAt: z3.number().int().safe().nonnegative().nullable(),
372
- rejectedBy: z3.string().nullable(),
373
- rejectionReason: z3.string().nullable()
418
+ status: z4.enum(["pending", "approved", "rejected"]),
419
+ /**
420
+ * Present while the window has ended but Relay is still taking closing measurements of the
421
+ * content its engagement points pay for. The settlement reads as `pending` with no rows, cannot
422
+ * be approved yet, and freezes when the measurements arrive or their wait ends after `deadline`.
423
+ */
424
+ closing: z4.object({ startedAt: timestamp, deadline: timestamp }).optional(),
425
+ rejectedAt: z4.number().int().safe().nonnegative().nullable(),
426
+ rejectedBy: z4.string().nullable(),
427
+ rejectionReason: z4.string().nullable()
374
428
  };
375
429
  var leaderboardSettlementReviewSummarySchema = leaderboardSettlementSummarySchema.extend(decision);
376
430
  var leaderboardSettlementReviewSchema = leaderboardSettlementSchema.extend(decision);
377
- var leaderboardSettlementReviewQuerySchema = z3.strictObject({
431
+ var leaderboardSettlementReviewQuerySchema = z4.strictObject({
378
432
  cursor: pageCursorSchema.optional(),
379
- limit: z3.coerce.number().int().min(1).max(100).default(25)
433
+ limit: z4.coerce.number().int().min(1).max(100).default(25)
380
434
  });
381
- var leaderboardSettlementReviewPageSchema = z3.object({
382
- items: z3.array(leaderboardSettlementReviewSummarySchema),
435
+ var leaderboardSettlementReviewPageSchema = z4.object({
436
+ items: z4.array(leaderboardSettlementReviewSummarySchema),
383
437
  nextCursor: pageCursorSchema.nullable()
384
438
  });
385
- var leaderboardSettlementRejectionSchema = z3.strictObject({
386
- actionId: z3.string().uuid().default(() => crypto.randomUUID()),
387
- expectedCreatedAt: z3.number().int().safe().nonnegative(),
388
- reason: z3.string().trim().min(1).max(500)
439
+ var leaderboardSettlementRejectionSchema = z4.strictObject({
440
+ actionId: z4.string().uuid().default(() => crypto.randomUUID()),
441
+ expectedCreatedAt: z4.number().int().safe().nonnegative(),
442
+ reason: z4.string().trim().min(1).max(500)
443
+ });
444
+ var leaderboardSettlementMeasurementRetrySchema = z4.strictObject({
445
+ actionId: z4.string().uuid().default(() => crypto.randomUUID())
446
+ });
447
+ var leaderboardSettlementExportSchema = z4.object({
448
+ settlement: identifier,
449
+ leaderboard: identifier,
450
+ title: z4.string(),
451
+ period: z4.object({ start: timestamp, end: timestamp }),
452
+ status: z4.enum(["pending", "approved", "rejected"]),
453
+ pool: leaderboardSettlementPoolSchema.nullable(),
454
+ rows: z4.array(
455
+ z4.object({
456
+ member: identifier,
457
+ score: z4.number().int().safe(),
458
+ rank: z4.number().int().safe().positive(),
459
+ /** The pool share in base units; null without a pool. */
460
+ share: baseUnitsSchema.nullable(),
461
+ /** The pool share in whole units: `"600.5"` for 600500000 USDC base units. */
462
+ amount: z4.string().nullable(),
463
+ /** Linked wallets the member proved, on every chain, newest first per chain. */
464
+ wallets: z4.array(
465
+ z4.object({
466
+ chain: walletChainSchema,
467
+ /** The CAIP-2 network, for Cosmos wallets only. */
468
+ network: z4.string().nullable(),
469
+ address: z4.string()
470
+ })
471
+ )
472
+ })
473
+ )
389
474
  });
390
475
 
391
476
  // src/server/inventory-items.ts
392
- import * as z4 from "zod";
393
- var inventoryItemStateSchema = z4.object({
477
+ import * as z5 from "zod";
478
+ var inventoryItemStateSchema = z5.object({
394
479
  item: identifier,
395
- name: z4.string().nullable(),
396
- available: z4.number().int().safe().nonnegative(),
397
- reserved: z4.number().int().safe().nonnegative(),
398
- allocated: z4.number().int().safe().nonnegative(),
399
- offers: z4.array(identifier),
400
- revision: z4.number().int().nonnegative(),
401
- archivedAt: z4.number().int().safe().nonnegative().nullable()
480
+ name: z5.string().nullable(),
481
+ available: z5.number().int().safe().nonnegative(),
482
+ reserved: z5.number().int().safe().nonnegative(),
483
+ allocated: z5.number().int().safe().nonnegative(),
484
+ offers: z5.array(identifier),
485
+ revision: z5.number().int().nonnegative(),
486
+ archivedAt: z5.number().int().safe().nonnegative().nullable()
402
487
  });
403
488
  var correction = {
404
- actionId: z4.string().uuid().default(() => crypto.randomUUID()),
405
- expectedRevision: z4.number().int().nonnegative(),
406
- reason: z4.string().trim().min(1).max(500)
489
+ actionId: z5.string().uuid().default(() => crypto.randomUUID()),
490
+ expectedRevision: z5.number().int().nonnegative(),
491
+ reason: z5.string().trim().min(1).max(500)
407
492
  };
408
- var inventoryItemActionSchema = z4.strictObject(correction);
409
- var inventoryItemRenameSchema = z4.strictObject({
493
+ var inventoryItemActionSchema = z5.strictObject(correction);
494
+ var inventoryItemRenameSchema = z5.strictObject({
410
495
  ...correction,
411
- name: z4.string().trim().min(1).max(200)
496
+ name: z5.string().trim().min(1).max(200)
412
497
  });
413
- var inventoryStockCorrectionSchema = z4.strictObject({
498
+ var inventoryStockCorrectionSchema = z5.strictObject({
414
499
  ...correction,
415
- delta: z4.number().int().safe()
500
+ delta: z5.number().int().safe()
416
501
  });
417
- var inventoryItemPageSchema = z4.object({
418
- items: z4.array(inventoryItemStateSchema),
502
+ var inventoryItemPageSchema = z5.object({
503
+ items: z5.array(inventoryItemStateSchema),
419
504
  nextCursor: pageCursorSchema.nullable()
420
505
  });
421
506
 
422
507
  // src/server/quest-enrollments.ts
423
- import * as z5 from "zod";
508
+ import * as z6 from "zod";
424
509
  var questEnrollmentStateSchema = questEnrollmentSchema.extend({
425
- revision: z5.number().int().nonnegative(),
426
- withdrawnAt: z5.number().int().safe().nonnegative().nullable(),
427
- withdrawalReason: z5.string().nullable()
510
+ revision: z6.number().int().nonnegative(),
511
+ withdrawnAt: z6.number().int().safe().nonnegative().nullable(),
512
+ withdrawalReason: z6.string().nullable()
428
513
  });
429
514
  var managedQuestEnrollmentSchema = questEnrollmentStateSchema.extend({
430
- title: z5.string(),
431
- key: z5.string().nullable()
515
+ title: z6.string(),
516
+ key: z6.string().nullable()
432
517
  });
433
- var questEnrollmentWithdrawalInputSchema = z5.object({
434
- actionId: z5.string().uuid().default(() => crypto.randomUUID()),
435
- expectedRevision: z5.number().int().nonnegative(),
436
- reason: z5.string().trim().min(1).max(500)
518
+ var questEnrollmentWithdrawalInputSchema = z6.object({
519
+ actionId: z6.string().uuid().default(() => crypto.randomUUID()),
520
+ expectedRevision: z6.number().int().nonnegative(),
521
+ reason: z6.string().trim().min(1).max(500)
437
522
  }).strict();
438
- var managedQuestEnrollmentPageSchema = z5.object({
439
- items: z5.array(managedQuestEnrollmentSchema),
523
+ var managedQuestEnrollmentPageSchema = z6.object({
524
+ items: z6.array(managedQuestEnrollmentSchema),
440
525
  nextCursor: pageCursorSchema.nullable()
441
526
  });
442
527
 
443
528
  // src/server/test-members.ts
444
- import * as z6 from "zod";
445
- var testMemberWalletSchema = z6.object({
529
+ import * as z7 from "zod";
530
+ var testMemberWalletSchema = z7.object({
446
531
  chain: walletChainSchema,
447
532
  /** CAIP-2 network, Cosmos only. */
448
533
  network: cosmosNetworkSchema.nullable(),
449
- address: z6.string()
534
+ address: z7.string()
450
535
  });
451
- var testMemberAccountSchema = z6.object({
452
- provider: z6.enum(["x", "discord"]),
536
+ var testMemberAccountSchema = z7.object({
537
+ provider: z7.enum(["x", "discord"]),
453
538
  /** The X user ID or Discord user ID. */
454
- id: z6.string(),
539
+ id: z7.string(),
455
540
  /** The X handle, when the account was linked by username; otherwise null. */
456
- username: z6.string().nullable(),
541
+ username: z7.string().nullable(),
457
542
  /**
458
543
  * `linked`: an operator linked a real account with `linkAccount`. `synthetic`: the account Relay
459
544
  * linked for synthetic records. `connected`: the member connected it through X or Discord while
460
545
  * a staging site acted as them.
461
546
  */
462
- source: z6.enum(["linked", "synthetic", "connected"])
547
+ source: z7.enum(["linked", "synthetic", "connected"])
463
548
  });
464
- var testMemberSchema = z6.object({
549
+ var testMemberSchema = z7.object({
465
550
  id: identifier,
466
- name: z6.string(),
467
- test: z6.literal(true),
551
+ name: z7.string(),
552
+ test: z7.literal(true),
468
553
  /** Current project-calendar date (YYYY-MM-DD), computed by the server. */
469
- today: z6.iso.date().optional(),
554
+ today: z7.iso.date().optional(),
470
555
  /** Number of calendar days advanced; absent means zero for older servers. */
471
- offsetDays: z6.number().int().min(0).optional(),
556
+ offsetDays: z7.number().int().min(0).optional(),
472
557
  /** Linked wallet addresses, by chain then newest first; absent from older servers. */
473
- wallets: z6.array(testMemberWalletSchema).optional(),
558
+ wallets: z7.array(testMemberWalletSchema).optional(),
474
559
  /** Its X and Discord accounts, X first; absent from older servers. */
475
- accounts: z6.array(testMemberAccountSchema).optional()
560
+ accounts: z7.array(testMemberAccountSchema).optional()
476
561
  });
477
- var testMemberCreateSchema = z6.object({
562
+ var testMemberCreateSchema = z7.object({
478
563
  actionId: identifier,
479
- name: z6.string().trim().min(1).max(40)
564
+ name: z7.string().trim().min(1).max(40)
480
565
  }).strict();
481
566
  var testMemberActionSchema = submitSchema.omit({ member: true, faultAfterReview: true }).extend({
482
- operation: z6.literal("attempts.submit")
567
+ operation: z7.literal("attempts.submit")
483
568
  }).strict();
484
- var testMemberPassSchema = z6.object({
569
+ var testMemberPassSchema = z7.object({
485
570
  actionId: identifier,
486
571
  /** A manual quest, by key or ID. Automatic quests start from their tracker or schedule. */
487
572
  quest: identifier,
@@ -492,77 +577,77 @@ var testMemberPassSchema = z6.object({
492
577
  */
493
578
  completionKey: completionKeySchema.optional()
494
579
  }).strict();
495
- var testMemberAcceptAnywaySchema = z6.object({
580
+ var testMemberAcceptAnywaySchema = z7.object({
496
581
  actionId: identifier,
497
582
  attempt: identifier
498
583
  }).strict();
499
- var testMemberReferralAcceptSchema = z6.union([
500
- z6.object({ actionId: identifier, code: identifier }).strict(),
501
- z6.object({ actionId: identifier, inviter: identifier }).strict()
584
+ var testMemberReferralAcceptSchema = z7.union([
585
+ z7.object({ actionId: identifier, code: identifier }).strict(),
586
+ z7.object({ actionId: identifier, inviter: identifier }).strict()
502
587
  ]);
503
- var testMemberResetSchema = z6.object({ actionId: identifier }).strict();
504
- var testMemberAdvanceSchema = z6.object({
588
+ var testMemberResetSchema = z7.object({ actionId: identifier }).strict();
589
+ var testMemberAdvanceSchema = z7.object({
505
590
  actionId: identifier,
506
- days: z6.number().int().min(1).max(30)
591
+ days: z7.number().int().min(1).max(30)
507
592
  }).strict();
508
- var testMemberResetResultSchema = z6.object({
593
+ var testMemberResetResultSchema = z7.object({
509
594
  member: identifier,
510
- deleted: z6.literal(true)
595
+ deleted: z7.literal(true)
511
596
  });
512
- var testMemberWalletLinkSchema = z6.discriminatedUnion("chain", [
513
- z6.object({
597
+ var testMemberWalletLinkSchema = z7.discriminatedUnion("chain", [
598
+ z7.object({
514
599
  actionId: identifier,
515
- chain: z6.literal("solana"),
600
+ chain: z7.literal("solana"),
516
601
  address: solanaAddressSchema
517
602
  }).strict(),
518
- z6.object({
603
+ z7.object({
519
604
  actionId: identifier,
520
- chain: z6.literal("eip155"),
605
+ chain: z7.literal("eip155"),
521
606
  address: evmAddressSchema
522
607
  }).strict(),
523
- z6.object({
608
+ z7.object({
524
609
  actionId: identifier,
525
- chain: z6.literal("cosmos"),
610
+ chain: z7.literal("cosmos"),
526
611
  network: cosmosNetworkSchema,
527
612
  address: cosmosAddressSchema
528
613
  }).strict()
529
614
  ]);
530
- var testMemberWalletUnlinkSchema = z6.object({
615
+ var testMemberWalletUnlinkSchema = z7.object({
531
616
  actionId: identifier,
532
617
  chain: walletChainSchema,
533
- address: z6.string().min(1).max(100)
618
+ address: z7.string().min(1).max(100)
534
619
  }).strict();
535
- var snowflake = z6.string().regex(/^[0-9]{1,20}$/);
536
- var accountId = z6.string().regex(/^[0-9]{1,20}$/, "Use the numeric user ID");
537
- var testMemberAccountLinkSchema = z6.union([
538
- z6.object({
620
+ var snowflake = z7.string().regex(/^[0-9]{1,20}$/);
621
+ var accountId = z7.string().regex(/^[0-9]{1,20}$/, "Use the numeric user ID");
622
+ var testMemberAccountLinkSchema = z7.union([
623
+ z7.object({
539
624
  actionId: identifier,
540
- provider: z6.enum(["x", "discord"]),
625
+ provider: z7.enum(["x", "discord"]),
541
626
  id: accountId
542
627
  }).strict(),
543
- z6.object({
628
+ z7.object({
544
629
  actionId: identifier,
545
- provider: z6.literal("x"),
630
+ provider: z7.literal("x"),
546
631
  username: xUsernameSchema
547
632
  }).strict()
548
633
  ]);
549
- var testMemberAccountUnlinkSchema = z6.object({
634
+ var testMemberAccountUnlinkSchema = z7.object({
550
635
  actionId: identifier,
551
- provider: z6.enum(["x", "discord"]),
636
+ provider: z7.enum(["x", "discord"]),
552
637
  id: accountId
553
638
  }).strict();
554
- var metric = z6.number().int().nonnegative().safe();
555
- var testMemberXPostSchema = z6.strictObject({
556
- content: z6.string().max(4e3).default(""),
557
- author: z6.strictObject({
639
+ var metric = z7.number().int().nonnegative().safe();
640
+ var testMemberXPostSchema = z7.strictObject({
641
+ content: z7.string().max(4e3).default(""),
642
+ author: z7.strictObject({
558
643
  /** Defaults to `test_` and the end of the synthetic account ID. */
559
- username: z6.string().min(1).max(50).optional(),
644
+ username: z7.string().min(1).max(50).optional(),
560
645
  /** Defaults to the test member's name. */
561
- name: z6.string().min(1).max(100).optional()
646
+ name: z7.string().min(1).max(100).optional()
562
647
  }).default({}),
563
- isReply: z6.boolean().default(false),
564
- isRetweet: z6.boolean().default(false),
565
- isQuoteTweet: z6.boolean().default(false),
648
+ isReply: z7.boolean().default(false),
649
+ isRetweet: z7.boolean().default(false),
650
+ isQuoteTweet: z7.boolean().default(false),
566
651
  likeCount: metric.default(0),
567
652
  replyCount: metric.default(0),
568
653
  retweetCount: metric.default(0),
@@ -570,23 +655,23 @@ var testMemberXPostSchema = z6.strictObject({
570
655
  viewCount: metric.default(0),
571
656
  bookmarkCount: metric.default(0)
572
657
  });
573
- var testMemberDiscordMessageSchema = z6.strictObject({
658
+ var testMemberDiscordMessageSchema = z7.strictObject({
574
659
  channelId: snowflake.optional(),
575
660
  replyTo: snowflake.nullable().default(null),
576
- text: z6.string().max(4e3).optional()
661
+ text: z7.string().max(4e3).optional()
577
662
  });
578
- var testMemberDiscordReactionSchema = z6.strictObject({
663
+ var testMemberDiscordReactionSchema = z7.strictObject({
579
664
  channelId: snowflake.optional(),
580
665
  messageId: snowflake.optional(),
581
- emoji: z6.strictObject({
666
+ emoji: z7.strictObject({
582
667
  /** A custom emoji's ID, or null for a Unicode emoji. */
583
668
  id: snowflake.nullable().default(null),
584
- name: z6.string().min(1).max(100)
669
+ name: z7.string().min(1).max(100)
585
670
  }).default({ id: null, name: "\u{1F44D}" }),
586
- reactorRoles: z6.array(snowflake).max(50).default([]),
587
- messagePublishedAt: z6.number().int().nonnegative().safe().optional()
671
+ reactorRoles: z7.array(snowflake).max(50).default([]),
672
+ messagePublishedAt: z7.number().int().nonnegative().safe().optional()
588
673
  });
589
- var testMemberRecordSchema = z6.object({
674
+ var testMemberRecordSchema = z7.object({
590
675
  actionId: identifier,
591
676
  /** A managed X or Discord tracker, by key or ID. */
592
677
  tracker: identifier,
@@ -594,16 +679,16 @@ var testMemberRecordSchema = z6.object({
594
679
  * The record account the test member holds. `messageAuthor` (Discord reactions only) makes the
595
680
  * member the reacted-to message's author, and the reactor a synthetic account no member holds.
596
681
  */
597
- as: z6.enum(["author", "messageAuthor"]).default("author"),
598
- data: z6.record(z6.string(), z6.json()).default({})
682
+ as: z7.enum(["author", "messageAuthor"]).default("author"),
683
+ data: z7.record(z7.string(), z7.json()).default({})
599
684
  }).strict();
600
685
  var testMemberRecordResultSchema = trackerIngestResultSchema.extend({
601
686
  /** The tracker's stable ID. */
602
687
  tracker: identifier,
603
688
  /** The stored record's ID. */
604
- record: z6.string(),
689
+ record: z7.string(),
605
690
  /** The account the record names for the test member: its linked one, else its synthetic one. */
606
- account: z6.object({ kind: z6.enum(["x", "discord"]), id: z6.string() })
691
+ account: z7.object({ kind: z7.enum(["x", "discord"]), id: z7.string() })
607
692
  });
608
693
  var TestMemberDecisionKind = {
609
694
  /** `testMembers.pass`: the quest's check never ran. */
@@ -611,113 +696,113 @@ var TestMemberDecisionKind = {
611
696
  /** `testMembers.acceptAnyway`: the attempt was rejected, then accepted. */
612
697
  AcceptAnyway: "accept-anyway"
613
698
  };
614
- var testMemberDecisionKindSchema = z6.string();
615
- var testMemberOperatorDecisionSchema = z6.object({
699
+ var testMemberDecisionKindSchema = z7.string();
700
+ var testMemberOperatorDecisionSchema = z7.object({
616
701
  kind: testMemberDecisionKindSchema,
617
702
  /** The operator who decided, as audit history names them. */
618
- actor: z6.string().nullable(),
619
- at: z6.number().int().nonnegative().safe()
703
+ actor: z7.string().nullable(),
704
+ at: z7.number().int().nonnegative().safe()
620
705
  });
621
- var testMemberHistoryQuerySchema = z6.object({
706
+ var testMemberHistoryQuerySchema = z7.object({
622
707
  /** Inclusive lower bound on credited activity time, in epoch milliseconds. */
623
- since: z6.coerce.number().int().nonnegative().safe().optional()
708
+ since: z7.coerce.number().int().nonnegative().safe().optional()
624
709
  });
625
- var testMemberHistorySchema = z6.object({
710
+ var testMemberHistorySchema = z7.object({
626
711
  /** Newest credited activity first, up to 500 attempts. */
627
- attempts: z6.array(
712
+ attempts: z7.array(
628
713
  attemptSchema.extend({
629
- eligibleAt: z6.number().int().nonnegative().safe(),
714
+ eligibleAt: z7.number().int().nonnegative().safe(),
630
715
  /** Set when an operator decided the attempt in place of its evaluator; absent otherwise. */
631
716
  operatorDecision: testMemberOperatorDecisionSchema.optional(),
632
717
  /**
633
718
  * Rewards of this attempt's completion that Relay never sent, each with why: a role reward
634
719
  * for a test-linked Discord account. Absent when every reward was sent.
635
720
  */
636
- rewardsNotSent: z6.array(z6.object({ reason: z6.string() })).optional()
721
+ rewardsNotSent: z7.array(z7.object({ reason: z7.string() })).optional()
637
722
  })
638
723
  ),
639
724
  /** Tracker trigger outcomes that admitted no attempt, newest occurrence first, up to 500. */
640
- skipped: z6.array(
641
- z6.object({
725
+ skipped: z7.array(
726
+ z7.object({
642
727
  quest: identifier,
643
728
  tracker: identifier,
644
- record: z6.string(),
645
- code: z6.string().min(1),
646
- occurredAt: z6.number().int().nonnegative().safe()
729
+ record: z7.string(),
730
+ code: z7.string().min(1),
731
+ occurredAt: z7.number().int().nonnegative().safe()
647
732
  })
648
733
  ),
649
734
  /** False when older entries were omitted from either list. */
650
- complete: z6.boolean()
735
+ complete: z7.boolean()
651
736
  });
652
737
 
653
738
  // src/server/member-imports.ts
654
- import * as z7 from "zod";
655
- var importTimeSchema = z7.union([
656
- z7.number().int().nonnegative().safe(),
657
- z7.iso.datetime({ offset: true }).transform((value) => Date.parse(value))
739
+ import * as z8 from "zod";
740
+ var importTimeSchema = z8.union([
741
+ z8.number().int().nonnegative().safe(),
742
+ z8.iso.datetime({ offset: true }).transform((value) => Date.parse(value))
658
743
  ]);
659
- var importWalletSchema = z7.discriminatedUnion("chain", [
660
- z7.object({
661
- kind: z7.literal("wallet"),
662
- chain: z7.literal("solana"),
744
+ var importWalletSchema = z8.discriminatedUnion("chain", [
745
+ z8.object({
746
+ kind: z8.literal("wallet"),
747
+ chain: z8.literal("solana"),
663
748
  address: solanaAddressSchema
664
749
  }).strict(),
665
- z7.object({
666
- kind: z7.literal("wallet"),
667
- chain: z7.literal("eip155"),
750
+ z8.object({
751
+ kind: z8.literal("wallet"),
752
+ chain: z8.literal("eip155"),
668
753
  address: evmAddressSchema
669
754
  }).strict(),
670
- z7.object({
671
- kind: z7.literal("wallet"),
672
- chain: z7.literal("cosmos"),
755
+ z8.object({
756
+ kind: z8.literal("wallet"),
757
+ chain: z8.literal("cosmos"),
673
758
  network: cosmosNetworkSchema,
674
759
  address: cosmosAddressSchema
675
760
  }).strict()
676
761
  ]);
677
- var importXSchema = z7.object({
678
- kind: z7.literal("x"),
679
- subject: z7.string().regex(/^[1-9][0-9]{0,19}$/, "Use the numeric X user ID")
762
+ var importXSchema = z8.object({
763
+ kind: z8.literal("x"),
764
+ subject: z8.string().regex(/^[1-9][0-9]{0,19}$/, "Use the numeric X user ID")
680
765
  }).strict();
681
- var importAppIdentitySchema = z7.object({ kind: appIdentityKindSchema, subject: z7.string().min(1).max(256) }).strict();
682
- var memberImportIdentitySchema = z7.union([
766
+ var importAppIdentitySchema = z8.object({ kind: appIdentityKindSchema, subject: z8.string().min(1).max(256) }).strict();
767
+ var memberImportIdentitySchema = z8.union([
683
768
  importAppIdentitySchema,
684
769
  importWalletSchema,
685
770
  importXSchema
686
771
  ]);
687
- var memberImportAccountSchema = z7.union([
772
+ var memberImportAccountSchema = z8.union([
688
773
  importWalletSchema,
689
774
  importXSchema
690
775
  ]);
691
- var memberImportActionSchema = z7.object({
776
+ var memberImportActionSchema = z8.object({
692
777
  at: importTimeSchema,
693
- key: z7.string().min(1).max(200).optional()
778
+ key: z8.string().min(1).max(200).optional()
694
779
  }).strict();
695
- var memberImportRowSchema = z7.object({
780
+ var memberImportRowSchema = z8.object({
696
781
  /** The member's ID on the platform they come from. Unique within an import. */
697
- ref: z7.string().trim().min(1).max(200),
782
+ ref: z8.string().trim().min(1).max(200),
698
783
  identity: memberImportIdentitySchema,
699
- accounts: z7.array(memberImportAccountSchema).max(20).default([]),
784
+ accounts: z8.array(memberImportAccountSchema).max(20).default([]),
700
785
  /** Opening balances, credited once per ledger as an imported entry. */
701
- points: z7.array(
702
- z7.object({
703
- ledger: z7.string().min(1).max(200),
704
- balance: z7.number().int().positive().safe()
786
+ points: z8.array(
787
+ z8.object({
788
+ ledger: z8.string().min(1).max(200),
789
+ balance: z8.number().int().positive().safe()
705
790
  }).strict()
706
791
  ).max(50).default([]),
707
792
  /** Quest progress, by quest authoring key or ID. */
708
- quests: z7.array(
709
- z7.object({
710
- quest: z7.string().min(1).max(200),
711
- actions: z7.array(memberImportActionSchema).min(1).max(3660)
793
+ quests: z8.array(
794
+ z8.object({
795
+ quest: z8.string().min(1).max(200),
796
+ actions: z8.array(memberImportActionSchema).min(1).max(3660)
712
797
  }).strict()
713
798
  ).max(200).default([])
714
799
  }).strict();
715
- var memberImportCreateSchema = z7.object({
800
+ var memberImportCreateSchema = z8.object({
716
801
  actionId: identifier,
717
802
  /** Where the members come from, such as "legacy-domino". */
718
- source: z7.string().trim().min(1).max(100)
803
+ source: z8.string().trim().min(1).max(100)
719
804
  }).strict();
720
- var memberImportRowsInputSchema = z7.object({ rows: z7.array(memberImportRowSchema).min(1).max(500) }).strict();
805
+ var memberImportRowsInputSchema = z8.object({ rows: z8.array(memberImportRowSchema).min(1).max(500) }).strict();
721
806
  var MemberImportRefusalCode = {
722
807
  /** An account or identity belongs to another member in the project. */
723
808
  AccountLinkedElsewhere: "account-linked-elsewhere",
@@ -744,57 +829,57 @@ var MemberImportRefusalCode = {
744
829
  /** The row names one point ledger or quest twice, by any of its names. */
745
830
  DuplicateEntry: "duplicate-entry"
746
831
  };
747
- var refusalCodeSchema = z7.string();
748
- var memberImportRefusalSchema = z7.object({
832
+ var refusalCodeSchema = z8.string();
833
+ var memberImportRefusalSchema = z8.object({
749
834
  code: refusalCodeSchema,
750
- message: z7.string()
835
+ message: z8.string()
751
836
  });
752
- var memberImportRowResultSchema = z7.object({
753
- line: z7.number().int().positive(),
754
- ref: z7.string(),
755
- status: z7.enum(["pending", "ready", "applied", "refused"]),
837
+ var memberImportRowResultSchema = z8.object({
838
+ line: z8.number().int().positive(),
839
+ ref: z8.string(),
840
+ status: z8.enum(["pending", "ready", "applied", "refused"]),
756
841
  /** The member the row resolves to: an existing member, or the one applying created. */
757
842
  member: identifier.nullable(),
758
843
  /** Whether the row's identity names a member who already exists. Null until checked. */
759
- existing: z7.boolean().nullable(),
760
- refusals: z7.array(memberImportRefusalSchema)
844
+ existing: z8.boolean().nullable(),
845
+ refusals: z8.array(memberImportRefusalSchema)
761
846
  });
762
- var memberImportRowPageSchema = z7.object({
763
- items: z7.array(memberImportRowResultSchema),
764
- nextCursor: z7.string().nullable()
847
+ var memberImportRowPageSchema = z8.object({
848
+ items: z8.array(memberImportRowResultSchema),
849
+ nextCursor: z8.string().nullable()
765
850
  });
766
- var memberImportRowQuerySchema = z7.object({
767
- status: z7.enum(["pending", "ready", "applied", "refused"]).optional(),
768
- cursor: z7.string().max(200).optional(),
769
- limit: z7.coerce.number().int().min(1).max(500).optional()
851
+ var memberImportRowQuerySchema = z8.object({
852
+ status: z8.enum(["pending", "ready", "applied", "refused"]).optional(),
853
+ cursor: z8.string().max(200).optional(),
854
+ limit: z8.coerce.number().int().min(1).max(500).optional()
770
855
  }).strict();
771
- var memberImportSummarySchema = z7.object({
772
- rows: z7.number().int().nonnegative(),
773
- ready: z7.number().int().nonnegative(),
774
- refused: z7.number().int().nonnegative(),
775
- members: z7.object({
776
- created: z7.number().int().nonnegative(),
777
- existing: z7.number().int().nonnegative()
856
+ var memberImportSummarySchema = z8.object({
857
+ rows: z8.number().int().nonnegative(),
858
+ ready: z8.number().int().nonnegative(),
859
+ refused: z8.number().int().nonnegative(),
860
+ members: z8.object({
861
+ created: z8.number().int().nonnegative(),
862
+ existing: z8.number().int().nonnegative()
778
863
  }),
779
864
  /** Identities and accounts the ready rows attach, sign-in identities included. */
780
- accounts: z7.number().int().nonnegative(),
865
+ accounts: z8.number().int().nonnegative(),
781
866
  /** Opening balance totals, by ledger as the rows name it. */
782
- points: z7.array(
783
- z7.object({ ledger: z7.string(), total: z7.number().int().nonnegative() })
867
+ points: z8.array(
868
+ z8.object({ ledger: z8.string(), total: z8.number().int().nonnegative() })
784
869
  ),
785
870
  /** Imported actions, by quest as the rows name it. */
786
- actions: z7.array(
787
- z7.object({ quest: z7.string(), total: z7.number().int().nonnegative() })
871
+ actions: z8.array(
872
+ z8.object({ quest: z8.string(), total: z8.number().int().nonnegative() })
788
873
  ),
789
874
  /** Refused rows, by refusal code. A row can have several. */
790
- refusals: z7.array(
791
- z7.object({ code: refusalCodeSchema, rows: z7.number().int().nonnegative() })
875
+ refusals: z8.array(
876
+ z8.object({ code: refusalCodeSchema, rows: z8.number().int().nonnegative() })
792
877
  )
793
878
  });
794
- var memberImportSchema = z7.object({
879
+ var memberImportSchema = z8.object({
795
880
  id: identifier,
796
- source: z7.string(),
797
- status: z7.enum([
881
+ source: z8.string(),
882
+ status: z8.enum([
798
883
  "open",
799
884
  "checking",
800
885
  "checked",
@@ -802,115 +887,115 @@ var memberImportSchema = z7.object({
802
887
  "applied",
803
888
  "canceled"
804
889
  ]),
805
- rows: z7.number().int().nonnegative(),
890
+ rows: z8.number().int().nonnegative(),
806
891
  /** The latest check's summary, or null before the first check and after rows change. */
807
892
  summary: memberImportSummarySchema.nullable(),
808
893
  /** While applying and after: rows applied and refused so far. */
809
- progress: z7.object({
810
- applied: z7.number().int().nonnegative(),
811
- refused: z7.number().int().nonnegative()
894
+ progress: z8.object({
895
+ applied: z8.number().int().nonnegative(),
896
+ refused: z8.number().int().nonnegative()
812
897
  }),
813
- createdAt: z7.number().int(),
814
- createdBy: z7.string().nullable(),
815
- checkedAt: z7.number().int().nullable(),
816
- appliedAt: z7.number().int().nullable(),
817
- appliedBy: z7.string().nullable(),
818
- canceledAt: z7.number().int().nullable(),
819
- canceledBy: z7.string().nullable()
820
- });
821
- var memberImportPageSchema = z7.object({
822
- items: z7.array(memberImportSchema),
823
- nextCursor: z7.string().nullable()
824
- });
825
- var memberImportListQuerySchema = z7.object({
826
- cursor: z7.string().max(200).optional(),
827
- limit: z7.coerce.number().int().min(1).max(100).optional()
898
+ createdAt: z8.number().int(),
899
+ createdBy: z8.string().nullable(),
900
+ checkedAt: z8.number().int().nullable(),
901
+ appliedAt: z8.number().int().nullable(),
902
+ appliedBy: z8.string().nullable(),
903
+ canceledAt: z8.number().int().nullable(),
904
+ canceledBy: z8.string().nullable()
905
+ });
906
+ var memberImportPageSchema = z8.object({
907
+ items: z8.array(memberImportSchema),
908
+ nextCursor: z8.string().nullable()
909
+ });
910
+ var memberImportListQuerySchema = z8.object({
911
+ cursor: z8.string().max(200).optional(),
912
+ limit: z8.coerce.number().int().min(1).max(100).optional()
828
913
  }).strict();
829
914
 
830
915
  // src/server/webhooks.ts
831
- import * as z8 from "zod";
916
+ import * as z9 from "zod";
832
917
  var PayoutSourceKind = {
833
918
  Quest: "quest",
834
919
  Leaderboard: "leaderboard",
835
920
  Engagement: "engagement",
836
921
  Manual: "manual"
837
922
  };
838
- var webhookEventSchema = z8.object({
839
- id: z8.string().uuid(),
840
- version: z8.literal(1),
923
+ var webhookEventSchema = z9.object({
924
+ id: z9.string().uuid(),
925
+ version: z9.literal(1),
841
926
  type: activityTypeSchema,
842
- createdAt: z8.number().int().nonnegative(),
843
- organization: z8.string(),
844
- project: z8.string(),
845
- environment: z8.enum(["test", "live"]),
846
- data: z8.record(z8.string(), z8.json())
847
- });
848
- var webhookControlInputSchema = z8.object({ actionId: z8.string().uuid().optional() }).strict();
849
- var webhookInputSchema = z8.object({
850
- url: z8.url().max(2048).refine((value) => {
927
+ createdAt: z9.number().int().nonnegative(),
928
+ organization: z9.string(),
929
+ project: z9.string(),
930
+ environment: z9.enum(["test", "live"]),
931
+ data: z9.record(z9.string(), z9.json())
932
+ });
933
+ var webhookControlInputSchema = z9.object({ actionId: z9.string().uuid().optional() }).strict();
934
+ var webhookInputSchema = z9.object({
935
+ url: z9.url().max(2048).refine((value) => {
851
936
  const url2 = new URL(value);
852
937
  return url2.protocol === "https:" && !url2.username && !url2.password && !url2.hash;
853
938
  }, "Use an HTTPS URL without credentials or a fragment"),
854
- types: z8.array(activityTypeSchema).min(1).max(100).refine((v) => new Set(v).size === v.length)
939
+ types: z9.array(activityTypeSchema).min(1).max(100).refine((v) => new Set(v).size === v.length)
855
940
  }).strict();
856
- var webhookCreateInputSchema = webhookInputSchema.extend({ actionId: z8.string().uuid().optional() }).strict();
857
- var webhookRotateInputSchema = z8.object({ actionId: z8.string().uuid().optional() }).strict();
858
- var webhookUpdateSchema = webhookInputSchema.partial().extend({ enabled: z8.boolean().optional() }).strict();
859
- var webhookEndpointSchema = z8.object({
941
+ var webhookCreateInputSchema = webhookInputSchema.extend({ actionId: z9.string().uuid().optional() }).strict();
942
+ var webhookRotateInputSchema = z9.object({ actionId: z9.string().uuid().optional() }).strict();
943
+ var webhookUpdateSchema = webhookInputSchema.partial().extend({ enabled: z9.boolean().optional() }).strict();
944
+ var webhookEndpointSchema = z9.object({
860
945
  ...webhookInputSchema.shape,
861
- id: z8.string().uuid(),
862
- enabled: z8.boolean(),
863
- disabledReason: z8.string().nullable(),
864
- consecutiveFailures: z8.number().int().nonnegative(),
865
- createdAt: z8.number(),
866
- updatedAt: z8.number()
946
+ id: z9.string().uuid(),
947
+ enabled: z9.boolean(),
948
+ disabledReason: z9.string().nullable(),
949
+ consecutiveFailures: z9.number().int().nonnegative(),
950
+ createdAt: z9.number(),
951
+ updatedAt: z9.number()
867
952
  });
868
953
  var webhookEndpointStateSchema = webhookEndpointSchema.extend({
869
- revision: z8.number().int().nonnegative(),
870
- deletedAt: z8.number().int().safe().nonnegative().nullable()
954
+ revision: z9.number().int().nonnegative(),
955
+ deletedAt: z9.number().int().safe().nonnegative().nullable()
871
956
  });
872
- var webhookDeleteInputSchema = z8.strictObject({
873
- actionId: z8.string().uuid().default(() => crypto.randomUUID()),
874
- expectedRevision: z8.number().int().nonnegative(),
875
- reason: z8.string().trim().min(1).max(500)
957
+ var webhookDeleteInputSchema = z9.strictObject({
958
+ actionId: z9.string().uuid().default(() => crypto.randomUUID()),
959
+ expectedRevision: z9.number().int().nonnegative(),
960
+ reason: z9.string().trim().min(1).max(500)
876
961
  });
877
- var webhookStateQuerySchema = z8.strictObject({
962
+ var webhookStateQuerySchema = z9.strictObject({
878
963
  cursor: pageCursorSchema.optional(),
879
- limit: z8.coerce.number().int().min(1).max(100).default(50)
964
+ limit: z9.coerce.number().int().min(1).max(100).default(50)
880
965
  });
881
- var webhookStatePageSchema = z8.object({
882
- items: z8.array(webhookEndpointStateSchema),
966
+ var webhookStatePageSchema = z9.object({
967
+ items: z9.array(webhookEndpointStateSchema),
883
968
  nextCursor: pageCursorSchema.nullable()
884
969
  });
885
- var webhookSecretSchema = z8.object({
970
+ var webhookSecretSchema = z9.object({
886
971
  endpoint: webhookEndpointSchema,
887
- secret: z8.string(),
888
- previousValidUntil: z8.number().nullable()
972
+ secret: z9.string(),
973
+ previousValidUntil: z9.number().nullable()
889
974
  });
890
- var webhookDeliverySchema = z8.object({
891
- id: z8.string().uuid(),
892
- endpoint: z8.string().uuid(),
975
+ var webhookDeliverySchema = z9.object({
976
+ id: z9.string().uuid(),
977
+ endpoint: z9.string().uuid(),
893
978
  event: webhookEventSchema,
894
- status: z8.enum(["pending", "delivered", "failed", "skipped"]),
895
- attempts: z8.number().int().nonnegative(),
896
- responseStatus: z8.number().nullable(),
897
- lastError: z8.string().nullable(),
898
- createdAt: z8.number(),
899
- deliveredAt: z8.number().nullable(),
900
- replayOf: z8.string().uuid().nullable()
901
- });
902
- var webhookQuerySchema = z8.object({
979
+ status: z9.enum(["pending", "delivered", "failed", "skipped"]),
980
+ attempts: z9.number().int().nonnegative(),
981
+ responseStatus: z9.number().nullable(),
982
+ lastError: z9.string().nullable(),
983
+ createdAt: z9.number(),
984
+ deliveredAt: z9.number().nullable(),
985
+ replayOf: z9.string().uuid().nullable()
986
+ });
987
+ var webhookQuerySchema = z9.object({
903
988
  /** A page's `nextCursor`: the deliveries after it, newest first. */
904
989
  cursor: pageCursorSchema.optional(),
905
990
  /** @deprecated Use `cursor`. Removed in 2.0.0. */
906
- before: z8.string().uuid().optional(),
907
- limit: z8.coerce.number().int().min(1).max(100).default(50)
991
+ before: z9.string().uuid().optional(),
992
+ limit: z9.coerce.number().int().min(1).max(100).default(50)
908
993
  }).strict();
909
- var webhookDeliveryPageSchema = z8.object({
910
- items: z8.array(webhookDeliverySchema),
994
+ var webhookDeliveryPageSchema = z9.object({
995
+ items: z9.array(webhookDeliverySchema),
911
996
  nextCursor: pageCursorSchema.nullable().default(null),
912
997
  /** @deprecated Use `nextCursor`, passed back as `cursor`. Removed in 2.0.0. */
913
- next: z8.string().uuid().nullable()
998
+ next: z9.string().uuid().nullable()
914
999
  });
915
1000
  var WEBHOOK_MAX_BYTES = 64 * 1024;
916
1001
  async function verifyWebhook(input) {
@@ -922,13 +1007,13 @@ async function verifyWebhook(input) {
922
1007
  }
923
1008
  const parts = input.signature.split(",");
924
1009
  const timestamps = parts.filter((part) => part.startsWith("t="));
925
- const timestamp = timestamps[0]?.slice(2) ?? "";
1010
+ const timestamp2 = timestamps[0]?.slice(2) ?? "";
926
1011
  const signatures = parts.filter((part) => /^v1=[a-f0-9]{64}$/.test(part)).map((part) => part.slice(3));
927
- if (timestamps.length !== 1 || !/^\d{1,12}$/.test(timestamp) || Math.abs(now / 1e3 - Number(timestamp)) > tolerance || signatures.length < 1 || signatures.length > 2) {
1012
+ if (timestamps.length !== 1 || !/^\d{1,12}$/.test(timestamp2) || Math.abs(now / 1e3 - Number(timestamp2)) > tolerance || signatures.length < 1 || signatures.length > 2) {
928
1013
  throw new Error("Invalid or expired webhook signature");
929
1014
  }
930
1015
  const secrets = typeof input.secret === "string" ? [input.secret] : input.secret;
931
- const message = new TextEncoder().encode(`${timestamp}.${input.body}`);
1016
+ const message = new TextEncoder().encode(`${timestamp2}.${input.body}`);
932
1017
  for (const secret of secrets) {
933
1018
  if (!secret) {
934
1019
  continue;
@@ -954,8 +1039,8 @@ async function verifyWebhook(input) {
954
1039
  }
955
1040
 
956
1041
  // src/server/resource-lifecycle.ts
957
- import * as z9 from "zod";
958
- var resourceLifecycleKindSchema = z9.enum([
1042
+ import * as z10 from "zod";
1043
+ var resourceLifecycleKindSchema = z10.enum([
959
1044
  "tracker",
960
1045
  "referral",
961
1046
  "leaderboard",
@@ -965,24 +1050,24 @@ var resourceLifecycleKindSchema = z9.enum([
965
1050
  "image",
966
1051
  "point-ledger"
967
1052
  ]);
968
- var managedResourceSchema = z9.object({
1053
+ var managedResourceSchema = z10.object({
969
1054
  kind: resourceLifecycleKindSchema,
970
1055
  id: identifier,
971
1056
  key: identifier.nullable(),
972
- title: z9.string(),
973
- archivedAt: z9.number().int().nonnegative().nullable()
1057
+ title: z10.string(),
1058
+ archivedAt: z10.number().int().nonnegative().nullable()
974
1059
  });
975
- var resourceLifecycleInputSchema = z9.object({
976
- actionId: z9.string().uuid(),
1060
+ var resourceLifecycleInputSchema = z10.object({
1061
+ actionId: z10.string().uuid(),
977
1062
  kind: resourceLifecycleKindSchema,
978
1063
  resource: identifier,
979
- archived: z9.boolean(),
980
- reason: z9.string().trim().min(1).max(500),
981
- expectedArchivedAt: z9.number().int().nonnegative().nullable().optional()
1064
+ archived: z10.boolean(),
1065
+ reason: z10.string().trim().min(1).max(500),
1066
+ expectedArchivedAt: z10.number().int().nonnegative().nullable().optional()
982
1067
  }).strict();
983
- var resourceLifecycleResultSchema = z9.object({
1068
+ var resourceLifecycleResultSchema = z10.object({
984
1069
  resource: managedResourceSchema,
985
- changed: z9.boolean()
1070
+ changed: z10.boolean()
986
1071
  });
987
1072
  var resourceLifecyclePaths = {
988
1073
  tracker: "/trackers",
@@ -1001,8 +1086,8 @@ var resourceArchiveInputSchema = resourceLifecycleInputSchema.omit({
1001
1086
  });
1002
1087
 
1003
1088
  // src/server/promotions.ts
1004
- import * as z10 from "zod";
1005
- var promotionResourceKindSchema = z10.enum([
1089
+ import * as z11 from "zod";
1090
+ var promotionResourceKindSchema = z11.enum([
1006
1091
  "quest",
1007
1092
  "quest-type",
1008
1093
  "collection",
@@ -1021,268 +1106,257 @@ var promotionResourceKindSchema = z10.enum([
1021
1106
  "profile-settings",
1022
1107
  "app-build"
1023
1108
  ]);
1024
- var promotionChangeSchema = z10.object({
1025
- kind: z10.union([promotionResourceKindSchema, z10.string()]),
1026
- key: z10.string(),
1027
- title: z10.string(),
1109
+ var promotionChangeSchema = z11.object({
1110
+ kind: z11.union([promotionResourceKindSchema, z11.string()]),
1111
+ key: z11.string(),
1112
+ title: z11.string(),
1028
1113
  /** `added`: new in live. `changed`: live's differs. `archived` and `unarchived` change only its lifecycle. */
1029
- change: z10.union([
1030
- z10.enum(["added", "changed", "archived", "unarchived"]),
1031
- z10.string()
1114
+ change: z11.union([
1115
+ z11.enum(["added", "changed", "archived", "unarchived"]),
1116
+ z11.string()
1032
1117
  ])
1033
1118
  });
1034
- var promotionWarningSchema = z10.object({
1035
- code: z10.string(),
1036
- message: z10.string(),
1037
- kind: z10.string().optional(),
1038
- key: z10.string().optional()
1119
+ var promotionWarningSchema = z11.object({
1120
+ code: z11.string(),
1121
+ message: z11.string(),
1122
+ kind: z11.string().optional(),
1123
+ key: z11.string().optional()
1039
1124
  });
1040
- var promotionBuildSchema = z10.object({
1125
+ var promotionBuildSchema = z11.object({
1041
1126
  repository: identifier,
1042
1127
  build: identifier
1043
1128
  });
1044
- var promotionSourceSchema = z10.discriminatedUnion("kind", [
1045
- z10.object({ kind: z10.literal("test") }),
1046
- z10.object({ kind: z10.literal("rollback"), promotion: identifier }),
1047
- z10.object({ kind: z10.literal("deployment"), deployment: identifier })
1129
+ var promotionSourceSchema = z11.discriminatedUnion("kind", [
1130
+ z11.object({ kind: z11.literal("test") }),
1131
+ z11.object({ kind: z11.literal("rollback"), promotion: identifier }),
1132
+ z11.object({ kind: z11.literal("deployment"), deployment: identifier })
1048
1133
  ]);
1049
1134
  var promotionMetadata = {
1050
1135
  id: identifier,
1051
1136
  source: promotionSourceSchema,
1052
- changes: z10.array(promotionChangeSchema),
1053
- warnings: z10.array(promotionWarningSchema),
1137
+ changes: z11.array(promotionChangeSchema),
1138
+ warnings: z11.array(promotionWarningSchema),
1054
1139
  build: promotionBuildSchema.nullable(),
1055
- createdAt: z10.number().int().nonnegative(),
1056
- createdBy: z10.string().nullable()
1140
+ createdAt: z11.number().int().nonnegative(),
1141
+ createdBy: z11.string().nullable()
1057
1142
  };
1058
1143
  var decided = {
1059
- decidedAt: z10.number().int().nonnegative(),
1060
- decidedBy: z10.string().nullable()
1144
+ decidedAt: z11.number().int().nonnegative(),
1145
+ decidedBy: z11.string().nullable()
1061
1146
  };
1062
- var promotionRecordSchema = z10.discriminatedUnion("status", [
1063
- z10.object({ ...promotionMetadata, status: z10.literal("pending") }),
1064
- z10.object({ ...promotionMetadata, ...decided, status: z10.literal("applied") }),
1065
- z10.object({
1147
+ var promotionRecordSchema = z11.discriminatedUnion("status", [
1148
+ z11.object({ ...promotionMetadata, status: z11.literal("pending") }),
1149
+ z11.object({ ...promotionMetadata, ...decided, status: z11.literal("applied") }),
1150
+ z11.object({
1066
1151
  ...promotionMetadata,
1067
1152
  ...decided,
1068
- status: z10.literal("rejected"),
1069
- reason: z10.string()
1153
+ status: z11.literal("rejected"),
1154
+ reason: z11.string()
1070
1155
  }),
1071
- z10.object({
1156
+ z11.object({
1072
1157
  ...promotionMetadata,
1073
1158
  ...decided,
1074
- status: z10.literal("superseded")
1159
+ status: z11.literal("superseded")
1075
1160
  })
1076
1161
  ]);
1077
- var promotionActionSchema = z10.object({ actionId: z10.string().uuid() }).strict();
1078
- var promotionRejectionSchema = z10.object({ reason: z10.string().trim().min(1).max(1e3) }).strict();
1079
- var promotionHistoryQuerySchema = z10.strictObject({
1162
+ var promotionActionSchema = z11.object({ actionId: z11.string().uuid() }).strict();
1163
+ var promotionRejectionSchema = z11.object({ reason: z11.string().trim().min(1).max(1e3) }).strict();
1164
+ var promotionHistoryQuerySchema = z11.strictObject({
1080
1165
  cursor: pageCursorSchema.optional(),
1081
- limit: z10.coerce.number().int().min(1).max(100).optional()
1166
+ limit: z11.coerce.number().int().min(1).max(100).optional()
1082
1167
  });
1083
- var promotionHistoryPageSchema = z10.object({
1084
- items: z10.array(promotionRecordSchema),
1168
+ var promotionHistoryPageSchema = z11.object({
1169
+ items: z11.array(promotionRecordSchema),
1085
1170
  nextCursor: pageCursorSchema.nullable()
1086
1171
  });
1087
1172
 
1088
- // src/server/analytics.ts
1089
- import * as z11 from "zod";
1090
- function once(build) {
1091
- let built;
1092
- return () => built ??= build();
1093
- }
1094
- function lazyShape(builders) {
1095
- const shape = {};
1096
- for (const [key, build] of Object.entries(builders)) {
1097
- Object.defineProperty(shape, key, {
1098
- get: once(build),
1099
- enumerable: true,
1100
- configurable: true
1101
- });
1102
- }
1103
- return shape;
1104
- }
1105
- var analyticsRanges = ["7d", "30d", "90d", "all"];
1106
- var amount = once(() => z11.number().int().safe());
1107
- var amounts = once(() => z11.array(amount()));
1108
- var instant = once(() => z11.iso.datetime({ offset: true }));
1109
- var analyticsQuerySchema = z11.strictObject(
1110
- lazyShape({
1111
- range: () => z11.enum(analyticsRanges),
1112
- /** A point ledger's key or ID. Defaults to the first ledger that is not archived. */
1113
- ledger: () => identifier.optional()
1114
- })
1115
- );
1116
- var metric2 = once(
1117
- () => z11.object({
1118
- total: amount(),
1119
- previousTotal: amount().optional(),
1120
- series: amounts()
1121
- })
1122
- );
1123
- var optionalMetric = once(() => metric2().optional());
1124
- var bucket = once(
1125
- () => z11.object({
1126
- /** The period's label in its time zone, such as `2026-10-08@Europe/Budapest` or `2026-W41@UTC`. */
1127
- key: z11.string(),
1128
- start: instant(),
1129
- end: instant()
1130
- })
1131
- );
1132
- var quest = once(
1133
- () => z11.object({
1134
- quest: identifier,
1135
- title: z11.string(),
1136
- /** Attempts created in the range. */
1137
- attempts: amount(),
1138
- /** Completions in the range that were never revoked. */
1139
- completions: amount(),
1140
- /** Attempts decided in the range: accepted, progressed or rejected. */
1141
- decided: amount(),
1142
- /** Attempts rejected in the range. */
1143
- rejected: amount(),
1144
- /** Attempts created in the range that went to staff review. */
1145
- needsReview: amount(),
1146
- /** `rejected ÷ decided`, or null below 10 decided attempts. */
1147
- rejectionRate: z11.number().min(0).max(1).nullable(),
1148
- /**
1149
- * The 5 most common rejections, most frequent first. Rejections with a code (an evaluator's
1150
- * reject code or one Relay writes, such as `budget-exhausted`) group by it, and `reason` is the
1151
- * latest rejection's reason; rejections without one group by their exact reason.
1152
- */
1153
- topReasons: z11.array(
1154
- z11.object({
1155
- reason: z11.string(),
1156
- code: z11.string().nullable(),
1157
- count: amount()
1158
- })
1159
- ),
1160
- /** Rejections by who made them: the evaluator, staff, an exhausted budget, an expired deferral. */
1161
- rejectionsBySource: z11.object({
1162
- evaluator: amount(),
1163
- staff: amount(),
1164
- budget: amount(),
1165
- expired: amount()
1166
- }),
1167
- /** Attempts and completions per bucket. */
1168
- series: z11.object({ attempts: amounts(), completions: amounts() })
1169
- })
1170
- );
1171
- var analyticsReadSchema = z11.object(
1172
- lazyShape({
1173
- range: () => z11.object({
1174
- key: z11.enum(analyticsRanges),
1175
- from: instant(),
1176
- /** Now, by the database's clock, when the read ran. */
1177
- to: instant(),
1178
- bucket: z11.enum(["day", "week"]),
1179
- /** The project calendar's time zone now. Buckets before a time zone change follow the old one. */
1180
- timeZone: z11.string(),
1181
- buckets: z11.array(bucket())
1182
- }),
1183
- /** The range of equal length before this one, which `previousTotal` covers. Absent for `all`. */
1184
- previous: () => z11.object({ from: instant(), to: instant() }).optional(),
1185
- members: () => z11.object({
1186
- /** Members who joined the project. */
1187
- signUps: metric2(),
1188
- /** Distinct members with an attempt; the total counts each member once over the range. */
1189
- active: metric2()
1190
- }),
1191
- quests: () => z11.object({
1192
- attempts: metric2(),
1193
- completions: metric2(),
1194
- rejections: metric2(),
1195
- needsReview: metric2(),
1196
- /** Quests with activity in the range, most attempted first. */
1197
- byQuest: z11.array(quest())
1198
- }),
1199
- points: () => z11.object({
1200
- /** The project's point ledgers, oldest first. */
1201
- ledgers: z11.array(
1202
- z11.object({ key: identifier, name: z11.string(), archived: z11.boolean() })
1203
- ),
1204
- /** The ledger this section reads, or null when the project has none to read. */
1205
- ledger: identifier.nullable(),
1206
- /** Whether the ledger has a spend entry. `spent` and `net` are present only when it does. */
1207
- hasSpending: z11.boolean(),
1208
- /** Points in award entries. */
1209
- awarded: metric2(),
1210
- /** Points in spend entries, as a positive number. */
1211
- spent: optionalMetric(),
1212
- /** Every entry's signed amount: awards, spends, adjustments and reversals. */
1213
- net: optionalMetric(),
1214
- /** Distinct members awarded points; the total counts each member once over the range. */
1215
- membersEarning: metric2()
1216
- }),
1217
- /** Fulfilled offer redemptions. Present only when the project has an offer. */
1218
- offers: () => z11.object({
1219
- redemptions: metric2(),
1220
- /** Every offer, most redeemed first. */
1221
- byOffer: z11.array(
1222
- z11.object({
1223
- offer: identifier,
1224
- title: z11.string(),
1225
- redemptions: amount(),
1226
- series: amounts()
1227
- })
1228
- )
1229
- }).optional(),
1230
- /** Present only when the project has a referral program. */
1231
- referrals: () => z11.object({
1232
- /** Referrals accepted. */
1233
- accepted: metric2(),
1234
- /** Active qualifications, by when they first qualified; suspended referrals still count. */
1235
- qualified: metric2(),
1236
- /**
1237
- * Of the referrals accepted in the range (and in the range before), how many have an
1238
- * active qualification now, each counted once; suspended referrals still count.
1239
- * `acceptedQualified.total ÷ accepted.total` is the share of the range's friends who have
1240
- * qualified since, never above 1.
1241
- */
1242
- acceptedQualified: z11.object({
1243
- total: amount(),
1244
- previousTotal: amount().optional()
1245
- })
1246
- }).optional(),
1247
- /** Present only in the test environment. */
1248
- testEnvironment: () => z11.object({
1249
- /** When a test member was last reset, deleting their history, or null. */
1250
- lastResetAt: instant().nullable(),
1251
- /** Test members whose clock is advanced, so their activity can be dated in the future. */
1252
- shiftedClockMembers: amount()
1253
- }).optional()
1254
- })
1255
- );
1173
+ // src/server/dashboards.ts
1174
+ import * as z12 from "zod";
1175
+ var dashboardListQuerySchema = z12.strictObject({
1176
+ includeArchived: z12.union([z12.boolean(), z12.enum(["true", "false"])]).transform((value) => value === true || value === "true").optional()
1177
+ });
1178
+ var summaryFields = {
1179
+ key: identifier,
1180
+ title: z12.string(),
1181
+ description: z12.string().nullable(),
1182
+ /** Lists order by it, dashboards without one last, then by title. */
1183
+ position: z12.number().int().nullable(),
1184
+ archivedAt: z12.number().int().nonnegative().nullable(),
1185
+ /** When the current version was published. */
1186
+ updatedAt: z12.number().int().nonnegative()
1187
+ };
1188
+ var dashboardSummarySchema = z12.object(summaryFields);
1189
+ var dashboardListSchema = z12.array(dashboardSummarySchema);
1190
+ var dashboardLifecycleInputSchema = z12.strictObject({
1191
+ actionId: z12.string().uuid(),
1192
+ dashboard: identifier,
1193
+ archived: z12.boolean(),
1194
+ reason: z12.string().trim().min(1).max(500),
1195
+ expectedArchivedAt: z12.number().int().nonnegative().nullable().optional()
1196
+ });
1197
+ var dashboardLifecycleResultSchema = z12.object({
1198
+ dashboard: dashboardSummarySchema,
1199
+ changed: z12.boolean()
1200
+ });
1201
+ var dashboardReadQuerySchema = z12.strictObject({
1202
+ key: identifier,
1203
+ range: z12.enum(analyticsRanges).optional()
1204
+ });
1205
+ var dashboardReadSchema = z12.object({
1206
+ ...summaryFields,
1207
+ definition: dashboardDefinitionSchema,
1208
+ range: z12.enum(analyticsRanges),
1209
+ panels: z12.array(
1210
+ z12.object({
1211
+ key: identifier,
1212
+ result: analyticsMetricResultSchema.optional(),
1213
+ error: z12.object({ code: z12.string(), message: z12.string() }).optional()
1214
+ })
1215
+ )
1216
+ });
1256
1217
 
1257
1218
  // src/server/index.ts
1258
- import * as z17 from "zod";
1219
+ import * as z19 from "zod";
1220
+
1221
+ // src/server/billing.ts
1222
+ import { z as z13 } from "zod";
1223
+ var billingSubscriptionPlans = ["launch", "growth", "scale"];
1224
+ var billingIntervals = ["month", "year"];
1225
+ var billingCheckoutInputSchema = z13.strictObject({
1226
+ plan: z13.enum(billingSubscriptionPlans),
1227
+ interval: z13.enum(billingIntervals)
1228
+ });
1229
+ var billingPlanChangeInputSchema = z13.strictObject({
1230
+ plan: z13.enum(billingSubscriptionPlans),
1231
+ interval: z13.enum(billingIntervals)
1232
+ });
1233
+ var billingPlanChangeSchema = z13.object({
1234
+ timing: z13.enum(["now", "renewal", "none"]),
1235
+ invoiceUrl: z13.string().url().nullable()
1236
+ });
1237
+ var billingTopupMaxQuantity = 10;
1238
+ var billingTopupInputSchema = z13.strictObject({
1239
+ quantity: z13.number().int().min(1).max(billingTopupMaxQuantity)
1240
+ });
1241
+ var billingSessionSchema = z13.object({ url: z13.string().url() });
1242
+ var billingSubscriptionSchema = z13.object({
1243
+ plan: z13.enum(billingSubscriptionPlans),
1244
+ interval: z13.enum(billingIntervals),
1245
+ status: z13.string(),
1246
+ currentPeriodEnd: z13.number().int().nullable(),
1247
+ cancelAtPeriodEnd: z13.boolean(),
1248
+ lastInvoice: z13.enum(["paid", "failed"]).nullable(),
1249
+ livemode: z13.boolean(),
1250
+ scheduledChange: z13.object({
1251
+ plan: z13.enum(billingSubscriptionPlans),
1252
+ interval: z13.enum(billingIntervals),
1253
+ at: z13.number().int()
1254
+ }).nullable().default(null),
1255
+ endedFor: z13.enum(["project-deleted", "project-transferred"]).nullable().default(null),
1256
+ unpaid: z13.object({
1257
+ since: z13.number().int(),
1258
+ promotionsRefusedAt: z13.number().int(),
1259
+ offlineAt: z13.number().int()
1260
+ }).nullable().default(null)
1261
+ });
1262
+ var projectBillingSchema = z13.object({
1263
+ available: z13.boolean(),
1264
+ reason: z13.enum(["admin-required", "staff-only", "not-configured"]).nullable(),
1265
+ subscription: billingSubscriptionSchema.nullable()
1266
+ });
1267
+ var projectPlanSchema = z13.object({
1268
+ plan: z13.string(),
1269
+ source: z13.string().nullable(),
1270
+ live: z13.object({
1271
+ allowed: z13.boolean(),
1272
+ reason: z13.string(),
1273
+ until: z13.number().int().nullable()
1274
+ }),
1275
+ liveState: z13.object({
1276
+ state: z13.string(),
1277
+ reason: z13.string(),
1278
+ since: z13.number().int(),
1279
+ until: z13.number().int().nullable()
1280
+ }).nullable(),
1281
+ trial: z13.object({
1282
+ state: z13.string(),
1283
+ project: z13.string().nullable(),
1284
+ startedAt: z13.number().int().nullable(),
1285
+ endsAt: z13.number().int().nullable()
1286
+ }),
1287
+ customDomain: z13.boolean(),
1288
+ ai: z13.object({
1289
+ source: z13.string(),
1290
+ allowanceUsdPerMonth: z13.number().nullable(),
1291
+ pools: z13.array(
1292
+ z13.object({
1293
+ pool: z13.string(),
1294
+ capacity: z13.number(),
1295
+ used: z13.number(),
1296
+ remaining: z13.number()
1297
+ })
1298
+ ),
1299
+ remaining: z13.number(),
1300
+ renewsAt: z13.number().int()
1301
+ }),
1302
+ subscription: billingSubscriptionSchema.nullable(),
1303
+ enforcement: z13.boolean()
1304
+ });
1305
+ var organizationBillingSchema = z13.object({
1306
+ billing: projectBillingSchema.pick({ available: true, reason: true }),
1307
+ freeProjects: z13.object({
1308
+ count: z13.number().int(),
1309
+ limit: z13.number().int()
1310
+ }),
1311
+ trial: projectPlanSchema.shape.trial,
1312
+ freeAi: z13.object({
1313
+ usdPerMonth: z13.number(),
1314
+ oneTimeUsd: z13.number(),
1315
+ pools: projectPlanSchema.shape.ai.shape.pools,
1316
+ remaining: z13.number(),
1317
+ renewsAt: z13.number().int()
1318
+ }),
1319
+ aiAllowanceUsdPerMonth: z13.number(),
1320
+ enforcement: z13.boolean(),
1321
+ projects: z13.array(
1322
+ z13.object({
1323
+ id: z13.string(),
1324
+ name: z13.string(),
1325
+ plan: projectPlanSchema.shape.plan,
1326
+ source: projectPlanSchema.shape.source,
1327
+ live: projectPlanSchema.shape.live,
1328
+ liveState: projectPlanSchema.shape.liveState,
1329
+ subscription: billingSubscriptionSchema.nullable()
1330
+ })
1331
+ )
1332
+ });
1259
1333
 
1260
1334
  // src/server/hosting.ts
1261
- import * as z14 from "zod";
1335
+ import * as z16 from "zod";
1262
1336
 
1263
1337
  // src/server/schedules.ts
1264
- import * as z12 from "zod";
1338
+ import * as z14 from "zod";
1265
1339
  import { Cron } from "croner";
1266
1340
  var APP_SCHEDULE_LIMIT = 10;
1267
1341
  var APP_SCHEDULE_MIN_INTERVAL = 3e5;
1268
1342
  var APP_SCHEDULE_TIMEOUT = 3e4;
1269
- var appScheduleNameSchema = z12.string().regex(/^[a-z][a-z0-9-]{0,63}$/);
1270
- var appSchedulePathSchema = z12.string().min(2).max(512).refine((path) => {
1343
+ var appScheduleNameSchema = z14.string().regex(/^[a-z][a-z0-9-]{0,63}$/);
1344
+ var appSchedulePathSchema = z14.string().min(2).max(512).refine((path) => {
1271
1345
  if (!/^\/[a-zA-Z0-9_/-]+$/.test(path) || path.startsWith("//")) {
1272
1346
  return false;
1273
1347
  }
1274
1348
  return path.split("/").slice(1).every((part) => part.length > 0) && new URL(path, "https://app.invalid").pathname === path;
1275
1349
  }, "Expected an absolute route path without a query or hidden segments");
1276
1350
  function interval(value) {
1277
- const amount2 = Number(value.slice(0, -1));
1351
+ const amount = Number(value.slice(0, -1));
1278
1352
  const unit = value.slice(-1);
1279
- return amount2 * (unit === "m" ? 6e4 : unit === "h" ? 36e5 : 864e5);
1353
+ return amount * (unit === "m" ? 6e4 : unit === "h" ? 36e5 : 864e5);
1280
1354
  }
1281
- var everySchema = z12.string().regex(/^[1-9]\d{0,3}[mhd]$/).refine(
1355
+ var everySchema = z14.string().regex(/^[1-9]\d{0,3}[mhd]$/).refine(
1282
1356
  (value) => interval(value) >= APP_SCHEDULE_MIN_INTERVAL && interval(value) <= 365 * 864e5,
1283
1357
  "Use an interval from 5 minutes to 365 days, such as 5m, 1h or 1d"
1284
1358
  );
1285
- var cronSchema = z12.string().max(120).refine((value) => {
1359
+ var cronSchema = z14.string().max(120).refine((value) => {
1286
1360
  const fields = value.trim().split(/\s+/);
1287
1361
  if (fields.length !== 5 || fields.some((field) => !/^[\d*,/-]+$/.test(field))) {
1288
1362
  return false;
@@ -1307,15 +1381,15 @@ var cronSchema = z12.string().max(120).refine((value) => {
1307
1381
  var declaration = {
1308
1382
  name: appScheduleNameSchema,
1309
1383
  path: appSchedulePathSchema,
1310
- description: z12.string().min(1).max(500)
1384
+ description: z14.string().min(1).max(500)
1311
1385
  };
1312
- var everySchedule = z12.object({ ...declaration, every: everySchema });
1313
- var cronSchedule = z12.object({ ...declaration, cron: cronSchema });
1314
- var appScheduleSchema = z12.union([
1386
+ var everySchedule = z14.object({ ...declaration, every: everySchema });
1387
+ var cronSchedule = z14.object({ ...declaration, cron: cronSchema });
1388
+ var appScheduleSchema = z14.union([
1315
1389
  everySchedule.strict(),
1316
1390
  cronSchedule.strict()
1317
1391
  ]);
1318
- var appSchedulesSchema = z12.array(appScheduleSchema).max(APP_SCHEDULE_LIMIT).refine(
1392
+ var appSchedulesSchema = z14.array(appScheduleSchema).max(APP_SCHEDULE_LIMIT).refine(
1319
1393
  (items) => new Set(items.map((item) => item.name)).size === items.length,
1320
1394
  "Schedule names must be unique"
1321
1395
  );
@@ -1332,25 +1406,25 @@ function nextScheduleRun(schedule, after) {
1332
1406
  }
1333
1407
  return next.getTime();
1334
1408
  }
1335
- var appScheduleStateSchema = z12.enum(["active", "paused", "archived"]);
1409
+ var appScheduleStateSchema = z14.enum(["active", "paused", "archived"]);
1336
1410
  var APP_SCHEDULE_RESULT_BYTES = 16384;
1337
- var appScheduleDiagnosticSchema = z12.object({
1338
- level: z12.enum(["error", "warning", "info"]),
1339
- message: z12.string().min(1).max(500),
1411
+ var appScheduleDiagnosticSchema = z14.object({
1412
+ level: z14.enum(["error", "warning", "info"]),
1413
+ message: z14.string().min(1).max(500),
1340
1414
  /** What the line is about, such as a member, record or tracker ID. */
1341
- subject: z12.string().min(1).max(200).optional(),
1415
+ subject: z14.string().min(1).max(200).optional(),
1342
1416
  /** A stable code the app chooses, such as `ingest-timeout`. */
1343
- code: z12.string().min(1).max(100).optional()
1417
+ code: z14.string().min(1).max(100).optional()
1344
1418
  });
1345
- var appScheduleResultSchema = z12.object({
1346
- outcome: z12.enum(["succeeded", "partial", "failed"]),
1347
- summary: z12.string().min(1).max(500).optional(),
1419
+ var appScheduleResultSchema = z14.object({
1420
+ outcome: z14.enum(["succeeded", "partial", "failed"]),
1421
+ summary: z14.string().min(1).max(500).optional(),
1348
1422
  /** Counts and gauges, such as processed and failed members. */
1349
- metrics: z12.record(z12.string().regex(/^[A-Za-z][\w.-]{0,63}$/), z12.number()).refine(
1423
+ metrics: z14.record(z14.string().regex(/^[A-Za-z][\w.-]{0,63}$/), z14.number()).refine(
1350
1424
  (metrics) => Object.keys(metrics).length <= 50,
1351
1425
  "Report at most 50 metrics"
1352
1426
  ).optional(),
1353
- diagnostics: z12.array(appScheduleDiagnosticSchema).max(50).optional()
1427
+ diagnostics: z14.array(appScheduleDiagnosticSchema).max(50).optional()
1354
1428
  });
1355
1429
  function scheduleResult(result) {
1356
1430
  const body = JSON.stringify(appScheduleResultSchema.parse(result));
@@ -1363,41 +1437,41 @@ function scheduleResult(result) {
1363
1437
  headers: { "Content-Type": "application/json" }
1364
1438
  });
1365
1439
  }
1366
- var appScheduleRunSchema = z12.object({
1367
- id: z12.string().uuid(),
1368
- build: z12.string().uuid(),
1369
- startedAt: z12.number(),
1370
- scheduledAt: z12.number(),
1371
- manual: z12.boolean(),
1372
- status: z12.enum(["queued", "running", "succeeded", "failed", "uncertain"]),
1373
- duration: z12.number().nullable(),
1440
+ var appScheduleRunSchema = z14.object({
1441
+ id: z14.string().uuid(),
1442
+ build: z14.string().uuid(),
1443
+ startedAt: z14.number(),
1444
+ scheduledAt: z14.number(),
1445
+ manual: z14.boolean(),
1446
+ status: z14.enum(["queued", "running", "succeeded", "failed", "uncertain"]),
1447
+ duration: z14.number().nullable(),
1374
1448
  /** Why the run failed or is uncertain, or why Relay ignored the app's result. */
1375
- error: z12.string().nullable(),
1449
+ error: z14.string().nullable(),
1376
1450
  /** The app's JSON answer when it sent a valid result. Absent on runs from before results. */
1377
1451
  result: appScheduleResultSchema.nullable().optional()
1378
1452
  });
1379
- var appScheduleRunsSchema = z12.object({
1453
+ var appScheduleRunsSchema = z14.object({
1380
1454
  /** Newest first: the latest twenty runs of one schedule, including a queued or running one. */
1381
- runs: z12.array(appScheduleRunSchema)
1455
+ runs: z14.array(appScheduleRunSchema)
1382
1456
  });
1383
- var appScheduleListSchema = z12.object({
1457
+ var appScheduleListSchema = z14.object({
1384
1458
  state: appScheduleStateSchema,
1385
- schedules: z12.array(
1386
- z12.object({
1387
- declaration: z12.union([everySchedule, cronSchedule]),
1388
- nextRun: z12.number().nullable(),
1389
- blocked: z12.boolean(),
1459
+ schedules: z14.array(
1460
+ z14.object({
1461
+ declaration: z14.union([everySchedule, cronSchedule]),
1462
+ nextRun: z14.number().nullable(),
1463
+ blocked: z14.boolean(),
1390
1464
  lastRun: appScheduleRunSchema.nullable()
1391
1465
  })
1392
1466
  )
1393
1467
  });
1394
- var scheduledInvocationSchema = z12.object({
1395
- id: z12.string().uuid(),
1396
- build: z12.string().uuid(),
1468
+ var scheduledInvocationSchema = z14.object({
1469
+ id: z14.string().uuid(),
1470
+ build: z14.string().uuid(),
1397
1471
  name: appScheduleNameSchema,
1398
- scheduledAt: z12.number().int(),
1399
- startedAt: z12.number().int(),
1400
- manual: z12.boolean()
1472
+ scheduledAt: z14.number().int(),
1473
+ startedAt: z14.number().int(),
1474
+ manual: z14.boolean()
1401
1475
  }).strict();
1402
1476
  async function verifyScheduledRequest(request, key) {
1403
1477
  const signature = request.headers.get("X-Domino-Schedule-Signature");
@@ -1462,7 +1536,7 @@ ${body}`)
1462
1536
  }
1463
1537
 
1464
1538
  // src/server/starters.ts
1465
- import * as z13 from "zod";
1539
+ import * as z15 from "zod";
1466
1540
  var starterTemplates = [
1467
1541
  {
1468
1542
  id: "campaign",
@@ -1495,63 +1569,63 @@ var starterTemplates = [
1495
1569
  summary: "A headless Worker with typed routes and interactive API docs, for plugging Domino into your own product."
1496
1570
  }
1497
1571
  ];
1498
- var starterIdSchema = z13.enum(
1572
+ var starterIdSchema = z15.enum(
1499
1573
  starterTemplates.map((template) => template.id)
1500
1574
  );
1501
1575
 
1502
1576
  // src/server/hosting.ts
1503
- var outputPathSchema = z14.string().min(1).max(512).refine(
1577
+ var outputPathSchema = z16.string().min(1).max(512).refine(
1504
1578
  (path) => path.split("/").every(
1505
1579
  (part) => /^[\w-][\w.-]*$/.test(part) && part !== "node_modules"
1506
1580
  ),
1507
1581
  "Expected a relative build output path without hidden segments"
1508
1582
  );
1509
- var appRoutingSchema = z14.enum(["legacy", "transparent"]).default("legacy");
1583
+ var appRoutingSchema = z16.enum(["legacy", "transparent"]).default("legacy");
1510
1584
  var APP_SECRET_LIMIT = 50;
1511
1585
  var APP_KV_LIMIT = 5;
1512
1586
  var APP_SQL_LIMIT = 5;
1513
1587
  var APP_MIGRATION_LIMIT = 100;
1514
1588
  var APP_MIGRATION_FILE_BYTES = 9e4;
1515
1589
  var APP_MIGRATION_TOTAL_BYTES = 1e6;
1516
- var appSecretNameSchema = z14.string().regex(
1590
+ var appSecretNameSchema = z16.string().regex(
1517
1591
  /^[A-Z_][A-Z0-9_]{0,63}$/,
1518
1592
  "Use 1-64 uppercase letters, digits, and underscores, not starting with a digit"
1519
1593
  ).refine(
1520
1594
  (name) => !name.startsWith("DOMINO_") && name !== "ASSETS",
1521
1595
  "DOMINO_ names and ASSETS are reserved for Domino's own bindings"
1522
1596
  );
1523
- var appSecretValueSchema = z14.string().min(1).refine(
1597
+ var appSecretValueSchema = z16.string().min(1).refine(
1524
1598
  (value) => new TextEncoder().encode(value).length <= 5120,
1525
1599
  "Secret values can be at most 5 KiB"
1526
1600
  );
1527
- var appSecretInputSchema = z14.object({ value: appSecretValueSchema }).strict();
1528
- var appSecretSchema = z14.object({
1601
+ var appSecretInputSchema = z16.object({ value: appSecretValueSchema }).strict();
1602
+ var appSecretSchema = z16.object({
1529
1603
  name: appSecretNameSchema,
1530
- updatedAt: z14.number(),
1531
- updatedBy: z14.string()
1604
+ updatedAt: z16.number(),
1605
+ updatedBy: z16.string()
1532
1606
  });
1533
- var appSecretDeclarationSchema = z14.object({
1534
- description: z14.string().trim().min(1).max(500),
1535
- required: z14.boolean().default(true)
1607
+ var appSecretDeclarationSchema = z16.object({
1608
+ description: z16.string().trim().min(1).max(500),
1609
+ required: z16.boolean().default(true)
1536
1610
  }).strict();
1537
- var appSecretDeclarationsSchema = z14.record(appSecretNameSchema, appSecretDeclarationSchema).refine(
1611
+ var appSecretDeclarationsSchema = z16.record(appSecretNameSchema, appSecretDeclarationSchema).refine(
1538
1612
  (secrets) => Object.keys(secrets).length <= APP_SECRET_LIMIT,
1539
1613
  `Declare at most ${APP_SECRET_LIMIT} app secrets`
1540
1614
  );
1541
- var appSecretListSchema = z14.object({
1542
- secrets: z14.array(appSecretSchema),
1543
- declared: z14.array(appSecretDeclarationSchema.extend({ name: appSecretNameSchema })).default([])
1615
+ var appSecretListSchema = z16.object({
1616
+ secrets: z16.array(appSecretSchema),
1617
+ declared: z16.array(appSecretDeclarationSchema.extend({ name: appSecretNameSchema })).default([])
1544
1618
  });
1545
- var hostedAppSecretsSchema = z14.object({ secrets: z14.record(appSecretNameSchema, appSecretValueSchema) }).strict();
1546
- var storageDescription = z14.object({
1547
- description: z14.string().trim().min(1).max(500)
1619
+ var hostedAppSecretsSchema = z16.object({ secrets: z16.record(appSecretNameSchema, appSecretValueSchema) }).strict();
1620
+ var storageDescription = z16.object({
1621
+ description: z16.string().trim().min(1).max(500)
1548
1622
  }).strict();
1549
- var appStorageSchema = z14.object({
1550
- kv: z14.record(appSecretNameSchema, storageDescription).refine(
1623
+ var appStorageSchema = z16.object({
1624
+ kv: z16.record(appSecretNameSchema, storageDescription).refine(
1551
1625
  (stores) => Object.keys(stores).length <= APP_KV_LIMIT,
1552
1626
  `Declare at most ${APP_KV_LIMIT} KV stores`
1553
1627
  ).default({}),
1554
- sql: z14.record(
1628
+ sql: z16.record(
1555
1629
  appSecretNameSchema,
1556
1630
  storageDescription.extend({
1557
1631
  migrations: outputPathSchema.optional()
@@ -1561,77 +1635,77 @@ var appStorageSchema = z14.object({
1561
1635
  `Declare at most ${APP_SQL_LIMIT} SQL stores`
1562
1636
  ).default({})
1563
1637
  }).strict();
1564
- var appStorageKindSchema = z14.enum(["kv", "sql"]);
1565
- var appStorageListSchema = z14.object({
1566
- stores: z14.array(
1567
- z14.object({
1568
- kind: z14.string(),
1638
+ var appStorageKindSchema = z16.enum(["kv", "sql"]);
1639
+ var appStorageListSchema = z16.object({
1640
+ stores: z16.array(
1641
+ z16.object({
1642
+ kind: z16.string(),
1569
1643
  name: appSecretNameSchema,
1570
- createdAt: z14.number().nullable(),
1571
- declared: z14.boolean(),
1572
- description: z14.string().optional()
1644
+ createdAt: z16.number().nullable(),
1645
+ declared: z16.boolean(),
1646
+ description: z16.string().optional()
1573
1647
  })
1574
1648
  )
1575
1649
  });
1576
1650
  var APP_STORAGE_ROW_LIMIT = 50;
1577
1651
  var APP_STORAGE_PREVIEW_CHARACTERS = 2e3;
1578
- var appStorageCellSchema = z14.union([
1579
- z14.string(),
1580
- z14.number(),
1581
- z14.null(),
1582
- z14.object({ text: z14.string(), truncated: z14.literal(true) }),
1583
- z14.object({ blob: z14.number().int().min(0) })
1652
+ var appStorageCellSchema = z16.union([
1653
+ z16.string(),
1654
+ z16.number(),
1655
+ z16.null(),
1656
+ z16.object({ text: z16.string(), truncated: z16.literal(true) }),
1657
+ z16.object({ blob: z16.number().int().min(0) })
1584
1658
  ]);
1585
- var appStorageTablesSchema = z14.object({
1586
- tables: z14.array(
1659
+ var appStorageTablesSchema = z16.object({
1660
+ tables: z16.array(
1587
1661
  /** `kind` is SQLite's: `table` or `view`. */
1588
- z14.object({ name: z14.string(), kind: z14.string() })
1662
+ z16.object({ name: z16.string(), kind: z16.string() })
1589
1663
  )
1590
1664
  });
1591
- var appStorageRowsSchema = z14.object({
1592
- table: z14.string(),
1593
- columns: z14.array(z14.string()),
1594
- rows: z14.array(z14.array(appStorageCellSchema)),
1665
+ var appStorageRowsSchema = z16.object({
1666
+ table: z16.string(),
1667
+ columns: z16.array(z16.string()),
1668
+ rows: z16.array(z16.array(appStorageCellSchema)),
1595
1669
  /** How many rows come before this page in storage order. */
1596
- offset: z14.number().int().min(0),
1597
- total: z14.number().int().min(0),
1670
+ offset: z16.number().int().min(0),
1671
+ total: z16.number().int().min(0),
1598
1672
  /** Pass back as `cursor` for the next page; null on the last one. */
1599
1673
  nextCursor: pageCursorSchema.nullable().default(null)
1600
1674
  });
1601
- var appStorageKeysSchema = z14.object({
1602
- keys: z14.array(
1603
- z14.object({ name: z14.string(), expiration: z14.number().nullable() })
1675
+ var appStorageKeysSchema = z16.object({
1676
+ keys: z16.array(
1677
+ z16.object({ name: z16.string(), expiration: z16.number().nullable() })
1604
1678
  ),
1605
1679
  /** Pass back as `cursor` for the next page; null on the last one. */
1606
1680
  nextCursor: pageCursorSchema.nullable().default(null),
1607
1681
  /** @deprecated Use `nextCursor`. Removed in 2.0.0. */
1608
- cursor: z14.string().nullable()
1682
+ cursor: z16.string().nullable()
1609
1683
  });
1610
- var appStorageValueSchema = z14.object({
1611
- key: z14.string(),
1612
- size: z14.number().int().min(0),
1684
+ var appStorageValueSchema = z16.object({
1685
+ key: z16.string(),
1686
+ size: z16.number().int().min(0),
1613
1687
  /** Null when the value is not UTF-8 text. */
1614
- text: z14.string().nullable(),
1615
- truncated: z14.boolean()
1688
+ text: z16.string().nullable(),
1689
+ truncated: z16.boolean()
1616
1690
  });
1617
1691
  var APP_STORAGE_CELL_CHARACTERS = 1e5;
1618
- var appStorageCellPageSchema = z14.object({
1619
- table: z14.string(),
1620
- column: z14.string(),
1692
+ var appStorageCellPageSchema = z16.object({
1693
+ table: z16.string(),
1694
+ column: z16.string(),
1621
1695
  /** The row's position in storage order: a rows page's `offset` plus its index on that page. */
1622
- row: z14.number().int().min(0),
1696
+ row: z16.number().int().min(0),
1623
1697
  /** SQLite's storage class. */
1624
- type: z14.enum(["text", "integer", "real", "blob", "null"]),
1698
+ type: z16.enum(["text", "integer", "real", "blob", "null"]),
1625
1699
  /** Characters of text, or of a number's text form; bytes of a BLOB; null for NULL. */
1626
- length: z14.number().int().min(0).nullable(),
1700
+ length: z16.number().int().min(0).nullable(),
1627
1701
  /** How many characters come before this page. */
1628
- offset: z14.number().int().min(0),
1702
+ offset: z16.number().int().min(0),
1629
1703
  /** Up to 100,000 characters from `offset`. Null for a BLOB, whose bytes are never read, and NULL. */
1630
- text: z14.string().nullable(),
1704
+ text: z16.string().nullable(),
1631
1705
  /** Pass back as `cursor` for the next page; null on the last one. */
1632
1706
  nextCursor: pageCursorSchema.nullable().default(null)
1633
1707
  });
1634
- var appMigrationNameSchema = z14.string().max(255).regex(/^[\w-][\w.-]*\.sql$/);
1708
+ var appMigrationNameSchema = z16.string().max(255).regex(/^[\w-][\w.-]*\.sql$/);
1635
1709
  function compareAppMigrations(a, b) {
1636
1710
  const left = Number.parseInt(a.split("_")[0], 10);
1637
1711
  const right = Number.parseInt(b.split("_")[0], 10);
@@ -1648,12 +1722,12 @@ function compareAppMigrations(a, b) {
1648
1722
  }
1649
1723
  return a < b ? -1 : a > b ? 1 : 0;
1650
1724
  }
1651
- var appMigrationsSchema = z14.record(
1725
+ var appMigrationsSchema = z16.record(
1652
1726
  appSecretNameSchema,
1653
- z14.array(
1654
- z14.object({
1727
+ z16.array(
1728
+ z16.object({
1655
1729
  name: appMigrationNameSchema,
1656
- sql: z14.string().min(1).refine(
1730
+ sql: z16.string().min(1).refine(
1657
1731
  (sql) => new TextEncoder().encode(sql).length <= APP_MIGRATION_FILE_BYTES,
1658
1732
  `A migration file must not exceed ${APP_MIGRATION_FILE_BYTES} bytes`
1659
1733
  )
@@ -1671,21 +1745,21 @@ var appMigrationsSchema = z14.record(
1671
1745
  );
1672
1746
  var appScripts = {
1673
1747
  routing: appRoutingSchema,
1674
- devScript: z14.string().regex(/^[\w:-]+$/),
1675
- checkScript: z14.string().regex(/^[\w:-]+$/),
1676
- buildScript: z14.string().regex(/^[\w:-]+$/)
1748
+ devScript: z16.string().regex(/^[\w:-]+$/),
1749
+ checkScript: z16.string().regex(/^[\w:-]+$/),
1750
+ buildScript: z16.string().regex(/^[\w:-]+$/)
1677
1751
  };
1678
1752
  var workerSettings = {
1679
- runWorkerFirst: z14.boolean().default(false),
1753
+ runWorkerFirst: z16.boolean().default(false),
1680
1754
  main: outputPathSchema.refine(
1681
1755
  (path) => /\.m?js$/.test(path),
1682
1756
  "Expected a compiled JavaScript entry"
1683
1757
  ),
1684
- compatibilityDate: z14.string().regex(/^\d{4}-\d{2}-\d{2}$/),
1685
- compatibilityFlags: z14.array(z14.string().min(1)).max(50).default([]),
1686
- vars: z14.record(
1687
- z14.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).refine((name) => name !== "ASSETS"),
1688
- z14.string()
1758
+ compatibilityDate: z16.string().regex(/^\d{4}-\d{2}-\d{2}$/),
1759
+ compatibilityFlags: z16.array(z16.string().min(1)).max(50).default([]),
1760
+ vars: z16.record(
1761
+ z16.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).refine((name) => name !== "ASSETS"),
1762
+ z16.string()
1689
1763
  ).default({}),
1690
1764
  secrets: appSecretDeclarationsSchema.default({}),
1691
1765
  storage: appStorageSchema.optional(),
@@ -1714,62 +1788,62 @@ var distinctBindings = (worker, ctx) => {
1714
1788
  }
1715
1789
  }
1716
1790
  };
1717
- var hostedAppSchema = z14.discriminatedUnion("kind", [
1718
- z14.object({
1719
- kind: z14.literal("static"),
1791
+ var hostedAppSchema = z16.discriminatedUnion("kind", [
1792
+ z16.object({
1793
+ kind: z16.literal("static"),
1720
1794
  directory: outputPathSchema,
1721
1795
  ...appScripts
1722
1796
  }).strict(),
1723
- z14.object({
1724
- kind: z14.literal("worker"),
1797
+ z16.object({
1798
+ kind: z16.literal("worker"),
1725
1799
  directory: outputPathSchema,
1726
1800
  assetsDirectory: outputPathSchema.optional(),
1727
1801
  ...appScripts,
1728
1802
  ...workerSettings
1729
1803
  }).strict().superRefine(distinctBindings)
1730
1804
  ]);
1731
- var repositorySchema = z14.object({
1732
- id: z14.string().uuid(),
1805
+ var repositorySchema = z16.object({
1806
+ id: z16.string().uuid(),
1733
1807
  organization: identifier,
1734
1808
  project: identifier,
1735
- remote: z14.string().url(),
1736
- defaultBranch: z14.string(),
1737
- status: z14.enum(["provisioning", "ready"])
1809
+ remote: z16.string().url(),
1810
+ defaultBranch: z16.string(),
1811
+ status: z16.enum(["provisioning", "ready"])
1738
1812
  });
1739
- var createRepositorySchema = z14.object({
1813
+ var createRepositorySchema = z16.object({
1740
1814
  /** Omitted: the starter chosen at project setup, else `campaign`. */
1741
1815
  starter: starterIdSchema.optional()
1742
1816
  }).strict();
1743
- var deviceStartSchema = z14.object({
1744
- challenge: z14.string().regex(/^[a-f0-9]{64}$/)
1817
+ var deviceStartSchema = z16.object({
1818
+ challenge: z16.string().regex(/^[a-f0-9]{64}$/)
1745
1819
  }).strict();
1746
- var deviceRedeemSchema = z14.object({
1747
- id: z14.string().uuid(),
1748
- verifier: z14.string().min(43).max(128)
1820
+ var deviceRedeemSchema = z16.object({
1821
+ id: z16.string().uuid(),
1822
+ verifier: z16.string().min(43).max(128)
1749
1823
  }).strict();
1750
- var deviceApproveSchema = z14.object({
1751
- id: z14.string().uuid(),
1752
- code: z14.string().regex(/^[A-F0-9]{4}-[A-F0-9]{4}$/)
1824
+ var deviceApproveSchema = z16.object({
1825
+ id: z16.string().uuid(),
1826
+ code: z16.string().regex(/^[A-F0-9]{4}-[A-F0-9]{4}$/)
1753
1827
  }).strict();
1754
- var commitSchema = z14.string().regex(/^[a-f0-9]{40}$/);
1755
- var stageRequestSchema = z14.object({
1828
+ var commitSchema = z16.string().regex(/^[a-f0-9]{40}$/);
1829
+ var stageRequestSchema = z16.object({
1756
1830
  commit: commitSchema,
1757
- requestId: z14.string().uuid()
1831
+ requestId: z16.string().uuid()
1758
1832
  }).strict();
1759
- var buildIdentitySchema = z14.object({
1833
+ var buildIdentitySchema = z16.object({
1760
1834
  routing: appRoutingSchema,
1761
- slug: z14.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional(),
1762
- runtime: z14.enum(["simulation", "hosted-test"]).default("simulation"),
1763
- id: z14.string().uuid(),
1764
- repository: z14.string().uuid(),
1835
+ slug: z16.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional(),
1836
+ runtime: z16.enum(["simulation", "hosted-test"]).default("simulation"),
1837
+ id: z16.string().uuid(),
1838
+ repository: z16.string().uuid(),
1765
1839
  organization: identifier,
1766
1840
  project: identifier,
1767
1841
  commit: commitSchema,
1768
- createdAt: z14.number(),
1769
- actor: z14.string(),
1770
- commitMessage: z14.string().max(500).optional()
1842
+ createdAt: z16.number(),
1843
+ actor: z16.string(),
1844
+ commitMessage: z16.string().max(500).optional()
1771
1845
  });
1772
- var buildPhaseSchema = z14.enum([
1846
+ var buildPhaseSchema = z16.enum([
1773
1847
  "queued",
1774
1848
  "source",
1775
1849
  "install",
@@ -1779,120 +1853,120 @@ var buildPhaseSchema = z14.enum([
1779
1853
  "ready",
1780
1854
  "failed"
1781
1855
  ]);
1782
- var buildStatusSchema = z14.object({
1856
+ var buildStatusSchema = z16.object({
1783
1857
  phase: buildPhaseSchema,
1784
1858
  failedPhase: buildPhaseSchema.optional(),
1785
- updatedAt: z14.number(),
1786
- message: z14.string()
1859
+ updatedAt: z16.number(),
1860
+ message: z16.string()
1787
1861
  });
1788
1862
  var hostedBuildSchema = buildIdentitySchema.extend({
1789
1863
  ...buildStatusSchema.shape,
1790
- finished: z14.boolean(),
1791
- current: z14.boolean(),
1792
- stagingUrl: z14.string().url()
1864
+ finished: z16.boolean(),
1865
+ current: z16.boolean(),
1866
+ stagingUrl: z16.string().url()
1793
1867
  });
1794
- var liveAppSchema = z14.object({
1795
- url: z14.string().url().nullable(),
1796
- state: z14.enum(["none", "deploying", "live", "failed"]),
1868
+ var liveAppSchema = z16.object({
1869
+ url: z16.string().url().nullable(),
1870
+ state: z16.enum(["none", "deploying", "live", "failed"]),
1797
1871
  /** The build the address serves, or null before the first one goes live. */
1798
- build: z14.string().uuid().nullable(),
1872
+ build: z16.string().uuid().nullable(),
1799
1873
  /** The build the last approved promotion asked for, while it differs from `build`. */
1800
- requested: z14.string().uuid().nullable(),
1801
- failure: z14.string().nullable()
1874
+ requested: z16.string().uuid().nullable(),
1875
+ failure: z16.string().nullable()
1802
1876
  });
1803
- var customDomainStateSchema = z14.enum([
1877
+ var customDomainStateSchema = z16.enum([
1804
1878
  "awaiting-dns",
1805
1879
  "provisioning",
1806
1880
  "active",
1807
1881
  "attention",
1808
1882
  "suspended"
1809
1883
  ]);
1810
- var customDomainRecordSchema = z14.object({
1811
- type: z14.enum(["CNAME", "TXT"]),
1812
- name: z14.string(),
1813
- value: z14.string(),
1884
+ var customDomainRecordSchema = z16.object({
1885
+ type: z16.enum(["CNAME", "TXT"]),
1886
+ name: z16.string(),
1887
+ value: z16.string(),
1814
1888
  /** The values public DNS returned: empty when it had none, null before Domino looked. */
1815
- found: z14.array(z14.string()).nullable(),
1816
- matches: z14.boolean()
1889
+ found: z16.array(z16.string()).nullable(),
1890
+ matches: z16.boolean()
1817
1891
  });
1818
- var customDomainSchema = z14.object({
1819
- id: z14.string().uuid(),
1820
- hostname: z14.string(),
1821
- url: z14.string().url(),
1892
+ var customDomainSchema = z16.object({
1893
+ id: z16.string().uuid(),
1894
+ hostname: z16.string(),
1895
+ url: z16.string().url(),
1822
1896
  state: customDomainStateSchema,
1823
1897
  /** What to fix, in plain words, while the domain needs attention or is suspended. */
1824
- issue: z14.object({ code: z14.string(), message: z14.string() }).nullable(),
1825
- records: z14.array(customDomainRecordSchema),
1898
+ issue: z16.object({ code: z16.string(), message: z16.string() }).nullable(),
1899
+ records: z16.array(customDomainRecordSchema),
1826
1900
  /** Cloudflare's statuses and errors in its own words, once the domain is proven. */
1827
- cloudflare: z14.object({
1828
- hostnameStatus: z14.string(),
1829
- certificateStatus: z14.string().nullable(),
1830
- validationErrors: z14.array(z14.string()),
1831
- verificationErrors: z14.array(z14.string()),
1832
- certificateExpiresAt: z14.string().nullable()
1901
+ cloudflare: z16.object({
1902
+ hostnameStatus: z16.string(),
1903
+ certificateStatus: z16.string().nullable(),
1904
+ validationErrors: z16.array(z16.string()),
1905
+ verificationErrors: z16.array(z16.string()),
1906
+ certificateExpiresAt: z16.string().nullable()
1833
1907
  }).nullable(),
1834
- checkedAt: z14.string().nullable(),
1835
- nextCheckAt: z14.string().nullable(),
1836
- createdAt: z14.string()
1837
- });
1838
- var customDomainListSchema = z14.object({
1839
- domains: z14.array(customDomainSchema)
1840
- });
1841
- var customDomainInputSchema = z14.object({ hostname: z14.string().min(1).max(300) }).strict();
1842
- var stagingAccessModeSchema = z14.enum(["console", "password"]);
1843
- var stagingAccessSchema = z14.object({ mode: stagingAccessModeSchema });
1844
- var stagingAccessInputSchema = z14.discriminatedUnion("mode", [
1845
- z14.object({ mode: z14.literal("console") }).strict(),
1846
- z14.object({
1847
- mode: z14.literal("password"),
1848
- password: z14.string().min(8).max(128)
1908
+ checkedAt: z16.string().nullable(),
1909
+ nextCheckAt: z16.string().nullable(),
1910
+ createdAt: z16.string()
1911
+ });
1912
+ var customDomainListSchema = z16.object({
1913
+ domains: z16.array(customDomainSchema)
1914
+ });
1915
+ var customDomainInputSchema = z16.object({ hostname: z16.string().min(1).max(300) }).strict();
1916
+ var stagingAccessModeSchema = z16.enum(["console", "password"]);
1917
+ var stagingAccessSchema = z16.object({ mode: stagingAccessModeSchema });
1918
+ var stagingAccessInputSchema = z16.discriminatedUnion("mode", [
1919
+ z16.object({ mode: z16.literal("console") }).strict(),
1920
+ z16.object({
1921
+ mode: z16.literal("password"),
1922
+ password: z16.string().min(8).max(128)
1849
1923
  }).strict()
1850
1924
  ]);
1851
- var stagingPathSchema = z14.string().max(2048).refine(
1925
+ var stagingPathSchema = z16.string().max(2048).refine(
1852
1926
  (path) => path.startsWith("/") && !path.startsWith("//") && !path.includes("\\"),
1853
1927
  "Expected a path on the staging host"
1854
1928
  );
1855
- var stagingLinkSchema = z14.object({
1856
- url: z14.string().url(),
1857
- expiresAt: z14.number()
1929
+ var stagingLinkSchema = z16.object({
1930
+ url: z16.string().url(),
1931
+ expiresAt: z16.number()
1858
1932
  });
1859
- var buildSnapshotSchema = z14.object({
1860
- builds: z14.array(hostedBuildSchema),
1933
+ var buildSnapshotSchema = z16.object({
1934
+ builds: z16.array(hostedBuildSchema),
1861
1935
  current: hostedBuildSchema.nullable(),
1862
1936
  selected: hostedBuildSchema.nullable(),
1863
- logs: z14.string()
1937
+ logs: z16.string()
1864
1938
  });
1865
- var assetPathSchema = z14.string().max(512).refine(
1939
+ var assetPathSchema = z16.string().max(512).refine(
1866
1940
  (path) => path.startsWith("/") && // oxlint-disable-next-line no-control-regex -- Asset paths must reject control characters.
1867
1941
  !/[\\\u0000-\u001f?#%]/.test(path) && path.slice(1).split("/").every((part) => part.length > 0 && !part.startsWith(".")),
1868
1942
  "Expected a public asset path without hidden segments"
1869
1943
  );
1870
- var base64Schema = z14.string().regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
1944
+ var base64Schema = z16.string().regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
1871
1945
  var stagedDeploymentLimits = {
1872
1946
  /** Bytes of JSON, uncompressed. */
1873
1947
  size: 64e6,
1874
1948
  /** Bytes of the Brotli-compressed object. */
1875
1949
  compressedSize: 1e7
1876
1950
  };
1877
- var stagedDeploymentSchema = z14.object({
1878
- encoding: z14.literal("br"),
1879
- sha256: z14.string().regex(/^[0-9a-f]{64}$/),
1880
- compressedSize: z14.number().int().positive().max(stagedDeploymentLimits.compressedSize),
1881
- size: z14.number().int().positive().max(stagedDeploymentLimits.size)
1951
+ var stagedDeploymentSchema = z16.object({
1952
+ encoding: z16.literal("br"),
1953
+ sha256: z16.string().regex(/^[0-9a-f]{64}$/),
1954
+ compressedSize: z16.number().int().positive().max(stagedDeploymentLimits.compressedSize),
1955
+ size: z16.number().int().positive().max(stagedDeploymentLimits.size)
1882
1956
  }).strict();
1883
1957
  var stagedDeploymentContentSchema = stagedDeploymentSchema.extend({
1884
- content: z14.string().max(Math.ceil(stagedDeploymentLimits.compressedSize / 3) * 4)
1958
+ content: z16.string().max(Math.ceil(stagedDeploymentLimits.compressedSize / 3) * 4)
1885
1959
  }).strict();
1886
1960
  var stagedDeploymentKey = (build, sha256) => `builds/${build}/deployment/${sha256}.br`;
1887
1961
  var artifactFields = {
1888
1962
  routing: appRoutingSchema,
1889
- worker: z14.object({
1963
+ worker: z16.object({
1890
1964
  ...workerSettings,
1891
1965
  migrations: appMigrationsSchema.optional(),
1892
- modules: z14.array(
1893
- z14.object({
1966
+ modules: z16.array(
1967
+ z16.object({
1894
1968
  path: outputPathSchema.refine((path) => path !== "metadata"),
1895
- type: z14.enum([
1969
+ type: z16.enum([
1896
1970
  "application/javascript+module",
1897
1971
  "application/wasm",
1898
1972
  "text/plain",
@@ -1902,26 +1976,26 @@ var artifactFields = {
1902
1976
  }).strict()
1903
1977
  ).min(1).max(500)
1904
1978
  }).strict().superRefine(distinctBindings).optional(),
1905
- assets: z14.array(
1906
- z14.object({
1979
+ assets: z16.array(
1980
+ z16.object({
1907
1981
  path: assetPathSchema,
1908
1982
  content: base64Schema.max(14e6),
1909
- size: z14.number().int().min(0).max(1e7)
1983
+ size: z16.number().int().min(0).max(1e7)
1910
1984
  }).strict()
1911
1985
  ).max(500)
1912
1986
  };
1913
- var buildArtifactsSchema = z14.discriminatedUnion("format", [
1914
- z14.object({
1915
- format: z14.literal(1),
1987
+ var buildArtifactsSchema = z16.discriminatedUnion("format", [
1988
+ z16.object({
1989
+ format: z16.literal(1),
1916
1990
  ...artifactFields,
1917
- quests: z14.unknown(),
1918
- catalog: z14.unknown()
1991
+ quests: z16.unknown(),
1992
+ catalog: z16.unknown()
1919
1993
  }).strict(),
1920
- z14.object({
1921
- format: z14.literal(2),
1994
+ z16.object({
1995
+ format: z16.literal(2),
1922
1996
  ...artifactFields,
1923
1997
  deployment: stagedDeploymentSchema,
1924
- images: z14.array(imageAssetArtifactSchema).max(10)
1998
+ images: z16.array(imageAssetArtifactSchema).max(10)
1925
1999
  }).strict()
1926
2000
  ]).superRefine((value, ctx) => {
1927
2001
  if (value.worker) {
@@ -1973,39 +2047,39 @@ var buildArtifactsSchema = z14.discriminatedUnion("format", [
1973
2047
  });
1974
2048
 
1975
2049
  // src/server/development.ts
1976
- import * as z15 from "zod";
1977
- var developmentPreflightSchema = z15.object({
1978
- organization: z15.string(),
1979
- project: z15.string(),
1980
- environment: z15.enum(["test", "live"]),
1981
- identity: z15.object({
1982
- exchange: z15.literal("supported"),
1983
- activeIntegrations: z15.number().int().nonnegative()
2050
+ import * as z17 from "zod";
2051
+ var developmentPreflightSchema = z17.object({
2052
+ organization: z17.string(),
2053
+ project: z17.string(),
2054
+ environment: z17.enum(["test", "live"]),
2055
+ identity: z17.object({
2056
+ exchange: z17.literal("supported"),
2057
+ activeIntegrations: z17.number().int().nonnegative()
1984
2058
  }).optional(),
1985
- staging: z15.enum(["configured", "blocked"]),
1986
- development: z15.object({
1987
- status: z15.enum(["configured", "blocked"]),
2059
+ staging: z17.enum(["configured", "blocked"]),
2060
+ development: z17.object({
2061
+ status: z17.enum(["configured", "blocked"]),
1988
2062
  // How `domino dev` reaches the preview origin: a Cloudflare tunnel, or a direct route on a
1989
2063
  // local development stack. APIs that predate the field use tunnels.
1990
- transport: z15.enum(["tunnel", "direct"]).default("tunnel"),
1991
- missing: z15.array(z15.string()),
1992
- authentication: z15.array(z15.string())
2064
+ transport: z17.enum(["tunnel", "direct"]).default("tunnel"),
2065
+ missing: z17.array(z17.string()),
2066
+ authentication: z17.array(z17.string())
1993
2067
  }),
1994
- checks: z15.array(
1995
- z15.object({
1996
- id: z15.string(),
1997
- status: z15.enum(["ok", "error"]),
1998
- message: z15.string(),
1999
- missing: z15.array(z15.string()).optional(),
2000
- issues: z15.array(z15.string()).optional()
2068
+ checks: z17.array(
2069
+ z17.object({
2070
+ id: z17.string(),
2071
+ status: z17.enum(["ok", "error"]),
2072
+ message: z17.string(),
2073
+ missing: z17.array(z17.string()).optional(),
2074
+ issues: z17.array(z17.string()).optional()
2001
2075
  })
2002
2076
  )
2003
2077
  });
2004
2078
 
2005
2079
  // src/server/hosted.ts
2006
- import * as z16 from "zod";
2080
+ import * as z18 from "zod";
2007
2081
  var hostedKeyPermissions = ["read", "points", "ingest"];
2008
- var hostedKeyPermissionList = z16.array(z16.string()).transform(
2082
+ var hostedKeyPermissionList = z18.array(z18.string()).transform(
2009
2083
  (values) => values.filter(
2010
2084
  (value) => hostedKeyPermissions.includes(value)
2011
2085
  )
@@ -2017,17 +2091,17 @@ var hostedManagementBindings = [
2017
2091
  "DOMINO_PROJECT",
2018
2092
  "DOMINO_ENVIRONMENT"
2019
2093
  ];
2020
- var hostedKeySecretSchema = z16.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key");
2021
- var hostedKeySchema = z16.object({
2022
- id: z16.string().uuid(),
2094
+ var hostedKeySecretSchema = z18.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key");
2095
+ var hostedKeySchema = z18.object({
2096
+ id: z18.string().uuid(),
2023
2097
  token: hostedKeySecretSchema,
2024
2098
  organization: identifier,
2025
2099
  project: identifier,
2026
- environment: z16.enum(["test", "live"]),
2100
+ environment: z18.enum(["test", "live"]),
2027
2101
  permissions: hostedKeyPermissionList,
2028
- expiresAt: z16.number().nullable()
2102
+ expiresAt: z18.number().nullable()
2029
2103
  }).strict();
2030
- var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl: z16.string().url() }).strict();
2104
+ var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl: z18.string().url() }).strict();
2031
2105
  function hostedManagementClient(env) {
2032
2106
  const missing = hostedManagementBindings.filter((name) => !env[name]);
2033
2107
  if (missing.length) {
@@ -2035,7 +2109,7 @@ function hostedManagementClient(env) {
2035
2109
  `Missing ${missing.join(", ")}. Domino sets these for hosted apps and domino dev; update the project's vite.config.ts to forward them in development.`
2036
2110
  );
2037
2111
  }
2038
- const environment = z16.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
2112
+ const environment = z18.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
2039
2113
  const token = env.DOMINO_MANAGEMENT_KEY;
2040
2114
  return createManagementClient({
2041
2115
  baseUrl: env.DOMINO_API_URL.replace(/\/+$/, ""),
@@ -2047,9 +2121,9 @@ function hostedManagementClient(env) {
2047
2121
  }
2048
2122
 
2049
2123
  // src/server/index.ts
2050
- var environmentSchema = z17.enum(["test", "live"]);
2051
- var roleSchema = z17.enum(["editor", "reviewer", "staff"]);
2052
- var permissionSchema = z17.enum([
2124
+ var environmentSchema = z19.enum(["test", "live"]);
2125
+ var roleSchema = z19.enum(["editor", "reviewer", "staff"]);
2126
+ var permissionSchema = z19.enum([
2053
2127
  "read",
2054
2128
  "publish",
2055
2129
  "review",
@@ -2069,7 +2143,7 @@ var permissionSchema = z17.enum([
2069
2143
  */
2070
2144
  "enroll"
2071
2145
  ]);
2072
- var permissionListSchema = z17.array(z17.string()).transform(
2146
+ var permissionListSchema = z19.array(z19.string()).transform(
2073
2147
  (values) => values.filter(
2074
2148
  (value) => permissionSchema.safeParse(value).success
2075
2149
  )
@@ -2079,38 +2153,38 @@ var rolePermissions = {
2079
2153
  reviewer: ["read", "review"],
2080
2154
  staff: ["read", "confirm", "handover"]
2081
2155
  };
2082
- var projectSetupSchema = z17.object({
2083
- mode: z17.enum(["new", "existing"]),
2084
- brief: z17.string().trim().min(1).max(4e3)
2156
+ var projectSetupSchema = z19.object({
2157
+ mode: z19.enum(["new", "existing"]),
2158
+ brief: z19.string().trim().min(1).max(4e3)
2085
2159
  }).strict();
2086
- var operatorUserSchema = z17.object({
2087
- id: z17.string(),
2088
- name: z17.string().nullable(),
2089
- email: z17.string().nullable(),
2090
- avatar: z17.string().nullable()
2160
+ var operatorUserSchema = z19.object({
2161
+ id: z19.string(),
2162
+ name: z19.string().nullable(),
2163
+ email: z19.string().nullable(),
2164
+ avatar: z19.string().nullable()
2091
2165
  });
2092
- var projectSchema = z17.object({
2166
+ var projectSchema = z19.object({
2093
2167
  /**
2094
2168
  * Names the project's hosted addresses. The server gives a new project, and accepts in a
2095
2169
  * slug change, only slugs of at least 3 characters that Domino does not reserve. This schema
2096
2170
  * checks only the format, so it parses every slug that exists.
2097
2171
  */
2098
- slug: z17.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
2099
- createdBy: z17.string().nullable().optional(),
2172
+ slug: z19.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
2173
+ createdBy: z19.string().nullable().optional(),
2100
2174
  creator: operatorUserSchema.nullable().optional(),
2101
2175
  /** A response, so fields a newer server adds to the setup are dropped, not rejected. */
2102
- setup: z17.object(projectSetupSchema.shape).optional(),
2176
+ setup: z19.object(projectSetupSchema.shape).optional(),
2103
2177
  /** The starter chosen at setup. A plain string, so later starters still parse. */
2104
- starter: z17.string().optional(),
2105
- id: z17.string().min(1),
2178
+ starter: z19.string().optional(),
2179
+ id: z19.string().min(1),
2106
2180
  organization: identifier,
2107
2181
  project: identifier,
2108
- name: z17.string(),
2109
- subtitle: z17.string(),
2110
- initials: z17.string(),
2111
- color: z17.string(),
2182
+ name: z19.string(),
2183
+ subtitle: z19.string(),
2184
+ initials: z19.string(),
2185
+ color: z19.string(),
2112
2186
  permissions: permissionListSchema,
2113
- environments: z17.array(environmentSchema)
2187
+ environments: z19.array(environmentSchema)
2114
2188
  }).refine(
2115
2189
  (project) => !project.creator || project.creator.id === project.createdBy,
2116
2190
  {
@@ -2118,45 +2192,45 @@ var projectSchema = z17.object({
2118
2192
  path: ["creator"]
2119
2193
  }
2120
2194
  );
2121
- var projectInputSchema = z17.object({
2195
+ var projectInputSchema = z19.object({
2122
2196
  actionId: identifier,
2123
- name: z17.string().trim().min(1).max(80),
2197
+ name: z19.string().trim().min(1).max(80),
2124
2198
  setup: projectSetupSchema.optional(),
2125
2199
  /** The starter a new hosted app begins from, with `setup.mode` "new". */
2126
2200
  starter: starterIdSchema.optional()
2127
2201
  }).strict();
2128
- var projectUpdateInputSchema = z17.union([
2129
- z17.object({ name: projectInputSchema.shape.name }).strict(),
2130
- z17.object({
2202
+ var projectUpdateInputSchema = z19.union([
2203
+ z19.object({ name: projectInputSchema.shape.name }).strict(),
2204
+ z19.object({
2131
2205
  slug: projectSchema.shape.slug,
2132
- confirm: z17.string().min(1).max(80)
2206
+ confirm: z19.string().min(1).max(80)
2133
2207
  }).strict()
2134
2208
  ]);
2135
- var projectDeletionInputSchema = z17.object({ confirm: z17.string().min(1).max(80) }).strict();
2136
- var projectDeletionSchema = z17.object({
2209
+ var projectDeletionInputSchema = z19.object({ confirm: z19.string().min(1).max(80) }).strict();
2210
+ var projectDeletionSchema = z19.object({
2137
2211
  project: identifier,
2138
- purgeAfter: z17.number().int()
2212
+ purgeAfter: z19.number().int()
2139
2213
  });
2140
- var projectTransferInputSchema = z17.object({ organization: identifier, confirm: z17.string().min(1).max(80) }).strict();
2141
- var projectTransferSchema = z17.object({
2214
+ var projectTransferInputSchema = z19.object({ organization: identifier, confirm: z19.string().min(1).max(80) }).strict();
2215
+ var projectTransferSchema = z19.object({
2142
2216
  organization: identifier,
2143
2217
  project: identifier
2144
2218
  });
2145
- var grantSchema = z17.object({
2146
- subject: z17.string().min(1).max(200),
2147
- roles: z17.array(roleSchema),
2148
- environments: z17.array(environmentSchema)
2219
+ var grantSchema = z19.object({
2220
+ subject: z19.string().min(1).max(200),
2221
+ roles: z19.array(roleSchema),
2222
+ environments: z19.array(environmentSchema)
2149
2223
  }).strict();
2150
- var grantRecordSchema = z17.object(grantSchema.shape);
2151
- var stockAdditionSchema = z17.object({
2224
+ var grantRecordSchema = z19.object(grantSchema.shape);
2225
+ var stockAdditionSchema = z19.object({
2152
2226
  item: identifier,
2153
- quantity: z17.number().int(),
2227
+ quantity: z19.number().int(),
2154
2228
  actionId: identifier
2155
2229
  });
2156
- var completionRevokeSchema = z17.object({
2230
+ var completionRevokeSchema = z19.object({
2157
2231
  actionId: identifier,
2158
- reason: z17.string().trim().min(1).max(500),
2159
- freeOccurrence: z17.boolean().default(false)
2232
+ reason: z19.string().trim().min(1).max(500),
2233
+ freeOccurrence: z19.boolean().default(false)
2160
2234
  }).strict();
2161
2235
  var RevokedEntitlementOutcome = {
2162
2236
  /** No other completion grants the reward: it is void, after cancelling a handover in progress. */
@@ -2184,227 +2258,238 @@ var RevokedReferralOutcome = {
2184
2258
  /** Qualified on another accepted completion of the program's quest instead. */
2185
2259
  Requalified: "requalified"
2186
2260
  };
2187
- var entitlementOutcomeSchema = z17.string().min(1).max(64);
2188
- var deliveryOutcomeSchema = z17.string().min(1).max(64);
2189
- var referralOutcomeSchema = z17.string().min(1).max(64);
2190
- var completionRevocationSchema = z17.object({
2261
+ var entitlementOutcomeSchema = z19.string().min(1).max(64);
2262
+ var deliveryOutcomeSchema = z19.string().min(1).max(64);
2263
+ var referralOutcomeSchema = z19.string().min(1).max(64);
2264
+ var completionRevocationSchema = z19.object({
2191
2265
  completion: identifier,
2192
2266
  /** The quest ID, or the board ID when `source.kind` is `leaderboard`. */
2193
2267
  quest: identifier,
2194
2268
  member: identifier,
2195
2269
  /** What paid the revoked completion. `source.id` repeats `quest`. */
2196
2270
  source: completionSourceSchema.optional(),
2197
- revokedAt: z17.number(),
2198
- occurrenceFreed: z17.boolean(),
2199
- badges: z17.array(z17.object({ badge: identifier, stillAwarded: z17.boolean() })).optional(),
2200
- groups: z17.array(z17.object({ group: identifier, stillMember: z17.boolean() })).optional(),
2201
- points: z17.array(
2202
- z17.object({
2271
+ revokedAt: z19.number(),
2272
+ occurrenceFreed: z19.boolean(),
2273
+ badges: z19.array(z19.object({ badge: identifier, stillAwarded: z19.boolean() })).optional(),
2274
+ groups: z19.array(z19.object({ group: identifier, stillMember: z19.boolean() })).optional(),
2275
+ points: z19.array(
2276
+ z19.object({
2203
2277
  entry: identifier,
2204
2278
  balance: identifier,
2205
2279
  reversal: identifier.nullable(),
2206
- reversed: z17.number().int(),
2207
- unreversed: z17.number().int()
2280
+ reversed: z19.number().int(),
2281
+ unreversed: z19.number().int()
2208
2282
  })
2209
2283
  ),
2210
- entitlements: z17.array(
2211
- z17.object({
2284
+ entitlements: z19.array(
2285
+ z19.object({
2212
2286
  entitlement: identifier,
2213
2287
  reward: identifier,
2214
2288
  outcome: entitlementOutcomeSchema,
2215
- status: z17.string()
2289
+ status: z19.string()
2216
2290
  })
2217
2291
  ),
2218
- deliveries: z17.array(
2219
- z17.object({
2220
- delivery: z17.string(),
2221
- roleId: z17.string(),
2292
+ deliveries: z19.array(
2293
+ z19.object({
2294
+ delivery: z19.string(),
2295
+ roleId: z19.string(),
2222
2296
  outcome: deliveryOutcomeSchema,
2223
2297
  /**
2224
2298
  * By Relay's records, another accepted, unrevoked completion of the member also granted this
2225
2299
  * role to the same Discord account and server. Relay does not read Discord's membership.
2226
2300
  */
2227
- stillGranted: z17.boolean()
2301
+ stillGranted: z19.boolean()
2228
2302
  })
2229
2303
  ),
2230
- referrals: z17.array(
2231
- z17.object({
2304
+ referrals: z19.array(
2305
+ z19.object({
2232
2306
  program: identifier,
2233
2307
  outcome: referralOutcomeSchema
2234
2308
  })
2235
2309
  ),
2236
- streakMilestone: z17.boolean()
2310
+ streakMilestone: z19.boolean()
2237
2311
  });
2238
- var accessSchema = z17.object({
2239
- actor: z17.string(),
2240
- organization: z17.string(),
2241
- admin: z17.boolean(),
2242
- local: z17.boolean(),
2243
- projects: z17.array(projectSchema)
2244
- });
2245
- var querySchema = z17.object({
2246
- q: z17.string().max(200).default(""),
2247
- filter: z17.string().max(50).default("all"),
2248
- offset: z17.coerce.number().int().min(0).max(1e6).default(0),
2249
- limit: z17.coerce.number().int().min(1).max(100).default(25)
2250
- });
2251
- var accountProfileSchema = z17.object({
2252
- name: z17.string().optional(),
2312
+ var accessSchema = z19.object({
2313
+ actor: z19.string(),
2314
+ organization: z19.string(),
2315
+ admin: z19.boolean(),
2316
+ local: z19.boolean(),
2317
+ projects: z19.array(projectSchema)
2318
+ });
2319
+ var querySchema = z19.object({
2320
+ q: z19.string().max(200).default(""),
2321
+ filter: z19.string().max(50).default("all"),
2322
+ offset: z19.coerce.number().int().min(0).max(1e6).default(0),
2323
+ limit: z19.coerce.number().int().min(1).max(100).default(25)
2324
+ });
2325
+ var accountProfileSchema = z19.object({
2326
+ name: z19.string().optional(),
2253
2327
  /** The account's handle, where the provider has one (X and Discord). */
2254
- username: z17.string().optional(),
2255
- email: z17.string().optional(),
2256
- emailVerified: z17.boolean().default(false),
2257
- imageUrl: z17.string().url().optional()
2328
+ username: z19.string().optional(),
2329
+ email: z19.string().optional(),
2330
+ emailVerified: z19.boolean().default(false),
2331
+ imageUrl: z19.string().url().optional()
2258
2332
  });
2259
- var memberAccountSchema = z17.object({
2333
+ var memberAccountSchema = z19.object({
2260
2334
  /** `wallet` for wallet sign-in, `account` for every other connected account. */
2261
- kind: z17.enum(["account", "wallet"]),
2262
- provider: z17.string(),
2263
- subject: z17.string(),
2264
- signInEnabled: z17.boolean(),
2265
- profile: accountProfileSchema.optional()
2266
- });
2267
- var operationSchema = z17.object({
2268
- target: z17.string(),
2269
- paused: z17.boolean(),
2270
- revision: z17.number().int(),
2271
- reason: z17.string(),
2272
- actor: z17.string().nullable(),
2273
- changedAt: z17.number()
2274
- });
2275
- var operationInputSchema = z17.object({
2276
- target: z17.union([
2277
- z17.literal("redemptions"),
2278
- z17.string().regex(/^quest:[\w-]+$/)
2335
+ kind: z19.enum(["account", "wallet"]),
2336
+ provider: z19.string(),
2337
+ subject: z19.string(),
2338
+ signInEnabled: z19.boolean(),
2339
+ profile: accountProfileSchema.optional(),
2340
+ /**
2341
+ * Present only for accounts Relay reads in the background with the member's own tokens:
2342
+ * `needs-reconnect` once those tokens stopped working, until the member links the account again.
2343
+ */
2344
+ status: z19.enum(["connected", "needs-reconnect"]).optional(),
2345
+ /**
2346
+ * Why the account needs reconnecting: the member or the provider revoked access (`revoked`),
2347
+ * the tokens expired and cannot be refreshed (`expired`), or a source needs a permission the
2348
+ * member did not grant (`missing-scope`).
2349
+ */
2350
+ reason: z19.enum(["revoked", "expired", "missing-scope"]).optional()
2351
+ });
2352
+ var operationSchema = z19.object({
2353
+ target: z19.string(),
2354
+ paused: z19.boolean(),
2355
+ revision: z19.number().int(),
2356
+ reason: z19.string(),
2357
+ actor: z19.string().nullable(),
2358
+ changedAt: z19.number()
2359
+ });
2360
+ var operationInputSchema = z19.object({
2361
+ target: z19.union([
2362
+ z19.literal("redemptions"),
2363
+ z19.string().regex(/^quest:[\w-]+$/)
2279
2364
  ]),
2280
- paused: z17.boolean(),
2281
- revision: z17.number().int().nonnegative(),
2282
- reason: z17.string().trim().min(1).max(500),
2365
+ paused: z19.boolean(),
2366
+ revision: z19.number().int().nonnegative(),
2367
+ reason: z19.string().trim().min(1).max(500),
2283
2368
  actionId: identifier
2284
2369
  }).strict();
2285
- var questLifecycleInputSchema = z17.object({
2370
+ var questLifecycleInputSchema = z19.object({
2286
2371
  quest: identifier,
2287
2372
  expectedRelease: identifier.optional(),
2288
- archived: z17.boolean(),
2289
- reason: z17.string().trim().min(1).max(500),
2373
+ archived: z19.boolean(),
2374
+ reason: z19.string().trim().min(1).max(500),
2290
2375
  actionId: identifier
2291
2376
  }).strict();
2292
- var questLifecycleSchema = z17.object({
2377
+ var questLifecycleSchema = z19.object({
2293
2378
  quest: identifier,
2294
2379
  key: identifier.nullable(),
2295
- title: z17.string(),
2380
+ title: z19.string(),
2296
2381
  release: identifier,
2297
- lifecycle: z17.enum(["active", "paused", "archived"]),
2298
- changed: z17.boolean()
2299
- });
2300
- var memberSchema = z17.object({
2301
- id: z17.string(),
2302
- test: z17.boolean().optional(),
2303
- name: z17.string().nullable().optional(),
2304
- accounts: z17.array(memberAccountSchema).default([]),
2305
- attempts: z17.number(),
2306
- completions: z17.number(),
2307
- rewards: z17.number(),
2308
- lastActivity: z17.number().nullable()
2309
- });
2310
- var personSchema = z17.object({
2311
- id: z17.string(),
2312
- test: z17.boolean().optional(),
2313
- name: z17.string().nullable().optional(),
2314
- accounts: z17.array(memberAccountSchema).default([])
2315
- });
2316
- var metricsSchema = z17.object({
2317
- quests: z17.number(),
2318
- members: z17.number(),
2319
- attempts: z17.number(),
2320
- completions: z17.number(),
2321
- review: z17.number(),
2322
- failed: z17.number(),
2323
- entitlements: z17.number()
2324
- });
2325
- var readinessSchema = z17.object({
2326
- checks: z17.array(
2327
- z17.object({
2328
- id: z17.string(),
2329
- status: z17.enum(["ready", "blocked"]),
2330
- title: z17.string(),
2331
- detail: z17.string()
2382
+ lifecycle: z19.enum(["active", "paused", "archived"]),
2383
+ changed: z19.boolean()
2384
+ });
2385
+ var memberSchema = z19.object({
2386
+ id: z19.string(),
2387
+ test: z19.boolean().optional(),
2388
+ name: z19.string().nullable().optional(),
2389
+ accounts: z19.array(memberAccountSchema).default([]),
2390
+ attempts: z19.number(),
2391
+ completions: z19.number(),
2392
+ rewards: z19.number(),
2393
+ lastActivity: z19.number().nullable()
2394
+ });
2395
+ var personSchema = z19.object({
2396
+ id: z19.string(),
2397
+ test: z19.boolean().optional(),
2398
+ name: z19.string().nullable().optional(),
2399
+ accounts: z19.array(memberAccountSchema).default([])
2400
+ });
2401
+ var metricsSchema = z19.object({
2402
+ quests: z19.number(),
2403
+ members: z19.number(),
2404
+ attempts: z19.number(),
2405
+ completions: z19.number(),
2406
+ review: z19.number(),
2407
+ failed: z19.number(),
2408
+ entitlements: z19.number()
2409
+ });
2410
+ var readinessSchema = z19.object({
2411
+ checks: z19.array(
2412
+ z19.object({
2413
+ id: z19.string(),
2414
+ status: z19.enum(["ready", "blocked"]),
2415
+ title: z19.string(),
2416
+ detail: z19.string()
2332
2417
  })
2333
2418
  )
2334
2419
  });
2335
- var inventorySchema = z17.object({
2336
- item: z17.string(),
2337
- name: z17.string().nullable().default(null),
2338
- available: z17.number(),
2339
- reserved: z17.number(),
2340
- allocated: z17.number().default(0)
2341
- });
2342
- var auditRecordSchema = z17.object({
2343
- id: z17.string(),
2344
- action: z17.string(),
2345
- actor: z17.string().nullable(),
2420
+ var inventorySchema = z19.object({
2421
+ item: z19.string(),
2422
+ name: z19.string().nullable().default(null),
2423
+ available: z19.number(),
2424
+ reserved: z19.number(),
2425
+ allocated: z19.number().default(0)
2426
+ });
2427
+ var auditRecordSchema = z19.object({
2428
+ id: z19.string(),
2429
+ action: z19.string(),
2430
+ actor: z19.string().nullable(),
2346
2431
  user: operatorUserSchema.nullable().optional(),
2347
- detail: z17.string(),
2348
- at: z17.number(),
2349
- attempt: z17.string().nullable()
2432
+ detail: z19.string(),
2433
+ at: z19.number(),
2434
+ attempt: z19.string().nullable()
2350
2435
  }).refine((record6) => !record6.user || record6.user.id === record6.actor, {
2351
2436
  message: "User profile must match the recorded actor",
2352
2437
  path: ["user"]
2353
2438
  });
2354
- var pageSchema = z17.object({
2439
+ var pageSchema = z19.object({
2355
2440
  snapshot: snapshotSchema,
2356
- members: z17.array(memberSchema),
2357
- people: z17.array(personSchema).default([]),
2441
+ members: z19.array(memberSchema),
2442
+ people: z19.array(personSchema).default([]),
2358
2443
  metrics: metricsSchema,
2359
- total: z17.number(),
2360
- offset: z17.number(),
2361
- limit: z17.number(),
2362
- inventory: z17.array(inventorySchema),
2363
- operations: z17.array(operationSchema).default([]),
2364
- audit: z17.array(auditRecordSchema).default([]),
2365
- questCounts: z17.record(z17.string(), z17.number())
2366
- });
2367
- var managedOAuthAccountBaseSchema = z17.object({
2368
- provider: z17.enum(["x", "discord"]),
2369
- revision: z17.number().int().nonnegative()
2370
- });
2371
- var managedOAuthAccountSchema = z17.discriminatedUnion("status", [
2444
+ total: z19.number(),
2445
+ offset: z19.number(),
2446
+ limit: z19.number(),
2447
+ inventory: z19.array(inventorySchema),
2448
+ operations: z19.array(operationSchema).default([]),
2449
+ audit: z19.array(auditRecordSchema).default([]),
2450
+ questCounts: z19.record(z19.string(), z19.number())
2451
+ });
2452
+ var managedOAuthAccountBaseSchema = z19.object({
2453
+ provider: z19.enum(["x", "discord"]),
2454
+ revision: z19.number().int().nonnegative()
2455
+ });
2456
+ var managedOAuthAccountSchema = z19.discriminatedUnion("status", [
2372
2457
  managedOAuthAccountBaseSchema.extend({
2373
- status: z17.literal("connected"),
2374
- subject: z17.string().min(1),
2375
- linkedAt: z17.number(),
2458
+ status: z19.literal("connected"),
2459
+ subject: z19.string().min(1),
2460
+ linkedAt: z19.number(),
2376
2461
  /**
2377
2462
  * True when a member import attached the account with the organization's word for it, not the
2378
2463
  * member's proof. Absent from Relay versions without imports.
2379
2464
  */
2380
- imported: z17.boolean().optional(),
2465
+ imported: z19.boolean().optional(),
2381
2466
  /**
2382
2467
  * True for a real account an operator linked to a test member without OAuth
2383
2468
  * (`testMembers.linkAccount`). Absent from Relay versions without it.
2384
2469
  */
2385
- testLinked: z17.boolean().optional()
2470
+ testLinked: z19.boolean().optional()
2386
2471
  }),
2387
- managedOAuthAccountBaseSchema.extend({ status: z17.literal("disconnected") })
2472
+ managedOAuthAccountBaseSchema.extend({ status: z19.literal("disconnected") })
2388
2473
  ]);
2389
2474
  var managedTelegramAccountBaseSchema = managedOAuthAccountBaseSchema.extend({
2390
- provider: z17.literal("telegram")
2475
+ provider: z19.literal("telegram")
2391
2476
  });
2392
- var managedTelegramAccountSchema = z17.discriminatedUnion("status", [
2477
+ var managedTelegramAccountSchema = z19.discriminatedUnion("status", [
2393
2478
  managedTelegramAccountBaseSchema.extend({
2394
- status: z17.literal("connected"),
2479
+ status: z19.literal("connected"),
2395
2480
  /** The numeric Telegram user ID. */
2396
- subject: z17.string().min(1),
2397
- linkedAt: z17.number()
2481
+ subject: z19.string().min(1),
2482
+ linkedAt: z19.number()
2398
2483
  }),
2399
2484
  managedTelegramAccountBaseSchema.extend({
2400
- status: z17.literal("disconnected")
2485
+ status: z19.literal("disconnected")
2401
2486
  })
2402
2487
  ]);
2403
- var memberOAuthUnlinkInputSchema = z17.object({
2404
- provider: z17.enum(["x", "discord"]),
2405
- subject: z17.string().min(1).max(4096),
2406
- revision: z17.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
2407
- reason: z17.string().trim().min(1).max(500)
2488
+ var memberOAuthUnlinkInputSchema = z19.object({
2489
+ provider: z19.enum(["x", "discord"]),
2490
+ subject: z19.string().min(1).max(4096),
2491
+ revision: z19.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
2492
+ reason: z19.string().trim().min(1).max(500)
2408
2493
  }).strict();
2409
2494
  var memberTelegramUnlinkInputSchema = memberOAuthUnlinkInputSchema.omit({ provider: true }).strict();
2410
2495
  var managedWalletSchema = linkedWalletSchema.extend({
@@ -2412,32 +2497,32 @@ var managedWalletSchema = linkedWalletSchema.extend({
2412
2497
  * True when a member import attached the wallet with the organization's word for it, and the
2413
2498
  * member has not proved it since. Absent from Relay versions without imports.
2414
2499
  */
2415
- imported: z17.boolean().optional(),
2416
- status: z17.enum(["linked", "unlinked"]),
2417
- unlinkedAt: z17.number().int().nullable(),
2500
+ imported: z19.boolean().optional(),
2501
+ status: z19.enum(["linked", "unlinked"]),
2502
+ unlinkedAt: z19.number().int().nullable(),
2418
2503
  /** "member", or the operator or key that unlinked it. */
2419
- unlinkedBy: z17.string().nullable()
2504
+ unlinkedBy: z19.string().nullable()
2420
2505
  });
2421
2506
  var managedMemberIdentitySchema = memberIdentitySchema.extend({
2422
2507
  /**
2423
2508
  * True for an X account a member import attached, until the member links or signs in with it
2424
2509
  * through X. Absent from Relay versions without imports.
2425
2510
  */
2426
- imported: z17.boolean().optional(),
2511
+ imported: z19.boolean().optional(),
2427
2512
  /**
2428
2513
  * True for a real X or Discord account an operator linked to a test member without OAuth
2429
2514
  * (`testMembers.linkAccount`). Absent from Relay versions without it.
2430
2515
  */
2431
- testLinked: z17.boolean().optional(),
2432
- status: z17.enum(["linked", "unlinked"]),
2433
- unlinkedAt: z17.number().int().nullable(),
2516
+ testLinked: z19.boolean().optional(),
2517
+ status: z19.enum(["linked", "unlinked"]),
2518
+ unlinkedAt: z19.number().int().nullable(),
2434
2519
  /** The operator or key that unlinked it. */
2435
- unlinkedBy: z17.string().nullable()
2520
+ unlinkedBy: z19.string().nullable()
2436
2521
  });
2437
- var memberIdentityChangeInputSchema = z17.object({
2522
+ var memberIdentityChangeInputSchema = z19.object({
2438
2523
  kind: appIdentityKindSchema,
2439
- subject: z17.string().min(1).max(256),
2440
- reason: z17.string().trim().min(1).max(500)
2524
+ subject: z19.string().min(1).max(256),
2525
+ reason: z19.string().trim().min(1).max(500)
2441
2526
  }).strict();
2442
2527
  var balanceCheckSchema = walletBalanceSchema.pick({
2443
2528
  chain: true,
@@ -2447,76 +2532,76 @@ var balanceCheckSchema = walletBalanceSchema.pick({
2447
2532
  wallets: true,
2448
2533
  observedAt: true
2449
2534
  }).extend({ attempt: identifier });
2450
- var walletBalanceChainsSchema = z17.object({
2451
- chains: z17.array(
2452
- z17.object({
2453
- chain: z17.union([
2454
- z17.literal(solanaMainnet),
2535
+ var walletBalanceChainsSchema = z19.object({
2536
+ chains: z19.array(
2537
+ z19.object({
2538
+ chain: z19.union([
2539
+ z19.literal(solanaMainnet),
2455
2540
  cosmosNetworkSchema,
2456
2541
  evmChainIdSchema
2457
2542
  ]),
2458
- name: z17.string(),
2459
- testnet: z17.boolean()
2543
+ name: z19.string(),
2544
+ testnet: z19.boolean()
2460
2545
  })
2461
2546
  )
2462
2547
  });
2463
- var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason: z17.string().trim().min(1).max(500) }).strict();
2548
+ var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason: z19.string().trim().min(1).max(500) }).strict();
2464
2549
  var memberWalletSignInInputSchema = walletUnlinkInputSchema.extend({
2465
- enabled: z17.boolean(),
2466
- reason: z17.string().trim().min(1).max(500)
2550
+ enabled: z19.boolean(),
2551
+ reason: z19.string().trim().min(1).max(500)
2467
2552
  }).strict();
2468
- var telegramBotIdSchema = z17.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789");
2469
- var participantSignInSchema = z17.object({
2470
- providers: z17.array(
2471
- z17.object({ provider: authProviderSchema, configured: z17.boolean() })
2553
+ var telegramBotIdSchema = z19.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789");
2554
+ var participantSignInSchema = z19.object({
2555
+ providers: z19.array(
2556
+ z19.object({ provider: authProviderSchema, configured: z19.boolean() })
2472
2557
  ),
2473
- email: z17.boolean(),
2558
+ email: z19.boolean(),
2474
2559
  /** Wallet families: `"solana"`, `"eip155"`, `"cosmos"`. */
2475
2560
  wallets: walletSignInNetworksSchema,
2476
2561
  /** Why participants cannot sign in to this project, or null. */
2477
- issue: z17.string().nullable(),
2562
+ issue: z19.string().nullable(),
2478
2563
  /**
2479
2564
  * Telegram, outside `providers` in SDK 1.x: whether Domino configured Telegram Login, and the
2480
2565
  * bot whose Mini App participants sign in from, or null when Mini App sign-in is off. Absent
2481
2566
  * from Relay versions without Telegram.
2482
2567
  */
2483
- telegram: z17.object({
2484
- login: z17.boolean(),
2568
+ telegram: z19.object({
2569
+ login: z19.boolean(),
2485
2570
  miniAppBotId: telegramBotIdSchema.nullable()
2486
2571
  }).optional(),
2487
- updatedAt: z17.number().nullable(),
2488
- updatedBy: z17.string().nullable()
2572
+ updatedAt: z19.number().nullable(),
2573
+ updatedBy: z19.string().nullable()
2489
2574
  });
2490
- var participantSignInInputSchema = z17.object({
2575
+ var participantSignInInputSchema = z19.object({
2491
2576
  wallets: walletSignInNetworksSchema,
2492
- telegram: z17.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
2577
+ telegram: z19.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
2493
2578
  }).strict();
2494
- var completionRevocationShortfallSchema = z17.object({
2579
+ var completionRevocationShortfallSchema = z19.object({
2495
2580
  completion: identifier,
2496
2581
  quest: identifier,
2497
- revokedAt: z17.number().int().nonnegative().safe(),
2498
- unreversedPoints: z17.record(identifier, z17.number().int().positive().safe())
2582
+ revokedAt: z19.number().int().nonnegative().safe(),
2583
+ unreversedPoints: z19.record(identifier, z19.number().int().positive().safe())
2499
2584
  });
2500
- var memberDetailSchema = z17.object({
2585
+ var memberDetailSchema = z19.object({
2501
2586
  snapshot: snapshotSchema,
2502
2587
  member: memberSchema,
2503
2588
  progress: memberProgressSchema,
2504
2589
  /** Up to 25 revoked completions with an unreversed point remainder, newest first. */
2505
- revocationShortfalls: z17.array(completionRevocationShortfallSchema).default([]),
2590
+ revocationShortfalls: z19.array(completionRevocationShortfallSchema).default([]),
2506
2591
  /** Current and historical campaign enrollment state, including inactive enrollments. */
2507
- campaignEnrollments: z17.array(campaignEnrollmentSchema).default([]),
2508
- passes: z17.array(
2509
- z17.object({
2510
- provider: z17.string(),
2511
- event: z17.string(),
2512
- subject: z17.string(),
2592
+ campaignEnrollments: z19.array(campaignEnrollmentSchema).default([]),
2593
+ passes: z19.array(
2594
+ z19.object({
2595
+ provider: z19.string(),
2596
+ event: z19.string(),
2597
+ subject: z19.string(),
2513
2598
  attempt: identifier.nullable()
2514
2599
  })
2515
2600
  ).default([]),
2516
2601
  /** Linked and unlinked wallets. */
2517
- wallets: z17.array(managedWalletSchema),
2602
+ wallets: z19.array(managedWalletSchema),
2518
2603
  /** The member's 10 most recent recorded balance reads, newest first. */
2519
- balanceChecks: z17.array(balanceCheckSchema),
2604
+ balanceChecks: z19.array(balanceCheckSchema),
2520
2605
  /** The member's participant profile in this project. */
2521
2606
  profile: managedProfileSchema.nullable(),
2522
2607
  /**
@@ -2524,11 +2609,16 @@ var memberDetailSchema = z17.object({
2524
2609
  * member ID: their selected X and Discord accounts and their `app:<name>` identities in this
2525
2610
  * project, including app identities an operator unlinked, by kind.
2526
2611
  */
2527
- identities: z17.array(managedMemberIdentitySchema)
2612
+ identities: z19.array(managedMemberIdentitySchema),
2613
+ /**
2614
+ * The creator accounts the member linked (a YouTube channel), whose content managed tracker
2615
+ * sources attribute to them. Absent from Relay versions without creator accounts.
2616
+ */
2617
+ creatorAccounts: z19.array(managedCreatorAccountSchema).optional()
2528
2618
  });
2529
- var managedMemberProgressSchema = z17.object({
2619
+ var managedMemberProgressSchema = z19.object({
2530
2620
  member: identifier,
2531
- quests: z17.array(
2621
+ quests: z19.array(
2532
2622
  memberProgressSchema.shape.quests.element.extend({
2533
2623
  /** The streak as `members.get` reports it, without the list of qualifying days. */
2534
2624
  streak: streakProgressSchema.omit({ days: true }).nullable().optional()
@@ -2539,156 +2629,172 @@ var managedMemberProgressSchema = z17.object({
2539
2629
  /** Each point balance the member has, by balance ID. */
2540
2630
  balances: snapshotSchema.shape.balances
2541
2631
  });
2542
- var stockInputSchema = z17.object({
2632
+ var stockInputSchema = z19.object({
2543
2633
  item: identifier,
2544
- quantity: z17.number().int().positive().max(1e6),
2634
+ quantity: z19.number().int().positive().max(1e6),
2545
2635
  actionId: identifier
2546
2636
  }).strict();
2547
- var ingestTrackerScopeSchema = z17.array(identifier).min(1).max(100).nullable();
2548
- var tokenScopeInputSchema = z17.object({ ingestTrackers: ingestTrackerScopeSchema }).strict();
2549
- var tokenInputSchema = z17.object({
2550
- name: z17.string().trim().min(1).max(80),
2637
+ var ingestTrackerScopeSchema = z19.array(identifier).min(1).max(100).nullable();
2638
+ var tokenScopeInputSchema = z19.object({ ingestTrackers: ingestTrackerScopeSchema }).strict();
2639
+ var tokenInputSchema = z19.object({
2640
+ name: z19.string().trim().min(1).max(80),
2551
2641
  project: identifier,
2552
2642
  environment: environmentSchema,
2553
- permissions: z17.array(permissionSchema).min(1),
2643
+ permissions: z19.array(permissionSchema).min(1),
2554
2644
  ingestTrackers: ingestTrackerScopeSchema.optional(),
2555
- days: z17.number().int().min(1).max(90).default(30)
2645
+ days: z19.number().int().min(1).max(90).default(30)
2556
2646
  }).strict();
2557
- var tokenSchema = z17.object({
2558
- id: z17.string(),
2559
- name: z17.string(),
2560
- project: z17.string(),
2647
+ var tokenSchema = z19.object({
2648
+ id: z19.string(),
2649
+ name: z19.string(),
2650
+ project: z19.string(),
2561
2651
  environment: environmentSchema,
2562
2652
  permissions: permissionListSchema,
2563
2653
  ingestTrackers: ingestTrackerScopeSchema.optional(),
2564
- expiresAt: z17.number()
2654
+ expiresAt: z19.number()
2565
2655
  });
2566
- var issuedTokenSchema = tokenSchema.extend({ token: z17.string() });
2567
- var serviceKeyInputSchema = z17.object({
2568
- name: z17.string().trim().min(1).max(80),
2569
- permissions: z17.array(permissionSchema).min(1).refine(
2656
+ var issuedTokenSchema = tokenSchema.extend({ token: z19.string() });
2657
+ var serviceKeyInputSchema = z19.object({
2658
+ name: z19.string().trim().min(1).max(80),
2659
+ permissions: z19.array(permissionSchema).min(1).refine(
2570
2660
  (permissions) => !permissions.includes("access"),
2571
2661
  "Service keys cannot hold the access permission"
2572
2662
  ),
2573
2663
  /** Days until the first secret expires. Omit it for a key that never expires. */
2574
- expiresInDays: z17.number().int().min(1).max(3650).optional()
2664
+ expiresInDays: z19.number().int().min(1).max(3650).optional()
2575
2665
  }).strict();
2576
- var serviceKeySchema = z17.object({
2577
- id: z17.string().uuid(),
2578
- organization: z17.string(),
2579
- project: z17.string(),
2666
+ var serviceKeySchema = z19.object({
2667
+ id: z19.string().uuid(),
2668
+ organization: z19.string(),
2669
+ project: z19.string(),
2580
2670
  environment: environmentSchema,
2581
- name: z17.string(),
2671
+ name: z19.string(),
2582
2672
  permissions: permissionListSchema,
2583
2673
  /** The Clerk user ID of the administrator who created it. */
2584
- createdBy: z17.string(),
2585
- createdAt: z17.number(),
2674
+ createdBy: z19.string(),
2675
+ createdAt: z19.number(),
2586
2676
  /** The latest use of any of its secrets, revoked ones included; null when none was used. */
2587
- lastUsedAt: z17.number().nullable(),
2677
+ lastUsedAt: z19.number().nullable(),
2588
2678
  /** Its working secrets, oldest first. Any of them authenticates the key. */
2589
- secrets: z17.array(credentialSecretSchema)
2679
+ secrets: z19.array(credentialSecretSchema)
2590
2680
  });
2591
2681
  var issuedServiceKeySchema = serviceKeySchema.extend({
2592
- secret: z17.string().uuid(),
2593
- token: z17.string()
2682
+ secret: z19.string().uuid(),
2683
+ token: z19.string()
2594
2684
  });
2595
- var teamSchema = z17.array(
2596
- z17.object({ id: z17.string(), label: z17.string() })
2685
+ var teamSchema = z19.array(
2686
+ z19.object({ id: z19.string(), label: z19.string() })
2597
2687
  );
2598
- var memberLookupSchema = z17.object({
2599
- provider: z17.string().min(1).max(200),
2600
- subject: z17.string().min(1).max(2048)
2688
+ var memberLookupSchema = z19.object({
2689
+ provider: z19.string().min(1).max(200),
2690
+ subject: z19.string().min(1).max(2048)
2601
2691
  }).strict();
2602
- var booleanQuery = z17.union([
2603
- z17.boolean(),
2604
- z17.enum(["true", "false"]).transform((v) => v === "true")
2692
+ var booleanQuery = z19.union([
2693
+ z19.boolean(),
2694
+ z19.enum(["true", "false"]).transform((v) => v === "true")
2605
2695
  ]);
2606
- var managedMemberQuerySchema = z17.strictObject({
2607
- q: z17.string().max(200).optional(),
2696
+ var managedMemberQuerySchema = z19.strictObject({
2697
+ q: z19.string().max(200).optional(),
2608
2698
  needsReview: booleanQuery.optional(),
2609
- limit: z17.coerce.number().int().min(1).max(100).optional(),
2699
+ limit: z19.coerce.number().int().min(1).max(100).optional(),
2610
2700
  cursor: pageCursorSchema.optional()
2611
2701
  });
2612
- var managedMemberPageSchema = z17.object({
2613
- items: z17.array(memberSchema),
2614
- total: z17.number().int().nonnegative(),
2615
- nextCursor: z17.string().nullable()
2702
+ var managedMemberPageSchema = z19.object({
2703
+ items: z19.array(memberSchema),
2704
+ total: z19.number().int().nonnegative(),
2705
+ nextCursor: z19.string().nullable()
2706
+ });
2707
+ var activeMemberMonthSchema = z19.object({
2708
+ /** `YYYY-MM`, in UTC. */
2709
+ month: z19.string(),
2710
+ activeMembers: z19.number().int().nonnegative()
2711
+ });
2712
+ var activeMemberUsageSchema = activeMemberMonthSchema.extend({
2713
+ plan: z19.string(),
2714
+ limit: z19.number().int().nonnegative().nullable(),
2715
+ history: z19.array(activeMemberMonthSchema)
2716
+ });
2717
+ var realPeopleInTestUsageSchema = z19.object({
2718
+ realPeople: z19.number().int().nonnegative(),
2719
+ plan: z19.string(),
2720
+ limit: z19.number().int().nonnegative(),
2721
+ enforced: z19.boolean()
2616
2722
  });
2617
2723
  var projectMetricsSchema = metricsSchema.extend({
2618
- completionsByQuest: z17.array(
2619
- z17.object({ quest: identifier, completions: z17.number() })
2724
+ completionsByQuest: z19.array(
2725
+ z19.object({ quest: identifier, completions: z19.number() })
2620
2726
  )
2621
2727
  });
2622
- var pageLimit = z17.coerce.number().int().min(1).max(100).optional();
2623
- var managedAttemptQuerySchema = z17.strictObject({
2624
- q: z17.string().max(200).optional(),
2728
+ var pageLimit = z19.coerce.number().int().min(1).max(100).optional();
2729
+ var managedAttemptQuerySchema = z19.strictObject({
2730
+ q: z19.string().max(200).optional(),
2625
2731
  quest: identifier.optional(),
2626
- status: z17.string().min(1).max(50).optional(),
2732
+ status: z19.string().min(1).max(50).optional(),
2627
2733
  limit: pageLimit,
2628
2734
  cursor: pageCursorSchema.optional()
2629
2735
  });
2630
- var managedAttemptPageSchema = z17.object({
2631
- items: z17.array(attemptSchema),
2632
- releases: z17.array(publishedReleaseSchema),
2633
- people: z17.array(personSchema),
2634
- total: z17.number().int().nonnegative(),
2635
- nextCursor: z17.string().nullable()
2736
+ var managedAttemptPageSchema = z19.object({
2737
+ items: z19.array(attemptSchema),
2738
+ releases: z19.array(publishedReleaseSchema),
2739
+ people: z19.array(personSchema),
2740
+ total: z19.number().int().nonnegative(),
2741
+ nextCursor: z19.string().nullable()
2636
2742
  });
2637
- var managedReleaseQuerySchema = z17.strictObject({
2743
+ var managedReleaseQuerySchema = z19.strictObject({
2638
2744
  quest: identifier.optional(),
2639
2745
  limit: pageLimit,
2640
2746
  cursor: pageCursorSchema.optional()
2641
2747
  });
2642
- var managedReleasePageSchema = z17.object({
2643
- items: z17.array(publishedReleaseSchema),
2644
- nextCursor: z17.string().nullable()
2748
+ var managedReleasePageSchema = z19.object({
2749
+ items: z19.array(publishedReleaseSchema),
2750
+ nextCursor: z19.string().nullable()
2645
2751
  });
2646
- var managedAttemptSchema = z17.object({
2752
+ var managedAttemptSchema = z19.object({
2647
2753
  attempt: attemptSchema,
2648
2754
  release: publishedReleaseSchema.nullable(),
2649
- events: z17.array(eventSchema),
2755
+ events: z19.array(eventSchema),
2650
2756
  person: personSchema
2651
2757
  });
2652
- var managedEntitlementQuerySchema = z17.strictObject({
2653
- q: z17.string().max(200).optional(),
2654
- status: z17.string().min(1).max(50).optional(),
2758
+ var managedEntitlementQuerySchema = z19.strictObject({
2759
+ q: z19.string().max(200).optional(),
2760
+ status: z19.string().min(1).max(50).optional(),
2655
2761
  limit: pageLimit,
2656
2762
  cursor: pageCursorSchema.optional()
2657
2763
  });
2658
- var managedEntitlementPageSchema = z17.object({
2659
- items: z17.array(entitlementSchema),
2660
- people: z17.array(personSchema),
2661
- total: z17.number().int().nonnegative(),
2662
- nextCursor: z17.string().nullable()
2764
+ var managedEntitlementPageSchema = z19.object({
2765
+ items: z19.array(entitlementSchema),
2766
+ people: z19.array(personSchema),
2767
+ total: z19.number().int().nonnegative(),
2768
+ nextCursor: z19.string().nullable()
2663
2769
  });
2664
- var managedEntitlementSchema = z17.object({
2770
+ var managedEntitlementSchema = z19.object({
2665
2771
  entitlement: entitlementSchema,
2666
2772
  person: personSchema
2667
2773
  });
2668
2774
  var managedStockItemSchema = inventorySchema.extend({
2669
- offers: z17.array(identifier)
2775
+ offers: z19.array(identifier)
2670
2776
  });
2671
- var auditQuerySchema = z17.strictObject({
2672
- category: z17.enum(["reviews", "rewards", "configuration"]).optional(),
2673
- q: z17.string().max(200).optional(),
2777
+ var auditQuerySchema = z19.strictObject({
2778
+ category: z19.enum(["reviews", "rewards", "configuration"]).optional(),
2779
+ q: z19.string().max(200).optional(),
2674
2780
  limit: pageLimit,
2675
2781
  cursor: pageCursorSchema.optional()
2676
2782
  });
2677
2783
  var auditListQuerySchema = auditQuerySchema.extend({
2678
- category: z17.enum(["reviews", "rewards", "configuration", "test-members"]).optional()
2784
+ category: z19.enum(["reviews", "rewards", "configuration", "test-members"]).optional()
2679
2785
  });
2680
2786
  var accessHistoryQuerySchema = auditQuerySchema.omit({
2681
2787
  category: true
2682
2788
  });
2683
- var auditPageSchema = z17.object({
2684
- items: z17.array(auditRecordSchema),
2685
- total: z17.number().int().nonnegative(),
2686
- nextCursor: z17.string().nullable()
2789
+ var auditPageSchema = z19.object({
2790
+ items: z19.array(auditRecordSchema),
2791
+ total: z19.number().int().nonnegative(),
2792
+ nextCursor: z19.string().nullable()
2687
2793
  });
2688
- var verifiedPassSchema = z17.object({
2794
+ var verifiedPassSchema = z19.object({
2689
2795
  provider: identifier,
2690
2796
  event: identifier,
2691
- subject: z17.string().min(1).max(2048),
2797
+ subject: z19.string().min(1).max(2048),
2692
2798
  member: identifier,
2693
2799
  quest: identifier
2694
2800
  }).strict();
@@ -2705,6 +2811,18 @@ function queryString(values) {
2705
2811
  ).toString();
2706
2812
  return query ? "?" + query : "";
2707
2813
  }
2814
+ function analyticsMetricQueryString(input) {
2815
+ const { filter, ...query } = analyticsMetricQuerySchema.parse(input);
2816
+ return queryString({
2817
+ ...query,
2818
+ ...Object.fromEntries(
2819
+ Object.entries(filter ?? {}).map(([name, keys]) => [
2820
+ `filter.${name}`,
2821
+ [].concat(keys).join(",")
2822
+ ])
2823
+ )
2824
+ });
2825
+ }
2708
2826
  function clientFailure(error) {
2709
2827
  if (error instanceof ManagementError) {
2710
2828
  return error;
@@ -2712,7 +2830,7 @@ function clientFailure(error) {
2712
2830
  return new ManagementError({
2713
2831
  kind: "client",
2714
2832
  code: ManagementErrorCode.InvalidInput,
2715
- message: error instanceof z17.ZodError ? `Invalid management request: ${z17.prettifyError(error)}` : error instanceof Error ? error.message : "Invalid management request",
2833
+ message: error instanceof z19.ZodError ? `Invalid management request: ${z19.prettifyError(error)}` : error instanceof Error ? error.message : "Invalid management request",
2716
2834
  cause: error
2717
2835
  });
2718
2836
  }
@@ -2750,7 +2868,7 @@ function managementClient(options) {
2750
2868
  call
2751
2869
  );
2752
2870
  }
2753
- const ok = z17.object({ ok: z17.literal(true) });
2871
+ const ok = z19.object({ ok: z19.literal(true) });
2754
2872
  function pointHistory(member, ledger, query = {}, call) {
2755
2873
  return get(
2756
2874
  `/points/${identifier.parse(member)}/${identifier.parse(ledger)}/history${queryString(typeof query === "number" ? { before: query } : pageQuerySchema.parse(query))}`,
@@ -2835,7 +2953,7 @@ function managementClient(options) {
2835
2953
  const input = isInput ? inputOrCall ?? {} : {};
2836
2954
  const options2 = isInput ? call : inputOrCall;
2837
2955
  return post(
2838
- `/webhooks/${z17.string().uuid().parse(id)}/rotate-secret`,
2956
+ `/webhooks/${z19.string().uuid().parse(id)}/rotate-secret`,
2839
2957
  webhookSecretSchema,
2840
2958
  webhookRotateInputSchema.parse(withActionId(input)),
2841
2959
  options2
@@ -2883,8 +3001,8 @@ function managementClient(options) {
2883
3001
  }
2884
3002
  return exchange(
2885
3003
  path,
2886
- z17.object({
2887
- status: z17.number(),
3004
+ z19.object({
3005
+ status: z19.number(),
2888
3006
  operationId: identifier.optional(),
2889
3007
  result: schema
2890
3008
  }),
@@ -2939,7 +3057,7 @@ function managementClient(options) {
2939
3057
  call
2940
3058
  ),
2941
3059
  ...resourceArchiveMethods("tracker"),
2942
- list: (call) => get("/trackers", z17.array(trackerStatusSchema), call),
3060
+ list: (call) => get("/trackers", z19.array(trackerStatusSchema), call),
2943
3061
  get: (reference, call) => get(
2944
3062
  `/trackers/${identifier.parse(reference)}`,
2945
3063
  trackerStatusSchema,
@@ -3055,7 +3173,7 @@ function managementClient(options) {
3055
3173
  engagementPublishSchema.parse(withActionId(input)),
3056
3174
  call
3057
3175
  ),
3058
- list: (call) => get("/engagement", z17.array(engagementRuleSchema), call),
3176
+ list: (call) => get("/engagement", z19.array(engagementRuleSchema), call),
3059
3177
  page: (input, call) => get(
3060
3178
  "/engagement/history" + queryString(engagementPageQuerySchema.parse(input)),
3061
3179
  engagementPageSchema,
@@ -3075,7 +3193,7 @@ function managementClient(options) {
3075
3193
  )
3076
3194
  },
3077
3195
  badges: {
3078
- list: (call) => get("/badges", z17.array(managedBadgeSchema), call),
3196
+ list: (call) => get("/badges", z19.array(managedBadgeSchema), call),
3079
3197
  create: (input, call) => create("/badges", managedBadgeSchema, createBadgeSchema, input, call),
3080
3198
  update: (badge, input, call) => {
3081
3199
  const body = badgePropertiesSchema.extend(badgeMutationSchema.shape).parse(withActionId(input));
@@ -3118,7 +3236,7 @@ function managementClient(options) {
3118
3236
  },
3119
3237
  pointLedgers: {
3120
3238
  unarchive: (ledger, input, call) => archiveResource("point-ledger", ledger, false, input, call),
3121
- list: (call) => get("/point-ledgers", z17.array(managedPointLedgerSchema), call),
3239
+ list: (call) => get("/point-ledgers", z19.array(managedPointLedgerSchema), call),
3122
3240
  /**
3123
3241
  * Creates a point ledger, with a stable `key` when code refers to it; requires `publish`. In
3124
3242
  * live, only a person in Console can create one.
@@ -3148,7 +3266,7 @@ function managementClient(options) {
3148
3266
  },
3149
3267
  points: {
3150
3268
  /** @deprecated Use `pointLedgers.list()`, which reads the same ledgers. Removed in 2.0.0. */
3151
- ledgers: (call) => get("/point-ledgers", z17.array(managedPointLedgerSchema), call),
3269
+ ledgers: (call) => get("/point-ledgers", z19.array(managedPointLedgerSchema), call),
3152
3270
  /** @deprecated Use `pointLedgers.create(input)`. Removed in 2.0.0. */
3153
3271
  createLedger: createPointLedger,
3154
3272
  /**
@@ -3186,7 +3304,7 @@ function managementClient(options) {
3186
3304
  referralHistorySchema,
3187
3305
  call
3188
3306
  ),
3189
- list: (call) => get("/referrals", z17.array(publishedReferralSchema), call),
3307
+ list: (call) => get("/referrals", z19.array(publishedReferralSchema), call),
3190
3308
  participants: referralParticipants,
3191
3309
  /**
3192
3310
  * Suspends or restores a member's referral relationship, with a reason; requires `publish`.
@@ -3249,7 +3367,7 @@ function managementClient(options) {
3249
3367
  },
3250
3368
  leaderboards: {
3251
3369
  ...resourceArchiveMethods("leaderboard"),
3252
- list: (call) => get("/leaderboards", z17.array(publishedLeaderboardSchema), call),
3370
+ list: (call) => get("/leaderboards", z19.array(publishedLeaderboardSchema), call),
3253
3371
  standings: (board, input = {}, call) => {
3254
3372
  const query = leaderboardQuerySchema.parse(input);
3255
3373
  return get(
@@ -3263,13 +3381,13 @@ function managementClient(options) {
3263
3381
  },
3264
3382
  history: (board, call) => get(
3265
3383
  `/leaderboards/${identifier.parse(board)}/history`,
3266
- z17.array(publishedLeaderboardSchema),
3384
+ z19.array(publishedLeaderboardSchema),
3267
3385
  call
3268
3386
  ),
3269
3387
  /** Current members of the board's exclusion group (`exclusionGroup`), by member ID. */
3270
3388
  exclusions: (board, call) => get(
3271
3389
  `/leaderboards/${identifier.parse(board)}/exclusions`,
3272
- z17.array(z17.object({ member: identifier })),
3390
+ z19.array(z19.object({ member: identifier })),
3273
3391
  call
3274
3392
  ),
3275
3393
  /**
@@ -3315,7 +3433,7 @@ function managementClient(options) {
3315
3433
  leaderboardGroupSchema.parse(withActionId(input)),
3316
3434
  call
3317
3435
  ),
3318
- /** Pending, approved and rejected snapshots; requires read permission. */
3436
+ /** Closing, pending, approved and rejected snapshots; requires read permission. */
3319
3437
  settlementReviews: (reference, query = {}, call) => get(
3320
3438
  `/leaderboards/${identifier.parse(reference)}/settlement-reviews${queryString(leaderboardSettlementReviewQuerySchema.parse(query))}`,
3321
3439
  leaderboardSettlementReviewPageSchema,
@@ -3326,15 +3444,37 @@ function managementClient(options) {
3326
3444
  leaderboardSettlementReviewSchema,
3327
3445
  call
3328
3446
  ),
3447
+ /**
3448
+ * A settlement as a payout list: each frozen row's pool share, in base units and formatted,
3449
+ * with the member's verified linked wallets. Requires read permission.
3450
+ */
3451
+ settlementExport: (settlement, call) => get(
3452
+ `/leaderboard-settlements/${identifier.parse(settlement)}/export`,
3453
+ leaderboardSettlementExportSchema,
3454
+ call
3455
+ ),
3329
3456
  rejectSettlement: (settlement, input, call) => post(
3330
3457
  `/leaderboard-settlements/${identifier.parse(settlement)}/reject`,
3331
3458
  leaderboardSettlementReviewSchema,
3332
3459
  leaderboardSettlementRejectionSchema.parse(withActionId(input)),
3333
3460
  call
3334
3461
  ),
3462
+ /**
3463
+ * Takes the closing measurement again for the content a settlement froze without it (its
3464
+ * `unmeasured` list), or extends a closing settlement's wait. The settlement returns to
3465
+ * closing and freezes again when the measurement ends. Requires review permission.
3466
+ */
3467
+ retrySettlementMeasurement: (settlement, input = {}, call) => post(
3468
+ `/leaderboard-settlements/${identifier.parse(settlement)}/retry-measurement`,
3469
+ leaderboardSettlementReviewSchema,
3470
+ leaderboardSettlementMeasurementRetrySchema.parse(
3471
+ withActionId(input)
3472
+ ),
3473
+ call
3474
+ ),
3335
3475
  settlements: (board, call) => get(
3336
3476
  `/leaderboards/${identifier.parse(board)}/settlements`,
3337
- z17.array(leaderboardSettlementSummarySchema),
3477
+ z19.array(leaderboardSettlementSummarySchema),
3338
3478
  call
3339
3479
  ),
3340
3480
  settlement: (settlement, call) => get(
@@ -3419,7 +3559,7 @@ function managementClient(options) {
3419
3559
  *
3420
3560
  * @deprecated Use `history`, which pages by `cursor` and `nextCursor`. Removed in 2.0.0.
3421
3561
  */
3422
- list: (call) => get("/deployments", z17.array(deploymentRecordSchema), call),
3562
+ list: (call) => get("/deployments", z19.array(deploymentRecordSchema), call),
3423
3563
  /**
3424
3564
  * The project environment's deployments, newest first, one page at a time, with the two
3425
3565
  * newest published deployments beside every page. Pass a page's `nextCursor` back as
@@ -3554,6 +3694,78 @@ function managementClient(options) {
3554
3694
  call
3555
3695
  )
3556
3696
  },
3697
+ /**
3698
+ * The project's Stripe subscription, Checkout, plan changes and the organization's customer
3699
+ * portal. Everything but `read` needs an organization administrator, and while billing is
3700
+ * staff-only, Domino staff.
3701
+ */
3702
+ billing: {
3703
+ /** Whether billing is open to the caller, and the project's subscription when it is. */
3704
+ read: (call) => get("/billing", projectBillingSchema, call),
3705
+ /**
3706
+ * A Stripe Checkout page subscribing the project to `plan`, billed every `interval`. A project
3707
+ * with a subscription that still holds its plan is refused with `subscription-exists`.
3708
+ */
3709
+ checkout: (input, call) => post(
3710
+ "/billing/checkout",
3711
+ billingSessionSchema,
3712
+ billingCheckoutInputSchema.parse(input),
3713
+ call
3714
+ ),
3715
+ /**
3716
+ * Moves the project's subscription to `plan`, billed every `interval`: a higher plan or annual
3717
+ * billing now, prorated; a lower plan or monthly billing at the renewal. Refused without a
3718
+ * subscription that holds its plan (`no-subscription`) and while it is set to cancel
3719
+ * (`subscription-canceling`).
3720
+ */
3721
+ changePlan: (input, call) => post(
3722
+ "/billing/plan",
3723
+ billingPlanChangeSchema,
3724
+ billingPlanChangeInputSchema.parse(input),
3725
+ call
3726
+ ),
3727
+ /**
3728
+ * Sets the subscription to end when the period paid for ends; the project keeps its plan
3729
+ * until then. Drops a plan change held for the renewal.
3730
+ */
3731
+ cancel: (call) => post("/billing/cancel", projectBillingSchema, {}, call),
3732
+ /** Takes back a cancellation before the period ends. */
3733
+ resume: (call) => post("/billing/resume", projectBillingSchema, {}, call),
3734
+ /**
3735
+ * A Stripe Checkout page buying `quantity` packs of AI builder credit for the project, on any
3736
+ * plan; the credit is added once the payment is in.
3737
+ */
3738
+ topup: (input, call) => post(
3739
+ "/billing/topup",
3740
+ billingSessionSchema,
3741
+ billingTopupInputSchema.parse(input),
3742
+ call
3743
+ ),
3744
+ /** The Stripe customer portal for the organization's cards, invoices and billing details. */
3745
+ portal: (call) => post("/billing/portal", billingSessionSchema, {}, call),
3746
+ /**
3747
+ * The organization's billing for any of its members: each project's plan and subscription,
3748
+ * the Free projects against their limit, the shared free AI allowance and the trial.
3749
+ */
3750
+ organization: (call) => get("/organization/billing", organizationBillingSchema, call),
3751
+ /**
3752
+ * The customer portal, as `portal()` opens it, returning to the organization's billing page in
3753
+ * Console rather than a project's.
3754
+ */
3755
+ organizationPortal: (call) => post("/organization/billing/portal", billingSessionSchema, {}, call)
3756
+ },
3757
+ /** What the project uses against its plan; requires `read` permission. */
3758
+ usage: {
3759
+ /** Live active members this UTC month, the plan's limit, and the previous six months. */
3760
+ activeMembers: (call) => get("/usage/active-members", activeMemberUsageSchema, call),
3761
+ /** Real people in the test environment, against the plan's limit. */
3762
+ realPeopleInTest: (call) => get("/usage/real-people-in-test", realPeopleInTestUsageSchema, call),
3763
+ /**
3764
+ * The project's plan and where it came from, whether it may serve live, the organization's
3765
+ * trial, the AI builder balance and the Stripe subscription.
3766
+ */
3767
+ plan: (call) => get("/usage/plan", projectPlanSchema, call)
3768
+ },
3557
3769
  /** The project's headline counts; requires `read` permission. */
3558
3770
  metrics: {
3559
3771
  read: (call) => get("/metrics", projectMetricsSchema, call)
@@ -3570,6 +3782,74 @@ function managementClient(options) {
3570
3782
  `/analytics${queryString(analyticsQuerySchema.parse(query))}`,
3571
3783
  analyticsReadSchema,
3572
3784
  call
3785
+ ),
3786
+ /**
3787
+ * The closed metric catalog: every metric's ID, definition, breakdowns, filters, allowed
3788
+ * charts and whether it needs a point ledger. Requires `read` permission.
3789
+ */
3790
+ catalog: (call) => get("/analytics/catalog", analyticsCatalogSchema, call),
3791
+ /**
3792
+ * One catalog metric over a range, bucketed like `read`: its value and, with `breakdown`, a
3793
+ * row per quest, offer, program, source or reason, largest first, capped by `limit` (1 to
3794
+ * 100, default 100) with the rest summed into `other`. `filter` narrows to keys
3795
+ * (`{ quest: ["a", "b"], group: "vip" }`), and `ledger` names the point ledger a points
3796
+ * metric reads. A metric, breakdown or filter the catalog doesn't accept is a 422. Requires
3797
+ * `read` permission.
3798
+ */
3799
+ query: (query, call) => get(
3800
+ `/analytics/query${analyticsMetricQueryString(query)}`,
3801
+ analyticsMetricResultSchema,
3802
+ call
3803
+ )
3804
+ },
3805
+ /**
3806
+ * Dashboards defined in project code (`defineDashboard`), each a set of catalog metric
3807
+ * panels. They are deployed in test and promoted to live, and archived rather than deleted.
3808
+ */
3809
+ dashboards: {
3810
+ /**
3811
+ * The project's dashboards by position (those without one last), then title. Archived
3812
+ * dashboards are left out unless `includeArchived`. Requires `read` permission.
3813
+ */
3814
+ list: (query = {}, call) => {
3815
+ dashboardListQuerySchema.parse(query);
3816
+ return get(
3817
+ `/dashboards${queryString(query)}`,
3818
+ dashboardListSchema,
3819
+ call
3820
+ );
3821
+ },
3822
+ /**
3823
+ * One dashboard, archived ones included, with every panel's result over `range` (the
3824
+ * dashboard's `defaultRange` by default) in one response. A panel whose query fails, such as
3825
+ * on a group this environment lacks or a timeout, carries its own coded `error` and the
3826
+ * other panels still have results. Requires `read` permission.
3827
+ */
3828
+ read: (query, call) => {
3829
+ const { key, ...rest } = dashboardReadQuerySchema.parse(query);
3830
+ return get(
3831
+ `/dashboards/${key}${queryString(rest)}`,
3832
+ dashboardReadSchema,
3833
+ call
3834
+ );
3835
+ },
3836
+ /**
3837
+ * Archive a dashboard in test, with a reason the audit log records: it leaves `list` unless
3838
+ * `includeArchived`, stays readable, and stays archived when its code deploys again. Live
3839
+ * gets the change through a promotion. Requires `publish` permission.
3840
+ */
3841
+ archive: (key, input, call) => post(
3842
+ `/dashboards/${identifier.parse(key)}/archive`,
3843
+ dashboardLifecycleResultSchema,
3844
+ resourceArchiveInputSchema.parse(withActionId(input)),
3845
+ call
3846
+ ),
3847
+ /** Restore an archived dashboard in test. Requires `publish` permission. */
3848
+ unarchive: (key, input, call) => post(
3849
+ `/dashboards/${identifier.parse(key)}/unarchive`,
3850
+ dashboardLifecycleResultSchema,
3851
+ resourceArchiveInputSchema.parse(withActionId(input)),
3852
+ call
3573
3853
  )
3574
3854
  },
3575
3855
  /** Release history: every version a quest has been published as. */
@@ -3774,7 +4054,7 @@ function managementClient(options) {
3774
4054
  },
3775
4055
  operations: {
3776
4056
  /** Every paused or resumed operation: redemptions and each quest's participation; requires `read`. */
3777
- list: (call) => get("/operations", z17.array(operationSchema), call),
4057
+ list: (call) => get("/operations", z19.array(operationSchema), call),
3778
4058
  /**
3779
4059
  * Pauses or resumes redemptions or one quest's participation, against the `revision` the
3780
4060
  * operator saw, with a reason; requires `publish` permission.
@@ -3832,7 +4112,7 @@ function managementClient(options) {
3832
4112
  call
3833
4113
  ),
3834
4114
  /** Every stock item with its counts and the offers that sell it; requires `read` permission. */
3835
- list: (call) => get("/stock-items", z17.array(managedStockItemSchema), call),
4115
+ list: (call) => get("/stock-items", z19.array(managedStockItemSchema), call),
3836
4116
  createItem: (input, call) => create(
3837
4117
  "/stock-items",
3838
4118
  stockItemSchema,
@@ -3847,7 +4127,7 @@ function managementClient(options) {
3847
4127
  stockInputSchema.parse(withActionId(input)),
3848
4128
  call
3849
4129
  ),
3850
- catalog: (call) => get("/pickup-inventory", z17.array(pickupCatalogSchema), call),
4130
+ catalog: (call) => get("/pickup-inventory", z19.array(pickupCatalogSchema), call),
3851
4131
  configure: (input, call) => post(
3852
4132
  "/pickup-inventory",
3853
4133
  pickupCatalogSchema,
@@ -3873,7 +4153,7 @@ function managementClient(options) {
3873
4153
  offerControlSchema.omit({ enabled: true }).parse(withActionId(input)),
3874
4154
  call
3875
4155
  ),
3876
- list: (call) => get("/offers", z17.array(offerSchema), call),
4156
+ list: (call) => get("/offers", z19.array(offerSchema), call),
3877
4157
  /**
3878
4158
  * Every redemption, or one member's, newest first, in one unbounded response.
3879
4159
  *
@@ -3881,7 +4161,7 @@ function managementClient(options) {
3881
4161
  */
3882
4162
  redemptions: (input = {}, call) => get(
3883
4163
  `/redemptions${queryString({ member: input.member })}`,
3884
- z17.array(redemptionSchema),
4164
+ z19.array(redemptionSchema),
3885
4165
  call
3886
4166
  ),
3887
4167
  /** Pauses or resumes an offer at the revision the operator saw. */
@@ -3930,7 +4210,7 @@ function managementClient(options) {
3930
4210
  * them; API keys and project-scoped playground sessions cannot.
3931
4211
  */
3932
4212
  tokens: {
3933
- list: (call) => get("/tokens", z17.array(tokenSchema), call),
4213
+ list: (call) => get("/tokens", z19.array(tokenSchema), call),
3934
4214
  /**
3935
4215
  * Issues a key for one project and environment, limited to permissions the caller holds
3936
4216
  * there. The secret `token` is in this response only.
@@ -3938,14 +4218,14 @@ function managementClient(options) {
3938
4218
  create: (input, call) => post("/tokens", issuedTokenSchema, tokenInputSchema.parse(input), call),
3939
4219
  /** Replace a personal key's ingestion restriction without changing its secret. */
3940
4220
  scope: (id, input, call) => request(
3941
- `/tokens/${encodeURIComponent(z17.string().min(1).parse(id))}/scope`,
4221
+ `/tokens/${encodeURIComponent(z19.string().min(1).parse(id))}/scope`,
3942
4222
  tokenSchema,
3943
4223
  tokenScopeInputSchema.parse(input),
3944
4224
  "PUT",
3945
4225
  call
3946
4226
  ),
3947
4227
  revoke: (id, call) => request(
3948
- `/tokens/${encodeURIComponent(z17.string().min(1).parse(id))}`,
4228
+ `/tokens/${encodeURIComponent(z19.string().min(1).parse(id))}`,
3949
4229
  ok,
3950
4230
  void 0,
3951
4231
  "DELETE",
@@ -3957,7 +4237,7 @@ function managementClient(options) {
3957
4237
  * environment, owned by no person. Only an organization administrator in Console manages them.
3958
4238
  */
3959
4239
  serviceKeys: {
3960
- list: (call) => get("/service-keys", z17.array(serviceKeySchema), call),
4240
+ list: (call) => get("/service-keys", z19.array(serviceKeySchema), call),
3961
4241
  /** The secret `token` is in this response only. */
3962
4242
  create: (input, call) => post(
3963
4243
  "/service-keys",
@@ -3970,14 +4250,14 @@ function managementClient(options) {
3970
4250
  * them with `revokeSecret`. The new `token` is in this response only.
3971
4251
  */
3972
4252
  addSecret: (id, input = {}, call) => post(
3973
- `/service-keys/${z17.string().uuid().parse(id)}/secrets`,
4253
+ `/service-keys/${z19.string().uuid().parse(id)}/secrets`,
3974
4254
  issuedServiceKeySchema,
3975
4255
  credentialSecretInputSchema.parse(input),
3976
4256
  call
3977
4257
  ),
3978
4258
  /** Stops one secret working. A key's last secret cannot be revoked; revoke the key instead. */
3979
4259
  revokeSecret: (id, secret, call) => request(
3980
- `/service-keys/${z17.string().uuid().parse(id)}/secrets/${z17.string().uuid().parse(secret)}`,
4260
+ `/service-keys/${z19.string().uuid().parse(id)}/secrets/${z19.string().uuid().parse(secret)}`,
3981
4261
  serviceKeySchema,
3982
4262
  void 0,
3983
4263
  "DELETE",
@@ -3985,8 +4265,8 @@ function managementClient(options) {
3985
4265
  ),
3986
4266
  /** Deletes the key; every secret stops working. */
3987
4267
  revoke: (id, call) => request(
3988
- `/service-keys/${z17.string().uuid().parse(id)}`,
3989
- z17.null(),
4268
+ `/service-keys/${z19.string().uuid().parse(id)}`,
4269
+ z19.null(),
3990
4270
  void 0,
3991
4271
  "DELETE",
3992
4272
  call
@@ -3994,7 +4274,7 @@ function managementClient(options) {
3994
4274
  },
3995
4275
  /** Who holds which roles on the client's project; organization administrators only. */
3996
4276
  grants: {
3997
- list: (call) => get("/grants", z17.array(grantRecordSchema), call),
4277
+ list: (call) => get("/grants", z19.array(grantRecordSchema), call),
3998
4278
  /** Replaces one person's roles and environments on the project. The audit log records it. */
3999
4279
  set: (input, call) => request(
4000
4280
  "/grants",
@@ -4011,7 +4291,7 @@ function managementClient(options) {
4011
4291
  /** Signed activity notifications for one project/environment; writes require publish permission. */
4012
4292
  webhooks: {
4013
4293
  state: (id, call) => get(
4014
- `/webhooks/${z17.string().uuid().parse(id)}/state`,
4294
+ `/webhooks/${z19.string().uuid().parse(id)}/state`,
4015
4295
  webhookEndpointStateSchema,
4016
4296
  call
4017
4297
  ),
@@ -4022,24 +4302,24 @@ function managementClient(options) {
4022
4302
  call
4023
4303
  ),
4024
4304
  delete: (id, input, call) => post(
4025
- `/webhooks/${z17.string().uuid().parse(id)}/delete`,
4305
+ `/webhooks/${z19.string().uuid().parse(id)}/delete`,
4026
4306
  webhookEndpointStateSchema,
4027
4307
  webhookDeleteInputSchema.parse(withActionId(input)),
4028
4308
  call
4029
4309
  ),
4030
4310
  pause: (id, input = {}, call) => post(
4031
- `/webhooks/${z17.string().uuid().parse(id)}/pause`,
4311
+ `/webhooks/${z19.string().uuid().parse(id)}/pause`,
4032
4312
  webhookEndpointSchema,
4033
4313
  webhookControlInputSchema.parse(withActionId(input)),
4034
4314
  call
4035
4315
  ),
4036
4316
  resume: (id, input = {}, call) => post(
4037
- `/webhooks/${z17.string().uuid().parse(id)}/resume`,
4317
+ `/webhooks/${z19.string().uuid().parse(id)}/resume`,
4038
4318
  webhookEndpointSchema,
4039
4319
  webhookControlInputSchema.parse(withActionId(input)),
4040
4320
  call
4041
4321
  ),
4042
- list: (call) => get("/webhooks", z17.array(webhookEndpointSchema), call),
4322
+ list: (call) => get("/webhooks", z19.array(webhookEndpointSchema), call),
4043
4323
  /** Pass an `actionId` to recover the endpoint and its secret after a lost answer. */
4044
4324
  create: (input, call) => post(
4045
4325
  "/webhooks",
@@ -4048,7 +4328,7 @@ function managementClient(options) {
4048
4328
  call
4049
4329
  ),
4050
4330
  update: (id, input, call) => request(
4051
- `/webhooks/${z17.string().uuid().parse(id)}`,
4331
+ `/webhooks/${z19.string().uuid().parse(id)}`,
4052
4332
  webhookEndpointSchema,
4053
4333
  webhookUpdateSchema.parse(input),
4054
4334
  "PUT",
@@ -4056,19 +4336,19 @@ function managementClient(options) {
4056
4336
  ),
4057
4337
  /** @deprecated Use pause. Removed in 2.0.0. */
4058
4338
  disable: (id, call) => post(
4059
- `/webhooks/${z17.string().uuid().parse(id)}/disable`,
4339
+ `/webhooks/${z19.string().uuid().parse(id)}/disable`,
4060
4340
  webhookEndpointSchema,
4061
4341
  {},
4062
4342
  call
4063
4343
  ),
4064
4344
  rotateSecret: rotateWebhookSecret,
4065
4345
  deliveries: (id, query = {}, call) => get(
4066
- `/webhooks/${z17.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
4346
+ `/webhooks/${z19.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
4067
4347
  webhookDeliveryPageSchema,
4068
4348
  call
4069
4349
  ),
4070
4350
  replay: (id, delivery, call) => post(
4071
- `/webhooks/${z17.string().uuid().parse(id)}/deliveries/${z17.string().uuid().parse(delivery)}/replay`,
4351
+ `/webhooks/${z19.string().uuid().parse(id)}/deliveries/${z19.string().uuid().parse(delivery)}/replay`,
4072
4352
  webhookDeliverySchema,
4073
4353
  {},
4074
4354
  call
@@ -4079,7 +4359,7 @@ function managementClient(options) {
4079
4359
  * environment. Organization administrators, from a Console session only.
4080
4360
  */
4081
4361
  identityIntegrations: {
4082
- list: (call) => get("/identity-integrations", z17.array(identityIntegrationSchema), call),
4362
+ list: (call) => get("/identity-integrations", z19.array(identityIntegrationSchema), call),
4083
4363
  /** The secret `token` is in this response only. */
4084
4364
  create: (input, call) => post(
4085
4365
  "/identity-integrations",
@@ -4094,7 +4374,7 @@ function managementClient(options) {
4094
4374
  * @deprecated Use `addSecret`, then `revokeSecret` the old secret once your app uses the new one.
4095
4375
  */
4096
4376
  rotate: (id, call) => post(
4097
- `/identity-integrations/${z17.string().uuid().parse(id)}/rotate`,
4377
+ `/identity-integrations/${z19.string().uuid().parse(id)}/rotate`,
4098
4378
  identityIntegrationSecretSchema,
4099
4379
  {},
4100
4380
  call
@@ -4104,7 +4384,7 @@ function managementClient(options) {
4104
4384
  * revoke them with `revokeSecret`. The new `token` is in this response only.
4105
4385
  */
4106
4386
  addSecret: (id, input = {}, call) => post(
4107
- `/identity-integrations/${z17.string().uuid().parse(id)}/secrets`,
4387
+ `/identity-integrations/${z19.string().uuid().parse(id)}/secrets`,
4108
4388
  identityIntegrationSecretSchema,
4109
4389
  credentialSecretInputSchema.parse(input),
4110
4390
  call
@@ -4114,7 +4394,7 @@ function managementClient(options) {
4114
4394
  * revoked; disconnect the integration with `revoke` instead.
4115
4395
  */
4116
4396
  revokeSecret: (id, secret, call) => request(
4117
- `/identity-integrations/${z17.string().uuid().parse(id)}/secrets/${z17.string().uuid().parse(secret)}`,
4397
+ `/identity-integrations/${z19.string().uuid().parse(id)}/secrets/${z19.string().uuid().parse(secret)}`,
4118
4398
  identityIntegrationSchema,
4119
4399
  void 0,
4120
4400
  "DELETE",
@@ -4122,7 +4402,7 @@ function managementClient(options) {
4122
4402
  ),
4123
4403
  /** Makes one secret never expire. */
4124
4404
  removeSecretExpiry: (id, secret, call) => request(
4125
- `/identity-integrations/${z17.string().uuid().parse(id)}/secrets/${z17.string().uuid().parse(secret)}/expiry`,
4405
+ `/identity-integrations/${z19.string().uuid().parse(id)}/secrets/${z19.string().uuid().parse(secret)}/expiry`,
4126
4406
  identityIntegrationSchema,
4127
4407
  void 0,
4128
4408
  "DELETE",
@@ -4135,7 +4415,7 @@ function managementClient(options) {
4135
4415
  */
4136
4416
  kinds: (call) => get(
4137
4417
  "/identity-integrations/kinds",
4138
- z17.array(identityKindClaimSchema),
4418
+ z19.array(identityKindClaimSchema),
4139
4419
  call
4140
4420
  ),
4141
4421
  /**
@@ -4143,8 +4423,8 @@ function managementClient(options) {
4143
4423
  * and keep attributing tracker records; unlink them on the member to stop that.
4144
4424
  */
4145
4425
  revoke: (id, call) => request(
4146
- `/identity-integrations/${z17.string().uuid().parse(id)}`,
4147
- z17.null(),
4426
+ `/identity-integrations/${z19.string().uuid().parse(id)}`,
4427
+ z19.null(),
4148
4428
  void 0,
4149
4429
  "DELETE",
4150
4430
  call
@@ -4195,7 +4475,7 @@ function managementClient(options) {
4195
4475
  resources: {
4196
4476
  list: (call) => get(
4197
4477
  "/resources",
4198
- z17.object({ resources: z17.array(managedResourceSchema) }),
4478
+ z19.object({ resources: z19.array(managedResourceSchema) }),
4199
4479
  call
4200
4480
  ),
4201
4481
  /** @deprecated Use the resource archive/unarchive methods. Removed in 2.0.0. */
@@ -4266,7 +4546,7 @@ function managementClient(options) {
4266
4546
  testMemberCreateSchema.parse(withActionId(input)),
4267
4547
  call
4268
4548
  ),
4269
- list: (call) => get("/test-members", z17.array(testMemberSchema), call),
4549
+ list: (call) => get("/test-members", z19.array(testMemberSchema), call),
4270
4550
  history: (member, query = {}, call) => get(
4271
4551
  `/test-members/${identifier.parse(member)}/history${queryString(testMemberHistoryQuerySchema.parse(query))}`,
4272
4552
  testMemberHistorySchema,
@@ -4502,13 +4782,13 @@ function managementClient(options) {
4502
4782
  )
4503
4783
  },
4504
4784
  counters: {
4505
- history: (member, quest2, query = {}, call) => get(
4506
- `/members/${identifier.parse(member)}/counters/${identifier.parse(quest2)}${queryString(counterHistoryQuerySchema.parse(query))}`,
4785
+ history: (member, quest, query = {}, call) => get(
4786
+ `/members/${identifier.parse(member)}/counters/${identifier.parse(quest)}${queryString(counterHistoryQuerySchema.parse(query))}`,
4507
4787
  counterHistorySchema,
4508
4788
  call
4509
4789
  ),
4510
- moderate: (member, quest2, contribution, input, call) => post(
4511
- `/members/${identifier.parse(member)}/counters/${identifier.parse(quest2)}/${identifier.parse(contribution)}/moderate`,
4790
+ moderate: (member, quest, contribution, input, call) => post(
4791
+ `/members/${identifier.parse(member)}/counters/${identifier.parse(quest)}/${identifier.parse(contribution)}/moderate`,
4512
4792
  counterModerationResultSchema,
4513
4793
  counterModerationSchema.parse(withActionId(input)),
4514
4794
  call
@@ -4550,7 +4830,7 @@ function managementClient(options) {
4550
4830
  /** Who each member is: up to 100 distinct IDs; unknown IDs come back without accounts. */
4551
4831
  people: (members, call) => get(
4552
4832
  `/people${queryString({ ids: members.join(",") })}`,
4553
- z17.array(personSchema),
4833
+ z19.array(personSchema),
4554
4834
  call
4555
4835
  ),
4556
4836
  /**
@@ -4560,7 +4840,7 @@ function managementClient(options) {
4560
4840
  */
4561
4841
  oauthAccounts: (member, call) => get(
4562
4842
  `/members/${encodeURIComponent(member)}/oauth-accounts`,
4563
- z17.array(managedOAuthAccountSchema),
4843
+ z19.array(managedOAuthAccountSchema),
4564
4844
  call
4565
4845
  ),
4566
4846
  /**
@@ -4570,7 +4850,7 @@ function managementClient(options) {
4570
4850
  */
4571
4851
  unlinkOAuthAccount: (member, input, call) => post(
4572
4852
  `/members/${encodeURIComponent(member)}/oauth-accounts/unlink`,
4573
- z17.array(managedOAuthAccountSchema),
4853
+ z19.array(managedOAuthAccountSchema),
4574
4854
  memberOAuthUnlinkInputSchema.parse(input),
4575
4855
  call
4576
4856
  ),
@@ -4596,6 +4876,27 @@ function managementClient(options) {
4596
4876
  memberTelegramUnlinkInputSchema.parse(input),
4597
4877
  call
4598
4878
  ),
4879
+ /**
4880
+ * The member's linked creator accounts, such as a YouTube channel; requires `read`
4881
+ * permission. Creator accounts are not identity states in SDK 1.x, so they have this read
4882
+ * and `unlinkCreatorAccount` of their own.
4883
+ */
4884
+ creatorAccounts: (member, call) => get(
4885
+ `/members/${identifier.parse(member)}/creator-accounts`,
4886
+ managedCreatorAccountsSchema,
4887
+ call
4888
+ ),
4889
+ /**
4890
+ * Unlinks the member's reviewed creator account in this project and environment; requires
4891
+ * `review` permission. Relay stops reading it; records it authored stay, and the account
4892
+ * stays bound to the member.
4893
+ */
4894
+ unlinkCreatorAccount: (member, input, call) => post(
4895
+ `/members/${identifier.parse(member)}/creator-accounts/unlink`,
4896
+ managedCreatorAccountsSchema,
4897
+ memberCreatorAccountUnlinkInputSchema.parse(input),
4898
+ call
4899
+ ),
4599
4900
  /**
4600
4901
  * Unlinks a member's wallet from the project with a reason; requires `review` permission. The address stays bound to the member.
4601
4902
  *
@@ -4603,7 +4904,7 @@ function managementClient(options) {
4603
4904
  */
4604
4905
  unlinkWallet: (member, input, call) => post(
4605
4906
  `/members/${encodeURIComponent(member)}/wallets/unlink`,
4606
- z17.array(managedWalletSchema),
4907
+ z19.array(managedWalletSchema),
4607
4908
  memberWalletUnlinkInputSchema.parse(input),
4608
4909
  call
4609
4910
  ),
@@ -4616,7 +4917,7 @@ function managementClient(options) {
4616
4917
  */
4617
4918
  unlinkIdentity: (member, input, call) => post(
4618
4919
  `/members/${encodeURIComponent(member)}/identities/unlink`,
4619
- z17.array(managedMemberIdentitySchema),
4920
+ z19.array(managedMemberIdentitySchema),
4620
4921
  memberIdentityChangeInputSchema.parse(input),
4621
4922
  call
4622
4923
  ),
@@ -4627,7 +4928,7 @@ function managementClient(options) {
4627
4928
  */
4628
4929
  relinkIdentity: (member, input, call) => post(
4629
4930
  `/members/${encodeURIComponent(member)}/identities/relink`,
4630
- z17.array(managedMemberIdentitySchema),
4931
+ z19.array(managedMemberIdentitySchema),
4631
4932
  memberIdentityChangeInputSchema.parse(input),
4632
4933
  call
4633
4934
  ),
@@ -4639,7 +4940,7 @@ function managementClient(options) {
4639
4940
  */
4640
4941
  setWalletSignIn: (member, input, call) => post(
4641
4942
  `/members/${encodeURIComponent(member)}/wallets/sign-in`,
4642
- z17.array(managedWalletSchema),
4943
+ z19.array(managedWalletSchema),
4643
4944
  memberWalletSignInInputSchema.parse(input),
4644
4945
  call
4645
4946
  )
@@ -4763,7 +5064,7 @@ function managementClient(options) {
4763
5064
  `/storage/sql/${appSecretNameSchema.parse(name)}/cell?${new URLSearchParams(
4764
5065
  {
4765
5066
  table,
4766
- row: String(z17.number().int().min(0).parse(options2.row)),
5067
+ row: String(z19.number().int().min(0).parse(options2.row)),
4767
5068
  column: options2.column,
4768
5069
  ...options2.cursor === void 0 ? {} : { cursor: pageCursorSchema.parse(options2.cursor) }
4769
5070
  }
@@ -4869,13 +5170,13 @@ function managementClient(options) {
4869
5170
  )
4870
5171
  },
4871
5172
  quests: {
4872
- pause: (quest2, input, call) => operationVerb(`quest:${identifier.parse(quest2)}`, true, input, call),
4873
- resume: (quest2, input, call) => operationVerb(`quest:${identifier.parse(quest2)}`, false, input, call),
5173
+ pause: (quest, input, call) => operationVerb(`quest:${identifier.parse(quest)}`, true, input, call),
5174
+ resume: (quest, input, call) => operationVerb(`quest:${identifier.parse(quest)}`, false, input, call),
4874
5175
  /**
4875
5176
  * Each quest's current release, the most recently published first, archived quests
4876
5177
  * included; requires `read` permission.
4877
5178
  */
4878
- list: (call) => get("/quests/list", z17.array(publishedReleaseSchema), call),
5179
+ list: (call) => get("/quests/list", z19.array(publishedReleaseSchema), call),
4879
5180
  /** Pending and exhausted asynchronous balance checks. Requires read. */
4880
5181
  automaticScheduling: (query = {}, call) => get(
4881
5182
  `/quests/automatic-scheduling${queryString(automaticSchedulingQuerySchema.parse(query))}`,
@@ -4920,7 +5221,7 @@ function managementClient(options) {
4920
5221
  */
4921
5222
  submissions: (member, call) => get(
4922
5223
  `/members/${encodeURIComponent(member)}/quest-submissions`,
4923
- z17.object({ items: z17.array(questSubmissionSchema) }),
5224
+ z19.object({ items: z19.array(questSubmissionSchema) }),
4924
5225
  call
4925
5226
  ),
4926
5227
  /**
@@ -4933,8 +5234,8 @@ function managementClient(options) {
4933
5234
  {},
4934
5235
  call
4935
5236
  ),
4936
- withdraw: (quest2, member, input, call) => post(
4937
- `/quests/${encodeURIComponent(quest2)}/enrollments/${encodeURIComponent(member)}/withdraw`,
5237
+ withdraw: (quest, member, input, call) => post(
5238
+ `/quests/${encodeURIComponent(quest)}/enrollments/${encodeURIComponent(member)}/withdraw`,
4938
5239
  questEnrollmentStateSchema,
4939
5240
  questEnrollmentWithdrawalInputSchema.parse(withActionId(input)),
4940
5241
  call
@@ -4955,8 +5256,8 @@ function managementClient(options) {
4955
5256
  * Stops new participation and hides the quest from collections, with a reason. Completions,
4956
5257
  * attempts and rewards stay. Deploying the quest's code again keeps it archived.
4957
5258
  */
4958
- archive: (quest2, input, call) => post(
4959
- `/quests/${identifier.parse(quest2)}/archive`,
5259
+ archive: (quest, input, call) => post(
5260
+ `/quests/${identifier.parse(quest)}/archive`,
4960
5261
  questLifecycleSchema,
4961
5262
  questLifecycleInputSchema.omit({ quest: true, archived: true }).parse(withActionId(input)),
4962
5263
  call
@@ -4965,8 +5266,8 @@ function managementClient(options) {
4965
5266
  * Opens an archived quest again, with a reason. It must pass the prerequisite graph and the
4966
5267
  * app's supported interactions; it stays paused while a resource setting is empty.
4967
5268
  */
4968
- unarchive: (quest2, input, call) => post(
4969
- `/quests/${identifier.parse(quest2)}/unarchive`,
5269
+ unarchive: (quest, input, call) => post(
5270
+ `/quests/${identifier.parse(quest)}/unarchive`,
4970
5271
  questLifecycleSchema,
4971
5272
  questLifecycleInputSchema.omit({ quest: true, archived: true }).parse(withActionId(input)),
4972
5273
  call
@@ -5044,6 +5345,27 @@ function managementClient(options) {
5044
5345
  });
5045
5346
  }
5046
5347
  var managementResponseSchemas = lazyResponseReaders({
5348
+ get activeMemberUsageSchema() {
5349
+ return knownResponse(activeMemberUsageSchema);
5350
+ },
5351
+ get billingPlanChangeSchema() {
5352
+ return knownResponse(billingPlanChangeSchema);
5353
+ },
5354
+ get billingSessionSchema() {
5355
+ return knownResponse(billingSessionSchema);
5356
+ },
5357
+ get organizationBillingSchema() {
5358
+ return knownResponse(organizationBillingSchema);
5359
+ },
5360
+ get projectBillingSchema() {
5361
+ return knownResponse(projectBillingSchema);
5362
+ },
5363
+ get projectPlanSchema() {
5364
+ return knownResponse(projectPlanSchema);
5365
+ },
5366
+ get realPeopleInTestUsageSchema() {
5367
+ return knownResponse(realPeopleInTestUsageSchema);
5368
+ },
5047
5369
  get managedBadgeSchema() {
5048
5370
  return knownResponse(managedBadgeSchema);
5049
5371
  },
@@ -5284,6 +5606,9 @@ var managementResponseSchemas = lazyResponseReaders({
5284
5606
  get managedTelegramAccountSchema() {
5285
5607
  return knownResponse(managedTelegramAccountSchema);
5286
5608
  },
5609
+ get managedCreatorAccountsSchema() {
5610
+ return knownResponse(managedCreatorAccountsSchema);
5611
+ },
5287
5612
  get telegramChatsSchema() {
5288
5613
  return knownResponse(telegramChatsSchema);
5289
5614
  },
@@ -5356,6 +5681,21 @@ var managementResponseSchemas = lazyResponseReaders({
5356
5681
  get analyticsReadSchema() {
5357
5682
  return knownResponse(analyticsReadSchema);
5358
5683
  },
5684
+ get analyticsCatalogSchema() {
5685
+ return knownResponse(analyticsCatalogSchema);
5686
+ },
5687
+ get analyticsMetricResultSchema() {
5688
+ return knownResponse(analyticsMetricResultSchema);
5689
+ },
5690
+ get dashboardListSchema() {
5691
+ return knownResponse(dashboardListSchema);
5692
+ },
5693
+ get dashboardReadSchema() {
5694
+ return knownResponse(dashboardReadSchema);
5695
+ },
5696
+ get dashboardLifecycleResultSchema() {
5697
+ return knownResponse(dashboardLifecycleResultSchema);
5698
+ },
5359
5699
  get projectSchema() {
5360
5700
  return knownResponse(projectSchema);
5361
5701
  },
@@ -5481,6 +5821,27 @@ var managementResponseSchemas = lazyResponseReaders({
5481
5821
  }
5482
5822
  });
5483
5823
  var managementResponses = lazyResponseReaders({
5824
+ get activeMemberUsageSchema() {
5825
+ return responseSchema(activeMemberUsageSchema);
5826
+ },
5827
+ get billingPlanChangeSchema() {
5828
+ return responseSchema(billingPlanChangeSchema);
5829
+ },
5830
+ get billingSessionSchema() {
5831
+ return responseSchema(billingSessionSchema);
5832
+ },
5833
+ get organizationBillingSchema() {
5834
+ return responseSchema(organizationBillingSchema);
5835
+ },
5836
+ get projectBillingSchema() {
5837
+ return responseSchema(projectBillingSchema);
5838
+ },
5839
+ get projectPlanSchema() {
5840
+ return responseSchema(projectPlanSchema);
5841
+ },
5842
+ get realPeopleInTestUsageSchema() {
5843
+ return responseSchema(realPeopleInTestUsageSchema);
5844
+ },
5484
5845
  get managedBadgeSchema() {
5485
5846
  return responseSchema(managedBadgeSchema);
5486
5847
  },
@@ -5721,6 +6082,9 @@ var managementResponses = lazyResponseReaders({
5721
6082
  get managedTelegramAccountSchema() {
5722
6083
  return responseSchema(managedTelegramAccountSchema);
5723
6084
  },
6085
+ get managedCreatorAccountsSchema() {
6086
+ return responseSchema(managedCreatorAccountsSchema);
6087
+ },
5724
6088
  get telegramChatsSchema() {
5725
6089
  return responseSchema(telegramChatsSchema);
5726
6090
  },
@@ -5793,6 +6157,21 @@ var managementResponses = lazyResponseReaders({
5793
6157
  get analyticsReadSchema() {
5794
6158
  return responseSchema(analyticsReadSchema);
5795
6159
  },
6160
+ get analyticsCatalogSchema() {
6161
+ return responseSchema(analyticsCatalogSchema);
6162
+ },
6163
+ get analyticsMetricResultSchema() {
6164
+ return responseSchema(analyticsMetricResultSchema);
6165
+ },
6166
+ get dashboardListSchema() {
6167
+ return responseSchema(dashboardListSchema);
6168
+ },
6169
+ get dashboardReadSchema() {
6170
+ return responseSchema(dashboardReadSchema);
6171
+ },
6172
+ get dashboardLifecycleResultSchema() {
6173
+ return responseSchema(dashboardLifecycleResultSchema);
6174
+ },
5796
6175
  get projectSchema() {
5797
6176
  return responseSchema(projectSchema);
5798
6177
  },
@@ -5946,9 +6325,20 @@ export {
5946
6325
  accessHistoryQuerySchema,
5947
6326
  accessSchema,
5948
6327
  accountProfileSchema,
6328
+ activeMemberMonthSchema,
6329
+ activeMemberUsageSchema,
5949
6330
  activityTypeSchema,
5950
6331
  activityTypes,
5951
6332
  addGroupMemberSchema,
6333
+ analyticsBreakdowns,
6334
+ analyticsCatalog,
6335
+ analyticsCatalogSchema,
6336
+ analyticsCharts,
6337
+ analyticsFilters,
6338
+ analyticsMetricIds,
6339
+ analyticsMetricQuerySchema,
6340
+ analyticsMetricResultSchema,
6341
+ analyticsQueryLimit,
5952
6342
  analyticsQuerySchema,
5953
6343
  analyticsRanges,
5954
6344
  analyticsReadSchema,
@@ -5988,6 +6378,15 @@ export {
5988
6378
  auditQuerySchema,
5989
6379
  auditRecordSchema,
5990
6380
  balanceCheckSchema,
6381
+ billingCheckoutInputSchema,
6382
+ billingIntervals,
6383
+ billingPlanChangeInputSchema,
6384
+ billingPlanChangeSchema,
6385
+ billingSessionSchema,
6386
+ billingSubscriptionPlans,
6387
+ billingSubscriptionSchema,
6388
+ billingTopupInputSchema,
6389
+ billingTopupMaxQuantity,
5991
6390
  buildArtifactsSchema,
5992
6391
  buildIdentitySchema,
5993
6392
  buildPhaseSchema,
@@ -6010,6 +6409,13 @@ export {
6010
6409
  customDomainRecordSchema,
6011
6410
  customDomainSchema,
6012
6411
  customDomainStateSchema,
6412
+ dashboardLifecycleInputSchema,
6413
+ dashboardLifecycleResultSchema,
6414
+ dashboardListQuerySchema,
6415
+ dashboardListSchema,
6416
+ dashboardReadQuerySchema,
6417
+ dashboardReadSchema,
6418
+ dashboardSummarySchema,
6013
6419
  deploymentActionSchema,
6014
6420
  deploymentRejectionSchema,
6015
6421
  developmentPreflightSchema,
@@ -6052,6 +6458,8 @@ export {
6052
6458
  isParticipantRoute,
6053
6459
  issuedServiceKeySchema,
6054
6460
  issuedTokenSchema,
6461
+ leaderboardSettlementExportSchema,
6462
+ leaderboardSettlementMeasurementRetrySchema,
6055
6463
  leaderboardSettlementRejectionSchema,
6056
6464
  leaderboardSettlementReviewPageSchema,
6057
6465
  leaderboardSettlementReviewQuerySchema,
@@ -6061,6 +6469,8 @@ export {
6061
6469
  managedAttemptPageSchema,
6062
6470
  managedAttemptQuerySchema,
6063
6471
  managedAttemptSchema,
6472
+ managedCreatorAccountSchema,
6473
+ managedCreatorAccountsSchema,
6064
6474
  managedEntitlementPageSchema,
6065
6475
  managedEntitlementQuerySchema,
6066
6476
  managedEntitlementSchema,
@@ -6084,6 +6494,7 @@ export {
6084
6494
  managementResponses,
6085
6495
  managementStateQuerySchema,
6086
6496
  memberAccountSchema,
6497
+ memberCreatorAccountUnlinkInputSchema,
6087
6498
  memberDetailSchema,
6088
6499
  memberIdentityChangeInputSchema,
6089
6500
  memberIdentityLinkChangeInputSchema,
@@ -6120,6 +6531,7 @@ export {
6120
6531
  operationInputSchema,
6121
6532
  operationSchema,
6122
6533
  operatorUserSchema,
6534
+ organizationBillingSchema,
6123
6535
  pageSchema,
6124
6536
  parseImageExtraction,
6125
6537
  parseImageResult,
@@ -6131,10 +6543,12 @@ export {
6131
6543
  permissionSchema,
6132
6544
  personSchema,
6133
6545
  pointLedgerPropertiesSchema,
6546
+ projectBillingSchema,
6134
6547
  projectDeletionInputSchema,
6135
6548
  projectDeletionSchema,
6136
6549
  projectInputSchema,
6137
6550
  projectMetricsSchema,
6551
+ projectPlanSchema,
6138
6552
  projectSchema,
6139
6553
  projectSetupSchema,
6140
6554
  projectTransferInputSchema,
@@ -6157,6 +6571,7 @@ export {
6157
6571
  questLifecycleInputSchema,
6158
6572
  questLifecycleSchema,
6159
6573
  readinessSchema,
6574
+ realPeopleInTestUsageSchema,
6160
6575
  referralManagementSchema,
6161
6576
  referralQualificationSchema,
6162
6577
  referralRewardResolutionSchema,