@bubblelab/shared-schemas 0.1.46 → 0.1.48

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.
package/dist/index.js CHANGED
@@ -2859,6 +2859,10 @@ var organizationSchema = z13.object({
2859
2859
  example: "my-team"
2860
2860
  }),
2861
2861
  type: orgTypeSchema,
2862
+ domain: z13.string().nullable().optional().openapi({
2863
+ description: 'Email domain for auto-joining (e.g., "acme.com"). Users with matching email domains are automatically added as members.',
2864
+ example: "acme.com"
2865
+ }),
2862
2866
  role: orgRoleSchema.openapi({
2863
2867
  description: "Current user's role in this organization"
2864
2868
  }),
@@ -2912,6 +2916,13 @@ var createOrganizationSchema = z13.object({
2912
2916
  slug: z13.string().min(3).max(50).regex(/^[a-z0-9-]+$/, "Slug must be lowercase alphanumeric with hyphens").openapi({
2913
2917
  description: "Organization slug for URLs",
2914
2918
  example: "my-team"
2919
+ }),
2920
+ domain: z13.string().regex(
2921
+ /^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i,
2922
+ "Must be a valid domain (e.g., acme.com)"
2923
+ ).optional().openapi({
2924
+ description: "Email domain for auto-joining. Users with matching email domains are automatically added as members.",
2925
+ example: "acme.com"
2915
2926
  })
2916
2927
  }).openapi("CreateOrganizationRequest");
2917
2928
  var updateOrganizationSchema = z13.object({
@@ -2922,6 +2933,13 @@ var updateOrganizationSchema = z13.object({
2922
2933
  slug: z13.string().min(3).max(50).regex(/^[a-z0-9-]+$/, "Slug must be lowercase alphanumeric with hyphens").optional().openapi({
2923
2934
  description: "Organization slug for URLs",
2924
2935
  example: "my-team"
2936
+ }),
2937
+ domain: z13.string().regex(
2938
+ /^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i,
2939
+ "Must be a valid domain (e.g., acme.com)"
2940
+ ).nullable().optional().openapi({
2941
+ description: "Email domain for auto-joining. Set to null to disable auto-join.",
2942
+ example: "acme.com"
2925
2943
  })
2926
2944
  }).openapi("UpdateOrganizationRequest");
2927
2945
  var addMemberSchema = z13.object({