@domino-sdk/relay 1.14.0 → 1.16.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 (34) hide show
  1. package/dist/{request-error-D_dUPLwo.d.ts → action-DBzILFx9.d.ts} +31 -1
  2. package/dist/{attempt-captures-DZldPZJc.d.ts → attempt-captures-DHwIVoRP.d.ts} +1 -1
  3. package/dist/authoring.d.ts +8 -8
  4. package/dist/{automatic-outcomes-6lJGnSDe.d.ts → automatic-outcomes-BcEn_L46.d.ts} +1 -1
  5. package/dist/browser.d.ts +7 -8
  6. package/dist/browser.js +3 -3
  7. package/dist/{chunk-6DD7DVNQ.js → chunk-3YCCHTCU.js} +1 -1
  8. package/dist/{chunk-5TS3OAWS.js → chunk-NM3IYYPG.js} +27 -12
  9. package/dist/{chunk-VBHFJH3P.js → chunk-Y6SRF54G.js} +1 -1
  10. package/dist/{chunk-C3CB4WIQ.js → chunk-YT3QKV2L.js} +1 -1
  11. package/dist/{client-BTd_CyX3.d.ts → client-DFSCmf3H.d.ts} +5 -6
  12. package/dist/{activity-D_R3J-gU.d.ts → deployments-DIbKJO_Y.d.ts} +15 -15
  13. package/dist/{groups-4Jb3uYFO.d.ts → groups-Bi7lc54m.d.ts} +1 -1
  14. package/dist/{images-D5kpqHxv.d.ts → images-Cb8QHGjn.d.ts} +1 -1
  15. package/dist/index.d.ts +8 -9
  16. package/dist/index.js +2 -2
  17. package/dist/internal.d.ts +13 -33
  18. package/dist/internal.js +2 -2
  19. package/dist/{offers-BFI5t-e-.d.ts → offers-Catj06u7.d.ts} +2 -2
  20. package/dist/{pages-nIoMT9J3.d.ts → pages-CpYt56Km.d.ts} +1 -1
  21. package/dist/portal-proxy.js +1 -1
  22. package/dist/react/index.d.ts +9 -10
  23. package/dist/react/index.js +3 -3
  24. package/dist/{schema-K-Pg5lPz.d.ts → schema-BaVl2VBS.d.ts} +1 -1
  25. package/dist/schema.d.ts +11 -11
  26. package/dist/server/index.d.ts +12 -73085
  27. package/dist/server/index.js +719 -519
  28. package/dist/{sign-in-options-DBjMzgnu.d.ts → sign-in-options-CU1ND6-y.d.ts} +1 -1
  29. package/dist/{submission-input-CPIsJt-_.d.ts → submission-input-Bi4HipqI.d.ts} +2 -2
  30. package/dist/testing.d.ts +3 -3
  31. package/dist/transport-BdrcbKi_.d.ts +73612 -0
  32. package/package.json +2 -1
  33. package/dist/action-9Xl0StBg.d.ts +0 -33
  34. package/dist/referral-reward-kinds-DnvQXL8L.d.ts +0 -268
@@ -44,7 +44,7 @@ import {
44
44
  participantExchangeSchema,
45
45
  questConfiguration,
46
46
  sequenceCursorSchema
47
- } from "../chunk-5TS3OAWS.js";
47
+ } from "../chunk-NM3IYYPG.js";
48
48
  import {
49
49
  parseImageExtraction,
50
50
  parseImageResult
@@ -139,7 +139,7 @@ import {
139
139
  } from "../chunk-2UAVZCMH.js";
140
140
  import "../chunk-6QJ3LADK.js";
141
141
  import "../chunk-NPGENI7K.js";
142
- import "../chunk-C3CB4WIQ.js";
142
+ import "../chunk-YT3QKV2L.js";
143
143
  import "../chunk-PT5STHFH.js";
144
144
  import {
145
145
  CompletionSourceKind,
@@ -557,13 +557,177 @@ var resourceArchiveInputSchema = resourceLifecycleInputSchema.omit({
557
557
  });
558
558
 
559
559
  // src/server/index.ts
560
- import { z as z12 } from "zod";
560
+ import { z as z13 } from "zod";
561
561
 
562
562
  // src/server/hosting.ts
563
- import { z as z9 } from "zod";
563
+ import { z as z10 } from "zod";
564
564
 
565
- // src/server/starters.ts
565
+ // src/server/schedules.ts
566
566
  import { z as z8 } from "zod";
567
+ import { Cron } from "croner";
568
+ var APP_SCHEDULE_LIMIT = 10;
569
+ var APP_SCHEDULE_MIN_INTERVAL = 3e5;
570
+ var APP_SCHEDULE_TIMEOUT = 3e4;
571
+ var appScheduleNameSchema = z8.string().regex(/^[a-z][a-z0-9-]{0,63}$/);
572
+ var appSchedulePathSchema = z8.string().min(2).max(512).refine((path) => {
573
+ if (!/^\/[a-zA-Z0-9_/-]+$/.test(path) || path.startsWith("//")) {
574
+ return false;
575
+ }
576
+ return path.split("/").slice(1).every((part) => part.length > 0) && new URL(path, "https://app.invalid").pathname === path;
577
+ }, "Expected an absolute route path without a query or hidden segments");
578
+ function interval(value) {
579
+ const amount = Number(value.slice(0, -1));
580
+ const unit = value.slice(-1);
581
+ return amount * (unit === "m" ? 6e4 : unit === "h" ? 36e5 : 864e5);
582
+ }
583
+ var everySchema = z8.string().regex(/^[1-9]\d{0,3}[mhd]$/).refine(
584
+ (value) => interval(value) >= APP_SCHEDULE_MIN_INTERVAL && interval(value) <= 365 * 864e5,
585
+ "Use an interval from 5 minutes to 365 days, such as 5m, 1h or 1d"
586
+ );
587
+ var cronSchema = z8.string().max(120).refine((value) => {
588
+ const fields = value.trim().split(/\s+/);
589
+ if (fields.length !== 5 || fields.some((field) => !/^[\d*,/-]+$/.test(field))) {
590
+ return false;
591
+ }
592
+ try {
593
+ const job = new Cron(value, { paused: true, timezone: "UTC" });
594
+ if (!job.nextRun()) {
595
+ return false;
596
+ }
597
+ const minutes = new Cron(`${fields[0]} * * * *`, {
598
+ paused: true,
599
+ timezone: "UTC"
600
+ });
601
+ const times = minutes.nextRuns(13, /* @__PURE__ */ new Date("2024-01-01T00:00:00Z"));
602
+ return times.every(
603
+ (time, i) => i === 0 || time.getTime() - times[i - 1].getTime() >= APP_SCHEDULE_MIN_INTERVAL
604
+ );
605
+ } catch {
606
+ return false;
607
+ }
608
+ }, "Expected a five-field UTC cron expression with minute slots at least five minutes apart");
609
+ var declaration = {
610
+ name: appScheduleNameSchema,
611
+ path: appSchedulePathSchema,
612
+ description: z8.string().min(1).max(500)
613
+ };
614
+ var everySchedule = z8.object({ ...declaration, every: everySchema });
615
+ var cronSchedule = z8.object({ ...declaration, cron: cronSchema });
616
+ var appScheduleSchema = z8.union([
617
+ everySchedule.strict(),
618
+ cronSchedule.strict()
619
+ ]);
620
+ var appSchedulesSchema = z8.array(appScheduleSchema).max(APP_SCHEDULE_LIMIT).refine(
621
+ (items) => new Set(items.map((item) => item.name)).size === items.length,
622
+ "Schedule names must be unique"
623
+ );
624
+ function nextScheduleRun(schedule, after) {
625
+ if ("every" in schedule) {
626
+ return after + interval(schedule.every);
627
+ }
628
+ const next = new Cron(schedule.cron, {
629
+ paused: true,
630
+ timezone: "UTC"
631
+ }).nextRun(new Date(after));
632
+ if (!next) {
633
+ throw new Error("Schedule has no next occurrence");
634
+ }
635
+ return next.getTime();
636
+ }
637
+ var appScheduleStateSchema = z8.enum(["active", "paused", "archived"]);
638
+ var appScheduleRunSchema = z8.object({
639
+ id: z8.string().uuid(),
640
+ build: z8.string().uuid(),
641
+ startedAt: z8.number(),
642
+ scheduledAt: z8.number(),
643
+ manual: z8.boolean(),
644
+ status: z8.enum(["queued", "running", "succeeded", "failed", "uncertain"]),
645
+ duration: z8.number().nullable(),
646
+ error: z8.string().nullable()
647
+ });
648
+ var appScheduleListSchema = z8.object({
649
+ state: appScheduleStateSchema,
650
+ schedules: z8.array(
651
+ z8.object({
652
+ declaration: z8.union([everySchedule, cronSchedule]),
653
+ nextRun: z8.number().nullable(),
654
+ blocked: z8.boolean(),
655
+ lastRun: appScheduleRunSchema.nullable()
656
+ })
657
+ )
658
+ });
659
+ var scheduledInvocationSchema = z8.object({
660
+ id: z8.string().uuid(),
661
+ build: z8.string().uuid(),
662
+ name: appScheduleNameSchema,
663
+ scheduledAt: z8.number().int(),
664
+ startedAt: z8.number().int(),
665
+ manual: z8.boolean()
666
+ }).strict();
667
+ async function verifyScheduledRequest(request, key) {
668
+ const signature = request.headers.get("X-Domino-Schedule-Signature");
669
+ const url = new URL(request.url);
670
+ if (request.method !== "POST" || url.search !== "" || url.hash !== "" || !key || !signature || !/^[a-f0-9]{64}$/.test(signature)) {
671
+ return null;
672
+ }
673
+ const reader = request.clone().body?.getReader();
674
+ if (!reader) {
675
+ return null;
676
+ }
677
+ let body = "";
678
+ let size = 0;
679
+ const decoder = new TextDecoder();
680
+ try {
681
+ for (; ; ) {
682
+ const chunk = await reader.read();
683
+ if (chunk.done) {
684
+ break;
685
+ }
686
+ size += chunk.value.byteLength;
687
+ if (size > 4096) {
688
+ void reader.cancel().catch(() => {
689
+ });
690
+ return null;
691
+ }
692
+ body += decoder.decode(chunk.value, { stream: true });
693
+ }
694
+ body += decoder.decode();
695
+ } catch {
696
+ return null;
697
+ }
698
+ const secret = await crypto.subtle.importKey(
699
+ "raw",
700
+ new TextEncoder().encode(key),
701
+ { name: "HMAC", hash: "SHA-256" },
702
+ false,
703
+ ["verify"]
704
+ );
705
+ const bytes = Uint8Array.from(
706
+ signature.match(/../g) ?? [],
707
+ (byte) => Number.parseInt(byte, 16)
708
+ );
709
+ const valid = await crypto.subtle.verify(
710
+ "HMAC",
711
+ secret,
712
+ bytes,
713
+ new TextEncoder().encode(`POST
714
+ ${url.pathname}
715
+ ${body}`)
716
+ );
717
+ if (!valid) {
718
+ return null;
719
+ }
720
+ const parsed = scheduledInvocationSchema.safeParse(
721
+ await new Response(body).json().catch(() => null)
722
+ );
723
+ if (!parsed.success || Math.abs(Date.now() - parsed.data.startedAt) > 6e4) {
724
+ return null;
725
+ }
726
+ return parsed.data;
727
+ }
728
+
729
+ // src/server/starters.ts
730
+ import { z as z9 } from "zod";
567
731
  var starterTemplates = [
568
732
  {
569
733
  id: "campaign",
@@ -596,63 +760,63 @@ var starterTemplates = [
596
760
  summary: "A headless Worker with typed routes and interactive API docs, for plugging Domino into your own product."
597
761
  }
598
762
  ];
599
- var starterIdSchema = z8.enum(
763
+ var starterIdSchema = z9.enum(
600
764
  starterTemplates.map((template) => template.id)
601
765
  );
602
766
 
603
767
  // src/server/hosting.ts
604
- var outputPathSchema = z9.string().min(1).max(512).refine(
768
+ var outputPathSchema = z10.string().min(1).max(512).refine(
605
769
  (path) => path.split("/").every(
606
770
  (part) => /^[\w-][\w.-]*$/.test(part) && part !== "node_modules"
607
771
  ),
608
772
  "Expected a relative build output path without hidden segments"
609
773
  );
610
- var appRoutingSchema = z9.enum(["legacy", "transparent"]).default("legacy");
774
+ var appRoutingSchema = z10.enum(["legacy", "transparent"]).default("legacy");
611
775
  var APP_SECRET_LIMIT = 50;
612
776
  var APP_KV_LIMIT = 5;
613
777
  var APP_SQL_LIMIT = 5;
614
778
  var APP_MIGRATION_LIMIT = 100;
615
779
  var APP_MIGRATION_FILE_BYTES = 9e4;
616
780
  var APP_MIGRATION_TOTAL_BYTES = 1e6;
617
- var appSecretNameSchema = z9.string().regex(
781
+ var appSecretNameSchema = z10.string().regex(
618
782
  /^[A-Z_][A-Z0-9_]{0,63}$/,
619
783
  "Use 1-64 uppercase letters, digits, and underscores, not starting with a digit"
620
784
  ).refine(
621
785
  (name) => !name.startsWith("DOMINO_") && name !== "ASSETS",
622
786
  "DOMINO_ names and ASSETS are reserved for Domino's own bindings"
623
787
  );
624
- var appSecretValueSchema = z9.string().min(1).refine(
788
+ var appSecretValueSchema = z10.string().min(1).refine(
625
789
  (value) => new TextEncoder().encode(value).length <= 5120,
626
790
  "Secret values can be at most 5 KiB"
627
791
  );
628
- var appSecretInputSchema = z9.object({ value: appSecretValueSchema }).strict();
629
- var appSecretSchema = z9.object({
792
+ var appSecretInputSchema = z10.object({ value: appSecretValueSchema }).strict();
793
+ var appSecretSchema = z10.object({
630
794
  name: appSecretNameSchema,
631
- updatedAt: z9.number(),
632
- updatedBy: z9.string()
795
+ updatedAt: z10.number(),
796
+ updatedBy: z10.string()
633
797
  });
634
- var appSecretDeclarationSchema = z9.object({
635
- description: z9.string().trim().min(1).max(500),
636
- required: z9.boolean().default(true)
798
+ var appSecretDeclarationSchema = z10.object({
799
+ description: z10.string().trim().min(1).max(500),
800
+ required: z10.boolean().default(true)
637
801
  }).strict();
638
- var appSecretDeclarationsSchema = z9.record(appSecretNameSchema, appSecretDeclarationSchema).refine(
802
+ var appSecretDeclarationsSchema = z10.record(appSecretNameSchema, appSecretDeclarationSchema).refine(
639
803
  (secrets) => Object.keys(secrets).length <= APP_SECRET_LIMIT,
640
804
  `Declare at most ${APP_SECRET_LIMIT} app secrets`
641
805
  );
642
- var appSecretListSchema = z9.object({
643
- secrets: z9.array(appSecretSchema),
644
- declared: z9.array(appSecretDeclarationSchema.extend({ name: appSecretNameSchema })).default([])
806
+ var appSecretListSchema = z10.object({
807
+ secrets: z10.array(appSecretSchema),
808
+ declared: z10.array(appSecretDeclarationSchema.extend({ name: appSecretNameSchema })).default([])
645
809
  });
646
- var hostedAppSecretsSchema = z9.object({ secrets: z9.record(appSecretNameSchema, appSecretValueSchema) }).strict();
647
- var storageDescription = z9.object({
648
- description: z9.string().trim().min(1).max(500)
810
+ var hostedAppSecretsSchema = z10.object({ secrets: z10.record(appSecretNameSchema, appSecretValueSchema) }).strict();
811
+ var storageDescription = z10.object({
812
+ description: z10.string().trim().min(1).max(500)
649
813
  }).strict();
650
- var appStorageSchema = z9.object({
651
- kv: z9.record(appSecretNameSchema, storageDescription).refine(
814
+ var appStorageSchema = z10.object({
815
+ kv: z10.record(appSecretNameSchema, storageDescription).refine(
652
816
  (stores) => Object.keys(stores).length <= APP_KV_LIMIT,
653
817
  `Declare at most ${APP_KV_LIMIT} KV stores`
654
818
  ).default({}),
655
- sql: z9.record(
819
+ sql: z10.record(
656
820
  appSecretNameSchema,
657
821
  storageDescription.extend({
658
822
  migrations: outputPathSchema.optional()
@@ -662,60 +826,60 @@ var appStorageSchema = z9.object({
662
826
  `Declare at most ${APP_SQL_LIMIT} SQL stores`
663
827
  ).default({})
664
828
  }).strict();
665
- var appStorageKindSchema = z9.enum(["kv", "sql"]);
666
- var appStorageListSchema = z9.object({
667
- stores: z9.array(
668
- z9.object({
669
- kind: z9.string(),
829
+ var appStorageKindSchema = z10.enum(["kv", "sql"]);
830
+ var appStorageListSchema = z10.object({
831
+ stores: z10.array(
832
+ z10.object({
833
+ kind: z10.string(),
670
834
  name: appSecretNameSchema,
671
- createdAt: z9.number().nullable(),
672
- declared: z9.boolean(),
673
- description: z9.string().optional()
835
+ createdAt: z10.number().nullable(),
836
+ declared: z10.boolean(),
837
+ description: z10.string().optional()
674
838
  })
675
839
  )
676
840
  });
677
841
  var APP_STORAGE_ROW_LIMIT = 50;
678
842
  var APP_STORAGE_PREVIEW_CHARACTERS = 2e3;
679
- var appStorageCellSchema = z9.union([
680
- z9.string(),
681
- z9.number(),
682
- z9.null(),
683
- z9.object({ text: z9.string(), truncated: z9.literal(true) }),
684
- z9.object({ blob: z9.number().int().min(0) })
843
+ var appStorageCellSchema = z10.union([
844
+ z10.string(),
845
+ z10.number(),
846
+ z10.null(),
847
+ z10.object({ text: z10.string(), truncated: z10.literal(true) }),
848
+ z10.object({ blob: z10.number().int().min(0) })
685
849
  ]);
686
- var appStorageTablesSchema = z9.object({
687
- tables: z9.array(
850
+ var appStorageTablesSchema = z10.object({
851
+ tables: z10.array(
688
852
  /** `kind` is SQLite's: `table` or `view`. */
689
- z9.object({ name: z9.string(), kind: z9.string() })
853
+ z10.object({ name: z10.string(), kind: z10.string() })
690
854
  )
691
855
  });
692
- var appStorageRowsSchema = z9.object({
693
- table: z9.string(),
694
- columns: z9.array(z9.string()),
695
- rows: z9.array(z9.array(appStorageCellSchema)),
856
+ var appStorageRowsSchema = z10.object({
857
+ table: z10.string(),
858
+ columns: z10.array(z10.string()),
859
+ rows: z10.array(z10.array(appStorageCellSchema)),
696
860
  /** How many rows come before this page in storage order. */
697
- offset: z9.number().int().min(0),
698
- total: z9.number().int().min(0),
861
+ offset: z10.number().int().min(0),
862
+ total: z10.number().int().min(0),
699
863
  /** Pass back as `cursor` for the next page; null on the last one. */
700
864
  nextCursor: pageCursorSchema.nullable().default(null)
701
865
  });
702
- var appStorageKeysSchema = z9.object({
703
- keys: z9.array(
704
- z9.object({ name: z9.string(), expiration: z9.number().nullable() })
866
+ var appStorageKeysSchema = z10.object({
867
+ keys: z10.array(
868
+ z10.object({ name: z10.string(), expiration: z10.number().nullable() })
705
869
  ),
706
870
  /** Pass back as `cursor` for the next page; null on the last one. */
707
871
  nextCursor: pageCursorSchema.nullable().default(null),
708
872
  /** @deprecated Use `nextCursor`. Removed in 2.0.0. */
709
- cursor: z9.string().nullable()
873
+ cursor: z10.string().nullable()
710
874
  });
711
- var appStorageValueSchema = z9.object({
712
- key: z9.string(),
713
- size: z9.number().int().min(0),
875
+ var appStorageValueSchema = z10.object({
876
+ key: z10.string(),
877
+ size: z10.number().int().min(0),
714
878
  /** Null when the value is not UTF-8 text. */
715
- text: z9.string().nullable(),
716
- truncated: z9.boolean()
879
+ text: z10.string().nullable(),
880
+ truncated: z10.boolean()
717
881
  });
718
- var appMigrationNameSchema = z9.string().max(255).regex(/^[\w-][\w.-]*\.sql$/);
882
+ var appMigrationNameSchema = z10.string().max(255).regex(/^[\w-][\w.-]*\.sql$/);
719
883
  function compareAppMigrations(a, b) {
720
884
  const left = Number.parseInt(a.split("_")[0], 10);
721
885
  const right = Number.parseInt(b.split("_")[0], 10);
@@ -732,12 +896,12 @@ function compareAppMigrations(a, b) {
732
896
  }
733
897
  return a < b ? -1 : a > b ? 1 : 0;
734
898
  }
735
- var appMigrationsSchema = z9.record(
899
+ var appMigrationsSchema = z10.record(
736
900
  appSecretNameSchema,
737
- z9.array(
738
- z9.object({
901
+ z10.array(
902
+ z10.object({
739
903
  name: appMigrationNameSchema,
740
- sql: z9.string().min(1).refine(
904
+ sql: z10.string().min(1).refine(
741
905
  (sql) => new TextEncoder().encode(sql).length <= APP_MIGRATION_FILE_BYTES,
742
906
  `A migration file must not exceed ${APP_MIGRATION_FILE_BYTES} bytes`
743
907
  )
@@ -755,24 +919,25 @@ var appMigrationsSchema = z9.record(
755
919
  );
756
920
  var appScripts = {
757
921
  routing: appRoutingSchema,
758
- devScript: z9.string().regex(/^[\w:-]+$/),
759
- checkScript: z9.string().regex(/^[\w:-]+$/),
760
- buildScript: z9.string().regex(/^[\w:-]+$/)
922
+ devScript: z10.string().regex(/^[\w:-]+$/),
923
+ checkScript: z10.string().regex(/^[\w:-]+$/),
924
+ buildScript: z10.string().regex(/^[\w:-]+$/)
761
925
  };
762
926
  var workerSettings = {
763
- runWorkerFirst: z9.boolean().default(false),
927
+ runWorkerFirst: z10.boolean().default(false),
764
928
  main: outputPathSchema.refine(
765
929
  (path) => /\.m?js$/.test(path),
766
930
  "Expected a compiled JavaScript entry"
767
931
  ),
768
- compatibilityDate: z9.string().regex(/^\d{4}-\d{2}-\d{2}$/),
769
- compatibilityFlags: z9.array(z9.string().min(1)).max(50).default([]),
770
- vars: z9.record(
771
- z9.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).refine((name) => name !== "ASSETS"),
772
- z9.string()
932
+ compatibilityDate: z10.string().regex(/^\d{4}-\d{2}-\d{2}$/),
933
+ compatibilityFlags: z10.array(z10.string().min(1)).max(50).default([]),
934
+ vars: z10.record(
935
+ z10.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).refine((name) => name !== "ASSETS"),
936
+ z10.string()
773
937
  ).default({}),
774
938
  secrets: appSecretDeclarationsSchema.default({}),
775
- storage: appStorageSchema.optional()
939
+ storage: appStorageSchema.optional(),
940
+ schedules: appSchedulesSchema.optional()
776
941
  };
777
942
  var distinctBindings = (worker, ctx) => {
778
943
  const owners = /* @__PURE__ */ new Map();
@@ -797,62 +962,62 @@ var distinctBindings = (worker, ctx) => {
797
962
  }
798
963
  }
799
964
  };
800
- var hostedAppSchema = z9.discriminatedUnion("kind", [
801
- z9.object({
802
- kind: z9.literal("static"),
965
+ var hostedAppSchema = z10.discriminatedUnion("kind", [
966
+ z10.object({
967
+ kind: z10.literal("static"),
803
968
  directory: outputPathSchema,
804
969
  ...appScripts
805
970
  }).strict(),
806
- z9.object({
807
- kind: z9.literal("worker"),
971
+ z10.object({
972
+ kind: z10.literal("worker"),
808
973
  directory: outputPathSchema,
809
974
  assetsDirectory: outputPathSchema.optional(),
810
975
  ...appScripts,
811
976
  ...workerSettings
812
977
  }).strict().superRefine(distinctBindings)
813
978
  ]);
814
- var repositorySchema = z9.object({
815
- id: z9.string().uuid(),
979
+ var repositorySchema = z10.object({
980
+ id: z10.string().uuid(),
816
981
  organization: identifier,
817
982
  project: identifier,
818
- remote: z9.string().url(),
819
- defaultBranch: z9.string(),
820
- status: z9.enum(["provisioning", "ready"])
983
+ remote: z10.string().url(),
984
+ defaultBranch: z10.string(),
985
+ status: z10.enum(["provisioning", "ready"])
821
986
  });
822
- var createRepositorySchema = z9.object({
987
+ var createRepositorySchema = z10.object({
823
988
  /** Omitted: the starter chosen at project setup, else `campaign`. */
824
989
  starter: starterIdSchema.optional()
825
990
  }).strict();
826
- var deviceStartSchema = z9.object({
827
- challenge: z9.string().regex(/^[a-f0-9]{64}$/)
991
+ var deviceStartSchema = z10.object({
992
+ challenge: z10.string().regex(/^[a-f0-9]{64}$/)
828
993
  }).strict();
829
- var deviceRedeemSchema = z9.object({
830
- id: z9.string().uuid(),
831
- verifier: z9.string().min(43).max(128)
994
+ var deviceRedeemSchema = z10.object({
995
+ id: z10.string().uuid(),
996
+ verifier: z10.string().min(43).max(128)
832
997
  }).strict();
833
- var deviceApproveSchema = z9.object({
834
- id: z9.string().uuid(),
835
- code: z9.string().regex(/^[A-F0-9]{4}-[A-F0-9]{4}$/)
998
+ var deviceApproveSchema = z10.object({
999
+ id: z10.string().uuid(),
1000
+ code: z10.string().regex(/^[A-F0-9]{4}-[A-F0-9]{4}$/)
836
1001
  }).strict();
837
- var commitSchema = z9.string().regex(/^[a-f0-9]{40}$/);
838
- var stageRequestSchema = z9.object({
1002
+ var commitSchema = z10.string().regex(/^[a-f0-9]{40}$/);
1003
+ var stageRequestSchema = z10.object({
839
1004
  commit: commitSchema,
840
- requestId: z9.string().uuid()
1005
+ requestId: z10.string().uuid()
841
1006
  }).strict();
842
- var buildIdentitySchema = z9.object({
1007
+ var buildIdentitySchema = z10.object({
843
1008
  routing: appRoutingSchema,
844
- slug: z9.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional(),
845
- runtime: z9.enum(["simulation", "hosted-test"]).default("simulation"),
846
- id: z9.string().uuid(),
847
- repository: z9.string().uuid(),
1009
+ slug: z10.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional(),
1010
+ runtime: z10.enum(["simulation", "hosted-test"]).default("simulation"),
1011
+ id: z10.string().uuid(),
1012
+ repository: z10.string().uuid(),
848
1013
  organization: identifier,
849
1014
  project: identifier,
850
1015
  commit: commitSchema,
851
- createdAt: z9.number(),
852
- actor: z9.string(),
853
- commitMessage: z9.string().max(500).optional()
1016
+ createdAt: z10.number(),
1017
+ actor: z10.string(),
1018
+ commitMessage: z10.string().max(500).optional()
854
1019
  });
855
- var buildPhaseSchema = z9.enum([
1020
+ var buildPhaseSchema = z10.enum([
856
1021
  "queued",
857
1022
  "source",
858
1023
  "install",
@@ -862,72 +1027,72 @@ var buildPhaseSchema = z9.enum([
862
1027
  "ready",
863
1028
  "failed"
864
1029
  ]);
865
- var buildStatusSchema = z9.object({
1030
+ var buildStatusSchema = z10.object({
866
1031
  phase: buildPhaseSchema,
867
1032
  failedPhase: buildPhaseSchema.optional(),
868
- updatedAt: z9.number(),
869
- message: z9.string()
1033
+ updatedAt: z10.number(),
1034
+ message: z10.string()
870
1035
  });
871
1036
  var hostedBuildSchema = buildIdentitySchema.extend({
872
1037
  ...buildStatusSchema.shape,
873
- finished: z9.boolean(),
874
- current: z9.boolean(),
875
- stagingUrl: z9.string().url()
876
- });
877
- var stagingAccessModeSchema = z9.enum(["console", "password"]);
878
- var stagingAccessSchema = z9.object({ mode: stagingAccessModeSchema });
879
- var stagingAccessInputSchema = z9.discriminatedUnion("mode", [
880
- z9.object({ mode: z9.literal("console") }).strict(),
881
- z9.object({
882
- mode: z9.literal("password"),
883
- password: z9.string().min(8).max(128)
1038
+ finished: z10.boolean(),
1039
+ current: z10.boolean(),
1040
+ stagingUrl: z10.string().url()
1041
+ });
1042
+ var stagingAccessModeSchema = z10.enum(["console", "password"]);
1043
+ var stagingAccessSchema = z10.object({ mode: stagingAccessModeSchema });
1044
+ var stagingAccessInputSchema = z10.discriminatedUnion("mode", [
1045
+ z10.object({ mode: z10.literal("console") }).strict(),
1046
+ z10.object({
1047
+ mode: z10.literal("password"),
1048
+ password: z10.string().min(8).max(128)
884
1049
  }).strict()
885
1050
  ]);
886
- var stagingPathSchema = z9.string().max(2048).refine(
1051
+ var stagingPathSchema = z10.string().max(2048).refine(
887
1052
  (path) => path.startsWith("/") && !path.startsWith("//") && !path.includes("\\"),
888
1053
  "Expected a path on the staging host"
889
1054
  );
890
- var stagingLinkSchema = z9.object({
891
- url: z9.string().url(),
892
- expiresAt: z9.number()
1055
+ var stagingLinkSchema = z10.object({
1056
+ url: z10.string().url(),
1057
+ expiresAt: z10.number()
893
1058
  });
894
- var buildSnapshotSchema = z9.object({
895
- builds: z9.array(hostedBuildSchema),
1059
+ var buildSnapshotSchema = z10.object({
1060
+ builds: z10.array(hostedBuildSchema),
896
1061
  current: hostedBuildSchema.nullable(),
897
1062
  selected: hostedBuildSchema.nullable(),
898
- logs: z9.string()
1063
+ logs: z10.string()
899
1064
  });
900
- var assetPathSchema = z9.string().max(512).refine(
1065
+ var assetPathSchema = z10.string().max(512).refine(
901
1066
  (path) => path.startsWith("/") && // oxlint-disable-next-line no-control-regex -- Asset paths must reject control characters.
902
1067
  !/[\\\u0000-\u001f?#%]/.test(path) && path.slice(1).split("/").every((part) => part.length > 0 && !part.startsWith(".")),
903
1068
  "Expected a public asset path without hidden segments"
904
1069
  );
905
- var base64Schema = z9.string().regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
1070
+ var base64Schema = z10.string().regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
906
1071
  var stagedDeploymentLimits = {
907
1072
  /** Bytes of JSON, uncompressed. */
908
1073
  size: 64e6,
909
1074
  /** Bytes of the Brotli-compressed object. */
910
1075
  compressedSize: 1e7
911
1076
  };
912
- var stagedDeploymentSchema = z9.object({
913
- encoding: z9.literal("br"),
914
- sha256: z9.string().regex(/^[0-9a-f]{64}$/),
915
- compressedSize: z9.number().int().positive().max(stagedDeploymentLimits.compressedSize),
916
- size: z9.number().int().positive().max(stagedDeploymentLimits.size)
1077
+ var stagedDeploymentSchema = z10.object({
1078
+ encoding: z10.literal("br"),
1079
+ sha256: z10.string().regex(/^[0-9a-f]{64}$/),
1080
+ compressedSize: z10.number().int().positive().max(stagedDeploymentLimits.compressedSize),
1081
+ size: z10.number().int().positive().max(stagedDeploymentLimits.size)
917
1082
  }).strict();
918
1083
  var stagedDeploymentContentSchema = stagedDeploymentSchema.extend({
919
- content: z9.string().max(Math.ceil(stagedDeploymentLimits.compressedSize / 3) * 4)
1084
+ content: z10.string().max(Math.ceil(stagedDeploymentLimits.compressedSize / 3) * 4)
920
1085
  }).strict();
921
1086
  var stagedDeploymentKey = (build, sha256) => `builds/${build}/deployment/${sha256}.br`;
922
1087
  var artifactFields = {
923
1088
  routing: appRoutingSchema,
924
- worker: z9.object({
1089
+ worker: z10.object({
925
1090
  ...workerSettings,
926
1091
  migrations: appMigrationsSchema.optional(),
927
- modules: z9.array(
928
- z9.object({
1092
+ modules: z10.array(
1093
+ z10.object({
929
1094
  path: outputPathSchema.refine((path) => path !== "metadata"),
930
- type: z9.enum([
1095
+ type: z10.enum([
931
1096
  "application/javascript+module",
932
1097
  "application/wasm",
933
1098
  "text/plain",
@@ -937,26 +1102,26 @@ var artifactFields = {
937
1102
  }).strict()
938
1103
  ).min(1).max(500)
939
1104
  }).strict().superRefine(distinctBindings).optional(),
940
- assets: z9.array(
941
- z9.object({
1105
+ assets: z10.array(
1106
+ z10.object({
942
1107
  path: assetPathSchema,
943
1108
  content: base64Schema.max(14e6),
944
- size: z9.number().int().min(0).max(1e7)
1109
+ size: z10.number().int().min(0).max(1e7)
945
1110
  }).strict()
946
1111
  ).max(500)
947
1112
  };
948
- var buildArtifactsSchema = z9.discriminatedUnion("format", [
949
- z9.object({
950
- format: z9.literal(1),
1113
+ var buildArtifactsSchema = z10.discriminatedUnion("format", [
1114
+ z10.object({
1115
+ format: z10.literal(1),
951
1116
  ...artifactFields,
952
- quests: z9.unknown(),
953
- catalog: z9.unknown()
1117
+ quests: z10.unknown(),
1118
+ catalog: z10.unknown()
954
1119
  }).strict(),
955
- z9.object({
956
- format: z9.literal(2),
1120
+ z10.object({
1121
+ format: z10.literal(2),
957
1122
  ...artifactFields,
958
1123
  deployment: stagedDeploymentSchema,
959
- images: z9.array(imageAssetArtifactSchema).max(10)
1124
+ images: z10.array(imageAssetArtifactSchema).max(10)
960
1125
  }).strict()
961
1126
  ]).superRefine((value, ctx) => {
962
1127
  if (value.worker) {
@@ -1008,39 +1173,39 @@ var buildArtifactsSchema = z9.discriminatedUnion("format", [
1008
1173
  });
1009
1174
 
1010
1175
  // src/server/development.ts
1011
- import { z as z10 } from "zod";
1012
- var developmentPreflightSchema = z10.object({
1013
- organization: z10.string(),
1014
- project: z10.string(),
1015
- environment: z10.enum(["test", "live"]),
1016
- identity: z10.object({
1017
- exchange: z10.literal("supported"),
1018
- activeIntegrations: z10.number().int().nonnegative()
1176
+ import { z as z11 } from "zod";
1177
+ var developmentPreflightSchema = z11.object({
1178
+ organization: z11.string(),
1179
+ project: z11.string(),
1180
+ environment: z11.enum(["test", "live"]),
1181
+ identity: z11.object({
1182
+ exchange: z11.literal("supported"),
1183
+ activeIntegrations: z11.number().int().nonnegative()
1019
1184
  }).optional(),
1020
- staging: z10.enum(["configured", "blocked"]),
1021
- development: z10.object({
1022
- status: z10.enum(["configured", "blocked"]),
1185
+ staging: z11.enum(["configured", "blocked"]),
1186
+ development: z11.object({
1187
+ status: z11.enum(["configured", "blocked"]),
1023
1188
  // How `domino dev` reaches the preview origin: a Cloudflare tunnel, or a direct route on a
1024
1189
  // local development stack. APIs that predate the field use tunnels.
1025
- transport: z10.enum(["tunnel", "direct"]).default("tunnel"),
1026
- missing: z10.array(z10.string()),
1027
- authentication: z10.array(z10.string())
1190
+ transport: z11.enum(["tunnel", "direct"]).default("tunnel"),
1191
+ missing: z11.array(z11.string()),
1192
+ authentication: z11.array(z11.string())
1028
1193
  }),
1029
- checks: z10.array(
1030
- z10.object({
1031
- id: z10.string(),
1032
- status: z10.enum(["ok", "error"]),
1033
- message: z10.string(),
1034
- missing: z10.array(z10.string()).optional(),
1035
- issues: z10.array(z10.string()).optional()
1194
+ checks: z11.array(
1195
+ z11.object({
1196
+ id: z11.string(),
1197
+ status: z11.enum(["ok", "error"]),
1198
+ message: z11.string(),
1199
+ missing: z11.array(z11.string()).optional(),
1200
+ issues: z11.array(z11.string()).optional()
1036
1201
  })
1037
1202
  )
1038
1203
  });
1039
1204
 
1040
1205
  // src/server/hosted.ts
1041
- import { z as z11 } from "zod";
1206
+ import { z as z12 } from "zod";
1042
1207
  var hostedKeyPermissions = ["read", "points", "ingest"];
1043
- var hostedKeyPermissionList = z11.array(z11.string()).transform(
1208
+ var hostedKeyPermissionList = z12.array(z12.string()).transform(
1044
1209
  (values) => values.filter(
1045
1210
  (value) => hostedKeyPermissions.includes(value)
1046
1211
  )
@@ -1052,17 +1217,17 @@ var hostedManagementBindings = [
1052
1217
  "DOMINO_PROJECT",
1053
1218
  "DOMINO_ENVIRONMENT"
1054
1219
  ];
1055
- var hostedKeySecretSchema = z11.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key");
1056
- var hostedKeySchema = z11.object({
1057
- id: z11.string().uuid(),
1220
+ var hostedKeySecretSchema = z12.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key");
1221
+ var hostedKeySchema = z12.object({
1222
+ id: z12.string().uuid(),
1058
1223
  token: hostedKeySecretSchema,
1059
1224
  organization: identifier,
1060
1225
  project: identifier,
1061
- environment: z11.enum(["test", "live"]),
1226
+ environment: z12.enum(["test", "live"]),
1062
1227
  permissions: hostedKeyPermissionList,
1063
- expiresAt: z11.number().nullable()
1228
+ expiresAt: z12.number().nullable()
1064
1229
  }).strict();
1065
- var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl: z11.string().url() }).strict();
1230
+ var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl: z12.string().url() }).strict();
1066
1231
  function hostedManagementClient(env) {
1067
1232
  const missing = hostedManagementBindings.filter((name) => !env[name]);
1068
1233
  if (missing.length) {
@@ -1070,7 +1235,7 @@ function hostedManagementClient(env) {
1070
1235
  `Missing ${missing.join(", ")}. Domino sets these for hosted apps and domino dev; update the project's vite.config.ts to forward them in development.`
1071
1236
  );
1072
1237
  }
1073
- const environment = z11.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
1238
+ const environment = z12.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
1074
1239
  const token = env.DOMINO_MANAGEMENT_KEY;
1075
1240
  return createManagementClient({
1076
1241
  baseUrl: env.DOMINO_API_URL.replace(/\/+$/, ""),
@@ -1082,9 +1247,9 @@ function hostedManagementClient(env) {
1082
1247
  }
1083
1248
 
1084
1249
  // src/server/index.ts
1085
- var environmentSchema = z12.enum(["test", "live"]);
1086
- var roleSchema = z12.enum(["editor", "reviewer", "staff"]);
1087
- var permissionSchema = z12.enum([
1250
+ var environmentSchema = z13.enum(["test", "live"]);
1251
+ var roleSchema = z13.enum(["editor", "reviewer", "staff"]);
1252
+ var permissionSchema = z13.enum([
1088
1253
  "read",
1089
1254
  "publish",
1090
1255
  "review",
@@ -1104,7 +1269,7 @@ var permissionSchema = z12.enum([
1104
1269
  */
1105
1270
  "enroll"
1106
1271
  ]);
1107
- var permissionListSchema = z12.array(z12.string()).transform(
1272
+ var permissionListSchema = z13.array(z13.string()).transform(
1108
1273
  (values) => values.filter(
1109
1274
  (value) => permissionSchema.safeParse(value).success
1110
1275
  )
@@ -1114,33 +1279,33 @@ var rolePermissions = {
1114
1279
  reviewer: ["read", "review"],
1115
1280
  staff: ["read", "confirm", "handover"]
1116
1281
  };
1117
- var projectSetupSchema = z12.object({
1118
- mode: z12.enum(["new", "existing"]),
1119
- brief: z12.string().trim().min(1).max(4e3)
1282
+ var projectSetupSchema = z13.object({
1283
+ mode: z13.enum(["new", "existing"]),
1284
+ brief: z13.string().trim().min(1).max(4e3)
1120
1285
  }).strict();
1121
- var operatorUserSchema = z12.object({
1122
- id: z12.string(),
1123
- name: z12.string().nullable(),
1124
- email: z12.string().nullable(),
1125
- avatar: z12.string().nullable()
1126
- });
1127
- var projectSchema = z12.object({
1128
- slug: z12.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
1129
- createdBy: z12.string().nullable().optional(),
1286
+ var operatorUserSchema = z13.object({
1287
+ id: z13.string(),
1288
+ name: z13.string().nullable(),
1289
+ email: z13.string().nullable(),
1290
+ avatar: z13.string().nullable()
1291
+ });
1292
+ var projectSchema = z13.object({
1293
+ slug: z13.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
1294
+ createdBy: z13.string().nullable().optional(),
1130
1295
  creator: operatorUserSchema.nullable().optional(),
1131
1296
  /** A response, so fields a newer server adds to the setup are dropped, not rejected. */
1132
- setup: z12.object(projectSetupSchema.shape).optional(),
1297
+ setup: z13.object(projectSetupSchema.shape).optional(),
1133
1298
  /** The starter chosen at setup. A plain string, so later starters still parse. */
1134
- starter: z12.string().optional(),
1135
- id: z12.string().min(1),
1299
+ starter: z13.string().optional(),
1300
+ id: z13.string().min(1),
1136
1301
  organization: identifier,
1137
1302
  project: identifier,
1138
- name: z12.string(),
1139
- subtitle: z12.string(),
1140
- initials: z12.string(),
1141
- color: z12.string(),
1303
+ name: z13.string(),
1304
+ subtitle: z13.string(),
1305
+ initials: z13.string(),
1306
+ color: z13.string(),
1142
1307
  permissions: permissionListSchema,
1143
- environments: z12.array(environmentSchema)
1308
+ environments: z13.array(environmentSchema)
1144
1309
  }).refine(
1145
1310
  (project) => !project.creator || project.creator.id === project.createdBy,
1146
1311
  {
@@ -1148,45 +1313,45 @@ var projectSchema = z12.object({
1148
1313
  path: ["creator"]
1149
1314
  }
1150
1315
  );
1151
- var projectInputSchema = z12.object({
1316
+ var projectInputSchema = z13.object({
1152
1317
  actionId: identifier,
1153
- name: z12.string().trim().min(1).max(80),
1318
+ name: z13.string().trim().min(1).max(80),
1154
1319
  setup: projectSetupSchema.optional(),
1155
1320
  /** The starter a new hosted app begins from, with `setup.mode` "new". */
1156
1321
  starter: starterIdSchema.optional()
1157
1322
  }).strict();
1158
- var projectUpdateInputSchema = z12.union([
1159
- z12.object({ name: projectInputSchema.shape.name }).strict(),
1160
- z12.object({
1323
+ var projectUpdateInputSchema = z13.union([
1324
+ z13.object({ name: projectInputSchema.shape.name }).strict(),
1325
+ z13.object({
1161
1326
  slug: projectSchema.shape.slug,
1162
- confirm: z12.string().min(1).max(80)
1327
+ confirm: z13.string().min(1).max(80)
1163
1328
  }).strict()
1164
1329
  ]);
1165
- var projectDeletionInputSchema = z12.object({ confirm: z12.string().min(1).max(80) }).strict();
1166
- var projectDeletionSchema = z12.object({
1330
+ var projectDeletionInputSchema = z13.object({ confirm: z13.string().min(1).max(80) }).strict();
1331
+ var projectDeletionSchema = z13.object({
1167
1332
  project: identifier,
1168
- purgeAfter: z12.number().int()
1333
+ purgeAfter: z13.number().int()
1169
1334
  });
1170
- var projectTransferInputSchema = z12.object({ organization: identifier, confirm: z12.string().min(1).max(80) }).strict();
1171
- var projectTransferSchema = z12.object({
1335
+ var projectTransferInputSchema = z13.object({ organization: identifier, confirm: z13.string().min(1).max(80) }).strict();
1336
+ var projectTransferSchema = z13.object({
1172
1337
  organization: identifier,
1173
1338
  project: identifier
1174
1339
  });
1175
- var grantSchema = z12.object({
1176
- subject: z12.string().min(1).max(200),
1177
- roles: z12.array(roleSchema),
1178
- environments: z12.array(environmentSchema)
1340
+ var grantSchema = z13.object({
1341
+ subject: z13.string().min(1).max(200),
1342
+ roles: z13.array(roleSchema),
1343
+ environments: z13.array(environmentSchema)
1179
1344
  }).strict();
1180
- var grantRecordSchema = z12.object(grantSchema.shape);
1181
- var stockAdditionSchema = z12.object({
1345
+ var grantRecordSchema = z13.object(grantSchema.shape);
1346
+ var stockAdditionSchema = z13.object({
1182
1347
  item: identifier,
1183
- quantity: z12.number().int(),
1348
+ quantity: z13.number().int(),
1184
1349
  actionId: identifier
1185
1350
  });
1186
- var completionRevokeSchema = z12.object({
1351
+ var completionRevokeSchema = z13.object({
1187
1352
  actionId: identifier,
1188
- reason: z12.string().trim().min(1).max(500),
1189
- freeOccurrence: z12.boolean().default(false)
1353
+ reason: z13.string().trim().min(1).max(500),
1354
+ freeOccurrence: z13.boolean().default(false)
1190
1355
  }).strict();
1191
1356
  var RevokedEntitlementOutcome = {
1192
1357
  /** No other completion grants the reward: it is void, after cancelling a handover in progress. */
@@ -1214,218 +1379,218 @@ var RevokedReferralOutcome = {
1214
1379
  /** Qualified on another accepted completion of the program's quest instead. */
1215
1380
  Requalified: "requalified"
1216
1381
  };
1217
- var entitlementOutcomeSchema = z12.string().min(1).max(64);
1218
- var deliveryOutcomeSchema = z12.string().min(1).max(64);
1219
- var referralOutcomeSchema = z12.string().min(1).max(64);
1220
- var completionRevocationSchema = z12.object({
1382
+ var entitlementOutcomeSchema = z13.string().min(1).max(64);
1383
+ var deliveryOutcomeSchema = z13.string().min(1).max(64);
1384
+ var referralOutcomeSchema = z13.string().min(1).max(64);
1385
+ var completionRevocationSchema = z13.object({
1221
1386
  completion: identifier,
1222
1387
  /** The quest ID, or the board ID when `source.kind` is `leaderboard`. */
1223
1388
  quest: identifier,
1224
1389
  member: identifier,
1225
1390
  /** What paid the revoked completion. `source.id` repeats `quest`. */
1226
1391
  source: completionSourceSchema.optional(),
1227
- revokedAt: z12.number(),
1228
- occurrenceFreed: z12.boolean(),
1229
- points: z12.array(
1230
- z12.object({
1392
+ revokedAt: z13.number(),
1393
+ occurrenceFreed: z13.boolean(),
1394
+ points: z13.array(
1395
+ z13.object({
1231
1396
  entry: identifier,
1232
1397
  balance: identifier,
1233
1398
  reversal: identifier.nullable(),
1234
- reversed: z12.number().int(),
1235
- unreversed: z12.number().int()
1399
+ reversed: z13.number().int(),
1400
+ unreversed: z13.number().int()
1236
1401
  })
1237
1402
  ),
1238
- entitlements: z12.array(
1239
- z12.object({
1403
+ entitlements: z13.array(
1404
+ z13.object({
1240
1405
  entitlement: identifier,
1241
1406
  reward: identifier,
1242
1407
  outcome: entitlementOutcomeSchema,
1243
- status: z12.string()
1408
+ status: z13.string()
1244
1409
  })
1245
1410
  ),
1246
- deliveries: z12.array(
1247
- z12.object({
1248
- delivery: z12.string(),
1249
- roleId: z12.string(),
1411
+ deliveries: z13.array(
1412
+ z13.object({
1413
+ delivery: z13.string(),
1414
+ roleId: z13.string(),
1250
1415
  outcome: deliveryOutcomeSchema,
1251
1416
  /**
1252
1417
  * By Relay's records, another accepted, unrevoked completion of the member also granted this
1253
1418
  * role to the same Discord account and server. Relay does not read Discord's membership.
1254
1419
  */
1255
- stillGranted: z12.boolean()
1420
+ stillGranted: z13.boolean()
1256
1421
  })
1257
1422
  ),
1258
- referrals: z12.array(
1259
- z12.object({
1423
+ referrals: z13.array(
1424
+ z13.object({
1260
1425
  program: identifier,
1261
1426
  outcome: referralOutcomeSchema
1262
1427
  })
1263
1428
  ),
1264
- streakMilestone: z12.boolean()
1265
- });
1266
- var accessSchema = z12.object({
1267
- actor: z12.string(),
1268
- organization: z12.string(),
1269
- admin: z12.boolean(),
1270
- local: z12.boolean(),
1271
- projects: z12.array(projectSchema)
1272
- });
1273
- var querySchema = z12.object({
1274
- q: z12.string().max(200).default(""),
1275
- filter: z12.string().max(50).default("all"),
1276
- offset: z12.coerce.number().int().min(0).max(1e6).default(0),
1277
- limit: z12.coerce.number().int().min(1).max(100).default(25)
1278
- });
1279
- var accountProfileSchema = z12.object({
1280
- name: z12.string().optional(),
1429
+ streakMilestone: z13.boolean()
1430
+ });
1431
+ var accessSchema = z13.object({
1432
+ actor: z13.string(),
1433
+ organization: z13.string(),
1434
+ admin: z13.boolean(),
1435
+ local: z13.boolean(),
1436
+ projects: z13.array(projectSchema)
1437
+ });
1438
+ var querySchema = z13.object({
1439
+ q: z13.string().max(200).default(""),
1440
+ filter: z13.string().max(50).default("all"),
1441
+ offset: z13.coerce.number().int().min(0).max(1e6).default(0),
1442
+ limit: z13.coerce.number().int().min(1).max(100).default(25)
1443
+ });
1444
+ var accountProfileSchema = z13.object({
1445
+ name: z13.string().optional(),
1281
1446
  /** The account's handle, where the provider has one (X and Discord). */
1282
- username: z12.string().optional(),
1283
- email: z12.string().optional(),
1284
- emailVerified: z12.boolean().default(false),
1285
- imageUrl: z12.string().url().optional()
1447
+ username: z13.string().optional(),
1448
+ email: z13.string().optional(),
1449
+ emailVerified: z13.boolean().default(false),
1450
+ imageUrl: z13.string().url().optional()
1286
1451
  });
1287
- var memberAccountSchema = z12.object({
1452
+ var memberAccountSchema = z13.object({
1288
1453
  /** `wallet` for wallet sign-in, `account` for every other connected account. */
1289
- kind: z12.enum(["account", "wallet"]),
1290
- provider: z12.string(),
1291
- subject: z12.string(),
1292
- signInEnabled: z12.boolean(),
1454
+ kind: z13.enum(["account", "wallet"]),
1455
+ provider: z13.string(),
1456
+ subject: z13.string(),
1457
+ signInEnabled: z13.boolean(),
1293
1458
  profile: accountProfileSchema.optional()
1294
1459
  });
1295
- var operationSchema = z12.object({
1296
- target: z12.string(),
1297
- paused: z12.boolean(),
1298
- revision: z12.number().int(),
1299
- reason: z12.string(),
1300
- actor: z12.string().nullable(),
1301
- changedAt: z12.number()
1302
- });
1303
- var operationInputSchema = z12.object({
1304
- target: z12.union([
1305
- z12.literal("redemptions"),
1306
- z12.string().regex(/^quest:[\w-]+$/)
1460
+ var operationSchema = z13.object({
1461
+ target: z13.string(),
1462
+ paused: z13.boolean(),
1463
+ revision: z13.number().int(),
1464
+ reason: z13.string(),
1465
+ actor: z13.string().nullable(),
1466
+ changedAt: z13.number()
1467
+ });
1468
+ var operationInputSchema = z13.object({
1469
+ target: z13.union([
1470
+ z13.literal("redemptions"),
1471
+ z13.string().regex(/^quest:[\w-]+$/)
1307
1472
  ]),
1308
- paused: z12.boolean(),
1309
- revision: z12.number().int().nonnegative(),
1310
- reason: z12.string().trim().min(1).max(500),
1473
+ paused: z13.boolean(),
1474
+ revision: z13.number().int().nonnegative(),
1475
+ reason: z13.string().trim().min(1).max(500),
1311
1476
  actionId: identifier
1312
1477
  }).strict();
1313
- var questLifecycleInputSchema = z12.object({
1478
+ var questLifecycleInputSchema = z13.object({
1314
1479
  quest: identifier,
1315
1480
  expectedRelease: identifier.optional(),
1316
- archived: z12.boolean(),
1317
- reason: z12.string().trim().min(1).max(500),
1481
+ archived: z13.boolean(),
1482
+ reason: z13.string().trim().min(1).max(500),
1318
1483
  actionId: identifier
1319
1484
  }).strict();
1320
- var questLifecycleSchema = z12.object({
1485
+ var questLifecycleSchema = z13.object({
1321
1486
  quest: identifier,
1322
1487
  key: identifier.nullable(),
1323
- title: z12.string(),
1488
+ title: z13.string(),
1324
1489
  release: identifier,
1325
- lifecycle: z12.enum(["active", "paused", "archived"]),
1326
- changed: z12.boolean()
1327
- });
1328
- var memberSchema = z12.object({
1329
- id: z12.string(),
1330
- test: z12.boolean().optional(),
1331
- name: z12.string().nullable().optional(),
1332
- accounts: z12.array(memberAccountSchema).default([]),
1333
- attempts: z12.number(),
1334
- completions: z12.number(),
1335
- rewards: z12.number(),
1336
- lastActivity: z12.number().nullable()
1337
- });
1338
- var personSchema = z12.object({
1339
- id: z12.string(),
1340
- test: z12.boolean().optional(),
1341
- name: z12.string().nullable().optional(),
1342
- accounts: z12.array(memberAccountSchema).default([])
1343
- });
1344
- var metricsSchema = z12.object({
1345
- quests: z12.number(),
1346
- members: z12.number(),
1347
- attempts: z12.number(),
1348
- completions: z12.number(),
1349
- review: z12.number(),
1350
- failed: z12.number(),
1351
- entitlements: z12.number()
1352
- });
1353
- var readinessSchema = z12.object({
1354
- checks: z12.array(
1355
- z12.object({
1356
- id: z12.string(),
1357
- status: z12.enum(["ready", "blocked"]),
1358
- title: z12.string(),
1359
- detail: z12.string()
1490
+ lifecycle: z13.enum(["active", "paused", "archived"]),
1491
+ changed: z13.boolean()
1492
+ });
1493
+ var memberSchema = z13.object({
1494
+ id: z13.string(),
1495
+ test: z13.boolean().optional(),
1496
+ name: z13.string().nullable().optional(),
1497
+ accounts: z13.array(memberAccountSchema).default([]),
1498
+ attempts: z13.number(),
1499
+ completions: z13.number(),
1500
+ rewards: z13.number(),
1501
+ lastActivity: z13.number().nullable()
1502
+ });
1503
+ var personSchema = z13.object({
1504
+ id: z13.string(),
1505
+ test: z13.boolean().optional(),
1506
+ name: z13.string().nullable().optional(),
1507
+ accounts: z13.array(memberAccountSchema).default([])
1508
+ });
1509
+ var metricsSchema = z13.object({
1510
+ quests: z13.number(),
1511
+ members: z13.number(),
1512
+ attempts: z13.number(),
1513
+ completions: z13.number(),
1514
+ review: z13.number(),
1515
+ failed: z13.number(),
1516
+ entitlements: z13.number()
1517
+ });
1518
+ var readinessSchema = z13.object({
1519
+ checks: z13.array(
1520
+ z13.object({
1521
+ id: z13.string(),
1522
+ status: z13.enum(["ready", "blocked"]),
1523
+ title: z13.string(),
1524
+ detail: z13.string()
1360
1525
  })
1361
1526
  )
1362
1527
  });
1363
- var inventorySchema = z12.object({
1364
- item: z12.string(),
1365
- name: z12.string().nullable().default(null),
1366
- available: z12.number(),
1367
- reserved: z12.number(),
1368
- allocated: z12.number().default(0)
1369
- });
1370
- var auditRecordSchema = z12.object({
1371
- id: z12.string(),
1372
- action: z12.string(),
1373
- actor: z12.string().nullable(),
1528
+ var inventorySchema = z13.object({
1529
+ item: z13.string(),
1530
+ name: z13.string().nullable().default(null),
1531
+ available: z13.number(),
1532
+ reserved: z13.number(),
1533
+ allocated: z13.number().default(0)
1534
+ });
1535
+ var auditRecordSchema = z13.object({
1536
+ id: z13.string(),
1537
+ action: z13.string(),
1538
+ actor: z13.string().nullable(),
1374
1539
  user: operatorUserSchema.nullable().optional(),
1375
- detail: z12.string(),
1376
- at: z12.number(),
1377
- attempt: z12.string().nullable()
1540
+ detail: z13.string(),
1541
+ at: z13.number(),
1542
+ attempt: z13.string().nullable()
1378
1543
  }).refine((record) => !record.user || record.user.id === record.actor, {
1379
1544
  message: "User profile must match the recorded actor",
1380
1545
  path: ["user"]
1381
1546
  });
1382
- var pageSchema = z12.object({
1547
+ var pageSchema = z13.object({
1383
1548
  snapshot: snapshotSchema,
1384
- members: z12.array(memberSchema),
1385
- people: z12.array(personSchema).default([]),
1549
+ members: z13.array(memberSchema),
1550
+ people: z13.array(personSchema).default([]),
1386
1551
  metrics: metricsSchema,
1387
- total: z12.number(),
1388
- offset: z12.number(),
1389
- limit: z12.number(),
1390
- inventory: z12.array(inventorySchema),
1391
- operations: z12.array(operationSchema).default([]),
1392
- audit: z12.array(auditRecordSchema).default([]),
1393
- questCounts: z12.record(z12.string(), z12.number())
1394
- });
1395
- var managedOAuthAccountBaseSchema = z12.object({
1396
- provider: z12.enum(["x", "discord"]),
1397
- revision: z12.number().int().nonnegative()
1398
- });
1399
- var managedOAuthAccountSchema = z12.discriminatedUnion("status", [
1552
+ total: z13.number(),
1553
+ offset: z13.number(),
1554
+ limit: z13.number(),
1555
+ inventory: z13.array(inventorySchema),
1556
+ operations: z13.array(operationSchema).default([]),
1557
+ audit: z13.array(auditRecordSchema).default([]),
1558
+ questCounts: z13.record(z13.string(), z13.number())
1559
+ });
1560
+ var managedOAuthAccountBaseSchema = z13.object({
1561
+ provider: z13.enum(["x", "discord"]),
1562
+ revision: z13.number().int().nonnegative()
1563
+ });
1564
+ var managedOAuthAccountSchema = z13.discriminatedUnion("status", [
1400
1565
  managedOAuthAccountBaseSchema.extend({
1401
- status: z12.literal("connected"),
1402
- subject: z12.string().min(1),
1403
- linkedAt: z12.number()
1566
+ status: z13.literal("connected"),
1567
+ subject: z13.string().min(1),
1568
+ linkedAt: z13.number()
1404
1569
  }),
1405
- managedOAuthAccountBaseSchema.extend({ status: z12.literal("disconnected") })
1570
+ managedOAuthAccountBaseSchema.extend({ status: z13.literal("disconnected") })
1406
1571
  ]);
1407
- var memberOAuthUnlinkInputSchema = z12.object({
1408
- provider: z12.enum(["x", "discord"]),
1409
- subject: z12.string().min(1).max(4096),
1410
- revision: z12.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
1411
- reason: z12.string().trim().min(1).max(500)
1572
+ var memberOAuthUnlinkInputSchema = z13.object({
1573
+ provider: z13.enum(["x", "discord"]),
1574
+ subject: z13.string().min(1).max(4096),
1575
+ revision: z13.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
1576
+ reason: z13.string().trim().min(1).max(500)
1412
1577
  }).strict();
1413
1578
  var managedWalletSchema = linkedWalletSchema.extend({
1414
- status: z12.enum(["linked", "unlinked"]),
1415
- unlinkedAt: z12.number().int().nullable(),
1579
+ status: z13.enum(["linked", "unlinked"]),
1580
+ unlinkedAt: z13.number().int().nullable(),
1416
1581
  /** "member", or the operator or key that unlinked it. */
1417
- unlinkedBy: z12.string().nullable()
1582
+ unlinkedBy: z13.string().nullable()
1418
1583
  });
1419
1584
  var managedMemberIdentitySchema = memberIdentitySchema.extend({
1420
- status: z12.enum(["linked", "unlinked"]),
1421
- unlinkedAt: z12.number().int().nullable(),
1585
+ status: z13.enum(["linked", "unlinked"]),
1586
+ unlinkedAt: z13.number().int().nullable(),
1422
1587
  /** The operator or key that unlinked it. */
1423
- unlinkedBy: z12.string().nullable()
1588
+ unlinkedBy: z13.string().nullable()
1424
1589
  });
1425
- var memberIdentityChangeInputSchema = z12.object({
1590
+ var memberIdentityChangeInputSchema = z13.object({
1426
1591
  kind: appIdentityKindSchema,
1427
- subject: z12.string().min(1).max(256),
1428
- reason: z12.string().trim().min(1).max(500)
1592
+ subject: z13.string().min(1).max(256),
1593
+ reason: z13.string().trim().min(1).max(500)
1429
1594
  }).strict();
1430
1595
  var balanceCheckSchema = walletBalanceSchema.pick({
1431
1596
  chain: true,
@@ -1435,65 +1600,65 @@ var balanceCheckSchema = walletBalanceSchema.pick({
1435
1600
  wallets: true,
1436
1601
  observedAt: true
1437
1602
  }).extend({ attempt: identifier });
1438
- var walletBalanceChainsSchema = z12.object({
1439
- chains: z12.array(
1440
- z12.object({
1441
- chain: z12.union([
1442
- z12.literal(solanaMainnet),
1603
+ var walletBalanceChainsSchema = z13.object({
1604
+ chains: z13.array(
1605
+ z13.object({
1606
+ chain: z13.union([
1607
+ z13.literal(solanaMainnet),
1443
1608
  cosmosNetworkSchema,
1444
1609
  evmChainIdSchema
1445
1610
  ]),
1446
- name: z12.string(),
1447
- testnet: z12.boolean()
1611
+ name: z13.string(),
1612
+ testnet: z13.boolean()
1448
1613
  })
1449
1614
  )
1450
1615
  });
1451
- var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason: z12.string().trim().min(1).max(500) }).strict();
1616
+ var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason: z13.string().trim().min(1).max(500) }).strict();
1452
1617
  var memberWalletSignInInputSchema = walletUnlinkInputSchema.extend({
1453
- enabled: z12.boolean(),
1454
- reason: z12.string().trim().min(1).max(500)
1618
+ enabled: z13.boolean(),
1619
+ reason: z13.string().trim().min(1).max(500)
1455
1620
  }).strict();
1456
- var participantSignInSchema = z12.object({
1457
- providers: z12.array(
1458
- z12.object({ provider: authProviderSchema, configured: z12.boolean() })
1621
+ var participantSignInSchema = z13.object({
1622
+ providers: z13.array(
1623
+ z13.object({ provider: authProviderSchema, configured: z13.boolean() })
1459
1624
  ),
1460
- email: z12.boolean(),
1625
+ email: z13.boolean(),
1461
1626
  /** Wallet families: `"solana"`, `"eip155"`, `"cosmos"`. */
1462
1627
  wallets: walletSignInNetworksSchema,
1463
1628
  /** Why participants cannot sign in to this project, or null. */
1464
- issue: z12.string().nullable(),
1465
- updatedAt: z12.number().nullable(),
1466
- updatedBy: z12.string().nullable()
1629
+ issue: z13.string().nullable(),
1630
+ updatedAt: z13.number().nullable(),
1631
+ updatedBy: z13.string().nullable()
1467
1632
  });
1468
- var participantSignInInputSchema = z12.object({
1633
+ var participantSignInInputSchema = z13.object({
1469
1634
  wallets: walletSignInNetworksSchema
1470
1635
  }).strict();
1471
- var completionRevocationShortfallSchema = z12.object({
1636
+ var completionRevocationShortfallSchema = z13.object({
1472
1637
  completion: identifier,
1473
1638
  quest: identifier,
1474
- revokedAt: z12.number().int().nonnegative().safe(),
1475
- unreversedPoints: z12.record(identifier, z12.number().int().positive().safe())
1639
+ revokedAt: z13.number().int().nonnegative().safe(),
1640
+ unreversedPoints: z13.record(identifier, z13.number().int().positive().safe())
1476
1641
  });
1477
- var memberDetailSchema = z12.object({
1642
+ var memberDetailSchema = z13.object({
1478
1643
  snapshot: snapshotSchema,
1479
1644
  member: memberSchema,
1480
1645
  progress: memberProgressSchema,
1481
1646
  /** Up to 25 revoked completions with an unreversed point remainder, newest first. */
1482
- revocationShortfalls: z12.array(completionRevocationShortfallSchema).default([]),
1647
+ revocationShortfalls: z13.array(completionRevocationShortfallSchema).default([]),
1483
1648
  /** Current and historical campaign enrollment state, including inactive enrollments. */
1484
- campaignEnrollments: z12.array(campaignEnrollmentSchema).default([]),
1485
- passes: z12.array(
1486
- z12.object({
1487
- provider: z12.string(),
1488
- event: z12.string(),
1489
- subject: z12.string(),
1649
+ campaignEnrollments: z13.array(campaignEnrollmentSchema).default([]),
1650
+ passes: z13.array(
1651
+ z13.object({
1652
+ provider: z13.string(),
1653
+ event: z13.string(),
1654
+ subject: z13.string(),
1490
1655
  attempt: identifier.nullable()
1491
1656
  })
1492
1657
  ).default([]),
1493
1658
  /** Linked and unlinked wallets. */
1494
- wallets: z12.array(managedWalletSchema),
1659
+ wallets: z13.array(managedWalletSchema),
1495
1660
  /** The member's 10 most recent recorded balance reads, newest first. */
1496
- balanceChecks: z12.array(balanceCheckSchema),
1661
+ balanceChecks: z13.array(balanceCheckSchema),
1497
1662
  /** The member's participant profile in this project. */
1498
1663
  profile: managedProfileSchema.nullable(),
1499
1664
  /**
@@ -1501,126 +1666,126 @@ var memberDetailSchema = z12.object({
1501
1666
  * member ID: their selected X and Discord accounts and their `app:<name>` identities in this
1502
1667
  * project, including app identities an operator unlinked, by kind.
1503
1668
  */
1504
- identities: z12.array(managedMemberIdentitySchema)
1669
+ identities: z13.array(managedMemberIdentitySchema)
1505
1670
  });
1506
- var stockInputSchema = z12.object({
1671
+ var stockInputSchema = z13.object({
1507
1672
  item: identifier,
1508
- quantity: z12.number().int().positive().max(1e6),
1673
+ quantity: z13.number().int().positive().max(1e6),
1509
1674
  actionId: identifier
1510
1675
  }).strict();
1511
- var ingestTrackerScopeSchema = z12.array(identifier).min(1).max(100).nullable();
1512
- var tokenScopeInputSchema = z12.object({ ingestTrackers: ingestTrackerScopeSchema }).strict();
1513
- var tokenInputSchema = z12.object({
1514
- name: z12.string().trim().min(1).max(80),
1676
+ var ingestTrackerScopeSchema = z13.array(identifier).min(1).max(100).nullable();
1677
+ var tokenScopeInputSchema = z13.object({ ingestTrackers: ingestTrackerScopeSchema }).strict();
1678
+ var tokenInputSchema = z13.object({
1679
+ name: z13.string().trim().min(1).max(80),
1515
1680
  project: identifier,
1516
1681
  environment: environmentSchema,
1517
- permissions: z12.array(permissionSchema).min(1),
1682
+ permissions: z13.array(permissionSchema).min(1),
1518
1683
  ingestTrackers: ingestTrackerScopeSchema.optional(),
1519
- days: z12.number().int().min(1).max(90).default(30)
1684
+ days: z13.number().int().min(1).max(90).default(30)
1520
1685
  }).strict();
1521
- var tokenSchema = z12.object({
1522
- id: z12.string(),
1523
- name: z12.string(),
1524
- project: z12.string(),
1686
+ var tokenSchema = z13.object({
1687
+ id: z13.string(),
1688
+ name: z13.string(),
1689
+ project: z13.string(),
1525
1690
  environment: environmentSchema,
1526
1691
  permissions: permissionListSchema,
1527
1692
  ingestTrackers: ingestTrackerScopeSchema.optional(),
1528
- expiresAt: z12.number()
1693
+ expiresAt: z13.number()
1529
1694
  });
1530
- var issuedTokenSchema = tokenSchema.extend({ token: z12.string() });
1531
- var teamSchema = z12.array(
1532
- z12.object({ id: z12.string(), label: z12.string() })
1695
+ var issuedTokenSchema = tokenSchema.extend({ token: z13.string() });
1696
+ var teamSchema = z13.array(
1697
+ z13.object({ id: z13.string(), label: z13.string() })
1533
1698
  );
1534
- var memberLookupSchema = z12.object({
1535
- provider: z12.string().min(1).max(200),
1536
- subject: z12.string().min(1).max(2048)
1699
+ var memberLookupSchema = z13.object({
1700
+ provider: z13.string().min(1).max(200),
1701
+ subject: z13.string().min(1).max(2048)
1537
1702
  }).strict();
1538
- var booleanQuery = z12.union([
1539
- z12.boolean(),
1540
- z12.enum(["true", "false"]).transform((v) => v === "true")
1703
+ var booleanQuery = z13.union([
1704
+ z13.boolean(),
1705
+ z13.enum(["true", "false"]).transform((v) => v === "true")
1541
1706
  ]);
1542
- var managedMemberQuerySchema = z12.strictObject({
1543
- q: z12.string().max(200).optional(),
1707
+ var managedMemberQuerySchema = z13.strictObject({
1708
+ q: z13.string().max(200).optional(),
1544
1709
  needsReview: booleanQuery.optional(),
1545
- limit: z12.coerce.number().int().min(1).max(100).optional(),
1710
+ limit: z13.coerce.number().int().min(1).max(100).optional(),
1546
1711
  cursor: pageCursorSchema.optional()
1547
1712
  });
1548
- var managedMemberPageSchema = z12.object({
1549
- items: z12.array(memberSchema),
1550
- total: z12.number().int().nonnegative(),
1551
- nextCursor: z12.string().nullable()
1713
+ var managedMemberPageSchema = z13.object({
1714
+ items: z13.array(memberSchema),
1715
+ total: z13.number().int().nonnegative(),
1716
+ nextCursor: z13.string().nullable()
1552
1717
  });
1553
1718
  var projectMetricsSchema = metricsSchema.extend({
1554
- completionsByQuest: z12.array(
1555
- z12.object({ quest: identifier, completions: z12.number() })
1719
+ completionsByQuest: z13.array(
1720
+ z13.object({ quest: identifier, completions: z13.number() })
1556
1721
  )
1557
1722
  });
1558
- var pageLimit = z12.coerce.number().int().min(1).max(100).optional();
1559
- var managedAttemptQuerySchema = z12.strictObject({
1560
- q: z12.string().max(200).optional(),
1561
- status: z12.string().min(1).max(50).optional(),
1723
+ var pageLimit = z13.coerce.number().int().min(1).max(100).optional();
1724
+ var managedAttemptQuerySchema = z13.strictObject({
1725
+ q: z13.string().max(200).optional(),
1726
+ status: z13.string().min(1).max(50).optional(),
1562
1727
  limit: pageLimit,
1563
1728
  cursor: pageCursorSchema.optional()
1564
1729
  });
1565
- var managedAttemptPageSchema = z12.object({
1566
- items: z12.array(attemptSchema),
1567
- releases: z12.array(publishedReleaseSchema),
1568
- people: z12.array(personSchema),
1569
- total: z12.number().int().nonnegative(),
1570
- nextCursor: z12.string().nullable()
1730
+ var managedAttemptPageSchema = z13.object({
1731
+ items: z13.array(attemptSchema),
1732
+ releases: z13.array(publishedReleaseSchema),
1733
+ people: z13.array(personSchema),
1734
+ total: z13.number().int().nonnegative(),
1735
+ nextCursor: z13.string().nullable()
1571
1736
  });
1572
- var managedReleaseQuerySchema = z12.strictObject({
1737
+ var managedReleaseQuerySchema = z13.strictObject({
1573
1738
  quest: identifier.optional(),
1574
1739
  limit: pageLimit,
1575
1740
  cursor: pageCursorSchema.optional()
1576
1741
  });
1577
- var managedReleasePageSchema = z12.object({
1578
- items: z12.array(publishedReleaseSchema),
1579
- nextCursor: z12.string().nullable()
1742
+ var managedReleasePageSchema = z13.object({
1743
+ items: z13.array(publishedReleaseSchema),
1744
+ nextCursor: z13.string().nullable()
1580
1745
  });
1581
- var managedAttemptSchema = z12.object({
1746
+ var managedAttemptSchema = z13.object({
1582
1747
  attempt: attemptSchema,
1583
1748
  release: publishedReleaseSchema.nullable(),
1584
- events: z12.array(eventSchema),
1749
+ events: z13.array(eventSchema),
1585
1750
  person: personSchema
1586
1751
  });
1587
- var managedEntitlementQuerySchema = z12.strictObject({
1588
- q: z12.string().max(200).optional(),
1589
- status: z12.string().min(1).max(50).optional(),
1752
+ var managedEntitlementQuerySchema = z13.strictObject({
1753
+ q: z13.string().max(200).optional(),
1754
+ status: z13.string().min(1).max(50).optional(),
1590
1755
  limit: pageLimit,
1591
1756
  cursor: pageCursorSchema.optional()
1592
1757
  });
1593
- var managedEntitlementPageSchema = z12.object({
1594
- items: z12.array(entitlementSchema),
1595
- people: z12.array(personSchema),
1596
- total: z12.number().int().nonnegative(),
1597
- nextCursor: z12.string().nullable()
1758
+ var managedEntitlementPageSchema = z13.object({
1759
+ items: z13.array(entitlementSchema),
1760
+ people: z13.array(personSchema),
1761
+ total: z13.number().int().nonnegative(),
1762
+ nextCursor: z13.string().nullable()
1598
1763
  });
1599
- var managedEntitlementSchema = z12.object({
1764
+ var managedEntitlementSchema = z13.object({
1600
1765
  entitlement: entitlementSchema,
1601
1766
  person: personSchema
1602
1767
  });
1603
1768
  var managedStockItemSchema = inventorySchema.extend({
1604
- offers: z12.array(identifier)
1769
+ offers: z13.array(identifier)
1605
1770
  });
1606
- var auditQuerySchema = z12.strictObject({
1607
- category: z12.enum(["reviews", "rewards", "configuration"]).optional(),
1608
- q: z12.string().max(200).optional(),
1771
+ var auditQuerySchema = z13.strictObject({
1772
+ category: z13.enum(["reviews", "rewards", "configuration"]).optional(),
1773
+ q: z13.string().max(200).optional(),
1609
1774
  limit: pageLimit,
1610
1775
  cursor: pageCursorSchema.optional()
1611
1776
  });
1612
1777
  var accessHistoryQuerySchema = auditQuerySchema.omit({
1613
1778
  category: true
1614
1779
  });
1615
- var auditPageSchema = z12.object({
1616
- items: z12.array(auditRecordSchema),
1617
- total: z12.number().int().nonnegative(),
1618
- nextCursor: z12.string().nullable()
1780
+ var auditPageSchema = z13.object({
1781
+ items: z13.array(auditRecordSchema),
1782
+ total: z13.number().int().nonnegative(),
1783
+ nextCursor: z13.string().nullable()
1619
1784
  });
1620
- var verifiedPassSchema = z12.object({
1785
+ var verifiedPassSchema = z13.object({
1621
1786
  provider: identifier,
1622
1787
  event: identifier,
1623
- subject: z12.string().min(1).max(2048),
1788
+ subject: z13.string().min(1).max(2048),
1624
1789
  member: identifier,
1625
1790
  quest: identifier
1626
1791
  }).strict();
@@ -1644,7 +1809,7 @@ function clientFailure(error) {
1644
1809
  return new ManagementError({
1645
1810
  kind: "client",
1646
1811
  code: ManagementErrorCode.InvalidInput,
1647
- message: error instanceof z12.ZodError ? `Invalid management request: ${z12.prettifyError(error)}` : error instanceof Error ? error.message : "Invalid management request",
1812
+ message: error instanceof z13.ZodError ? `Invalid management request: ${z13.prettifyError(error)}` : error instanceof Error ? error.message : "Invalid management request",
1648
1813
  cause: error
1649
1814
  });
1650
1815
  }
@@ -1682,7 +1847,7 @@ function managementClient(options) {
1682
1847
  call
1683
1848
  );
1684
1849
  }
1685
- const ok = z12.object({ ok: z12.literal(true) });
1850
+ const ok = z13.object({ ok: z13.literal(true) });
1686
1851
  function pointHistory(member, ledger, query = {}, call) {
1687
1852
  return get(
1688
1853
  `/points/${identifier.parse(member)}/${identifier.parse(ledger)}/history${queryString(typeof query === "number" ? { before: query } : pageQuerySchema.parse(query))}`,
@@ -1804,8 +1969,8 @@ function managementClient(options) {
1804
1969
  }
1805
1970
  return exchange(
1806
1971
  path,
1807
- z12.object({
1808
- status: z12.number(),
1972
+ z13.object({
1973
+ status: z13.number(),
1809
1974
  operationId: identifier.optional(),
1810
1975
  result: schema
1811
1976
  }),
@@ -1836,7 +2001,7 @@ function managementClient(options) {
1836
2001
  call
1837
2002
  ),
1838
2003
  ...resourceArchiveMethods("tracker"),
1839
- list: (call) => get("/trackers", z12.array(trackerStatusSchema), call),
2004
+ list: (call) => get("/trackers", z13.array(trackerStatusSchema), call),
1840
2005
  get: (reference, call) => get(
1841
2006
  `/trackers/${identifier.parse(reference)}`,
1842
2007
  trackerStatusSchema,
@@ -1952,7 +2117,7 @@ function managementClient(options) {
1952
2117
  engagementPublishSchema.parse(withActionId(input)),
1953
2118
  call
1954
2119
  ),
1955
- list: (call) => get("/engagement", z12.array(engagementRuleSchema), call),
2120
+ list: (call) => get("/engagement", z13.array(engagementRuleSchema), call),
1956
2121
  page: (input, call) => get(
1957
2122
  "/engagement/history" + queryString(engagementPageQuerySchema.parse(input)),
1958
2123
  engagementPageSchema,
@@ -1973,7 +2138,7 @@ function managementClient(options) {
1973
2138
  },
1974
2139
  pointLedgers: {
1975
2140
  unarchive: (ledger, input, call) => archiveResource("point-ledger", ledger, false, input, call),
1976
- list: (call) => get("/point-ledgers", z12.array(managedPointLedgerSchema), call),
2141
+ list: (call) => get("/point-ledgers", z13.array(managedPointLedgerSchema), call),
1977
2142
  /**
1978
2143
  * Creates a point ledger, with a stable `key` when code refers to it; requires `publish`. In
1979
2144
  * live, only a person in Console can create one.
@@ -2003,7 +2168,7 @@ function managementClient(options) {
2003
2168
  },
2004
2169
  points: {
2005
2170
  /** @deprecated Use `pointLedgers.list()`, which reads the same ledgers. Removed in 2.0.0. */
2006
- ledgers: (call) => get("/point-ledgers", z12.array(managedPointLedgerSchema), call),
2171
+ ledgers: (call) => get("/point-ledgers", z13.array(managedPointLedgerSchema), call),
2007
2172
  /** @deprecated Use `pointLedgers.create(input)`. Removed in 2.0.0. */
2008
2173
  createLedger: createPointLedger,
2009
2174
  /**
@@ -2041,7 +2206,7 @@ function managementClient(options) {
2041
2206
  referralHistorySchema,
2042
2207
  call
2043
2208
  ),
2044
- list: (call) => get("/referrals", z12.array(publishedReferralSchema), call),
2209
+ list: (call) => get("/referrals", z13.array(publishedReferralSchema), call),
2045
2210
  participants: referralParticipants,
2046
2211
  /**
2047
2212
  * Suspends or restores a member's referral relationship, with a reason; requires `publish`.
@@ -2104,7 +2269,7 @@ function managementClient(options) {
2104
2269
  },
2105
2270
  leaderboards: {
2106
2271
  ...resourceArchiveMethods("leaderboard"),
2107
- list: (call) => get("/leaderboards", z12.array(publishedLeaderboardSchema), call),
2272
+ list: (call) => get("/leaderboards", z13.array(publishedLeaderboardSchema), call),
2108
2273
  standings: (board, input = {}, call) => {
2109
2274
  const query = leaderboardQuerySchema.parse(input);
2110
2275
  return get(
@@ -2118,12 +2283,12 @@ function managementClient(options) {
2118
2283
  },
2119
2284
  history: (board, call) => get(
2120
2285
  `/leaderboards/${identifier.parse(board)}/history`,
2121
- z12.array(publishedLeaderboardSchema),
2286
+ z13.array(publishedLeaderboardSchema),
2122
2287
  call
2123
2288
  ),
2124
2289
  exclusions: (board, call) => get(
2125
2290
  `/leaderboards/${identifier.parse(board)}/exclusions`,
2126
- z12.array(z12.object({ member: identifier })),
2291
+ z13.array(z13.object({ member: identifier })),
2127
2292
  call
2128
2293
  ),
2129
2294
  exclude: (board, input, call) => post(
@@ -2164,7 +2329,7 @@ function managementClient(options) {
2164
2329
  ),
2165
2330
  settlements: (board, call) => get(
2166
2331
  `/leaderboards/${identifier.parse(board)}/settlements`,
2167
- z12.array(leaderboardSettlementSummarySchema),
2332
+ z13.array(leaderboardSettlementSummarySchema),
2168
2333
  call
2169
2334
  ),
2170
2335
  settlement: (settlement, call) => get(
@@ -2244,7 +2409,7 @@ function managementClient(options) {
2244
2409
  )
2245
2410
  },
2246
2411
  deployments: {
2247
- list: (call) => get("/deployments", z12.array(deploymentRecordSchema), call),
2412
+ list: (call) => get("/deployments", z13.array(deploymentRecordSchema), call),
2248
2413
  get: (deployment, call) => get(
2249
2414
  `/deployments/${identifier.parse(deployment)}`,
2250
2415
  deploymentRecordSchema,
@@ -2513,7 +2678,7 @@ function managementClient(options) {
2513
2678
  },
2514
2679
  operations: {
2515
2680
  /** Every paused or resumed operation: redemptions and each quest's participation; requires `read`. */
2516
- list: (call) => get("/operations", z12.array(operationSchema), call),
2681
+ list: (call) => get("/operations", z13.array(operationSchema), call),
2517
2682
  /**
2518
2683
  * Pauses or resumes redemptions or one quest's participation, against the `revision` the
2519
2684
  * operator saw, with a reason; requires `publish` permission.
@@ -2562,7 +2727,7 @@ function managementClient(options) {
2562
2727
  call
2563
2728
  ),
2564
2729
  /** Every stock item with its counts and the offers that sell it; requires `read` permission. */
2565
- list: (call) => get("/stock-items", z12.array(managedStockItemSchema), call),
2730
+ list: (call) => get("/stock-items", z13.array(managedStockItemSchema), call),
2566
2731
  createItem: (input, call) => create(
2567
2732
  "/stock-items",
2568
2733
  stockItemSchema,
@@ -2577,7 +2742,7 @@ function managementClient(options) {
2577
2742
  stockInputSchema.parse(withActionId(input)),
2578
2743
  call
2579
2744
  ),
2580
- catalog: (call) => get("/pickup-inventory", z12.array(pickupCatalogSchema), call),
2745
+ catalog: (call) => get("/pickup-inventory", z13.array(pickupCatalogSchema), call),
2581
2746
  configure: (input, call) => post(
2582
2747
  "/pickup-inventory",
2583
2748
  pickupCatalogSchema,
@@ -2603,10 +2768,10 @@ function managementClient(options) {
2603
2768
  offerControlSchema.omit({ enabled: true }).parse(withActionId(input)),
2604
2769
  call
2605
2770
  ),
2606
- list: (call) => get("/offers", z12.array(offerSchema), call),
2771
+ list: (call) => get("/offers", z13.array(offerSchema), call),
2607
2772
  redemptions: (input = {}, call) => get(
2608
2773
  `/redemptions${queryString({ member: input.member })}`,
2609
- z12.array(redemptionSchema),
2774
+ z13.array(redemptionSchema),
2610
2775
  call
2611
2776
  ),
2612
2777
  /** Pauses or resumes an offer at the revision the operator saw. */
@@ -2655,7 +2820,7 @@ function managementClient(options) {
2655
2820
  * them; API keys and project-scoped playground sessions cannot.
2656
2821
  */
2657
2822
  tokens: {
2658
- list: (call) => get("/tokens", z12.array(tokenSchema), call),
2823
+ list: (call) => get("/tokens", z13.array(tokenSchema), call),
2659
2824
  /**
2660
2825
  * Issues a key for one project and environment, limited to permissions the caller holds
2661
2826
  * there. The secret `token` is in this response only.
@@ -2663,14 +2828,14 @@ function managementClient(options) {
2663
2828
  create: (input, call) => post("/tokens", issuedTokenSchema, tokenInputSchema.parse(input), call),
2664
2829
  /** Replace a personal key's ingestion restriction without changing its secret. */
2665
2830
  scope: (id, input, call) => request(
2666
- `/tokens/${encodeURIComponent(z12.string().min(1).parse(id))}/scope`,
2831
+ `/tokens/${encodeURIComponent(z13.string().min(1).parse(id))}/scope`,
2667
2832
  tokenSchema,
2668
2833
  tokenScopeInputSchema.parse(input),
2669
2834
  "PUT",
2670
2835
  call
2671
2836
  ),
2672
2837
  revoke: (id, call) => request(
2673
- `/tokens/${encodeURIComponent(z12.string().min(1).parse(id))}`,
2838
+ `/tokens/${encodeURIComponent(z13.string().min(1).parse(id))}`,
2674
2839
  ok,
2675
2840
  void 0,
2676
2841
  "DELETE",
@@ -2679,7 +2844,7 @@ function managementClient(options) {
2679
2844
  },
2680
2845
  /** Who holds which roles on the client's project; organization administrators only. */
2681
2846
  grants: {
2682
- list: (call) => get("/grants", z12.array(grantRecordSchema), call),
2847
+ list: (call) => get("/grants", z13.array(grantRecordSchema), call),
2683
2848
  /** Replaces one person's roles and environments on the project. The audit log records it. */
2684
2849
  set: (input, call) => request(
2685
2850
  "/grants",
@@ -2696,7 +2861,7 @@ function managementClient(options) {
2696
2861
  /** Signed activity notifications for one project/environment; writes require publish permission. */
2697
2862
  webhooks: {
2698
2863
  state: (id, call) => get(
2699
- `/webhooks/${z12.string().uuid().parse(id)}/state`,
2864
+ `/webhooks/${z13.string().uuid().parse(id)}/state`,
2700
2865
  webhookEndpointStateSchema,
2701
2866
  call
2702
2867
  ),
@@ -2707,24 +2872,24 @@ function managementClient(options) {
2707
2872
  call
2708
2873
  ),
2709
2874
  delete: (id, input, call) => post(
2710
- `/webhooks/${z12.string().uuid().parse(id)}/delete`,
2875
+ `/webhooks/${z13.string().uuid().parse(id)}/delete`,
2711
2876
  webhookEndpointStateSchema,
2712
2877
  webhookDeleteInputSchema.parse(withActionId(input)),
2713
2878
  call
2714
2879
  ),
2715
2880
  pause: (id, input = {}, call) => post(
2716
- `/webhooks/${z12.string().uuid().parse(id)}/pause`,
2881
+ `/webhooks/${z13.string().uuid().parse(id)}/pause`,
2717
2882
  webhookEndpointSchema,
2718
2883
  webhookControlInputSchema.parse(withActionId(input)),
2719
2884
  call
2720
2885
  ),
2721
2886
  resume: (id, input = {}, call) => post(
2722
- `/webhooks/${z12.string().uuid().parse(id)}/resume`,
2887
+ `/webhooks/${z13.string().uuid().parse(id)}/resume`,
2723
2888
  webhookEndpointSchema,
2724
2889
  webhookControlInputSchema.parse(withActionId(input)),
2725
2890
  call
2726
2891
  ),
2727
- list: (call) => get("/webhooks", z12.array(webhookEndpointSchema), call),
2892
+ list: (call) => get("/webhooks", z13.array(webhookEndpointSchema), call),
2728
2893
  create: (input, call) => post(
2729
2894
  "/webhooks",
2730
2895
  webhookSecretSchema,
@@ -2732,7 +2897,7 @@ function managementClient(options) {
2732
2897
  call
2733
2898
  ),
2734
2899
  update: (id, input, call) => request(
2735
- `/webhooks/${z12.string().uuid().parse(id)}`,
2900
+ `/webhooks/${z13.string().uuid().parse(id)}`,
2736
2901
  webhookEndpointSchema,
2737
2902
  webhookUpdateSchema.parse(input),
2738
2903
  "PUT",
@@ -2740,24 +2905,24 @@ function managementClient(options) {
2740
2905
  ),
2741
2906
  /** @deprecated Use pause. Removed in 2.0.0. */
2742
2907
  disable: (id, call) => post(
2743
- `/webhooks/${z12.string().uuid().parse(id)}/disable`,
2908
+ `/webhooks/${z13.string().uuid().parse(id)}/disable`,
2744
2909
  webhookEndpointSchema,
2745
2910
  {},
2746
2911
  call
2747
2912
  ),
2748
2913
  rotateSecret: (id, call) => post(
2749
- `/webhooks/${z12.string().uuid().parse(id)}/rotate-secret`,
2914
+ `/webhooks/${z13.string().uuid().parse(id)}/rotate-secret`,
2750
2915
  webhookSecretSchema,
2751
2916
  {},
2752
2917
  call
2753
2918
  ),
2754
2919
  deliveries: (id, query = {}, call) => get(
2755
- `/webhooks/${z12.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
2920
+ `/webhooks/${z13.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
2756
2921
  webhookDeliveryPageSchema,
2757
2922
  call
2758
2923
  ),
2759
2924
  replay: (id, delivery, call) => post(
2760
- `/webhooks/${z12.string().uuid().parse(id)}/deliveries/${z12.string().uuid().parse(delivery)}/replay`,
2925
+ `/webhooks/${z13.string().uuid().parse(id)}/deliveries/${z13.string().uuid().parse(delivery)}/replay`,
2761
2926
  webhookDeliverySchema,
2762
2927
  {},
2763
2928
  call
@@ -2768,7 +2933,7 @@ function managementClient(options) {
2768
2933
  * environment. Organization administrators, from a Console session only.
2769
2934
  */
2770
2935
  identityIntegrations: {
2771
- list: (call) => get("/identity-integrations", z12.array(identityIntegrationSchema), call),
2936
+ list: (call) => get("/identity-integrations", z13.array(identityIntegrationSchema), call),
2772
2937
  /** The secret `token` is in this response only. */
2773
2938
  create: (input, call) => post(
2774
2939
  "/identity-integrations",
@@ -2778,7 +2943,7 @@ function managementClient(options) {
2778
2943
  ),
2779
2944
  /** Replaces the key's secret and extends it by 90 days; the old secret stops working. */
2780
2945
  rotate: (id, call) => post(
2781
- `/identity-integrations/${z12.string().uuid().parse(id)}/rotate`,
2946
+ `/identity-integrations/${z13.string().uuid().parse(id)}/rotate`,
2782
2947
  identityIntegrationSecretSchema,
2783
2948
  {},
2784
2949
  call
@@ -2790,7 +2955,7 @@ function managementClient(options) {
2790
2955
  */
2791
2956
  kinds: (call) => get(
2792
2957
  "/identity-integrations/kinds",
2793
- z12.array(identityKindClaimSchema),
2958
+ z13.array(identityKindClaimSchema),
2794
2959
  call
2795
2960
  ),
2796
2961
  /**
@@ -2798,8 +2963,8 @@ function managementClient(options) {
2798
2963
  * and keep attributing tracker records; unlink them on the member to stop that.
2799
2964
  */
2800
2965
  revoke: (id, call) => request(
2801
- `/identity-integrations/${z12.string().uuid().parse(id)}`,
2802
- z12.null(),
2966
+ `/identity-integrations/${z13.string().uuid().parse(id)}`,
2967
+ z13.null(),
2803
2968
  void 0,
2804
2969
  "DELETE",
2805
2970
  call
@@ -2850,7 +3015,7 @@ function managementClient(options) {
2850
3015
  resources: {
2851
3016
  list: (call) => get(
2852
3017
  "/resources",
2853
- z12.object({ resources: z12.array(managedResourceSchema) }),
3018
+ z13.object({ resources: z13.array(managedResourceSchema) }),
2854
3019
  call
2855
3020
  ),
2856
3021
  /** @deprecated Use the resource archive/unarchive methods. Removed in 2.0.0. */
@@ -2887,7 +3052,7 @@ function managementClient(options) {
2887
3052
  testMemberCreateSchema.parse(withActionId(input)),
2888
3053
  call
2889
3054
  ),
2890
- list: (call) => get("/test-members", z12.array(testMemberSchema), call),
3055
+ list: (call) => get("/test-members", z13.array(testMemberSchema), call),
2891
3056
  history: (member, query = {}, call) => get(
2892
3057
  `/test-members/${identifier.parse(member)}/history${queryString(testMemberHistoryQuerySchema.parse(query))}`,
2893
3058
  testMemberHistorySchema,
@@ -2969,26 +3134,26 @@ function managementClient(options) {
2969
3134
  /** Who each member is: up to 100 distinct IDs; unknown IDs come back without accounts. */
2970
3135
  people: (members, call) => get(
2971
3136
  `/people${queryString({ ids: members.join(",") })}`,
2972
- z12.array(personSchema),
3137
+ z13.array(personSchema),
2973
3138
  call
2974
3139
  ),
2975
3140
  /** Current X and Discord quest account selections; requires read permission. */
2976
3141
  oauthAccounts: (member, call) => get(
2977
3142
  `/members/${encodeURIComponent(member)}/oauth-accounts`,
2978
- z12.array(managedOAuthAccountSchema),
3143
+ z13.array(managedOAuthAccountSchema),
2979
3144
  call
2980
3145
  ),
2981
3146
  /** Unlinks the reviewed selection across this organization/environment, preserving ownership and sign-in. */
2982
3147
  unlinkOAuthAccount: (member, input, call) => post(
2983
3148
  `/members/${encodeURIComponent(member)}/oauth-accounts/unlink`,
2984
- z12.array(managedOAuthAccountSchema),
3149
+ z13.array(managedOAuthAccountSchema),
2985
3150
  memberOAuthUnlinkInputSchema.parse(input),
2986
3151
  call
2987
3152
  ),
2988
3153
  /** Unlinks a member's wallet from the project with a reason; requires `review` permission. The address stays bound to the member. */
2989
3154
  unlinkWallet: (member, input, call) => post(
2990
3155
  `/members/${encodeURIComponent(member)}/wallets/unlink`,
2991
- z12.array(managedWalletSchema),
3156
+ z13.array(managedWalletSchema),
2992
3157
  memberWalletUnlinkInputSchema.parse(input),
2993
3158
  call
2994
3159
  ),
@@ -2999,14 +3164,14 @@ function managementClient(options) {
2999
3164
  */
3000
3165
  unlinkIdentity: (member, input, call) => post(
3001
3166
  `/members/${encodeURIComponent(member)}/identities/unlink`,
3002
- z12.array(managedMemberIdentitySchema),
3167
+ z13.array(managedMemberIdentitySchema),
3003
3168
  memberIdentityChangeInputSchema.parse(input),
3004
3169
  call
3005
3170
  ),
3006
3171
  /** Relinks an `app:<name>` identity an operator unlinked from this member, with a reason; requires `review` permission. */
3007
3172
  relinkIdentity: (member, input, call) => post(
3008
3173
  `/members/${encodeURIComponent(member)}/identities/relink`,
3009
- z12.array(managedMemberIdentitySchema),
3174
+ z13.array(managedMemberIdentitySchema),
3010
3175
  memberIdentityChangeInputSchema.parse(input),
3011
3176
  call
3012
3177
  ),
@@ -3016,7 +3181,7 @@ function managementClient(options) {
3016
3181
  */
3017
3182
  setWalletSignIn: (member, input, call) => post(
3018
3183
  `/members/${encodeURIComponent(member)}/wallets/sign-in`,
3019
- z12.array(managedWalletSchema),
3184
+ z13.array(managedWalletSchema),
3020
3185
  memberWalletSignInInputSchema.parse(input),
3021
3186
  call
3022
3187
  )
@@ -3043,6 +3208,28 @@ function managementClient(options) {
3043
3208
  * deleting a store need `publish`. Reads never change data, and only a store no serving build
3044
3209
  * declares can be deleted.
3045
3210
  */
3211
+ schedules: {
3212
+ list: (call) => get("/schedules", appScheduleListSchema, call),
3213
+ run: (name, call) => post(
3214
+ `/schedules/${appScheduleNameSchema.parse(name)}/run`,
3215
+ appScheduleListSchema,
3216
+ {},
3217
+ call
3218
+ ),
3219
+ setState: (state2, call) => request(
3220
+ "/schedules/state",
3221
+ appScheduleListSchema,
3222
+ { state: appScheduleStateSchema.parse(state2) },
3223
+ "PUT",
3224
+ call
3225
+ ),
3226
+ recover: (name, input, call) => post(
3227
+ `/schedules/${appScheduleNameSchema.parse(name)}/recover`,
3228
+ appScheduleListSchema,
3229
+ input,
3230
+ call
3231
+ )
3232
+ },
3046
3233
  storage: {
3047
3234
  list: (call) => get("/storage", appStorageListSchema, call),
3048
3235
  /** A SQL store's tables and views, without SQLite's and D1's own. */
@@ -3166,7 +3353,7 @@ function managementClient(options) {
3166
3353
  * Each quest's current release, the most recently published first, archived quests
3167
3354
  * included; requires `read` permission.
3168
3355
  */
3169
- list: (call) => get("/quests/list", z12.array(publishedReleaseSchema), call),
3356
+ list: (call) => get("/quests/list", z13.array(publishedReleaseSchema), call),
3170
3357
  /** Pending and exhausted asynchronous balance checks. Requires read. */
3171
3358
  automaticScheduling: (query = {}, call) => get(
3172
3359
  `/quests/automatic-scheduling${queryString(automaticSchedulingQuerySchema.parse(query))}`,
@@ -3795,6 +3982,9 @@ export {
3795
3982
  APP_MIGRATION_FILE_BYTES,
3796
3983
  APP_MIGRATION_LIMIT,
3797
3984
  APP_MIGRATION_TOTAL_BYTES,
3985
+ APP_SCHEDULE_LIMIT,
3986
+ APP_SCHEDULE_MIN_INTERVAL,
3987
+ APP_SCHEDULE_TIMEOUT,
3798
3988
  APP_SECRET_LIMIT,
3799
3989
  APP_SQL_LIMIT,
3800
3990
  APP_STORAGE_PREVIEW_CHARACTERS,
@@ -3817,6 +4007,13 @@ export {
3817
4007
  addGroupMemberSchema,
3818
4008
  appMigrationNameSchema,
3819
4009
  appRoutingSchema,
4010
+ appScheduleListSchema,
4011
+ appScheduleNameSchema,
4012
+ appSchedulePathSchema,
4013
+ appScheduleRunSchema,
4014
+ appScheduleSchema,
4015
+ appScheduleStateSchema,
4016
+ appSchedulesSchema,
3820
4017
  appSecretDeclarationSchema,
3821
4018
  appSecretDeclarationsSchema,
3822
4019
  appSecretInputSchema,
@@ -3934,6 +4131,7 @@ export {
3934
4131
  memberWalletSignInInputSchema,
3935
4132
  memberWalletUnlinkInputSchema,
3936
4133
  metricsSchema,
4134
+ nextScheduleRun,
3937
4135
  oauthIdentitySelectorSchema,
3938
4136
  operationInputSchema,
3939
4137
  operationSchema,
@@ -3978,6 +4176,7 @@ export {
3978
4176
  resourceLifecycleResultSchema,
3979
4177
  rolePermissions,
3980
4178
  roleSchema,
4179
+ scheduledInvocationSchema,
3981
4180
  sequenceCursorSchema,
3982
4181
  sourceDataSchema,
3983
4182
  sourceRoles,
@@ -4013,6 +4212,7 @@ export {
4013
4212
  updateGroupSchema,
4014
4213
  validateQuestShape,
4015
4214
  verifiedPassSchema,
4215
+ verifyScheduledRequest,
4016
4216
  verifyWebhook,
4017
4217
  walletBalanceChainsSchema,
4018
4218
  walletIdentitySelectorSchema,