@visa-check-r/integrations 0.0.7 → 0.0.9

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.cjs.js CHANGED
@@ -388,6 +388,14 @@ var authSchema = {
388
388
  }
389
389
  }
390
390
  `,
391
+ // updatePassword (email: String!, oldPassword: String!, newPassword: String!)
392
+ updatePassword: (query) => `
393
+ mutation updatePassword($email: String!, $oldPassword: String!, $newPassword: String!) {
394
+ updatePassword(email: $email, oldPassword: $oldPassword, newPassword: $newPassword) {
395
+ ${query}
396
+ }
397
+ }
398
+ `,
391
399
  login: (query) => `
392
400
  mutation login($email: String!, $password: String!, $userType: UserTypeEnum) {
393
401
  login(email: $email, password: $password, userType: $userType) {
@@ -410,10 +418,23 @@ var signUpResponseFields = loginResponseFields;
410
418
  var sendOTPResponseFields = ["successful", "otp"];
411
419
  var verifyOTPResponseFields = ["otpVerifiedAccessToken", "userId"];
412
420
  var resetPasswordResponseFields = ["success"];
413
- var updatePasswordResponseFields = ["successful"];
421
+ var updatePasswordResponseFields = ["success"];
414
422
 
415
423
  // src/services/user/auth.service.ts
416
424
  var createAuthService = (client) => ({
425
+ async updatePassword(input, fetchFields, option) {
426
+ var _a, _b;
427
+ const res = await client.request(
428
+ authSchema.updatePassword(
429
+ gqlQueryStringBuilder(
430
+ (_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updatePasswordResponseFields
431
+ )
432
+ ),
433
+ input,
434
+ option
435
+ );
436
+ return (_b = res.data) == null ? void 0 : _b.updatePassword;
437
+ },
417
438
  async resetPassword(input, fetchFields, option) {
418
439
  var _a, _b;
419
440
  const res = await client.request(