@visa-check-r/integrations 0.0.8 → 0.0.10
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 +22 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.esm.js +22 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -455,11 +455,14 @@ interface UpdatePasswordRequest {
|
|
|
455
455
|
newPassword: string;
|
|
456
456
|
}
|
|
457
457
|
type UpdatePasswordResponse = {
|
|
458
|
-
|
|
458
|
+
success: boolean;
|
|
459
459
|
};
|
|
460
460
|
declare const updatePasswordResponseFields: (keyof UpdatePasswordResponse)[];
|
|
461
461
|
|
|
462
462
|
declare const createAuthService: (client: GraphQLClient) => {
|
|
463
|
+
changePassword(input: UpdatePasswordRequest, fetchFields?: {
|
|
464
|
+
root?: (keyof UpdatePasswordResponse)[];
|
|
465
|
+
}, option?: RequestOption): Promise<UpdatePasswordResponse | undefined>;
|
|
463
466
|
resetPassword(input: ResetPasswordRequest, fetchFields?: {
|
|
464
467
|
root?: (keyof ResetPasswordResponse)[];
|
|
465
468
|
}, option?: RequestOption): Promise<ResetPasswordResponse | undefined>;
|
package/dist/index.d.ts
CHANGED
|
@@ -455,11 +455,14 @@ interface UpdatePasswordRequest {
|
|
|
455
455
|
newPassword: string;
|
|
456
456
|
}
|
|
457
457
|
type UpdatePasswordResponse = {
|
|
458
|
-
|
|
458
|
+
success: boolean;
|
|
459
459
|
};
|
|
460
460
|
declare const updatePasswordResponseFields: (keyof UpdatePasswordResponse)[];
|
|
461
461
|
|
|
462
462
|
declare const createAuthService: (client: GraphQLClient) => {
|
|
463
|
+
changePassword(input: UpdatePasswordRequest, fetchFields?: {
|
|
464
|
+
root?: (keyof UpdatePasswordResponse)[];
|
|
465
|
+
}, option?: RequestOption): Promise<UpdatePasswordResponse | undefined>;
|
|
463
466
|
resetPassword(input: ResetPasswordRequest, fetchFields?: {
|
|
464
467
|
root?: (keyof ResetPasswordResponse)[];
|
|
465
468
|
}, option?: RequestOption): Promise<ResetPasswordResponse | undefined>;
|
package/dist/index.esm.js
CHANGED
|
@@ -386,6 +386,14 @@ var authSchema = {
|
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
388
|
`,
|
|
389
|
+
// updatePassword (email: String!, oldPassword: String!, newPassword: String!)
|
|
390
|
+
updatePassword: (query) => `
|
|
391
|
+
mutation updatePassword($email: String!, $oldPassword: String!, $newPassword: String!) {
|
|
392
|
+
updatePassword(email: $email, oldPassword: $oldPassword, newPassword: $newPassword) {
|
|
393
|
+
${query}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
`,
|
|
389
397
|
login: (query) => `
|
|
390
398
|
mutation login($email: String!, $password: String!, $userType: UserTypeEnum) {
|
|
391
399
|
login(email: $email, password: $password, userType: $userType) {
|
|
@@ -408,10 +416,23 @@ var signUpResponseFields = loginResponseFields;
|
|
|
408
416
|
var sendOTPResponseFields = ["successful", "otp"];
|
|
409
417
|
var verifyOTPResponseFields = ["otpVerifiedAccessToken", "userId"];
|
|
410
418
|
var resetPasswordResponseFields = ["success"];
|
|
411
|
-
var updatePasswordResponseFields = ["
|
|
419
|
+
var updatePasswordResponseFields = ["success"];
|
|
412
420
|
|
|
413
421
|
// src/services/user/auth.service.ts
|
|
414
422
|
var createAuthService = (client) => ({
|
|
423
|
+
async changePassword(input, fetchFields, option) {
|
|
424
|
+
var _a, _b;
|
|
425
|
+
const res = await client.request(
|
|
426
|
+
authSchema.updatePassword(
|
|
427
|
+
gqlQueryStringBuilder(
|
|
428
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updatePasswordResponseFields
|
|
429
|
+
)
|
|
430
|
+
),
|
|
431
|
+
input,
|
|
432
|
+
option
|
|
433
|
+
);
|
|
434
|
+
return (_b = res.data) == null ? void 0 : _b.updatePassword;
|
|
435
|
+
},
|
|
415
436
|
async resetPassword(input, fetchFields, option) {
|
|
416
437
|
var _a, _b;
|
|
417
438
|
const res = await client.request(
|