@longvansoftware/service-js-client 1.6.8 → 1.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.
@@ -3,3 +3,5 @@ export declare const GET_USER_LOGIN_BY_TOKEN: import("graphql").DocumentNode;
|
|
3
3
|
export declare const GET_USER_LOGIN_BY_USER_LOGIN_ID: import("graphql").DocumentNode;
|
4
4
|
export declare const CHECK_USERNAME_EXISTED: import("graphql").DocumentNode;
|
5
5
|
export declare const GET_USER_LOGIN_BY_PARTY_ID: import("graphql").DocumentNode;
|
6
|
+
export declare const GET_PHONE_BY_PARTYID: import("graphql").DocumentNode;
|
7
|
+
export declare const GET_EMAIL_BY_PARTYID: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GET_USER_LOGIN_BY_PARTY_ID = 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_EMAIL_BY_PARTYID = exports.GET_PHONE_BY_PARTYID = exports.GET_USER_LOGIN_BY_PARTY_ID = exports.CHECK_USERNAME_EXISTED = exports.GET_USER_LOGIN_BY_USER_LOGIN_ID = exports.GET_USER_LOGIN_BY_TOKEN = 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!) {
|
@@ -63,3 +63,13 @@ exports.GET_USER_LOGIN_BY_PARTY_ID = (0, graphql_tag_1.gql) `
|
|
63
63
|
}
|
64
64
|
}
|
65
65
|
`;
|
66
|
+
exports.GET_PHONE_BY_PARTYID = (0, graphql_tag_1.gql) `
|
67
|
+
query GetPhoneByPartyId($partyId: String!) {
|
68
|
+
getPhoneByPartyId(partyId: $partyId)
|
69
|
+
}
|
70
|
+
`;
|
71
|
+
exports.GET_EMAIL_BY_PARTYID = (0, graphql_tag_1.gql) `
|
72
|
+
query GetEmailByPartyId($partyId: String!) {
|
73
|
+
getEmailByPartyId(partyId: $partyId)
|
74
|
+
}
|
75
|
+
`;
|
@@ -40,4 +40,6 @@ export declare class AuthService extends Service {
|
|
40
40
|
validateOTP(otpCode: string, phone: string): Promise<any>;
|
41
41
|
createUserLogin(userLoginId: string): Promise<any>;
|
42
42
|
createUserDetailWithoutUserLogin(name: string, phone: string, email: string): Promise<any>;
|
43
|
+
getPhoneByPartyId(partyId: string): Promise<any>;
|
44
|
+
getEmailByPartyId(partyId: string): Promise<any>;
|
43
45
|
}
|
@@ -309,5 +309,37 @@ class AuthService extends serviceSDK_1.Service {
|
|
309
309
|
}
|
310
310
|
});
|
311
311
|
}
|
312
|
+
getPhoneByPartyId(partyId) {
|
313
|
+
return __awaiter(this, void 0, void 0, function* () {
|
314
|
+
const query = queries_1.GET_PHONE_BY_PARTYID;
|
315
|
+
const variables = {
|
316
|
+
partyId,
|
317
|
+
};
|
318
|
+
try {
|
319
|
+
const response = yield this.graphqlQuery(query, variables);
|
320
|
+
return response.getPhoneByPartyId;
|
321
|
+
}
|
322
|
+
catch (error) {
|
323
|
+
console.log(`Error in getPhoneByPartyId: ${error}`);
|
324
|
+
throw error;
|
325
|
+
}
|
326
|
+
});
|
327
|
+
}
|
328
|
+
getEmailByPartyId(partyId) {
|
329
|
+
return __awaiter(this, void 0, void 0, function* () {
|
330
|
+
const query = queries_1.GET_EMAIL_BY_PARTYID;
|
331
|
+
const variables = {
|
332
|
+
partyId,
|
333
|
+
};
|
334
|
+
try {
|
335
|
+
const response = yield this.graphqlQuery(query, variables);
|
336
|
+
return response.getEmailByPartyId;
|
337
|
+
}
|
338
|
+
catch (error) {
|
339
|
+
console.log(`Error in getEmailByPartyId: ${error}`);
|
340
|
+
throw error;
|
341
|
+
}
|
342
|
+
});
|
343
|
+
}
|
312
344
|
}
|
313
345
|
exports.AuthService = AuthService;
|