@vercel/sdk 1.6.8 → 1.6.10

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 (85) hide show
  1. package/bin/mcp-server.js +310 -118
  2. package/bin/mcp-server.js.map +18 -18
  3. package/docs/sdks/user/README.md +2 -0
  4. package/esm/__tests__/environment.test.js +12 -12
  5. package/esm/__tests__/environment.test.js.map +1 -1
  6. package/esm/__tests__/projects.test.js +13 -15
  7. package/esm/__tests__/projects.test.js.map +1 -1
  8. package/esm/funcs/userListUserEvents.js +1 -0
  9. package/esm/funcs/userListUserEvents.js.map +1 -1
  10. package/esm/lib/config.d.ts +3 -3
  11. package/esm/lib/config.js +3 -3
  12. package/esm/lib/config.js.map +1 -1
  13. package/esm/mcp-server/mcp-server.js +1 -1
  14. package/esm/mcp-server/mcp-server.js.map +1 -1
  15. package/esm/mcp-server/server.js +1 -1
  16. package/esm/mcp-server/server.js.map +1 -1
  17. package/esm/models/authuser.d.ts +3 -3
  18. package/esm/models/authuser.d.ts.map +1 -1
  19. package/esm/models/authuser.js +1 -1
  20. package/esm/models/authuser.js.map +1 -1
  21. package/esm/models/createprojectop.d.ts +6 -0
  22. package/esm/models/createprojectop.d.ts.map +1 -1
  23. package/esm/models/createprojectop.js +2 -0
  24. package/esm/models/createprojectop.js.map +1 -1
  25. package/esm/models/createwebhookop.d.ts +24 -0
  26. package/esm/models/createwebhookop.d.ts.map +1 -1
  27. package/esm/models/createwebhookop.js +8 -0
  28. package/esm/models/createwebhookop.js.map +1 -1
  29. package/esm/models/getbypassipop.d.ts +28 -28
  30. package/esm/models/getbypassipop.d.ts.map +1 -1
  31. package/esm/models/getbypassipop.js +28 -28
  32. package/esm/models/getbypassipop.js.map +1 -1
  33. package/esm/models/getprojectsop.d.ts +6 -0
  34. package/esm/models/getprojectsop.d.ts.map +1 -1
  35. package/esm/models/getprojectsop.js +2 -0
  36. package/esm/models/getprojectsop.js.map +1 -1
  37. package/esm/models/getwebhookop.d.ts +12 -0
  38. package/esm/models/getwebhookop.d.ts.map +1 -1
  39. package/esm/models/getwebhookop.js +4 -0
  40. package/esm/models/getwebhookop.js.map +1 -1
  41. package/esm/models/getwebhooksop.d.ts +24 -0
  42. package/esm/models/getwebhooksop.d.ts.map +1 -1
  43. package/esm/models/getwebhooksop.js +8 -0
  44. package/esm/models/getwebhooksop.js.map +1 -1
  45. package/esm/models/listusereventsop.d.ts +6 -1
  46. package/esm/models/listusereventsop.d.ts.map +1 -1
  47. package/esm/models/listusereventsop.js +2 -0
  48. package/esm/models/listusereventsop.js.map +1 -1
  49. package/esm/models/teamlimited.d.ts +30 -1
  50. package/esm/models/teamlimited.d.ts.map +1 -1
  51. package/esm/models/teamlimited.js +24 -0
  52. package/esm/models/teamlimited.js.map +1 -1
  53. package/esm/models/updateprojectdatacacheop.d.ts +6 -0
  54. package/esm/models/updateprojectdatacacheop.d.ts.map +1 -1
  55. package/esm/models/updateprojectdatacacheop.js +2 -0
  56. package/esm/models/updateprojectdatacacheop.js.map +1 -1
  57. package/esm/models/updateprojectop.d.ts +75 -0
  58. package/esm/models/updateprojectop.d.ts.map +1 -1
  59. package/esm/models/updateprojectop.js +56 -0
  60. package/esm/models/updateprojectop.js.map +1 -1
  61. package/esm/models/userevent.d.ts +361 -114
  62. package/esm/models/userevent.d.ts.map +1 -1
  63. package/esm/models/userevent.js +338 -98
  64. package/esm/models/userevent.js.map +1 -1
  65. package/jsr.json +1 -1
  66. package/package.json +1 -1
  67. package/src/__tests__/environment.test.ts +12 -12
  68. package/src/__tests__/projects.test.ts +13 -15
  69. package/src/funcs/userListUserEvents.ts +1 -0
  70. package/src/lib/config.ts +3 -3
  71. package/src/mcp-server/mcp-server.ts +1 -1
  72. package/src/mcp-server/server.ts +1 -1
  73. package/src/models/authuser.ts +1 -1
  74. package/src/models/createprojectop.ts +2 -0
  75. package/src/models/createwebhookop.ts +8 -0
  76. package/src/models/getbypassipop.ts +56 -56
  77. package/src/models/getprojectsop.ts +2 -0
  78. package/src/models/getwebhookop.ts +4 -0
  79. package/src/models/getwebhooksop.ts +8 -0
  80. package/src/models/listusereventsop.ts +8 -1
  81. package/src/models/teamlimited.ts +34 -1
  82. package/src/models/updateprojectdatacacheop.ts +2 -0
  83. package/src/models/updateprojectop.ts +148 -0
  84. package/src/models/userevent.ts +620 -179
  85. package/vercel-spec.json +282 -87
@@ -8,9 +8,6 @@ import { safeParse } from "../lib/schemas.js";
8
8
  * The type of entity.
9
9
  */
10
10
  export const UserEventType = {
11
- Flag: "flag",
12
- FlagsSegment: "flags-segment",
13
- FlagsSettings: "flags-settings",
14
11
  Author: "author",
15
12
  BitbucketLogin: "bitbucket_login",
16
13
  Bold: "bold",
@@ -22,6 +19,9 @@ export const UserEventType = {
22
19
  HookName: "hook_name",
23
20
  Integration: "integration",
24
21
  EdgeConfig: "edge-config",
22
+ Flag: "flag",
23
+ FlagsSegment: "flags-segment",
24
+ FlagsSettings: "flags-settings",
25
25
  Link: "link",
26
26
  ProjectName: "project_name",
27
27
  ScalingRules: "scaling_rules",
@@ -30,6 +30,18 @@ export const UserEventType = {
30
30
  Store: "store",
31
31
  System: "system",
32
32
  };
33
+ export const UserEventPrincipalType = {
34
+ App: "app",
35
+ };
36
+ export const PrincipalType = {
37
+ User: "user",
38
+ };
39
+ export const UserEventViaType = {
40
+ App: "app",
41
+ };
42
+ export const ViaType = {
43
+ User: "user",
44
+ };
33
45
  export const GrantType = {
34
46
  AuthorizationCode: "authorization_code",
35
47
  RefreshToken: "refresh_token",
@@ -83,11 +95,11 @@ export const StoreType = {
83
95
  Postgres: "postgres",
84
96
  };
85
97
  export const UserEventPayloadType = {
86
- Integration: "integration",
87
- EdgeConfig: "edge-config",
88
98
  Redis: "redis",
89
99
  Postgres: "postgres",
100
+ EdgeConfig: "edge-config",
90
101
  Blob: "blob",
102
+ Integration: "integration",
91
103
  };
92
104
  /**
93
105
  * The budget type
@@ -192,11 +204,11 @@ export const UserEventPayload73Role = {
192
204
  export const PayloadOrigin = {
193
205
  Teams: "teams",
194
206
  Saml: "saml",
195
- Link: "link",
196
207
  Github: "github",
197
208
  Gitlab: "gitlab",
198
209
  Bitbucket: "bitbucket",
199
210
  Mail: "mail",
211
+ Link: "link",
200
212
  Import: "import",
201
213
  Dsync: "dsync",
202
214
  Feedback: "feedback",
@@ -255,6 +267,7 @@ export const PayloadImportFlowGitProvider = {
255
267
  };
256
268
  export const PayloadPurchaseType = {
257
269
  Enhanced: "enhanced",
270
+ Ultra: "ultra",
258
271
  };
259
272
  export const PayloadViewPreference = {
260
273
  Cards: "cards",
@@ -280,7 +293,6 @@ export const PayloadReason = {
280
293
  BlockedForPlatformAbuse: "BLOCKED_FOR_PLATFORM_ABUSE",
281
294
  };
282
295
  export const PayloadBlockedDueToOverageType = {
283
- AiCredits: "aiCredits",
284
296
  AnalyticsUsage: "analyticsUsage",
285
297
  Artifacts: "artifacts",
286
298
  Bandwidth: "bandwidth",
@@ -352,11 +364,11 @@ export const PayloadTeamPermissions = {
352
364
  export const UserEventPayloadOrigin = {
353
365
  Teams: "teams",
354
366
  Saml: "saml",
355
- Link: "link",
356
367
  Github: "github",
357
368
  Gitlab: "gitlab",
358
369
  Bitbucket: "bitbucket",
359
370
  Mail: "mail",
371
+ Link: "link",
360
372
  Import: "import",
361
373
  Dsync: "dsync",
362
374
  Feedback: "feedback",
@@ -413,7 +425,6 @@ export const UserEventPayload62NewOwnerFeatureBlocksBlobBlockReason = {
413
425
  LimitsExceeded: "limits_exceeded",
414
426
  };
415
427
  export const OverageReason = {
416
- AiCredits: "aiCredits",
417
428
  AnalyticsUsage: "analyticsUsage",
418
429
  Artifacts: "artifacts",
419
430
  Bandwidth: "bandwidth",
@@ -462,7 +473,6 @@ export const UserEventPayload62NewOwnerFeatureBlocksPostgresBlockReason = {
462
473
  LimitsExceeded: "limits_exceeded",
463
474
  };
464
475
  export const PayloadOverageReason = {
465
- AiCredits: "aiCredits",
466
476
  AnalyticsUsage: "analyticsUsage",
467
477
  Artifacts: "artifacts",
468
478
  Bandwidth: "bandwidth",
@@ -511,7 +521,6 @@ export const UserEventPayload62NewOwnerFeatureBlocksRedisBlockReason = {
511
521
  LimitsExceeded: "limits_exceeded",
512
522
  };
513
523
  export const UserEventPayloadOverageReason = {
514
- AiCredits: "aiCredits",
515
524
  AnalyticsUsage: "analyticsUsage",
516
525
  Artifacts: "artifacts",
517
526
  Bandwidth: "bandwidth",
@@ -679,17 +688,17 @@ export const User$inboundSchema = z
679
688
  .object({
680
689
  avatar: z.string(),
681
690
  email: z.string(),
691
+ username: z.string(),
682
692
  slug: z.string().optional(),
683
693
  uid: z.string(),
684
- username: z.string(),
685
694
  });
686
695
  /** @internal */
687
696
  export const User$outboundSchema = z.object({
688
697
  avatar: z.string(),
689
698
  email: z.string(),
699
+ username: z.string(),
690
700
  slug: z.string().optional(),
691
701
  uid: z.string(),
692
- username: z.string(),
693
702
  });
694
703
  /**
695
704
  * @internal
@@ -709,6 +718,250 @@ export function userFromJSON(jsonString) {
709
718
  return safeParse(jsonString, (x) => User$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'User' from JSON`);
710
719
  }
711
720
  /** @internal */
721
+ export const UserEventPrincipalType$inboundSchema = z.nativeEnum(UserEventPrincipalType);
722
+ /** @internal */
723
+ export const UserEventPrincipalType$outboundSchema = UserEventPrincipalType$inboundSchema;
724
+ /**
725
+ * @internal
726
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
727
+ */
728
+ export var UserEventPrincipalType$;
729
+ (function (UserEventPrincipalType$) {
730
+ /** @deprecated use `UserEventPrincipalType$inboundSchema` instead. */
731
+ UserEventPrincipalType$.inboundSchema = UserEventPrincipalType$inboundSchema;
732
+ /** @deprecated use `UserEventPrincipalType$outboundSchema` instead. */
733
+ UserEventPrincipalType$.outboundSchema = UserEventPrincipalType$outboundSchema;
734
+ })(UserEventPrincipalType$ || (UserEventPrincipalType$ = {}));
735
+ /** @internal */
736
+ export const Two$inboundSchema = z
737
+ .object({
738
+ type: UserEventPrincipalType$inboundSchema,
739
+ clientId: z.string(),
740
+ name: z.string(),
741
+ });
742
+ /** @internal */
743
+ export const Two$outboundSchema = z
744
+ .object({
745
+ type: UserEventPrincipalType$outboundSchema,
746
+ clientId: z.string(),
747
+ name: z.string(),
748
+ });
749
+ /**
750
+ * @internal
751
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
752
+ */
753
+ export var Two$;
754
+ (function (Two$) {
755
+ /** @deprecated use `Two$inboundSchema` instead. */
756
+ Two$.inboundSchema = Two$inboundSchema;
757
+ /** @deprecated use `Two$outboundSchema` instead. */
758
+ Two$.outboundSchema = Two$outboundSchema;
759
+ })(Two$ || (Two$ = {}));
760
+ export function twoToJSON(two) {
761
+ return JSON.stringify(Two$outboundSchema.parse(two));
762
+ }
763
+ export function twoFromJSON(jsonString) {
764
+ return safeParse(jsonString, (x) => Two$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Two' from JSON`);
765
+ }
766
+ /** @internal */
767
+ export const PrincipalType$inboundSchema = z.nativeEnum(PrincipalType);
768
+ /** @internal */
769
+ export const PrincipalType$outboundSchema = PrincipalType$inboundSchema;
770
+ /**
771
+ * @internal
772
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
773
+ */
774
+ export var PrincipalType$;
775
+ (function (PrincipalType$) {
776
+ /** @deprecated use `PrincipalType$inboundSchema` instead. */
777
+ PrincipalType$.inboundSchema = PrincipalType$inboundSchema;
778
+ /** @deprecated use `PrincipalType$outboundSchema` instead. */
779
+ PrincipalType$.outboundSchema = PrincipalType$outboundSchema;
780
+ })(PrincipalType$ || (PrincipalType$ = {}));
781
+ /** @internal */
782
+ export const One$inboundSchema = z
783
+ .object({
784
+ type: PrincipalType$inboundSchema.optional(),
785
+ avatar: z.string(),
786
+ email: z.string(),
787
+ slug: z.string().optional(),
788
+ uid: z.string(),
789
+ username: z.string(),
790
+ });
791
+ /** @internal */
792
+ export const One$outboundSchema = z
793
+ .object({
794
+ type: PrincipalType$outboundSchema.optional(),
795
+ avatar: z.string(),
796
+ email: z.string(),
797
+ slug: z.string().optional(),
798
+ uid: z.string(),
799
+ username: z.string(),
800
+ });
801
+ /**
802
+ * @internal
803
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
804
+ */
805
+ export var One$;
806
+ (function (One$) {
807
+ /** @deprecated use `One$inboundSchema` instead. */
808
+ One$.inboundSchema = One$inboundSchema;
809
+ /** @deprecated use `One$outboundSchema` instead. */
810
+ One$.outboundSchema = One$outboundSchema;
811
+ })(One$ || (One$ = {}));
812
+ export function oneToJSON(one) {
813
+ return JSON.stringify(One$outboundSchema.parse(one));
814
+ }
815
+ export function oneFromJSON(jsonString) {
816
+ return safeParse(jsonString, (x) => One$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'One' from JSON`);
817
+ }
818
+ /** @internal */
819
+ export const Principal$inboundSchema = z.union([z.lazy(() => Two$inboundSchema), z.lazy(() => One$inboundSchema)]);
820
+ /** @internal */
821
+ export const Principal$outboundSchema = z.union([
822
+ z.lazy(() => Two$outboundSchema),
823
+ z.lazy(() => One$outboundSchema),
824
+ ]);
825
+ /**
826
+ * @internal
827
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
828
+ */
829
+ export var Principal$;
830
+ (function (Principal$) {
831
+ /** @deprecated use `Principal$inboundSchema` instead. */
832
+ Principal$.inboundSchema = Principal$inboundSchema;
833
+ /** @deprecated use `Principal$outboundSchema` instead. */
834
+ Principal$.outboundSchema = Principal$outboundSchema;
835
+ })(Principal$ || (Principal$ = {}));
836
+ export function principalToJSON(principal) {
837
+ return JSON.stringify(Principal$outboundSchema.parse(principal));
838
+ }
839
+ export function principalFromJSON(jsonString) {
840
+ return safeParse(jsonString, (x) => Principal$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Principal' from JSON`);
841
+ }
842
+ /** @internal */
843
+ export const UserEventViaType$inboundSchema = z.nativeEnum(UserEventViaType);
844
+ /** @internal */
845
+ export const UserEventViaType$outboundSchema = UserEventViaType$inboundSchema;
846
+ /**
847
+ * @internal
848
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
849
+ */
850
+ export var UserEventViaType$;
851
+ (function (UserEventViaType$) {
852
+ /** @deprecated use `UserEventViaType$inboundSchema` instead. */
853
+ UserEventViaType$.inboundSchema = UserEventViaType$inboundSchema;
854
+ /** @deprecated use `UserEventViaType$outboundSchema` instead. */
855
+ UserEventViaType$.outboundSchema = UserEventViaType$outboundSchema;
856
+ })(UserEventViaType$ || (UserEventViaType$ = {}));
857
+ /** @internal */
858
+ export const Via2$inboundSchema = z
859
+ .object({
860
+ type: UserEventViaType$inboundSchema,
861
+ clientId: z.string(),
862
+ name: z.string(),
863
+ });
864
+ /** @internal */
865
+ export const Via2$outboundSchema = z.object({
866
+ type: UserEventViaType$outboundSchema,
867
+ clientId: z.string(),
868
+ name: z.string(),
869
+ });
870
+ /**
871
+ * @internal
872
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
873
+ */
874
+ export var Via2$;
875
+ (function (Via2$) {
876
+ /** @deprecated use `Via2$inboundSchema` instead. */
877
+ Via2$.inboundSchema = Via2$inboundSchema;
878
+ /** @deprecated use `Via2$outboundSchema` instead. */
879
+ Via2$.outboundSchema = Via2$outboundSchema;
880
+ })(Via2$ || (Via2$ = {}));
881
+ export function via2ToJSON(via2) {
882
+ return JSON.stringify(Via2$outboundSchema.parse(via2));
883
+ }
884
+ export function via2FromJSON(jsonString) {
885
+ return safeParse(jsonString, (x) => Via2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Via2' from JSON`);
886
+ }
887
+ /** @internal */
888
+ export const ViaType$inboundSchema = z
889
+ .nativeEnum(ViaType);
890
+ /** @internal */
891
+ export const ViaType$outboundSchema = ViaType$inboundSchema;
892
+ /**
893
+ * @internal
894
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
895
+ */
896
+ export var ViaType$;
897
+ (function (ViaType$) {
898
+ /** @deprecated use `ViaType$inboundSchema` instead. */
899
+ ViaType$.inboundSchema = ViaType$inboundSchema;
900
+ /** @deprecated use `ViaType$outboundSchema` instead. */
901
+ ViaType$.outboundSchema = ViaType$outboundSchema;
902
+ })(ViaType$ || (ViaType$ = {}));
903
+ /** @internal */
904
+ export const Via1$inboundSchema = z
905
+ .object({
906
+ type: ViaType$inboundSchema.optional(),
907
+ avatar: z.string(),
908
+ email: z.string(),
909
+ slug: z.string().optional(),
910
+ uid: z.string(),
911
+ username: z.string(),
912
+ });
913
+ /** @internal */
914
+ export const Via1$outboundSchema = z.object({
915
+ type: ViaType$outboundSchema.optional(),
916
+ avatar: z.string(),
917
+ email: z.string(),
918
+ slug: z.string().optional(),
919
+ uid: z.string(),
920
+ username: z.string(),
921
+ });
922
+ /**
923
+ * @internal
924
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
925
+ */
926
+ export var Via1$;
927
+ (function (Via1$) {
928
+ /** @deprecated use `Via1$inboundSchema` instead. */
929
+ Via1$.inboundSchema = Via1$inboundSchema;
930
+ /** @deprecated use `Via1$outboundSchema` instead. */
931
+ Via1$.outboundSchema = Via1$outboundSchema;
932
+ })(Via1$ || (Via1$ = {}));
933
+ export function via1ToJSON(via1) {
934
+ return JSON.stringify(Via1$outboundSchema.parse(via1));
935
+ }
936
+ export function via1FromJSON(jsonString) {
937
+ return safeParse(jsonString, (x) => Via1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Via1' from JSON`);
938
+ }
939
+ /** @internal */
940
+ export const Via$inboundSchema = z.union([z.lazy(() => Via2$inboundSchema), z.lazy(() => Via1$inboundSchema)]);
941
+ /** @internal */
942
+ export const Via$outboundSchema = z
943
+ .union([
944
+ z.lazy(() => Via2$outboundSchema),
945
+ z.lazy(() => Via1$outboundSchema),
946
+ ]);
947
+ /**
948
+ * @internal
949
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
950
+ */
951
+ export var Via$;
952
+ (function (Via$) {
953
+ /** @deprecated use `Via$inboundSchema` instead. */
954
+ Via$.inboundSchema = Via$inboundSchema;
955
+ /** @deprecated use `Via$outboundSchema` instead. */
956
+ Via$.outboundSchema = Via$outboundSchema;
957
+ })(Via$ || (Via$ = {}));
958
+ export function viaToJSON(via) {
959
+ return JSON.stringify(Via$outboundSchema.parse(via));
960
+ }
961
+ export function viaFromJSON(jsonString) {
962
+ return safeParse(jsonString, (x) => Via$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Via' from JSON`);
963
+ }
964
+ /** @internal */
712
965
  export const GrantType$inboundSchema = z
713
966
  .nativeEnum(GrantType);
714
967
  /** @internal */
@@ -7421,35 +7674,6 @@ export function usageAlertsFromJSON(jsonString) {
7421
7674
  return safeParse(jsonString, (x) => UsageAlerts$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UsageAlerts' from JSON`);
7422
7675
  }
7423
7676
  /** @internal */
7424
- export const AiCredits$inboundSchema = z.object({
7425
- currentThreshold: z.number(),
7426
- warningAt: z.nullable(z.number()).optional(),
7427
- blockedAt: z.nullable(z.number()).optional(),
7428
- });
7429
- /** @internal */
7430
- export const AiCredits$outboundSchema = z.object({
7431
- currentThreshold: z.number(),
7432
- warningAt: z.nullable(z.number()).optional(),
7433
- blockedAt: z.nullable(z.number()).optional(),
7434
- });
7435
- /**
7436
- * @internal
7437
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
7438
- */
7439
- export var AiCredits$;
7440
- (function (AiCredits$) {
7441
- /** @deprecated use `AiCredits$inboundSchema` instead. */
7442
- AiCredits$.inboundSchema = AiCredits$inboundSchema;
7443
- /** @deprecated use `AiCredits$outboundSchema` instead. */
7444
- AiCredits$.outboundSchema = AiCredits$outboundSchema;
7445
- })(AiCredits$ || (AiCredits$ = {}));
7446
- export function aiCreditsToJSON(aiCredits) {
7447
- return JSON.stringify(AiCredits$outboundSchema.parse(aiCredits));
7448
- }
7449
- export function aiCreditsFromJSON(jsonString) {
7450
- return safeParse(jsonString, (x) => AiCredits$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AiCredits' from JSON`);
7451
- }
7452
- /** @internal */
7453
7677
  export const AnalyticsUsage$inboundSchema = z.object({
7454
7678
  currentThreshold: z.number(),
7455
7679
  warningAt: z.nullable(z.number()).optional(),
@@ -8669,7 +8893,6 @@ export function webAnalyticsEventFromJSON(jsonString) {
8669
8893
  }
8670
8894
  /** @internal */
8671
8895
  export const OverageUsageAlerts$inboundSchema = z.object({
8672
- aiCredits: z.lazy(() => AiCredits$inboundSchema).optional(),
8673
8896
  analyticsUsage: z.lazy(() => AnalyticsUsage$inboundSchema).optional(),
8674
8897
  artifacts: z.lazy(() => Artifacts$inboundSchema).optional(),
8675
8898
  bandwidth: z.lazy(() => Bandwidth$inboundSchema).optional(),
@@ -8723,7 +8946,6 @@ export const OverageUsageAlerts$inboundSchema = z.object({
8723
8946
  });
8724
8947
  /** @internal */
8725
8948
  export const OverageUsageAlerts$outboundSchema = z.object({
8726
- aiCredits: z.lazy(() => AiCredits$outboundSchema).optional(),
8727
8949
  analyticsUsage: z.lazy(() => AnalyticsUsage$outboundSchema).optional(),
8728
8950
  artifacts: z.lazy(() => Artifacts$outboundSchema).optional(),
8729
8951
  bandwidth: z.lazy(() => Bandwidth$outboundSchema).optional(),
@@ -9874,10 +10096,11 @@ export var UserEventPayloadTarget$;
9874
10096
  })(UserEventPayloadTarget$ || (UserEventPayloadTarget$ = {}));
9875
10097
  /** @internal */
9876
10098
  export const OldEnvVar$inboundSchema = z.object({
9877
- created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
9878
- key: z.string(),
10099
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v))
10100
+ .optional(),
10101
+ key: z.string().optional(),
9879
10102
  ownerId: z.nullable(z.string()).optional(),
9880
- id: z.string(),
10103
+ id: z.string().optional(),
9881
10104
  createdBy: z.nullable(z.string()).optional(),
9882
10105
  deletedBy: z.nullable(z.string()).optional(),
9883
10106
  updatedBy: z.nullable(z.string()).optional(),
@@ -9889,16 +10112,16 @@ export const OldEnvVar$inboundSchema = z.object({
9889
10112
  type: UserEventPayload58OldEnvVarType$inboundSchema.optional(),
9890
10113
  target: z.array(UserEventPayloadTarget$inboundSchema).optional(),
9891
10114
  applyToAllCustomEnvironments: z.boolean().optional(),
9892
- decrypted: z.boolean(),
10115
+ decrypted: z.boolean().optional(),
9893
10116
  comment: z.string().optional(),
9894
10117
  lastEditedByDisplayName: z.string().optional(),
9895
10118
  });
9896
10119
  /** @internal */
9897
10120
  export const OldEnvVar$outboundSchema = z.object({
9898
- created: z.date().transform(v => v.toISOString()),
9899
- key: z.string(),
10121
+ created: z.date().transform(v => v.toISOString()).optional(),
10122
+ key: z.string().optional(),
9900
10123
  ownerId: z.nullable(z.string()).optional(),
9901
- id: z.string(),
10124
+ id: z.string().optional(),
9902
10125
  createdBy: z.nullable(z.string()).optional(),
9903
10126
  deletedBy: z.nullable(z.string()).optional(),
9904
10127
  updatedBy: z.nullable(z.string()).optional(),
@@ -9910,7 +10133,7 @@ export const OldEnvVar$outboundSchema = z.object({
9910
10133
  type: UserEventPayload58OldEnvVarType$outboundSchema.optional(),
9911
10134
  target: z.array(UserEventPayloadTarget$outboundSchema).optional(),
9912
10135
  applyToAllCustomEnvironments: z.boolean().optional(),
9913
- decrypted: z.boolean(),
10136
+ decrypted: z.boolean().optional(),
9914
10137
  comment: z.string().optional(),
9915
10138
  lastEditedByDisplayName: z.string().optional(),
9916
10139
  });
@@ -9963,10 +10186,11 @@ export var UserEventPayload58Target$;
9963
10186
  })(UserEventPayload58Target$ || (UserEventPayload58Target$ = {}));
9964
10187
  /** @internal */
9965
10188
  export const NewEnvVar$inboundSchema = z.object({
9966
- created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
9967
- key: z.string(),
10189
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v))
10190
+ .optional(),
10191
+ key: z.string().optional(),
9968
10192
  ownerId: z.nullable(z.string()).optional(),
9969
- id: z.string(),
10193
+ id: z.string().optional(),
9970
10194
  createdBy: z.nullable(z.string()).optional(),
9971
10195
  deletedBy: z.nullable(z.string()).optional(),
9972
10196
  updatedBy: z.nullable(z.string()).optional(),
@@ -9978,16 +10202,16 @@ export const NewEnvVar$inboundSchema = z.object({
9978
10202
  type: UserEventPayload58Type$inboundSchema.optional(),
9979
10203
  target: z.array(UserEventPayload58Target$inboundSchema).optional(),
9980
10204
  applyToAllCustomEnvironments: z.boolean().optional(),
9981
- decrypted: z.boolean(),
10205
+ decrypted: z.boolean().optional(),
9982
10206
  comment: z.string().optional(),
9983
10207
  lastEditedByDisplayName: z.string().optional(),
9984
10208
  });
9985
10209
  /** @internal */
9986
10210
  export const NewEnvVar$outboundSchema = z.object({
9987
- created: z.date().transform(v => v.toISOString()),
9988
- key: z.string(),
10211
+ created: z.date().transform(v => v.toISOString()).optional(),
10212
+ key: z.string().optional(),
9989
10213
  ownerId: z.nullable(z.string()).optional(),
9990
- id: z.string(),
10214
+ id: z.string().optional(),
9991
10215
  createdBy: z.nullable(z.string()).optional(),
9992
10216
  deletedBy: z.nullable(z.string()).optional(),
9993
10217
  updatedBy: z.nullable(z.string()).optional(),
@@ -9999,7 +10223,7 @@ export const NewEnvVar$outboundSchema = z.object({
9999
10223
  type: UserEventPayload58Type$outboundSchema.optional(),
10000
10224
  target: z.array(UserEventPayload58Target$outboundSchema).optional(),
10001
10225
  applyToAllCustomEnvironments: z.boolean().optional(),
10002
- decrypted: z.boolean(),
10226
+ decrypted: z.boolean().optional(),
10003
10227
  comment: z.string().optional(),
10004
10228
  lastEditedByDisplayName: z.string().optional(),
10005
10229
  });
@@ -12781,16 +13005,14 @@ export var Action$;
12781
13005
  Action$.outboundSchema = Action$outboundSchema;
12782
13006
  })(Action$ || (Action$ = {}));
12783
13007
  /** @internal */
12784
- export const Two$inboundSchema = z
12785
- .object({
13008
+ export const Payload2$inboundSchema = z.object({
12786
13009
  action: Action$inboundSchema,
12787
13010
  id: z.string(),
12788
13011
  slug: z.string(),
12789
13012
  projectId: z.string(),
12790
13013
  });
12791
13014
  /** @internal */
12792
- export const Two$outboundSchema = z
12793
- .object({
13015
+ export const Payload2$outboundSchema = z.object({
12794
13016
  action: Action$outboundSchema,
12795
13017
  id: z.string(),
12796
13018
  slug: z.string(),
@@ -12800,45 +13022,43 @@ export const Two$outboundSchema = z
12800
13022
  * @internal
12801
13023
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
12802
13024
  */
12803
- export var Two$;
12804
- (function (Two$) {
12805
- /** @deprecated use `Two$inboundSchema` instead. */
12806
- Two$.inboundSchema = Two$inboundSchema;
12807
- /** @deprecated use `Two$outboundSchema` instead. */
12808
- Two$.outboundSchema = Two$outboundSchema;
12809
- })(Two$ || (Two$ = {}));
12810
- export function twoToJSON(two) {
12811
- return JSON.stringify(Two$outboundSchema.parse(two));
13025
+ export var Payload2$;
13026
+ (function (Payload2$) {
13027
+ /** @deprecated use `Payload2$inboundSchema` instead. */
13028
+ Payload2$.inboundSchema = Payload2$inboundSchema;
13029
+ /** @deprecated use `Payload2$outboundSchema` instead. */
13030
+ Payload2$.outboundSchema = Payload2$outboundSchema;
13031
+ })(Payload2$ || (Payload2$ = {}));
13032
+ export function payload2ToJSON(payload2) {
13033
+ return JSON.stringify(Payload2$outboundSchema.parse(payload2));
12812
13034
  }
12813
- export function twoFromJSON(jsonString) {
12814
- return safeParse(jsonString, (x) => Two$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Two' from JSON`);
13035
+ export function payload2FromJSON(jsonString) {
13036
+ return safeParse(jsonString, (x) => Payload2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Payload2' from JSON`);
12815
13037
  }
12816
13038
  /** @internal */
12817
- export const One$inboundSchema = z
12818
- .object({});
13039
+ export const Payload1$inboundSchema = z.object({});
12819
13040
  /** @internal */
12820
- export const One$outboundSchema = z
12821
- .object({});
13041
+ export const Payload1$outboundSchema = z.object({});
12822
13042
  /**
12823
13043
  * @internal
12824
13044
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
12825
13045
  */
12826
- export var One$;
12827
- (function (One$) {
12828
- /** @deprecated use `One$inboundSchema` instead. */
12829
- One$.inboundSchema = One$inboundSchema;
12830
- /** @deprecated use `One$outboundSchema` instead. */
12831
- One$.outboundSchema = One$outboundSchema;
12832
- })(One$ || (One$ = {}));
12833
- export function oneToJSON(one) {
12834
- return JSON.stringify(One$outboundSchema.parse(one));
13046
+ export var Payload1$;
13047
+ (function (Payload1$) {
13048
+ /** @deprecated use `Payload1$inboundSchema` instead. */
13049
+ Payload1$.inboundSchema = Payload1$inboundSchema;
13050
+ /** @deprecated use `Payload1$outboundSchema` instead. */
13051
+ Payload1$.outboundSchema = Payload1$outboundSchema;
13052
+ })(Payload1$ || (Payload1$ = {}));
13053
+ export function payload1ToJSON(payload1) {
13054
+ return JSON.stringify(Payload1$outboundSchema.parse(payload1));
12835
13055
  }
12836
- export function oneFromJSON(jsonString) {
12837
- return safeParse(jsonString, (x) => One$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'One' from JSON`);
13056
+ export function payload1FromJSON(jsonString) {
13057
+ return safeParse(jsonString, (x) => Payload1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Payload1' from JSON`);
12838
13058
  }
12839
13059
  /** @internal */
12840
13060
  export const Payload$inboundSchema = z.union([
12841
- z.lazy(() => One$inboundSchema),
13061
+ z.lazy(() => Payload1$inboundSchema),
12842
13062
  z.lazy(() => Three$inboundSchema),
12843
13063
  z.lazy(() => Nine$inboundSchema),
12844
13064
  z.lazy(() => Nineteen$inboundSchema),
@@ -12943,7 +13163,7 @@ export const Payload$inboundSchema = z.union([
12943
13163
  z.lazy(() => OneHundredAndThirtyEight$inboundSchema),
12944
13164
  z.lazy(() => OneHundredAndFortyFive$inboundSchema),
12945
13165
  z.lazy(() => OneHundredAndFortySix$inboundSchema),
12946
- z.lazy(() => Two$inboundSchema),
13166
+ z.lazy(() => Payload2$inboundSchema),
12947
13167
  z.lazy(() => Six$inboundSchema),
12948
13168
  z.lazy(() => Eleven$inboundSchema),
12949
13169
  z.lazy(() => Fifteen$inboundSchema),
@@ -12989,7 +13209,7 @@ export const Payload$inboundSchema = z.union([
12989
13209
  ]);
12990
13210
  /** @internal */
12991
13211
  export const Payload$outboundSchema = z.union([
12992
- z.lazy(() => One$outboundSchema),
13212
+ z.lazy(() => Payload1$outboundSchema),
12993
13213
  z.lazy(() => Three$outboundSchema),
12994
13214
  z.lazy(() => Nine$outboundSchema),
12995
13215
  z.lazy(() => Nineteen$outboundSchema),
@@ -13094,7 +13314,7 @@ export const Payload$outboundSchema = z.union([
13094
13314
  z.lazy(() => OneHundredAndThirtyEight$outboundSchema),
13095
13315
  z.lazy(() => OneHundredAndFortyFive$outboundSchema),
13096
13316
  z.lazy(() => OneHundredAndFortySix$outboundSchema),
13097
- z.lazy(() => Two$outboundSchema),
13317
+ z.lazy(() => Payload2$outboundSchema),
13098
13318
  z.lazy(() => Six$outboundSchema),
13099
13319
  z.lazy(() => Eleven$outboundSchema),
13100
13320
  z.lazy(() => Fifteen$outboundSchema),
@@ -13162,9 +13382,19 @@ export const UserEvent$inboundSchema = z.object({
13162
13382
  entities: z.array(z.lazy(() => Entities$inboundSchema)),
13163
13383
  createdAt: z.number(),
13164
13384
  user: z.lazy(() => User$inboundSchema).optional(),
13385
+ principal: z.union([
13386
+ z.lazy(() => Two$inboundSchema),
13387
+ z.lazy(() => One$inboundSchema),
13388
+ ]).optional(),
13389
+ via: z.array(z.union([
13390
+ z.lazy(() => Via2$inboundSchema),
13391
+ z.lazy(() => Via1$inboundSchema),
13392
+ ])).optional(),
13165
13393
  userId: z.string(),
13394
+ principalId: z.string(),
13395
+ viaIds: z.array(z.string()).optional(),
13166
13396
  payload: z.union([
13167
- z.lazy(() => One$inboundSchema),
13397
+ z.lazy(() => Payload1$inboundSchema),
13168
13398
  z.lazy(() => Three$inboundSchema),
13169
13399
  z.lazy(() => Nine$inboundSchema),
13170
13400
  z.lazy(() => Nineteen$inboundSchema),
@@ -13269,7 +13499,7 @@ export const UserEvent$inboundSchema = z.object({
13269
13499
  z.lazy(() => OneHundredAndThirtyEight$inboundSchema),
13270
13500
  z.lazy(() => OneHundredAndFortyFive$inboundSchema),
13271
13501
  z.lazy(() => OneHundredAndFortySix$inboundSchema),
13272
- z.lazy(() => Two$inboundSchema),
13502
+ z.lazy(() => Payload2$inboundSchema),
13273
13503
  z.lazy(() => Six$inboundSchema),
13274
13504
  z.lazy(() => Eleven$inboundSchema),
13275
13505
  z.lazy(() => Fifteen$inboundSchema),
@@ -13321,9 +13551,19 @@ export const UserEvent$outboundSchema = z.object({
13321
13551
  entities: z.array(z.lazy(() => Entities$outboundSchema)),
13322
13552
  createdAt: z.number(),
13323
13553
  user: z.lazy(() => User$outboundSchema).optional(),
13554
+ principal: z.union([
13555
+ z.lazy(() => Two$outboundSchema),
13556
+ z.lazy(() => One$outboundSchema),
13557
+ ]).optional(),
13558
+ via: z.array(z.union([
13559
+ z.lazy(() => Via2$outboundSchema),
13560
+ z.lazy(() => Via1$outboundSchema),
13561
+ ])).optional(),
13324
13562
  userId: z.string(),
13563
+ principalId: z.string(),
13564
+ viaIds: z.array(z.string()).optional(),
13325
13565
  payload: z.union([
13326
- z.lazy(() => One$outboundSchema),
13566
+ z.lazy(() => Payload1$outboundSchema),
13327
13567
  z.lazy(() => Three$outboundSchema),
13328
13568
  z.lazy(() => Nine$outboundSchema),
13329
13569
  z.lazy(() => Nineteen$outboundSchema),
@@ -13428,7 +13668,7 @@ export const UserEvent$outboundSchema = z.object({
13428
13668
  z.lazy(() => OneHundredAndThirtyEight$outboundSchema),
13429
13669
  z.lazy(() => OneHundredAndFortyFive$outboundSchema),
13430
13670
  z.lazy(() => OneHundredAndFortySix$outboundSchema),
13431
- z.lazy(() => Two$outboundSchema),
13671
+ z.lazy(() => Payload2$outboundSchema),
13432
13672
  z.lazy(() => Six$outboundSchema),
13433
13673
  z.lazy(() => Eleven$outboundSchema),
13434
13674
  z.lazy(() => Fifteen$outboundSchema),