@simpleview/sv-auth-client 6.23.0 → 6.23.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simpleview/sv-auth-client",
3
- "version": "6.23.0",
3
+ "version": "6.23.2",
4
4
  "description": "Client for communicating with sv-auth",
5
5
  "author": "Owen Allen <owenallenaz@gmail.com>",
6
6
  "dependencies": {
package/readme.md CHANGED
@@ -27,7 +27,7 @@ npm install @simpleview/sv-auth-client
27
27
 
28
28
  Using yarn:
29
29
  ```bash
30
- yarn install @simpleview/sv-redirects-client
30
+ yarn install @simpleview/sv-auth-client
31
31
  ```
32
32
 
33
33
  ## Update
@@ -459,14 +459,14 @@ class AuthPrefix {
459
459
  return result.auth.verify_mfa_code;
460
460
  }
461
461
 
462
- enable_mfa({ input, fields, context }) {
462
+ update_mfa_required({ input, fields, context }) {
463
463
  context = context || this._graphServer.context;
464
464
 
465
465
  return query({
466
466
  query : `
467
- mutation($input: auth_enable_mfa_input!) {
467
+ mutation($input: auth_update_mfa_required_input!) {
468
468
  auth {
469
- enable_mfa(input: $input) {
469
+ update_mfa_required(input: $input) {
470
470
  ${fields}
471
471
  }
472
472
  }
@@ -477,7 +477,30 @@ class AuthPrefix {
477
477
  },
478
478
  url : this._graphUrl,
479
479
  token : context.token,
480
- key: "auth.enable_mfa",
480
+ key: "auth.update_mfa_required",
481
+ clean: true
482
+ });
483
+ }
484
+
485
+ update_phone({ input, fields, context }) {
486
+ context = context || this._graphServer.context;
487
+
488
+ return query({
489
+ query : `
490
+ mutation($input: auth_update_phone_input!) {
491
+ auth {
492
+ update_phone(input: $input) {
493
+ ${fields}
494
+ }
495
+ }
496
+ }
497
+ `,
498
+ variables : {
499
+ input
500
+ },
501
+ url : this._graphUrl,
502
+ token : context.token,
503
+ key: "auth.update_phone",
481
504
  clean: true
482
505
  });
483
506
  }
@@ -619,6 +642,33 @@ class AuthPrefix {
619
642
  return returnData;
620
643
  }
621
644
 
645
+ async update_user_profile({ input, fields, context}) {
646
+ context = context || this._graphServer.context;
647
+
648
+ const result = await query({
649
+ query: `
650
+ mutation($input: auth_update_user_profile_input!) {
651
+ auth {
652
+ update_user_profile(input: $input) {
653
+ ${fields}
654
+ }
655
+ }
656
+ }
657
+ `,
658
+ variables: {
659
+ input
660
+ },
661
+ url: this._graphUrl,
662
+ token: context.token
663
+ });
664
+
665
+ const returnData = result.auth.update_user_profile;
666
+
667
+ nullToUndefined(returnData)
668
+
669
+ return returnData;
670
+ }
671
+
622
672
  async sv_user({ fields, context }) {
623
673
  context = context || this._graphServer.context;
624
674
 
@@ -694,6 +744,29 @@ class AuthPrefix {
694
744
  return returnData;
695
745
  }
696
746
 
747
+ async update_totp({ input, fields, context }) {
748
+ context = context || this._graphServer.context;
749
+
750
+ return query({
751
+ query: `
752
+ mutation($input: auth_update_totp_input!) {
753
+ auth {
754
+ update_totp(input: $input) {
755
+ ${fields}
756
+ }
757
+ }
758
+ }
759
+ `,
760
+ variables: {
761
+ input
762
+ },
763
+ url: this._graphUrl,
764
+ token: context.token,
765
+ key: "auth.update_totp",
766
+ clean: true
767
+ });
768
+ }
769
+
697
770
  async verified_totp_factor({ input, fields }) {
698
771
  const result = await query({
699
772
  query : `
@@ -881,6 +954,66 @@ class AuthPrefix {
881
954
  return returnData;
882
955
  }
883
956
 
957
+ test_instrument_totp({ fields, context }) {
958
+ context = context || this._graphServer.context;
959
+
960
+ return query({
961
+ query: `
962
+ mutation {
963
+ auth {
964
+ test_instrument_totp {
965
+ ${fields}
966
+ }
967
+ }
968
+ }
969
+ `,
970
+ url: this._graphUrl,
971
+ token: context.token,
972
+ clean: true,
973
+ key: "auth.test_instrument_totp"
974
+ });
975
+ }
976
+
977
+ test_uninstrument_totp({ fields, context }) {
978
+ context = context || this._graphServer.context;
979
+
980
+ return query({
981
+ query: `
982
+ mutation {
983
+ auth {
984
+ test_uninstrument_totp {
985
+ ${fields}
986
+ }
987
+ }
988
+ }
989
+ `,
990
+ url: this._graphUrl,
991
+ token: context.token,
992
+ clean: true,
993
+ key: "auth.test_uninstrument_totp"
994
+ });
995
+ }
996
+
997
+ test_clear_totp_state({ fields, context }) {
998
+ context = context || this._graphServer.context;
999
+
1000
+ return query({
1001
+ query: `
1002
+ mutation {
1003
+ auth {
1004
+ test_clear_totp_state {
1005
+ ${fields}
1006
+ }
1007
+ }
1008
+ }
1009
+ `,
1010
+ url: this._graphUrl,
1011
+ token: context.token,
1012
+ clean: true,
1013
+ key: "auth.test_clear_totp_state"
1014
+ });
1015
+ }
1016
+
884
1017
  async uninstrument({ fields, context }) {
885
1018
  context = context || this._graphServer.context;
886
1019