@longvansoftware/storefront-js-client 3.6.7 → 3.6.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.
|
@@ -9,6 +9,7 @@ export declare const CREATE_PASSWORD_MUTATION: import("graphql").DocumentNode;
|
|
|
9
9
|
export declare const UPDATE_PROFILE_MUTATION: import("graphql").DocumentNode;
|
|
10
10
|
export declare const LINKING_USER_LOGIN_AND_USER_DETAIL_MUTATION: import("graphql").DocumentNode;
|
|
11
11
|
export declare const CREATE_USER_DETAIL_MUTATION: import("graphql").DocumentNode;
|
|
12
|
+
export declare const CREATE_USER_DETAIL_MUTATION_V2: import("graphql").DocumentNode;
|
|
12
13
|
export declare const CREATE_ORG_MUTATION: import("graphql").DocumentNode;
|
|
13
14
|
export declare const ADD_ROLE_USER_MUTATION: import("graphql").DocumentNode;
|
|
14
15
|
export declare const CREATE_USER_LOGIN_MUTATION: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RESET_PASSWORD = exports.CHECK_RESET_KEY = exports.CREATE_RESET_KEY = exports.VALIDATE_OTP_MUTATION = exports.SEND_OTP_MUTATION = exports.CREATE_USER_LOGIN_MUTATION = exports.ADD_ROLE_USER_MUTATION = exports.CREATE_ORG_MUTATION = exports.CREATE_USER_DETAIL_MUTATION = exports.LINKING_USER_LOGIN_AND_USER_DETAIL_MUTATION = exports.UPDATE_PROFILE_MUTATION = exports.CREATE_PASSWORD_MUTATION = exports.UPDATE_PASSWORD_MUTATION = exports.UPDATE_INFO_MUTATION = exports.RESET_PASSWORD_MUTATION = exports.VERIFY_CODE_MUTATION = exports.SEND_SMS_VERIFY_CODE_MUTATION = exports.REGISTER_MUTATION = exports.LOGIN_MUTATION = void 0;
|
|
3
|
+
exports.RESET_PASSWORD = exports.CHECK_RESET_KEY = exports.CREATE_RESET_KEY = exports.VALIDATE_OTP_MUTATION = exports.SEND_OTP_MUTATION = exports.CREATE_USER_LOGIN_MUTATION = exports.ADD_ROLE_USER_MUTATION = exports.CREATE_ORG_MUTATION = exports.CREATE_USER_DETAIL_MUTATION_V2 = exports.CREATE_USER_DETAIL_MUTATION = exports.LINKING_USER_LOGIN_AND_USER_DETAIL_MUTATION = exports.UPDATE_PROFILE_MUTATION = exports.CREATE_PASSWORD_MUTATION = exports.UPDATE_PASSWORD_MUTATION = exports.UPDATE_INFO_MUTATION = exports.RESET_PASSWORD_MUTATION = exports.VERIFY_CODE_MUTATION = exports.SEND_SMS_VERIFY_CODE_MUTATION = exports.REGISTER_MUTATION = exports.LOGIN_MUTATION = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.LOGIN_MUTATION = (0, graphql_tag_1.gql) `
|
|
6
6
|
mutation Login($loginRequest: LoginRequest!) {
|
|
@@ -161,6 +161,32 @@ exports.CREATE_USER_DETAIL_MUTATION = (0, graphql_tag_1.gql) `
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
`;
|
|
164
|
+
exports.CREATE_USER_DETAIL_MUTATION_V2 = (0, graphql_tag_1.gql) `
|
|
165
|
+
mutation CreateUserDetail(
|
|
166
|
+
$userLoginId: String!
|
|
167
|
+
$orgId: String!
|
|
168
|
+
$phone: String
|
|
169
|
+
) {
|
|
170
|
+
createUserDetail(userLoginId: $userLoginId, orgId: $orgId, phone: $phone) {
|
|
171
|
+
partyId
|
|
172
|
+
orgId
|
|
173
|
+
fullName
|
|
174
|
+
email
|
|
175
|
+
phone
|
|
176
|
+
address
|
|
177
|
+
identityNumber
|
|
178
|
+
gender
|
|
179
|
+
birthDate
|
|
180
|
+
avatarUrl
|
|
181
|
+
accessToken
|
|
182
|
+
username
|
|
183
|
+
readyV2
|
|
184
|
+
orgPermissionsMap
|
|
185
|
+
orgPositionsMap
|
|
186
|
+
orgRolesMap
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
`;
|
|
164
190
|
exports.CREATE_ORG_MUTATION = (0, graphql_tag_1.gql) `
|
|
165
191
|
mutation CreateOrg($orgName: String!) {
|
|
166
192
|
createOrg(orgName: $orgName) {
|
|
@@ -232,7 +258,7 @@ exports.VALIDATE_OTP_MUTATION = (0, graphql_tag_1.gql) `
|
|
|
232
258
|
`;
|
|
233
259
|
exports.CREATE_RESET_KEY = (0, graphql_tag_1.gql) `
|
|
234
260
|
mutation CreateResetKey($userLoginId: String!) {
|
|
235
|
-
createResetKey(userLoginId: $userLoginId)
|
|
261
|
+
createResetKey(userLoginId: $userLoginId)
|
|
236
262
|
}
|
|
237
263
|
`;
|
|
238
264
|
exports.CHECK_RESET_KEY = (0, graphql_tag_1.gql) `
|
|
@@ -37,6 +37,7 @@ export declare class AuthService extends Service {
|
|
|
37
37
|
checkUsernameExisted(username: string): Promise<any>;
|
|
38
38
|
linkingUserLoginAndUserDetail(userLoginId: string, partyId: string): Promise<any>;
|
|
39
39
|
createUserDetail(userLoginId: string): Promise<any>;
|
|
40
|
+
createUserDetailV2(userLoginId: string, phone: string): Promise<any>;
|
|
40
41
|
sendSmsVerifyCode(username: string): Promise<any>;
|
|
41
42
|
verifyCode(username: string, code: string): Promise<any>;
|
|
42
43
|
resetPassword(username: string, newPassword: string, accessToken: string): Promise<any>;
|
|
@@ -174,6 +174,23 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
174
174
|
}
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
|
+
createUserDetailV2(userLoginId, phone) {
|
|
178
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
+
const variables = {
|
|
180
|
+
userLoginId,
|
|
181
|
+
orgId: this.orgId,
|
|
182
|
+
phone,
|
|
183
|
+
};
|
|
184
|
+
try {
|
|
185
|
+
const response = yield this.graphqlMutation(mutations_1.CREATE_USER_DETAIL_MUTATION_V2, variables);
|
|
186
|
+
return response.createUserDetail;
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
console.log(`Error in createUserDetail: ${error}`);
|
|
190
|
+
throw error;
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}
|
|
177
194
|
// mutation VerifyCode {
|
|
178
195
|
// sendSmsVerifyCode(orgId: "FYP", username: "0971879660") {
|
|
179
196
|
// id
|