@domino-sdk/relay 1.53.1 → 1.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +1848 -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 +233 -78
  5. package/dist/authoring.js +112 -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 +8 -7
  9. package/dist/browser.js +14 -10
  10. package/dist/{capability-error-FQGGb5xS.d.ts → capability-error-DSd8EMQC.d.ts} +76 -2
  11. package/dist/{chunk-53JMTUWG.js → chunk-56DBFNR2.js} +1 -1
  12. package/dist/chunk-C7QZ4UBB.js +937 -0
  13. package/dist/chunk-F6HECAXA.js +661 -0
  14. package/dist/{chunk-VKHSC5MD.js → chunk-GL43VQ5D.js} +16 -16
  15. package/dist/{chunk-GTQJSDBS.js → chunk-IUF7DW76.js} +27 -16
  16. package/dist/{chunk-YBR4BUFK.js → chunk-IZRITLVV.js} +2 -2
  17. package/dist/chunk-KDR2VAJP.js +34 -0
  18. package/dist/{chunk-S2PMKZSX.js → chunk-SABMNPF2.js} +21 -2
  19. package/dist/{chunk-XFAYQFRO.js → chunk-TLK2MD4S.js} +1 -1
  20. package/dist/{chunk-ZJ3FVZRP.js → chunk-UY6KMLQG.js} +10 -3
  21. package/dist/{chunk-JYJAS4E3.js → chunk-VFBQVY4X.js} +1 -1
  22. package/dist/{chunk-YVC3B72P.js → chunk-WHG5WE43.js} +1 -1
  23. package/dist/chunk-WHMXXHPX.js +344 -0
  24. package/dist/{chunk-MP2ZF5U6.js → chunk-WUEQOKJH.js} +4 -4
  25. package/dist/{chunk-7BNCLWAO.js → chunk-XALIFNMD.js} +1 -1
  26. package/dist/{chunk-IELNFM3V.js → chunk-YCOKTQ4E.js} +96 -7
  27. package/dist/{chunk-LPHXTZDA.js → chunk-YE3XYB2F.js} +2 -2
  28. package/dist/{chunk-K6TVMNU4.js → chunk-YEVD4A5X.js} +1 -1
  29. package/dist/{client-CzNtl8UO.d.ts → client-C4zUZKpj.d.ts} +35 -7
  30. package/dist/{deployments-ovtqtAcx.d.ts → deployments-B32QS1CI.d.ts} +1060 -233
  31. package/dist/{groups-B5R1RCsl.d.ts → groups-O6onGPmC.d.ts} +131 -137
  32. package/dist/host-environment-FN4zg3hw.d.ts +30 -0
  33. package/dist/index.d.ts +8 -8
  34. package/dist/index.js +9 -9
  35. package/dist/integrations-C6_uUh-s.d.ts +584 -0
  36. package/dist/internal.d.ts +12 -10
  37. package/dist/internal.js +14 -8
  38. package/dist/{offers-CH1RZekg.d.ts → offers-BMDNcvwB.d.ts} +2 -2
  39. package/dist/{pages-BTlOg8sl.d.ts → pages-BFloMpyQ.d.ts} +25 -1
  40. package/dist/portal-proxy.d.ts +11 -1
  41. package/dist/portal-proxy.js +26 -5
  42. package/dist/{profiles-Cdv4BSd_.d.ts → profiles-BoOK03cR.d.ts} +2 -0
  43. package/dist/react/index.d.ts +488 -13
  44. package/dist/react/index.js +51 -15
  45. package/dist/runtime/authoring.js +1 -1
  46. package/dist/runtime/chunks/WKATKZXE.js +1 -0
  47. package/dist/runtime/manifest.json +3 -3
  48. package/dist/runtime/schema.js +1 -1
  49. package/dist/{schema-BJ9bOgpN.d.ts → schema-C4m9RhCR.d.ts} +166 -6
  50. package/dist/schema.d.ts +392 -334
  51. package/dist/schema.js +84 -40
  52. package/dist/server/index.d.ts +11 -10
  53. package/dist/server/index.js +1604 -838
  54. package/dist/{submission-input-BNah53go.d.ts → submission-input-BbdawqVy.d.ts} +2 -2
  55. package/dist/{telegram-browser-C36j_6v-.d.ts → telegram-browser-CwaxROAZ.d.ts} +1 -1
  56. package/dist/testing.d.ts +85 -12
  57. package/dist/testing.js +322 -37
  58. package/dist/{transport-DuB_fiA2.d.ts → transport-CZJOW5Sr.d.ts} +8018 -3150
  59. package/dist/vite.d.ts +54 -1
  60. package/dist/vite.js +35 -0
  61. package/dist/{x-BfQcsDp0.d.ts → x-1czZFVUW.d.ts} +1 -1
  62. package/package.json +3 -2
  63. package/dist/chunk-2NUD237O.js +0 -102
  64. package/dist/chunk-CCE2JWES.js +0 -1083
  65. package/dist/integrations-CllF-kWg.d.ts +0 -314
  66. 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-XALIFNMD.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-IUF7DW76.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-F6HECAXA.js";
31
46
  import "../chunk-4OC7REYX.js";
32
47
  import {
33
48
  DEFAULT_MANAGEMENT_TIMEOUT,
@@ -48,22 +63,22 @@ import {
48
63
  participantExchangeSchema,
49
64
  questConfiguration,
50
65
  sequenceCursorSchema
51
- } from "../chunk-MP2ZF5U6.js";
66
+ } from "../chunk-WUEQOKJH.js";
52
67
  import {
53
68
  parseImageExtraction,
54
69
  parseImageResult
55
- } from "../chunk-LPHXTZDA.js";
70
+ } from "../chunk-YE3XYB2F.js";
56
71
  import {
57
72
  imageAssetArtifactSchema,
58
73
  xUserLookupInputSchema,
59
74
  xUserSchema,
60
75
  xUsernameSchema
61
- } from "../chunk-K6TVMNU4.js";
76
+ } from "../chunk-YEVD4A5X.js";
62
77
  import {
63
78
  sourceDataSchema,
64
79
  sourceRoles,
65
80
  validateQuestShape
66
- } from "../chunk-S2PMKZSX.js";
81
+ } from "../chunk-SABMNPF2.js";
67
82
  import {
68
83
  isIntegrationParticipantPath,
69
84
  isParticipantRoute,
@@ -72,7 +87,7 @@ import {
72
87
  } from "../chunk-MLIXJPKL.js";
73
88
  import {
74
89
  withActionId
75
- } from "../chunk-YVC3B72P.js";
90
+ } from "../chunk-WHG5WE43.js";
76
91
  import {
77
92
  allocateQuestSchema,
78
93
  allocatedQuestSchema,
@@ -91,13 +106,13 @@ import {
91
106
  rewardDeliveryQuerySchema,
92
107
  rewardDeliverySchema,
93
108
  saveQuestDraftSchema
94
- } from "../chunk-ZJ3FVZRP.js";
109
+ } from "../chunk-UY6KMLQG.js";
95
110
  import {
96
111
  badgeMutationResultSchema,
97
112
  badgeMutationSchema,
98
113
  badgePropertiesSchema,
114
+ baseUnitsSchema,
99
115
  createBadgeSchema,
100
- createPointLedgerSchema,
101
116
  engagementBoundaryPageSchema,
102
117
  engagementChangePreviewInputSchema,
103
118
  engagementChangePreviewSchema,
@@ -116,23 +131,17 @@ import {
116
131
  leaderboardPageSchema,
117
132
  leaderboardQuerySchema,
118
133
  leaderboardSettlementApprovalSchema,
134
+ leaderboardSettlementPoolSchema,
119
135
  leaderboardSettlementSchema,
120
136
  leaderboardSettlementSummarySchema,
121
137
  managedBadgeSchema,
122
138
  managedPointHistoryPageSchema,
123
- managedPointLedgerSchema,
124
- managedProfileSchema,
125
139
  memberBadgesSchema,
126
140
  offerControlSchema,
127
141
  offerSchema,
128
- pointLedgerPropertiesSchema,
129
- pointLedgerSchema,
130
142
  pointsAccountSchema,
131
143
  pointsMutationSchema,
132
144
  pointsResultSchema,
133
- profileModerationSchema,
134
- profileSettingsInputSchema,
135
- profileSettingsSchema,
136
145
  publishedLeaderboardSchema,
137
146
  publishedReferralSchema,
138
147
  redemptionCancellationSchema,
@@ -145,15 +154,23 @@ import {
145
154
  referralQualificationSchema,
146
155
  referralRewardResolutionSchema,
147
156
  referralSuspensionSchema
148
- } from "../chunk-CCE2JWES.js";
157
+ } from "../chunk-C7QZ4UBB.js";
149
158
  import {
159
+ createPointLedgerSchema,
160
+ managedPointLedgerSchema,
161
+ managedProfileSchema,
162
+ pointLedgerPropertiesSchema,
163
+ pointLedgerSchema,
164
+ profileModerationSchema,
165
+ profileSettingsInputSchema,
166
+ profileSettingsSchema,
150
167
  telegramChatConnectionSchema,
151
168
  telegramChatIdSchema,
152
169
  telegramChatsSchema
153
- } from "../chunk-2NUD237O.js";
154
- import "../chunk-XFAYQFRO.js";
155
- import "../chunk-JYJAS4E3.js";
156
- import "../chunk-53JMTUWG.js";
170
+ } from "../chunk-WHMXXHPX.js";
171
+ import "../chunk-TLK2MD4S.js";
172
+ import "../chunk-VFBQVY4X.js";
173
+ import "../chunk-56DBFNR2.js";
157
174
  import {
158
175
  CompletionSourceKind,
159
176
  addGroupMemberSchema,
@@ -243,7 +260,7 @@ import {
243
260
  walletSignInNetworksSchema,
244
261
  walletUnlinkInputSchema,
245
262
  whereSchemaIssue
246
- } from "../chunk-IELNFM3V.js";
263
+ } from "../chunk-YCOKTQ4E.js";
247
264
 
248
265
  // src/server/identity-links.ts
249
266
  import * as z from "zod";
@@ -366,8 +383,15 @@ var memberIdentitySignInInputSchema = z2.strictObject({
366
383
 
367
384
  // src/server/settlement-reviews.ts
368
385
  import * as z3 from "zod";
386
+ var timestamp = z3.number().int().safe().nonnegative();
369
387
  var decision = {
370
388
  status: z3.enum(["pending", "approved", "rejected"]),
389
+ /**
390
+ * Present while the window has ended but Relay is still taking closing measurements of the
391
+ * content its engagement points pay for. The settlement reads as `pending` with no rows, cannot
392
+ * be approved yet, and freezes when the measurements arrive or their wait ends after `deadline`.
393
+ */
394
+ closing: z3.object({ startedAt: timestamp, deadline: timestamp }).optional(),
371
395
  rejectedAt: z3.number().int().safe().nonnegative().nullable(),
372
396
  rejectedBy: z3.string().nullable(),
373
397
  rejectionReason: z3.string().nullable()
@@ -387,6 +411,37 @@ var leaderboardSettlementRejectionSchema = z3.strictObject({
387
411
  expectedCreatedAt: z3.number().int().safe().nonnegative(),
388
412
  reason: z3.string().trim().min(1).max(500)
389
413
  });
414
+ var leaderboardSettlementMeasurementRetrySchema = z3.strictObject({
415
+ actionId: z3.string().uuid().default(() => crypto.randomUUID())
416
+ });
417
+ var leaderboardSettlementExportSchema = z3.object({
418
+ settlement: identifier,
419
+ leaderboard: identifier,
420
+ title: z3.string(),
421
+ period: z3.object({ start: timestamp, end: timestamp }),
422
+ status: z3.enum(["pending", "approved", "rejected"]),
423
+ pool: leaderboardSettlementPoolSchema.nullable(),
424
+ rows: z3.array(
425
+ z3.object({
426
+ member: identifier,
427
+ score: z3.number().int().safe(),
428
+ rank: z3.number().int().safe().positive(),
429
+ /** The pool share in base units; null without a pool. */
430
+ share: baseUnitsSchema.nullable(),
431
+ /** The pool share in whole units: `"600.5"` for 600500000 USDC base units. */
432
+ amount: z3.string().nullable(),
433
+ /** Linked wallets the member proved, on every chain, newest first per chain. */
434
+ wallets: z3.array(
435
+ z3.object({
436
+ chain: walletChainSchema,
437
+ /** The CAIP-2 network, for Cosmos wallets only. */
438
+ network: z3.string().nullable(),
439
+ address: z3.string()
440
+ })
441
+ )
442
+ })
443
+ )
444
+ });
390
445
 
391
446
  // src/server/inventory-items.ts
392
447
  import * as z4 from "zod";
@@ -496,6 +551,10 @@ var testMemberAcceptAnywaySchema = z6.object({
496
551
  actionId: identifier,
497
552
  attempt: identifier
498
553
  }).strict();
554
+ var testMemberReferralAcceptSchema = z6.union([
555
+ z6.object({ actionId: identifier, code: identifier }).strict(),
556
+ z6.object({ actionId: identifier, inviter: identifier }).strict()
557
+ ]);
499
558
  var testMemberResetSchema = z6.object({ actionId: identifier }).strict();
500
559
  var testMemberAdvanceSchema = z6.object({
501
560
  actionId: identifier,
@@ -918,13 +977,13 @@ async function verifyWebhook(input) {
918
977
  }
919
978
  const parts = input.signature.split(",");
920
979
  const timestamps = parts.filter((part) => part.startsWith("t="));
921
- const timestamp = timestamps[0]?.slice(2) ?? "";
980
+ const timestamp2 = timestamps[0]?.slice(2) ?? "";
922
981
  const signatures = parts.filter((part) => /^v1=[a-f0-9]{64}$/.test(part)).map((part) => part.slice(3));
923
- if (timestamps.length !== 1 || !/^\d{1,12}$/.test(timestamp) || Math.abs(now / 1e3 - Number(timestamp)) > tolerance || signatures.length < 1 || signatures.length > 2) {
982
+ if (timestamps.length !== 1 || !/^\d{1,12}$/.test(timestamp2) || Math.abs(now / 1e3 - Number(timestamp2)) > tolerance || signatures.length < 1 || signatures.length > 2) {
924
983
  throw new Error("Invalid or expired webhook signature");
925
984
  }
926
985
  const secrets = typeof input.secret === "string" ? [input.secret] : input.secret;
927
- const message = new TextEncoder().encode(`${timestamp}.${input.body}`);
986
+ const message = new TextEncoder().encode(`${timestamp2}.${input.body}`);
928
987
  for (const secret of secrets) {
929
988
  if (!secret) {
930
989
  continue;
@@ -1081,20 +1140,112 @@ var promotionHistoryPageSchema = z10.object({
1081
1140
  nextCursor: pageCursorSchema.nullable()
1082
1141
  });
1083
1142
 
1143
+ // src/server/dashboards.ts
1144
+ import * as z11 from "zod";
1145
+ var dashboardListQuerySchema = z11.strictObject({
1146
+ includeArchived: z11.union([z11.boolean(), z11.enum(["true", "false"])]).transform((value) => value === true || value === "true").optional()
1147
+ });
1148
+ var summaryFields = {
1149
+ key: identifier,
1150
+ title: z11.string(),
1151
+ description: z11.string().nullable(),
1152
+ /** Lists order by it, dashboards without one last, then by title. */
1153
+ position: z11.number().int().nullable(),
1154
+ archivedAt: z11.number().int().nonnegative().nullable(),
1155
+ /** When the current version was published. */
1156
+ updatedAt: z11.number().int().nonnegative()
1157
+ };
1158
+ var dashboardSummarySchema = z11.object(summaryFields);
1159
+ var dashboardListSchema = z11.array(dashboardSummarySchema);
1160
+ var dashboardLifecycleInputSchema = z11.strictObject({
1161
+ actionId: z11.string().uuid(),
1162
+ dashboard: identifier,
1163
+ archived: z11.boolean(),
1164
+ reason: z11.string().trim().min(1).max(500),
1165
+ expectedArchivedAt: z11.number().int().nonnegative().nullable().optional()
1166
+ });
1167
+ var dashboardLifecycleResultSchema = z11.object({
1168
+ dashboard: dashboardSummarySchema,
1169
+ changed: z11.boolean()
1170
+ });
1171
+ var dashboardReadQuerySchema = z11.strictObject({
1172
+ key: identifier,
1173
+ range: z11.enum(analyticsRanges).optional()
1174
+ });
1175
+ var dashboardReadSchema = z11.object({
1176
+ ...summaryFields,
1177
+ definition: dashboardDefinitionSchema,
1178
+ range: z11.enum(analyticsRanges),
1179
+ panels: z11.array(
1180
+ z11.object({
1181
+ key: identifier,
1182
+ result: analyticsMetricResultSchema.optional(),
1183
+ error: z11.object({ code: z11.string(), message: z11.string() }).optional()
1184
+ })
1185
+ )
1186
+ });
1187
+
1084
1188
  // src/server/index.ts
1085
- import * as z16 from "zod";
1189
+ import * as z18 from "zod";
1190
+
1191
+ // src/server/billing.ts
1192
+ import { z as z12 } from "zod";
1193
+ var billingSubscriptionPlans = ["launch", "growth", "scale"];
1194
+ var billingIntervals = ["month", "year"];
1195
+ var billingCheckoutInputSchema = z12.strictObject({
1196
+ plan: z12.enum(billingSubscriptionPlans),
1197
+ interval: z12.enum(billingIntervals)
1198
+ });
1199
+ var billingPlanChangeInputSchema = z12.strictObject({
1200
+ plan: z12.enum(billingSubscriptionPlans),
1201
+ interval: z12.enum(billingIntervals)
1202
+ });
1203
+ var billingPlanChangeSchema = z12.object({
1204
+ timing: z12.enum(["now", "renewal", "none"]),
1205
+ invoiceUrl: z12.string().url().nullable()
1206
+ });
1207
+ var billingTopupMaxQuantity = 10;
1208
+ var billingTopupInputSchema = z12.strictObject({
1209
+ quantity: z12.number().int().min(1).max(billingTopupMaxQuantity)
1210
+ });
1211
+ var billingSessionSchema = z12.object({ url: z12.string().url() });
1212
+ var billingSubscriptionSchema = z12.object({
1213
+ plan: z12.enum(billingSubscriptionPlans),
1214
+ interval: z12.enum(billingIntervals),
1215
+ status: z12.string(),
1216
+ currentPeriodEnd: z12.number().int().nullable(),
1217
+ cancelAtPeriodEnd: z12.boolean(),
1218
+ lastInvoice: z12.enum(["paid", "failed"]).nullable(),
1219
+ livemode: z12.boolean(),
1220
+ scheduledChange: z12.object({
1221
+ plan: z12.enum(billingSubscriptionPlans),
1222
+ interval: z12.enum(billingIntervals),
1223
+ at: z12.number().int()
1224
+ }).nullable().default(null),
1225
+ endedFor: z12.enum(["project-deleted", "project-transferred"]).nullable().default(null),
1226
+ unpaid: z12.object({
1227
+ since: z12.number().int(),
1228
+ promotionsRefusedAt: z12.number().int(),
1229
+ offlineAt: z12.number().int()
1230
+ }).nullable().default(null)
1231
+ });
1232
+ var projectBillingSchema = z12.object({
1233
+ available: z12.boolean(),
1234
+ reason: z12.enum(["admin-required", "staff-only", "not-configured"]).nullable(),
1235
+ subscription: billingSubscriptionSchema.nullable()
1236
+ });
1086
1237
 
1087
1238
  // src/server/hosting.ts
1088
- import * as z13 from "zod";
1239
+ import * as z15 from "zod";
1089
1240
 
1090
1241
  // src/server/schedules.ts
1091
- import * as z11 from "zod";
1242
+ import * as z13 from "zod";
1092
1243
  import { Cron } from "croner";
1093
1244
  var APP_SCHEDULE_LIMIT = 10;
1094
1245
  var APP_SCHEDULE_MIN_INTERVAL = 3e5;
1095
1246
  var APP_SCHEDULE_TIMEOUT = 3e4;
1096
- var appScheduleNameSchema = z11.string().regex(/^[a-z][a-z0-9-]{0,63}$/);
1097
- var appSchedulePathSchema = z11.string().min(2).max(512).refine((path) => {
1247
+ var appScheduleNameSchema = z13.string().regex(/^[a-z][a-z0-9-]{0,63}$/);
1248
+ var appSchedulePathSchema = z13.string().min(2).max(512).refine((path) => {
1098
1249
  if (!/^\/[a-zA-Z0-9_/-]+$/.test(path) || path.startsWith("//")) {
1099
1250
  return false;
1100
1251
  }
@@ -1105,11 +1256,11 @@ function interval(value) {
1105
1256
  const unit = value.slice(-1);
1106
1257
  return amount * (unit === "m" ? 6e4 : unit === "h" ? 36e5 : 864e5);
1107
1258
  }
1108
- var everySchema = z11.string().regex(/^[1-9]\d{0,3}[mhd]$/).refine(
1259
+ var everySchema = z13.string().regex(/^[1-9]\d{0,3}[mhd]$/).refine(
1109
1260
  (value) => interval(value) >= APP_SCHEDULE_MIN_INTERVAL && interval(value) <= 365 * 864e5,
1110
1261
  "Use an interval from 5 minutes to 365 days, such as 5m, 1h or 1d"
1111
1262
  );
1112
- var cronSchema = z11.string().max(120).refine((value) => {
1263
+ var cronSchema = z13.string().max(120).refine((value) => {
1113
1264
  const fields = value.trim().split(/\s+/);
1114
1265
  if (fields.length !== 5 || fields.some((field) => !/^[\d*,/-]+$/.test(field))) {
1115
1266
  return false;
@@ -1134,15 +1285,15 @@ var cronSchema = z11.string().max(120).refine((value) => {
1134
1285
  var declaration = {
1135
1286
  name: appScheduleNameSchema,
1136
1287
  path: appSchedulePathSchema,
1137
- description: z11.string().min(1).max(500)
1288
+ description: z13.string().min(1).max(500)
1138
1289
  };
1139
- var everySchedule = z11.object({ ...declaration, every: everySchema });
1140
- var cronSchedule = z11.object({ ...declaration, cron: cronSchema });
1141
- var appScheduleSchema = z11.union([
1290
+ var everySchedule = z13.object({ ...declaration, every: everySchema });
1291
+ var cronSchedule = z13.object({ ...declaration, cron: cronSchema });
1292
+ var appScheduleSchema = z13.union([
1142
1293
  everySchedule.strict(),
1143
1294
  cronSchedule.strict()
1144
1295
  ]);
1145
- var appSchedulesSchema = z11.array(appScheduleSchema).max(APP_SCHEDULE_LIMIT).refine(
1296
+ var appSchedulesSchema = z13.array(appScheduleSchema).max(APP_SCHEDULE_LIMIT).refine(
1146
1297
  (items) => new Set(items.map((item) => item.name)).size === items.length,
1147
1298
  "Schedule names must be unique"
1148
1299
  );
@@ -1159,25 +1310,25 @@ function nextScheduleRun(schedule, after) {
1159
1310
  }
1160
1311
  return next.getTime();
1161
1312
  }
1162
- var appScheduleStateSchema = z11.enum(["active", "paused", "archived"]);
1313
+ var appScheduleStateSchema = z13.enum(["active", "paused", "archived"]);
1163
1314
  var APP_SCHEDULE_RESULT_BYTES = 16384;
1164
- var appScheduleDiagnosticSchema = z11.object({
1165
- level: z11.enum(["error", "warning", "info"]),
1166
- message: z11.string().min(1).max(500),
1315
+ var appScheduleDiagnosticSchema = z13.object({
1316
+ level: z13.enum(["error", "warning", "info"]),
1317
+ message: z13.string().min(1).max(500),
1167
1318
  /** What the line is about, such as a member, record or tracker ID. */
1168
- subject: z11.string().min(1).max(200).optional(),
1319
+ subject: z13.string().min(1).max(200).optional(),
1169
1320
  /** A stable code the app chooses, such as `ingest-timeout`. */
1170
- code: z11.string().min(1).max(100).optional()
1321
+ code: z13.string().min(1).max(100).optional()
1171
1322
  });
1172
- var appScheduleResultSchema = z11.object({
1173
- outcome: z11.enum(["succeeded", "partial", "failed"]),
1174
- summary: z11.string().min(1).max(500).optional(),
1323
+ var appScheduleResultSchema = z13.object({
1324
+ outcome: z13.enum(["succeeded", "partial", "failed"]),
1325
+ summary: z13.string().min(1).max(500).optional(),
1175
1326
  /** Counts and gauges, such as processed and failed members. */
1176
- metrics: z11.record(z11.string().regex(/^[A-Za-z][\w.-]{0,63}$/), z11.number()).refine(
1327
+ metrics: z13.record(z13.string().regex(/^[A-Za-z][\w.-]{0,63}$/), z13.number()).refine(
1177
1328
  (metrics) => Object.keys(metrics).length <= 50,
1178
1329
  "Report at most 50 metrics"
1179
1330
  ).optional(),
1180
- diagnostics: z11.array(appScheduleDiagnosticSchema).max(50).optional()
1331
+ diagnostics: z13.array(appScheduleDiagnosticSchema).max(50).optional()
1181
1332
  });
1182
1333
  function scheduleResult(result) {
1183
1334
  const body = JSON.stringify(appScheduleResultSchema.parse(result));
@@ -1190,41 +1341,41 @@ function scheduleResult(result) {
1190
1341
  headers: { "Content-Type": "application/json" }
1191
1342
  });
1192
1343
  }
1193
- var appScheduleRunSchema = z11.object({
1194
- id: z11.string().uuid(),
1195
- build: z11.string().uuid(),
1196
- startedAt: z11.number(),
1197
- scheduledAt: z11.number(),
1198
- manual: z11.boolean(),
1199
- status: z11.enum(["queued", "running", "succeeded", "failed", "uncertain"]),
1200
- duration: z11.number().nullable(),
1344
+ var appScheduleRunSchema = z13.object({
1345
+ id: z13.string().uuid(),
1346
+ build: z13.string().uuid(),
1347
+ startedAt: z13.number(),
1348
+ scheduledAt: z13.number(),
1349
+ manual: z13.boolean(),
1350
+ status: z13.enum(["queued", "running", "succeeded", "failed", "uncertain"]),
1351
+ duration: z13.number().nullable(),
1201
1352
  /** Why the run failed or is uncertain, or why Relay ignored the app's result. */
1202
- error: z11.string().nullable(),
1353
+ error: z13.string().nullable(),
1203
1354
  /** The app's JSON answer when it sent a valid result. Absent on runs from before results. */
1204
1355
  result: appScheduleResultSchema.nullable().optional()
1205
1356
  });
1206
- var appScheduleRunsSchema = z11.object({
1357
+ var appScheduleRunsSchema = z13.object({
1207
1358
  /** Newest first: the latest twenty runs of one schedule, including a queued or running one. */
1208
- runs: z11.array(appScheduleRunSchema)
1359
+ runs: z13.array(appScheduleRunSchema)
1209
1360
  });
1210
- var appScheduleListSchema = z11.object({
1361
+ var appScheduleListSchema = z13.object({
1211
1362
  state: appScheduleStateSchema,
1212
- schedules: z11.array(
1213
- z11.object({
1214
- declaration: z11.union([everySchedule, cronSchedule]),
1215
- nextRun: z11.number().nullable(),
1216
- blocked: z11.boolean(),
1363
+ schedules: z13.array(
1364
+ z13.object({
1365
+ declaration: z13.union([everySchedule, cronSchedule]),
1366
+ nextRun: z13.number().nullable(),
1367
+ blocked: z13.boolean(),
1217
1368
  lastRun: appScheduleRunSchema.nullable()
1218
1369
  })
1219
1370
  )
1220
1371
  });
1221
- var scheduledInvocationSchema = z11.object({
1222
- id: z11.string().uuid(),
1223
- build: z11.string().uuid(),
1372
+ var scheduledInvocationSchema = z13.object({
1373
+ id: z13.string().uuid(),
1374
+ build: z13.string().uuid(),
1224
1375
  name: appScheduleNameSchema,
1225
- scheduledAt: z11.number().int(),
1226
- startedAt: z11.number().int(),
1227
- manual: z11.boolean()
1376
+ scheduledAt: z13.number().int(),
1377
+ startedAt: z13.number().int(),
1378
+ manual: z13.boolean()
1228
1379
  }).strict();
1229
1380
  async function verifyScheduledRequest(request, key) {
1230
1381
  const signature = request.headers.get("X-Domino-Schedule-Signature");
@@ -1289,7 +1440,7 @@ ${body}`)
1289
1440
  }
1290
1441
 
1291
1442
  // src/server/starters.ts
1292
- import * as z12 from "zod";
1443
+ import * as z14 from "zod";
1293
1444
  var starterTemplates = [
1294
1445
  {
1295
1446
  id: "campaign",
@@ -1322,63 +1473,63 @@ var starterTemplates = [
1322
1473
  summary: "A headless Worker with typed routes and interactive API docs, for plugging Domino into your own product."
1323
1474
  }
1324
1475
  ];
1325
- var starterIdSchema = z12.enum(
1476
+ var starterIdSchema = z14.enum(
1326
1477
  starterTemplates.map((template) => template.id)
1327
1478
  );
1328
1479
 
1329
1480
  // src/server/hosting.ts
1330
- var outputPathSchema = z13.string().min(1).max(512).refine(
1481
+ var outputPathSchema = z15.string().min(1).max(512).refine(
1331
1482
  (path) => path.split("/").every(
1332
1483
  (part) => /^[\w-][\w.-]*$/.test(part) && part !== "node_modules"
1333
1484
  ),
1334
1485
  "Expected a relative build output path without hidden segments"
1335
1486
  );
1336
- var appRoutingSchema = z13.enum(["legacy", "transparent"]).default("legacy");
1487
+ var appRoutingSchema = z15.enum(["legacy", "transparent"]).default("legacy");
1337
1488
  var APP_SECRET_LIMIT = 50;
1338
1489
  var APP_KV_LIMIT = 5;
1339
1490
  var APP_SQL_LIMIT = 5;
1340
1491
  var APP_MIGRATION_LIMIT = 100;
1341
1492
  var APP_MIGRATION_FILE_BYTES = 9e4;
1342
1493
  var APP_MIGRATION_TOTAL_BYTES = 1e6;
1343
- var appSecretNameSchema = z13.string().regex(
1494
+ var appSecretNameSchema = z15.string().regex(
1344
1495
  /^[A-Z_][A-Z0-9_]{0,63}$/,
1345
1496
  "Use 1-64 uppercase letters, digits, and underscores, not starting with a digit"
1346
1497
  ).refine(
1347
1498
  (name) => !name.startsWith("DOMINO_") && name !== "ASSETS",
1348
1499
  "DOMINO_ names and ASSETS are reserved for Domino's own bindings"
1349
1500
  );
1350
- var appSecretValueSchema = z13.string().min(1).refine(
1501
+ var appSecretValueSchema = z15.string().min(1).refine(
1351
1502
  (value) => new TextEncoder().encode(value).length <= 5120,
1352
1503
  "Secret values can be at most 5 KiB"
1353
1504
  );
1354
- var appSecretInputSchema = z13.object({ value: appSecretValueSchema }).strict();
1355
- var appSecretSchema = z13.object({
1505
+ var appSecretInputSchema = z15.object({ value: appSecretValueSchema }).strict();
1506
+ var appSecretSchema = z15.object({
1356
1507
  name: appSecretNameSchema,
1357
- updatedAt: z13.number(),
1358
- updatedBy: z13.string()
1508
+ updatedAt: z15.number(),
1509
+ updatedBy: z15.string()
1359
1510
  });
1360
- var appSecretDeclarationSchema = z13.object({
1361
- description: z13.string().trim().min(1).max(500),
1362
- required: z13.boolean().default(true)
1511
+ var appSecretDeclarationSchema = z15.object({
1512
+ description: z15.string().trim().min(1).max(500),
1513
+ required: z15.boolean().default(true)
1363
1514
  }).strict();
1364
- var appSecretDeclarationsSchema = z13.record(appSecretNameSchema, appSecretDeclarationSchema).refine(
1515
+ var appSecretDeclarationsSchema = z15.record(appSecretNameSchema, appSecretDeclarationSchema).refine(
1365
1516
  (secrets) => Object.keys(secrets).length <= APP_SECRET_LIMIT,
1366
1517
  `Declare at most ${APP_SECRET_LIMIT} app secrets`
1367
1518
  );
1368
- var appSecretListSchema = z13.object({
1369
- secrets: z13.array(appSecretSchema),
1370
- declared: z13.array(appSecretDeclarationSchema.extend({ name: appSecretNameSchema })).default([])
1519
+ var appSecretListSchema = z15.object({
1520
+ secrets: z15.array(appSecretSchema),
1521
+ declared: z15.array(appSecretDeclarationSchema.extend({ name: appSecretNameSchema })).default([])
1371
1522
  });
1372
- var hostedAppSecretsSchema = z13.object({ secrets: z13.record(appSecretNameSchema, appSecretValueSchema) }).strict();
1373
- var storageDescription = z13.object({
1374
- description: z13.string().trim().min(1).max(500)
1523
+ var hostedAppSecretsSchema = z15.object({ secrets: z15.record(appSecretNameSchema, appSecretValueSchema) }).strict();
1524
+ var storageDescription = z15.object({
1525
+ description: z15.string().trim().min(1).max(500)
1375
1526
  }).strict();
1376
- var appStorageSchema = z13.object({
1377
- kv: z13.record(appSecretNameSchema, storageDescription).refine(
1527
+ var appStorageSchema = z15.object({
1528
+ kv: z15.record(appSecretNameSchema, storageDescription).refine(
1378
1529
  (stores) => Object.keys(stores).length <= APP_KV_LIMIT,
1379
1530
  `Declare at most ${APP_KV_LIMIT} KV stores`
1380
1531
  ).default({}),
1381
- sql: z13.record(
1532
+ sql: z15.record(
1382
1533
  appSecretNameSchema,
1383
1534
  storageDescription.extend({
1384
1535
  migrations: outputPathSchema.optional()
@@ -1388,77 +1539,77 @@ var appStorageSchema = z13.object({
1388
1539
  `Declare at most ${APP_SQL_LIMIT} SQL stores`
1389
1540
  ).default({})
1390
1541
  }).strict();
1391
- var appStorageKindSchema = z13.enum(["kv", "sql"]);
1392
- var appStorageListSchema = z13.object({
1393
- stores: z13.array(
1394
- z13.object({
1395
- kind: z13.string(),
1542
+ var appStorageKindSchema = z15.enum(["kv", "sql"]);
1543
+ var appStorageListSchema = z15.object({
1544
+ stores: z15.array(
1545
+ z15.object({
1546
+ kind: z15.string(),
1396
1547
  name: appSecretNameSchema,
1397
- createdAt: z13.number().nullable(),
1398
- declared: z13.boolean(),
1399
- description: z13.string().optional()
1548
+ createdAt: z15.number().nullable(),
1549
+ declared: z15.boolean(),
1550
+ description: z15.string().optional()
1400
1551
  })
1401
1552
  )
1402
1553
  });
1403
1554
  var APP_STORAGE_ROW_LIMIT = 50;
1404
1555
  var APP_STORAGE_PREVIEW_CHARACTERS = 2e3;
1405
- var appStorageCellSchema = z13.union([
1406
- z13.string(),
1407
- z13.number(),
1408
- z13.null(),
1409
- z13.object({ text: z13.string(), truncated: z13.literal(true) }),
1410
- z13.object({ blob: z13.number().int().min(0) })
1556
+ var appStorageCellSchema = z15.union([
1557
+ z15.string(),
1558
+ z15.number(),
1559
+ z15.null(),
1560
+ z15.object({ text: z15.string(), truncated: z15.literal(true) }),
1561
+ z15.object({ blob: z15.number().int().min(0) })
1411
1562
  ]);
1412
- var appStorageTablesSchema = z13.object({
1413
- tables: z13.array(
1563
+ var appStorageTablesSchema = z15.object({
1564
+ tables: z15.array(
1414
1565
  /** `kind` is SQLite's: `table` or `view`. */
1415
- z13.object({ name: z13.string(), kind: z13.string() })
1566
+ z15.object({ name: z15.string(), kind: z15.string() })
1416
1567
  )
1417
1568
  });
1418
- var appStorageRowsSchema = z13.object({
1419
- table: z13.string(),
1420
- columns: z13.array(z13.string()),
1421
- rows: z13.array(z13.array(appStorageCellSchema)),
1569
+ var appStorageRowsSchema = z15.object({
1570
+ table: z15.string(),
1571
+ columns: z15.array(z15.string()),
1572
+ rows: z15.array(z15.array(appStorageCellSchema)),
1422
1573
  /** How many rows come before this page in storage order. */
1423
- offset: z13.number().int().min(0),
1424
- total: z13.number().int().min(0),
1574
+ offset: z15.number().int().min(0),
1575
+ total: z15.number().int().min(0),
1425
1576
  /** Pass back as `cursor` for the next page; null on the last one. */
1426
1577
  nextCursor: pageCursorSchema.nullable().default(null)
1427
1578
  });
1428
- var appStorageKeysSchema = z13.object({
1429
- keys: z13.array(
1430
- z13.object({ name: z13.string(), expiration: z13.number().nullable() })
1579
+ var appStorageKeysSchema = z15.object({
1580
+ keys: z15.array(
1581
+ z15.object({ name: z15.string(), expiration: z15.number().nullable() })
1431
1582
  ),
1432
1583
  /** Pass back as `cursor` for the next page; null on the last one. */
1433
1584
  nextCursor: pageCursorSchema.nullable().default(null),
1434
1585
  /** @deprecated Use `nextCursor`. Removed in 2.0.0. */
1435
- cursor: z13.string().nullable()
1586
+ cursor: z15.string().nullable()
1436
1587
  });
1437
- var appStorageValueSchema = z13.object({
1438
- key: z13.string(),
1439
- size: z13.number().int().min(0),
1588
+ var appStorageValueSchema = z15.object({
1589
+ key: z15.string(),
1590
+ size: z15.number().int().min(0),
1440
1591
  /** Null when the value is not UTF-8 text. */
1441
- text: z13.string().nullable(),
1442
- truncated: z13.boolean()
1592
+ text: z15.string().nullable(),
1593
+ truncated: z15.boolean()
1443
1594
  });
1444
1595
  var APP_STORAGE_CELL_CHARACTERS = 1e5;
1445
- var appStorageCellPageSchema = z13.object({
1446
- table: z13.string(),
1447
- column: z13.string(),
1596
+ var appStorageCellPageSchema = z15.object({
1597
+ table: z15.string(),
1598
+ column: z15.string(),
1448
1599
  /** The row's position in storage order: a rows page's `offset` plus its index on that page. */
1449
- row: z13.number().int().min(0),
1600
+ row: z15.number().int().min(0),
1450
1601
  /** SQLite's storage class. */
1451
- type: z13.enum(["text", "integer", "real", "blob", "null"]),
1602
+ type: z15.enum(["text", "integer", "real", "blob", "null"]),
1452
1603
  /** Characters of text, or of a number's text form; bytes of a BLOB; null for NULL. */
1453
- length: z13.number().int().min(0).nullable(),
1604
+ length: z15.number().int().min(0).nullable(),
1454
1605
  /** How many characters come before this page. */
1455
- offset: z13.number().int().min(0),
1606
+ offset: z15.number().int().min(0),
1456
1607
  /** Up to 100,000 characters from `offset`. Null for a BLOB, whose bytes are never read, and NULL. */
1457
- text: z13.string().nullable(),
1608
+ text: z15.string().nullable(),
1458
1609
  /** Pass back as `cursor` for the next page; null on the last one. */
1459
1610
  nextCursor: pageCursorSchema.nullable().default(null)
1460
1611
  });
1461
- var appMigrationNameSchema = z13.string().max(255).regex(/^[\w-][\w.-]*\.sql$/);
1612
+ var appMigrationNameSchema = z15.string().max(255).regex(/^[\w-][\w.-]*\.sql$/);
1462
1613
  function compareAppMigrations(a, b) {
1463
1614
  const left = Number.parseInt(a.split("_")[0], 10);
1464
1615
  const right = Number.parseInt(b.split("_")[0], 10);
@@ -1475,12 +1626,12 @@ function compareAppMigrations(a, b) {
1475
1626
  }
1476
1627
  return a < b ? -1 : a > b ? 1 : 0;
1477
1628
  }
1478
- var appMigrationsSchema = z13.record(
1629
+ var appMigrationsSchema = z15.record(
1479
1630
  appSecretNameSchema,
1480
- z13.array(
1481
- z13.object({
1631
+ z15.array(
1632
+ z15.object({
1482
1633
  name: appMigrationNameSchema,
1483
- sql: z13.string().min(1).refine(
1634
+ sql: z15.string().min(1).refine(
1484
1635
  (sql) => new TextEncoder().encode(sql).length <= APP_MIGRATION_FILE_BYTES,
1485
1636
  `A migration file must not exceed ${APP_MIGRATION_FILE_BYTES} bytes`
1486
1637
  )
@@ -1498,21 +1649,21 @@ var appMigrationsSchema = z13.record(
1498
1649
  );
1499
1650
  var appScripts = {
1500
1651
  routing: appRoutingSchema,
1501
- devScript: z13.string().regex(/^[\w:-]+$/),
1502
- checkScript: z13.string().regex(/^[\w:-]+$/),
1503
- buildScript: z13.string().regex(/^[\w:-]+$/)
1652
+ devScript: z15.string().regex(/^[\w:-]+$/),
1653
+ checkScript: z15.string().regex(/^[\w:-]+$/),
1654
+ buildScript: z15.string().regex(/^[\w:-]+$/)
1504
1655
  };
1505
1656
  var workerSettings = {
1506
- runWorkerFirst: z13.boolean().default(false),
1657
+ runWorkerFirst: z15.boolean().default(false),
1507
1658
  main: outputPathSchema.refine(
1508
1659
  (path) => /\.m?js$/.test(path),
1509
1660
  "Expected a compiled JavaScript entry"
1510
1661
  ),
1511
- compatibilityDate: z13.string().regex(/^\d{4}-\d{2}-\d{2}$/),
1512
- compatibilityFlags: z13.array(z13.string().min(1)).max(50).default([]),
1513
- vars: z13.record(
1514
- z13.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).refine((name) => name !== "ASSETS"),
1515
- z13.string()
1662
+ compatibilityDate: z15.string().regex(/^\d{4}-\d{2}-\d{2}$/),
1663
+ compatibilityFlags: z15.array(z15.string().min(1)).max(50).default([]),
1664
+ vars: z15.record(
1665
+ z15.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).refine((name) => name !== "ASSETS"),
1666
+ z15.string()
1516
1667
  ).default({}),
1517
1668
  secrets: appSecretDeclarationsSchema.default({}),
1518
1669
  storage: appStorageSchema.optional(),
@@ -1541,62 +1692,62 @@ var distinctBindings = (worker, ctx) => {
1541
1692
  }
1542
1693
  }
1543
1694
  };
1544
- var hostedAppSchema = z13.discriminatedUnion("kind", [
1545
- z13.object({
1546
- kind: z13.literal("static"),
1695
+ var hostedAppSchema = z15.discriminatedUnion("kind", [
1696
+ z15.object({
1697
+ kind: z15.literal("static"),
1547
1698
  directory: outputPathSchema,
1548
1699
  ...appScripts
1549
1700
  }).strict(),
1550
- z13.object({
1551
- kind: z13.literal("worker"),
1701
+ z15.object({
1702
+ kind: z15.literal("worker"),
1552
1703
  directory: outputPathSchema,
1553
1704
  assetsDirectory: outputPathSchema.optional(),
1554
1705
  ...appScripts,
1555
1706
  ...workerSettings
1556
1707
  }).strict().superRefine(distinctBindings)
1557
1708
  ]);
1558
- var repositorySchema = z13.object({
1559
- id: z13.string().uuid(),
1709
+ var repositorySchema = z15.object({
1710
+ id: z15.string().uuid(),
1560
1711
  organization: identifier,
1561
1712
  project: identifier,
1562
- remote: z13.string().url(),
1563
- defaultBranch: z13.string(),
1564
- status: z13.enum(["provisioning", "ready"])
1713
+ remote: z15.string().url(),
1714
+ defaultBranch: z15.string(),
1715
+ status: z15.enum(["provisioning", "ready"])
1565
1716
  });
1566
- var createRepositorySchema = z13.object({
1717
+ var createRepositorySchema = z15.object({
1567
1718
  /** Omitted: the starter chosen at project setup, else `campaign`. */
1568
1719
  starter: starterIdSchema.optional()
1569
1720
  }).strict();
1570
- var deviceStartSchema = z13.object({
1571
- challenge: z13.string().regex(/^[a-f0-9]{64}$/)
1721
+ var deviceStartSchema = z15.object({
1722
+ challenge: z15.string().regex(/^[a-f0-9]{64}$/)
1572
1723
  }).strict();
1573
- var deviceRedeemSchema = z13.object({
1574
- id: z13.string().uuid(),
1575
- verifier: z13.string().min(43).max(128)
1724
+ var deviceRedeemSchema = z15.object({
1725
+ id: z15.string().uuid(),
1726
+ verifier: z15.string().min(43).max(128)
1576
1727
  }).strict();
1577
- var deviceApproveSchema = z13.object({
1578
- id: z13.string().uuid(),
1579
- code: z13.string().regex(/^[A-F0-9]{4}-[A-F0-9]{4}$/)
1728
+ var deviceApproveSchema = z15.object({
1729
+ id: z15.string().uuid(),
1730
+ code: z15.string().regex(/^[A-F0-9]{4}-[A-F0-9]{4}$/)
1580
1731
  }).strict();
1581
- var commitSchema = z13.string().regex(/^[a-f0-9]{40}$/);
1582
- var stageRequestSchema = z13.object({
1732
+ var commitSchema = z15.string().regex(/^[a-f0-9]{40}$/);
1733
+ var stageRequestSchema = z15.object({
1583
1734
  commit: commitSchema,
1584
- requestId: z13.string().uuid()
1735
+ requestId: z15.string().uuid()
1585
1736
  }).strict();
1586
- var buildIdentitySchema = z13.object({
1737
+ var buildIdentitySchema = z15.object({
1587
1738
  routing: appRoutingSchema,
1588
- slug: z13.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional(),
1589
- runtime: z13.enum(["simulation", "hosted-test"]).default("simulation"),
1590
- id: z13.string().uuid(),
1591
- repository: z13.string().uuid(),
1739
+ slug: z15.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional(),
1740
+ runtime: z15.enum(["simulation", "hosted-test"]).default("simulation"),
1741
+ id: z15.string().uuid(),
1742
+ repository: z15.string().uuid(),
1592
1743
  organization: identifier,
1593
1744
  project: identifier,
1594
1745
  commit: commitSchema,
1595
- createdAt: z13.number(),
1596
- actor: z13.string(),
1597
- commitMessage: z13.string().max(500).optional()
1746
+ createdAt: z15.number(),
1747
+ actor: z15.string(),
1748
+ commitMessage: z15.string().max(500).optional()
1598
1749
  });
1599
- var buildPhaseSchema = z13.enum([
1750
+ var buildPhaseSchema = z15.enum([
1600
1751
  "queued",
1601
1752
  "source",
1602
1753
  "install",
@@ -1606,120 +1757,120 @@ var buildPhaseSchema = z13.enum([
1606
1757
  "ready",
1607
1758
  "failed"
1608
1759
  ]);
1609
- var buildStatusSchema = z13.object({
1760
+ var buildStatusSchema = z15.object({
1610
1761
  phase: buildPhaseSchema,
1611
1762
  failedPhase: buildPhaseSchema.optional(),
1612
- updatedAt: z13.number(),
1613
- message: z13.string()
1763
+ updatedAt: z15.number(),
1764
+ message: z15.string()
1614
1765
  });
1615
1766
  var hostedBuildSchema = buildIdentitySchema.extend({
1616
1767
  ...buildStatusSchema.shape,
1617
- finished: z13.boolean(),
1618
- current: z13.boolean(),
1619
- stagingUrl: z13.string().url()
1768
+ finished: z15.boolean(),
1769
+ current: z15.boolean(),
1770
+ stagingUrl: z15.string().url()
1620
1771
  });
1621
- var liveAppSchema = z13.object({
1622
- url: z13.string().url().nullable(),
1623
- state: z13.enum(["none", "deploying", "live", "failed"]),
1772
+ var liveAppSchema = z15.object({
1773
+ url: z15.string().url().nullable(),
1774
+ state: z15.enum(["none", "deploying", "live", "failed"]),
1624
1775
  /** The build the address serves, or null before the first one goes live. */
1625
- build: z13.string().uuid().nullable(),
1776
+ build: z15.string().uuid().nullable(),
1626
1777
  /** The build the last approved promotion asked for, while it differs from `build`. */
1627
- requested: z13.string().uuid().nullable(),
1628
- failure: z13.string().nullable()
1778
+ requested: z15.string().uuid().nullable(),
1779
+ failure: z15.string().nullable()
1629
1780
  });
1630
- var customDomainStateSchema = z13.enum([
1781
+ var customDomainStateSchema = z15.enum([
1631
1782
  "awaiting-dns",
1632
1783
  "provisioning",
1633
1784
  "active",
1634
1785
  "attention",
1635
1786
  "suspended"
1636
1787
  ]);
1637
- var customDomainRecordSchema = z13.object({
1638
- type: z13.enum(["CNAME", "TXT"]),
1639
- name: z13.string(),
1640
- value: z13.string(),
1788
+ var customDomainRecordSchema = z15.object({
1789
+ type: z15.enum(["CNAME", "TXT"]),
1790
+ name: z15.string(),
1791
+ value: z15.string(),
1641
1792
  /** The values public DNS returned: empty when it had none, null before Domino looked. */
1642
- found: z13.array(z13.string()).nullable(),
1643
- matches: z13.boolean()
1793
+ found: z15.array(z15.string()).nullable(),
1794
+ matches: z15.boolean()
1644
1795
  });
1645
- var customDomainSchema = z13.object({
1646
- id: z13.string().uuid(),
1647
- hostname: z13.string(),
1648
- url: z13.string().url(),
1796
+ var customDomainSchema = z15.object({
1797
+ id: z15.string().uuid(),
1798
+ hostname: z15.string(),
1799
+ url: z15.string().url(),
1649
1800
  state: customDomainStateSchema,
1650
1801
  /** What to fix, in plain words, while the domain needs attention or is suspended. */
1651
- issue: z13.object({ code: z13.string(), message: z13.string() }).nullable(),
1652
- records: z13.array(customDomainRecordSchema),
1802
+ issue: z15.object({ code: z15.string(), message: z15.string() }).nullable(),
1803
+ records: z15.array(customDomainRecordSchema),
1653
1804
  /** Cloudflare's statuses and errors in its own words, once the domain is proven. */
1654
- cloudflare: z13.object({
1655
- hostnameStatus: z13.string(),
1656
- certificateStatus: z13.string().nullable(),
1657
- validationErrors: z13.array(z13.string()),
1658
- verificationErrors: z13.array(z13.string()),
1659
- certificateExpiresAt: z13.string().nullable()
1805
+ cloudflare: z15.object({
1806
+ hostnameStatus: z15.string(),
1807
+ certificateStatus: z15.string().nullable(),
1808
+ validationErrors: z15.array(z15.string()),
1809
+ verificationErrors: z15.array(z15.string()),
1810
+ certificateExpiresAt: z15.string().nullable()
1660
1811
  }).nullable(),
1661
- checkedAt: z13.string().nullable(),
1662
- nextCheckAt: z13.string().nullable(),
1663
- createdAt: z13.string()
1664
- });
1665
- var customDomainListSchema = z13.object({
1666
- domains: z13.array(customDomainSchema)
1667
- });
1668
- var customDomainInputSchema = z13.object({ hostname: z13.string().min(1).max(300) }).strict();
1669
- var stagingAccessModeSchema = z13.enum(["console", "password"]);
1670
- var stagingAccessSchema = z13.object({ mode: stagingAccessModeSchema });
1671
- var stagingAccessInputSchema = z13.discriminatedUnion("mode", [
1672
- z13.object({ mode: z13.literal("console") }).strict(),
1673
- z13.object({
1674
- mode: z13.literal("password"),
1675
- password: z13.string().min(8).max(128)
1812
+ checkedAt: z15.string().nullable(),
1813
+ nextCheckAt: z15.string().nullable(),
1814
+ createdAt: z15.string()
1815
+ });
1816
+ var customDomainListSchema = z15.object({
1817
+ domains: z15.array(customDomainSchema)
1818
+ });
1819
+ var customDomainInputSchema = z15.object({ hostname: z15.string().min(1).max(300) }).strict();
1820
+ var stagingAccessModeSchema = z15.enum(["console", "password"]);
1821
+ var stagingAccessSchema = z15.object({ mode: stagingAccessModeSchema });
1822
+ var stagingAccessInputSchema = z15.discriminatedUnion("mode", [
1823
+ z15.object({ mode: z15.literal("console") }).strict(),
1824
+ z15.object({
1825
+ mode: z15.literal("password"),
1826
+ password: z15.string().min(8).max(128)
1676
1827
  }).strict()
1677
1828
  ]);
1678
- var stagingPathSchema = z13.string().max(2048).refine(
1829
+ var stagingPathSchema = z15.string().max(2048).refine(
1679
1830
  (path) => path.startsWith("/") && !path.startsWith("//") && !path.includes("\\"),
1680
1831
  "Expected a path on the staging host"
1681
1832
  );
1682
- var stagingLinkSchema = z13.object({
1683
- url: z13.string().url(),
1684
- expiresAt: z13.number()
1833
+ var stagingLinkSchema = z15.object({
1834
+ url: z15.string().url(),
1835
+ expiresAt: z15.number()
1685
1836
  });
1686
- var buildSnapshotSchema = z13.object({
1687
- builds: z13.array(hostedBuildSchema),
1837
+ var buildSnapshotSchema = z15.object({
1838
+ builds: z15.array(hostedBuildSchema),
1688
1839
  current: hostedBuildSchema.nullable(),
1689
1840
  selected: hostedBuildSchema.nullable(),
1690
- logs: z13.string()
1841
+ logs: z15.string()
1691
1842
  });
1692
- var assetPathSchema = z13.string().max(512).refine(
1843
+ var assetPathSchema = z15.string().max(512).refine(
1693
1844
  (path) => path.startsWith("/") && // oxlint-disable-next-line no-control-regex -- Asset paths must reject control characters.
1694
1845
  !/[\\\u0000-\u001f?#%]/.test(path) && path.slice(1).split("/").every((part) => part.length > 0 && !part.startsWith(".")),
1695
1846
  "Expected a public asset path without hidden segments"
1696
1847
  );
1697
- var base64Schema = z13.string().regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
1848
+ var base64Schema = z15.string().regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
1698
1849
  var stagedDeploymentLimits = {
1699
1850
  /** Bytes of JSON, uncompressed. */
1700
1851
  size: 64e6,
1701
1852
  /** Bytes of the Brotli-compressed object. */
1702
1853
  compressedSize: 1e7
1703
1854
  };
1704
- var stagedDeploymentSchema = z13.object({
1705
- encoding: z13.literal("br"),
1706
- sha256: z13.string().regex(/^[0-9a-f]{64}$/),
1707
- compressedSize: z13.number().int().positive().max(stagedDeploymentLimits.compressedSize),
1708
- size: z13.number().int().positive().max(stagedDeploymentLimits.size)
1855
+ var stagedDeploymentSchema = z15.object({
1856
+ encoding: z15.literal("br"),
1857
+ sha256: z15.string().regex(/^[0-9a-f]{64}$/),
1858
+ compressedSize: z15.number().int().positive().max(stagedDeploymentLimits.compressedSize),
1859
+ size: z15.number().int().positive().max(stagedDeploymentLimits.size)
1709
1860
  }).strict();
1710
1861
  var stagedDeploymentContentSchema = stagedDeploymentSchema.extend({
1711
- content: z13.string().max(Math.ceil(stagedDeploymentLimits.compressedSize / 3) * 4)
1862
+ content: z15.string().max(Math.ceil(stagedDeploymentLimits.compressedSize / 3) * 4)
1712
1863
  }).strict();
1713
1864
  var stagedDeploymentKey = (build, sha256) => `builds/${build}/deployment/${sha256}.br`;
1714
1865
  var artifactFields = {
1715
1866
  routing: appRoutingSchema,
1716
- worker: z13.object({
1867
+ worker: z15.object({
1717
1868
  ...workerSettings,
1718
1869
  migrations: appMigrationsSchema.optional(),
1719
- modules: z13.array(
1720
- z13.object({
1870
+ modules: z15.array(
1871
+ z15.object({
1721
1872
  path: outputPathSchema.refine((path) => path !== "metadata"),
1722
- type: z13.enum([
1873
+ type: z15.enum([
1723
1874
  "application/javascript+module",
1724
1875
  "application/wasm",
1725
1876
  "text/plain",
@@ -1729,26 +1880,26 @@ var artifactFields = {
1729
1880
  }).strict()
1730
1881
  ).min(1).max(500)
1731
1882
  }).strict().superRefine(distinctBindings).optional(),
1732
- assets: z13.array(
1733
- z13.object({
1883
+ assets: z15.array(
1884
+ z15.object({
1734
1885
  path: assetPathSchema,
1735
1886
  content: base64Schema.max(14e6),
1736
- size: z13.number().int().min(0).max(1e7)
1887
+ size: z15.number().int().min(0).max(1e7)
1737
1888
  }).strict()
1738
1889
  ).max(500)
1739
1890
  };
1740
- var buildArtifactsSchema = z13.discriminatedUnion("format", [
1741
- z13.object({
1742
- format: z13.literal(1),
1891
+ var buildArtifactsSchema = z15.discriminatedUnion("format", [
1892
+ z15.object({
1893
+ format: z15.literal(1),
1743
1894
  ...artifactFields,
1744
- quests: z13.unknown(),
1745
- catalog: z13.unknown()
1895
+ quests: z15.unknown(),
1896
+ catalog: z15.unknown()
1746
1897
  }).strict(),
1747
- z13.object({
1748
- format: z13.literal(2),
1898
+ z15.object({
1899
+ format: z15.literal(2),
1749
1900
  ...artifactFields,
1750
1901
  deployment: stagedDeploymentSchema,
1751
- images: z13.array(imageAssetArtifactSchema).max(10)
1902
+ images: z15.array(imageAssetArtifactSchema).max(10)
1752
1903
  }).strict()
1753
1904
  ]).superRefine((value, ctx) => {
1754
1905
  if (value.worker) {
@@ -1800,39 +1951,39 @@ var buildArtifactsSchema = z13.discriminatedUnion("format", [
1800
1951
  });
1801
1952
 
1802
1953
  // src/server/development.ts
1803
- import * as z14 from "zod";
1804
- var developmentPreflightSchema = z14.object({
1805
- organization: z14.string(),
1806
- project: z14.string(),
1807
- environment: z14.enum(["test", "live"]),
1808
- identity: z14.object({
1809
- exchange: z14.literal("supported"),
1810
- activeIntegrations: z14.number().int().nonnegative()
1954
+ import * as z16 from "zod";
1955
+ var developmentPreflightSchema = z16.object({
1956
+ organization: z16.string(),
1957
+ project: z16.string(),
1958
+ environment: z16.enum(["test", "live"]),
1959
+ identity: z16.object({
1960
+ exchange: z16.literal("supported"),
1961
+ activeIntegrations: z16.number().int().nonnegative()
1811
1962
  }).optional(),
1812
- staging: z14.enum(["configured", "blocked"]),
1813
- development: z14.object({
1814
- status: z14.enum(["configured", "blocked"]),
1963
+ staging: z16.enum(["configured", "blocked"]),
1964
+ development: z16.object({
1965
+ status: z16.enum(["configured", "blocked"]),
1815
1966
  // How `domino dev` reaches the preview origin: a Cloudflare tunnel, or a direct route on a
1816
1967
  // local development stack. APIs that predate the field use tunnels.
1817
- transport: z14.enum(["tunnel", "direct"]).default("tunnel"),
1818
- missing: z14.array(z14.string()),
1819
- authentication: z14.array(z14.string())
1968
+ transport: z16.enum(["tunnel", "direct"]).default("tunnel"),
1969
+ missing: z16.array(z16.string()),
1970
+ authentication: z16.array(z16.string())
1820
1971
  }),
1821
- checks: z14.array(
1822
- z14.object({
1823
- id: z14.string(),
1824
- status: z14.enum(["ok", "error"]),
1825
- message: z14.string(),
1826
- missing: z14.array(z14.string()).optional(),
1827
- issues: z14.array(z14.string()).optional()
1972
+ checks: z16.array(
1973
+ z16.object({
1974
+ id: z16.string(),
1975
+ status: z16.enum(["ok", "error"]),
1976
+ message: z16.string(),
1977
+ missing: z16.array(z16.string()).optional(),
1978
+ issues: z16.array(z16.string()).optional()
1828
1979
  })
1829
1980
  )
1830
1981
  });
1831
1982
 
1832
1983
  // src/server/hosted.ts
1833
- import * as z15 from "zod";
1984
+ import * as z17 from "zod";
1834
1985
  var hostedKeyPermissions = ["read", "points", "ingest"];
1835
- var hostedKeyPermissionList = z15.array(z15.string()).transform(
1986
+ var hostedKeyPermissionList = z17.array(z17.string()).transform(
1836
1987
  (values) => values.filter(
1837
1988
  (value) => hostedKeyPermissions.includes(value)
1838
1989
  )
@@ -1844,17 +1995,17 @@ var hostedManagementBindings = [
1844
1995
  "DOMINO_PROJECT",
1845
1996
  "DOMINO_ENVIRONMENT"
1846
1997
  ];
1847
- var hostedKeySecretSchema = z15.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key");
1848
- var hostedKeySchema = z15.object({
1849
- id: z15.string().uuid(),
1998
+ var hostedKeySecretSchema = z17.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key");
1999
+ var hostedKeySchema = z17.object({
2000
+ id: z17.string().uuid(),
1850
2001
  token: hostedKeySecretSchema,
1851
2002
  organization: identifier,
1852
2003
  project: identifier,
1853
- environment: z15.enum(["test", "live"]),
2004
+ environment: z17.enum(["test", "live"]),
1854
2005
  permissions: hostedKeyPermissionList,
1855
- expiresAt: z15.number().nullable()
2006
+ expiresAt: z17.number().nullable()
1856
2007
  }).strict();
1857
- var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl: z15.string().url() }).strict();
2008
+ var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl: z17.string().url() }).strict();
1858
2009
  function hostedManagementClient(env) {
1859
2010
  const missing = hostedManagementBindings.filter((name) => !env[name]);
1860
2011
  if (missing.length) {
@@ -1862,7 +2013,7 @@ function hostedManagementClient(env) {
1862
2013
  `Missing ${missing.join(", ")}. Domino sets these for hosted apps and domino dev; update the project's vite.config.ts to forward them in development.`
1863
2014
  );
1864
2015
  }
1865
- const environment = z15.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
2016
+ const environment = z17.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
1866
2017
  const token = env.DOMINO_MANAGEMENT_KEY;
1867
2018
  return createManagementClient({
1868
2019
  baseUrl: env.DOMINO_API_URL.replace(/\/+$/, ""),
@@ -1874,9 +2025,9 @@ function hostedManagementClient(env) {
1874
2025
  }
1875
2026
 
1876
2027
  // src/server/index.ts
1877
- var environmentSchema = z16.enum(["test", "live"]);
1878
- var roleSchema = z16.enum(["editor", "reviewer", "staff"]);
1879
- var permissionSchema = z16.enum([
2028
+ var environmentSchema = z18.enum(["test", "live"]);
2029
+ var roleSchema = z18.enum(["editor", "reviewer", "staff"]);
2030
+ var permissionSchema = z18.enum([
1880
2031
  "read",
1881
2032
  "publish",
1882
2033
  "review",
@@ -1896,7 +2047,7 @@ var permissionSchema = z16.enum([
1896
2047
  */
1897
2048
  "enroll"
1898
2049
  ]);
1899
- var permissionListSchema = z16.array(z16.string()).transform(
2050
+ var permissionListSchema = z18.array(z18.string()).transform(
1900
2051
  (values) => values.filter(
1901
2052
  (value) => permissionSchema.safeParse(value).success
1902
2053
  )
@@ -1906,38 +2057,38 @@ var rolePermissions = {
1906
2057
  reviewer: ["read", "review"],
1907
2058
  staff: ["read", "confirm", "handover"]
1908
2059
  };
1909
- var projectSetupSchema = z16.object({
1910
- mode: z16.enum(["new", "existing"]),
1911
- brief: z16.string().trim().min(1).max(4e3)
2060
+ var projectSetupSchema = z18.object({
2061
+ mode: z18.enum(["new", "existing"]),
2062
+ brief: z18.string().trim().min(1).max(4e3)
1912
2063
  }).strict();
1913
- var operatorUserSchema = z16.object({
1914
- id: z16.string(),
1915
- name: z16.string().nullable(),
1916
- email: z16.string().nullable(),
1917
- avatar: z16.string().nullable()
2064
+ var operatorUserSchema = z18.object({
2065
+ id: z18.string(),
2066
+ name: z18.string().nullable(),
2067
+ email: z18.string().nullable(),
2068
+ avatar: z18.string().nullable()
1918
2069
  });
1919
- var projectSchema = z16.object({
2070
+ var projectSchema = z18.object({
1920
2071
  /**
1921
2072
  * Names the project's hosted addresses. The server gives a new project, and accepts in a
1922
2073
  * slug change, only slugs of at least 3 characters that Domino does not reserve. This schema
1923
2074
  * checks only the format, so it parses every slug that exists.
1924
2075
  */
1925
- slug: z16.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
1926
- createdBy: z16.string().nullable().optional(),
2076
+ slug: z18.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
2077
+ createdBy: z18.string().nullable().optional(),
1927
2078
  creator: operatorUserSchema.nullable().optional(),
1928
2079
  /** A response, so fields a newer server adds to the setup are dropped, not rejected. */
1929
- setup: z16.object(projectSetupSchema.shape).optional(),
2080
+ setup: z18.object(projectSetupSchema.shape).optional(),
1930
2081
  /** The starter chosen at setup. A plain string, so later starters still parse. */
1931
- starter: z16.string().optional(),
1932
- id: z16.string().min(1),
2082
+ starter: z18.string().optional(),
2083
+ id: z18.string().min(1),
1933
2084
  organization: identifier,
1934
2085
  project: identifier,
1935
- name: z16.string(),
1936
- subtitle: z16.string(),
1937
- initials: z16.string(),
1938
- color: z16.string(),
2086
+ name: z18.string(),
2087
+ subtitle: z18.string(),
2088
+ initials: z18.string(),
2089
+ color: z18.string(),
1939
2090
  permissions: permissionListSchema,
1940
- environments: z16.array(environmentSchema)
2091
+ environments: z18.array(environmentSchema)
1941
2092
  }).refine(
1942
2093
  (project) => !project.creator || project.creator.id === project.createdBy,
1943
2094
  {
@@ -1945,45 +2096,45 @@ var projectSchema = z16.object({
1945
2096
  path: ["creator"]
1946
2097
  }
1947
2098
  );
1948
- var projectInputSchema = z16.object({
2099
+ var projectInputSchema = z18.object({
1949
2100
  actionId: identifier,
1950
- name: z16.string().trim().min(1).max(80),
2101
+ name: z18.string().trim().min(1).max(80),
1951
2102
  setup: projectSetupSchema.optional(),
1952
2103
  /** The starter a new hosted app begins from, with `setup.mode` "new". */
1953
2104
  starter: starterIdSchema.optional()
1954
2105
  }).strict();
1955
- var projectUpdateInputSchema = z16.union([
1956
- z16.object({ name: projectInputSchema.shape.name }).strict(),
1957
- z16.object({
2106
+ var projectUpdateInputSchema = z18.union([
2107
+ z18.object({ name: projectInputSchema.shape.name }).strict(),
2108
+ z18.object({
1958
2109
  slug: projectSchema.shape.slug,
1959
- confirm: z16.string().min(1).max(80)
2110
+ confirm: z18.string().min(1).max(80)
1960
2111
  }).strict()
1961
2112
  ]);
1962
- var projectDeletionInputSchema = z16.object({ confirm: z16.string().min(1).max(80) }).strict();
1963
- var projectDeletionSchema = z16.object({
2113
+ var projectDeletionInputSchema = z18.object({ confirm: z18.string().min(1).max(80) }).strict();
2114
+ var projectDeletionSchema = z18.object({
1964
2115
  project: identifier,
1965
- purgeAfter: z16.number().int()
2116
+ purgeAfter: z18.number().int()
1966
2117
  });
1967
- var projectTransferInputSchema = z16.object({ organization: identifier, confirm: z16.string().min(1).max(80) }).strict();
1968
- var projectTransferSchema = z16.object({
2118
+ var projectTransferInputSchema = z18.object({ organization: identifier, confirm: z18.string().min(1).max(80) }).strict();
2119
+ var projectTransferSchema = z18.object({
1969
2120
  organization: identifier,
1970
2121
  project: identifier
1971
2122
  });
1972
- var grantSchema = z16.object({
1973
- subject: z16.string().min(1).max(200),
1974
- roles: z16.array(roleSchema),
1975
- environments: z16.array(environmentSchema)
2123
+ var grantSchema = z18.object({
2124
+ subject: z18.string().min(1).max(200),
2125
+ roles: z18.array(roleSchema),
2126
+ environments: z18.array(environmentSchema)
1976
2127
  }).strict();
1977
- var grantRecordSchema = z16.object(grantSchema.shape);
1978
- var stockAdditionSchema = z16.object({
2128
+ var grantRecordSchema = z18.object(grantSchema.shape);
2129
+ var stockAdditionSchema = z18.object({
1979
2130
  item: identifier,
1980
- quantity: z16.number().int(),
2131
+ quantity: z18.number().int(),
1981
2132
  actionId: identifier
1982
2133
  });
1983
- var completionRevokeSchema = z16.object({
2134
+ var completionRevokeSchema = z18.object({
1984
2135
  actionId: identifier,
1985
- reason: z16.string().trim().min(1).max(500),
1986
- freeOccurrence: z16.boolean().default(false)
2136
+ reason: z18.string().trim().min(1).max(500),
2137
+ freeOccurrence: z18.boolean().default(false)
1987
2138
  }).strict();
1988
2139
  var RevokedEntitlementOutcome = {
1989
2140
  /** No other completion grants the reward: it is void, after cancelling a handover in progress. */
@@ -2011,227 +2162,238 @@ var RevokedReferralOutcome = {
2011
2162
  /** Qualified on another accepted completion of the program's quest instead. */
2012
2163
  Requalified: "requalified"
2013
2164
  };
2014
- var entitlementOutcomeSchema = z16.string().min(1).max(64);
2015
- var deliveryOutcomeSchema = z16.string().min(1).max(64);
2016
- var referralOutcomeSchema = z16.string().min(1).max(64);
2017
- var completionRevocationSchema = z16.object({
2165
+ var entitlementOutcomeSchema = z18.string().min(1).max(64);
2166
+ var deliveryOutcomeSchema = z18.string().min(1).max(64);
2167
+ var referralOutcomeSchema = z18.string().min(1).max(64);
2168
+ var completionRevocationSchema = z18.object({
2018
2169
  completion: identifier,
2019
2170
  /** The quest ID, or the board ID when `source.kind` is `leaderboard`. */
2020
2171
  quest: identifier,
2021
2172
  member: identifier,
2022
2173
  /** What paid the revoked completion. `source.id` repeats `quest`. */
2023
2174
  source: completionSourceSchema.optional(),
2024
- revokedAt: z16.number(),
2025
- occurrenceFreed: z16.boolean(),
2026
- badges: z16.array(z16.object({ badge: identifier, stillAwarded: z16.boolean() })).optional(),
2027
- groups: z16.array(z16.object({ group: identifier, stillMember: z16.boolean() })).optional(),
2028
- points: z16.array(
2029
- z16.object({
2175
+ revokedAt: z18.number(),
2176
+ occurrenceFreed: z18.boolean(),
2177
+ badges: z18.array(z18.object({ badge: identifier, stillAwarded: z18.boolean() })).optional(),
2178
+ groups: z18.array(z18.object({ group: identifier, stillMember: z18.boolean() })).optional(),
2179
+ points: z18.array(
2180
+ z18.object({
2030
2181
  entry: identifier,
2031
2182
  balance: identifier,
2032
2183
  reversal: identifier.nullable(),
2033
- reversed: z16.number().int(),
2034
- unreversed: z16.number().int()
2184
+ reversed: z18.number().int(),
2185
+ unreversed: z18.number().int()
2035
2186
  })
2036
2187
  ),
2037
- entitlements: z16.array(
2038
- z16.object({
2188
+ entitlements: z18.array(
2189
+ z18.object({
2039
2190
  entitlement: identifier,
2040
2191
  reward: identifier,
2041
2192
  outcome: entitlementOutcomeSchema,
2042
- status: z16.string()
2193
+ status: z18.string()
2043
2194
  })
2044
2195
  ),
2045
- deliveries: z16.array(
2046
- z16.object({
2047
- delivery: z16.string(),
2048
- roleId: z16.string(),
2196
+ deliveries: z18.array(
2197
+ z18.object({
2198
+ delivery: z18.string(),
2199
+ roleId: z18.string(),
2049
2200
  outcome: deliveryOutcomeSchema,
2050
2201
  /**
2051
2202
  * By Relay's records, another accepted, unrevoked completion of the member also granted this
2052
2203
  * role to the same Discord account and server. Relay does not read Discord's membership.
2053
2204
  */
2054
- stillGranted: z16.boolean()
2205
+ stillGranted: z18.boolean()
2055
2206
  })
2056
2207
  ),
2057
- referrals: z16.array(
2058
- z16.object({
2208
+ referrals: z18.array(
2209
+ z18.object({
2059
2210
  program: identifier,
2060
2211
  outcome: referralOutcomeSchema
2061
2212
  })
2062
2213
  ),
2063
- streakMilestone: z16.boolean()
2214
+ streakMilestone: z18.boolean()
2064
2215
  });
2065
- var accessSchema = z16.object({
2066
- actor: z16.string(),
2067
- organization: z16.string(),
2068
- admin: z16.boolean(),
2069
- local: z16.boolean(),
2070
- projects: z16.array(projectSchema)
2071
- });
2072
- var querySchema = z16.object({
2073
- q: z16.string().max(200).default(""),
2074
- filter: z16.string().max(50).default("all"),
2075
- offset: z16.coerce.number().int().min(0).max(1e6).default(0),
2076
- limit: z16.coerce.number().int().min(1).max(100).default(25)
2077
- });
2078
- var accountProfileSchema = z16.object({
2079
- name: z16.string().optional(),
2216
+ var accessSchema = z18.object({
2217
+ actor: z18.string(),
2218
+ organization: z18.string(),
2219
+ admin: z18.boolean(),
2220
+ local: z18.boolean(),
2221
+ projects: z18.array(projectSchema)
2222
+ });
2223
+ var querySchema = z18.object({
2224
+ q: z18.string().max(200).default(""),
2225
+ filter: z18.string().max(50).default("all"),
2226
+ offset: z18.coerce.number().int().min(0).max(1e6).default(0),
2227
+ limit: z18.coerce.number().int().min(1).max(100).default(25)
2228
+ });
2229
+ var accountProfileSchema = z18.object({
2230
+ name: z18.string().optional(),
2080
2231
  /** The account's handle, where the provider has one (X and Discord). */
2081
- username: z16.string().optional(),
2082
- email: z16.string().optional(),
2083
- emailVerified: z16.boolean().default(false),
2084
- imageUrl: z16.string().url().optional()
2232
+ username: z18.string().optional(),
2233
+ email: z18.string().optional(),
2234
+ emailVerified: z18.boolean().default(false),
2235
+ imageUrl: z18.string().url().optional()
2085
2236
  });
2086
- var memberAccountSchema = z16.object({
2237
+ var memberAccountSchema = z18.object({
2087
2238
  /** `wallet` for wallet sign-in, `account` for every other connected account. */
2088
- kind: z16.enum(["account", "wallet"]),
2089
- provider: z16.string(),
2090
- subject: z16.string(),
2091
- signInEnabled: z16.boolean(),
2092
- profile: accountProfileSchema.optional()
2093
- });
2094
- var operationSchema = z16.object({
2095
- target: z16.string(),
2096
- paused: z16.boolean(),
2097
- revision: z16.number().int(),
2098
- reason: z16.string(),
2099
- actor: z16.string().nullable(),
2100
- changedAt: z16.number()
2101
- });
2102
- var operationInputSchema = z16.object({
2103
- target: z16.union([
2104
- z16.literal("redemptions"),
2105
- z16.string().regex(/^quest:[\w-]+$/)
2239
+ kind: z18.enum(["account", "wallet"]),
2240
+ provider: z18.string(),
2241
+ subject: z18.string(),
2242
+ signInEnabled: z18.boolean(),
2243
+ profile: accountProfileSchema.optional(),
2244
+ /**
2245
+ * Present only for accounts Relay reads in the background with the member's own tokens:
2246
+ * `needs-reconnect` once those tokens stopped working, until the member links the account again.
2247
+ */
2248
+ status: z18.enum(["connected", "needs-reconnect"]).optional(),
2249
+ /**
2250
+ * Why the account needs reconnecting: the member or the provider revoked access (`revoked`),
2251
+ * the tokens expired and cannot be refreshed (`expired`), or a source needs a permission the
2252
+ * member did not grant (`missing-scope`).
2253
+ */
2254
+ reason: z18.enum(["revoked", "expired", "missing-scope"]).optional()
2255
+ });
2256
+ var operationSchema = z18.object({
2257
+ target: z18.string(),
2258
+ paused: z18.boolean(),
2259
+ revision: z18.number().int(),
2260
+ reason: z18.string(),
2261
+ actor: z18.string().nullable(),
2262
+ changedAt: z18.number()
2263
+ });
2264
+ var operationInputSchema = z18.object({
2265
+ target: z18.union([
2266
+ z18.literal("redemptions"),
2267
+ z18.string().regex(/^quest:[\w-]+$/)
2106
2268
  ]),
2107
- paused: z16.boolean(),
2108
- revision: z16.number().int().nonnegative(),
2109
- reason: z16.string().trim().min(1).max(500),
2269
+ paused: z18.boolean(),
2270
+ revision: z18.number().int().nonnegative(),
2271
+ reason: z18.string().trim().min(1).max(500),
2110
2272
  actionId: identifier
2111
2273
  }).strict();
2112
- var questLifecycleInputSchema = z16.object({
2274
+ var questLifecycleInputSchema = z18.object({
2113
2275
  quest: identifier,
2114
2276
  expectedRelease: identifier.optional(),
2115
- archived: z16.boolean(),
2116
- reason: z16.string().trim().min(1).max(500),
2277
+ archived: z18.boolean(),
2278
+ reason: z18.string().trim().min(1).max(500),
2117
2279
  actionId: identifier
2118
2280
  }).strict();
2119
- var questLifecycleSchema = z16.object({
2281
+ var questLifecycleSchema = z18.object({
2120
2282
  quest: identifier,
2121
2283
  key: identifier.nullable(),
2122
- title: z16.string(),
2284
+ title: z18.string(),
2123
2285
  release: identifier,
2124
- lifecycle: z16.enum(["active", "paused", "archived"]),
2125
- changed: z16.boolean()
2126
- });
2127
- var memberSchema = z16.object({
2128
- id: z16.string(),
2129
- test: z16.boolean().optional(),
2130
- name: z16.string().nullable().optional(),
2131
- accounts: z16.array(memberAccountSchema).default([]),
2132
- attempts: z16.number(),
2133
- completions: z16.number(),
2134
- rewards: z16.number(),
2135
- lastActivity: z16.number().nullable()
2136
- });
2137
- var personSchema = z16.object({
2138
- id: z16.string(),
2139
- test: z16.boolean().optional(),
2140
- name: z16.string().nullable().optional(),
2141
- accounts: z16.array(memberAccountSchema).default([])
2142
- });
2143
- var metricsSchema = z16.object({
2144
- quests: z16.number(),
2145
- members: z16.number(),
2146
- attempts: z16.number(),
2147
- completions: z16.number(),
2148
- review: z16.number(),
2149
- failed: z16.number(),
2150
- entitlements: z16.number()
2151
- });
2152
- var readinessSchema = z16.object({
2153
- checks: z16.array(
2154
- z16.object({
2155
- id: z16.string(),
2156
- status: z16.enum(["ready", "blocked"]),
2157
- title: z16.string(),
2158
- detail: z16.string()
2286
+ lifecycle: z18.enum(["active", "paused", "archived"]),
2287
+ changed: z18.boolean()
2288
+ });
2289
+ var memberSchema = z18.object({
2290
+ id: z18.string(),
2291
+ test: z18.boolean().optional(),
2292
+ name: z18.string().nullable().optional(),
2293
+ accounts: z18.array(memberAccountSchema).default([]),
2294
+ attempts: z18.number(),
2295
+ completions: z18.number(),
2296
+ rewards: z18.number(),
2297
+ lastActivity: z18.number().nullable()
2298
+ });
2299
+ var personSchema = z18.object({
2300
+ id: z18.string(),
2301
+ test: z18.boolean().optional(),
2302
+ name: z18.string().nullable().optional(),
2303
+ accounts: z18.array(memberAccountSchema).default([])
2304
+ });
2305
+ var metricsSchema = z18.object({
2306
+ quests: z18.number(),
2307
+ members: z18.number(),
2308
+ attempts: z18.number(),
2309
+ completions: z18.number(),
2310
+ review: z18.number(),
2311
+ failed: z18.number(),
2312
+ entitlements: z18.number()
2313
+ });
2314
+ var readinessSchema = z18.object({
2315
+ checks: z18.array(
2316
+ z18.object({
2317
+ id: z18.string(),
2318
+ status: z18.enum(["ready", "blocked"]),
2319
+ title: z18.string(),
2320
+ detail: z18.string()
2159
2321
  })
2160
2322
  )
2161
2323
  });
2162
- var inventorySchema = z16.object({
2163
- item: z16.string(),
2164
- name: z16.string().nullable().default(null),
2165
- available: z16.number(),
2166
- reserved: z16.number(),
2167
- allocated: z16.number().default(0)
2168
- });
2169
- var auditRecordSchema = z16.object({
2170
- id: z16.string(),
2171
- action: z16.string(),
2172
- actor: z16.string().nullable(),
2324
+ var inventorySchema = z18.object({
2325
+ item: z18.string(),
2326
+ name: z18.string().nullable().default(null),
2327
+ available: z18.number(),
2328
+ reserved: z18.number(),
2329
+ allocated: z18.number().default(0)
2330
+ });
2331
+ var auditRecordSchema = z18.object({
2332
+ id: z18.string(),
2333
+ action: z18.string(),
2334
+ actor: z18.string().nullable(),
2173
2335
  user: operatorUserSchema.nullable().optional(),
2174
- detail: z16.string(),
2175
- at: z16.number(),
2176
- attempt: z16.string().nullable()
2336
+ detail: z18.string(),
2337
+ at: z18.number(),
2338
+ attempt: z18.string().nullable()
2177
2339
  }).refine((record6) => !record6.user || record6.user.id === record6.actor, {
2178
2340
  message: "User profile must match the recorded actor",
2179
2341
  path: ["user"]
2180
2342
  });
2181
- var pageSchema = z16.object({
2343
+ var pageSchema = z18.object({
2182
2344
  snapshot: snapshotSchema,
2183
- members: z16.array(memberSchema),
2184
- people: z16.array(personSchema).default([]),
2345
+ members: z18.array(memberSchema),
2346
+ people: z18.array(personSchema).default([]),
2185
2347
  metrics: metricsSchema,
2186
- total: z16.number(),
2187
- offset: z16.number(),
2188
- limit: z16.number(),
2189
- inventory: z16.array(inventorySchema),
2190
- operations: z16.array(operationSchema).default([]),
2191
- audit: z16.array(auditRecordSchema).default([]),
2192
- questCounts: z16.record(z16.string(), z16.number())
2193
- });
2194
- var managedOAuthAccountBaseSchema = z16.object({
2195
- provider: z16.enum(["x", "discord"]),
2196
- revision: z16.number().int().nonnegative()
2197
- });
2198
- var managedOAuthAccountSchema = z16.discriminatedUnion("status", [
2348
+ total: z18.number(),
2349
+ offset: z18.number(),
2350
+ limit: z18.number(),
2351
+ inventory: z18.array(inventorySchema),
2352
+ operations: z18.array(operationSchema).default([]),
2353
+ audit: z18.array(auditRecordSchema).default([]),
2354
+ questCounts: z18.record(z18.string(), z18.number())
2355
+ });
2356
+ var managedOAuthAccountBaseSchema = z18.object({
2357
+ provider: z18.enum(["x", "discord"]),
2358
+ revision: z18.number().int().nonnegative()
2359
+ });
2360
+ var managedOAuthAccountSchema = z18.discriminatedUnion("status", [
2199
2361
  managedOAuthAccountBaseSchema.extend({
2200
- status: z16.literal("connected"),
2201
- subject: z16.string().min(1),
2202
- linkedAt: z16.number(),
2362
+ status: z18.literal("connected"),
2363
+ subject: z18.string().min(1),
2364
+ linkedAt: z18.number(),
2203
2365
  /**
2204
2366
  * True when a member import attached the account with the organization's word for it, not the
2205
2367
  * member's proof. Absent from Relay versions without imports.
2206
2368
  */
2207
- imported: z16.boolean().optional(),
2369
+ imported: z18.boolean().optional(),
2208
2370
  /**
2209
2371
  * True for a real account an operator linked to a test member without OAuth
2210
2372
  * (`testMembers.linkAccount`). Absent from Relay versions without it.
2211
2373
  */
2212
- testLinked: z16.boolean().optional()
2374
+ testLinked: z18.boolean().optional()
2213
2375
  }),
2214
- managedOAuthAccountBaseSchema.extend({ status: z16.literal("disconnected") })
2376
+ managedOAuthAccountBaseSchema.extend({ status: z18.literal("disconnected") })
2215
2377
  ]);
2216
2378
  var managedTelegramAccountBaseSchema = managedOAuthAccountBaseSchema.extend({
2217
- provider: z16.literal("telegram")
2379
+ provider: z18.literal("telegram")
2218
2380
  });
2219
- var managedTelegramAccountSchema = z16.discriminatedUnion("status", [
2381
+ var managedTelegramAccountSchema = z18.discriminatedUnion("status", [
2220
2382
  managedTelegramAccountBaseSchema.extend({
2221
- status: z16.literal("connected"),
2383
+ status: z18.literal("connected"),
2222
2384
  /** The numeric Telegram user ID. */
2223
- subject: z16.string().min(1),
2224
- linkedAt: z16.number()
2385
+ subject: z18.string().min(1),
2386
+ linkedAt: z18.number()
2225
2387
  }),
2226
2388
  managedTelegramAccountBaseSchema.extend({
2227
- status: z16.literal("disconnected")
2389
+ status: z18.literal("disconnected")
2228
2390
  })
2229
2391
  ]);
2230
- var memberOAuthUnlinkInputSchema = z16.object({
2231
- provider: z16.enum(["x", "discord"]),
2232
- subject: z16.string().min(1).max(4096),
2233
- revision: z16.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
2234
- reason: z16.string().trim().min(1).max(500)
2392
+ var memberOAuthUnlinkInputSchema = z18.object({
2393
+ provider: z18.enum(["x", "discord"]),
2394
+ subject: z18.string().min(1).max(4096),
2395
+ revision: z18.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
2396
+ reason: z18.string().trim().min(1).max(500)
2235
2397
  }).strict();
2236
2398
  var memberTelegramUnlinkInputSchema = memberOAuthUnlinkInputSchema.omit({ provider: true }).strict();
2237
2399
  var managedWalletSchema = linkedWalletSchema.extend({
@@ -2239,32 +2401,32 @@ var managedWalletSchema = linkedWalletSchema.extend({
2239
2401
  * True when a member import attached the wallet with the organization's word for it, and the
2240
2402
  * member has not proved it since. Absent from Relay versions without imports.
2241
2403
  */
2242
- imported: z16.boolean().optional(),
2243
- status: z16.enum(["linked", "unlinked"]),
2244
- unlinkedAt: z16.number().int().nullable(),
2404
+ imported: z18.boolean().optional(),
2405
+ status: z18.enum(["linked", "unlinked"]),
2406
+ unlinkedAt: z18.number().int().nullable(),
2245
2407
  /** "member", or the operator or key that unlinked it. */
2246
- unlinkedBy: z16.string().nullable()
2408
+ unlinkedBy: z18.string().nullable()
2247
2409
  });
2248
2410
  var managedMemberIdentitySchema = memberIdentitySchema.extend({
2249
2411
  /**
2250
2412
  * True for an X account a member import attached, until the member links or signs in with it
2251
2413
  * through X. Absent from Relay versions without imports.
2252
2414
  */
2253
- imported: z16.boolean().optional(),
2415
+ imported: z18.boolean().optional(),
2254
2416
  /**
2255
2417
  * True for a real X or Discord account an operator linked to a test member without OAuth
2256
2418
  * (`testMembers.linkAccount`). Absent from Relay versions without it.
2257
2419
  */
2258
- testLinked: z16.boolean().optional(),
2259
- status: z16.enum(["linked", "unlinked"]),
2260
- unlinkedAt: z16.number().int().nullable(),
2420
+ testLinked: z18.boolean().optional(),
2421
+ status: z18.enum(["linked", "unlinked"]),
2422
+ unlinkedAt: z18.number().int().nullable(),
2261
2423
  /** The operator or key that unlinked it. */
2262
- unlinkedBy: z16.string().nullable()
2424
+ unlinkedBy: z18.string().nullable()
2263
2425
  });
2264
- var memberIdentityChangeInputSchema = z16.object({
2426
+ var memberIdentityChangeInputSchema = z18.object({
2265
2427
  kind: appIdentityKindSchema,
2266
- subject: z16.string().min(1).max(256),
2267
- reason: z16.string().trim().min(1).max(500)
2428
+ subject: z18.string().min(1).max(256),
2429
+ reason: z18.string().trim().min(1).max(500)
2268
2430
  }).strict();
2269
2431
  var balanceCheckSchema = walletBalanceSchema.pick({
2270
2432
  chain: true,
@@ -2274,76 +2436,76 @@ var balanceCheckSchema = walletBalanceSchema.pick({
2274
2436
  wallets: true,
2275
2437
  observedAt: true
2276
2438
  }).extend({ attempt: identifier });
2277
- var walletBalanceChainsSchema = z16.object({
2278
- chains: z16.array(
2279
- z16.object({
2280
- chain: z16.union([
2281
- z16.literal(solanaMainnet),
2439
+ var walletBalanceChainsSchema = z18.object({
2440
+ chains: z18.array(
2441
+ z18.object({
2442
+ chain: z18.union([
2443
+ z18.literal(solanaMainnet),
2282
2444
  cosmosNetworkSchema,
2283
2445
  evmChainIdSchema
2284
2446
  ]),
2285
- name: z16.string(),
2286
- testnet: z16.boolean()
2447
+ name: z18.string(),
2448
+ testnet: z18.boolean()
2287
2449
  })
2288
2450
  )
2289
2451
  });
2290
- var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason: z16.string().trim().min(1).max(500) }).strict();
2452
+ var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason: z18.string().trim().min(1).max(500) }).strict();
2291
2453
  var memberWalletSignInInputSchema = walletUnlinkInputSchema.extend({
2292
- enabled: z16.boolean(),
2293
- reason: z16.string().trim().min(1).max(500)
2454
+ enabled: z18.boolean(),
2455
+ reason: z18.string().trim().min(1).max(500)
2294
2456
  }).strict();
2295
- var telegramBotIdSchema = z16.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789");
2296
- var participantSignInSchema = z16.object({
2297
- providers: z16.array(
2298
- z16.object({ provider: authProviderSchema, configured: z16.boolean() })
2457
+ var telegramBotIdSchema = z18.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789");
2458
+ var participantSignInSchema = z18.object({
2459
+ providers: z18.array(
2460
+ z18.object({ provider: authProviderSchema, configured: z18.boolean() })
2299
2461
  ),
2300
- email: z16.boolean(),
2462
+ email: z18.boolean(),
2301
2463
  /** Wallet families: `"solana"`, `"eip155"`, `"cosmos"`. */
2302
2464
  wallets: walletSignInNetworksSchema,
2303
2465
  /** Why participants cannot sign in to this project, or null. */
2304
- issue: z16.string().nullable(),
2466
+ issue: z18.string().nullable(),
2305
2467
  /**
2306
2468
  * Telegram, outside `providers` in SDK 1.x: whether Domino configured Telegram Login, and the
2307
2469
  * bot whose Mini App participants sign in from, or null when Mini App sign-in is off. Absent
2308
2470
  * from Relay versions without Telegram.
2309
2471
  */
2310
- telegram: z16.object({
2311
- login: z16.boolean(),
2472
+ telegram: z18.object({
2473
+ login: z18.boolean(),
2312
2474
  miniAppBotId: telegramBotIdSchema.nullable()
2313
2475
  }).optional(),
2314
- updatedAt: z16.number().nullable(),
2315
- updatedBy: z16.string().nullable()
2476
+ updatedAt: z18.number().nullable(),
2477
+ updatedBy: z18.string().nullable()
2316
2478
  });
2317
- var participantSignInInputSchema = z16.object({
2479
+ var participantSignInInputSchema = z18.object({
2318
2480
  wallets: walletSignInNetworksSchema,
2319
- telegram: z16.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
2481
+ telegram: z18.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
2320
2482
  }).strict();
2321
- var completionRevocationShortfallSchema = z16.object({
2483
+ var completionRevocationShortfallSchema = z18.object({
2322
2484
  completion: identifier,
2323
2485
  quest: identifier,
2324
- revokedAt: z16.number().int().nonnegative().safe(),
2325
- unreversedPoints: z16.record(identifier, z16.number().int().positive().safe())
2486
+ revokedAt: z18.number().int().nonnegative().safe(),
2487
+ unreversedPoints: z18.record(identifier, z18.number().int().positive().safe())
2326
2488
  });
2327
- var memberDetailSchema = z16.object({
2489
+ var memberDetailSchema = z18.object({
2328
2490
  snapshot: snapshotSchema,
2329
2491
  member: memberSchema,
2330
2492
  progress: memberProgressSchema,
2331
2493
  /** Up to 25 revoked completions with an unreversed point remainder, newest first. */
2332
- revocationShortfalls: z16.array(completionRevocationShortfallSchema).default([]),
2494
+ revocationShortfalls: z18.array(completionRevocationShortfallSchema).default([]),
2333
2495
  /** Current and historical campaign enrollment state, including inactive enrollments. */
2334
- campaignEnrollments: z16.array(campaignEnrollmentSchema).default([]),
2335
- passes: z16.array(
2336
- z16.object({
2337
- provider: z16.string(),
2338
- event: z16.string(),
2339
- subject: z16.string(),
2496
+ campaignEnrollments: z18.array(campaignEnrollmentSchema).default([]),
2497
+ passes: z18.array(
2498
+ z18.object({
2499
+ provider: z18.string(),
2500
+ event: z18.string(),
2501
+ subject: z18.string(),
2340
2502
  attempt: identifier.nullable()
2341
2503
  })
2342
2504
  ).default([]),
2343
2505
  /** Linked and unlinked wallets. */
2344
- wallets: z16.array(managedWalletSchema),
2506
+ wallets: z18.array(managedWalletSchema),
2345
2507
  /** The member's 10 most recent recorded balance reads, newest first. */
2346
- balanceChecks: z16.array(balanceCheckSchema),
2508
+ balanceChecks: z18.array(balanceCheckSchema),
2347
2509
  /** The member's participant profile in this project. */
2348
2510
  profile: managedProfileSchema.nullable(),
2349
2511
  /**
@@ -2351,11 +2513,11 @@ var memberDetailSchema = z16.object({
2351
2513
  * member ID: their selected X and Discord accounts and their `app:<name>` identities in this
2352
2514
  * project, including app identities an operator unlinked, by kind.
2353
2515
  */
2354
- identities: z16.array(managedMemberIdentitySchema)
2516
+ identities: z18.array(managedMemberIdentitySchema)
2355
2517
  });
2356
- var managedMemberProgressSchema = z16.object({
2518
+ var managedMemberProgressSchema = z18.object({
2357
2519
  member: identifier,
2358
- quests: z16.array(
2520
+ quests: z18.array(
2359
2521
  memberProgressSchema.shape.quests.element.extend({
2360
2522
  /** The streak as `members.get` reports it, without the list of qualifying days. */
2361
2523
  streak: streakProgressSchema.omit({ days: true }).nullable().optional()
@@ -2366,156 +2528,172 @@ var managedMemberProgressSchema = z16.object({
2366
2528
  /** Each point balance the member has, by balance ID. */
2367
2529
  balances: snapshotSchema.shape.balances
2368
2530
  });
2369
- var stockInputSchema = z16.object({
2531
+ var stockInputSchema = z18.object({
2370
2532
  item: identifier,
2371
- quantity: z16.number().int().positive().max(1e6),
2533
+ quantity: z18.number().int().positive().max(1e6),
2372
2534
  actionId: identifier
2373
2535
  }).strict();
2374
- var ingestTrackerScopeSchema = z16.array(identifier).min(1).max(100).nullable();
2375
- var tokenScopeInputSchema = z16.object({ ingestTrackers: ingestTrackerScopeSchema }).strict();
2376
- var tokenInputSchema = z16.object({
2377
- name: z16.string().trim().min(1).max(80),
2536
+ var ingestTrackerScopeSchema = z18.array(identifier).min(1).max(100).nullable();
2537
+ var tokenScopeInputSchema = z18.object({ ingestTrackers: ingestTrackerScopeSchema }).strict();
2538
+ var tokenInputSchema = z18.object({
2539
+ name: z18.string().trim().min(1).max(80),
2378
2540
  project: identifier,
2379
2541
  environment: environmentSchema,
2380
- permissions: z16.array(permissionSchema).min(1),
2542
+ permissions: z18.array(permissionSchema).min(1),
2381
2543
  ingestTrackers: ingestTrackerScopeSchema.optional(),
2382
- days: z16.number().int().min(1).max(90).default(30)
2544
+ days: z18.number().int().min(1).max(90).default(30)
2383
2545
  }).strict();
2384
- var tokenSchema = z16.object({
2385
- id: z16.string(),
2386
- name: z16.string(),
2387
- project: z16.string(),
2546
+ var tokenSchema = z18.object({
2547
+ id: z18.string(),
2548
+ name: z18.string(),
2549
+ project: z18.string(),
2388
2550
  environment: environmentSchema,
2389
2551
  permissions: permissionListSchema,
2390
2552
  ingestTrackers: ingestTrackerScopeSchema.optional(),
2391
- expiresAt: z16.number()
2553
+ expiresAt: z18.number()
2392
2554
  });
2393
- var issuedTokenSchema = tokenSchema.extend({ token: z16.string() });
2394
- var serviceKeyInputSchema = z16.object({
2395
- name: z16.string().trim().min(1).max(80),
2396
- permissions: z16.array(permissionSchema).min(1).refine(
2555
+ var issuedTokenSchema = tokenSchema.extend({ token: z18.string() });
2556
+ var serviceKeyInputSchema = z18.object({
2557
+ name: z18.string().trim().min(1).max(80),
2558
+ permissions: z18.array(permissionSchema).min(1).refine(
2397
2559
  (permissions) => !permissions.includes("access"),
2398
2560
  "Service keys cannot hold the access permission"
2399
2561
  ),
2400
2562
  /** Days until the first secret expires. Omit it for a key that never expires. */
2401
- expiresInDays: z16.number().int().min(1).max(3650).optional()
2563
+ expiresInDays: z18.number().int().min(1).max(3650).optional()
2402
2564
  }).strict();
2403
- var serviceKeySchema = z16.object({
2404
- id: z16.string().uuid(),
2405
- organization: z16.string(),
2406
- project: z16.string(),
2565
+ var serviceKeySchema = z18.object({
2566
+ id: z18.string().uuid(),
2567
+ organization: z18.string(),
2568
+ project: z18.string(),
2407
2569
  environment: environmentSchema,
2408
- name: z16.string(),
2570
+ name: z18.string(),
2409
2571
  permissions: permissionListSchema,
2410
2572
  /** The Clerk user ID of the administrator who created it. */
2411
- createdBy: z16.string(),
2412
- createdAt: z16.number(),
2573
+ createdBy: z18.string(),
2574
+ createdAt: z18.number(),
2413
2575
  /** The latest use of any of its secrets, revoked ones included; null when none was used. */
2414
- lastUsedAt: z16.number().nullable(),
2576
+ lastUsedAt: z18.number().nullable(),
2415
2577
  /** Its working secrets, oldest first. Any of them authenticates the key. */
2416
- secrets: z16.array(credentialSecretSchema)
2578
+ secrets: z18.array(credentialSecretSchema)
2417
2579
  });
2418
2580
  var issuedServiceKeySchema = serviceKeySchema.extend({
2419
- secret: z16.string().uuid(),
2420
- token: z16.string()
2581
+ secret: z18.string().uuid(),
2582
+ token: z18.string()
2421
2583
  });
2422
- var teamSchema = z16.array(
2423
- z16.object({ id: z16.string(), label: z16.string() })
2584
+ var teamSchema = z18.array(
2585
+ z18.object({ id: z18.string(), label: z18.string() })
2424
2586
  );
2425
- var memberLookupSchema = z16.object({
2426
- provider: z16.string().min(1).max(200),
2427
- subject: z16.string().min(1).max(2048)
2587
+ var memberLookupSchema = z18.object({
2588
+ provider: z18.string().min(1).max(200),
2589
+ subject: z18.string().min(1).max(2048)
2428
2590
  }).strict();
2429
- var booleanQuery = z16.union([
2430
- z16.boolean(),
2431
- z16.enum(["true", "false"]).transform((v) => v === "true")
2591
+ var booleanQuery = z18.union([
2592
+ z18.boolean(),
2593
+ z18.enum(["true", "false"]).transform((v) => v === "true")
2432
2594
  ]);
2433
- var managedMemberQuerySchema = z16.strictObject({
2434
- q: z16.string().max(200).optional(),
2595
+ var managedMemberQuerySchema = z18.strictObject({
2596
+ q: z18.string().max(200).optional(),
2435
2597
  needsReview: booleanQuery.optional(),
2436
- limit: z16.coerce.number().int().min(1).max(100).optional(),
2598
+ limit: z18.coerce.number().int().min(1).max(100).optional(),
2437
2599
  cursor: pageCursorSchema.optional()
2438
2600
  });
2439
- var managedMemberPageSchema = z16.object({
2440
- items: z16.array(memberSchema),
2441
- total: z16.number().int().nonnegative(),
2442
- nextCursor: z16.string().nullable()
2601
+ var managedMemberPageSchema = z18.object({
2602
+ items: z18.array(memberSchema),
2603
+ total: z18.number().int().nonnegative(),
2604
+ nextCursor: z18.string().nullable()
2605
+ });
2606
+ var activeMemberMonthSchema = z18.object({
2607
+ /** `YYYY-MM`, in UTC. */
2608
+ month: z18.string(),
2609
+ activeMembers: z18.number().int().nonnegative()
2610
+ });
2611
+ var activeMemberUsageSchema = activeMemberMonthSchema.extend({
2612
+ plan: z18.string(),
2613
+ limit: z18.number().int().nonnegative().nullable(),
2614
+ history: z18.array(activeMemberMonthSchema)
2615
+ });
2616
+ var realPeopleInTestUsageSchema = z18.object({
2617
+ realPeople: z18.number().int().nonnegative(),
2618
+ plan: z18.string(),
2619
+ limit: z18.number().int().nonnegative(),
2620
+ enforced: z18.boolean()
2443
2621
  });
2444
2622
  var projectMetricsSchema = metricsSchema.extend({
2445
- completionsByQuest: z16.array(
2446
- z16.object({ quest: identifier, completions: z16.number() })
2623
+ completionsByQuest: z18.array(
2624
+ z18.object({ quest: identifier, completions: z18.number() })
2447
2625
  )
2448
2626
  });
2449
- var pageLimit = z16.coerce.number().int().min(1).max(100).optional();
2450
- var managedAttemptQuerySchema = z16.strictObject({
2451
- q: z16.string().max(200).optional(),
2627
+ var pageLimit = z18.coerce.number().int().min(1).max(100).optional();
2628
+ var managedAttemptQuerySchema = z18.strictObject({
2629
+ q: z18.string().max(200).optional(),
2452
2630
  quest: identifier.optional(),
2453
- status: z16.string().min(1).max(50).optional(),
2631
+ status: z18.string().min(1).max(50).optional(),
2454
2632
  limit: pageLimit,
2455
2633
  cursor: pageCursorSchema.optional()
2456
2634
  });
2457
- var managedAttemptPageSchema = z16.object({
2458
- items: z16.array(attemptSchema),
2459
- releases: z16.array(publishedReleaseSchema),
2460
- people: z16.array(personSchema),
2461
- total: z16.number().int().nonnegative(),
2462
- nextCursor: z16.string().nullable()
2635
+ var managedAttemptPageSchema = z18.object({
2636
+ items: z18.array(attemptSchema),
2637
+ releases: z18.array(publishedReleaseSchema),
2638
+ people: z18.array(personSchema),
2639
+ total: z18.number().int().nonnegative(),
2640
+ nextCursor: z18.string().nullable()
2463
2641
  });
2464
- var managedReleaseQuerySchema = z16.strictObject({
2642
+ var managedReleaseQuerySchema = z18.strictObject({
2465
2643
  quest: identifier.optional(),
2466
2644
  limit: pageLimit,
2467
2645
  cursor: pageCursorSchema.optional()
2468
2646
  });
2469
- var managedReleasePageSchema = z16.object({
2470
- items: z16.array(publishedReleaseSchema),
2471
- nextCursor: z16.string().nullable()
2647
+ var managedReleasePageSchema = z18.object({
2648
+ items: z18.array(publishedReleaseSchema),
2649
+ nextCursor: z18.string().nullable()
2472
2650
  });
2473
- var managedAttemptSchema = z16.object({
2651
+ var managedAttemptSchema = z18.object({
2474
2652
  attempt: attemptSchema,
2475
2653
  release: publishedReleaseSchema.nullable(),
2476
- events: z16.array(eventSchema),
2654
+ events: z18.array(eventSchema),
2477
2655
  person: personSchema
2478
2656
  });
2479
- var managedEntitlementQuerySchema = z16.strictObject({
2480
- q: z16.string().max(200).optional(),
2481
- status: z16.string().min(1).max(50).optional(),
2657
+ var managedEntitlementQuerySchema = z18.strictObject({
2658
+ q: z18.string().max(200).optional(),
2659
+ status: z18.string().min(1).max(50).optional(),
2482
2660
  limit: pageLimit,
2483
2661
  cursor: pageCursorSchema.optional()
2484
2662
  });
2485
- var managedEntitlementPageSchema = z16.object({
2486
- items: z16.array(entitlementSchema),
2487
- people: z16.array(personSchema),
2488
- total: z16.number().int().nonnegative(),
2489
- nextCursor: z16.string().nullable()
2663
+ var managedEntitlementPageSchema = z18.object({
2664
+ items: z18.array(entitlementSchema),
2665
+ people: z18.array(personSchema),
2666
+ total: z18.number().int().nonnegative(),
2667
+ nextCursor: z18.string().nullable()
2490
2668
  });
2491
- var managedEntitlementSchema = z16.object({
2669
+ var managedEntitlementSchema = z18.object({
2492
2670
  entitlement: entitlementSchema,
2493
2671
  person: personSchema
2494
2672
  });
2495
2673
  var managedStockItemSchema = inventorySchema.extend({
2496
- offers: z16.array(identifier)
2674
+ offers: z18.array(identifier)
2497
2675
  });
2498
- var auditQuerySchema = z16.strictObject({
2499
- category: z16.enum(["reviews", "rewards", "configuration"]).optional(),
2500
- q: z16.string().max(200).optional(),
2676
+ var auditQuerySchema = z18.strictObject({
2677
+ category: z18.enum(["reviews", "rewards", "configuration"]).optional(),
2678
+ q: z18.string().max(200).optional(),
2501
2679
  limit: pageLimit,
2502
2680
  cursor: pageCursorSchema.optional()
2503
2681
  });
2504
2682
  var auditListQuerySchema = auditQuerySchema.extend({
2505
- category: z16.enum(["reviews", "rewards", "configuration", "test-members"]).optional()
2683
+ category: z18.enum(["reviews", "rewards", "configuration", "test-members"]).optional()
2506
2684
  });
2507
2685
  var accessHistoryQuerySchema = auditQuerySchema.omit({
2508
2686
  category: true
2509
2687
  });
2510
- var auditPageSchema = z16.object({
2511
- items: z16.array(auditRecordSchema),
2512
- total: z16.number().int().nonnegative(),
2513
- nextCursor: z16.string().nullable()
2688
+ var auditPageSchema = z18.object({
2689
+ items: z18.array(auditRecordSchema),
2690
+ total: z18.number().int().nonnegative(),
2691
+ nextCursor: z18.string().nullable()
2514
2692
  });
2515
- var verifiedPassSchema = z16.object({
2693
+ var verifiedPassSchema = z18.object({
2516
2694
  provider: identifier,
2517
2695
  event: identifier,
2518
- subject: z16.string().min(1).max(2048),
2696
+ subject: z18.string().min(1).max(2048),
2519
2697
  member: identifier,
2520
2698
  quest: identifier
2521
2699
  }).strict();
@@ -2532,6 +2710,18 @@ function queryString(values) {
2532
2710
  ).toString();
2533
2711
  return query ? "?" + query : "";
2534
2712
  }
2713
+ function analyticsMetricQueryString(input) {
2714
+ const { filter, ...query } = analyticsMetricQuerySchema.parse(input);
2715
+ return queryString({
2716
+ ...query,
2717
+ ...Object.fromEntries(
2718
+ Object.entries(filter ?? {}).map(([name, keys]) => [
2719
+ `filter.${name}`,
2720
+ [].concat(keys).join(",")
2721
+ ])
2722
+ )
2723
+ });
2724
+ }
2535
2725
  function clientFailure(error) {
2536
2726
  if (error instanceof ManagementError) {
2537
2727
  return error;
@@ -2539,7 +2729,7 @@ function clientFailure(error) {
2539
2729
  return new ManagementError({
2540
2730
  kind: "client",
2541
2731
  code: ManagementErrorCode.InvalidInput,
2542
- message: error instanceof z16.ZodError ? `Invalid management request: ${z16.prettifyError(error)}` : error instanceof Error ? error.message : "Invalid management request",
2732
+ message: error instanceof z18.ZodError ? `Invalid management request: ${z18.prettifyError(error)}` : error instanceof Error ? error.message : "Invalid management request",
2543
2733
  cause: error
2544
2734
  });
2545
2735
  }
@@ -2577,7 +2767,7 @@ function managementClient(options) {
2577
2767
  call
2578
2768
  );
2579
2769
  }
2580
- const ok = z16.object({ ok: z16.literal(true) });
2770
+ const ok = z18.object({ ok: z18.literal(true) });
2581
2771
  function pointHistory(member, ledger, query = {}, call) {
2582
2772
  return get(
2583
2773
  `/points/${identifier.parse(member)}/${identifier.parse(ledger)}/history${queryString(typeof query === "number" ? { before: query } : pageQuerySchema.parse(query))}`,
@@ -2662,7 +2852,7 @@ function managementClient(options) {
2662
2852
  const input = isInput ? inputOrCall ?? {} : {};
2663
2853
  const options2 = isInput ? call : inputOrCall;
2664
2854
  return post(
2665
- `/webhooks/${z16.string().uuid().parse(id)}/rotate-secret`,
2855
+ `/webhooks/${z18.string().uuid().parse(id)}/rotate-secret`,
2666
2856
  webhookSecretSchema,
2667
2857
  webhookRotateInputSchema.parse(withActionId(input)),
2668
2858
  options2
@@ -2710,8 +2900,8 @@ function managementClient(options) {
2710
2900
  }
2711
2901
  return exchange(
2712
2902
  path,
2713
- z16.object({
2714
- status: z16.number(),
2903
+ z18.object({
2904
+ status: z18.number(),
2715
2905
  operationId: identifier.optional(),
2716
2906
  result: schema
2717
2907
  }),
@@ -2766,7 +2956,7 @@ function managementClient(options) {
2766
2956
  call
2767
2957
  ),
2768
2958
  ...resourceArchiveMethods("tracker"),
2769
- list: (call) => get("/trackers", z16.array(trackerStatusSchema), call),
2959
+ list: (call) => get("/trackers", z18.array(trackerStatusSchema), call),
2770
2960
  get: (reference, call) => get(
2771
2961
  `/trackers/${identifier.parse(reference)}`,
2772
2962
  trackerStatusSchema,
@@ -2882,7 +3072,7 @@ function managementClient(options) {
2882
3072
  engagementPublishSchema.parse(withActionId(input)),
2883
3073
  call
2884
3074
  ),
2885
- list: (call) => get("/engagement", z16.array(engagementRuleSchema), call),
3075
+ list: (call) => get("/engagement", z18.array(engagementRuleSchema), call),
2886
3076
  page: (input, call) => get(
2887
3077
  "/engagement/history" + queryString(engagementPageQuerySchema.parse(input)),
2888
3078
  engagementPageSchema,
@@ -2902,7 +3092,7 @@ function managementClient(options) {
2902
3092
  )
2903
3093
  },
2904
3094
  badges: {
2905
- list: (call) => get("/badges", z16.array(managedBadgeSchema), call),
3095
+ list: (call) => get("/badges", z18.array(managedBadgeSchema), call),
2906
3096
  create: (input, call) => create("/badges", managedBadgeSchema, createBadgeSchema, input, call),
2907
3097
  update: (badge, input, call) => {
2908
3098
  const body = badgePropertiesSchema.extend(badgeMutationSchema.shape).parse(withActionId(input));
@@ -2945,7 +3135,7 @@ function managementClient(options) {
2945
3135
  },
2946
3136
  pointLedgers: {
2947
3137
  unarchive: (ledger, input, call) => archiveResource("point-ledger", ledger, false, input, call),
2948
- list: (call) => get("/point-ledgers", z16.array(managedPointLedgerSchema), call),
3138
+ list: (call) => get("/point-ledgers", z18.array(managedPointLedgerSchema), call),
2949
3139
  /**
2950
3140
  * Creates a point ledger, with a stable `key` when code refers to it; requires `publish`. In
2951
3141
  * live, only a person in Console can create one.
@@ -2975,7 +3165,7 @@ function managementClient(options) {
2975
3165
  },
2976
3166
  points: {
2977
3167
  /** @deprecated Use `pointLedgers.list()`, which reads the same ledgers. Removed in 2.0.0. */
2978
- ledgers: (call) => get("/point-ledgers", z16.array(managedPointLedgerSchema), call),
3168
+ ledgers: (call) => get("/point-ledgers", z18.array(managedPointLedgerSchema), call),
2979
3169
  /** @deprecated Use `pointLedgers.create(input)`. Removed in 2.0.0. */
2980
3170
  createLedger: createPointLedger,
2981
3171
  /**
@@ -3013,7 +3203,7 @@ function managementClient(options) {
3013
3203
  referralHistorySchema,
3014
3204
  call
3015
3205
  ),
3016
- list: (call) => get("/referrals", z16.array(publishedReferralSchema), call),
3206
+ list: (call) => get("/referrals", z18.array(publishedReferralSchema), call),
3017
3207
  participants: referralParticipants,
3018
3208
  /**
3019
3209
  * Suspends or restores a member's referral relationship, with a reason; requires `publish`.
@@ -3076,7 +3266,7 @@ function managementClient(options) {
3076
3266
  },
3077
3267
  leaderboards: {
3078
3268
  ...resourceArchiveMethods("leaderboard"),
3079
- list: (call) => get("/leaderboards", z16.array(publishedLeaderboardSchema), call),
3269
+ list: (call) => get("/leaderboards", z18.array(publishedLeaderboardSchema), call),
3080
3270
  standings: (board, input = {}, call) => {
3081
3271
  const query = leaderboardQuerySchema.parse(input);
3082
3272
  return get(
@@ -3090,13 +3280,13 @@ function managementClient(options) {
3090
3280
  },
3091
3281
  history: (board, call) => get(
3092
3282
  `/leaderboards/${identifier.parse(board)}/history`,
3093
- z16.array(publishedLeaderboardSchema),
3283
+ z18.array(publishedLeaderboardSchema),
3094
3284
  call
3095
3285
  ),
3096
3286
  /** Current members of the board's exclusion group (`exclusionGroup`), by member ID. */
3097
3287
  exclusions: (board, call) => get(
3098
3288
  `/leaderboards/${identifier.parse(board)}/exclusions`,
3099
- z16.array(z16.object({ member: identifier })),
3289
+ z18.array(z18.object({ member: identifier })),
3100
3290
  call
3101
3291
  ),
3102
3292
  /**
@@ -3142,7 +3332,7 @@ function managementClient(options) {
3142
3332
  leaderboardGroupSchema.parse(withActionId(input)),
3143
3333
  call
3144
3334
  ),
3145
- /** Pending, approved and rejected snapshots; requires read permission. */
3335
+ /** Closing, pending, approved and rejected snapshots; requires read permission. */
3146
3336
  settlementReviews: (reference, query = {}, call) => get(
3147
3337
  `/leaderboards/${identifier.parse(reference)}/settlement-reviews${queryString(leaderboardSettlementReviewQuerySchema.parse(query))}`,
3148
3338
  leaderboardSettlementReviewPageSchema,
@@ -3153,15 +3343,37 @@ function managementClient(options) {
3153
3343
  leaderboardSettlementReviewSchema,
3154
3344
  call
3155
3345
  ),
3346
+ /**
3347
+ * A settlement as a payout list: each frozen row's pool share, in base units and formatted,
3348
+ * with the member's verified linked wallets. Requires read permission.
3349
+ */
3350
+ settlementExport: (settlement, call) => get(
3351
+ `/leaderboard-settlements/${identifier.parse(settlement)}/export`,
3352
+ leaderboardSettlementExportSchema,
3353
+ call
3354
+ ),
3156
3355
  rejectSettlement: (settlement, input, call) => post(
3157
3356
  `/leaderboard-settlements/${identifier.parse(settlement)}/reject`,
3158
3357
  leaderboardSettlementReviewSchema,
3159
3358
  leaderboardSettlementRejectionSchema.parse(withActionId(input)),
3160
3359
  call
3161
3360
  ),
3361
+ /**
3362
+ * Takes the closing measurement again for the content a settlement froze without it (its
3363
+ * `unmeasured` list), or extends a closing settlement's wait. The settlement returns to
3364
+ * closing and freezes again when the measurement ends. Requires review permission.
3365
+ */
3366
+ retrySettlementMeasurement: (settlement, input = {}, call) => post(
3367
+ `/leaderboard-settlements/${identifier.parse(settlement)}/retry-measurement`,
3368
+ leaderboardSettlementReviewSchema,
3369
+ leaderboardSettlementMeasurementRetrySchema.parse(
3370
+ withActionId(input)
3371
+ ),
3372
+ call
3373
+ ),
3162
3374
  settlements: (board, call) => get(
3163
3375
  `/leaderboards/${identifier.parse(board)}/settlements`,
3164
- z16.array(leaderboardSettlementSummarySchema),
3376
+ z18.array(leaderboardSettlementSummarySchema),
3165
3377
  call
3166
3378
  ),
3167
3379
  settlement: (settlement, call) => get(
@@ -3246,7 +3458,7 @@ function managementClient(options) {
3246
3458
  *
3247
3459
  * @deprecated Use `history`, which pages by `cursor` and `nextCursor`. Removed in 2.0.0.
3248
3460
  */
3249
- list: (call) => get("/deployments", z16.array(deploymentRecordSchema), call),
3461
+ list: (call) => get("/deployments", z18.array(deploymentRecordSchema), call),
3250
3462
  /**
3251
3463
  * The project environment's deployments, newest first, one page at a time, with the two
3252
3464
  * newest published deployments beside every page. Pass a page's `nextCursor` back as
@@ -3381,10 +3593,149 @@ function managementClient(options) {
3381
3593
  call
3382
3594
  )
3383
3595
  },
3596
+ /**
3597
+ * The project's Stripe subscription, Checkout, plan changes and the organization's customer
3598
+ * portal. Everything but `read` needs an organization administrator, and while billing is
3599
+ * staff-only, Domino staff.
3600
+ */
3601
+ billing: {
3602
+ /** Whether billing is open to the caller, and the project's subscription when it is. */
3603
+ read: (call) => get("/billing", projectBillingSchema, call),
3604
+ /**
3605
+ * A Stripe Checkout page subscribing the project to `plan`, billed every `interval`. A project
3606
+ * with a subscription that still holds its plan is refused with `subscription-exists`.
3607
+ */
3608
+ checkout: (input, call) => post(
3609
+ "/billing/checkout",
3610
+ billingSessionSchema,
3611
+ billingCheckoutInputSchema.parse(input),
3612
+ call
3613
+ ),
3614
+ /**
3615
+ * Moves the project's subscription to `plan`, billed every `interval`: a higher plan or annual
3616
+ * billing now, prorated; a lower plan or monthly billing at the renewal. Refused without a
3617
+ * subscription that holds its plan (`no-subscription`) and while it is set to cancel
3618
+ * (`subscription-canceling`).
3619
+ */
3620
+ changePlan: (input, call) => post(
3621
+ "/billing/plan",
3622
+ billingPlanChangeSchema,
3623
+ billingPlanChangeInputSchema.parse(input),
3624
+ call
3625
+ ),
3626
+ /**
3627
+ * Sets the subscription to end when the period paid for ends; the project keeps its plan
3628
+ * until then. Drops a plan change held for the renewal.
3629
+ */
3630
+ cancel: (call) => post("/billing/cancel", projectBillingSchema, {}, call),
3631
+ /** Takes back a cancellation before the period ends. */
3632
+ resume: (call) => post("/billing/resume", projectBillingSchema, {}, call),
3633
+ /**
3634
+ * A Stripe Checkout page buying `quantity` packs of AI builder credit for the project, on any
3635
+ * plan; the credit is added once the payment is in.
3636
+ */
3637
+ topup: (input, call) => post(
3638
+ "/billing/topup",
3639
+ billingSessionSchema,
3640
+ billingTopupInputSchema.parse(input),
3641
+ call
3642
+ ),
3643
+ /** The Stripe customer portal for the organization's cards, invoices and billing details. */
3644
+ portal: (call) => post("/billing/portal", billingSessionSchema, {}, call)
3645
+ },
3646
+ /** What the project uses against its plan; requires `read` permission. */
3647
+ usage: {
3648
+ /** Live active members this UTC month, the plan's limit, and the previous six months. */
3649
+ activeMembers: (call) => get("/usage/active-members", activeMemberUsageSchema, call),
3650
+ /** Real people in the test environment, against the plan's limit. */
3651
+ realPeopleInTest: (call) => get("/usage/real-people-in-test", realPeopleInTestUsageSchema, call)
3652
+ },
3384
3653
  /** The project's headline counts; requires `read` permission. */
3385
3654
  metrics: {
3386
3655
  read: (call) => get("/metrics", projectMetricsSchema, call)
3387
3656
  },
3657
+ /** The project's activity over time, as Console's Analytics page shows it. */
3658
+ analytics: {
3659
+ /**
3660
+ * The project's members, quests, points, offers and referrals over one range (`7d`, `30d`,
3661
+ * `90d` or `all`), bucketed by project-calendar day or week, with totals for the range of
3662
+ * equal length before it; `ledger` picks the point ledger by key or ID. Requires `read`
3663
+ * permission.
3664
+ */
3665
+ read: (query, call) => get(
3666
+ `/analytics${queryString(analyticsQuerySchema.parse(query))}`,
3667
+ analyticsReadSchema,
3668
+ call
3669
+ ),
3670
+ /**
3671
+ * The closed metric catalog: every metric's ID, definition, breakdowns, filters, allowed
3672
+ * charts and whether it needs a point ledger. Requires `read` permission.
3673
+ */
3674
+ catalog: (call) => get("/analytics/catalog", analyticsCatalogSchema, call),
3675
+ /**
3676
+ * One catalog metric over a range, bucketed like `read`: its value and, with `breakdown`, a
3677
+ * row per quest, offer, program, source or reason, largest first, capped by `limit` (1 to
3678
+ * 100, default 100) with the rest summed into `other`. `filter` narrows to keys
3679
+ * (`{ quest: ["a", "b"], group: "vip" }`), and `ledger` names the point ledger a points
3680
+ * metric reads. A metric, breakdown or filter the catalog doesn't accept is a 422. Requires
3681
+ * `read` permission.
3682
+ */
3683
+ query: (query, call) => get(
3684
+ `/analytics/query${analyticsMetricQueryString(query)}`,
3685
+ analyticsMetricResultSchema,
3686
+ call
3687
+ )
3688
+ },
3689
+ /**
3690
+ * Dashboards defined in project code (`defineDashboard`), each a set of catalog metric
3691
+ * panels. They are deployed in test and promoted to live, and archived rather than deleted.
3692
+ */
3693
+ dashboards: {
3694
+ /**
3695
+ * The project's dashboards by position (those without one last), then title. Archived
3696
+ * dashboards are left out unless `includeArchived`. Requires `read` permission.
3697
+ */
3698
+ list: (query = {}, call) => {
3699
+ dashboardListQuerySchema.parse(query);
3700
+ return get(
3701
+ `/dashboards${queryString(query)}`,
3702
+ dashboardListSchema,
3703
+ call
3704
+ );
3705
+ },
3706
+ /**
3707
+ * One dashboard, archived ones included, with every panel's result over `range` (the
3708
+ * dashboard's `defaultRange` by default) in one response. A panel whose query fails, such as
3709
+ * on a group this environment lacks or a timeout, carries its own coded `error` and the
3710
+ * other panels still have results. Requires `read` permission.
3711
+ */
3712
+ read: (query, call) => {
3713
+ const { key, ...rest } = dashboardReadQuerySchema.parse(query);
3714
+ return get(
3715
+ `/dashboards/${key}${queryString(rest)}`,
3716
+ dashboardReadSchema,
3717
+ call
3718
+ );
3719
+ },
3720
+ /**
3721
+ * Archive a dashboard in test, with a reason the audit log records: it leaves `list` unless
3722
+ * `includeArchived`, stays readable, and stays archived when its code deploys again. Live
3723
+ * gets the change through a promotion. Requires `publish` permission.
3724
+ */
3725
+ archive: (key, input, call) => post(
3726
+ `/dashboards/${identifier.parse(key)}/archive`,
3727
+ dashboardLifecycleResultSchema,
3728
+ resourceArchiveInputSchema.parse(withActionId(input)),
3729
+ call
3730
+ ),
3731
+ /** Restore an archived dashboard in test. Requires `publish` permission. */
3732
+ unarchive: (key, input, call) => post(
3733
+ `/dashboards/${identifier.parse(key)}/unarchive`,
3734
+ dashboardLifecycleResultSchema,
3735
+ resourceArchiveInputSchema.parse(withActionId(input)),
3736
+ call
3737
+ )
3738
+ },
3388
3739
  /** Release history: every version a quest has been published as. */
3389
3740
  releases: {
3390
3741
  /**
@@ -3587,7 +3938,7 @@ function managementClient(options) {
3587
3938
  },
3588
3939
  operations: {
3589
3940
  /** Every paused or resumed operation: redemptions and each quest's participation; requires `read`. */
3590
- list: (call) => get("/operations", z16.array(operationSchema), call),
3941
+ list: (call) => get("/operations", z18.array(operationSchema), call),
3591
3942
  /**
3592
3943
  * Pauses or resumes redemptions or one quest's participation, against the `revision` the
3593
3944
  * operator saw, with a reason; requires `publish` permission.
@@ -3645,7 +3996,7 @@ function managementClient(options) {
3645
3996
  call
3646
3997
  ),
3647
3998
  /** Every stock item with its counts and the offers that sell it; requires `read` permission. */
3648
- list: (call) => get("/stock-items", z16.array(managedStockItemSchema), call),
3999
+ list: (call) => get("/stock-items", z18.array(managedStockItemSchema), call),
3649
4000
  createItem: (input, call) => create(
3650
4001
  "/stock-items",
3651
4002
  stockItemSchema,
@@ -3660,7 +4011,7 @@ function managementClient(options) {
3660
4011
  stockInputSchema.parse(withActionId(input)),
3661
4012
  call
3662
4013
  ),
3663
- catalog: (call) => get("/pickup-inventory", z16.array(pickupCatalogSchema), call),
4014
+ catalog: (call) => get("/pickup-inventory", z18.array(pickupCatalogSchema), call),
3664
4015
  configure: (input, call) => post(
3665
4016
  "/pickup-inventory",
3666
4017
  pickupCatalogSchema,
@@ -3686,7 +4037,7 @@ function managementClient(options) {
3686
4037
  offerControlSchema.omit({ enabled: true }).parse(withActionId(input)),
3687
4038
  call
3688
4039
  ),
3689
- list: (call) => get("/offers", z16.array(offerSchema), call),
4040
+ list: (call) => get("/offers", z18.array(offerSchema), call),
3690
4041
  /**
3691
4042
  * Every redemption, or one member's, newest first, in one unbounded response.
3692
4043
  *
@@ -3694,7 +4045,7 @@ function managementClient(options) {
3694
4045
  */
3695
4046
  redemptions: (input = {}, call) => get(
3696
4047
  `/redemptions${queryString({ member: input.member })}`,
3697
- z16.array(redemptionSchema),
4048
+ z18.array(redemptionSchema),
3698
4049
  call
3699
4050
  ),
3700
4051
  /** Pauses or resumes an offer at the revision the operator saw. */
@@ -3743,7 +4094,7 @@ function managementClient(options) {
3743
4094
  * them; API keys and project-scoped playground sessions cannot.
3744
4095
  */
3745
4096
  tokens: {
3746
- list: (call) => get("/tokens", z16.array(tokenSchema), call),
4097
+ list: (call) => get("/tokens", z18.array(tokenSchema), call),
3747
4098
  /**
3748
4099
  * Issues a key for one project and environment, limited to permissions the caller holds
3749
4100
  * there. The secret `token` is in this response only.
@@ -3751,14 +4102,14 @@ function managementClient(options) {
3751
4102
  create: (input, call) => post("/tokens", issuedTokenSchema, tokenInputSchema.parse(input), call),
3752
4103
  /** Replace a personal key's ingestion restriction without changing its secret. */
3753
4104
  scope: (id, input, call) => request(
3754
- `/tokens/${encodeURIComponent(z16.string().min(1).parse(id))}/scope`,
4105
+ `/tokens/${encodeURIComponent(z18.string().min(1).parse(id))}/scope`,
3755
4106
  tokenSchema,
3756
4107
  tokenScopeInputSchema.parse(input),
3757
4108
  "PUT",
3758
4109
  call
3759
4110
  ),
3760
4111
  revoke: (id, call) => request(
3761
- `/tokens/${encodeURIComponent(z16.string().min(1).parse(id))}`,
4112
+ `/tokens/${encodeURIComponent(z18.string().min(1).parse(id))}`,
3762
4113
  ok,
3763
4114
  void 0,
3764
4115
  "DELETE",
@@ -3770,7 +4121,7 @@ function managementClient(options) {
3770
4121
  * environment, owned by no person. Only an organization administrator in Console manages them.
3771
4122
  */
3772
4123
  serviceKeys: {
3773
- list: (call) => get("/service-keys", z16.array(serviceKeySchema), call),
4124
+ list: (call) => get("/service-keys", z18.array(serviceKeySchema), call),
3774
4125
  /** The secret `token` is in this response only. */
3775
4126
  create: (input, call) => post(
3776
4127
  "/service-keys",
@@ -3783,14 +4134,14 @@ function managementClient(options) {
3783
4134
  * them with `revokeSecret`. The new `token` is in this response only.
3784
4135
  */
3785
4136
  addSecret: (id, input = {}, call) => post(
3786
- `/service-keys/${z16.string().uuid().parse(id)}/secrets`,
4137
+ `/service-keys/${z18.string().uuid().parse(id)}/secrets`,
3787
4138
  issuedServiceKeySchema,
3788
4139
  credentialSecretInputSchema.parse(input),
3789
4140
  call
3790
4141
  ),
3791
4142
  /** Stops one secret working. A key's last secret cannot be revoked; revoke the key instead. */
3792
4143
  revokeSecret: (id, secret, call) => request(
3793
- `/service-keys/${z16.string().uuid().parse(id)}/secrets/${z16.string().uuid().parse(secret)}`,
4144
+ `/service-keys/${z18.string().uuid().parse(id)}/secrets/${z18.string().uuid().parse(secret)}`,
3794
4145
  serviceKeySchema,
3795
4146
  void 0,
3796
4147
  "DELETE",
@@ -3798,8 +4149,8 @@ function managementClient(options) {
3798
4149
  ),
3799
4150
  /** Deletes the key; every secret stops working. */
3800
4151
  revoke: (id, call) => request(
3801
- `/service-keys/${z16.string().uuid().parse(id)}`,
3802
- z16.null(),
4152
+ `/service-keys/${z18.string().uuid().parse(id)}`,
4153
+ z18.null(),
3803
4154
  void 0,
3804
4155
  "DELETE",
3805
4156
  call
@@ -3807,7 +4158,7 @@ function managementClient(options) {
3807
4158
  },
3808
4159
  /** Who holds which roles on the client's project; organization administrators only. */
3809
4160
  grants: {
3810
- list: (call) => get("/grants", z16.array(grantRecordSchema), call),
4161
+ list: (call) => get("/grants", z18.array(grantRecordSchema), call),
3811
4162
  /** Replaces one person's roles and environments on the project. The audit log records it. */
3812
4163
  set: (input, call) => request(
3813
4164
  "/grants",
@@ -3824,7 +4175,7 @@ function managementClient(options) {
3824
4175
  /** Signed activity notifications for one project/environment; writes require publish permission. */
3825
4176
  webhooks: {
3826
4177
  state: (id, call) => get(
3827
- `/webhooks/${z16.string().uuid().parse(id)}/state`,
4178
+ `/webhooks/${z18.string().uuid().parse(id)}/state`,
3828
4179
  webhookEndpointStateSchema,
3829
4180
  call
3830
4181
  ),
@@ -3835,24 +4186,24 @@ function managementClient(options) {
3835
4186
  call
3836
4187
  ),
3837
4188
  delete: (id, input, call) => post(
3838
- `/webhooks/${z16.string().uuid().parse(id)}/delete`,
4189
+ `/webhooks/${z18.string().uuid().parse(id)}/delete`,
3839
4190
  webhookEndpointStateSchema,
3840
4191
  webhookDeleteInputSchema.parse(withActionId(input)),
3841
4192
  call
3842
4193
  ),
3843
4194
  pause: (id, input = {}, call) => post(
3844
- `/webhooks/${z16.string().uuid().parse(id)}/pause`,
4195
+ `/webhooks/${z18.string().uuid().parse(id)}/pause`,
3845
4196
  webhookEndpointSchema,
3846
4197
  webhookControlInputSchema.parse(withActionId(input)),
3847
4198
  call
3848
4199
  ),
3849
4200
  resume: (id, input = {}, call) => post(
3850
- `/webhooks/${z16.string().uuid().parse(id)}/resume`,
4201
+ `/webhooks/${z18.string().uuid().parse(id)}/resume`,
3851
4202
  webhookEndpointSchema,
3852
4203
  webhookControlInputSchema.parse(withActionId(input)),
3853
4204
  call
3854
4205
  ),
3855
- list: (call) => get("/webhooks", z16.array(webhookEndpointSchema), call),
4206
+ list: (call) => get("/webhooks", z18.array(webhookEndpointSchema), call),
3856
4207
  /** Pass an `actionId` to recover the endpoint and its secret after a lost answer. */
3857
4208
  create: (input, call) => post(
3858
4209
  "/webhooks",
@@ -3861,7 +4212,7 @@ function managementClient(options) {
3861
4212
  call
3862
4213
  ),
3863
4214
  update: (id, input, call) => request(
3864
- `/webhooks/${z16.string().uuid().parse(id)}`,
4215
+ `/webhooks/${z18.string().uuid().parse(id)}`,
3865
4216
  webhookEndpointSchema,
3866
4217
  webhookUpdateSchema.parse(input),
3867
4218
  "PUT",
@@ -3869,19 +4220,19 @@ function managementClient(options) {
3869
4220
  ),
3870
4221
  /** @deprecated Use pause. Removed in 2.0.0. */
3871
4222
  disable: (id, call) => post(
3872
- `/webhooks/${z16.string().uuid().parse(id)}/disable`,
4223
+ `/webhooks/${z18.string().uuid().parse(id)}/disable`,
3873
4224
  webhookEndpointSchema,
3874
4225
  {},
3875
4226
  call
3876
4227
  ),
3877
4228
  rotateSecret: rotateWebhookSecret,
3878
4229
  deliveries: (id, query = {}, call) => get(
3879
- `/webhooks/${z16.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
4230
+ `/webhooks/${z18.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
3880
4231
  webhookDeliveryPageSchema,
3881
4232
  call
3882
4233
  ),
3883
4234
  replay: (id, delivery, call) => post(
3884
- `/webhooks/${z16.string().uuid().parse(id)}/deliveries/${z16.string().uuid().parse(delivery)}/replay`,
4235
+ `/webhooks/${z18.string().uuid().parse(id)}/deliveries/${z18.string().uuid().parse(delivery)}/replay`,
3885
4236
  webhookDeliverySchema,
3886
4237
  {},
3887
4238
  call
@@ -3892,7 +4243,7 @@ function managementClient(options) {
3892
4243
  * environment. Organization administrators, from a Console session only.
3893
4244
  */
3894
4245
  identityIntegrations: {
3895
- list: (call) => get("/identity-integrations", z16.array(identityIntegrationSchema), call),
4246
+ list: (call) => get("/identity-integrations", z18.array(identityIntegrationSchema), call),
3896
4247
  /** The secret `token` is in this response only. */
3897
4248
  create: (input, call) => post(
3898
4249
  "/identity-integrations",
@@ -3907,7 +4258,7 @@ function managementClient(options) {
3907
4258
  * @deprecated Use `addSecret`, then `revokeSecret` the old secret once your app uses the new one.
3908
4259
  */
3909
4260
  rotate: (id, call) => post(
3910
- `/identity-integrations/${z16.string().uuid().parse(id)}/rotate`,
4261
+ `/identity-integrations/${z18.string().uuid().parse(id)}/rotate`,
3911
4262
  identityIntegrationSecretSchema,
3912
4263
  {},
3913
4264
  call
@@ -3917,7 +4268,7 @@ function managementClient(options) {
3917
4268
  * revoke them with `revokeSecret`. The new `token` is in this response only.
3918
4269
  */
3919
4270
  addSecret: (id, input = {}, call) => post(
3920
- `/identity-integrations/${z16.string().uuid().parse(id)}/secrets`,
4271
+ `/identity-integrations/${z18.string().uuid().parse(id)}/secrets`,
3921
4272
  identityIntegrationSecretSchema,
3922
4273
  credentialSecretInputSchema.parse(input),
3923
4274
  call
@@ -3927,7 +4278,7 @@ function managementClient(options) {
3927
4278
  * revoked; disconnect the integration with `revoke` instead.
3928
4279
  */
3929
4280
  revokeSecret: (id, secret, call) => request(
3930
- `/identity-integrations/${z16.string().uuid().parse(id)}/secrets/${z16.string().uuid().parse(secret)}`,
4281
+ `/identity-integrations/${z18.string().uuid().parse(id)}/secrets/${z18.string().uuid().parse(secret)}`,
3931
4282
  identityIntegrationSchema,
3932
4283
  void 0,
3933
4284
  "DELETE",
@@ -3935,7 +4286,7 @@ function managementClient(options) {
3935
4286
  ),
3936
4287
  /** Makes one secret never expire. */
3937
4288
  removeSecretExpiry: (id, secret, call) => request(
3938
- `/identity-integrations/${z16.string().uuid().parse(id)}/secrets/${z16.string().uuid().parse(secret)}/expiry`,
4289
+ `/identity-integrations/${z18.string().uuid().parse(id)}/secrets/${z18.string().uuid().parse(secret)}/expiry`,
3939
4290
  identityIntegrationSchema,
3940
4291
  void 0,
3941
4292
  "DELETE",
@@ -3948,7 +4299,7 @@ function managementClient(options) {
3948
4299
  */
3949
4300
  kinds: (call) => get(
3950
4301
  "/identity-integrations/kinds",
3951
- z16.array(identityKindClaimSchema),
4302
+ z18.array(identityKindClaimSchema),
3952
4303
  call
3953
4304
  ),
3954
4305
  /**
@@ -3956,8 +4307,8 @@ function managementClient(options) {
3956
4307
  * and keep attributing tracker records; unlink them on the member to stop that.
3957
4308
  */
3958
4309
  revoke: (id, call) => request(
3959
- `/identity-integrations/${z16.string().uuid().parse(id)}`,
3960
- z16.null(),
4310
+ `/identity-integrations/${z18.string().uuid().parse(id)}`,
4311
+ z18.null(),
3961
4312
  void 0,
3962
4313
  "DELETE",
3963
4314
  call
@@ -4008,7 +4359,7 @@ function managementClient(options) {
4008
4359
  resources: {
4009
4360
  list: (call) => get(
4010
4361
  "/resources",
4011
- z16.object({ resources: z16.array(managedResourceSchema) }),
4362
+ z18.object({ resources: z18.array(managedResourceSchema) }),
4012
4363
  call
4013
4364
  ),
4014
4365
  /** @deprecated Use the resource archive/unarchive methods. Removed in 2.0.0. */
@@ -4079,7 +4430,7 @@ function managementClient(options) {
4079
4430
  testMemberCreateSchema.parse(withActionId(input)),
4080
4431
  call
4081
4432
  ),
4082
- list: (call) => get("/test-members", z16.array(testMemberSchema), call),
4433
+ list: (call) => get("/test-members", z18.array(testMemberSchema), call),
4083
4434
  history: (member, query = {}, call) => get(
4084
4435
  `/test-members/${identifier.parse(member)}/history${queryString(testMemberHistoryQuerySchema.parse(query))}`,
4085
4436
  testMemberHistorySchema,
@@ -4121,6 +4472,18 @@ function managementClient(options) {
4121
4472
  testMemberAdvanceSchema.parse(withActionId(input)),
4122
4473
  call
4123
4474
  ),
4475
+ /**
4476
+ * Accepts a referral invitation as the test member, as a signed-in member accepting it
4477
+ * would: by `code`, or by `inviter`, another test member. The program's qualification and
4478
+ * rewards apply, and the participant route's refusals: `self-referral`,
4479
+ * `inviter-already-accepted`, `invitation-closed`, `referral-cycle`, `invitation-not-found`.
4480
+ */
4481
+ acceptReferral: (member, input, call) => post(
4482
+ `/test-members/${identifier.parse(member)}/referrals/accept`,
4483
+ ok,
4484
+ testMemberReferralAcceptSchema.parse(withActionId(input)),
4485
+ call
4486
+ ),
4124
4487
  /**
4125
4488
  * Gives the test member a wallet address with no signature; quest code reads it like a
4126
4489
  * member's linked wallet. Answers the test member with its wallets.
@@ -4351,7 +4714,7 @@ function managementClient(options) {
4351
4714
  /** Who each member is: up to 100 distinct IDs; unknown IDs come back without accounts. */
4352
4715
  people: (members, call) => get(
4353
4716
  `/people${queryString({ ids: members.join(",") })}`,
4354
- z16.array(personSchema),
4717
+ z18.array(personSchema),
4355
4718
  call
4356
4719
  ),
4357
4720
  /**
@@ -4361,7 +4724,7 @@ function managementClient(options) {
4361
4724
  */
4362
4725
  oauthAccounts: (member, call) => get(
4363
4726
  `/members/${encodeURIComponent(member)}/oauth-accounts`,
4364
- z16.array(managedOAuthAccountSchema),
4727
+ z18.array(managedOAuthAccountSchema),
4365
4728
  call
4366
4729
  ),
4367
4730
  /**
@@ -4371,7 +4734,7 @@ function managementClient(options) {
4371
4734
  */
4372
4735
  unlinkOAuthAccount: (member, input, call) => post(
4373
4736
  `/members/${encodeURIComponent(member)}/oauth-accounts/unlink`,
4374
- z16.array(managedOAuthAccountSchema),
4737
+ z18.array(managedOAuthAccountSchema),
4375
4738
  memberOAuthUnlinkInputSchema.parse(input),
4376
4739
  call
4377
4740
  ),
@@ -4404,7 +4767,7 @@ function managementClient(options) {
4404
4767
  */
4405
4768
  unlinkWallet: (member, input, call) => post(
4406
4769
  `/members/${encodeURIComponent(member)}/wallets/unlink`,
4407
- z16.array(managedWalletSchema),
4770
+ z18.array(managedWalletSchema),
4408
4771
  memberWalletUnlinkInputSchema.parse(input),
4409
4772
  call
4410
4773
  ),
@@ -4417,7 +4780,7 @@ function managementClient(options) {
4417
4780
  */
4418
4781
  unlinkIdentity: (member, input, call) => post(
4419
4782
  `/members/${encodeURIComponent(member)}/identities/unlink`,
4420
- z16.array(managedMemberIdentitySchema),
4783
+ z18.array(managedMemberIdentitySchema),
4421
4784
  memberIdentityChangeInputSchema.parse(input),
4422
4785
  call
4423
4786
  ),
@@ -4428,7 +4791,7 @@ function managementClient(options) {
4428
4791
  */
4429
4792
  relinkIdentity: (member, input, call) => post(
4430
4793
  `/members/${encodeURIComponent(member)}/identities/relink`,
4431
- z16.array(managedMemberIdentitySchema),
4794
+ z18.array(managedMemberIdentitySchema),
4432
4795
  memberIdentityChangeInputSchema.parse(input),
4433
4796
  call
4434
4797
  ),
@@ -4440,7 +4803,7 @@ function managementClient(options) {
4440
4803
  */
4441
4804
  setWalletSignIn: (member, input, call) => post(
4442
4805
  `/members/${encodeURIComponent(member)}/wallets/sign-in`,
4443
- z16.array(managedWalletSchema),
4806
+ z18.array(managedWalletSchema),
4444
4807
  memberWalletSignInInputSchema.parse(input),
4445
4808
  call
4446
4809
  )
@@ -4452,6 +4815,40 @@ function managementClient(options) {
4452
4815
  liveApp: {
4453
4816
  get: (call) => get("/live-app", liveAppSchema, call)
4454
4817
  },
4818
+ /**
4819
+ * The live app's custom domains (docs/public/concepts/hosting.md, "Custom domains"). Reading
4820
+ * needs `read`, from either environment. Adding, re-checking and removing need an organization
4821
+ * admin signed in to Console or the CLI; API keys cannot. A deployment without custom domains
4822
+ * answers 503 `custom-domains-unavailable`.
4823
+ */
4824
+ domains: {
4825
+ list: async (call) => (await get("/domains", customDomainListSchema, call)).domains,
4826
+ get: (id, call) => get(`/domains/${encodeURIComponent(id)}`, customDomainSchema, call),
4827
+ /**
4828
+ * Attaches `hostname`, such as `quests.example.com`, as `awaiting-dns`, with the CNAME and
4829
+ * TXT records to add at its DNS provider. A project has one custom domain.
4830
+ */
4831
+ add: (hostname, call) => post(
4832
+ "/domains",
4833
+ customDomainSchema,
4834
+ customDomainInputSchema.parse({ hostname }),
4835
+ call
4836
+ ),
4837
+ /** Checks DNS and the certificate now and returns what Domino saw. At most every 10 seconds. */
4838
+ recheck: (id, call) => post(
4839
+ `/domains/${encodeURIComponent(id)}/recheck`,
4840
+ customDomainSchema,
4841
+ {},
4842
+ call
4843
+ ),
4844
+ /** Detaches the domain; it stops serving within about a minute. */
4845
+ remove: async (id, call) => {
4846
+ await raw(`/domains/${encodeURIComponent(id)}`, {
4847
+ ...call,
4848
+ method: "DELETE"
4849
+ });
4850
+ }
4851
+ },
4455
4852
  /** The hosted app's secrets. Values are write-only; builds staged after a change receive it. */
4456
4853
  secrets: {
4457
4854
  list: (call) => get("/secrets", appSecretListSchema, call),
@@ -4530,7 +4927,7 @@ function managementClient(options) {
4530
4927
  `/storage/sql/${appSecretNameSchema.parse(name)}/cell?${new URLSearchParams(
4531
4928
  {
4532
4929
  table,
4533
- row: String(z16.number().int().min(0).parse(options2.row)),
4930
+ row: String(z18.number().int().min(0).parse(options2.row)),
4534
4931
  column: options2.column,
4535
4932
  ...options2.cursor === void 0 ? {} : { cursor: pageCursorSchema.parse(options2.cursor) }
4536
4933
  }
@@ -4642,7 +5039,7 @@ function managementClient(options) {
4642
5039
  * Each quest's current release, the most recently published first, archived quests
4643
5040
  * included; requires `read` permission.
4644
5041
  */
4645
- list: (call) => get("/quests/list", z16.array(publishedReleaseSchema), call),
5042
+ list: (call) => get("/quests/list", z18.array(publishedReleaseSchema), call),
4646
5043
  /** Pending and exhausted asynchronous balance checks. Requires read. */
4647
5044
  automaticScheduling: (query = {}, call) => get(
4648
5045
  `/quests/automatic-scheduling${queryString(automaticSchedulingQuerySchema.parse(query))}`,
@@ -4687,7 +5084,7 @@ function managementClient(options) {
4687
5084
  */
4688
5085
  submissions: (member, call) => get(
4689
5086
  `/members/${encodeURIComponent(member)}/quest-submissions`,
4690
- z16.object({ items: z16.array(questSubmissionSchema) }),
5087
+ z18.object({ items: z18.array(questSubmissionSchema) }),
4691
5088
  call
4692
5089
  ),
4693
5090
  /**
@@ -4811,6 +5208,21 @@ function managementClient(options) {
4811
5208
  });
4812
5209
  }
4813
5210
  var managementResponseSchemas = lazyResponseReaders({
5211
+ get activeMemberUsageSchema() {
5212
+ return knownResponse(activeMemberUsageSchema);
5213
+ },
5214
+ get billingPlanChangeSchema() {
5215
+ return knownResponse(billingPlanChangeSchema);
5216
+ },
5217
+ get billingSessionSchema() {
5218
+ return knownResponse(billingSessionSchema);
5219
+ },
5220
+ get projectBillingSchema() {
5221
+ return knownResponse(projectBillingSchema);
5222
+ },
5223
+ get realPeopleInTestUsageSchema() {
5224
+ return knownResponse(realPeopleInTestUsageSchema);
5225
+ },
4814
5226
  get managedBadgeSchema() {
4815
5227
  return knownResponse(managedBadgeSchema);
4816
5228
  },
@@ -5120,6 +5532,24 @@ var managementResponseSchemas = lazyResponseReaders({
5120
5532
  get projectMetricsSchema() {
5121
5533
  return knownResponse(projectMetricsSchema);
5122
5534
  },
5535
+ get analyticsReadSchema() {
5536
+ return knownResponse(analyticsReadSchema);
5537
+ },
5538
+ get analyticsCatalogSchema() {
5539
+ return knownResponse(analyticsCatalogSchema);
5540
+ },
5541
+ get analyticsMetricResultSchema() {
5542
+ return knownResponse(analyticsMetricResultSchema);
5543
+ },
5544
+ get dashboardListSchema() {
5545
+ return knownResponse(dashboardListSchema);
5546
+ },
5547
+ get dashboardReadSchema() {
5548
+ return knownResponse(dashboardReadSchema);
5549
+ },
5550
+ get dashboardLifecycleResultSchema() {
5551
+ return knownResponse(dashboardLifecycleResultSchema);
5552
+ },
5123
5553
  get projectSchema() {
5124
5554
  return knownResponse(projectSchema);
5125
5555
  },
@@ -5244,172 +5674,473 @@ var managementResponseSchemas = lazyResponseReaders({
5244
5674
  return knownResponse(xUserSchema);
5245
5675
  }
5246
5676
  });
5247
- var managementResponses = {
5248
- managedBadgeSchema: responseSchema(managedBadgeSchema),
5249
- memberBadgesSchema: responseSchema(memberBadgesSchema),
5250
- badgeMutationResultSchema: responseSchema(badgeMutationResultSchema),
5251
- memberIdentityLinkPageSchema: responseSchema(memberIdentityLinkPageSchema),
5252
- memberIdentityStatePageSchema: responseSchema(memberIdentityStatePageSchema),
5253
- memberIdentityStateSchema: responseSchema(memberIdentityStateSchema),
5254
- managedQuestEnrollmentPageSchema: responseSchema(
5255
- managedQuestEnrollmentPageSchema
5256
- ),
5257
- inventoryItemPageSchema: responseSchema(inventoryItemPageSchema),
5258
- inventoryItemStateSchema: responseSchema(inventoryItemStateSchema),
5259
- questEnrollmentStateSchema: responseSchema(questEnrollmentStateSchema),
5260
- managedQuestEnrollmentSchema: responseSchema(managedQuestEnrollmentSchema),
5261
- memberIdentityLinkSchema: responseSchema(memberIdentityLinkSchema),
5262
- leaderboardSettlementReviewSchema: responseSchema(
5263
- leaderboardSettlementReviewSchema
5264
- ),
5265
- leaderboardSettlementReviewSummarySchema: responseSchema(
5266
- leaderboardSettlementReviewSummarySchema
5267
- ),
5268
- leaderboardSettlementReviewPageSchema: responseSchema(
5269
- leaderboardSettlementReviewPageSchema
5270
- ),
5271
- webhookEndpointStateSchema: responseSchema(webhookEndpointStateSchema),
5272
- webhookStatePageSchema: responseSchema(webhookStatePageSchema),
5273
- accessSchema: responseSchema(accessSchema),
5274
- allocatedQuestSchema: responseSchema(allocatedQuestSchema),
5275
- appSecretListSchema: responseSchema(appSecretListSchema),
5276
- appSecretSchema: responseSchema(appSecretSchema),
5277
- appStorageCellPageSchema: responseSchema(appStorageCellPageSchema),
5278
- appStorageKeysSchema: responseSchema(appStorageKeysSchema),
5279
- appStorageListSchema: responseSchema(appStorageListSchema),
5280
- appStorageRowsSchema: responseSchema(appStorageRowsSchema),
5281
- appStorageTablesSchema: responseSchema(appStorageTablesSchema),
5282
- appStorageValueSchema: responseSchema(appStorageValueSchema),
5283
- attemptSchema: responseSchema(attemptSchema),
5284
- auditPageSchema: responseSchema(auditPageSchema),
5285
- automaticCatchUpPreviewSchema: responseSchema(automaticCatchUpPreviewSchema),
5286
- automaticCatchUpResultSchema: responseSchema(automaticCatchUpResultSchema),
5287
- automaticOutcomePageSchema: responseSchema(automaticOutcomePageSchema),
5288
- automaticSchedulingPageSchema: responseSchema(automaticSchedulingPageSchema),
5289
- automaticSchedulingSchema: responseSchema(automaticSchedulingSchema),
5290
- campaignEnrollmentSchema: responseSchema(campaignEnrollmentSchema),
5291
- catalogDeploymentPreviewSchema: responseSchema(
5292
- catalogDeploymentPreviewSchema
5293
- ),
5294
- collectionPreviewSchema: responseSchema(collectionPreviewSchema),
5295
- completionRevocationSchema: responseSchema(completionRevocationSchema),
5296
- contentPerformancePageSchema: responseSchema(contentPerformancePageSchema),
5297
- contentQualificationPageSchema: responseSchema(
5298
- contentQualificationPageSchema
5299
- ),
5300
- counterHistorySchema: responseSchema(counterHistorySchema),
5301
- counterModerationResultSchema: responseSchema(counterModerationResultSchema),
5302
- deploymentHistoryPageSchema: responseSchema(deploymentHistoryPageSchema),
5303
- deploymentPreviewSchema: responseSchema(deploymentPreviewSchema),
5304
- deploymentRecordSchema: responseSchema(deploymentRecordSchema),
5305
- deploymentResultSchema: responseSchema(deploymentResultSchema),
5306
- engagementBoundaryPageSchema: responseSchema(engagementBoundaryPageSchema),
5307
- engagementChangePreviewSchema: responseSchema(engagementChangePreviewSchema),
5308
- engagementPageSchema: responseSchema(engagementPageSchema),
5309
- engagementRuleSchema: responseSchema(engagementRuleSchema),
5310
- engagementRuleVersionPageSchema: responseSchema(
5311
- engagementRuleVersionPageSchema
5312
- ),
5313
- engagementVersionPageSchema: responseSchema(engagementVersionPageSchema),
5314
- entitlementSchema: responseSchema(entitlementSchema),
5315
- grantRecordSchema: responseSchema(grantRecordSchema),
5316
- groupMemberPageSchema: responseSchema(groupMemberPageSchema),
5317
- groupMemberSchema: responseSchema(groupMemberSchema),
5318
- groupPageSchema: responseSchema(groupPageSchema),
5319
- identityIntegrationSchema: responseSchema(identityIntegrationSchema),
5320
- identityIntegrationSecretSchema: responseSchema(
5321
- identityIntegrationSecretSchema
5322
- ),
5323
- identityKindClaimSchema: responseSchema(identityKindClaimSchema),
5324
- issuedTokenSchema: responseSchema(issuedTokenSchema),
5325
- serviceKeySchema: responseSchema(serviceKeySchema),
5326
- issuedServiceKeySchema: responseSchema(issuedServiceKeySchema),
5327
- leaderboardPageSchema: responseSchema(leaderboardPageSchema),
5328
- leaderboardSettlementSchema: responseSchema(leaderboardSettlementSchema),
5329
- leaderboardSettlementSummarySchema: responseSchema(
5330
- leaderboardSettlementSummarySchema
5331
- ),
5332
- managedAttemptPageSchema: responseSchema(managedAttemptPageSchema),
5333
- managedReleasePageSchema: responseSchema(managedReleasePageSchema),
5334
- managedAttemptSchema: responseSchema(managedAttemptSchema),
5335
- managedEntitlementPageSchema: responseSchema(managedEntitlementPageSchema),
5336
- managedEntitlementSchema: responseSchema(managedEntitlementSchema),
5337
- managedGroupSchema: responseSchema(managedGroupSchema),
5338
- managedMemberIdentitySchema: responseSchema(managedMemberIdentitySchema),
5339
- managedMemberPageSchema: responseSchema(managedMemberPageSchema),
5340
- managedMemberProgressSchema: responseSchema(managedMemberProgressSchema),
5341
- memberImportPageSchema: responseSchema(memberImportPageSchema),
5342
- memberImportRowPageSchema: responseSchema(memberImportRowPageSchema),
5343
- memberImportSchema: responseSchema(memberImportSchema),
5344
- managedOAuthAccountSchema: responseSchema(managedOAuthAccountSchema),
5345
- managedTelegramAccountSchema: responseSchema(managedTelegramAccountSchema),
5346
- telegramChatsSchema: responseSchema(telegramChatsSchema),
5347
- telegramChatConnectionSchema: responseSchema(telegramChatConnectionSchema),
5348
- managedPointHistoryPageSchema: responseSchema(managedPointHistoryPageSchema),
5349
- managedPointLedgerSchema: responseSchema(managedPointLedgerSchema),
5350
- managedProfileSchema: responseSchema(managedProfileSchema),
5351
- managedResourceSchema: responseSchema(managedResourceSchema),
5352
- managedStockItemSchema: responseSchema(managedStockItemSchema),
5353
- managedWalletSchema: responseSchema(managedWalletSchema),
5354
- memberDetailSchema: responseSchema(memberDetailSchema),
5355
- offerSchema: responseSchema(offerSchema),
5356
- operationSchema: responseSchema(operationSchema),
5357
- pageSchema: responseSchema(pageSchema),
5358
- participantSignInSchema: responseSchema(participantSignInSchema),
5359
- personSchema: responseSchema(personSchema),
5360
- pickupAvailabilitySchema: responseSchema(pickupAvailabilitySchema),
5361
- pickupCatalogSchema: responseSchema(pickupCatalogSchema),
5362
- pointLedgerSchema: responseSchema(pointLedgerSchema),
5363
- pointsAccountSchema: responseSchema(pointsAccountSchema),
5364
- pointsResultSchema: responseSchema(pointsResultSchema),
5365
- profileSettingsSchema: responseSchema(profileSettingsSchema),
5366
- projectCalendarSchema: responseSchema(projectCalendarSchema),
5367
- projectDeletionSchema: responseSchema(projectDeletionSchema),
5368
- projectMetricsSchema: responseSchema(projectMetricsSchema),
5369
- projectSchema: responseSchema(projectSchema),
5370
- projectTransferSchema: responseSchema(projectTransferSchema),
5371
- publishedLeaderboardSchema: responseSchema(publishedLeaderboardSchema),
5372
- publishedReferralSchema: responseSchema(publishedReferralSchema),
5373
- publishedReleaseSchema: responseSchema(publishedReleaseSchema),
5374
- questCatalogSchema: responseSchema(questCatalogSchema),
5375
- questDraftSchema: responseSchema(questDraftSchema),
5376
- questEnrollmentSchema: responseSchema(questEnrollmentSchema),
5377
- questLifecycleSchema: responseSchema(questLifecycleSchema),
5378
- questPublicationPreviewSchema: responseSchema(questPublicationPreviewSchema),
5379
- readinessSchema: responseSchema(readinessSchema),
5380
- redemptionSchema: responseSchema(redemptionSchema),
5381
- redemptionPageSchema: responseSchema(redemptionPageSchema),
5382
- referralHistorySchema: responseSchema(referralHistorySchema),
5383
- referralManagementSchema: responseSchema(referralManagementSchema),
5384
- resourceLifecycleResultSchema: responseSchema(resourceLifecycleResultSchema),
5385
- rewardDeliveriesSchema: responseSchema(rewardDeliveriesSchema),
5386
- rewardDeliverySchema: responseSchema(rewardDeliverySchema),
5387
- stockAdditionSchema: responseSchema(stockAdditionSchema),
5388
- stockItemSchema: responseSchema(stockItemSchema),
5389
- teamSchema: responseSchema(teamSchema),
5390
- testMemberHistorySchema: responseSchema(testMemberHistorySchema),
5391
- testMemberRecordResultSchema: responseSchema(testMemberRecordResultSchema),
5392
- testMemberResetResultSchema: responseSchema(testMemberResetResultSchema),
5393
- testMemberSchema: responseSchema(testMemberSchema),
5394
- tokenSchema: responseSchema(tokenSchema),
5395
- trackerContentSchema: responseSchema(trackerContentSchema),
5396
- trackerIngestResultSchema: responseSchema(trackerIngestResultSchema),
5397
- trackerOutcomePageSchema: responseSchema(trackerOutcomePageSchema),
5398
- trackerOutcomeSchema: responseSchema(trackerOutcomeSchema),
5399
- trackerPageSchema: responseSchema(trackerPageSchema),
5400
- trackerPreviewSchema: responseSchema(trackerPreviewSchema),
5401
- trackerStatusSchema: responseSchema(trackerStatusSchema),
5402
- trackerSummarySchema: responseSchema(trackerSummarySchema),
5403
- trackerTriggerOutcomePageSchema: responseSchema(
5404
- trackerTriggerOutcomePageSchema
5405
- ),
5406
- walletBalanceChainsSchema: responseSchema(walletBalanceChainsSchema),
5407
- webhookDeliveryPageSchema: responseSchema(webhookDeliveryPageSchema),
5408
- webhookDeliverySchema: responseSchema(webhookDeliverySchema),
5409
- webhookEndpointSchema: responseSchema(webhookEndpointSchema),
5410
- webhookSecretSchema: responseSchema(webhookSecretSchema),
5411
- xUserSchema: responseSchema(xUserSchema)
5412
- };
5677
+ var managementResponses = lazyResponseReaders({
5678
+ get activeMemberUsageSchema() {
5679
+ return responseSchema(activeMemberUsageSchema);
5680
+ },
5681
+ get billingPlanChangeSchema() {
5682
+ return responseSchema(billingPlanChangeSchema);
5683
+ },
5684
+ get billingSessionSchema() {
5685
+ return responseSchema(billingSessionSchema);
5686
+ },
5687
+ get projectBillingSchema() {
5688
+ return responseSchema(projectBillingSchema);
5689
+ },
5690
+ get realPeopleInTestUsageSchema() {
5691
+ return responseSchema(realPeopleInTestUsageSchema);
5692
+ },
5693
+ get managedBadgeSchema() {
5694
+ return responseSchema(managedBadgeSchema);
5695
+ },
5696
+ get memberBadgesSchema() {
5697
+ return responseSchema(memberBadgesSchema);
5698
+ },
5699
+ get badgeMutationResultSchema() {
5700
+ return responseSchema(badgeMutationResultSchema);
5701
+ },
5702
+ get memberIdentityLinkPageSchema() {
5703
+ return responseSchema(memberIdentityLinkPageSchema);
5704
+ },
5705
+ get memberIdentityStatePageSchema() {
5706
+ return responseSchema(memberIdentityStatePageSchema);
5707
+ },
5708
+ get memberIdentityStateSchema() {
5709
+ return responseSchema(memberIdentityStateSchema);
5710
+ },
5711
+ get managedQuestEnrollmentPageSchema() {
5712
+ return responseSchema(managedQuestEnrollmentPageSchema);
5713
+ },
5714
+ get inventoryItemPageSchema() {
5715
+ return responseSchema(inventoryItemPageSchema);
5716
+ },
5717
+ get inventoryItemStateSchema() {
5718
+ return responseSchema(inventoryItemStateSchema);
5719
+ },
5720
+ get questEnrollmentStateSchema() {
5721
+ return responseSchema(questEnrollmentStateSchema);
5722
+ },
5723
+ get managedQuestEnrollmentSchema() {
5724
+ return responseSchema(managedQuestEnrollmentSchema);
5725
+ },
5726
+ get memberIdentityLinkSchema() {
5727
+ return responseSchema(memberIdentityLinkSchema);
5728
+ },
5729
+ get leaderboardSettlementReviewSchema() {
5730
+ return responseSchema(leaderboardSettlementReviewSchema);
5731
+ },
5732
+ get leaderboardSettlementReviewSummarySchema() {
5733
+ return responseSchema(leaderboardSettlementReviewSummarySchema);
5734
+ },
5735
+ get leaderboardSettlementReviewPageSchema() {
5736
+ return responseSchema(leaderboardSettlementReviewPageSchema);
5737
+ },
5738
+ get webhookEndpointStateSchema() {
5739
+ return responseSchema(webhookEndpointStateSchema);
5740
+ },
5741
+ get webhookStatePageSchema() {
5742
+ return responseSchema(webhookStatePageSchema);
5743
+ },
5744
+ get accessSchema() {
5745
+ return responseSchema(accessSchema);
5746
+ },
5747
+ get allocatedQuestSchema() {
5748
+ return responseSchema(allocatedQuestSchema);
5749
+ },
5750
+ get appSecretListSchema() {
5751
+ return responseSchema(appSecretListSchema);
5752
+ },
5753
+ get appSecretSchema() {
5754
+ return responseSchema(appSecretSchema);
5755
+ },
5756
+ get appStorageCellPageSchema() {
5757
+ return responseSchema(appStorageCellPageSchema);
5758
+ },
5759
+ get appStorageKeysSchema() {
5760
+ return responseSchema(appStorageKeysSchema);
5761
+ },
5762
+ get appStorageListSchema() {
5763
+ return responseSchema(appStorageListSchema);
5764
+ },
5765
+ get appStorageRowsSchema() {
5766
+ return responseSchema(appStorageRowsSchema);
5767
+ },
5768
+ get appStorageTablesSchema() {
5769
+ return responseSchema(appStorageTablesSchema);
5770
+ },
5771
+ get appStorageValueSchema() {
5772
+ return responseSchema(appStorageValueSchema);
5773
+ },
5774
+ get attemptSchema() {
5775
+ return responseSchema(attemptSchema);
5776
+ },
5777
+ get auditPageSchema() {
5778
+ return responseSchema(auditPageSchema);
5779
+ },
5780
+ get automaticCatchUpPreviewSchema() {
5781
+ return responseSchema(automaticCatchUpPreviewSchema);
5782
+ },
5783
+ get automaticCatchUpResultSchema() {
5784
+ return responseSchema(automaticCatchUpResultSchema);
5785
+ },
5786
+ get automaticOutcomePageSchema() {
5787
+ return responseSchema(automaticOutcomePageSchema);
5788
+ },
5789
+ get automaticSchedulingPageSchema() {
5790
+ return responseSchema(automaticSchedulingPageSchema);
5791
+ },
5792
+ get automaticSchedulingSchema() {
5793
+ return responseSchema(automaticSchedulingSchema);
5794
+ },
5795
+ get campaignEnrollmentSchema() {
5796
+ return responseSchema(campaignEnrollmentSchema);
5797
+ },
5798
+ get catalogDeploymentPreviewSchema() {
5799
+ return responseSchema(catalogDeploymentPreviewSchema);
5800
+ },
5801
+ get collectionPreviewSchema() {
5802
+ return responseSchema(collectionPreviewSchema);
5803
+ },
5804
+ get completionRevocationSchema() {
5805
+ return responseSchema(completionRevocationSchema);
5806
+ },
5807
+ get contentPerformancePageSchema() {
5808
+ return responseSchema(contentPerformancePageSchema);
5809
+ },
5810
+ get contentQualificationPageSchema() {
5811
+ return responseSchema(contentQualificationPageSchema);
5812
+ },
5813
+ get counterHistorySchema() {
5814
+ return responseSchema(counterHistorySchema);
5815
+ },
5816
+ get counterModerationResultSchema() {
5817
+ return responseSchema(counterModerationResultSchema);
5818
+ },
5819
+ get deploymentHistoryPageSchema() {
5820
+ return responseSchema(deploymentHistoryPageSchema);
5821
+ },
5822
+ get deploymentPreviewSchema() {
5823
+ return responseSchema(deploymentPreviewSchema);
5824
+ },
5825
+ get deploymentRecordSchema() {
5826
+ return responseSchema(deploymentRecordSchema);
5827
+ },
5828
+ get deploymentResultSchema() {
5829
+ return responseSchema(deploymentResultSchema);
5830
+ },
5831
+ get engagementBoundaryPageSchema() {
5832
+ return responseSchema(engagementBoundaryPageSchema);
5833
+ },
5834
+ get engagementChangePreviewSchema() {
5835
+ return responseSchema(engagementChangePreviewSchema);
5836
+ },
5837
+ get engagementPageSchema() {
5838
+ return responseSchema(engagementPageSchema);
5839
+ },
5840
+ get engagementRuleSchema() {
5841
+ return responseSchema(engagementRuleSchema);
5842
+ },
5843
+ get engagementRuleVersionPageSchema() {
5844
+ return responseSchema(engagementRuleVersionPageSchema);
5845
+ },
5846
+ get engagementVersionPageSchema() {
5847
+ return responseSchema(engagementVersionPageSchema);
5848
+ },
5849
+ get entitlementSchema() {
5850
+ return responseSchema(entitlementSchema);
5851
+ },
5852
+ get grantRecordSchema() {
5853
+ return responseSchema(grantRecordSchema);
5854
+ },
5855
+ get groupMemberPageSchema() {
5856
+ return responseSchema(groupMemberPageSchema);
5857
+ },
5858
+ get groupMemberSchema() {
5859
+ return responseSchema(groupMemberSchema);
5860
+ },
5861
+ get groupPageSchema() {
5862
+ return responseSchema(groupPageSchema);
5863
+ },
5864
+ get identityIntegrationSchema() {
5865
+ return responseSchema(identityIntegrationSchema);
5866
+ },
5867
+ get identityIntegrationSecretSchema() {
5868
+ return responseSchema(identityIntegrationSecretSchema);
5869
+ },
5870
+ get identityKindClaimSchema() {
5871
+ return responseSchema(identityKindClaimSchema);
5872
+ },
5873
+ get issuedTokenSchema() {
5874
+ return responseSchema(issuedTokenSchema);
5875
+ },
5876
+ get serviceKeySchema() {
5877
+ return responseSchema(serviceKeySchema);
5878
+ },
5879
+ get issuedServiceKeySchema() {
5880
+ return responseSchema(issuedServiceKeySchema);
5881
+ },
5882
+ get leaderboardPageSchema() {
5883
+ return responseSchema(leaderboardPageSchema);
5884
+ },
5885
+ get leaderboardSettlementSchema() {
5886
+ return responseSchema(leaderboardSettlementSchema);
5887
+ },
5888
+ get leaderboardSettlementSummarySchema() {
5889
+ return responseSchema(leaderboardSettlementSummarySchema);
5890
+ },
5891
+ get managedAttemptPageSchema() {
5892
+ return responseSchema(managedAttemptPageSchema);
5893
+ },
5894
+ get managedReleasePageSchema() {
5895
+ return responseSchema(managedReleasePageSchema);
5896
+ },
5897
+ get managedAttemptSchema() {
5898
+ return responseSchema(managedAttemptSchema);
5899
+ },
5900
+ get managedEntitlementPageSchema() {
5901
+ return responseSchema(managedEntitlementPageSchema);
5902
+ },
5903
+ get managedEntitlementSchema() {
5904
+ return responseSchema(managedEntitlementSchema);
5905
+ },
5906
+ get managedGroupSchema() {
5907
+ return responseSchema(managedGroupSchema);
5908
+ },
5909
+ get managedMemberIdentitySchema() {
5910
+ return responseSchema(managedMemberIdentitySchema);
5911
+ },
5912
+ get managedMemberPageSchema() {
5913
+ return responseSchema(managedMemberPageSchema);
5914
+ },
5915
+ get managedMemberProgressSchema() {
5916
+ return responseSchema(managedMemberProgressSchema);
5917
+ },
5918
+ get memberImportPageSchema() {
5919
+ return responseSchema(memberImportPageSchema);
5920
+ },
5921
+ get memberImportRowPageSchema() {
5922
+ return responseSchema(memberImportRowPageSchema);
5923
+ },
5924
+ get memberImportSchema() {
5925
+ return responseSchema(memberImportSchema);
5926
+ },
5927
+ get managedOAuthAccountSchema() {
5928
+ return responseSchema(managedOAuthAccountSchema);
5929
+ },
5930
+ get managedTelegramAccountSchema() {
5931
+ return responseSchema(managedTelegramAccountSchema);
5932
+ },
5933
+ get telegramChatsSchema() {
5934
+ return responseSchema(telegramChatsSchema);
5935
+ },
5936
+ get telegramChatConnectionSchema() {
5937
+ return responseSchema(telegramChatConnectionSchema);
5938
+ },
5939
+ get managedPointHistoryPageSchema() {
5940
+ return responseSchema(managedPointHistoryPageSchema);
5941
+ },
5942
+ get managedPointLedgerSchema() {
5943
+ return responseSchema(managedPointLedgerSchema);
5944
+ },
5945
+ get managedProfileSchema() {
5946
+ return responseSchema(managedProfileSchema);
5947
+ },
5948
+ get managedResourceSchema() {
5949
+ return responseSchema(managedResourceSchema);
5950
+ },
5951
+ get managedStockItemSchema() {
5952
+ return responseSchema(managedStockItemSchema);
5953
+ },
5954
+ get managedWalletSchema() {
5955
+ return responseSchema(managedWalletSchema);
5956
+ },
5957
+ get memberDetailSchema() {
5958
+ return responseSchema(memberDetailSchema);
5959
+ },
5960
+ get offerSchema() {
5961
+ return responseSchema(offerSchema);
5962
+ },
5963
+ get operationSchema() {
5964
+ return responseSchema(operationSchema);
5965
+ },
5966
+ get pageSchema() {
5967
+ return responseSchema(pageSchema);
5968
+ },
5969
+ get participantSignInSchema() {
5970
+ return responseSchema(participantSignInSchema);
5971
+ },
5972
+ get personSchema() {
5973
+ return responseSchema(personSchema);
5974
+ },
5975
+ get pickupAvailabilitySchema() {
5976
+ return responseSchema(pickupAvailabilitySchema);
5977
+ },
5978
+ get pickupCatalogSchema() {
5979
+ return responseSchema(pickupCatalogSchema);
5980
+ },
5981
+ get pointLedgerSchema() {
5982
+ return responseSchema(pointLedgerSchema);
5983
+ },
5984
+ get pointsAccountSchema() {
5985
+ return responseSchema(pointsAccountSchema);
5986
+ },
5987
+ get pointsResultSchema() {
5988
+ return responseSchema(pointsResultSchema);
5989
+ },
5990
+ get profileSettingsSchema() {
5991
+ return responseSchema(profileSettingsSchema);
5992
+ },
5993
+ get projectCalendarSchema() {
5994
+ return responseSchema(projectCalendarSchema);
5995
+ },
5996
+ get projectDeletionSchema() {
5997
+ return responseSchema(projectDeletionSchema);
5998
+ },
5999
+ get projectMetricsSchema() {
6000
+ return responseSchema(projectMetricsSchema);
6001
+ },
6002
+ get analyticsReadSchema() {
6003
+ return responseSchema(analyticsReadSchema);
6004
+ },
6005
+ get analyticsCatalogSchema() {
6006
+ return responseSchema(analyticsCatalogSchema);
6007
+ },
6008
+ get analyticsMetricResultSchema() {
6009
+ return responseSchema(analyticsMetricResultSchema);
6010
+ },
6011
+ get dashboardListSchema() {
6012
+ return responseSchema(dashboardListSchema);
6013
+ },
6014
+ get dashboardReadSchema() {
6015
+ return responseSchema(dashboardReadSchema);
6016
+ },
6017
+ get dashboardLifecycleResultSchema() {
6018
+ return responseSchema(dashboardLifecycleResultSchema);
6019
+ },
6020
+ get projectSchema() {
6021
+ return responseSchema(projectSchema);
6022
+ },
6023
+ get projectTransferSchema() {
6024
+ return responseSchema(projectTransferSchema);
6025
+ },
6026
+ get publishedLeaderboardSchema() {
6027
+ return responseSchema(publishedLeaderboardSchema);
6028
+ },
6029
+ get publishedReferralSchema() {
6030
+ return responseSchema(publishedReferralSchema);
6031
+ },
6032
+ get publishedReleaseSchema() {
6033
+ return responseSchema(publishedReleaseSchema);
6034
+ },
6035
+ get questCatalogSchema() {
6036
+ return responseSchema(questCatalogSchema);
6037
+ },
6038
+ get questDraftSchema() {
6039
+ return responseSchema(questDraftSchema);
6040
+ },
6041
+ get questEnrollmentSchema() {
6042
+ return responseSchema(questEnrollmentSchema);
6043
+ },
6044
+ get questLifecycleSchema() {
6045
+ return responseSchema(questLifecycleSchema);
6046
+ },
6047
+ get questPublicationPreviewSchema() {
6048
+ return responseSchema(questPublicationPreviewSchema);
6049
+ },
6050
+ get readinessSchema() {
6051
+ return responseSchema(readinessSchema);
6052
+ },
6053
+ get redemptionSchema() {
6054
+ return responseSchema(redemptionSchema);
6055
+ },
6056
+ get redemptionPageSchema() {
6057
+ return responseSchema(redemptionPageSchema);
6058
+ },
6059
+ get referralHistorySchema() {
6060
+ return responseSchema(referralHistorySchema);
6061
+ },
6062
+ get referralManagementSchema() {
6063
+ return responseSchema(referralManagementSchema);
6064
+ },
6065
+ get resourceLifecycleResultSchema() {
6066
+ return responseSchema(resourceLifecycleResultSchema);
6067
+ },
6068
+ get rewardDeliveriesSchema() {
6069
+ return responseSchema(rewardDeliveriesSchema);
6070
+ },
6071
+ get rewardDeliverySchema() {
6072
+ return responseSchema(rewardDeliverySchema);
6073
+ },
6074
+ get stockAdditionSchema() {
6075
+ return responseSchema(stockAdditionSchema);
6076
+ },
6077
+ get stockItemSchema() {
6078
+ return responseSchema(stockItemSchema);
6079
+ },
6080
+ get teamSchema() {
6081
+ return responseSchema(teamSchema);
6082
+ },
6083
+ get testMemberHistorySchema() {
6084
+ return responseSchema(testMemberHistorySchema);
6085
+ },
6086
+ get testMemberRecordResultSchema() {
6087
+ return responseSchema(testMemberRecordResultSchema);
6088
+ },
6089
+ get testMemberResetResultSchema() {
6090
+ return responseSchema(testMemberResetResultSchema);
6091
+ },
6092
+ get testMemberSchema() {
6093
+ return responseSchema(testMemberSchema);
6094
+ },
6095
+ get tokenSchema() {
6096
+ return responseSchema(tokenSchema);
6097
+ },
6098
+ get trackerContentSchema() {
6099
+ return responseSchema(trackerContentSchema);
6100
+ },
6101
+ get trackerIngestResultSchema() {
6102
+ return responseSchema(trackerIngestResultSchema);
6103
+ },
6104
+ get trackerOutcomePageSchema() {
6105
+ return responseSchema(trackerOutcomePageSchema);
6106
+ },
6107
+ get trackerOutcomeSchema() {
6108
+ return responseSchema(trackerOutcomeSchema);
6109
+ },
6110
+ get trackerPageSchema() {
6111
+ return responseSchema(trackerPageSchema);
6112
+ },
6113
+ get trackerPreviewSchema() {
6114
+ return responseSchema(trackerPreviewSchema);
6115
+ },
6116
+ get trackerStatusSchema() {
6117
+ return responseSchema(trackerStatusSchema);
6118
+ },
6119
+ get trackerSummarySchema() {
6120
+ return responseSchema(trackerSummarySchema);
6121
+ },
6122
+ get trackerTriggerOutcomePageSchema() {
6123
+ return responseSchema(trackerTriggerOutcomePageSchema);
6124
+ },
6125
+ get walletBalanceChainsSchema() {
6126
+ return responseSchema(walletBalanceChainsSchema);
6127
+ },
6128
+ get webhookDeliveryPageSchema() {
6129
+ return responseSchema(webhookDeliveryPageSchema);
6130
+ },
6131
+ get webhookDeliverySchema() {
6132
+ return responseSchema(webhookDeliverySchema);
6133
+ },
6134
+ get webhookEndpointSchema() {
6135
+ return responseSchema(webhookEndpointSchema);
6136
+ },
6137
+ get webhookSecretSchema() {
6138
+ return responseSchema(webhookSecretSchema);
6139
+ },
6140
+ get xUserSchema() {
6141
+ return responseSchema(xUserSchema);
6142
+ }
6143
+ });
5413
6144
  export {
5414
6145
  APP_KV_LIMIT,
5415
6146
  APP_MIGRATION_FILE_BYTES,
@@ -5439,9 +6170,23 @@ export {
5439
6170
  accessHistoryQuerySchema,
5440
6171
  accessSchema,
5441
6172
  accountProfileSchema,
6173
+ activeMemberMonthSchema,
6174
+ activeMemberUsageSchema,
5442
6175
  activityTypeSchema,
5443
6176
  activityTypes,
5444
6177
  addGroupMemberSchema,
6178
+ analyticsBreakdowns,
6179
+ analyticsCatalog,
6180
+ analyticsCatalogSchema,
6181
+ analyticsCharts,
6182
+ analyticsFilters,
6183
+ analyticsMetricIds,
6184
+ analyticsMetricQuerySchema,
6185
+ analyticsMetricResultSchema,
6186
+ analyticsQueryLimit,
6187
+ analyticsQuerySchema,
6188
+ analyticsRanges,
6189
+ analyticsReadSchema,
5445
6190
  appIdentitySelectorSchema,
5446
6191
  appMigrationNameSchema,
5447
6192
  appRoutingSchema,
@@ -5478,6 +6223,15 @@ export {
5478
6223
  auditQuerySchema,
5479
6224
  auditRecordSchema,
5480
6225
  balanceCheckSchema,
6226
+ billingCheckoutInputSchema,
6227
+ billingIntervals,
6228
+ billingPlanChangeInputSchema,
6229
+ billingPlanChangeSchema,
6230
+ billingSessionSchema,
6231
+ billingSubscriptionPlans,
6232
+ billingSubscriptionSchema,
6233
+ billingTopupInputSchema,
6234
+ billingTopupMaxQuantity,
5481
6235
  buildArtifactsSchema,
5482
6236
  buildIdentitySchema,
5483
6237
  buildPhaseSchema,
@@ -5500,6 +6254,13 @@ export {
5500
6254
  customDomainRecordSchema,
5501
6255
  customDomainSchema,
5502
6256
  customDomainStateSchema,
6257
+ dashboardLifecycleInputSchema,
6258
+ dashboardLifecycleResultSchema,
6259
+ dashboardListQuerySchema,
6260
+ dashboardListSchema,
6261
+ dashboardReadQuerySchema,
6262
+ dashboardReadSchema,
6263
+ dashboardSummarySchema,
5503
6264
  deploymentActionSchema,
5504
6265
  deploymentRejectionSchema,
5505
6266
  developmentPreflightSchema,
@@ -5542,6 +6303,8 @@ export {
5542
6303
  isParticipantRoute,
5543
6304
  issuedServiceKeySchema,
5544
6305
  issuedTokenSchema,
6306
+ leaderboardSettlementExportSchema,
6307
+ leaderboardSettlementMeasurementRetrySchema,
5545
6308
  leaderboardSettlementRejectionSchema,
5546
6309
  leaderboardSettlementReviewPageSchema,
5547
6310
  leaderboardSettlementReviewQuerySchema,
@@ -5621,6 +6384,7 @@ export {
5621
6384
  permissionSchema,
5622
6385
  personSchema,
5623
6386
  pointLedgerPropertiesSchema,
6387
+ projectBillingSchema,
5624
6388
  projectDeletionInputSchema,
5625
6389
  projectDeletionSchema,
5626
6390
  projectInputSchema,
@@ -5647,6 +6411,7 @@ export {
5647
6411
  questLifecycleInputSchema,
5648
6412
  questLifecycleSchema,
5649
6413
  readinessSchema,
6414
+ realPeopleInTestUsageSchema,
5650
6415
  referralManagementSchema,
5651
6416
  referralQualificationSchema,
5652
6417
  referralRewardResolutionSchema,
@@ -5699,6 +6464,7 @@ export {
5699
6464
  testMemberPassSchema,
5700
6465
  testMemberRecordResultSchema,
5701
6466
  testMemberRecordSchema,
6467
+ testMemberReferralAcceptSchema,
5702
6468
  testMemberResetResultSchema,
5703
6469
  testMemberResetSchema,
5704
6470
  testMemberSchema,