@domino-sdk/relay 1.39.0 → 1.42.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 (50) hide show
  1. package/dist/{attempt-captures-CSiN1HKd.d.ts → attempt-captures-CoaD0RmS.d.ts} +1 -1
  2. package/dist/authoring.d.ts +49 -49
  3. package/dist/authoring.js +4 -4
  4. package/dist/{automatic-outcomes-DDbgRubQ.d.ts → automatic-outcomes-B82GzaVN.d.ts} +1 -1
  5. package/dist/avatar.d.ts +2 -2
  6. package/dist/browser.d.ts +9 -9
  7. package/dist/browser.js +10 -10
  8. package/dist/{chunk-SBW52XXL.js → chunk-34ZGBXN7.js} +1 -1
  9. package/dist/{chunk-E4CDOF4H.js → chunk-3VSX2V5N.js} +13 -7
  10. package/dist/{chunk-BYX27T2S.js → chunk-6KZPQI6F.js} +2 -2
  11. package/dist/{chunk-OEO5OBY5.js → chunk-6RYZG6TV.js} +579 -533
  12. package/dist/{chunk-V7KYVH3Z.js → chunk-B3KVWKL2.js} +1 -1
  13. package/dist/{chunk-FTGW72A6.js → chunk-IEBVJN6A.js} +1 -1
  14. package/dist/{chunk-RW4XQN4Z.js → chunk-JFNJE2I4.js} +1 -1
  15. package/dist/{chunk-B65YJ6K4.js → chunk-OZQML7VU.js} +1 -1
  16. package/dist/{chunk-CRX274HO.js → chunk-PG3MC2AM.js} +1 -1
  17. package/dist/{chunk-ANHELJIY.js → chunk-QLDURQPB.js} +1 -1
  18. package/dist/{chunk-ZT7FPD7B.js → chunk-RMZXRL4V.js} +1 -1
  19. package/dist/{chunk-XZKZJIES.js → chunk-SAUBTWEA.js} +6 -2
  20. package/dist/{chunk-2JBNPAE7.js → chunk-TA3SFVT5.js} +2 -2
  21. package/dist/{chunk-ZTEXSD5D.js → chunk-UXFFSWB3.js} +8 -8
  22. package/dist/{chunk-VDRO7BU5.js → chunk-Y2BQRXJD.js} +4 -4
  23. package/dist/{chunk-YNQPFRQO.js → chunk-Y4OM7CHT.js} +1 -1
  24. package/dist/{client-CxHKODc4.d.ts → client-CAgnkFxn.d.ts} +7 -7
  25. package/dist/{deployments-DYeuxXYg.d.ts → deployments-DuIdJ2Ui.d.ts} +349 -213
  26. package/dist/{groups-DY5rZssO.d.ts → groups-CX1C9gln.d.ts} +2 -2
  27. package/dist/index.d.ts +10 -10
  28. package/dist/index.js +9 -9
  29. package/dist/internal.d.ts +10 -10
  30. package/dist/internal.js +8 -8
  31. package/dist/{offers-DtYGNKdQ.d.ts → offers-UL9bdaP0.d.ts} +2 -2
  32. package/dist/{pages-DR2YRvAp.d.ts → pages-Brtjxb2P.d.ts} +26 -2
  33. package/dist/{participant-activity-CoB2F30C.d.ts → participant-activity-iciCEs_8.d.ts} +1 -1
  34. package/dist/portal-proxy.js +3 -3
  35. package/dist/{profiles-BHuQdzsW.d.ts → profiles-Cdv4BSd_.d.ts} +1 -1
  36. package/dist/react/index.d.ts +14 -11
  37. package/dist/react/index.js +17 -10
  38. package/dist/{schema-Cgmj-CbC.d.ts → schema-Dg5_t7Pq.d.ts} +17 -1
  39. package/dist/schema.d.ts +367 -325
  40. package/dist/schema.js +19 -7
  41. package/dist/server/index.d.ts +10 -10
  42. package/dist/server/index.js +768 -611
  43. package/dist/{submission-input-BkIbBPRU.d.ts → submission-input-D5Gh3GR0.d.ts} +2 -2
  44. package/dist/{telegram-browser-laDdm730.d.ts → telegram-browser-riVjoKFg.d.ts} +3 -3
  45. package/dist/testing.d.ts +4 -4
  46. package/dist/testing.js +5 -5
  47. package/dist/{transport-CkTEfXL9.d.ts → transport-VGEsiskZ.d.ts} +5100 -3074
  48. package/dist/{wallet-t7uNDg9p.d.ts → wallet-Ac7OFpOr.d.ts} +1 -1
  49. package/dist/{x-vVG6gZqi.d.ts → x-CAxOrR61.d.ts} +1 -1
  50. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  attemptCaptureSchema,
3
3
  capturedFactSchema
4
- } from "../chunk-ZT7FPD7B.js";
4
+ } from "../chunk-RMZXRL4V.js";
5
5
  import {
6
6
  activityTypeSchema,
7
7
  activityTypes,
@@ -27,7 +27,7 @@ import {
27
27
  publishDeploymentSchema,
28
28
  rejectDeploymentSchema,
29
29
  submitDeploymentSchema
30
- } from "../chunk-E4CDOF4H.js";
30
+ } from "../chunk-3VSX2V5N.js";
31
31
  import "../chunk-4OC7REYX.js";
32
32
  import {
33
33
  DEFAULT_MANAGEMENT_TIMEOUT,
@@ -48,21 +48,21 @@ import {
48
48
  participantExchangeSchema,
49
49
  questConfiguration,
50
50
  sequenceCursorSchema
51
- } from "../chunk-VDRO7BU5.js";
51
+ } from "../chunk-Y2BQRXJD.js";
52
52
  import {
53
53
  parseImageExtraction,
54
54
  parseImageResult
55
- } from "../chunk-BYX27T2S.js";
55
+ } from "../chunk-6KZPQI6F.js";
56
56
  import {
57
57
  imageAssetArtifactSchema,
58
58
  xUserLookupInputSchema,
59
59
  xUserSchema
60
- } from "../chunk-V7KYVH3Z.js";
60
+ } from "../chunk-B3KVWKL2.js";
61
61
  import {
62
62
  sourceDataSchema,
63
63
  sourceRoles,
64
64
  validateQuestShape
65
- } from "../chunk-YNQPFRQO.js";
65
+ } from "../chunk-Y4OM7CHT.js";
66
66
  import {
67
67
  isIntegrationParticipantPath,
68
68
  isParticipantRoute,
@@ -71,7 +71,7 @@ import {
71
71
  } from "../chunk-MLIXJPKL.js";
72
72
  import {
73
73
  withActionId
74
- } from "../chunk-CRX274HO.js";
74
+ } from "../chunk-PG3MC2AM.js";
75
75
  import {
76
76
  allocateQuestSchema,
77
77
  allocatedQuestSchema,
@@ -90,7 +90,7 @@ import {
90
90
  rewardDeliveryQuerySchema,
91
91
  rewardDeliverySchema,
92
92
  saveQuestDraftSchema
93
- } from "../chunk-XZKZJIES.js";
93
+ } from "../chunk-SAUBTWEA.js";
94
94
  import {
95
95
  badgeMutationResultSchema,
96
96
  badgeMutationSchema,
@@ -144,15 +144,15 @@ import {
144
144
  referralQualificationSchema,
145
145
  referralRewardResolutionSchema,
146
146
  referralSuspensionSchema
147
- } from "../chunk-RW4XQN4Z.js";
147
+ } from "../chunk-JFNJE2I4.js";
148
148
  import {
149
149
  telegramChatConnectionSchema,
150
150
  telegramChatIdSchema,
151
151
  telegramChatsSchema
152
- } from "../chunk-B65YJ6K4.js";
153
- import "../chunk-SBW52XXL.js";
154
- import "../chunk-ANHELJIY.js";
155
- import "../chunk-FTGW72A6.js";
152
+ } from "../chunk-OZQML7VU.js";
153
+ import "../chunk-34ZGBXN7.js";
154
+ import "../chunk-QLDURQPB.js";
155
+ import "../chunk-IEBVJN6A.js";
156
156
  import {
157
157
  CompletionSourceKind,
158
158
  addGroupMemberSchema,
@@ -241,7 +241,7 @@ import {
241
241
  walletSignInNetworksSchema,
242
242
  walletUnlinkInputSchema,
243
243
  whereSchemaIssue
244
- } from "../chunk-OEO5OBY5.js";
244
+ } from "../chunk-6RYZG6TV.js";
245
245
 
246
246
  // src/server/identity-links.ts
247
247
  import * as z from "zod";
@@ -869,20 +869,105 @@ var resourceArchiveInputSchema = resourceLifecycleInputSchema.omit({
869
869
  archived: true
870
870
  });
871
871
 
872
+ // src/server/promotions.ts
873
+ import * as z10 from "zod";
874
+ var promotionResourceKindSchema = z10.enum([
875
+ "quest",
876
+ "quest-type",
877
+ "collection",
878
+ "quest-interactions",
879
+ "point-ledger",
880
+ "badge",
881
+ "offer",
882
+ "referral",
883
+ "leaderboard",
884
+ "tracker",
885
+ "engagement",
886
+ "image",
887
+ "stock-item",
888
+ "pickup",
889
+ "calendar",
890
+ "profile-settings",
891
+ "app-build"
892
+ ]);
893
+ var promotionChangeSchema = z10.object({
894
+ kind: z10.union([promotionResourceKindSchema, z10.string()]),
895
+ key: z10.string(),
896
+ title: z10.string(),
897
+ /** `added`: new in live. `changed`: live's differs. `archived` and `unarchived` change only its lifecycle. */
898
+ change: z10.union([
899
+ z10.enum(["added", "changed", "archived", "unarchived"]),
900
+ z10.string()
901
+ ])
902
+ });
903
+ var promotionWarningSchema = z10.object({
904
+ code: z10.string(),
905
+ message: z10.string(),
906
+ kind: z10.string().optional(),
907
+ key: z10.string().optional()
908
+ });
909
+ var promotionBuildSchema = z10.object({
910
+ repository: identifier,
911
+ build: identifier
912
+ });
913
+ var promotionSourceSchema = z10.discriminatedUnion("kind", [
914
+ z10.object({ kind: z10.literal("test") }),
915
+ z10.object({ kind: z10.literal("rollback"), promotion: identifier }),
916
+ z10.object({ kind: z10.literal("deployment"), deployment: identifier })
917
+ ]);
918
+ var promotionMetadata = {
919
+ id: identifier,
920
+ source: promotionSourceSchema,
921
+ changes: z10.array(promotionChangeSchema),
922
+ warnings: z10.array(promotionWarningSchema),
923
+ build: promotionBuildSchema.nullable(),
924
+ createdAt: z10.number().int().nonnegative(),
925
+ createdBy: z10.string().nullable()
926
+ };
927
+ var decided = {
928
+ decidedAt: z10.number().int().nonnegative(),
929
+ decidedBy: z10.string().nullable()
930
+ };
931
+ var promotionRecordSchema = z10.discriminatedUnion("status", [
932
+ z10.object({ ...promotionMetadata, status: z10.literal("pending") }),
933
+ z10.object({ ...promotionMetadata, ...decided, status: z10.literal("applied") }),
934
+ z10.object({
935
+ ...promotionMetadata,
936
+ ...decided,
937
+ status: z10.literal("rejected"),
938
+ reason: z10.string()
939
+ }),
940
+ z10.object({
941
+ ...promotionMetadata,
942
+ ...decided,
943
+ status: z10.literal("superseded")
944
+ })
945
+ ]);
946
+ var promotionActionSchema = z10.object({ actionId: z10.string().uuid() }).strict();
947
+ var promotionRejectionSchema = z10.object({ reason: z10.string().trim().min(1).max(1e3) }).strict();
948
+ var promotionHistoryQuerySchema = z10.strictObject({
949
+ cursor: pageCursorSchema.optional(),
950
+ limit: z10.coerce.number().int().min(1).max(100).optional()
951
+ });
952
+ var promotionHistoryPageSchema = z10.object({
953
+ items: z10.array(promotionRecordSchema),
954
+ nextCursor: pageCursorSchema.nullable()
955
+ });
956
+
872
957
  // src/server/index.ts
873
- import * as z15 from "zod";
958
+ import * as z16 from "zod";
874
959
 
875
960
  // src/server/hosting.ts
876
- import * as z12 from "zod";
961
+ import * as z13 from "zod";
877
962
 
878
963
  // src/server/schedules.ts
879
- import * as z10 from "zod";
964
+ import * as z11 from "zod";
880
965
  import { Cron } from "croner";
881
966
  var APP_SCHEDULE_LIMIT = 10;
882
967
  var APP_SCHEDULE_MIN_INTERVAL = 3e5;
883
968
  var APP_SCHEDULE_TIMEOUT = 3e4;
884
- var appScheduleNameSchema = z10.string().regex(/^[a-z][a-z0-9-]{0,63}$/);
885
- var appSchedulePathSchema = z10.string().min(2).max(512).refine((path) => {
969
+ var appScheduleNameSchema = z11.string().regex(/^[a-z][a-z0-9-]{0,63}$/);
970
+ var appSchedulePathSchema = z11.string().min(2).max(512).refine((path) => {
886
971
  if (!/^\/[a-zA-Z0-9_/-]+$/.test(path) || path.startsWith("//")) {
887
972
  return false;
888
973
  }
@@ -893,11 +978,11 @@ function interval(value) {
893
978
  const unit = value.slice(-1);
894
979
  return amount * (unit === "m" ? 6e4 : unit === "h" ? 36e5 : 864e5);
895
980
  }
896
- var everySchema = z10.string().regex(/^[1-9]\d{0,3}[mhd]$/).refine(
981
+ var everySchema = z11.string().regex(/^[1-9]\d{0,3}[mhd]$/).refine(
897
982
  (value) => interval(value) >= APP_SCHEDULE_MIN_INTERVAL && interval(value) <= 365 * 864e5,
898
983
  "Use an interval from 5 minutes to 365 days, such as 5m, 1h or 1d"
899
984
  );
900
- var cronSchema = z10.string().max(120).refine((value) => {
985
+ var cronSchema = z11.string().max(120).refine((value) => {
901
986
  const fields = value.trim().split(/\s+/);
902
987
  if (fields.length !== 5 || fields.some((field) => !/^[\d*,/-]+$/.test(field))) {
903
988
  return false;
@@ -922,15 +1007,15 @@ var cronSchema = z10.string().max(120).refine((value) => {
922
1007
  var declaration = {
923
1008
  name: appScheduleNameSchema,
924
1009
  path: appSchedulePathSchema,
925
- description: z10.string().min(1).max(500)
1010
+ description: z11.string().min(1).max(500)
926
1011
  };
927
- var everySchedule = z10.object({ ...declaration, every: everySchema });
928
- var cronSchedule = z10.object({ ...declaration, cron: cronSchema });
929
- var appScheduleSchema = z10.union([
1012
+ var everySchedule = z11.object({ ...declaration, every: everySchema });
1013
+ var cronSchedule = z11.object({ ...declaration, cron: cronSchema });
1014
+ var appScheduleSchema = z11.union([
930
1015
  everySchedule.strict(),
931
1016
  cronSchedule.strict()
932
1017
  ]);
933
- var appSchedulesSchema = z10.array(appScheduleSchema).max(APP_SCHEDULE_LIMIT).refine(
1018
+ var appSchedulesSchema = z11.array(appScheduleSchema).max(APP_SCHEDULE_LIMIT).refine(
934
1019
  (items) => new Set(items.map((item) => item.name)).size === items.length,
935
1020
  "Schedule names must be unique"
936
1021
  );
@@ -947,25 +1032,25 @@ function nextScheduleRun(schedule, after) {
947
1032
  }
948
1033
  return next.getTime();
949
1034
  }
950
- var appScheduleStateSchema = z10.enum(["active", "paused", "archived"]);
1035
+ var appScheduleStateSchema = z11.enum(["active", "paused", "archived"]);
951
1036
  var APP_SCHEDULE_RESULT_BYTES = 16384;
952
- var appScheduleDiagnosticSchema = z10.object({
953
- level: z10.enum(["error", "warning", "info"]),
954
- message: z10.string().min(1).max(500),
1037
+ var appScheduleDiagnosticSchema = z11.object({
1038
+ level: z11.enum(["error", "warning", "info"]),
1039
+ message: z11.string().min(1).max(500),
955
1040
  /** What the line is about, such as a member, record or tracker ID. */
956
- subject: z10.string().min(1).max(200).optional(),
1041
+ subject: z11.string().min(1).max(200).optional(),
957
1042
  /** A stable code the app chooses, such as `ingest-timeout`. */
958
- code: z10.string().min(1).max(100).optional()
1043
+ code: z11.string().min(1).max(100).optional()
959
1044
  });
960
- var appScheduleResultSchema = z10.object({
961
- outcome: z10.enum(["succeeded", "partial", "failed"]),
962
- summary: z10.string().min(1).max(500).optional(),
1045
+ var appScheduleResultSchema = z11.object({
1046
+ outcome: z11.enum(["succeeded", "partial", "failed"]),
1047
+ summary: z11.string().min(1).max(500).optional(),
963
1048
  /** Counts and gauges, such as processed and failed members. */
964
- metrics: z10.record(z10.string().regex(/^[A-Za-z][\w.-]{0,63}$/), z10.number()).refine(
1049
+ metrics: z11.record(z11.string().regex(/^[A-Za-z][\w.-]{0,63}$/), z11.number()).refine(
965
1050
  (metrics) => Object.keys(metrics).length <= 50,
966
1051
  "Report at most 50 metrics"
967
1052
  ).optional(),
968
- diagnostics: z10.array(appScheduleDiagnosticSchema).max(50).optional()
1053
+ diagnostics: z11.array(appScheduleDiagnosticSchema).max(50).optional()
969
1054
  });
970
1055
  function scheduleResult(result) {
971
1056
  const body = JSON.stringify(appScheduleResultSchema.parse(result));
@@ -978,41 +1063,41 @@ function scheduleResult(result) {
978
1063
  headers: { "Content-Type": "application/json" }
979
1064
  });
980
1065
  }
981
- var appScheduleRunSchema = z10.object({
982
- id: z10.string().uuid(),
983
- build: z10.string().uuid(),
984
- startedAt: z10.number(),
985
- scheduledAt: z10.number(),
986
- manual: z10.boolean(),
987
- status: z10.enum(["queued", "running", "succeeded", "failed", "uncertain"]),
988
- duration: z10.number().nullable(),
1066
+ var appScheduleRunSchema = z11.object({
1067
+ id: z11.string().uuid(),
1068
+ build: z11.string().uuid(),
1069
+ startedAt: z11.number(),
1070
+ scheduledAt: z11.number(),
1071
+ manual: z11.boolean(),
1072
+ status: z11.enum(["queued", "running", "succeeded", "failed", "uncertain"]),
1073
+ duration: z11.number().nullable(),
989
1074
  /** Why the run failed or is uncertain, or why Relay ignored the app's result. */
990
- error: z10.string().nullable(),
1075
+ error: z11.string().nullable(),
991
1076
  /** The app's JSON answer when it sent a valid result. Absent on runs from before results. */
992
1077
  result: appScheduleResultSchema.nullable().optional()
993
1078
  });
994
- var appScheduleRunsSchema = z10.object({
1079
+ var appScheduleRunsSchema = z11.object({
995
1080
  /** Newest first: the latest twenty runs of one schedule, including a queued or running one. */
996
- runs: z10.array(appScheduleRunSchema)
1081
+ runs: z11.array(appScheduleRunSchema)
997
1082
  });
998
- var appScheduleListSchema = z10.object({
1083
+ var appScheduleListSchema = z11.object({
999
1084
  state: appScheduleStateSchema,
1000
- schedules: z10.array(
1001
- z10.object({
1002
- declaration: z10.union([everySchedule, cronSchedule]),
1003
- nextRun: z10.number().nullable(),
1004
- blocked: z10.boolean(),
1085
+ schedules: z11.array(
1086
+ z11.object({
1087
+ declaration: z11.union([everySchedule, cronSchedule]),
1088
+ nextRun: z11.number().nullable(),
1089
+ blocked: z11.boolean(),
1005
1090
  lastRun: appScheduleRunSchema.nullable()
1006
1091
  })
1007
1092
  )
1008
1093
  });
1009
- var scheduledInvocationSchema = z10.object({
1010
- id: z10.string().uuid(),
1011
- build: z10.string().uuid(),
1094
+ var scheduledInvocationSchema = z11.object({
1095
+ id: z11.string().uuid(),
1096
+ build: z11.string().uuid(),
1012
1097
  name: appScheduleNameSchema,
1013
- scheduledAt: z10.number().int(),
1014
- startedAt: z10.number().int(),
1015
- manual: z10.boolean()
1098
+ scheduledAt: z11.number().int(),
1099
+ startedAt: z11.number().int(),
1100
+ manual: z11.boolean()
1016
1101
  }).strict();
1017
1102
  async function verifyScheduledRequest(request, key) {
1018
1103
  const signature = request.headers.get("X-Domino-Schedule-Signature");
@@ -1077,7 +1162,7 @@ ${body}`)
1077
1162
  }
1078
1163
 
1079
1164
  // src/server/starters.ts
1080
- import * as z11 from "zod";
1165
+ import * as z12 from "zod";
1081
1166
  var starterTemplates = [
1082
1167
  {
1083
1168
  id: "campaign",
@@ -1110,63 +1195,63 @@ var starterTemplates = [
1110
1195
  summary: "A headless Worker with typed routes and interactive API docs, for plugging Domino into your own product."
1111
1196
  }
1112
1197
  ];
1113
- var starterIdSchema = z11.enum(
1198
+ var starterIdSchema = z12.enum(
1114
1199
  starterTemplates.map((template) => template.id)
1115
1200
  );
1116
1201
 
1117
1202
  // src/server/hosting.ts
1118
- var outputPathSchema = z12.string().min(1).max(512).refine(
1203
+ var outputPathSchema = z13.string().min(1).max(512).refine(
1119
1204
  (path) => path.split("/").every(
1120
1205
  (part) => /^[\w-][\w.-]*$/.test(part) && part !== "node_modules"
1121
1206
  ),
1122
1207
  "Expected a relative build output path without hidden segments"
1123
1208
  );
1124
- var appRoutingSchema = z12.enum(["legacy", "transparent"]).default("legacy");
1209
+ var appRoutingSchema = z13.enum(["legacy", "transparent"]).default("legacy");
1125
1210
  var APP_SECRET_LIMIT = 50;
1126
1211
  var APP_KV_LIMIT = 5;
1127
1212
  var APP_SQL_LIMIT = 5;
1128
1213
  var APP_MIGRATION_LIMIT = 100;
1129
1214
  var APP_MIGRATION_FILE_BYTES = 9e4;
1130
1215
  var APP_MIGRATION_TOTAL_BYTES = 1e6;
1131
- var appSecretNameSchema = z12.string().regex(
1216
+ var appSecretNameSchema = z13.string().regex(
1132
1217
  /^[A-Z_][A-Z0-9_]{0,63}$/,
1133
1218
  "Use 1-64 uppercase letters, digits, and underscores, not starting with a digit"
1134
1219
  ).refine(
1135
1220
  (name) => !name.startsWith("DOMINO_") && name !== "ASSETS",
1136
1221
  "DOMINO_ names and ASSETS are reserved for Domino's own bindings"
1137
1222
  );
1138
- var appSecretValueSchema = z12.string().min(1).refine(
1223
+ var appSecretValueSchema = z13.string().min(1).refine(
1139
1224
  (value) => new TextEncoder().encode(value).length <= 5120,
1140
1225
  "Secret values can be at most 5 KiB"
1141
1226
  );
1142
- var appSecretInputSchema = z12.object({ value: appSecretValueSchema }).strict();
1143
- var appSecretSchema = z12.object({
1227
+ var appSecretInputSchema = z13.object({ value: appSecretValueSchema }).strict();
1228
+ var appSecretSchema = z13.object({
1144
1229
  name: appSecretNameSchema,
1145
- updatedAt: z12.number(),
1146
- updatedBy: z12.string()
1230
+ updatedAt: z13.number(),
1231
+ updatedBy: z13.string()
1147
1232
  });
1148
- var appSecretDeclarationSchema = z12.object({
1149
- description: z12.string().trim().min(1).max(500),
1150
- required: z12.boolean().default(true)
1233
+ var appSecretDeclarationSchema = z13.object({
1234
+ description: z13.string().trim().min(1).max(500),
1235
+ required: z13.boolean().default(true)
1151
1236
  }).strict();
1152
- var appSecretDeclarationsSchema = z12.record(appSecretNameSchema, appSecretDeclarationSchema).refine(
1237
+ var appSecretDeclarationsSchema = z13.record(appSecretNameSchema, appSecretDeclarationSchema).refine(
1153
1238
  (secrets) => Object.keys(secrets).length <= APP_SECRET_LIMIT,
1154
1239
  `Declare at most ${APP_SECRET_LIMIT} app secrets`
1155
1240
  );
1156
- var appSecretListSchema = z12.object({
1157
- secrets: z12.array(appSecretSchema),
1158
- declared: z12.array(appSecretDeclarationSchema.extend({ name: appSecretNameSchema })).default([])
1241
+ var appSecretListSchema = z13.object({
1242
+ secrets: z13.array(appSecretSchema),
1243
+ declared: z13.array(appSecretDeclarationSchema.extend({ name: appSecretNameSchema })).default([])
1159
1244
  });
1160
- var hostedAppSecretsSchema = z12.object({ secrets: z12.record(appSecretNameSchema, appSecretValueSchema) }).strict();
1161
- var storageDescription = z12.object({
1162
- description: z12.string().trim().min(1).max(500)
1245
+ var hostedAppSecretsSchema = z13.object({ secrets: z13.record(appSecretNameSchema, appSecretValueSchema) }).strict();
1246
+ var storageDescription = z13.object({
1247
+ description: z13.string().trim().min(1).max(500)
1163
1248
  }).strict();
1164
- var appStorageSchema = z12.object({
1165
- kv: z12.record(appSecretNameSchema, storageDescription).refine(
1249
+ var appStorageSchema = z13.object({
1250
+ kv: z13.record(appSecretNameSchema, storageDescription).refine(
1166
1251
  (stores) => Object.keys(stores).length <= APP_KV_LIMIT,
1167
1252
  `Declare at most ${APP_KV_LIMIT} KV stores`
1168
1253
  ).default({}),
1169
- sql: z12.record(
1254
+ sql: z13.record(
1170
1255
  appSecretNameSchema,
1171
1256
  storageDescription.extend({
1172
1257
  migrations: outputPathSchema.optional()
@@ -1176,77 +1261,77 @@ var appStorageSchema = z12.object({
1176
1261
  `Declare at most ${APP_SQL_LIMIT} SQL stores`
1177
1262
  ).default({})
1178
1263
  }).strict();
1179
- var appStorageKindSchema = z12.enum(["kv", "sql"]);
1180
- var appStorageListSchema = z12.object({
1181
- stores: z12.array(
1182
- z12.object({
1183
- kind: z12.string(),
1264
+ var appStorageKindSchema = z13.enum(["kv", "sql"]);
1265
+ var appStorageListSchema = z13.object({
1266
+ stores: z13.array(
1267
+ z13.object({
1268
+ kind: z13.string(),
1184
1269
  name: appSecretNameSchema,
1185
- createdAt: z12.number().nullable(),
1186
- declared: z12.boolean(),
1187
- description: z12.string().optional()
1270
+ createdAt: z13.number().nullable(),
1271
+ declared: z13.boolean(),
1272
+ description: z13.string().optional()
1188
1273
  })
1189
1274
  )
1190
1275
  });
1191
1276
  var APP_STORAGE_ROW_LIMIT = 50;
1192
1277
  var APP_STORAGE_PREVIEW_CHARACTERS = 2e3;
1193
- var appStorageCellSchema = z12.union([
1194
- z12.string(),
1195
- z12.number(),
1196
- z12.null(),
1197
- z12.object({ text: z12.string(), truncated: z12.literal(true) }),
1198
- z12.object({ blob: z12.number().int().min(0) })
1278
+ var appStorageCellSchema = z13.union([
1279
+ z13.string(),
1280
+ z13.number(),
1281
+ z13.null(),
1282
+ z13.object({ text: z13.string(), truncated: z13.literal(true) }),
1283
+ z13.object({ blob: z13.number().int().min(0) })
1199
1284
  ]);
1200
- var appStorageTablesSchema = z12.object({
1201
- tables: z12.array(
1285
+ var appStorageTablesSchema = z13.object({
1286
+ tables: z13.array(
1202
1287
  /** `kind` is SQLite's: `table` or `view`. */
1203
- z12.object({ name: z12.string(), kind: z12.string() })
1288
+ z13.object({ name: z13.string(), kind: z13.string() })
1204
1289
  )
1205
1290
  });
1206
- var appStorageRowsSchema = z12.object({
1207
- table: z12.string(),
1208
- columns: z12.array(z12.string()),
1209
- rows: z12.array(z12.array(appStorageCellSchema)),
1291
+ var appStorageRowsSchema = z13.object({
1292
+ table: z13.string(),
1293
+ columns: z13.array(z13.string()),
1294
+ rows: z13.array(z13.array(appStorageCellSchema)),
1210
1295
  /** How many rows come before this page in storage order. */
1211
- offset: z12.number().int().min(0),
1212
- total: z12.number().int().min(0),
1296
+ offset: z13.number().int().min(0),
1297
+ total: z13.number().int().min(0),
1213
1298
  /** Pass back as `cursor` for the next page; null on the last one. */
1214
1299
  nextCursor: pageCursorSchema.nullable().default(null)
1215
1300
  });
1216
- var appStorageKeysSchema = z12.object({
1217
- keys: z12.array(
1218
- z12.object({ name: z12.string(), expiration: z12.number().nullable() })
1301
+ var appStorageKeysSchema = z13.object({
1302
+ keys: z13.array(
1303
+ z13.object({ name: z13.string(), expiration: z13.number().nullable() })
1219
1304
  ),
1220
1305
  /** Pass back as `cursor` for the next page; null on the last one. */
1221
1306
  nextCursor: pageCursorSchema.nullable().default(null),
1222
1307
  /** @deprecated Use `nextCursor`. Removed in 2.0.0. */
1223
- cursor: z12.string().nullable()
1308
+ cursor: z13.string().nullable()
1224
1309
  });
1225
- var appStorageValueSchema = z12.object({
1226
- key: z12.string(),
1227
- size: z12.number().int().min(0),
1310
+ var appStorageValueSchema = z13.object({
1311
+ key: z13.string(),
1312
+ size: z13.number().int().min(0),
1228
1313
  /** Null when the value is not UTF-8 text. */
1229
- text: z12.string().nullable(),
1230
- truncated: z12.boolean()
1314
+ text: z13.string().nullable(),
1315
+ truncated: z13.boolean()
1231
1316
  });
1232
1317
  var APP_STORAGE_CELL_CHARACTERS = 1e5;
1233
- var appStorageCellPageSchema = z12.object({
1234
- table: z12.string(),
1235
- column: z12.string(),
1318
+ var appStorageCellPageSchema = z13.object({
1319
+ table: z13.string(),
1320
+ column: z13.string(),
1236
1321
  /** The row's position in storage order: a rows page's `offset` plus its index on that page. */
1237
- row: z12.number().int().min(0),
1322
+ row: z13.number().int().min(0),
1238
1323
  /** SQLite's storage class. */
1239
- type: z12.enum(["text", "integer", "real", "blob", "null"]),
1324
+ type: z13.enum(["text", "integer", "real", "blob", "null"]),
1240
1325
  /** Characters of text, or of a number's text form; bytes of a BLOB; null for NULL. */
1241
- length: z12.number().int().min(0).nullable(),
1326
+ length: z13.number().int().min(0).nullable(),
1242
1327
  /** How many characters come before this page. */
1243
- offset: z12.number().int().min(0),
1328
+ offset: z13.number().int().min(0),
1244
1329
  /** Up to 100,000 characters from `offset`. Null for a BLOB, whose bytes are never read, and NULL. */
1245
- text: z12.string().nullable(),
1330
+ text: z13.string().nullable(),
1246
1331
  /** Pass back as `cursor` for the next page; null on the last one. */
1247
1332
  nextCursor: pageCursorSchema.nullable().default(null)
1248
1333
  });
1249
- var appMigrationNameSchema = z12.string().max(255).regex(/^[\w-][\w.-]*\.sql$/);
1334
+ var appMigrationNameSchema = z13.string().max(255).regex(/^[\w-][\w.-]*\.sql$/);
1250
1335
  function compareAppMigrations(a, b) {
1251
1336
  const left = Number.parseInt(a.split("_")[0], 10);
1252
1337
  const right = Number.parseInt(b.split("_")[0], 10);
@@ -1263,12 +1348,12 @@ function compareAppMigrations(a, b) {
1263
1348
  }
1264
1349
  return a < b ? -1 : a > b ? 1 : 0;
1265
1350
  }
1266
- var appMigrationsSchema = z12.record(
1351
+ var appMigrationsSchema = z13.record(
1267
1352
  appSecretNameSchema,
1268
- z12.array(
1269
- z12.object({
1353
+ z13.array(
1354
+ z13.object({
1270
1355
  name: appMigrationNameSchema,
1271
- sql: z12.string().min(1).refine(
1356
+ sql: z13.string().min(1).refine(
1272
1357
  (sql) => new TextEncoder().encode(sql).length <= APP_MIGRATION_FILE_BYTES,
1273
1358
  `A migration file must not exceed ${APP_MIGRATION_FILE_BYTES} bytes`
1274
1359
  )
@@ -1286,21 +1371,21 @@ var appMigrationsSchema = z12.record(
1286
1371
  );
1287
1372
  var appScripts = {
1288
1373
  routing: appRoutingSchema,
1289
- devScript: z12.string().regex(/^[\w:-]+$/),
1290
- checkScript: z12.string().regex(/^[\w:-]+$/),
1291
- buildScript: z12.string().regex(/^[\w:-]+$/)
1374
+ devScript: z13.string().regex(/^[\w:-]+$/),
1375
+ checkScript: z13.string().regex(/^[\w:-]+$/),
1376
+ buildScript: z13.string().regex(/^[\w:-]+$/)
1292
1377
  };
1293
1378
  var workerSettings = {
1294
- runWorkerFirst: z12.boolean().default(false),
1379
+ runWorkerFirst: z13.boolean().default(false),
1295
1380
  main: outputPathSchema.refine(
1296
1381
  (path) => /\.m?js$/.test(path),
1297
1382
  "Expected a compiled JavaScript entry"
1298
1383
  ),
1299
- compatibilityDate: z12.string().regex(/^\d{4}-\d{2}-\d{2}$/),
1300
- compatibilityFlags: z12.array(z12.string().min(1)).max(50).default([]),
1301
- vars: z12.record(
1302
- z12.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).refine((name) => name !== "ASSETS"),
1303
- z12.string()
1384
+ compatibilityDate: z13.string().regex(/^\d{4}-\d{2}-\d{2}$/),
1385
+ compatibilityFlags: z13.array(z13.string().min(1)).max(50).default([]),
1386
+ vars: z13.record(
1387
+ z13.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).refine((name) => name !== "ASSETS"),
1388
+ z13.string()
1304
1389
  ).default({}),
1305
1390
  secrets: appSecretDeclarationsSchema.default({}),
1306
1391
  storage: appStorageSchema.optional(),
@@ -1329,62 +1414,62 @@ var distinctBindings = (worker, ctx) => {
1329
1414
  }
1330
1415
  }
1331
1416
  };
1332
- var hostedAppSchema = z12.discriminatedUnion("kind", [
1333
- z12.object({
1334
- kind: z12.literal("static"),
1417
+ var hostedAppSchema = z13.discriminatedUnion("kind", [
1418
+ z13.object({
1419
+ kind: z13.literal("static"),
1335
1420
  directory: outputPathSchema,
1336
1421
  ...appScripts
1337
1422
  }).strict(),
1338
- z12.object({
1339
- kind: z12.literal("worker"),
1423
+ z13.object({
1424
+ kind: z13.literal("worker"),
1340
1425
  directory: outputPathSchema,
1341
1426
  assetsDirectory: outputPathSchema.optional(),
1342
1427
  ...appScripts,
1343
1428
  ...workerSettings
1344
1429
  }).strict().superRefine(distinctBindings)
1345
1430
  ]);
1346
- var repositorySchema = z12.object({
1347
- id: z12.string().uuid(),
1431
+ var repositorySchema = z13.object({
1432
+ id: z13.string().uuid(),
1348
1433
  organization: identifier,
1349
1434
  project: identifier,
1350
- remote: z12.string().url(),
1351
- defaultBranch: z12.string(),
1352
- status: z12.enum(["provisioning", "ready"])
1435
+ remote: z13.string().url(),
1436
+ defaultBranch: z13.string(),
1437
+ status: z13.enum(["provisioning", "ready"])
1353
1438
  });
1354
- var createRepositorySchema = z12.object({
1439
+ var createRepositorySchema = z13.object({
1355
1440
  /** Omitted: the starter chosen at project setup, else `campaign`. */
1356
1441
  starter: starterIdSchema.optional()
1357
1442
  }).strict();
1358
- var deviceStartSchema = z12.object({
1359
- challenge: z12.string().regex(/^[a-f0-9]{64}$/)
1443
+ var deviceStartSchema = z13.object({
1444
+ challenge: z13.string().regex(/^[a-f0-9]{64}$/)
1360
1445
  }).strict();
1361
- var deviceRedeemSchema = z12.object({
1362
- id: z12.string().uuid(),
1363
- verifier: z12.string().min(43).max(128)
1446
+ var deviceRedeemSchema = z13.object({
1447
+ id: z13.string().uuid(),
1448
+ verifier: z13.string().min(43).max(128)
1364
1449
  }).strict();
1365
- var deviceApproveSchema = z12.object({
1366
- id: z12.string().uuid(),
1367
- code: z12.string().regex(/^[A-F0-9]{4}-[A-F0-9]{4}$/)
1450
+ var deviceApproveSchema = z13.object({
1451
+ id: z13.string().uuid(),
1452
+ code: z13.string().regex(/^[A-F0-9]{4}-[A-F0-9]{4}$/)
1368
1453
  }).strict();
1369
- var commitSchema = z12.string().regex(/^[a-f0-9]{40}$/);
1370
- var stageRequestSchema = z12.object({
1454
+ var commitSchema = z13.string().regex(/^[a-f0-9]{40}$/);
1455
+ var stageRequestSchema = z13.object({
1371
1456
  commit: commitSchema,
1372
- requestId: z12.string().uuid()
1457
+ requestId: z13.string().uuid()
1373
1458
  }).strict();
1374
- var buildIdentitySchema = z12.object({
1459
+ var buildIdentitySchema = z13.object({
1375
1460
  routing: appRoutingSchema,
1376
- slug: z12.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional(),
1377
- runtime: z12.enum(["simulation", "hosted-test"]).default("simulation"),
1378
- id: z12.string().uuid(),
1379
- repository: z12.string().uuid(),
1461
+ slug: z13.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional(),
1462
+ runtime: z13.enum(["simulation", "hosted-test"]).default("simulation"),
1463
+ id: z13.string().uuid(),
1464
+ repository: z13.string().uuid(),
1380
1465
  organization: identifier,
1381
1466
  project: identifier,
1382
1467
  commit: commitSchema,
1383
- createdAt: z12.number(),
1384
- actor: z12.string(),
1385
- commitMessage: z12.string().max(500).optional()
1468
+ createdAt: z13.number(),
1469
+ actor: z13.string(),
1470
+ commitMessage: z13.string().max(500).optional()
1386
1471
  });
1387
- var buildPhaseSchema = z12.enum([
1472
+ var buildPhaseSchema = z13.enum([
1388
1473
  "queued",
1389
1474
  "source",
1390
1475
  "install",
@@ -1394,72 +1479,72 @@ var buildPhaseSchema = z12.enum([
1394
1479
  "ready",
1395
1480
  "failed"
1396
1481
  ]);
1397
- var buildStatusSchema = z12.object({
1482
+ var buildStatusSchema = z13.object({
1398
1483
  phase: buildPhaseSchema,
1399
1484
  failedPhase: buildPhaseSchema.optional(),
1400
- updatedAt: z12.number(),
1401
- message: z12.string()
1485
+ updatedAt: z13.number(),
1486
+ message: z13.string()
1402
1487
  });
1403
1488
  var hostedBuildSchema = buildIdentitySchema.extend({
1404
1489
  ...buildStatusSchema.shape,
1405
- finished: z12.boolean(),
1406
- current: z12.boolean(),
1407
- stagingUrl: z12.string().url()
1490
+ finished: z13.boolean(),
1491
+ current: z13.boolean(),
1492
+ stagingUrl: z13.string().url()
1408
1493
  });
1409
- var stagingAccessModeSchema = z12.enum(["console", "password"]);
1410
- var stagingAccessSchema = z12.object({ mode: stagingAccessModeSchema });
1411
- var stagingAccessInputSchema = z12.discriminatedUnion("mode", [
1412
- z12.object({ mode: z12.literal("console") }).strict(),
1413
- z12.object({
1414
- mode: z12.literal("password"),
1415
- password: z12.string().min(8).max(128)
1494
+ var stagingAccessModeSchema = z13.enum(["console", "password"]);
1495
+ var stagingAccessSchema = z13.object({ mode: stagingAccessModeSchema });
1496
+ var stagingAccessInputSchema = z13.discriminatedUnion("mode", [
1497
+ z13.object({ mode: z13.literal("console") }).strict(),
1498
+ z13.object({
1499
+ mode: z13.literal("password"),
1500
+ password: z13.string().min(8).max(128)
1416
1501
  }).strict()
1417
1502
  ]);
1418
- var stagingPathSchema = z12.string().max(2048).refine(
1503
+ var stagingPathSchema = z13.string().max(2048).refine(
1419
1504
  (path) => path.startsWith("/") && !path.startsWith("//") && !path.includes("\\"),
1420
1505
  "Expected a path on the staging host"
1421
1506
  );
1422
- var stagingLinkSchema = z12.object({
1423
- url: z12.string().url(),
1424
- expiresAt: z12.number()
1507
+ var stagingLinkSchema = z13.object({
1508
+ url: z13.string().url(),
1509
+ expiresAt: z13.number()
1425
1510
  });
1426
- var buildSnapshotSchema = z12.object({
1427
- builds: z12.array(hostedBuildSchema),
1511
+ var buildSnapshotSchema = z13.object({
1512
+ builds: z13.array(hostedBuildSchema),
1428
1513
  current: hostedBuildSchema.nullable(),
1429
1514
  selected: hostedBuildSchema.nullable(),
1430
- logs: z12.string()
1515
+ logs: z13.string()
1431
1516
  });
1432
- var assetPathSchema = z12.string().max(512).refine(
1517
+ var assetPathSchema = z13.string().max(512).refine(
1433
1518
  (path) => path.startsWith("/") && // oxlint-disable-next-line no-control-regex -- Asset paths must reject control characters.
1434
1519
  !/[\\\u0000-\u001f?#%]/.test(path) && path.slice(1).split("/").every((part) => part.length > 0 && !part.startsWith(".")),
1435
1520
  "Expected a public asset path without hidden segments"
1436
1521
  );
1437
- var base64Schema = z12.string().regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
1522
+ var base64Schema = z13.string().regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
1438
1523
  var stagedDeploymentLimits = {
1439
1524
  /** Bytes of JSON, uncompressed. */
1440
1525
  size: 64e6,
1441
1526
  /** Bytes of the Brotli-compressed object. */
1442
1527
  compressedSize: 1e7
1443
1528
  };
1444
- var stagedDeploymentSchema = z12.object({
1445
- encoding: z12.literal("br"),
1446
- sha256: z12.string().regex(/^[0-9a-f]{64}$/),
1447
- compressedSize: z12.number().int().positive().max(stagedDeploymentLimits.compressedSize),
1448
- size: z12.number().int().positive().max(stagedDeploymentLimits.size)
1529
+ var stagedDeploymentSchema = z13.object({
1530
+ encoding: z13.literal("br"),
1531
+ sha256: z13.string().regex(/^[0-9a-f]{64}$/),
1532
+ compressedSize: z13.number().int().positive().max(stagedDeploymentLimits.compressedSize),
1533
+ size: z13.number().int().positive().max(stagedDeploymentLimits.size)
1449
1534
  }).strict();
1450
1535
  var stagedDeploymentContentSchema = stagedDeploymentSchema.extend({
1451
- content: z12.string().max(Math.ceil(stagedDeploymentLimits.compressedSize / 3) * 4)
1536
+ content: z13.string().max(Math.ceil(stagedDeploymentLimits.compressedSize / 3) * 4)
1452
1537
  }).strict();
1453
1538
  var stagedDeploymentKey = (build, sha256) => `builds/${build}/deployment/${sha256}.br`;
1454
1539
  var artifactFields = {
1455
1540
  routing: appRoutingSchema,
1456
- worker: z12.object({
1541
+ worker: z13.object({
1457
1542
  ...workerSettings,
1458
1543
  migrations: appMigrationsSchema.optional(),
1459
- modules: z12.array(
1460
- z12.object({
1544
+ modules: z13.array(
1545
+ z13.object({
1461
1546
  path: outputPathSchema.refine((path) => path !== "metadata"),
1462
- type: z12.enum([
1547
+ type: z13.enum([
1463
1548
  "application/javascript+module",
1464
1549
  "application/wasm",
1465
1550
  "text/plain",
@@ -1469,26 +1554,26 @@ var artifactFields = {
1469
1554
  }).strict()
1470
1555
  ).min(1).max(500)
1471
1556
  }).strict().superRefine(distinctBindings).optional(),
1472
- assets: z12.array(
1473
- z12.object({
1557
+ assets: z13.array(
1558
+ z13.object({
1474
1559
  path: assetPathSchema,
1475
1560
  content: base64Schema.max(14e6),
1476
- size: z12.number().int().min(0).max(1e7)
1561
+ size: z13.number().int().min(0).max(1e7)
1477
1562
  }).strict()
1478
1563
  ).max(500)
1479
1564
  };
1480
- var buildArtifactsSchema = z12.discriminatedUnion("format", [
1481
- z12.object({
1482
- format: z12.literal(1),
1565
+ var buildArtifactsSchema = z13.discriminatedUnion("format", [
1566
+ z13.object({
1567
+ format: z13.literal(1),
1483
1568
  ...artifactFields,
1484
- quests: z12.unknown(),
1485
- catalog: z12.unknown()
1569
+ quests: z13.unknown(),
1570
+ catalog: z13.unknown()
1486
1571
  }).strict(),
1487
- z12.object({
1488
- format: z12.literal(2),
1572
+ z13.object({
1573
+ format: z13.literal(2),
1489
1574
  ...artifactFields,
1490
1575
  deployment: stagedDeploymentSchema,
1491
- images: z12.array(imageAssetArtifactSchema).max(10)
1576
+ images: z13.array(imageAssetArtifactSchema).max(10)
1492
1577
  }).strict()
1493
1578
  ]).superRefine((value, ctx) => {
1494
1579
  if (value.worker) {
@@ -1540,39 +1625,39 @@ var buildArtifactsSchema = z12.discriminatedUnion("format", [
1540
1625
  });
1541
1626
 
1542
1627
  // src/server/development.ts
1543
- import * as z13 from "zod";
1544
- var developmentPreflightSchema = z13.object({
1545
- organization: z13.string(),
1546
- project: z13.string(),
1547
- environment: z13.enum(["test", "live"]),
1548
- identity: z13.object({
1549
- exchange: z13.literal("supported"),
1550
- activeIntegrations: z13.number().int().nonnegative()
1628
+ import * as z14 from "zod";
1629
+ var developmentPreflightSchema = z14.object({
1630
+ organization: z14.string(),
1631
+ project: z14.string(),
1632
+ environment: z14.enum(["test", "live"]),
1633
+ identity: z14.object({
1634
+ exchange: z14.literal("supported"),
1635
+ activeIntegrations: z14.number().int().nonnegative()
1551
1636
  }).optional(),
1552
- staging: z13.enum(["configured", "blocked"]),
1553
- development: z13.object({
1554
- status: z13.enum(["configured", "blocked"]),
1637
+ staging: z14.enum(["configured", "blocked"]),
1638
+ development: z14.object({
1639
+ status: z14.enum(["configured", "blocked"]),
1555
1640
  // How `domino dev` reaches the preview origin: a Cloudflare tunnel, or a direct route on a
1556
1641
  // local development stack. APIs that predate the field use tunnels.
1557
- transport: z13.enum(["tunnel", "direct"]).default("tunnel"),
1558
- missing: z13.array(z13.string()),
1559
- authentication: z13.array(z13.string())
1642
+ transport: z14.enum(["tunnel", "direct"]).default("tunnel"),
1643
+ missing: z14.array(z14.string()),
1644
+ authentication: z14.array(z14.string())
1560
1645
  }),
1561
- checks: z13.array(
1562
- z13.object({
1563
- id: z13.string(),
1564
- status: z13.enum(["ok", "error"]),
1565
- message: z13.string(),
1566
- missing: z13.array(z13.string()).optional(),
1567
- issues: z13.array(z13.string()).optional()
1646
+ checks: z14.array(
1647
+ z14.object({
1648
+ id: z14.string(),
1649
+ status: z14.enum(["ok", "error"]),
1650
+ message: z14.string(),
1651
+ missing: z14.array(z14.string()).optional(),
1652
+ issues: z14.array(z14.string()).optional()
1568
1653
  })
1569
1654
  )
1570
1655
  });
1571
1656
 
1572
1657
  // src/server/hosted.ts
1573
- import * as z14 from "zod";
1658
+ import * as z15 from "zod";
1574
1659
  var hostedKeyPermissions = ["read", "points", "ingest"];
1575
- var hostedKeyPermissionList = z14.array(z14.string()).transform(
1660
+ var hostedKeyPermissionList = z15.array(z15.string()).transform(
1576
1661
  (values) => values.filter(
1577
1662
  (value) => hostedKeyPermissions.includes(value)
1578
1663
  )
@@ -1584,17 +1669,17 @@ var hostedManagementBindings = [
1584
1669
  "DOMINO_PROJECT",
1585
1670
  "DOMINO_ENVIRONMENT"
1586
1671
  ];
1587
- var hostedKeySecretSchema = z14.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key");
1588
- var hostedKeySchema = z14.object({
1589
- id: z14.string().uuid(),
1672
+ var hostedKeySecretSchema = z15.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key");
1673
+ var hostedKeySchema = z15.object({
1674
+ id: z15.string().uuid(),
1590
1675
  token: hostedKeySecretSchema,
1591
1676
  organization: identifier,
1592
1677
  project: identifier,
1593
- environment: z14.enum(["test", "live"]),
1678
+ environment: z15.enum(["test", "live"]),
1594
1679
  permissions: hostedKeyPermissionList,
1595
- expiresAt: z14.number().nullable()
1680
+ expiresAt: z15.number().nullable()
1596
1681
  }).strict();
1597
- var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl: z14.string().url() }).strict();
1682
+ var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl: z15.string().url() }).strict();
1598
1683
  function hostedManagementClient(env) {
1599
1684
  const missing = hostedManagementBindings.filter((name) => !env[name]);
1600
1685
  if (missing.length) {
@@ -1602,7 +1687,7 @@ function hostedManagementClient(env) {
1602
1687
  `Missing ${missing.join(", ")}. Domino sets these for hosted apps and domino dev; update the project's vite.config.ts to forward them in development.`
1603
1688
  );
1604
1689
  }
1605
- const environment = z14.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
1690
+ const environment = z15.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
1606
1691
  const token = env.DOMINO_MANAGEMENT_KEY;
1607
1692
  return createManagementClient({
1608
1693
  baseUrl: env.DOMINO_API_URL.replace(/\/+$/, ""),
@@ -1614,9 +1699,9 @@ function hostedManagementClient(env) {
1614
1699
  }
1615
1700
 
1616
1701
  // src/server/index.ts
1617
- var environmentSchema = z15.enum(["test", "live"]);
1618
- var roleSchema = z15.enum(["editor", "reviewer", "staff"]);
1619
- var permissionSchema = z15.enum([
1702
+ var environmentSchema = z16.enum(["test", "live"]);
1703
+ var roleSchema = z16.enum(["editor", "reviewer", "staff"]);
1704
+ var permissionSchema = z16.enum([
1620
1705
  "read",
1621
1706
  "publish",
1622
1707
  "review",
@@ -1636,7 +1721,7 @@ var permissionSchema = z15.enum([
1636
1721
  */
1637
1722
  "enroll"
1638
1723
  ]);
1639
- var permissionListSchema = z15.array(z15.string()).transform(
1724
+ var permissionListSchema = z16.array(z16.string()).transform(
1640
1725
  (values) => values.filter(
1641
1726
  (value) => permissionSchema.safeParse(value).success
1642
1727
  )
@@ -1646,38 +1731,38 @@ var rolePermissions = {
1646
1731
  reviewer: ["read", "review"],
1647
1732
  staff: ["read", "confirm", "handover"]
1648
1733
  };
1649
- var projectSetupSchema = z15.object({
1650
- mode: z15.enum(["new", "existing"]),
1651
- brief: z15.string().trim().min(1).max(4e3)
1734
+ var projectSetupSchema = z16.object({
1735
+ mode: z16.enum(["new", "existing"]),
1736
+ brief: z16.string().trim().min(1).max(4e3)
1652
1737
  }).strict();
1653
- var operatorUserSchema = z15.object({
1654
- id: z15.string(),
1655
- name: z15.string().nullable(),
1656
- email: z15.string().nullable(),
1657
- avatar: z15.string().nullable()
1738
+ var operatorUserSchema = z16.object({
1739
+ id: z16.string(),
1740
+ name: z16.string().nullable(),
1741
+ email: z16.string().nullable(),
1742
+ avatar: z16.string().nullable()
1658
1743
  });
1659
- var projectSchema = z15.object({
1744
+ var projectSchema = z16.object({
1660
1745
  /**
1661
1746
  * Names the project's hosted addresses. The server gives a new project, and accepts in a
1662
1747
  * slug change, only slugs of at least 3 characters that Domino does not reserve. This schema
1663
1748
  * checks only the format, so it parses every slug that exists.
1664
1749
  */
1665
- slug: z15.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
1666
- createdBy: z15.string().nullable().optional(),
1750
+ slug: z16.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
1751
+ createdBy: z16.string().nullable().optional(),
1667
1752
  creator: operatorUserSchema.nullable().optional(),
1668
1753
  /** A response, so fields a newer server adds to the setup are dropped, not rejected. */
1669
- setup: z15.object(projectSetupSchema.shape).optional(),
1754
+ setup: z16.object(projectSetupSchema.shape).optional(),
1670
1755
  /** The starter chosen at setup. A plain string, so later starters still parse. */
1671
- starter: z15.string().optional(),
1672
- id: z15.string().min(1),
1756
+ starter: z16.string().optional(),
1757
+ id: z16.string().min(1),
1673
1758
  organization: identifier,
1674
1759
  project: identifier,
1675
- name: z15.string(),
1676
- subtitle: z15.string(),
1677
- initials: z15.string(),
1678
- color: z15.string(),
1760
+ name: z16.string(),
1761
+ subtitle: z16.string(),
1762
+ initials: z16.string(),
1763
+ color: z16.string(),
1679
1764
  permissions: permissionListSchema,
1680
- environments: z15.array(environmentSchema)
1765
+ environments: z16.array(environmentSchema)
1681
1766
  }).refine(
1682
1767
  (project) => !project.creator || project.creator.id === project.createdBy,
1683
1768
  {
@@ -1685,45 +1770,45 @@ var projectSchema = z15.object({
1685
1770
  path: ["creator"]
1686
1771
  }
1687
1772
  );
1688
- var projectInputSchema = z15.object({
1773
+ var projectInputSchema = z16.object({
1689
1774
  actionId: identifier,
1690
- name: z15.string().trim().min(1).max(80),
1775
+ name: z16.string().trim().min(1).max(80),
1691
1776
  setup: projectSetupSchema.optional(),
1692
1777
  /** The starter a new hosted app begins from, with `setup.mode` "new". */
1693
1778
  starter: starterIdSchema.optional()
1694
1779
  }).strict();
1695
- var projectUpdateInputSchema = z15.union([
1696
- z15.object({ name: projectInputSchema.shape.name }).strict(),
1697
- z15.object({
1780
+ var projectUpdateInputSchema = z16.union([
1781
+ z16.object({ name: projectInputSchema.shape.name }).strict(),
1782
+ z16.object({
1698
1783
  slug: projectSchema.shape.slug,
1699
- confirm: z15.string().min(1).max(80)
1784
+ confirm: z16.string().min(1).max(80)
1700
1785
  }).strict()
1701
1786
  ]);
1702
- var projectDeletionInputSchema = z15.object({ confirm: z15.string().min(1).max(80) }).strict();
1703
- var projectDeletionSchema = z15.object({
1787
+ var projectDeletionInputSchema = z16.object({ confirm: z16.string().min(1).max(80) }).strict();
1788
+ var projectDeletionSchema = z16.object({
1704
1789
  project: identifier,
1705
- purgeAfter: z15.number().int()
1790
+ purgeAfter: z16.number().int()
1706
1791
  });
1707
- var projectTransferInputSchema = z15.object({ organization: identifier, confirm: z15.string().min(1).max(80) }).strict();
1708
- var projectTransferSchema = z15.object({
1792
+ var projectTransferInputSchema = z16.object({ organization: identifier, confirm: z16.string().min(1).max(80) }).strict();
1793
+ var projectTransferSchema = z16.object({
1709
1794
  organization: identifier,
1710
1795
  project: identifier
1711
1796
  });
1712
- var grantSchema = z15.object({
1713
- subject: z15.string().min(1).max(200),
1714
- roles: z15.array(roleSchema),
1715
- environments: z15.array(environmentSchema)
1797
+ var grantSchema = z16.object({
1798
+ subject: z16.string().min(1).max(200),
1799
+ roles: z16.array(roleSchema),
1800
+ environments: z16.array(environmentSchema)
1716
1801
  }).strict();
1717
- var grantRecordSchema = z15.object(grantSchema.shape);
1718
- var stockAdditionSchema = z15.object({
1802
+ var grantRecordSchema = z16.object(grantSchema.shape);
1803
+ var stockAdditionSchema = z16.object({
1719
1804
  item: identifier,
1720
- quantity: z15.number().int(),
1805
+ quantity: z16.number().int(),
1721
1806
  actionId: identifier
1722
1807
  });
1723
- var completionRevokeSchema = z15.object({
1808
+ var completionRevokeSchema = z16.object({
1724
1809
  actionId: identifier,
1725
- reason: z15.string().trim().min(1).max(500),
1726
- freeOccurrence: z15.boolean().default(false)
1810
+ reason: z16.string().trim().min(1).max(500),
1811
+ freeOccurrence: z16.boolean().default(false)
1727
1812
  }).strict();
1728
1813
  var RevokedEntitlementOutcome = {
1729
1814
  /** No other completion grants the reward: it is void, after cancelling a handover in progress. */
@@ -1751,221 +1836,221 @@ var RevokedReferralOutcome = {
1751
1836
  /** Qualified on another accepted completion of the program's quest instead. */
1752
1837
  Requalified: "requalified"
1753
1838
  };
1754
- var entitlementOutcomeSchema = z15.string().min(1).max(64);
1755
- var deliveryOutcomeSchema = z15.string().min(1).max(64);
1756
- var referralOutcomeSchema = z15.string().min(1).max(64);
1757
- var completionRevocationSchema = z15.object({
1839
+ var entitlementOutcomeSchema = z16.string().min(1).max(64);
1840
+ var deliveryOutcomeSchema = z16.string().min(1).max(64);
1841
+ var referralOutcomeSchema = z16.string().min(1).max(64);
1842
+ var completionRevocationSchema = z16.object({
1758
1843
  completion: identifier,
1759
1844
  /** The quest ID, or the board ID when `source.kind` is `leaderboard`. */
1760
1845
  quest: identifier,
1761
1846
  member: identifier,
1762
1847
  /** What paid the revoked completion. `source.id` repeats `quest`. */
1763
1848
  source: completionSourceSchema.optional(),
1764
- revokedAt: z15.number(),
1765
- occurrenceFreed: z15.boolean(),
1766
- badges: z15.array(z15.object({ badge: identifier, stillAwarded: z15.boolean() })).optional(),
1767
- points: z15.array(
1768
- z15.object({
1849
+ revokedAt: z16.number(),
1850
+ occurrenceFreed: z16.boolean(),
1851
+ badges: z16.array(z16.object({ badge: identifier, stillAwarded: z16.boolean() })).optional(),
1852
+ points: z16.array(
1853
+ z16.object({
1769
1854
  entry: identifier,
1770
1855
  balance: identifier,
1771
1856
  reversal: identifier.nullable(),
1772
- reversed: z15.number().int(),
1773
- unreversed: z15.number().int()
1857
+ reversed: z16.number().int(),
1858
+ unreversed: z16.number().int()
1774
1859
  })
1775
1860
  ),
1776
- entitlements: z15.array(
1777
- z15.object({
1861
+ entitlements: z16.array(
1862
+ z16.object({
1778
1863
  entitlement: identifier,
1779
1864
  reward: identifier,
1780
1865
  outcome: entitlementOutcomeSchema,
1781
- status: z15.string()
1866
+ status: z16.string()
1782
1867
  })
1783
1868
  ),
1784
- deliveries: z15.array(
1785
- z15.object({
1786
- delivery: z15.string(),
1787
- roleId: z15.string(),
1869
+ deliveries: z16.array(
1870
+ z16.object({
1871
+ delivery: z16.string(),
1872
+ roleId: z16.string(),
1788
1873
  outcome: deliveryOutcomeSchema,
1789
1874
  /**
1790
1875
  * By Relay's records, another accepted, unrevoked completion of the member also granted this
1791
1876
  * role to the same Discord account and server. Relay does not read Discord's membership.
1792
1877
  */
1793
- stillGranted: z15.boolean()
1878
+ stillGranted: z16.boolean()
1794
1879
  })
1795
1880
  ),
1796
- referrals: z15.array(
1797
- z15.object({
1881
+ referrals: z16.array(
1882
+ z16.object({
1798
1883
  program: identifier,
1799
1884
  outcome: referralOutcomeSchema
1800
1885
  })
1801
1886
  ),
1802
- streakMilestone: z15.boolean()
1887
+ streakMilestone: z16.boolean()
1803
1888
  });
1804
- var accessSchema = z15.object({
1805
- actor: z15.string(),
1806
- organization: z15.string(),
1807
- admin: z15.boolean(),
1808
- local: z15.boolean(),
1809
- projects: z15.array(projectSchema)
1889
+ var accessSchema = z16.object({
1890
+ actor: z16.string(),
1891
+ organization: z16.string(),
1892
+ admin: z16.boolean(),
1893
+ local: z16.boolean(),
1894
+ projects: z16.array(projectSchema)
1810
1895
  });
1811
- var querySchema = z15.object({
1812
- q: z15.string().max(200).default(""),
1813
- filter: z15.string().max(50).default("all"),
1814
- offset: z15.coerce.number().int().min(0).max(1e6).default(0),
1815
- limit: z15.coerce.number().int().min(1).max(100).default(25)
1896
+ var querySchema = z16.object({
1897
+ q: z16.string().max(200).default(""),
1898
+ filter: z16.string().max(50).default("all"),
1899
+ offset: z16.coerce.number().int().min(0).max(1e6).default(0),
1900
+ limit: z16.coerce.number().int().min(1).max(100).default(25)
1816
1901
  });
1817
- var accountProfileSchema = z15.object({
1818
- name: z15.string().optional(),
1902
+ var accountProfileSchema = z16.object({
1903
+ name: z16.string().optional(),
1819
1904
  /** The account's handle, where the provider has one (X and Discord). */
1820
- username: z15.string().optional(),
1821
- email: z15.string().optional(),
1822
- emailVerified: z15.boolean().default(false),
1823
- imageUrl: z15.string().url().optional()
1905
+ username: z16.string().optional(),
1906
+ email: z16.string().optional(),
1907
+ emailVerified: z16.boolean().default(false),
1908
+ imageUrl: z16.string().url().optional()
1824
1909
  });
1825
- var memberAccountSchema = z15.object({
1910
+ var memberAccountSchema = z16.object({
1826
1911
  /** `wallet` for wallet sign-in, `account` for every other connected account. */
1827
- kind: z15.enum(["account", "wallet"]),
1828
- provider: z15.string(),
1829
- subject: z15.string(),
1830
- signInEnabled: z15.boolean(),
1912
+ kind: z16.enum(["account", "wallet"]),
1913
+ provider: z16.string(),
1914
+ subject: z16.string(),
1915
+ signInEnabled: z16.boolean(),
1831
1916
  profile: accountProfileSchema.optional()
1832
1917
  });
1833
- var operationSchema = z15.object({
1834
- target: z15.string(),
1835
- paused: z15.boolean(),
1836
- revision: z15.number().int(),
1837
- reason: z15.string(),
1838
- actor: z15.string().nullable(),
1839
- changedAt: z15.number()
1918
+ var operationSchema = z16.object({
1919
+ target: z16.string(),
1920
+ paused: z16.boolean(),
1921
+ revision: z16.number().int(),
1922
+ reason: z16.string(),
1923
+ actor: z16.string().nullable(),
1924
+ changedAt: z16.number()
1840
1925
  });
1841
- var operationInputSchema = z15.object({
1842
- target: z15.union([
1843
- z15.literal("redemptions"),
1844
- z15.string().regex(/^quest:[\w-]+$/)
1926
+ var operationInputSchema = z16.object({
1927
+ target: z16.union([
1928
+ z16.literal("redemptions"),
1929
+ z16.string().regex(/^quest:[\w-]+$/)
1845
1930
  ]),
1846
- paused: z15.boolean(),
1847
- revision: z15.number().int().nonnegative(),
1848
- reason: z15.string().trim().min(1).max(500),
1931
+ paused: z16.boolean(),
1932
+ revision: z16.number().int().nonnegative(),
1933
+ reason: z16.string().trim().min(1).max(500),
1849
1934
  actionId: identifier
1850
1935
  }).strict();
1851
- var questLifecycleInputSchema = z15.object({
1936
+ var questLifecycleInputSchema = z16.object({
1852
1937
  quest: identifier,
1853
1938
  expectedRelease: identifier.optional(),
1854
- archived: z15.boolean(),
1855
- reason: z15.string().trim().min(1).max(500),
1939
+ archived: z16.boolean(),
1940
+ reason: z16.string().trim().min(1).max(500),
1856
1941
  actionId: identifier
1857
1942
  }).strict();
1858
- var questLifecycleSchema = z15.object({
1943
+ var questLifecycleSchema = z16.object({
1859
1944
  quest: identifier,
1860
1945
  key: identifier.nullable(),
1861
- title: z15.string(),
1946
+ title: z16.string(),
1862
1947
  release: identifier,
1863
- lifecycle: z15.enum(["active", "paused", "archived"]),
1864
- changed: z15.boolean()
1948
+ lifecycle: z16.enum(["active", "paused", "archived"]),
1949
+ changed: z16.boolean()
1865
1950
  });
1866
- var memberSchema = z15.object({
1867
- id: z15.string(),
1868
- test: z15.boolean().optional(),
1869
- name: z15.string().nullable().optional(),
1870
- accounts: z15.array(memberAccountSchema).default([]),
1871
- attempts: z15.number(),
1872
- completions: z15.number(),
1873
- rewards: z15.number(),
1874
- lastActivity: z15.number().nullable()
1951
+ var memberSchema = z16.object({
1952
+ id: z16.string(),
1953
+ test: z16.boolean().optional(),
1954
+ name: z16.string().nullable().optional(),
1955
+ accounts: z16.array(memberAccountSchema).default([]),
1956
+ attempts: z16.number(),
1957
+ completions: z16.number(),
1958
+ rewards: z16.number(),
1959
+ lastActivity: z16.number().nullable()
1875
1960
  });
1876
- var personSchema = z15.object({
1877
- id: z15.string(),
1878
- test: z15.boolean().optional(),
1879
- name: z15.string().nullable().optional(),
1880
- accounts: z15.array(memberAccountSchema).default([])
1961
+ var personSchema = z16.object({
1962
+ id: z16.string(),
1963
+ test: z16.boolean().optional(),
1964
+ name: z16.string().nullable().optional(),
1965
+ accounts: z16.array(memberAccountSchema).default([])
1881
1966
  });
1882
- var metricsSchema = z15.object({
1883
- quests: z15.number(),
1884
- members: z15.number(),
1885
- attempts: z15.number(),
1886
- completions: z15.number(),
1887
- review: z15.number(),
1888
- failed: z15.number(),
1889
- entitlements: z15.number()
1967
+ var metricsSchema = z16.object({
1968
+ quests: z16.number(),
1969
+ members: z16.number(),
1970
+ attempts: z16.number(),
1971
+ completions: z16.number(),
1972
+ review: z16.number(),
1973
+ failed: z16.number(),
1974
+ entitlements: z16.number()
1890
1975
  });
1891
- var readinessSchema = z15.object({
1892
- checks: z15.array(
1893
- z15.object({
1894
- id: z15.string(),
1895
- status: z15.enum(["ready", "blocked"]),
1896
- title: z15.string(),
1897
- detail: z15.string()
1976
+ var readinessSchema = z16.object({
1977
+ checks: z16.array(
1978
+ z16.object({
1979
+ id: z16.string(),
1980
+ status: z16.enum(["ready", "blocked"]),
1981
+ title: z16.string(),
1982
+ detail: z16.string()
1898
1983
  })
1899
1984
  )
1900
1985
  });
1901
- var inventorySchema = z15.object({
1902
- item: z15.string(),
1903
- name: z15.string().nullable().default(null),
1904
- available: z15.number(),
1905
- reserved: z15.number(),
1906
- allocated: z15.number().default(0)
1986
+ var inventorySchema = z16.object({
1987
+ item: z16.string(),
1988
+ name: z16.string().nullable().default(null),
1989
+ available: z16.number(),
1990
+ reserved: z16.number(),
1991
+ allocated: z16.number().default(0)
1907
1992
  });
1908
- var auditRecordSchema = z15.object({
1909
- id: z15.string(),
1910
- action: z15.string(),
1911
- actor: z15.string().nullable(),
1993
+ var auditRecordSchema = z16.object({
1994
+ id: z16.string(),
1995
+ action: z16.string(),
1996
+ actor: z16.string().nullable(),
1912
1997
  user: operatorUserSchema.nullable().optional(),
1913
- detail: z15.string(),
1914
- at: z15.number(),
1915
- attempt: z15.string().nullable()
1998
+ detail: z16.string(),
1999
+ at: z16.number(),
2000
+ attempt: z16.string().nullable()
1916
2001
  }).refine((record5) => !record5.user || record5.user.id === record5.actor, {
1917
2002
  message: "User profile must match the recorded actor",
1918
2003
  path: ["user"]
1919
2004
  });
1920
- var pageSchema = z15.object({
2005
+ var pageSchema = z16.object({
1921
2006
  snapshot: snapshotSchema,
1922
- members: z15.array(memberSchema),
1923
- people: z15.array(personSchema).default([]),
2007
+ members: z16.array(memberSchema),
2008
+ people: z16.array(personSchema).default([]),
1924
2009
  metrics: metricsSchema,
1925
- total: z15.number(),
1926
- offset: z15.number(),
1927
- limit: z15.number(),
1928
- inventory: z15.array(inventorySchema),
1929
- operations: z15.array(operationSchema).default([]),
1930
- audit: z15.array(auditRecordSchema).default([]),
1931
- questCounts: z15.record(z15.string(), z15.number())
2010
+ total: z16.number(),
2011
+ offset: z16.number(),
2012
+ limit: z16.number(),
2013
+ inventory: z16.array(inventorySchema),
2014
+ operations: z16.array(operationSchema).default([]),
2015
+ audit: z16.array(auditRecordSchema).default([]),
2016
+ questCounts: z16.record(z16.string(), z16.number())
1932
2017
  });
1933
- var managedOAuthAccountBaseSchema = z15.object({
1934
- provider: z15.enum(["x", "discord"]),
1935
- revision: z15.number().int().nonnegative()
2018
+ var managedOAuthAccountBaseSchema = z16.object({
2019
+ provider: z16.enum(["x", "discord"]),
2020
+ revision: z16.number().int().nonnegative()
1936
2021
  });
1937
- var managedOAuthAccountSchema = z15.discriminatedUnion("status", [
2022
+ var managedOAuthAccountSchema = z16.discriminatedUnion("status", [
1938
2023
  managedOAuthAccountBaseSchema.extend({
1939
- status: z15.literal("connected"),
1940
- subject: z15.string().min(1),
1941
- linkedAt: z15.number(),
2024
+ status: z16.literal("connected"),
2025
+ subject: z16.string().min(1),
2026
+ linkedAt: z16.number(),
1942
2027
  /**
1943
2028
  * True when a member import attached the account with the organization's word for it, not the
1944
2029
  * member's proof. Absent from Relay versions without imports.
1945
2030
  */
1946
- imported: z15.boolean().optional()
2031
+ imported: z16.boolean().optional()
1947
2032
  }),
1948
- managedOAuthAccountBaseSchema.extend({ status: z15.literal("disconnected") })
2033
+ managedOAuthAccountBaseSchema.extend({ status: z16.literal("disconnected") })
1949
2034
  ]);
1950
2035
  var managedTelegramAccountBaseSchema = managedOAuthAccountBaseSchema.extend({
1951
- provider: z15.literal("telegram")
2036
+ provider: z16.literal("telegram")
1952
2037
  });
1953
- var managedTelegramAccountSchema = z15.discriminatedUnion("status", [
2038
+ var managedTelegramAccountSchema = z16.discriminatedUnion("status", [
1954
2039
  managedTelegramAccountBaseSchema.extend({
1955
- status: z15.literal("connected"),
2040
+ status: z16.literal("connected"),
1956
2041
  /** The numeric Telegram user ID. */
1957
- subject: z15.string().min(1),
1958
- linkedAt: z15.number()
2042
+ subject: z16.string().min(1),
2043
+ linkedAt: z16.number()
1959
2044
  }),
1960
2045
  managedTelegramAccountBaseSchema.extend({
1961
- status: z15.literal("disconnected")
2046
+ status: z16.literal("disconnected")
1962
2047
  })
1963
2048
  ]);
1964
- var memberOAuthUnlinkInputSchema = z15.object({
1965
- provider: z15.enum(["x", "discord"]),
1966
- subject: z15.string().min(1).max(4096),
1967
- revision: z15.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
1968
- reason: z15.string().trim().min(1).max(500)
2049
+ var memberOAuthUnlinkInputSchema = z16.object({
2050
+ provider: z16.enum(["x", "discord"]),
2051
+ subject: z16.string().min(1).max(4096),
2052
+ revision: z16.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
2053
+ reason: z16.string().trim().min(1).max(500)
1969
2054
  }).strict();
1970
2055
  var memberTelegramUnlinkInputSchema = memberOAuthUnlinkInputSchema.omit({ provider: true }).strict();
1971
2056
  var managedWalletSchema = linkedWalletSchema.extend({
@@ -1973,27 +2058,27 @@ var managedWalletSchema = linkedWalletSchema.extend({
1973
2058
  * True when a member import attached the wallet with the organization's word for it, and the
1974
2059
  * member has not proved it since. Absent from Relay versions without imports.
1975
2060
  */
1976
- imported: z15.boolean().optional(),
1977
- status: z15.enum(["linked", "unlinked"]),
1978
- unlinkedAt: z15.number().int().nullable(),
2061
+ imported: z16.boolean().optional(),
2062
+ status: z16.enum(["linked", "unlinked"]),
2063
+ unlinkedAt: z16.number().int().nullable(),
1979
2064
  /** "member", or the operator or key that unlinked it. */
1980
- unlinkedBy: z15.string().nullable()
2065
+ unlinkedBy: z16.string().nullable()
1981
2066
  });
1982
2067
  var managedMemberIdentitySchema = memberIdentitySchema.extend({
1983
2068
  /**
1984
2069
  * True for an X account a member import attached, until the member links or signs in with it
1985
2070
  * through X. Absent from Relay versions without imports.
1986
2071
  */
1987
- imported: z15.boolean().optional(),
1988
- status: z15.enum(["linked", "unlinked"]),
1989
- unlinkedAt: z15.number().int().nullable(),
2072
+ imported: z16.boolean().optional(),
2073
+ status: z16.enum(["linked", "unlinked"]),
2074
+ unlinkedAt: z16.number().int().nullable(),
1990
2075
  /** The operator or key that unlinked it. */
1991
- unlinkedBy: z15.string().nullable()
2076
+ unlinkedBy: z16.string().nullable()
1992
2077
  });
1993
- var memberIdentityChangeInputSchema = z15.object({
2078
+ var memberIdentityChangeInputSchema = z16.object({
1994
2079
  kind: appIdentityKindSchema,
1995
- subject: z15.string().min(1).max(256),
1996
- reason: z15.string().trim().min(1).max(500)
2080
+ subject: z16.string().min(1).max(256),
2081
+ reason: z16.string().trim().min(1).max(500)
1997
2082
  }).strict();
1998
2083
  var balanceCheckSchema = walletBalanceSchema.pick({
1999
2084
  chain: true,
@@ -2003,76 +2088,76 @@ var balanceCheckSchema = walletBalanceSchema.pick({
2003
2088
  wallets: true,
2004
2089
  observedAt: true
2005
2090
  }).extend({ attempt: identifier });
2006
- var walletBalanceChainsSchema = z15.object({
2007
- chains: z15.array(
2008
- z15.object({
2009
- chain: z15.union([
2010
- z15.literal(solanaMainnet),
2091
+ var walletBalanceChainsSchema = z16.object({
2092
+ chains: z16.array(
2093
+ z16.object({
2094
+ chain: z16.union([
2095
+ z16.literal(solanaMainnet),
2011
2096
  cosmosNetworkSchema,
2012
2097
  evmChainIdSchema
2013
2098
  ]),
2014
- name: z15.string(),
2015
- testnet: z15.boolean()
2099
+ name: z16.string(),
2100
+ testnet: z16.boolean()
2016
2101
  })
2017
2102
  )
2018
2103
  });
2019
- var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason: z15.string().trim().min(1).max(500) }).strict();
2104
+ var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason: z16.string().trim().min(1).max(500) }).strict();
2020
2105
  var memberWalletSignInInputSchema = walletUnlinkInputSchema.extend({
2021
- enabled: z15.boolean(),
2022
- reason: z15.string().trim().min(1).max(500)
2106
+ enabled: z16.boolean(),
2107
+ reason: z16.string().trim().min(1).max(500)
2023
2108
  }).strict();
2024
- var telegramBotIdSchema = z15.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789");
2025
- var participantSignInSchema = z15.object({
2026
- providers: z15.array(
2027
- z15.object({ provider: authProviderSchema, configured: z15.boolean() })
2109
+ var telegramBotIdSchema = z16.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789");
2110
+ var participantSignInSchema = z16.object({
2111
+ providers: z16.array(
2112
+ z16.object({ provider: authProviderSchema, configured: z16.boolean() })
2028
2113
  ),
2029
- email: z15.boolean(),
2114
+ email: z16.boolean(),
2030
2115
  /** Wallet families: `"solana"`, `"eip155"`, `"cosmos"`. */
2031
2116
  wallets: walletSignInNetworksSchema,
2032
2117
  /** Why participants cannot sign in to this project, or null. */
2033
- issue: z15.string().nullable(),
2118
+ issue: z16.string().nullable(),
2034
2119
  /**
2035
2120
  * Telegram, outside `providers` in SDK 1.x: whether Domino configured Telegram Login, and the
2036
2121
  * bot whose Mini App participants sign in from, or null when Mini App sign-in is off. Absent
2037
2122
  * from Relay versions without Telegram.
2038
2123
  */
2039
- telegram: z15.object({
2040
- login: z15.boolean(),
2124
+ telegram: z16.object({
2125
+ login: z16.boolean(),
2041
2126
  miniAppBotId: telegramBotIdSchema.nullable()
2042
2127
  }).optional(),
2043
- updatedAt: z15.number().nullable(),
2044
- updatedBy: z15.string().nullable()
2128
+ updatedAt: z16.number().nullable(),
2129
+ updatedBy: z16.string().nullable()
2045
2130
  });
2046
- var participantSignInInputSchema = z15.object({
2131
+ var participantSignInInputSchema = z16.object({
2047
2132
  wallets: walletSignInNetworksSchema,
2048
- telegram: z15.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
2133
+ telegram: z16.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
2049
2134
  }).strict();
2050
- var completionRevocationShortfallSchema = z15.object({
2135
+ var completionRevocationShortfallSchema = z16.object({
2051
2136
  completion: identifier,
2052
2137
  quest: identifier,
2053
- revokedAt: z15.number().int().nonnegative().safe(),
2054
- unreversedPoints: z15.record(identifier, z15.number().int().positive().safe())
2138
+ revokedAt: z16.number().int().nonnegative().safe(),
2139
+ unreversedPoints: z16.record(identifier, z16.number().int().positive().safe())
2055
2140
  });
2056
- var memberDetailSchema = z15.object({
2141
+ var memberDetailSchema = z16.object({
2057
2142
  snapshot: snapshotSchema,
2058
2143
  member: memberSchema,
2059
2144
  progress: memberProgressSchema,
2060
2145
  /** Up to 25 revoked completions with an unreversed point remainder, newest first. */
2061
- revocationShortfalls: z15.array(completionRevocationShortfallSchema).default([]),
2146
+ revocationShortfalls: z16.array(completionRevocationShortfallSchema).default([]),
2062
2147
  /** Current and historical campaign enrollment state, including inactive enrollments. */
2063
- campaignEnrollments: z15.array(campaignEnrollmentSchema).default([]),
2064
- passes: z15.array(
2065
- z15.object({
2066
- provider: z15.string(),
2067
- event: z15.string(),
2068
- subject: z15.string(),
2148
+ campaignEnrollments: z16.array(campaignEnrollmentSchema).default([]),
2149
+ passes: z16.array(
2150
+ z16.object({
2151
+ provider: z16.string(),
2152
+ event: z16.string(),
2153
+ subject: z16.string(),
2069
2154
  attempt: identifier.nullable()
2070
2155
  })
2071
2156
  ).default([]),
2072
2157
  /** Linked and unlinked wallets. */
2073
- wallets: z15.array(managedWalletSchema),
2158
+ wallets: z16.array(managedWalletSchema),
2074
2159
  /** The member's 10 most recent recorded balance reads, newest first. */
2075
- balanceChecks: z15.array(balanceCheckSchema),
2160
+ balanceChecks: z16.array(balanceCheckSchema),
2076
2161
  /** The member's participant profile in this project. */
2077
2162
  profile: managedProfileSchema.nullable(),
2078
2163
  /**
@@ -2080,11 +2165,11 @@ var memberDetailSchema = z15.object({
2080
2165
  * member ID: their selected X and Discord accounts and their `app:<name>` identities in this
2081
2166
  * project, including app identities an operator unlinked, by kind.
2082
2167
  */
2083
- identities: z15.array(managedMemberIdentitySchema)
2168
+ identities: z16.array(managedMemberIdentitySchema)
2084
2169
  });
2085
- var managedMemberProgressSchema = z15.object({
2170
+ var managedMemberProgressSchema = z16.object({
2086
2171
  member: identifier,
2087
- quests: z15.array(
2172
+ quests: z16.array(
2088
2173
  memberProgressSchema.shape.quests.element.extend({
2089
2174
  /** The streak as `members.get` reports it, without the list of qualifying days. */
2090
2175
  streak: streakProgressSchema.omit({ days: true }).nullable().optional()
@@ -2095,152 +2180,152 @@ var managedMemberProgressSchema = z15.object({
2095
2180
  /** Each point balance the member has, by balance ID. */
2096
2181
  balances: snapshotSchema.shape.balances
2097
2182
  });
2098
- var stockInputSchema = z15.object({
2183
+ var stockInputSchema = z16.object({
2099
2184
  item: identifier,
2100
- quantity: z15.number().int().positive().max(1e6),
2185
+ quantity: z16.number().int().positive().max(1e6),
2101
2186
  actionId: identifier
2102
2187
  }).strict();
2103
- var ingestTrackerScopeSchema = z15.array(identifier).min(1).max(100).nullable();
2104
- var tokenScopeInputSchema = z15.object({ ingestTrackers: ingestTrackerScopeSchema }).strict();
2105
- var tokenInputSchema = z15.object({
2106
- name: z15.string().trim().min(1).max(80),
2188
+ var ingestTrackerScopeSchema = z16.array(identifier).min(1).max(100).nullable();
2189
+ var tokenScopeInputSchema = z16.object({ ingestTrackers: ingestTrackerScopeSchema }).strict();
2190
+ var tokenInputSchema = z16.object({
2191
+ name: z16.string().trim().min(1).max(80),
2107
2192
  project: identifier,
2108
2193
  environment: environmentSchema,
2109
- permissions: z15.array(permissionSchema).min(1),
2194
+ permissions: z16.array(permissionSchema).min(1),
2110
2195
  ingestTrackers: ingestTrackerScopeSchema.optional(),
2111
- days: z15.number().int().min(1).max(90).default(30)
2196
+ days: z16.number().int().min(1).max(90).default(30)
2112
2197
  }).strict();
2113
- var tokenSchema = z15.object({
2114
- id: z15.string(),
2115
- name: z15.string(),
2116
- project: z15.string(),
2198
+ var tokenSchema = z16.object({
2199
+ id: z16.string(),
2200
+ name: z16.string(),
2201
+ project: z16.string(),
2117
2202
  environment: environmentSchema,
2118
2203
  permissions: permissionListSchema,
2119
2204
  ingestTrackers: ingestTrackerScopeSchema.optional(),
2120
- expiresAt: z15.number()
2205
+ expiresAt: z16.number()
2121
2206
  });
2122
- var issuedTokenSchema = tokenSchema.extend({ token: z15.string() });
2123
- var serviceKeyInputSchema = z15.object({
2124
- name: z15.string().trim().min(1).max(80),
2125
- permissions: z15.array(permissionSchema).min(1).refine(
2207
+ var issuedTokenSchema = tokenSchema.extend({ token: z16.string() });
2208
+ var serviceKeyInputSchema = z16.object({
2209
+ name: z16.string().trim().min(1).max(80),
2210
+ permissions: z16.array(permissionSchema).min(1).refine(
2126
2211
  (permissions) => !permissions.includes("access"),
2127
2212
  "Service keys cannot hold the access permission"
2128
2213
  ),
2129
2214
  /** Days until the first secret expires. Omit it for a key that never expires. */
2130
- expiresInDays: z15.number().int().min(1).max(3650).optional()
2215
+ expiresInDays: z16.number().int().min(1).max(3650).optional()
2131
2216
  }).strict();
2132
- var serviceKeySchema = z15.object({
2133
- id: z15.string().uuid(),
2134
- organization: z15.string(),
2135
- project: z15.string(),
2217
+ var serviceKeySchema = z16.object({
2218
+ id: z16.string().uuid(),
2219
+ organization: z16.string(),
2220
+ project: z16.string(),
2136
2221
  environment: environmentSchema,
2137
- name: z15.string(),
2222
+ name: z16.string(),
2138
2223
  permissions: permissionListSchema,
2139
2224
  /** The Clerk user ID of the administrator who created it. */
2140
- createdBy: z15.string(),
2141
- createdAt: z15.number(),
2225
+ createdBy: z16.string(),
2226
+ createdAt: z16.number(),
2142
2227
  /** The latest use of any of its secrets, revoked ones included; null when none was used. */
2143
- lastUsedAt: z15.number().nullable(),
2228
+ lastUsedAt: z16.number().nullable(),
2144
2229
  /** Its working secrets, oldest first. Any of them authenticates the key. */
2145
- secrets: z15.array(credentialSecretSchema)
2230
+ secrets: z16.array(credentialSecretSchema)
2146
2231
  });
2147
2232
  var issuedServiceKeySchema = serviceKeySchema.extend({
2148
- secret: z15.string().uuid(),
2149
- token: z15.string()
2233
+ secret: z16.string().uuid(),
2234
+ token: z16.string()
2150
2235
  });
2151
- var teamSchema = z15.array(
2152
- z15.object({ id: z15.string(), label: z15.string() })
2236
+ var teamSchema = z16.array(
2237
+ z16.object({ id: z16.string(), label: z16.string() })
2153
2238
  );
2154
- var memberLookupSchema = z15.object({
2155
- provider: z15.string().min(1).max(200),
2156
- subject: z15.string().min(1).max(2048)
2239
+ var memberLookupSchema = z16.object({
2240
+ provider: z16.string().min(1).max(200),
2241
+ subject: z16.string().min(1).max(2048)
2157
2242
  }).strict();
2158
- var booleanQuery = z15.union([
2159
- z15.boolean(),
2160
- z15.enum(["true", "false"]).transform((v) => v === "true")
2243
+ var booleanQuery = z16.union([
2244
+ z16.boolean(),
2245
+ z16.enum(["true", "false"]).transform((v) => v === "true")
2161
2246
  ]);
2162
- var managedMemberQuerySchema = z15.strictObject({
2163
- q: z15.string().max(200).optional(),
2247
+ var managedMemberQuerySchema = z16.strictObject({
2248
+ q: z16.string().max(200).optional(),
2164
2249
  needsReview: booleanQuery.optional(),
2165
- limit: z15.coerce.number().int().min(1).max(100).optional(),
2250
+ limit: z16.coerce.number().int().min(1).max(100).optional(),
2166
2251
  cursor: pageCursorSchema.optional()
2167
2252
  });
2168
- var managedMemberPageSchema = z15.object({
2169
- items: z15.array(memberSchema),
2170
- total: z15.number().int().nonnegative(),
2171
- nextCursor: z15.string().nullable()
2253
+ var managedMemberPageSchema = z16.object({
2254
+ items: z16.array(memberSchema),
2255
+ total: z16.number().int().nonnegative(),
2256
+ nextCursor: z16.string().nullable()
2172
2257
  });
2173
2258
  var projectMetricsSchema = metricsSchema.extend({
2174
- completionsByQuest: z15.array(
2175
- z15.object({ quest: identifier, completions: z15.number() })
2259
+ completionsByQuest: z16.array(
2260
+ z16.object({ quest: identifier, completions: z16.number() })
2176
2261
  )
2177
2262
  });
2178
- var pageLimit = z15.coerce.number().int().min(1).max(100).optional();
2179
- var managedAttemptQuerySchema = z15.strictObject({
2180
- q: z15.string().max(200).optional(),
2181
- status: z15.string().min(1).max(50).optional(),
2263
+ var pageLimit = z16.coerce.number().int().min(1).max(100).optional();
2264
+ var managedAttemptQuerySchema = z16.strictObject({
2265
+ q: z16.string().max(200).optional(),
2266
+ status: z16.string().min(1).max(50).optional(),
2182
2267
  limit: pageLimit,
2183
2268
  cursor: pageCursorSchema.optional()
2184
2269
  });
2185
- var managedAttemptPageSchema = z15.object({
2186
- items: z15.array(attemptSchema),
2187
- releases: z15.array(publishedReleaseSchema),
2188
- people: z15.array(personSchema),
2189
- total: z15.number().int().nonnegative(),
2190
- nextCursor: z15.string().nullable()
2270
+ var managedAttemptPageSchema = z16.object({
2271
+ items: z16.array(attemptSchema),
2272
+ releases: z16.array(publishedReleaseSchema),
2273
+ people: z16.array(personSchema),
2274
+ total: z16.number().int().nonnegative(),
2275
+ nextCursor: z16.string().nullable()
2191
2276
  });
2192
- var managedReleaseQuerySchema = z15.strictObject({
2277
+ var managedReleaseQuerySchema = z16.strictObject({
2193
2278
  quest: identifier.optional(),
2194
2279
  limit: pageLimit,
2195
2280
  cursor: pageCursorSchema.optional()
2196
2281
  });
2197
- var managedReleasePageSchema = z15.object({
2198
- items: z15.array(publishedReleaseSchema),
2199
- nextCursor: z15.string().nullable()
2282
+ var managedReleasePageSchema = z16.object({
2283
+ items: z16.array(publishedReleaseSchema),
2284
+ nextCursor: z16.string().nullable()
2200
2285
  });
2201
- var managedAttemptSchema = z15.object({
2286
+ var managedAttemptSchema = z16.object({
2202
2287
  attempt: attemptSchema,
2203
2288
  release: publishedReleaseSchema.nullable(),
2204
- events: z15.array(eventSchema),
2289
+ events: z16.array(eventSchema),
2205
2290
  person: personSchema
2206
2291
  });
2207
- var managedEntitlementQuerySchema = z15.strictObject({
2208
- q: z15.string().max(200).optional(),
2209
- status: z15.string().min(1).max(50).optional(),
2292
+ var managedEntitlementQuerySchema = z16.strictObject({
2293
+ q: z16.string().max(200).optional(),
2294
+ status: z16.string().min(1).max(50).optional(),
2210
2295
  limit: pageLimit,
2211
2296
  cursor: pageCursorSchema.optional()
2212
2297
  });
2213
- var managedEntitlementPageSchema = z15.object({
2214
- items: z15.array(entitlementSchema),
2215
- people: z15.array(personSchema),
2216
- total: z15.number().int().nonnegative(),
2217
- nextCursor: z15.string().nullable()
2298
+ var managedEntitlementPageSchema = z16.object({
2299
+ items: z16.array(entitlementSchema),
2300
+ people: z16.array(personSchema),
2301
+ total: z16.number().int().nonnegative(),
2302
+ nextCursor: z16.string().nullable()
2218
2303
  });
2219
- var managedEntitlementSchema = z15.object({
2304
+ var managedEntitlementSchema = z16.object({
2220
2305
  entitlement: entitlementSchema,
2221
2306
  person: personSchema
2222
2307
  });
2223
2308
  var managedStockItemSchema = inventorySchema.extend({
2224
- offers: z15.array(identifier)
2309
+ offers: z16.array(identifier)
2225
2310
  });
2226
- var auditQuerySchema = z15.strictObject({
2227
- category: z15.enum(["reviews", "rewards", "configuration"]).optional(),
2228
- q: z15.string().max(200).optional(),
2311
+ var auditQuerySchema = z16.strictObject({
2312
+ category: z16.enum(["reviews", "rewards", "configuration"]).optional(),
2313
+ q: z16.string().max(200).optional(),
2229
2314
  limit: pageLimit,
2230
2315
  cursor: pageCursorSchema.optional()
2231
2316
  });
2232
2317
  var accessHistoryQuerySchema = auditQuerySchema.omit({
2233
2318
  category: true
2234
2319
  });
2235
- var auditPageSchema = z15.object({
2236
- items: z15.array(auditRecordSchema),
2237
- total: z15.number().int().nonnegative(),
2238
- nextCursor: z15.string().nullable()
2320
+ var auditPageSchema = z16.object({
2321
+ items: z16.array(auditRecordSchema),
2322
+ total: z16.number().int().nonnegative(),
2323
+ nextCursor: z16.string().nullable()
2239
2324
  });
2240
- var verifiedPassSchema = z15.object({
2325
+ var verifiedPassSchema = z16.object({
2241
2326
  provider: identifier,
2242
2327
  event: identifier,
2243
- subject: z15.string().min(1).max(2048),
2328
+ subject: z16.string().min(1).max(2048),
2244
2329
  member: identifier,
2245
2330
  quest: identifier
2246
2331
  }).strict();
@@ -2264,7 +2349,7 @@ function clientFailure(error) {
2264
2349
  return new ManagementError({
2265
2350
  kind: "client",
2266
2351
  code: ManagementErrorCode.InvalidInput,
2267
- message: error instanceof z15.ZodError ? `Invalid management request: ${z15.prettifyError(error)}` : error instanceof Error ? error.message : "Invalid management request",
2352
+ message: error instanceof z16.ZodError ? `Invalid management request: ${z16.prettifyError(error)}` : error instanceof Error ? error.message : "Invalid management request",
2268
2353
  cause: error
2269
2354
  });
2270
2355
  }
@@ -2302,7 +2387,7 @@ function managementClient(options) {
2302
2387
  call
2303
2388
  );
2304
2389
  }
2305
- const ok = z15.object({ ok: z15.literal(true) });
2390
+ const ok = z16.object({ ok: z16.literal(true) });
2306
2391
  function pointHistory(member, ledger, query = {}, call) {
2307
2392
  return get(
2308
2393
  `/points/${identifier.parse(member)}/${identifier.parse(ledger)}/history${queryString(typeof query === "number" ? { before: query } : pageQuerySchema.parse(query))}`,
@@ -2387,7 +2472,7 @@ function managementClient(options) {
2387
2472
  const input = isInput ? inputOrCall ?? {} : {};
2388
2473
  const options2 = isInput ? call : inputOrCall;
2389
2474
  return post(
2390
- `/webhooks/${z15.string().uuid().parse(id)}/rotate-secret`,
2475
+ `/webhooks/${z16.string().uuid().parse(id)}/rotate-secret`,
2391
2476
  webhookSecretSchema,
2392
2477
  webhookRotateInputSchema.parse(withActionId(input)),
2393
2478
  options2
@@ -2435,8 +2520,8 @@ function managementClient(options) {
2435
2520
  }
2436
2521
  return exchange(
2437
2522
  path,
2438
- z15.object({
2439
- status: z15.number(),
2523
+ z16.object({
2524
+ status: z16.number(),
2440
2525
  operationId: identifier.optional(),
2441
2526
  result: schema
2442
2527
  }),
@@ -2491,7 +2576,7 @@ function managementClient(options) {
2491
2576
  call
2492
2577
  ),
2493
2578
  ...resourceArchiveMethods("tracker"),
2494
- list: (call) => get("/trackers", z15.array(trackerStatusSchema), call),
2579
+ list: (call) => get("/trackers", z16.array(trackerStatusSchema), call),
2495
2580
  get: (reference, call) => get(
2496
2581
  `/trackers/${identifier.parse(reference)}`,
2497
2582
  trackerStatusSchema,
@@ -2607,7 +2692,7 @@ function managementClient(options) {
2607
2692
  engagementPublishSchema.parse(withActionId(input)),
2608
2693
  call
2609
2694
  ),
2610
- list: (call) => get("/engagement", z15.array(engagementRuleSchema), call),
2695
+ list: (call) => get("/engagement", z16.array(engagementRuleSchema), call),
2611
2696
  page: (input, call) => get(
2612
2697
  "/engagement/history" + queryString(engagementPageQuerySchema.parse(input)),
2613
2698
  engagementPageSchema,
@@ -2627,7 +2712,7 @@ function managementClient(options) {
2627
2712
  )
2628
2713
  },
2629
2714
  badges: {
2630
- list: (call) => get("/badges", z15.array(managedBadgeSchema), call),
2715
+ list: (call) => get("/badges", z16.array(managedBadgeSchema), call),
2631
2716
  create: (input, call) => create("/badges", managedBadgeSchema, createBadgeSchema, input, call),
2632
2717
  update: (badge, input, call) => {
2633
2718
  const body = badgePropertiesSchema.extend(badgeMutationSchema.shape).parse(withActionId(input));
@@ -2670,7 +2755,7 @@ function managementClient(options) {
2670
2755
  },
2671
2756
  pointLedgers: {
2672
2757
  unarchive: (ledger, input, call) => archiveResource("point-ledger", ledger, false, input, call),
2673
- list: (call) => get("/point-ledgers", z15.array(managedPointLedgerSchema), call),
2758
+ list: (call) => get("/point-ledgers", z16.array(managedPointLedgerSchema), call),
2674
2759
  /**
2675
2760
  * Creates a point ledger, with a stable `key` when code refers to it; requires `publish`. In
2676
2761
  * live, only a person in Console can create one.
@@ -2700,7 +2785,7 @@ function managementClient(options) {
2700
2785
  },
2701
2786
  points: {
2702
2787
  /** @deprecated Use `pointLedgers.list()`, which reads the same ledgers. Removed in 2.0.0. */
2703
- ledgers: (call) => get("/point-ledgers", z15.array(managedPointLedgerSchema), call),
2788
+ ledgers: (call) => get("/point-ledgers", z16.array(managedPointLedgerSchema), call),
2704
2789
  /** @deprecated Use `pointLedgers.create(input)`. Removed in 2.0.0. */
2705
2790
  createLedger: createPointLedger,
2706
2791
  /**
@@ -2738,7 +2823,7 @@ function managementClient(options) {
2738
2823
  referralHistorySchema,
2739
2824
  call
2740
2825
  ),
2741
- list: (call) => get("/referrals", z15.array(publishedReferralSchema), call),
2826
+ list: (call) => get("/referrals", z16.array(publishedReferralSchema), call),
2742
2827
  participants: referralParticipants,
2743
2828
  /**
2744
2829
  * Suspends or restores a member's referral relationship, with a reason; requires `publish`.
@@ -2801,7 +2886,7 @@ function managementClient(options) {
2801
2886
  },
2802
2887
  leaderboards: {
2803
2888
  ...resourceArchiveMethods("leaderboard"),
2804
- list: (call) => get("/leaderboards", z15.array(publishedLeaderboardSchema), call),
2889
+ list: (call) => get("/leaderboards", z16.array(publishedLeaderboardSchema), call),
2805
2890
  standings: (board, input = {}, call) => {
2806
2891
  const query = leaderboardQuerySchema.parse(input);
2807
2892
  return get(
@@ -2815,13 +2900,13 @@ function managementClient(options) {
2815
2900
  },
2816
2901
  history: (board, call) => get(
2817
2902
  `/leaderboards/${identifier.parse(board)}/history`,
2818
- z15.array(publishedLeaderboardSchema),
2903
+ z16.array(publishedLeaderboardSchema),
2819
2904
  call
2820
2905
  ),
2821
2906
  /** Current members of the board's exclusion group (`exclusionGroup`), by member ID. */
2822
2907
  exclusions: (board, call) => get(
2823
2908
  `/leaderboards/${identifier.parse(board)}/exclusions`,
2824
- z15.array(z15.object({ member: identifier })),
2909
+ z16.array(z16.object({ member: identifier })),
2825
2910
  call
2826
2911
  ),
2827
2912
  /**
@@ -2886,7 +2971,7 @@ function managementClient(options) {
2886
2971
  ),
2887
2972
  settlements: (board, call) => get(
2888
2973
  `/leaderboards/${identifier.parse(board)}/settlements`,
2889
- z15.array(leaderboardSettlementSummarySchema),
2974
+ z16.array(leaderboardSettlementSummarySchema),
2890
2975
  call
2891
2976
  ),
2892
2977
  settlement: (settlement, call) => get(
@@ -2971,7 +3056,7 @@ function managementClient(options) {
2971
3056
  *
2972
3057
  * @deprecated Use `history`, which pages by `cursor` and `nextCursor`. Removed in 2.0.0.
2973
3058
  */
2974
- list: (call) => get("/deployments", z15.array(deploymentRecordSchema), call),
3059
+ list: (call) => get("/deployments", z16.array(deploymentRecordSchema), call),
2975
3060
  /**
2976
3061
  * The project environment's deployments, newest first, one page at a time, with the two
2977
3062
  * newest published deployments beside every page. Pass a page's `nextCursor` back as
@@ -2987,6 +3072,10 @@ function managementClient(options) {
2987
3072
  deploymentRecordSchema,
2988
3073
  call
2989
3074
  ),
3075
+ /**
3076
+ * Resolves a deployment against test without publishing it. Live refuses it with
3077
+ * `promotion-required`: code reaches live through a promotion from test.
3078
+ */
2990
3079
  preview: (input, call) => {
2991
3080
  const { engagement, ...deployment } = projectDeploymentSchema.parse(input);
2992
3081
  return post(
@@ -3002,6 +3091,64 @@ function managementClient(options) {
3002
3091
  promote: promoteDeployment,
3003
3092
  rollback: rollbackDeployment
3004
3093
  },
3094
+ /**
3095
+ * Environment promotions: a reviewed request that makes live match test, for every definition
3096
+ * and the hosted app's active staged build. Prepare one with a client for the test environment;
3097
+ * a person approves or rejects it in Console, against live.
3098
+ */
3099
+ promotions: {
3100
+ /**
3101
+ * Prepares a promotion of test as it is now and answers it `pending`, with what it changes in
3102
+ * live and the environment bindings live lacks. Refuses with `promotion-empty` when live
3103
+ * already matches. The action ID, generated when absent, makes a retry answer with the first
3104
+ * result. Requires `publish` in test.
3105
+ */
3106
+ prepare: (input = {}, call) => post(
3107
+ "/promotions",
3108
+ promotionRecordSchema,
3109
+ promotionActionSchema.parse(withActionId(input)),
3110
+ call
3111
+ ),
3112
+ /** The project's promotions, newest first, one page at a time. Pass `nextCursor` back as `cursor`. */
3113
+ history: (query = {}, call) => get(
3114
+ `/promotions/history${queryString(promotionHistoryQuerySchema.parse(query))}`,
3115
+ promotionHistoryPageSchema,
3116
+ call
3117
+ ),
3118
+ get: (promotion, call) => get(
3119
+ `/promotions/${identifier.parse(promotion)}`,
3120
+ promotionRecordSchema,
3121
+ call
3122
+ ),
3123
+ /**
3124
+ * Applies a pending promotion to live in one transaction. Live only, from a Console session
3125
+ * with `publish`; refuses with `promotion-changed` when test or live changed since it was
3126
+ * prepared.
3127
+ */
3128
+ approve: (promotion, call) => post(
3129
+ `/promotions/${identifier.parse(promotion)}/approve`,
3130
+ promotionRecordSchema,
3131
+ {},
3132
+ call
3133
+ ),
3134
+ /** Declines a pending promotion. Live only, from a Console session with `publish`. */
3135
+ reject: (promotion, input, call) => post(
3136
+ `/promotions/${identifier.parse(promotion)}/reject`,
3137
+ promotionRecordSchema,
3138
+ promotionRejectionSchema.parse(input),
3139
+ call
3140
+ ),
3141
+ /**
3142
+ * Prepares a promotion of the definitions and build an applied promotion made live, for a
3143
+ * person to approve like any other. Requires `publish` in live.
3144
+ */
3145
+ rollback: (promotion, input = {}, call) => post(
3146
+ `/promotions/${identifier.parse(promotion)}/rollback`,
3147
+ promotionRecordSchema,
3148
+ promotionActionSchema.parse(withActionId(input)),
3149
+ call
3150
+ )
3151
+ },
3005
3152
  catalog: {
3006
3153
  allocateQuest: (input = {}, call) => create(
3007
3154
  "/catalog/quests",
@@ -3250,7 +3397,7 @@ function managementClient(options) {
3250
3397
  },
3251
3398
  operations: {
3252
3399
  /** Every paused or resumed operation: redemptions and each quest's participation; requires `read`. */
3253
- list: (call) => get("/operations", z15.array(operationSchema), call),
3400
+ list: (call) => get("/operations", z16.array(operationSchema), call),
3254
3401
  /**
3255
3402
  * Pauses or resumes redemptions or one quest's participation, against the `revision` the
3256
3403
  * operator saw, with a reason; requires `publish` permission.
@@ -3308,7 +3455,7 @@ function managementClient(options) {
3308
3455
  call
3309
3456
  ),
3310
3457
  /** Every stock item with its counts and the offers that sell it; requires `read` permission. */
3311
- list: (call) => get("/stock-items", z15.array(managedStockItemSchema), call),
3458
+ list: (call) => get("/stock-items", z16.array(managedStockItemSchema), call),
3312
3459
  createItem: (input, call) => create(
3313
3460
  "/stock-items",
3314
3461
  stockItemSchema,
@@ -3323,7 +3470,7 @@ function managementClient(options) {
3323
3470
  stockInputSchema.parse(withActionId(input)),
3324
3471
  call
3325
3472
  ),
3326
- catalog: (call) => get("/pickup-inventory", z15.array(pickupCatalogSchema), call),
3473
+ catalog: (call) => get("/pickup-inventory", z16.array(pickupCatalogSchema), call),
3327
3474
  configure: (input, call) => post(
3328
3475
  "/pickup-inventory",
3329
3476
  pickupCatalogSchema,
@@ -3349,7 +3496,7 @@ function managementClient(options) {
3349
3496
  offerControlSchema.omit({ enabled: true }).parse(withActionId(input)),
3350
3497
  call
3351
3498
  ),
3352
- list: (call) => get("/offers", z15.array(offerSchema), call),
3499
+ list: (call) => get("/offers", z16.array(offerSchema), call),
3353
3500
  /**
3354
3501
  * Every redemption, or one member's, newest first, in one unbounded response.
3355
3502
  *
@@ -3357,7 +3504,7 @@ function managementClient(options) {
3357
3504
  */
3358
3505
  redemptions: (input = {}, call) => get(
3359
3506
  `/redemptions${queryString({ member: input.member })}`,
3360
- z15.array(redemptionSchema),
3507
+ z16.array(redemptionSchema),
3361
3508
  call
3362
3509
  ),
3363
3510
  /** Pauses or resumes an offer at the revision the operator saw. */
@@ -3406,7 +3553,7 @@ function managementClient(options) {
3406
3553
  * them; API keys and project-scoped playground sessions cannot.
3407
3554
  */
3408
3555
  tokens: {
3409
- list: (call) => get("/tokens", z15.array(tokenSchema), call),
3556
+ list: (call) => get("/tokens", z16.array(tokenSchema), call),
3410
3557
  /**
3411
3558
  * Issues a key for one project and environment, limited to permissions the caller holds
3412
3559
  * there. The secret `token` is in this response only.
@@ -3414,14 +3561,14 @@ function managementClient(options) {
3414
3561
  create: (input, call) => post("/tokens", issuedTokenSchema, tokenInputSchema.parse(input), call),
3415
3562
  /** Replace a personal key's ingestion restriction without changing its secret. */
3416
3563
  scope: (id, input, call) => request(
3417
- `/tokens/${encodeURIComponent(z15.string().min(1).parse(id))}/scope`,
3564
+ `/tokens/${encodeURIComponent(z16.string().min(1).parse(id))}/scope`,
3418
3565
  tokenSchema,
3419
3566
  tokenScopeInputSchema.parse(input),
3420
3567
  "PUT",
3421
3568
  call
3422
3569
  ),
3423
3570
  revoke: (id, call) => request(
3424
- `/tokens/${encodeURIComponent(z15.string().min(1).parse(id))}`,
3571
+ `/tokens/${encodeURIComponent(z16.string().min(1).parse(id))}`,
3425
3572
  ok,
3426
3573
  void 0,
3427
3574
  "DELETE",
@@ -3433,7 +3580,7 @@ function managementClient(options) {
3433
3580
  * environment, owned by no person. Only an organization administrator in Console manages them.
3434
3581
  */
3435
3582
  serviceKeys: {
3436
- list: (call) => get("/service-keys", z15.array(serviceKeySchema), call),
3583
+ list: (call) => get("/service-keys", z16.array(serviceKeySchema), call),
3437
3584
  /** The secret `token` is in this response only. */
3438
3585
  create: (input, call) => post(
3439
3586
  "/service-keys",
@@ -3446,14 +3593,14 @@ function managementClient(options) {
3446
3593
  * them with `revokeSecret`. The new `token` is in this response only.
3447
3594
  */
3448
3595
  addSecret: (id, input = {}, call) => post(
3449
- `/service-keys/${z15.string().uuid().parse(id)}/secrets`,
3596
+ `/service-keys/${z16.string().uuid().parse(id)}/secrets`,
3450
3597
  issuedServiceKeySchema,
3451
3598
  credentialSecretInputSchema.parse(input),
3452
3599
  call
3453
3600
  ),
3454
3601
  /** Stops one secret working. A key's last secret cannot be revoked; revoke the key instead. */
3455
3602
  revokeSecret: (id, secret, call) => request(
3456
- `/service-keys/${z15.string().uuid().parse(id)}/secrets/${z15.string().uuid().parse(secret)}`,
3603
+ `/service-keys/${z16.string().uuid().parse(id)}/secrets/${z16.string().uuid().parse(secret)}`,
3457
3604
  serviceKeySchema,
3458
3605
  void 0,
3459
3606
  "DELETE",
@@ -3461,8 +3608,8 @@ function managementClient(options) {
3461
3608
  ),
3462
3609
  /** Deletes the key; every secret stops working. */
3463
3610
  revoke: (id, call) => request(
3464
- `/service-keys/${z15.string().uuid().parse(id)}`,
3465
- z15.null(),
3611
+ `/service-keys/${z16.string().uuid().parse(id)}`,
3612
+ z16.null(),
3466
3613
  void 0,
3467
3614
  "DELETE",
3468
3615
  call
@@ -3470,7 +3617,7 @@ function managementClient(options) {
3470
3617
  },
3471
3618
  /** Who holds which roles on the client's project; organization administrators only. */
3472
3619
  grants: {
3473
- list: (call) => get("/grants", z15.array(grantRecordSchema), call),
3620
+ list: (call) => get("/grants", z16.array(grantRecordSchema), call),
3474
3621
  /** Replaces one person's roles and environments on the project. The audit log records it. */
3475
3622
  set: (input, call) => request(
3476
3623
  "/grants",
@@ -3487,7 +3634,7 @@ function managementClient(options) {
3487
3634
  /** Signed activity notifications for one project/environment; writes require publish permission. */
3488
3635
  webhooks: {
3489
3636
  state: (id, call) => get(
3490
- `/webhooks/${z15.string().uuid().parse(id)}/state`,
3637
+ `/webhooks/${z16.string().uuid().parse(id)}/state`,
3491
3638
  webhookEndpointStateSchema,
3492
3639
  call
3493
3640
  ),
@@ -3498,24 +3645,24 @@ function managementClient(options) {
3498
3645
  call
3499
3646
  ),
3500
3647
  delete: (id, input, call) => post(
3501
- `/webhooks/${z15.string().uuid().parse(id)}/delete`,
3648
+ `/webhooks/${z16.string().uuid().parse(id)}/delete`,
3502
3649
  webhookEndpointStateSchema,
3503
3650
  webhookDeleteInputSchema.parse(withActionId(input)),
3504
3651
  call
3505
3652
  ),
3506
3653
  pause: (id, input = {}, call) => post(
3507
- `/webhooks/${z15.string().uuid().parse(id)}/pause`,
3654
+ `/webhooks/${z16.string().uuid().parse(id)}/pause`,
3508
3655
  webhookEndpointSchema,
3509
3656
  webhookControlInputSchema.parse(withActionId(input)),
3510
3657
  call
3511
3658
  ),
3512
3659
  resume: (id, input = {}, call) => post(
3513
- `/webhooks/${z15.string().uuid().parse(id)}/resume`,
3660
+ `/webhooks/${z16.string().uuid().parse(id)}/resume`,
3514
3661
  webhookEndpointSchema,
3515
3662
  webhookControlInputSchema.parse(withActionId(input)),
3516
3663
  call
3517
3664
  ),
3518
- list: (call) => get("/webhooks", z15.array(webhookEndpointSchema), call),
3665
+ list: (call) => get("/webhooks", z16.array(webhookEndpointSchema), call),
3519
3666
  /** Pass an `actionId` to recover the endpoint and its secret after a lost answer. */
3520
3667
  create: (input, call) => post(
3521
3668
  "/webhooks",
@@ -3524,7 +3671,7 @@ function managementClient(options) {
3524
3671
  call
3525
3672
  ),
3526
3673
  update: (id, input, call) => request(
3527
- `/webhooks/${z15.string().uuid().parse(id)}`,
3674
+ `/webhooks/${z16.string().uuid().parse(id)}`,
3528
3675
  webhookEndpointSchema,
3529
3676
  webhookUpdateSchema.parse(input),
3530
3677
  "PUT",
@@ -3532,19 +3679,19 @@ function managementClient(options) {
3532
3679
  ),
3533
3680
  /** @deprecated Use pause. Removed in 2.0.0. */
3534
3681
  disable: (id, call) => post(
3535
- `/webhooks/${z15.string().uuid().parse(id)}/disable`,
3682
+ `/webhooks/${z16.string().uuid().parse(id)}/disable`,
3536
3683
  webhookEndpointSchema,
3537
3684
  {},
3538
3685
  call
3539
3686
  ),
3540
3687
  rotateSecret: rotateWebhookSecret,
3541
3688
  deliveries: (id, query = {}, call) => get(
3542
- `/webhooks/${z15.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
3689
+ `/webhooks/${z16.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
3543
3690
  webhookDeliveryPageSchema,
3544
3691
  call
3545
3692
  ),
3546
3693
  replay: (id, delivery, call) => post(
3547
- `/webhooks/${z15.string().uuid().parse(id)}/deliveries/${z15.string().uuid().parse(delivery)}/replay`,
3694
+ `/webhooks/${z16.string().uuid().parse(id)}/deliveries/${z16.string().uuid().parse(delivery)}/replay`,
3548
3695
  webhookDeliverySchema,
3549
3696
  {},
3550
3697
  call
@@ -3555,7 +3702,7 @@ function managementClient(options) {
3555
3702
  * environment. Organization administrators, from a Console session only.
3556
3703
  */
3557
3704
  identityIntegrations: {
3558
- list: (call) => get("/identity-integrations", z15.array(identityIntegrationSchema), call),
3705
+ list: (call) => get("/identity-integrations", z16.array(identityIntegrationSchema), call),
3559
3706
  /** The secret `token` is in this response only. */
3560
3707
  create: (input, call) => post(
3561
3708
  "/identity-integrations",
@@ -3570,7 +3717,7 @@ function managementClient(options) {
3570
3717
  * @deprecated Use `addSecret`, then `revokeSecret` the old secret once your app uses the new one.
3571
3718
  */
3572
3719
  rotate: (id, call) => post(
3573
- `/identity-integrations/${z15.string().uuid().parse(id)}/rotate`,
3720
+ `/identity-integrations/${z16.string().uuid().parse(id)}/rotate`,
3574
3721
  identityIntegrationSecretSchema,
3575
3722
  {},
3576
3723
  call
@@ -3580,7 +3727,7 @@ function managementClient(options) {
3580
3727
  * revoke them with `revokeSecret`. The new `token` is in this response only.
3581
3728
  */
3582
3729
  addSecret: (id, input = {}, call) => post(
3583
- `/identity-integrations/${z15.string().uuid().parse(id)}/secrets`,
3730
+ `/identity-integrations/${z16.string().uuid().parse(id)}/secrets`,
3584
3731
  identityIntegrationSecretSchema,
3585
3732
  credentialSecretInputSchema.parse(input),
3586
3733
  call
@@ -3590,7 +3737,7 @@ function managementClient(options) {
3590
3737
  * revoked; disconnect the integration with `revoke` instead.
3591
3738
  */
3592
3739
  revokeSecret: (id, secret, call) => request(
3593
- `/identity-integrations/${z15.string().uuid().parse(id)}/secrets/${z15.string().uuid().parse(secret)}`,
3740
+ `/identity-integrations/${z16.string().uuid().parse(id)}/secrets/${z16.string().uuid().parse(secret)}`,
3594
3741
  identityIntegrationSchema,
3595
3742
  void 0,
3596
3743
  "DELETE",
@@ -3598,7 +3745,7 @@ function managementClient(options) {
3598
3745
  ),
3599
3746
  /** Makes one secret never expire. */
3600
3747
  removeSecretExpiry: (id, secret, call) => request(
3601
- `/identity-integrations/${z15.string().uuid().parse(id)}/secrets/${z15.string().uuid().parse(secret)}/expiry`,
3748
+ `/identity-integrations/${z16.string().uuid().parse(id)}/secrets/${z16.string().uuid().parse(secret)}/expiry`,
3602
3749
  identityIntegrationSchema,
3603
3750
  void 0,
3604
3751
  "DELETE",
@@ -3611,7 +3758,7 @@ function managementClient(options) {
3611
3758
  */
3612
3759
  kinds: (call) => get(
3613
3760
  "/identity-integrations/kinds",
3614
- z15.array(identityKindClaimSchema),
3761
+ z16.array(identityKindClaimSchema),
3615
3762
  call
3616
3763
  ),
3617
3764
  /**
@@ -3619,8 +3766,8 @@ function managementClient(options) {
3619
3766
  * and keep attributing tracker records; unlink them on the member to stop that.
3620
3767
  */
3621
3768
  revoke: (id, call) => request(
3622
- `/identity-integrations/${z15.string().uuid().parse(id)}`,
3623
- z15.null(),
3769
+ `/identity-integrations/${z16.string().uuid().parse(id)}`,
3770
+ z16.null(),
3624
3771
  void 0,
3625
3772
  "DELETE",
3626
3773
  call
@@ -3671,7 +3818,7 @@ function managementClient(options) {
3671
3818
  resources: {
3672
3819
  list: (call) => get(
3673
3820
  "/resources",
3674
- z15.object({ resources: z15.array(managedResourceSchema) }),
3821
+ z16.object({ resources: z16.array(managedResourceSchema) }),
3675
3822
  call
3676
3823
  ),
3677
3824
  /** @deprecated Use the resource archive/unarchive methods. Removed in 2.0.0. */
@@ -3741,7 +3888,7 @@ function managementClient(options) {
3741
3888
  testMemberCreateSchema.parse(withActionId(input)),
3742
3889
  call
3743
3890
  ),
3744
- list: (call) => get("/test-members", z15.array(testMemberSchema), call),
3891
+ list: (call) => get("/test-members", z16.array(testMemberSchema), call),
3745
3892
  history: (member, query = {}, call) => get(
3746
3893
  `/test-members/${identifier.parse(member)}/history${queryString(testMemberHistoryQuerySchema.parse(query))}`,
3747
3894
  testMemberHistorySchema,
@@ -3959,7 +4106,7 @@ function managementClient(options) {
3959
4106
  /** Who each member is: up to 100 distinct IDs; unknown IDs come back without accounts. */
3960
4107
  people: (members, call) => get(
3961
4108
  `/people${queryString({ ids: members.join(",") })}`,
3962
- z15.array(personSchema),
4109
+ z16.array(personSchema),
3963
4110
  call
3964
4111
  ),
3965
4112
  /**
@@ -3969,7 +4116,7 @@ function managementClient(options) {
3969
4116
  */
3970
4117
  oauthAccounts: (member, call) => get(
3971
4118
  `/members/${encodeURIComponent(member)}/oauth-accounts`,
3972
- z15.array(managedOAuthAccountSchema),
4119
+ z16.array(managedOAuthAccountSchema),
3973
4120
  call
3974
4121
  ),
3975
4122
  /**
@@ -3979,7 +4126,7 @@ function managementClient(options) {
3979
4126
  */
3980
4127
  unlinkOAuthAccount: (member, input, call) => post(
3981
4128
  `/members/${encodeURIComponent(member)}/oauth-accounts/unlink`,
3982
- z15.array(managedOAuthAccountSchema),
4129
+ z16.array(managedOAuthAccountSchema),
3983
4130
  memberOAuthUnlinkInputSchema.parse(input),
3984
4131
  call
3985
4132
  ),
@@ -4012,7 +4159,7 @@ function managementClient(options) {
4012
4159
  */
4013
4160
  unlinkWallet: (member, input, call) => post(
4014
4161
  `/members/${encodeURIComponent(member)}/wallets/unlink`,
4015
- z15.array(managedWalletSchema),
4162
+ z16.array(managedWalletSchema),
4016
4163
  memberWalletUnlinkInputSchema.parse(input),
4017
4164
  call
4018
4165
  ),
@@ -4025,7 +4172,7 @@ function managementClient(options) {
4025
4172
  */
4026
4173
  unlinkIdentity: (member, input, call) => post(
4027
4174
  `/members/${encodeURIComponent(member)}/identities/unlink`,
4028
- z15.array(managedMemberIdentitySchema),
4175
+ z16.array(managedMemberIdentitySchema),
4029
4176
  memberIdentityChangeInputSchema.parse(input),
4030
4177
  call
4031
4178
  ),
@@ -4036,7 +4183,7 @@ function managementClient(options) {
4036
4183
  */
4037
4184
  relinkIdentity: (member, input, call) => post(
4038
4185
  `/members/${encodeURIComponent(member)}/identities/relink`,
4039
- z15.array(managedMemberIdentitySchema),
4186
+ z16.array(managedMemberIdentitySchema),
4040
4187
  memberIdentityChangeInputSchema.parse(input),
4041
4188
  call
4042
4189
  ),
@@ -4048,7 +4195,7 @@ function managementClient(options) {
4048
4195
  */
4049
4196
  setWalletSignIn: (member, input, call) => post(
4050
4197
  `/members/${encodeURIComponent(member)}/wallets/sign-in`,
4051
- z15.array(managedWalletSchema),
4198
+ z16.array(managedWalletSchema),
4052
4199
  memberWalletSignInInputSchema.parse(input),
4053
4200
  call
4054
4201
  )
@@ -4131,7 +4278,7 @@ function managementClient(options) {
4131
4278
  `/storage/sql/${appSecretNameSchema.parse(name)}/cell?${new URLSearchParams(
4132
4279
  {
4133
4280
  table,
4134
- row: String(z15.number().int().min(0).parse(options2.row)),
4281
+ row: String(z16.number().int().min(0).parse(options2.row)),
4135
4282
  column: options2.column,
4136
4283
  ...options2.cursor === void 0 ? {} : { cursor: pageCursorSchema.parse(options2.cursor) }
4137
4284
  }
@@ -4243,7 +4390,7 @@ function managementClient(options) {
4243
4390
  * Each quest's current release, the most recently published first, archived quests
4244
4391
  * included; requires `read` permission.
4245
4392
  */
4246
- list: (call) => get("/quests/list", z15.array(publishedReleaseSchema), call),
4393
+ list: (call) => get("/quests/list", z16.array(publishedReleaseSchema), call),
4247
4394
  /** Pending and exhausted asynchronous balance checks. Requires read. */
4248
4395
  automaticScheduling: (query = {}, call) => get(
4249
4396
  `/quests/automatic-scheduling${queryString(automaticSchedulingQuerySchema.parse(query))}`,
@@ -4288,7 +4435,7 @@ function managementClient(options) {
4288
4435
  */
4289
4436
  submissions: (member, call) => get(
4290
4437
  `/members/${encodeURIComponent(member)}/quest-submissions`,
4291
- z15.object({ items: z15.array(questSubmissionSchema) }),
4438
+ z16.object({ items: z16.array(questSubmissionSchema) }),
4292
4439
  call
4293
4440
  ),
4294
4441
  /**
@@ -5219,6 +5366,16 @@ export {
5219
5366
  projectTransferInputSchema,
5220
5367
  projectTransferSchema,
5221
5368
  projectUpdateInputSchema,
5369
+ promotionActionSchema,
5370
+ promotionBuildSchema,
5371
+ promotionChangeSchema,
5372
+ promotionHistoryPageSchema,
5373
+ promotionHistoryQuerySchema,
5374
+ promotionRecordSchema,
5375
+ promotionRejectionSchema,
5376
+ promotionResourceKindSchema,
5377
+ promotionSourceSchema,
5378
+ promotionWarningSchema,
5222
5379
  querySchema,
5223
5380
  questConfiguration,
5224
5381
  questEnrollmentStateSchema,