@longvansoftware/storefront-js-client 4.4.5 → 4.4.6
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.
|
@@ -128,8 +128,16 @@ exports.GET_ACCESS_TOKEN_BY_OTP_QUERY = (0, graphql_tag_1.gql) `
|
|
|
128
128
|
}
|
|
129
129
|
`;
|
|
130
130
|
exports.GET_ORGANIZATIONS_BY_PARTY_ID = (0, graphql_tag_1.gql) `
|
|
131
|
-
query GetOrganizationsByPartyId(
|
|
132
|
-
|
|
131
|
+
query GetOrganizationsByPartyId(
|
|
132
|
+
$partyId: String!
|
|
133
|
+
$serviceOperator: String!
|
|
134
|
+
$role: String
|
|
135
|
+
) {
|
|
136
|
+
getOrganizationsByPartyId(
|
|
137
|
+
partyId: $partyId
|
|
138
|
+
serviceOperator: $serviceOperator
|
|
139
|
+
role: $role
|
|
140
|
+
) {
|
|
133
141
|
id
|
|
134
142
|
partyId
|
|
135
143
|
codeId
|
|
@@ -226,8 +234,8 @@ exports.SHOW_LOGIN_SOCIAL = (0, graphql_tag_1.gql) `
|
|
|
226
234
|
}
|
|
227
235
|
`;
|
|
228
236
|
exports.GET_PARTY_DETAILS_BY_PHONE = (0, graphql_tag_1.gql) `
|
|
229
|
-
query GetPartyDetailsByPhone($phone: String
|
|
230
|
-
getPartyDetailsByPhone(phone: $phone) {
|
|
237
|
+
query GetPartyDetailsByPhone($phone: String!, $serviceOperator: String) {
|
|
238
|
+
getPartyDetailsByPhone(phone: $phone, serviceOperator: $serviceOperator) {
|
|
231
239
|
id
|
|
232
240
|
name
|
|
233
241
|
phone
|
|
@@ -140,11 +140,11 @@ export declare class AuthService extends Service {
|
|
|
140
140
|
createResetKey(userLoginId: string): Promise<any>;
|
|
141
141
|
checkResetKey(resetKey: string): Promise<any>;
|
|
142
142
|
resetPasswordV2(orgId: string, username: string, newPassword: string, accessToken: string): Promise<any>;
|
|
143
|
-
getOrganizationsByPartyId(partyId: String): Promise<any>;
|
|
143
|
+
getOrganizationsByPartyId(partyId: String, serviceOperator: string, role: String): Promise<any>;
|
|
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
147
|
getOrganizationById(orgId: string): Promise<any>;
|
|
148
148
|
showLoginSocial(data: any): Promise<any>;
|
|
149
|
-
getPartyDetailsByPhone(phone: string): Promise<any>;
|
|
149
|
+
getPartyDetailsByPhone(phone: string, serviceOperator: string): Promise<any>;
|
|
150
150
|
}
|
|
@@ -636,11 +636,13 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
636
636
|
}
|
|
637
637
|
});
|
|
638
638
|
}
|
|
639
|
-
getOrganizationsByPartyId(partyId) {
|
|
639
|
+
getOrganizationsByPartyId(partyId, serviceOperator, role) {
|
|
640
640
|
return __awaiter(this, void 0, void 0, function* () {
|
|
641
641
|
const mutation = queries_1.GET_ORGANIZATIONS_BY_PARTY_ID;
|
|
642
642
|
const variables = {
|
|
643
643
|
partyId,
|
|
644
|
+
serviceOperator,
|
|
645
|
+
role,
|
|
644
646
|
};
|
|
645
647
|
try {
|
|
646
648
|
const response = yield this.graphqlQueryV4(mutation, variables);
|
|
@@ -729,10 +731,11 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
729
731
|
}
|
|
730
732
|
});
|
|
731
733
|
}
|
|
732
|
-
getPartyDetailsByPhone(phone) {
|
|
734
|
+
getPartyDetailsByPhone(phone, serviceOperator) {
|
|
733
735
|
return __awaiter(this, void 0, void 0, function* () {
|
|
734
736
|
const query = queries_1.GET_PARTY_DETAILS_BY_PHONE;
|
|
735
737
|
const variables = {
|
|
738
|
+
serviceOperator,
|
|
736
739
|
phone,
|
|
737
740
|
};
|
|
738
741
|
try {
|
|
@@ -26,5 +26,5 @@ export declare class StoreService extends Service {
|
|
|
26
26
|
* @returns A promise that resolves to the available store channels.
|
|
27
27
|
* @throws If an error occurs while fetching the store channels.
|
|
28
28
|
*/
|
|
29
|
-
getAvailableStoreChannels(empId: string): Promise<any>;
|
|
29
|
+
getAvailableStoreChannels(orgId: string, empId: string): Promise<any>;
|
|
30
30
|
}
|
|
@@ -56,9 +56,9 @@ class StoreService extends serviceSDK_1.Service {
|
|
|
56
56
|
* @returns A promise that resolves to the available store channels.
|
|
57
57
|
* @throws If an error occurs while fetching the store channels.
|
|
58
58
|
*/
|
|
59
|
-
getAvailableStoreChannels(empId) {
|
|
59
|
+
getAvailableStoreChannels(orgId, empId) {
|
|
60
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
const endpoint = `/store-channels/
|
|
61
|
+
const endpoint = `/store-channels/${orgId}/available/${empId}`;
|
|
62
62
|
const method = "GET";
|
|
63
63
|
try {
|
|
64
64
|
const response = yield this.restApiCallWithToken(endpoint, method);
|