@longvansoftware/storefront-js-client 4.1.1 → 4.1.2
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.
|
@@ -10,3 +10,4 @@ export declare const GET_ACCESS_TOKEN_BY_OTP_QUERY: import("graphql").DocumentNo
|
|
|
10
10
|
export declare const GET_ORGANIZATIONS_BY_PARTY_ID: import("graphql").DocumentNode;
|
|
11
11
|
export declare const GET_MENUS: import("graphql").DocumentNode;
|
|
12
12
|
export declare const GET_WORK_SPACES: import("graphql").DocumentNode;
|
|
13
|
+
export declare const GET_ORGANIZATION_BY_ID: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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_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;
|
|
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!) {
|
|
@@ -191,3 +191,26 @@ exports.GET_WORK_SPACES = (0, graphql_tag_1.gql) `
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
`;
|
|
194
|
+
exports.GET_ORGANIZATION_BY_ID = (0, graphql_tag_1.gql) `
|
|
195
|
+
query GetOrganizationById($orgId: String!) {
|
|
196
|
+
getOrganizationById(orgId: $orgId) {
|
|
197
|
+
id
|
|
198
|
+
partyId
|
|
199
|
+
codeId
|
|
200
|
+
groupName
|
|
201
|
+
groupType
|
|
202
|
+
shortName
|
|
203
|
+
groupNameLocal
|
|
204
|
+
officeSiteName
|
|
205
|
+
comments
|
|
206
|
+
logoImageUrl
|
|
207
|
+
isIncorporated
|
|
208
|
+
federalTaxId
|
|
209
|
+
description
|
|
210
|
+
deleted
|
|
211
|
+
status
|
|
212
|
+
positionIndexId
|
|
213
|
+
prefix
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
`;
|
|
@@ -144,4 +144,5 @@ export declare class AuthService extends Service {
|
|
|
144
144
|
getMenus(partyId: string, workspaceId: string, scope: string): Promise<any>;
|
|
145
145
|
getWorkspaces(partyId: string, scope: string): Promise<any>;
|
|
146
146
|
logout(token: string): Promise<any>;
|
|
147
|
+
getOrganizationById(orgId: string): Promise<any>;
|
|
147
148
|
}
|
|
@@ -698,5 +698,20 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
698
698
|
}
|
|
699
699
|
});
|
|
700
700
|
}
|
|
701
|
+
getOrganizationById(orgId) {
|
|
702
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
703
|
+
const query = queries_1.GET_ORGANIZATION_BY_ID;
|
|
704
|
+
const variables = {
|
|
705
|
+
orgId,
|
|
706
|
+
};
|
|
707
|
+
try {
|
|
708
|
+
const response = yield this.graphqlQueryV4(query, variables);
|
|
709
|
+
return response.getOrganizationById;
|
|
710
|
+
}
|
|
711
|
+
catch (error) {
|
|
712
|
+
throw error;
|
|
713
|
+
}
|
|
714
|
+
});
|
|
715
|
+
}
|
|
701
716
|
}
|
|
702
717
|
exports.AuthService = AuthService;
|