@longvansoftware/storefront-js-client 3.6.6 → 3.6.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.
|
@@ -9,3 +9,4 @@ export declare const CHECK_USER_LOGIN: import("graphql").DocumentNode;
|
|
|
9
9
|
export declare const GET_ACCESS_TOKEN_BY_OTP_QUERY: import("graphql").DocumentNode;
|
|
10
10
|
export declare const GET_ORGANIZATIONS_BY_PARTY_ID: import("graphql").DocumentNode;
|
|
11
11
|
export declare const GET_MENUS: import("graphql").DocumentNode;
|
|
12
|
+
export declare const GET_WORK_SPACES: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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_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!) {
|
|
@@ -140,3 +140,24 @@ exports.GET_MENUS = (0, graphql_tag_1.gql) `
|
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
`;
|
|
143
|
+
exports.GET_WORK_SPACES = (0, graphql_tag_1.gql) `
|
|
144
|
+
query GetWorkspaces($partyId: String!, $orgId: String!, $scope: String) {
|
|
145
|
+
getWorkspaces(partyId: $partyId, orgId: $orgId, scope: $scope) {
|
|
146
|
+
id
|
|
147
|
+
name
|
|
148
|
+
icon
|
|
149
|
+
menus {
|
|
150
|
+
id
|
|
151
|
+
name
|
|
152
|
+
icon
|
|
153
|
+
url
|
|
154
|
+
childrenMenu {
|
|
155
|
+
id
|
|
156
|
+
name
|
|
157
|
+
icon
|
|
158
|
+
url
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
`;
|
|
@@ -140,4 +140,5 @@ export declare class AuthService extends Service {
|
|
|
140
140
|
resetPasswordV2(orgId: string, username: string, newPassword: string, accessToken: string): Promise<any>;
|
|
141
141
|
getOrganizationsByPartyId(partyId: String): Promise<any>;
|
|
142
142
|
getMenus(partyId: string, workspaceId: string, scope: string): Promise<any>;
|
|
143
|
+
getWorkspaces(partyId: string, scope: string): Promise<any>;
|
|
143
144
|
}
|
|
@@ -625,5 +625,22 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
625
625
|
}
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
|
+
getWorkspaces(partyId, scope) {
|
|
629
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
630
|
+
const query = queries_1.GET_WORK_SPACES;
|
|
631
|
+
const variables = {
|
|
632
|
+
partyId: partyId,
|
|
633
|
+
orgId: this.orgId,
|
|
634
|
+
scope: scope,
|
|
635
|
+
};
|
|
636
|
+
try {
|
|
637
|
+
const response = yield this.graphqlQueryV4(query, variables);
|
|
638
|
+
return response.getWorkspaces;
|
|
639
|
+
}
|
|
640
|
+
catch (error) {
|
|
641
|
+
throw error;
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
}
|
|
628
645
|
}
|
|
629
646
|
exports.AuthService = AuthService;
|