@rixl/sdk 0.40.0 → 0.41.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.
package/dist/index.js CHANGED
@@ -2675,7 +2675,7 @@ const createOAuthProvider = ({ provider, metadata }) => {
2675
2675
 
2676
2676
  //#endregion
2677
2677
  //#region src/auth/providers/google.ts
2678
- const googleProvider = /* @__PURE__ */ createOAuthProvider({
2678
+ const googleProvider = createOAuthProvider({
2679
2679
  provider: "google",
2680
2680
  metadata: {
2681
2681
  name: "Google",
@@ -2694,7 +2694,7 @@ const updateGoogleAuthUrl = googleProvider.updateAuthUrl;
2694
2694
 
2695
2695
  //#endregion
2696
2696
  //#region src/auth/providers/microsoft.ts
2697
- const microsoftProvider = /* @__PURE__ */ createOAuthProvider({
2697
+ const microsoftProvider = createOAuthProvider({
2698
2698
  provider: "microsoft",
2699
2699
  metadata: {
2700
2700
  name: "Microsoft",
@@ -2714,7 +2714,7 @@ const updateMicrosoftAuthUrl = microsoftProvider.updateAuthUrl;
2714
2714
 
2715
2715
  //#endregion
2716
2716
  //#region src/auth/providers/apple.ts
2717
- const appleProvider = /* @__PURE__ */ createOAuthProvider({
2717
+ const appleProvider = createOAuthProvider({
2718
2718
  provider: "apple",
2719
2719
  metadata: {
2720
2720
  name: "Apple",
@@ -3867,19 +3867,19 @@ const validateInput = (schema, data) => {
3867
3867
  throw error;
3868
3868
  }
3869
3869
  };
3870
- const EmailSchema = /* @__PURE__ */ v.pipe(/* @__PURE__ */ v.string("Email must be text"), /* @__PURE__ */ v.email("Please enter a valid email address"), /* @__PURE__ */ v.minLength(1, "Email is required"));
3871
- const PasswordSchema = /* @__PURE__ */ v.pipe(/* @__PURE__ */ v.string("Password must be text"), /* @__PURE__ */ v.minLength(8, "Password must be at least 8 characters long"), /* @__PURE__ */ v.regex(/[A-Z]/, "Password must contain at least one uppercase letter"), /* @__PURE__ */ v.regex(/[a-z]/, "Password must contain at least one lowercase letter"), /* @__PURE__ */ v.regex(/[0-9]/, "Password must contain at least one number"));
3870
+ const EmailSchema = v.pipe(v.string("Email must be text"), v.email("Please enter a valid email address"), v.minLength(1, "Email is required"));
3871
+ const PasswordSchema = v.pipe(v.string("Password must be text"), v.minLength(8, "Password must be at least 8 characters long"), v.regex(/[A-Z]/, "Password must contain at least one uppercase letter"), v.regex(/[a-z]/, "Password must contain at least one lowercase letter"), v.regex(/[0-9]/, "Password must contain at least one number"));
3872
3872
  /**
3873
3873
  * Username validation schema
3874
3874
  * - Must be 4-24 characters
3875
3875
  * - Only letters, numbers, underscores, and periods
3876
3876
  */
3877
- const UsernameSchema = /* @__PURE__ */ v.pipe(/* @__PURE__ */ v.string("Username must be text"), /* @__PURE__ */ v.minLength(4, "Username must be 4-24 characters long"), /* @__PURE__ */ v.maxLength(24, "Username must be 4-24 characters long"), /* @__PURE__ */ v.regex(/^[a-z0-9_.]+$/, "Username can only contain lowercase letters, numbers, dots and underscores"));
3877
+ const UsernameSchema = v.pipe(v.string("Username must be text"), v.minLength(4, "Username must be 4-24 characters long"), v.maxLength(24, "Username must be 4-24 characters long"), v.regex(/^[a-z0-9_.]+$/, "Username can only contain lowercase letters, numbers, dots and underscores"));
3878
3878
  /**
3879
3879
  * Name validation schema
3880
3880
  * - Must be 1-30 characters
3881
3881
  */
3882
- const NameSchema = /* @__PURE__ */ v.pipe(/* @__PURE__ */ v.string("Name must be text"), /* @__PURE__ */ v.minLength(1, "Name must be 1-30 characters long"), /* @__PURE__ */ v.maxLength(30, "Name must be 1-30 characters long"));
3882
+ const NameSchema = v.pipe(v.string("Name must be text"), v.minLength(1, "Name must be 1-30 characters long"), v.maxLength(30, "Name must be 1-30 characters long"));
3883
3883
  /**
3884
3884
  * Domain validation schema
3885
3885
  * - Must be lowercase
@@ -3887,47 +3887,47 @@ const NameSchema = /* @__PURE__ */ v.pipe(/* @__PURE__ */ v.string("Name must be
3887
3887
  * - Only alphanumeric characters, hyphens, and dots
3888
3888
  * - Cannot start or end with hyphen in any part
3889
3889
  */
3890
- const DomainSchema = /* @__PURE__ */ v.pipe(/* @__PURE__ */ v.string("Domain must be text"), /* @__PURE__ */ v.trim(), /* @__PURE__ */ v.toLowerCase(), /* @__PURE__ */ v.minLength(1, "Domain is required"), /* @__PURE__ */ v.regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/, "Invalid domain format. Please enter a valid domain like company.com"));
3890
+ const DomainSchema = v.pipe(v.string("Domain must be text"), v.trim(), v.toLowerCase(), v.minLength(1, "Domain is required"), v.regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/, "Invalid domain format. Please enter a valid domain like company.com"));
3891
3891
 
3892
3892
  //#endregion
3893
3893
  //#region src/auth/validation/auth.ts
3894
- const EmailAuthRequestSchema = /* @__PURE__ */ v.object({
3894
+ const EmailAuthRequestSchema = v.object({
3895
3895
  email: EmailSchema,
3896
3896
  password: PasswordSchema
3897
3897
  });
3898
- const RegisterRequestSchema = /* @__PURE__ */ v.object({
3898
+ const RegisterRequestSchema = v.object({
3899
3899
  email: EmailSchema,
3900
3900
  password: PasswordSchema,
3901
- country_code: /* @__PURE__ */ v.optional(/* @__PURE__ */ v.string()),
3902
- subscribe_to_blog: /* @__PURE__ */ v.optional(/* @__PURE__ */ v.boolean())
3901
+ country_code: v.optional(v.string()),
3902
+ subscribe_to_blog: v.optional(v.boolean())
3903
3903
  });
3904
- const ResetPasswordRequestSchema = /* @__PURE__ */ v.object({
3905
- token: /* @__PURE__ */ v.string(),
3904
+ const ResetPasswordRequestSchema = v.object({
3905
+ token: v.string(),
3906
3906
  new_password: PasswordSchema
3907
3907
  });
3908
- const LoginOTPVerifyRequestSchema = /* @__PURE__ */ v.object({
3909
- code: /* @__PURE__ */ v.pipe(/* @__PURE__ */ v.string("TOTP or backup code must be text"), /* @__PURE__ */ v.minLength(1, "TOTP or backup code is required")),
3910
- session_id: /* @__PURE__ */ v.pipe(/* @__PURE__ */ v.string("Session ID must be text"), /* @__PURE__ */ v.minLength(1, "Session ID is required"))
3908
+ const LoginOTPVerifyRequestSchema = v.object({
3909
+ code: v.pipe(v.string("TOTP or backup code must be text"), v.minLength(1, "TOTP or backup code is required")),
3910
+ session_id: v.pipe(v.string("Session ID must be text"), v.minLength(1, "Session ID is required"))
3911
3911
  });
3912
- const ResendEmailRequestSchema = /* @__PURE__ */ v.object({ email: EmailSchema });
3913
- const ChangeEmailRequestSchema = /* @__PURE__ */ v.object({ new_email: EmailSchema });
3914
- const verifyEmailChangeRequestSchema = /* @__PURE__ */ v.object({
3915
- code: /* @__PURE__ */ v.pipe(/* @__PURE__ */ v.string("OTP code must be text"), /* @__PURE__ */ v.minLength(6, "OTP code must be at least 6 characters"), /* @__PURE__ */ v.maxLength(8, "OTP code must be at most 8 characters"), /* @__PURE__ */ v.regex(/^\d+$/, "OTP code must contain only numbers")),
3916
- new_email: /* @__PURE__ */ v.optional(EmailSchema),
3917
- type: /* @__PURE__ */ v.union([/* @__PURE__ */ v.literal("verification"), /* @__PURE__ */ v.literal("email_change")]),
3918
- verification_id: /* @__PURE__ */ v.string("Verification ID is required")
3912
+ const ResendEmailRequestSchema = v.object({ email: EmailSchema });
3913
+ const ChangeEmailRequestSchema = v.object({ new_email: EmailSchema });
3914
+ const verifyEmailChangeRequestSchema = v.object({
3915
+ code: v.pipe(v.string("OTP code must be text"), v.minLength(6, "OTP code must be at least 6 characters"), v.maxLength(8, "OTP code must be at most 8 characters"), v.regex(/^\d+$/, "OTP code must contain only numbers")),
3916
+ new_email: v.optional(EmailSchema),
3917
+ type: v.union([v.literal("verification"), v.literal("email_change")]),
3918
+ verification_id: v.string("Verification ID is required")
3919
3919
  });
3920
3920
  /**
3921
3921
  * Social provider schemas
3922
3922
  */
3923
- const ConnectProviderSchema = /* @__PURE__ */ v.object({
3924
- provider: /* @__PURE__ */ v.pipe(/* @__PURE__ */ v.string("Provider must be text"), /* @__PURE__ */ v.minLength(1, "Provider is required")),
3925
- token: /* @__PURE__ */ v.pipe(/* @__PURE__ */ v.string("Token must be text"), /* @__PURE__ */ v.minLength(1, "Token is required"))
3923
+ const ConnectProviderSchema = v.object({
3924
+ provider: v.pipe(v.string("Provider must be text"), v.minLength(1, "Provider is required")),
3925
+ token: v.pipe(v.string("Token must be text"), v.minLength(1, "Token is required"))
3926
3926
  });
3927
3927
  /**
3928
3928
  * OTP verification schema (for user OTP operations)
3929
3929
  */
3930
- const VerifyOTPCodeSchema = /* @__PURE__ */ v.object({ code: /* @__PURE__ */ v.pipe(/* @__PURE__ */ v.string("OTP code must be text"), /* @__PURE__ */ v.minLength(6, "OTP code must be at least 6 characters"), /* @__PURE__ */ v.regex(/^\d+$/, "OTP code must contain only numbers")) });
3930
+ const VerifyOTPCodeSchema = v.object({ code: v.pipe(v.string("OTP code must be text"), v.minLength(6, "OTP code must be at least 6 characters"), v.regex(/^\d+$/, "OTP code must contain only numbers")) });
3931
3931
 
3932
3932
  //#endregion
3933
3933
  //#region src/auth/social/socialConnections.ts
@@ -4375,17 +4375,17 @@ const listOrganizationMembers = async (orgId, paginationParams) => {
4375
4375
  /**
4376
4376
  * Membership state schemas
4377
4377
  */
4378
- const AcceptDeclineMembershipSchema = /* @__PURE__ */ v.object({ state: /* @__PURE__ */ v.union([/* @__PURE__ */ v.literal("accepted"), /* @__PURE__ */ v.literal("declined")]) });
4379
- const PublicInviteResponseSchema = /* @__PURE__ */ v.object({ state: /* @__PURE__ */ v.union([/* @__PURE__ */ v.literal("accept"), /* @__PURE__ */ v.literal("decline")]) });
4378
+ const AcceptDeclineMembershipSchema = v.object({ state: v.union([v.literal("accepted"), v.literal("declined")]) });
4379
+ const PublicInviteResponseSchema = v.object({ state: v.union([v.literal("accept"), v.literal("decline")]) });
4380
4380
  /**
4381
4381
  * Membership management schemas
4382
4382
  */
4383
- const InviteMemberSchema = /* @__PURE__ */ v.object({
4383
+ const InviteMemberSchema = v.object({
4384
4384
  username: UsernameSchema,
4385
- role: /* @__PURE__ */ v.union([/* @__PURE__ */ v.literal("admin"), /* @__PURE__ */ v.literal("member")])
4385
+ role: v.union([v.literal("admin"), v.literal("member")])
4386
4386
  });
4387
- const UpdateMemberRoleSchema = /* @__PURE__ */ v.object({ role: /* @__PURE__ */ v.union([/* @__PURE__ */ v.literal("admin"), /* @__PURE__ */ v.literal("member")]) });
4388
- const ResendInviteSchema = /* @__PURE__ */ v.object({ user_id: /* @__PURE__ */ v.pipe(/* @__PURE__ */ v.string("User ID must be text"), /* @__PURE__ */ v.minLength(1, "User ID is required")) });
4387
+ const UpdateMemberRoleSchema = v.object({ role: v.union([v.literal("admin"), v.literal("member")]) });
4388
+ const ResendInviteSchema = v.object({ user_id: v.pipe(v.string("User ID must be text"), v.minLength(1, "User ID is required")) });
4389
4389
 
4390
4390
  //#endregion
4391
4391
  //#region src/auth/membership/invite.ts
@@ -4534,11 +4534,11 @@ const leaveOrganization = async (orgId) => {
4534
4534
  /**
4535
4535
  * Update username request schema
4536
4536
  */
4537
- const UpdateUsernameSchema = /* @__PURE__ */ v.object({ username: UsernameSchema });
4537
+ const UpdateUsernameSchema = v.object({ username: UsernameSchema });
4538
4538
  /**
4539
4539
  * Update name request schema
4540
4540
  */
4541
- const UpdateNameSchema = /* @__PURE__ */ v.object({ full_name: NameSchema });
4541
+ const UpdateNameSchema = v.object({ full_name: NameSchema });
4542
4542
 
4543
4543
  //#endregion
4544
4544
  //#region src/auth/user.ts
@@ -4920,11 +4920,11 @@ const getEmailVerificationStatus = async () => {
4920
4920
  /**
4921
4921
  * Add domain request schema
4922
4922
  */
4923
- const AddDomainSchema = /* @__PURE__ */ v.object({ domain: DomainSchema });
4923
+ const AddDomainSchema = v.object({ domain: DomainSchema });
4924
4924
  /**
4925
4925
  * Update auto-join setting schema
4926
4926
  */
4927
- const UpdateAutoJoinSchema = /* @__PURE__ */ v.object({ enabled: /* @__PURE__ */ v.boolean("Auto-join setting must be a boolean") });
4927
+ const UpdateAutoJoinSchema = v.object({ enabled: v.boolean("Auto-join setting must be a boolean") });
4928
4928
 
4929
4929
  //#endregion
4930
4930
  //#region src/auth/domain/types.ts