@longvansoftware/service-js-client 1.6.2 → 1.6.4

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.
@@ -2,3 +2,4 @@ export declare const GET_USER_DETAIL: import("graphql").DocumentNode;
2
2
  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
+ export declare const GET_USER_LOGIN_BY_PARTY_ID: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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_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!) {
@@ -50,3 +50,16 @@ exports.CHECK_USERNAME_EXISTED = (0, graphql_tag_1.gql) `
50
50
  checkUsernameExisted(username: $username, orgId: $orgId)
51
51
  }
52
52
  `;
53
+ exports.GET_USER_LOGIN_BY_PARTY_ID = (0, graphql_tag_1.gql) `
54
+ query GetUserLoginsByPartyId($partyId: String!) {
55
+ getUserLoginsByPartyId(partyId: $partyId) {
56
+ id
57
+ userLoginId
58
+ accessToken
59
+ status
60
+ partyId
61
+ profile
62
+ type
63
+ }
64
+ }
65
+ `;
@@ -35,4 +35,5 @@ export declare class AuthService extends Service {
35
35
  linkingUserLoginAndUserDetail(userLoginId: string, partyId: string): Promise<any>;
36
36
  getUserLoginByUserLoginId(userLoginId: string): Promise<any>;
37
37
  checkUsernameExisted(username: string): Promise<any>;
38
+ getUserLoginsByPartyId(partyId: string): Promise<any>;
38
39
  }
@@ -224,5 +224,21 @@ class AuthService extends serviceSDK_1.Service {
224
224
  }
225
225
  });
226
226
  }
227
+ getUserLoginsByPartyId(partyId) {
228
+ return __awaiter(this, void 0, void 0, function* () {
229
+ const query = queries_1.GET_USER_LOGIN_BY_PARTY_ID;
230
+ const variables = {
231
+ partyId,
232
+ };
233
+ try {
234
+ const response = yield this.graphqlQuery(query, variables);
235
+ return response.getUserLoginsByPartyId;
236
+ }
237
+ catch (error) {
238
+ console.log(`Error in getUserLoginsByPartyId: ${error}`);
239
+ throw error;
240
+ }
241
+ });
242
+ }
227
243
  }
228
244
  exports.AuthService = AuthService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "1.6.2",
3
+ "version": "1.6.4",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [