@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 +1 -1
- package/readme.md +1 -1
- package/src/prefixes/AuthPrefix.js +73 -0
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -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
|
|