@longvansoftware/storefront-js-client 4.7.6 → 4.7.7
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const GET_USER_DETAIL: import("graphql").DocumentNode;
|
|
2
|
+
export declare const GET_USER_DETAIL_V2: import("graphql").DocumentNode;
|
|
2
3
|
export declare const GET_USER_LOGIN_BY_TOKEN: import("graphql").DocumentNode;
|
|
3
4
|
export declare const GET_USER_LOGIN_BY_USER_LOGIN_ID: import("graphql").DocumentNode;
|
|
4
5
|
export declare const CHECK_USERNAME_EXISTED: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_PARTY_DETAILS_BY_PHONE = exports.SHOW_LOGIN_SOCIAL = exports.GET_ORGANIZATION_BY_ID = exports.GET_WORK_SPACES = exports.GET_MENUS = exports.GET_ORGANIZATIONS_BY_PARTY_ID = exports.GET_ACCESS_TOKEN_BY_OTP_QUERY = exports.CHECK_USER_LOGIN = exports.LOGIN_ZALO = exports.LOGIN_FACEBOOK = exports.LOGIN_GOOGLE = exports.CHECK_USERNAME_EXISTED = exports.GET_USER_LOGIN_BY_USER_LOGIN_ID = exports.GET_USER_LOGIN_BY_TOKEN = exports.GET_USER_DETAIL = void 0;
|
|
3
|
+
exports.GET_PARTY_DETAILS_BY_PHONE = exports.SHOW_LOGIN_SOCIAL = exports.GET_ORGANIZATION_BY_ID = exports.GET_WORK_SPACES = exports.GET_MENUS = exports.GET_ORGANIZATIONS_BY_PARTY_ID = exports.GET_ACCESS_TOKEN_BY_OTP_QUERY = exports.CHECK_USER_LOGIN = exports.LOGIN_ZALO = exports.LOGIN_FACEBOOK = exports.LOGIN_GOOGLE = exports.CHECK_USERNAME_EXISTED = exports.GET_USER_LOGIN_BY_USER_LOGIN_ID = exports.GET_USER_LOGIN_BY_TOKEN = exports.GET_USER_DETAIL_V2 = exports.GET_USER_DETAIL = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.GET_USER_DETAIL = (0, graphql_tag_1.gql) `
|
|
6
6
|
query GetUserDetail($orgId: String!, $accessToken: String!) {
|
|
@@ -23,6 +23,30 @@ exports.GET_USER_DETAIL = (0, graphql_tag_1.gql) `
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
`;
|
|
26
|
+
exports.GET_USER_DETAIL_V2 = (0, graphql_tag_1.gql) `
|
|
27
|
+
query GetUserDetailV2($orgId: String!, $accessToken: String!) {
|
|
28
|
+
getUserDetail(orgId: $orgId, accessToken: $accessToken) {
|
|
29
|
+
partyId
|
|
30
|
+
orgId
|
|
31
|
+
fullName
|
|
32
|
+
email
|
|
33
|
+
phone
|
|
34
|
+
address
|
|
35
|
+
identityNumber
|
|
36
|
+
gender
|
|
37
|
+
birthDate
|
|
38
|
+
avatarUrl
|
|
39
|
+
accessToken
|
|
40
|
+
username
|
|
41
|
+
orgPermissionsMap
|
|
42
|
+
orgPositionsMap
|
|
43
|
+
orgRolesMap
|
|
44
|
+
readyV2
|
|
45
|
+
lastVerified
|
|
46
|
+
level
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
26
50
|
exports.GET_USER_LOGIN_BY_TOKEN = (0, graphql_tag_1.gql) `
|
|
27
51
|
query GetUserLoginByToken($accessToken: String!) {
|
|
28
52
|
getUserLoginByToken(accessToken: $accessToken) {
|
|
@@ -24,6 +24,7 @@ export declare class AuthService extends Service {
|
|
|
24
24
|
*/
|
|
25
25
|
register(registerRequest: RegisterRequest): Promise<void>;
|
|
26
26
|
getUserDetail(accessToken: string): Promise<any>;
|
|
27
|
+
getUserDetailV2(accessToken: string): Promise<any>;
|
|
27
28
|
/**
|
|
28
29
|
* Retrieves user login information using the provided access token.
|
|
29
30
|
*
|
|
@@ -76,6 +76,22 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
+
getUserDetailV2(accessToken) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
const variables = {
|
|
82
|
+
orgId: this.orgId,
|
|
83
|
+
accessToken,
|
|
84
|
+
};
|
|
85
|
+
try {
|
|
86
|
+
const response = yield this.graphqlQuery(queries_1.GET_USER_DETAIL_V2, variables);
|
|
87
|
+
return response.getUserDetail;
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
console.log(`Error in getUserDetailV2: ${error}`);
|
|
91
|
+
throw error;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
79
95
|
/**
|
|
80
96
|
* Retrieves user login information using the provided access token.
|
|
81
97
|
*
|