@vercel/sdk 1.6.9 → 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 (86) hide show
  1. package/bin/mcp-server.js +250 -61
  2. package/bin/mcp-server.js.map +20 -20
  3. package/docs/sdks/user/README.md +2 -0
  4. package/esm/funcs/userListUserEvents.js +1 -0
  5. package/esm/funcs/userListUserEvents.js.map +1 -1
  6. package/esm/lib/config.d.ts +2 -2
  7. package/esm/lib/config.js +2 -2
  8. package/esm/lib/config.js.map +1 -1
  9. package/esm/mcp-server/mcp-server.js +1 -1
  10. package/esm/mcp-server/mcp-server.js.map +1 -1
  11. package/esm/mcp-server/server.js +1 -1
  12. package/esm/mcp-server/server.js.map +1 -1
  13. package/esm/models/authuser.d.ts +3 -0
  14. package/esm/models/authuser.d.ts.map +1 -1
  15. package/esm/models/authuser.js +1 -0
  16. package/esm/models/authuser.js.map +1 -1
  17. package/esm/models/createprojectenvop.d.ts +6 -6
  18. package/esm/models/createprojectenvop.js +2 -2
  19. package/esm/models/createprojectenvop.js.map +1 -1
  20. package/esm/models/createprojectop.d.ts +15 -9
  21. package/esm/models/createprojectop.d.ts.map +1 -1
  22. package/esm/models/createprojectop.js +5 -3
  23. package/esm/models/createprojectop.js.map +1 -1
  24. package/esm/models/createwebhookop.d.ts +24 -0
  25. package/esm/models/createwebhookop.d.ts.map +1 -1
  26. package/esm/models/createwebhookop.js +8 -0
  27. package/esm/models/createwebhookop.js.map +1 -1
  28. package/esm/models/editprojectenvop.d.ts +3 -3
  29. package/esm/models/editprojectenvop.js +1 -1
  30. package/esm/models/editprojectenvop.js.map +1 -1
  31. package/esm/models/getprojectsop.d.ts +6 -0
  32. package/esm/models/getprojectsop.d.ts.map +1 -1
  33. package/esm/models/getprojectsop.js +2 -0
  34. package/esm/models/getprojectsop.js.map +1 -1
  35. package/esm/models/getwebhookop.d.ts +12 -0
  36. package/esm/models/getwebhookop.d.ts.map +1 -1
  37. package/esm/models/getwebhookop.js +4 -0
  38. package/esm/models/getwebhookop.js.map +1 -1
  39. package/esm/models/getwebhooksop.d.ts +24 -0
  40. package/esm/models/getwebhooksop.d.ts.map +1 -1
  41. package/esm/models/getwebhooksop.js +8 -0
  42. package/esm/models/getwebhooksop.js.map +1 -1
  43. package/esm/models/listusereventsop.d.ts +6 -1
  44. package/esm/models/listusereventsop.d.ts.map +1 -1
  45. package/esm/models/listusereventsop.js +2 -0
  46. package/esm/models/listusereventsop.js.map +1 -1
  47. package/esm/models/removeprojectenvop.d.ts +9 -9
  48. package/esm/models/removeprojectenvop.js +3 -3
  49. package/esm/models/removeprojectenvop.js.map +1 -1
  50. package/esm/models/teamlimited.d.ts +30 -1
  51. package/esm/models/teamlimited.d.ts.map +1 -1
  52. package/esm/models/teamlimited.js +24 -0
  53. package/esm/models/teamlimited.js.map +1 -1
  54. package/esm/models/updateprojectdatacacheop.d.ts +6 -0
  55. package/esm/models/updateprojectdatacacheop.d.ts.map +1 -1
  56. package/esm/models/updateprojectdatacacheop.js +2 -0
  57. package/esm/models/updateprojectdatacacheop.js.map +1 -1
  58. package/esm/models/updateprojectop.d.ts +15 -9
  59. package/esm/models/updateprojectop.d.ts.map +1 -1
  60. package/esm/models/updateprojectop.js +5 -3
  61. package/esm/models/updateprojectop.js.map +1 -1
  62. package/esm/models/userevent.d.ts +324 -34
  63. package/esm/models/userevent.d.ts.map +1 -1
  64. package/esm/models/userevent.js +313 -40
  65. package/esm/models/userevent.js.map +1 -1
  66. package/jsr.json +1 -1
  67. package/package.json +1 -1
  68. package/src/funcs/userListUserEvents.ts +1 -0
  69. package/src/lib/config.ts +2 -2
  70. package/src/mcp-server/mcp-server.ts +1 -1
  71. package/src/mcp-server/server.ts +1 -1
  72. package/src/models/authuser.ts +1 -0
  73. package/src/models/createprojectenvop.ts +2 -2
  74. package/src/models/createprojectop.ts +5 -3
  75. package/src/models/createwebhookop.ts +8 -0
  76. package/src/models/editprojectenvop.ts +1 -1
  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/removeprojectenvop.ts +3 -3
  82. package/src/models/teamlimited.ts +34 -1
  83. package/src/models/updateprojectdatacacheop.ts +2 -0
  84. package/src/models/updateprojectop.ts +5 -3
  85. package/src/models/userevent.ts +579 -70
  86. package/vercel-spec.json +256 -45
@@ -59,9 +59,73 @@ export type Entities = {
59
59
  };
60
60
 
61
61
  /**
62
- * Metadata for the User who generated the event.
62
+ * Metadata for {@link userId}.
63
63
  */
64
64
  export type User = {
65
+ avatar: string;
66
+ email: string;
67
+ username: string;
68
+ slug?: string | undefined;
69
+ uid: string;
70
+ };
71
+
72
+ export const UserEventPrincipalType = {
73
+ App: "app",
74
+ } as const;
75
+ export type UserEventPrincipalType = ClosedEnum<typeof UserEventPrincipalType>;
76
+
77
+ /**
78
+ * Metadata for {@link principalId}.
79
+ */
80
+ export type Two = {
81
+ type: UserEventPrincipalType;
82
+ clientId: string;
83
+ name: string;
84
+ };
85
+
86
+ export const PrincipalType = {
87
+ User: "user",
88
+ } as const;
89
+ export type PrincipalType = ClosedEnum<typeof PrincipalType>;
90
+
91
+ /**
92
+ * Metadata for {@link principalId}.
93
+ */
94
+ export type One = {
95
+ type?: PrincipalType | undefined;
96
+ avatar: string;
97
+ email: string;
98
+ slug?: string | undefined;
99
+ uid: string;
100
+ username: string;
101
+ };
102
+
103
+ export type Principal = Two | One;
104
+
105
+ export const UserEventViaType = {
106
+ App: "app",
107
+ } as const;
108
+ export type UserEventViaType = ClosedEnum<typeof UserEventViaType>;
109
+
110
+ /**
111
+ * Metadata for {@link viaIds}.
112
+ */
113
+ export type Via2 = {
114
+ type: UserEventViaType;
115
+ clientId: string;
116
+ name: string;
117
+ };
118
+
119
+ export const ViaType = {
120
+ User: "user",
121
+ } as const;
122
+ export type ViaType = ClosedEnum<typeof ViaType>;
123
+
124
+ /**
125
+ * Metadata for {@link viaIds}.
126
+ */
127
+ export type Via1 = {
128
+ type?: ViaType | undefined;
65
129
  avatar: string;
66
130
  email: string;
67
131
  slug?: string | undefined;
@@ -69,6 +133,8 @@ export type User = {
69
133
  username: string;
70
134
  };
71
135
 
136
+ export type Via = Via2 | Via1;
137
+
72
138
  export const GrantType = {
73
139
  AuthorizationCode: "authorization_code",
74
140
  RefreshToken: "refresh_token",
@@ -1908,6 +1974,7 @@ export type PayloadBuildEntitlements = {
1908
1974
 
1909
1975
  export const PayloadPurchaseType = {
1910
1976
  Enhanced: "enhanced",
1977
+ Ultra: "ultra",
1911
1978
  } as const;
1912
1979
  export type PayloadPurchaseType = ClosedEnum<typeof PayloadPurchaseType>;
1913
1980
 
@@ -4073,7 +4140,7 @@ export type Action = ClosedEnum<typeof Action>;
4073
4140
  /**
4074
4141
  * The payload of the event, if requested.
4075
4142
  */
4076
- export type Two = {
4143
+ export type Payload2 = {
4077
4144
  action: Action;
4078
4145
  id: string;
4079
4146
  slug: string;
@@ -4083,10 +4150,10 @@ export type Two = {
4083
4150
  /**
4084
4151
  * The payload of the event, if requested.
4085
4152
  */
4086
- export type One = {};
4153
+ export type Payload1 = {};
4087
4154
 
4088
4155
  export type Payload =
4089
- | One
4156
+ | Payload1
4090
4157
  | Three
4091
4158
  | Nine
4092
4159
  | Nineteen
@@ -4191,7 +4258,7 @@ export type Payload =
4191
4258
  | OneHundredAndThirtyEight
4192
4259
  | OneHundredAndFortyFive
4193
4260
  | OneHundredAndFortySix
4194
- | Two
4261
+ | Payload2
4195
4262
  | Six
4196
4263
  | Eleven
4197
4264
  | Fifteen
@@ -4256,15 +4323,28 @@ export type UserEvent = {
4256
4323
  */
4257
4324
  createdAt: number;
4258
4325
  /**
4259
- * Metadata for the User who generated the event.
4326
+ * Metadata for {@link userId}.
4260
4327
  */
4261
4328
  user?: User | undefined;
4329
+ principal?: Two | One | undefined;
4330
+ /**
4331
+ * Metadata for {@link viaIds}.
4332
+ */
4333
+ via?: Array<Via2 | Via1> | undefined;
4262
4334
  /**
4263
- * The unique identifier of the User who generated the event.
4335
+ * When the principal who generated the event is a user, this is their ID; otherwise, it is empty.
4264
4336
  */
4265
4337
  userId: string;
4338
+ /**
4339
+ * The ID of the principal who generated the event. The principal is typically a user, but it could also be an app, an integration, etc. The principal may have delegated its authority to an acting party, and so {@link viaIds} should be checked as well.
4340
+ */
4341
+ principalId: string;
4342
+ /**
4343
+ * If the principal delegated its authority (for example, a user delegating to an app), then this array contains the ID of the current actor. For example, if `principalId` is "user123" and `viaIds` is `["app456"]`, we can say the event was triggered by - "app456 on behalf of user123", or - "user123 via app4556". Both are equivalent. Arbitrarily long chains of delegation can be represented. For example, if `principalId` is "user123" and `viaIds` is `["service1", "service2"]`, we can say the event was triggered by "user123 via service1 via service2".
4344
+ */
4345
+ viaIds?: Array<string> | undefined;
4266
4346
  payload?:
4267
- | One
4347
+ | Payload1
4268
4348
  | Three
4269
4349
  | Nine
4270
4350
  | Nineteen
@@ -4369,7 +4449,7 @@ export type UserEvent = {
4369
4449
  | OneHundredAndThirtyEight
4370
4450
  | OneHundredAndFortyFive
4371
4451
  | OneHundredAndFortySix
4372
- | Two
4452
+ | Payload2
4373
4453
  | Six
4374
4454
  | Eleven
4375
4455
  | Fifteen
@@ -4497,18 +4577,18 @@ export const User$inboundSchema: z.ZodType<User, z.ZodTypeDef, unknown> = z
4497
4577
  .object({
4498
4578
  avatar: z.string(),
4499
4579
  email: z.string(),
4580
+ username: z.string(),
4500
4581
  slug: z.string().optional(),
4501
4582
  uid: z.string(),
4502
- username: z.string(),
4503
4583
  });
4504
4584
 
4505
4585
  /** @internal */
4506
4586
  export type User$Outbound = {
4507
4587
  avatar: string;
4508
4588
  email: string;
4589
+ username: string;
4509
4590
  slug?: string | undefined;
4510
4591
  uid: string;
4511
- username: string;
4512
4592
  };
4513
4593
 
4514
4594
  /** @internal */
@@ -4516,9 +4596,9 @@ export const User$outboundSchema: z.ZodType<User$Outbound, z.ZodTypeDef, User> =
4516
4596
  z.object({
4517
4597
  avatar: z.string(),
4518
4598
  email: z.string(),
4599
+ username: z.string(),
4519
4600
  slug: z.string().optional(),
4520
4601
  uid: z.string(),
4521
- username: z.string(),
4522
4602
  });
4523
4603
 
4524
4604
  /**
@@ -4548,6 +4628,395 @@ export function userFromJSON(
4548
4628
  );
4549
4629
  }
4550
4630
 
4631
+ /** @internal */
4632
+ export const UserEventPrincipalType$inboundSchema: z.ZodNativeEnum<
4633
+ typeof UserEventPrincipalType
4634
+ > = z.nativeEnum(UserEventPrincipalType);
4635
+
4636
+ /** @internal */
4637
+ export const UserEventPrincipalType$outboundSchema: z.ZodNativeEnum<
4638
+ typeof UserEventPrincipalType
4639
+ > = UserEventPrincipalType$inboundSchema;
4640
+
4641
+ /**
4642
+ * @internal
4643
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
4644
+ */
4645
+ export namespace UserEventPrincipalType$ {
4646
+ /** @deprecated use `UserEventPrincipalType$inboundSchema` instead. */
4647
+ export const inboundSchema = UserEventPrincipalType$inboundSchema;
4648
+ /** @deprecated use `UserEventPrincipalType$outboundSchema` instead. */
4649
+ export const outboundSchema = UserEventPrincipalType$outboundSchema;
4650
+ }
4651
+
4652
+ /** @internal */
4653
+ export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z
4654
+ .object({
4655
+ type: UserEventPrincipalType$inboundSchema,
4656
+ clientId: z.string(),
4657
+ name: z.string(),
4658
+ });
4659
+
4660
+ /** @internal */
4661
+ export type Two$Outbound = {
4662
+ type: string;
4663
+ clientId: string;
4664
+ name: string;
4665
+ };
4666
+
4667
+ /** @internal */
4668
+ export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
4669
+ .object({
4670
+ type: UserEventPrincipalType$outboundSchema,
4671
+ clientId: z.string(),
4672
+ name: z.string(),
4673
+ });
4674
+
4675
+ /**
4676
+ * @internal
4677
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
4678
+ */
4679
+ export namespace Two$ {
4680
+ /** @deprecated use `Two$inboundSchema` instead. */
4681
+ export const inboundSchema = Two$inboundSchema;
4682
+ /** @deprecated use `Two$outboundSchema` instead. */
4683
+ export const outboundSchema = Two$outboundSchema;
4684
+ /** @deprecated use `Two$Outbound` instead. */
4685
+ export type Outbound = Two$Outbound;
4686
+ }
4687
+
4688
+ export function twoToJSON(two: Two): string {
4689
+ return JSON.stringify(Two$outboundSchema.parse(two));
4690
+ }
4691
+
4692
+ export function twoFromJSON(
4693
+ jsonString: string,
4694
+ ): SafeParseResult<Two, SDKValidationError> {
4695
+ return safeParse(
4696
+ jsonString,
4697
+ (x) => Two$inboundSchema.parse(JSON.parse(x)),
4698
+ `Failed to parse 'Two' from JSON`,
4699
+ );
4700
+ }
4701
+
4702
+ /** @internal */
4703
+ export const PrincipalType$inboundSchema: z.ZodNativeEnum<
4704
+ typeof PrincipalType
4705
+ > = z.nativeEnum(PrincipalType);
4706
+
4707
+ /** @internal */
4708
+ export const PrincipalType$outboundSchema: z.ZodNativeEnum<
4709
+ typeof PrincipalType
4710
+ > = PrincipalType$inboundSchema;
4711
+
4712
+ /**
4713
+ * @internal
4714
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
4715
+ */
4716
+ export namespace PrincipalType$ {
4717
+ /** @deprecated use `PrincipalType$inboundSchema` instead. */
4718
+ export const inboundSchema = PrincipalType$inboundSchema;
4719
+ /** @deprecated use `PrincipalType$outboundSchema` instead. */
4720
+ export const outboundSchema = PrincipalType$outboundSchema;
4721
+ }
4722
+
4723
+ /** @internal */
4724
+ export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z
4725
+ .object({
4726
+ type: PrincipalType$inboundSchema.optional(),
4727
+ avatar: z.string(),
4728
+ email: z.string(),
4729
+ slug: z.string().optional(),
4730
+ uid: z.string(),
4731
+ username: z.string(),
4732
+ });
4733
+
4734
+ /** @internal */
4735
+ export type One$Outbound = {
4736
+ type?: string | undefined;
4737
+ avatar: string;
4738
+ email: string;
4739
+ slug?: string | undefined;
4740
+ uid: string;
4741
+ username: string;
4742
+ };
4743
+
4744
+ /** @internal */
4745
+ export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
4746
+ .object({
4747
+ type: PrincipalType$outboundSchema.optional(),
4748
+ avatar: z.string(),
4749
+ email: z.string(),
4750
+ slug: z.string().optional(),
4751
+ uid: z.string(),
4752
+ username: z.string(),
4753
+ });
4754
+
4755
+ /**
4756
+ * @internal
4757
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
4758
+ */
4759
+ export namespace One$ {
4760
+ /** @deprecated use `One$inboundSchema` instead. */
4761
+ export const inboundSchema = One$inboundSchema;
4762
+ /** @deprecated use `One$outboundSchema` instead. */
4763
+ export const outboundSchema = One$outboundSchema;
4764
+ /** @deprecated use `One$Outbound` instead. */
4765
+ export type Outbound = One$Outbound;
4766
+ }
4767
+
4768
+ export function oneToJSON(one: One): string {
4769
+ return JSON.stringify(One$outboundSchema.parse(one));
4770
+ }
4771
+
4772
+ export function oneFromJSON(
4773
+ jsonString: string,
4774
+ ): SafeParseResult<One, SDKValidationError> {
4775
+ return safeParse(
4776
+ jsonString,
4777
+ (x) => One$inboundSchema.parse(JSON.parse(x)),
4778
+ `Failed to parse 'One' from JSON`,
4779
+ );
4780
+ }
4781
+
4782
+ /** @internal */
4783
+ export const Principal$inboundSchema: z.ZodType<
4784
+ Principal,
4785
+ z.ZodTypeDef,
4786
+ unknown
4787
+ > = z.union([z.lazy(() => Two$inboundSchema), z.lazy(() => One$inboundSchema)]);
4788
+
4789
+ /** @internal */
4790
+ export type Principal$Outbound = Two$Outbound | One$Outbound;
4791
+
4792
+ /** @internal */
4793
+ export const Principal$outboundSchema: z.ZodType<
4794
+ Principal$Outbound,
4795
+ z.ZodTypeDef,
4796
+ Principal
4797
+ > = z.union([
4798
+ z.lazy(() => Two$outboundSchema),
4799
+ z.lazy(() => One$outboundSchema),
4800
+ ]);
4801
+
4802
+ /**
4803
+ * @internal
4804
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
4805
+ */
4806
+ export namespace Principal$ {
4807
+ /** @deprecated use `Principal$inboundSchema` instead. */
4808
+ export const inboundSchema = Principal$inboundSchema;
4809
+ /** @deprecated use `Principal$outboundSchema` instead. */
4810
+ export const outboundSchema = Principal$outboundSchema;
4811
+ /** @deprecated use `Principal$Outbound` instead. */
4812
+ export type Outbound = Principal$Outbound;
4813
+ }
4814
+
4815
+ export function principalToJSON(principal: Principal): string {
4816
+ return JSON.stringify(Principal$outboundSchema.parse(principal));
4817
+ }
4818
+
4819
+ export function principalFromJSON(
4820
+ jsonString: string,
4821
+ ): SafeParseResult<Principal, SDKValidationError> {
4822
+ return safeParse(
4823
+ jsonString,
4824
+ (x) => Principal$inboundSchema.parse(JSON.parse(x)),
4825
+ `Failed to parse 'Principal' from JSON`,
4826
+ );
4827
+ }
4828
+
4829
+ /** @internal */
4830
+ export const UserEventViaType$inboundSchema: z.ZodNativeEnum<
4831
+ typeof UserEventViaType
4832
+ > = z.nativeEnum(UserEventViaType);
4833
+
4834
+ /** @internal */
4835
+ export const UserEventViaType$outboundSchema: z.ZodNativeEnum<
4836
+ typeof UserEventViaType
4837
+ > = UserEventViaType$inboundSchema;
4838
+
4839
+ /**
4840
+ * @internal
4841
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
4842
+ */
4843
+ export namespace UserEventViaType$ {
4844
+ /** @deprecated use `UserEventViaType$inboundSchema` instead. */
4845
+ export const inboundSchema = UserEventViaType$inboundSchema;
4846
+ /** @deprecated use `UserEventViaType$outboundSchema` instead. */
4847
+ export const outboundSchema = UserEventViaType$outboundSchema;
4848
+ }
4849
+
4850
+ /** @internal */
4851
+ export const Via2$inboundSchema: z.ZodType<Via2, z.ZodTypeDef, unknown> = z
4852
+ .object({
4853
+ type: UserEventViaType$inboundSchema,
4854
+ clientId: z.string(),
4855
+ name: z.string(),
4856
+ });
4857
+
4858
+ /** @internal */
4859
+ export type Via2$Outbound = {
4860
+ type: string;
4861
+ clientId: string;
4862
+ name: string;
4863
+ };
4864
+
4865
+ /** @internal */
4866
+ export const Via2$outboundSchema: z.ZodType<Via2$Outbound, z.ZodTypeDef, Via2> =
4867
+ z.object({
4868
+ type: UserEventViaType$outboundSchema,
4869
+ clientId: z.string(),
4870
+ name: z.string(),
4871
+ });
4872
+
4873
+ /**
4874
+ * @internal
4875
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
4876
+ */
4877
+ export namespace Via2$ {
4878
+ /** @deprecated use `Via2$inboundSchema` instead. */
4879
+ export const inboundSchema = Via2$inboundSchema;
4880
+ /** @deprecated use `Via2$outboundSchema` instead. */
4881
+ export const outboundSchema = Via2$outboundSchema;
4882
+ /** @deprecated use `Via2$Outbound` instead. */
4883
+ export type Outbound = Via2$Outbound;
4884
+ }
4885
+
4886
+ export function via2ToJSON(via2: Via2): string {
4887
+ return JSON.stringify(Via2$outboundSchema.parse(via2));
4888
+ }
4889
+
4890
+ export function via2FromJSON(
4891
+ jsonString: string,
4892
+ ): SafeParseResult<Via2, SDKValidationError> {
4893
+ return safeParse(
4894
+ jsonString,
4895
+ (x) => Via2$inboundSchema.parse(JSON.parse(x)),
4896
+ `Failed to parse 'Via2' from JSON`,
4897
+ );
4898
+ }
4899
+
4900
+ /** @internal */
4901
+ export const ViaType$inboundSchema: z.ZodNativeEnum<typeof ViaType> = z
4902
+ .nativeEnum(ViaType);
4903
+
4904
+ /** @internal */
4905
+ export const ViaType$outboundSchema: z.ZodNativeEnum<typeof ViaType> =
4906
+ ViaType$inboundSchema;
4907
+
4908
+ /**
4909
+ * @internal
4910
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
4911
+ */
4912
+ export namespace ViaType$ {
4913
+ /** @deprecated use `ViaType$inboundSchema` instead. */
4914
+ export const inboundSchema = ViaType$inboundSchema;
4915
+ /** @deprecated use `ViaType$outboundSchema` instead. */
4916
+ export const outboundSchema = ViaType$outboundSchema;
4917
+ }
4918
+
4919
+ /** @internal */
4920
+ export const Via1$inboundSchema: z.ZodType<Via1, z.ZodTypeDef, unknown> = z
4921
+ .object({
4922
+ type: ViaType$inboundSchema.optional(),
4923
+ avatar: z.string(),
4924
+ email: z.string(),
4925
+ slug: z.string().optional(),
4926
+ uid: z.string(),
4927
+ username: z.string(),
4928
+ });
4929
+
4930
+ /** @internal */
4931
+ export type Via1$Outbound = {
4932
+ type?: string | undefined;
4933
+ avatar: string;
4934
+ email: string;
4935
+ slug?: string | undefined;
4936
+ uid: string;
4937
+ username: string;
4938
+ };
4939
+
4940
+ /** @internal */
4941
+ export const Via1$outboundSchema: z.ZodType<Via1$Outbound, z.ZodTypeDef, Via1> =
4942
+ z.object({
4943
+ type: ViaType$outboundSchema.optional(),
4944
+ avatar: z.string(),
4945
+ email: z.string(),
4946
+ slug: z.string().optional(),
4947
+ uid: z.string(),
4948
+ username: z.string(),
4949
+ });
4950
+
4951
+ /**
4952
+ * @internal
4953
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
4954
+ */
4955
+ export namespace Via1$ {
4956
+ /** @deprecated use `Via1$inboundSchema` instead. */
4957
+ export const inboundSchema = Via1$inboundSchema;
4958
+ /** @deprecated use `Via1$outboundSchema` instead. */
4959
+ export const outboundSchema = Via1$outboundSchema;
4960
+ /** @deprecated use `Via1$Outbound` instead. */
4961
+ export type Outbound = Via1$Outbound;
4962
+ }
4963
+
4964
+ export function via1ToJSON(via1: Via1): string {
4965
+ return JSON.stringify(Via1$outboundSchema.parse(via1));
4966
+ }
4967
+
4968
+ export function via1FromJSON(
4969
+ jsonString: string,
4970
+ ): SafeParseResult<Via1, SDKValidationError> {
4971
+ return safeParse(
4972
+ jsonString,
4973
+ (x) => Via1$inboundSchema.parse(JSON.parse(x)),
4974
+ `Failed to parse 'Via1' from JSON`,
4975
+ );
4976
+ }
4977
+
4978
+ /** @internal */
4979
+ export const Via$inboundSchema: z.ZodType<Via, z.ZodTypeDef, unknown> = z.union(
4980
+ [z.lazy(() => Via2$inboundSchema), z.lazy(() => Via1$inboundSchema)],
4981
+ );
4982
+
4983
+ /** @internal */
4984
+ export type Via$Outbound = Via2$Outbound | Via1$Outbound;
4985
+
4986
+ /** @internal */
4987
+ export const Via$outboundSchema: z.ZodType<Via$Outbound, z.ZodTypeDef, Via> = z
4988
+ .union([
4989
+ z.lazy(() => Via2$outboundSchema),
4990
+ z.lazy(() => Via1$outboundSchema),
4991
+ ]);
4992
+
4993
+ /**
4994
+ * @internal
4995
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
4996
+ */
4997
+ export namespace Via$ {
4998
+ /** @deprecated use `Via$inboundSchema` instead. */
4999
+ export const inboundSchema = Via$inboundSchema;
5000
+ /** @deprecated use `Via$outboundSchema` instead. */
5001
+ export const outboundSchema = Via$outboundSchema;
5002
+ /** @deprecated use `Via$Outbound` instead. */
5003
+ export type Outbound = Via$Outbound;
5004
+ }
5005
+
5006
+ export function viaToJSON(via: Via): string {
5007
+ return JSON.stringify(Via$outboundSchema.parse(via));
5008
+ }
5009
+
5010
+ export function viaFromJSON(
5011
+ jsonString: string,
5012
+ ): SafeParseResult<Via, SDKValidationError> {
5013
+ return safeParse(
5014
+ jsonString,
5015
+ (x) => Via$inboundSchema.parse(JSON.parse(x)),
5016
+ `Failed to parse 'Via' from JSON`,
5017
+ );
5018
+ }
5019
+
4551
5020
  /** @internal */
4552
5021
  export const GrantType$inboundSchema: z.ZodNativeEnum<typeof GrantType> = z
4553
5022
  .nativeEnum(GrantType);
@@ -27570,16 +28039,19 @@ export namespace Action$ {
27570
28039
  }
27571
28040
 
27572
28041
  /** @internal */
27573
- export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z
27574
- .object({
27575
- action: Action$inboundSchema,
27576
- id: z.string(),
27577
- slug: z.string(),
27578
- projectId: z.string(),
27579
- });
28042
+ export const Payload2$inboundSchema: z.ZodType<
28043
+ Payload2,
28044
+ z.ZodTypeDef,
28045
+ unknown
28046
+ > = z.object({
28047
+ action: Action$inboundSchema,
28048
+ id: z.string(),
28049
+ slug: z.string(),
28050
+ projectId: z.string(),
28051
+ });
27580
28052
 
27581
28053
  /** @internal */
27582
- export type Two$Outbound = {
28054
+ export type Payload2$Outbound = {
27583
28055
  action: string;
27584
28056
  id: string;
27585
28057
  slug: string;
@@ -27587,83 +28059,92 @@ export type Two$Outbound = {
27587
28059
  };
27588
28060
 
27589
28061
  /** @internal */
27590
- export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
27591
- .object({
27592
- action: Action$outboundSchema,
27593
- id: z.string(),
27594
- slug: z.string(),
27595
- projectId: z.string(),
27596
- });
28062
+ export const Payload2$outboundSchema: z.ZodType<
28063
+ Payload2$Outbound,
28064
+ z.ZodTypeDef,
28065
+ Payload2
28066
+ > = z.object({
28067
+ action: Action$outboundSchema,
28068
+ id: z.string(),
28069
+ slug: z.string(),
28070
+ projectId: z.string(),
28071
+ });
27597
28072
 
27598
28073
  /**
27599
28074
  * @internal
27600
28075
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
27601
28076
  */
27602
- export namespace Two$ {
27603
- /** @deprecated use `Two$inboundSchema` instead. */
27604
- export const inboundSchema = Two$inboundSchema;
27605
- /** @deprecated use `Two$outboundSchema` instead. */
27606
- export const outboundSchema = Two$outboundSchema;
27607
- /** @deprecated use `Two$Outbound` instead. */
27608
- export type Outbound = Two$Outbound;
28077
+ export namespace Payload2$ {
28078
+ /** @deprecated use `Payload2$inboundSchema` instead. */
28079
+ export const inboundSchema = Payload2$inboundSchema;
28080
+ /** @deprecated use `Payload2$outboundSchema` instead. */
28081
+ export const outboundSchema = Payload2$outboundSchema;
28082
+ /** @deprecated use `Payload2$Outbound` instead. */
28083
+ export type Outbound = Payload2$Outbound;
27609
28084
  }
27610
28085
 
27611
- export function twoToJSON(two: Two): string {
27612
- return JSON.stringify(Two$outboundSchema.parse(two));
28086
+ export function payload2ToJSON(payload2: Payload2): string {
28087
+ return JSON.stringify(Payload2$outboundSchema.parse(payload2));
27613
28088
  }
27614
28089
 
27615
- export function twoFromJSON(
28090
+ export function payload2FromJSON(
27616
28091
  jsonString: string,
27617
- ): SafeParseResult<Two, SDKValidationError> {
28092
+ ): SafeParseResult<Payload2, SDKValidationError> {
27618
28093
  return safeParse(
27619
28094
  jsonString,
27620
- (x) => Two$inboundSchema.parse(JSON.parse(x)),
27621
- `Failed to parse 'Two' from JSON`,
28095
+ (x) => Payload2$inboundSchema.parse(JSON.parse(x)),
28096
+ `Failed to parse 'Payload2' from JSON`,
27622
28097
  );
27623
28098
  }
27624
28099
 
27625
28100
  /** @internal */
27626
- export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z
27627
- .object({});
28101
+ export const Payload1$inboundSchema: z.ZodType<
28102
+ Payload1,
28103
+ z.ZodTypeDef,
28104
+ unknown
28105
+ > = z.object({});
27628
28106
 
27629
28107
  /** @internal */
27630
- export type One$Outbound = {};
28108
+ export type Payload1$Outbound = {};
27631
28109
 
27632
28110
  /** @internal */
27633
- export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
27634
- .object({});
28111
+ export const Payload1$outboundSchema: z.ZodType<
28112
+ Payload1$Outbound,
28113
+ z.ZodTypeDef,
28114
+ Payload1
28115
+ > = z.object({});
27635
28116
 
27636
28117
  /**
27637
28118
  * @internal
27638
28119
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
27639
28120
  */
27640
- export namespace One$ {
27641
- /** @deprecated use `One$inboundSchema` instead. */
27642
- export const inboundSchema = One$inboundSchema;
27643
- /** @deprecated use `One$outboundSchema` instead. */
27644
- export const outboundSchema = One$outboundSchema;
27645
- /** @deprecated use `One$Outbound` instead. */
27646
- export type Outbound = One$Outbound;
28121
+ export namespace Payload1$ {
28122
+ /** @deprecated use `Payload1$inboundSchema` instead. */
28123
+ export const inboundSchema = Payload1$inboundSchema;
28124
+ /** @deprecated use `Payload1$outboundSchema` instead. */
28125
+ export const outboundSchema = Payload1$outboundSchema;
28126
+ /** @deprecated use `Payload1$Outbound` instead. */
28127
+ export type Outbound = Payload1$Outbound;
27647
28128
  }
27648
28129
 
27649
- export function oneToJSON(one: One): string {
27650
- return JSON.stringify(One$outboundSchema.parse(one));
28130
+ export function payload1ToJSON(payload1: Payload1): string {
28131
+ return JSON.stringify(Payload1$outboundSchema.parse(payload1));
27651
28132
  }
27652
28133
 
27653
- export function oneFromJSON(
28134
+ export function payload1FromJSON(
27654
28135
  jsonString: string,
27655
- ): SafeParseResult<One, SDKValidationError> {
28136
+ ): SafeParseResult<Payload1, SDKValidationError> {
27656
28137
  return safeParse(
27657
28138
  jsonString,
27658
- (x) => One$inboundSchema.parse(JSON.parse(x)),
27659
- `Failed to parse 'One' from JSON`,
28139
+ (x) => Payload1$inboundSchema.parse(JSON.parse(x)),
28140
+ `Failed to parse 'Payload1' from JSON`,
27660
28141
  );
27661
28142
  }
27662
28143
 
27663
28144
  /** @internal */
27664
28145
  export const Payload$inboundSchema: z.ZodType<Payload, z.ZodTypeDef, unknown> =
27665
28146
  z.union([
27666
- z.lazy(() => One$inboundSchema),
28147
+ z.lazy(() => Payload1$inboundSchema),
27667
28148
  z.lazy(() => Three$inboundSchema),
27668
28149
  z.lazy(() => Nine$inboundSchema),
27669
28150
  z.lazy(() => Nineteen$inboundSchema),
@@ -27768,7 +28249,7 @@ export const Payload$inboundSchema: z.ZodType<Payload, z.ZodTypeDef, unknown> =
27768
28249
  z.lazy(() => OneHundredAndThirtyEight$inboundSchema),
27769
28250
  z.lazy(() => OneHundredAndFortyFive$inboundSchema),
27770
28251
  z.lazy(() => OneHundredAndFortySix$inboundSchema),
27771
- z.lazy(() => Two$inboundSchema),
28252
+ z.lazy(() => Payload2$inboundSchema),
27772
28253
  z.lazy(() => Six$inboundSchema),
27773
28254
  z.lazy(() => Eleven$inboundSchema),
27774
28255
  z.lazy(() => Fifteen$inboundSchema),
@@ -27815,7 +28296,7 @@ export const Payload$inboundSchema: z.ZodType<Payload, z.ZodTypeDef, unknown> =
27815
28296
 
27816
28297
  /** @internal */
27817
28298
  export type Payload$Outbound =
27818
- | One$Outbound
28299
+ | Payload1$Outbound
27819
28300
  | Three$Outbound
27820
28301
  | Nine$Outbound
27821
28302
  | Nineteen$Outbound
@@ -27920,7 +28401,7 @@ export type Payload$Outbound =
27920
28401
  | OneHundredAndThirtyEight$Outbound
27921
28402
  | OneHundredAndFortyFive$Outbound
27922
28403
  | OneHundredAndFortySix$Outbound
27923
- | Two$Outbound
28404
+ | Payload2$Outbound
27924
28405
  | Six$Outbound
27925
28406
  | Eleven$Outbound
27926
28407
  | Fifteen$Outbound
@@ -27970,7 +28451,7 @@ export const Payload$outboundSchema: z.ZodType<
27970
28451
  z.ZodTypeDef,
27971
28452
  Payload
27972
28453
  > = z.union([
27973
- z.lazy(() => One$outboundSchema),
28454
+ z.lazy(() => Payload1$outboundSchema),
27974
28455
  z.lazy(() => Three$outboundSchema),
27975
28456
  z.lazy(() => Nine$outboundSchema),
27976
28457
  z.lazy(() => Nineteen$outboundSchema),
@@ -28075,7 +28556,7 @@ export const Payload$outboundSchema: z.ZodType<
28075
28556
  z.lazy(() => OneHundredAndThirtyEight$outboundSchema),
28076
28557
  z.lazy(() => OneHundredAndFortyFive$outboundSchema),
28077
28558
  z.lazy(() => OneHundredAndFortySix$outboundSchema),
28078
- z.lazy(() => Two$outboundSchema),
28559
+ z.lazy(() => Payload2$outboundSchema),
28079
28560
  z.lazy(() => Six$outboundSchema),
28080
28561
  z.lazy(() => Eleven$outboundSchema),
28081
28562
  z.lazy(() => Fifteen$outboundSchema),
@@ -28158,9 +28639,21 @@ export const UserEvent$inboundSchema: z.ZodType<
28158
28639
  entities: z.array(z.lazy(() => Entities$inboundSchema)),
28159
28640
  createdAt: z.number(),
28160
28641
  user: z.lazy(() => User$inboundSchema).optional(),
28642
+ principal: z.union([
28643
+ z.lazy(() => Two$inboundSchema),
28644
+ z.lazy(() => One$inboundSchema),
28645
+ ]).optional(),
28646
+ via: z.array(
28647
+ z.union([
28648
+ z.lazy(() => Via2$inboundSchema),
28649
+ z.lazy(() => Via1$inboundSchema),
28650
+ ]),
28651
+ ).optional(),
28161
28652
  userId: z.string(),
28653
+ principalId: z.string(),
28654
+ viaIds: z.array(z.string()).optional(),
28162
28655
  payload: z.union([
28163
- z.lazy(() => One$inboundSchema),
28656
+ z.lazy(() => Payload1$inboundSchema),
28164
28657
  z.lazy(() => Three$inboundSchema),
28165
28658
  z.lazy(() => Nine$inboundSchema),
28166
28659
  z.lazy(() => Nineteen$inboundSchema),
@@ -28265,7 +28758,7 @@ export const UserEvent$inboundSchema: z.ZodType<
28265
28758
  z.lazy(() => OneHundredAndThirtyEight$inboundSchema),
28266
28759
  z.lazy(() => OneHundredAndFortyFive$inboundSchema),
28267
28760
  z.lazy(() => OneHundredAndFortySix$inboundSchema),
28268
- z.lazy(() => Two$inboundSchema),
28761
+ z.lazy(() => Payload2$inboundSchema),
28269
28762
  z.lazy(() => Six$inboundSchema),
28270
28763
  z.lazy(() => Eleven$inboundSchema),
28271
28764
  z.lazy(() => Fifteen$inboundSchema),
@@ -28318,9 +28811,13 @@ export type UserEvent$Outbound = {
28318
28811
  entities: Array<Entities$Outbound>;
28319
28812
  createdAt: number;
28320
28813
  user?: User$Outbound | undefined;
28814
+ principal?: Two$Outbound | One$Outbound | undefined;
28815
+ via?: Array<Via2$Outbound | Via1$Outbound> | undefined;
28321
28816
  userId: string;
28817
+ principalId: string;
28818
+ viaIds?: Array<string> | undefined;
28322
28819
  payload?:
28323
- | One$Outbound
28820
+ | Payload1$Outbound
28324
28821
  | Three$Outbound
28325
28822
  | Nine$Outbound
28326
28823
  | Nineteen$Outbound
@@ -28425,7 +28922,7 @@ export type UserEvent$Outbound = {
28425
28922
  | OneHundredAndThirtyEight$Outbound
28426
28923
  | OneHundredAndFortyFive$Outbound
28427
28924
  | OneHundredAndFortySix$Outbound
28428
- | Two$Outbound
28925
+ | Payload2$Outbound
28429
28926
  | Six$Outbound
28430
28927
  | Eleven$Outbound
28431
28928
  | Fifteen$Outbound
@@ -28482,9 +28979,21 @@ export const UserEvent$outboundSchema: z.ZodType<
28482
28979
  entities: z.array(z.lazy(() => Entities$outboundSchema)),
28483
28980
  createdAt: z.number(),
28484
28981
  user: z.lazy(() => User$outboundSchema).optional(),
28982
+ principal: z.union([
28983
+ z.lazy(() => Two$outboundSchema),
28984
+ z.lazy(() => One$outboundSchema),
28985
+ ]).optional(),
28986
+ via: z.array(
28987
+ z.union([
28988
+ z.lazy(() => Via2$outboundSchema),
28989
+ z.lazy(() => Via1$outboundSchema),
28990
+ ]),
28991
+ ).optional(),
28485
28992
  userId: z.string(),
28993
+ principalId: z.string(),
28994
+ viaIds: z.array(z.string()).optional(),
28486
28995
  payload: z.union([
28487
- z.lazy(() => One$outboundSchema),
28996
+ z.lazy(() => Payload1$outboundSchema),
28488
28997
  z.lazy(() => Three$outboundSchema),
28489
28998
  z.lazy(() => Nine$outboundSchema),
28490
28999
  z.lazy(() => Nineteen$outboundSchema),
@@ -28589,7 +29098,7 @@ export const UserEvent$outboundSchema: z.ZodType<
28589
29098
  z.lazy(() => OneHundredAndThirtyEight$outboundSchema),
28590
29099
  z.lazy(() => OneHundredAndFortyFive$outboundSchema),
28591
29100
  z.lazy(() => OneHundredAndFortySix$outboundSchema),
28592
- z.lazy(() => Two$outboundSchema),
29101
+ z.lazy(() => Payload2$outboundSchema),
28593
29102
  z.lazy(() => Six$outboundSchema),
28594
29103
  z.lazy(() => Eleven$outboundSchema),
28595
29104
  z.lazy(() => Fifteen$outboundSchema),