@chuzi/shared 1.3.17 → 1.3.18

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
@@ -282,6 +282,11 @@ var REALMS = {
282
282
  auth_magic_link_failed: "This magic link is invalid or expired.",
283
283
  auth_magic_link_cta: "Use another email",
284
284
  auth_login_failed: "Sign-in failed.",
285
+ auth_username_checking: "Checking username availability...",
286
+ auth_username_available: "Username is available.",
287
+ auth_username_unavailable: "Username is taken; updated to an available suggestion.",
288
+ auth_username_required: "Username is required.",
289
+ auth_username_update_failed: "Could not reserve a unique username.",
285
290
  experience_mapping_group_experience_root: "Experience Root",
286
291
  experience_mapping_group_node_types: "Node Types",
287
292
  experience_mapping_group_scene_structure: "Scene Structure",
@@ -523,6 +528,11 @@ var REALMS = {
523
528
  auth_magic_link_failed: "This magic link is invalid or expired.",
524
529
  auth_magic_link_cta: "Use another email",
525
530
  auth_login_failed: "Sign-in failed.",
531
+ auth_username_checking: "Checking username availability...",
532
+ auth_username_available: "Username is available.",
533
+ auth_username_unavailable: "Username is taken; updated to an available suggestion.",
534
+ auth_username_required: "Username is required.",
535
+ auth_username_update_failed: "Could not reserve a unique username.",
526
536
  experience_mapping_group_experience_root: "Experience Root",
527
537
  experience_mapping_group_node_types: "Node Types",
528
538
  experience_mapping_group_scene_structure: "Scene Structure",
@@ -762,6 +772,11 @@ var FALLBACK_LEXICON = {
762
772
  auth_magic_link_failed: "This magic link is invalid or expired.",
763
773
  auth_magic_link_cta: "Use another email",
764
774
  auth_login_failed: "Sign-in failed.",
775
+ auth_username_checking: "Checking username availability...",
776
+ auth_username_available: "Username is available.",
777
+ auth_username_unavailable: "Username is taken; updated to an available suggestion.",
778
+ auth_username_required: "Username is required.",
779
+ auth_username_update_failed: "Could not reserve a unique username.",
765
780
  experience_mapping_group_experience_root: "Experience Root",
766
781
  experience_mapping_group_node_types: "Node Types",
767
782
  experience_mapping_group_scene_structure: "Scene Structure",
@@ -988,6 +1003,10 @@ function createChuziClient(config) {
988
1003
  login: (req) => request("POST", "/api/v1/auth/login", { body: req }),
989
1004
  requestMagicLink: (req) => request("POST", "/api/v1/auth/magic-link/request", { body: req }),
990
1005
  verifyMagicLink: (req) => request("POST", "/api/v1/auth/magic-link/verify", { body: req }),
1006
+ usernameAvailability: (username, opts) => request("GET", "/api/v1/auth/username-availability", {
1007
+ signal: opts?.signal,
1008
+ query: { username }
1009
+ }),
991
1010
  logout: () => request("POST", "/api/v1/auth/logout"),
992
1011
  user: () => request("GET", "/api/v1/auth/user")
993
1012
  },
@@ -1055,7 +1074,11 @@ function createChuziClient(config) {
1055
1074
  publicProfile: (userId, opts) => request("GET", `/api/v1/users/${encodeURIComponent(userId)}/public`, opts),
1056
1075
  updateRealm: (req) => request("PUT", "/api/v1/user/realm", { body: req }),
1057
1076
  updateLocale: (req) => request("PUT", "/api/v1/user/locale", { body: req }),
1058
- updateProfile: (req) => request("PUT", "/api/v1/user/profile", { body: req })
1077
+ updateProfile: (req) => request("PUT", "/api/v1/user/profile", { body: req }),
1078
+ usernameAvailability: (username, opts) => request("GET", "/api/v1/user/username-availability", {
1079
+ signal: opts?.signal,
1080
+ query: { username }
1081
+ })
1059
1082
  },
1060
1083
  credits: {
1061
1084
  balance: (opts) => request("GET", "/api/v1/credits/balance", opts),