@simpleview/sv-auth-client 6.22.0 → 6.23.1

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.22.0",
3
+ "version": "6.23.1",
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,6 +459,52 @@ class AuthPrefix {
459
459
  return result.auth.verify_mfa_code;
460
460
  }
461
461
 
462
+ update_mfa_required({ input, fields, context }) {
463
+ context = context || this._graphServer.context;
464
+
465
+ return query({
466
+ query : `
467
+ mutation($input: auth_update_mfa_required_input!) {
468
+ auth {
469
+ update_mfa_required(input: $input) {
470
+ ${fields}
471
+ }
472
+ }
473
+ }
474
+ `,
475
+ variables : {
476
+ input
477
+ },
478
+ url : this._graphUrl,
479
+ token : context.token,
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",
504
+ clean: true
505
+ });
506
+ }
507
+
462
508
  async send_email_mfa_code({ input, fields }) {
463
509
  const result = await query({
464
510
  query : `
@@ -596,6 +642,33 @@ class AuthPrefix {
596
642
  return returnData;
597
643
  }
598
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
+
599
672
  async sv_user({ fields, context }) {
600
673
  context = context || this._graphServer.context;
601
674