@chuzi/shared 1.3.16 → 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
@@ -271,6 +271,9 @@ var REALMS = {
271
271
  experience_mapping_save_experience: "Save to experience",
272
272
  experience_mapping_saved_experience: "Saved to current experience. Some labels appear immediately.",
273
273
  auth_email_placeholder: "Email",
274
+ auth_password_input_placeholder: "Password",
275
+ auth_password_sign_in_button: "Sign In",
276
+ auth_password_signing_in: "Signing in...",
274
277
  auth_sign_in_button: "Send Sign-In Link",
275
278
  auth_signing_in: "Sending...",
276
279
  auth_magic_link_sent: "If that email is registered, a magic link has been sent.",
@@ -279,6 +282,11 @@ var REALMS = {
279
282
  auth_magic_link_failed: "This magic link is invalid or expired.",
280
283
  auth_magic_link_cta: "Use another email",
281
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.",
282
290
  experience_mapping_group_experience_root: "Experience Root",
283
291
  experience_mapping_group_node_types: "Node Types",
284
292
  experience_mapping_group_scene_structure: "Scene Structure",
@@ -509,6 +517,9 @@ var REALMS = {
509
517
  experience_mapping_save_experience: "Save to experience",
510
518
  experience_mapping_saved_experience: "Saved to current experience. Some labels appear immediately.",
511
519
  auth_email_placeholder: "Email",
520
+ auth_password_input_placeholder: "Password",
521
+ auth_password_sign_in_button: "Sign In",
522
+ auth_password_signing_in: "Signing in...",
512
523
  auth_sign_in_button: "Send Sign-In Link",
513
524
  auth_signing_in: "Sending...",
514
525
  auth_magic_link_sent: "If that email is registered, a magic link has been sent.",
@@ -517,6 +528,11 @@ var REALMS = {
517
528
  auth_magic_link_failed: "This magic link is invalid or expired.",
518
529
  auth_magic_link_cta: "Use another email",
519
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.",
520
536
  experience_mapping_group_experience_root: "Experience Root",
521
537
  experience_mapping_group_node_types: "Node Types",
522
538
  experience_mapping_group_scene_structure: "Scene Structure",
@@ -745,6 +761,9 @@ var FALLBACK_LEXICON = {
745
761
  experience_mapping_save_experience: "Save to experience",
746
762
  experience_mapping_saved_experience: "Saved to current experience. Some labels appear immediately.",
747
763
  auth_email_placeholder: "Email",
764
+ auth_password_input_placeholder: "Password",
765
+ auth_password_sign_in_button: "Sign In",
766
+ auth_password_signing_in: "Signing in...",
748
767
  auth_sign_in_button: "Send Sign-In Link",
749
768
  auth_signing_in: "Sending...",
750
769
  auth_magic_link_sent: "If that email is registered, a magic link has been sent.",
@@ -753,6 +772,11 @@ var FALLBACK_LEXICON = {
753
772
  auth_magic_link_failed: "This magic link is invalid or expired.",
754
773
  auth_magic_link_cta: "Use another email",
755
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.",
756
780
  experience_mapping_group_experience_root: "Experience Root",
757
781
  experience_mapping_group_node_types: "Node Types",
758
782
  experience_mapping_group_scene_structure: "Scene Structure",
@@ -976,8 +1000,13 @@ function createChuziClient(config) {
976
1000
  const request = makeRequester(config);
977
1001
  return {
978
1002
  auth: {
1003
+ login: (req) => request("POST", "/api/v1/auth/login", { body: req }),
979
1004
  requestMagicLink: (req) => request("POST", "/api/v1/auth/magic-link/request", { body: req }),
980
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
+ }),
981
1010
  logout: () => request("POST", "/api/v1/auth/logout"),
982
1011
  user: () => request("GET", "/api/v1/auth/user")
983
1012
  },
@@ -1045,7 +1074,11 @@ function createChuziClient(config) {
1045
1074
  publicProfile: (userId, opts) => request("GET", `/api/v1/users/${encodeURIComponent(userId)}/public`, opts),
1046
1075
  updateRealm: (req) => request("PUT", "/api/v1/user/realm", { body: req }),
1047
1076
  updateLocale: (req) => request("PUT", "/api/v1/user/locale", { body: req }),
1048
- 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
+ })
1049
1082
  },
1050
1083
  credits: {
1051
1084
  balance: (opts) => request("GET", "/api/v1/credits/balance", opts),