@longvansoftware/storefront-js-client 4.4.5 → 4.4.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.
@@ -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($partyId: String!) {
132
- getOrganizationsByPartyId(partyId: $partyId) {
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
@@ -1,2 +1,3 @@
1
1
  export declare const SEARCH_SERVICE: import("graphql").DocumentNode;
2
2
  export declare const SERVICE_DETAIL: import("graphql").DocumentNode;
3
+ export declare const SEARCH_SERVICE_BY_PHONE: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SERVICE_DETAIL = exports.SEARCH_SERVICE = void 0;
3
+ exports.SEARCH_SERVICE_BY_PHONE = exports.SERVICE_DETAIL = exports.SEARCH_SERVICE = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.SEARCH_SERVICE = (0, graphql_tag_1.gql) `
6
6
  query SearchService($filter: CloudServiceFilterInput) {
@@ -125,3 +125,44 @@ exports.SERVICE_DETAIL = (0, graphql_tag_1.gql) `
125
125
  }
126
126
  }
127
127
  `;
128
+ exports.SEARCH_SERVICE_BY_PHONE = (0, graphql_tag_1.gql) `
129
+ query SearchServiceByPhone($phone: String, $serviceScope: String) {
130
+ searchServiceByPhone(phone: $phone, serviceScope: $serviceScope) {
131
+ total
132
+ offset
133
+ maxResult
134
+ resultList {
135
+ supplierId
136
+ serviceId
137
+ partnerId
138
+ serviceName
139
+ serviceGroup
140
+ type
141
+ typeName
142
+ status
143
+ statusFulfillment
144
+ ownerId
145
+ startDate
146
+ endDate
147
+ serviceType
148
+ urlPrivate
149
+ urlPublic
150
+ username
151
+ password
152
+ attrs
153
+ description
154
+ ips
155
+ productGroupId
156
+ orderId
157
+ sponsorId
158
+ sponsorName
159
+ providedFromId
160
+ providedFromName
161
+ productConfiguration {
162
+ productId
163
+ productTitle
164
+ }
165
+ }
166
+ }
167
+ }
168
+ `;
@@ -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 {
@@ -4,4 +4,5 @@ export declare class CloudCloudService extends Service {
4
4
  searchService(data: any): Promise<any>;
5
5
  serviceDetail(serviceId: string): Promise<any>;
6
6
  updateDescription(serviceId: string, description: string, updatedBy: string): Promise<any>;
7
+ searchServiceByPhone(phone: string, serviceScope: string): Promise<any>;
7
8
  }
@@ -53,7 +53,7 @@ class CloudCloudService extends serviceSDK_1.Service {
53
53
  const variables = {
54
54
  serviceId,
55
55
  description,
56
- updatedBy
56
+ updatedBy,
57
57
  };
58
58
  try {
59
59
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -64,5 +64,21 @@ class CloudCloudService extends serviceSDK_1.Service {
64
64
  }
65
65
  });
66
66
  }
67
+ searchServiceByPhone(phone, serviceScope) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ const query = queries_1.SEARCH_SERVICE_BY_PHONE;
70
+ const variables = {
71
+ phone,
72
+ serviceScope,
73
+ };
74
+ try {
75
+ const response = yield this.graphqlQueryV4(query, variables);
76
+ return response.searchServiceByPhone;
77
+ }
78
+ catch (error) {
79
+ throw error;
80
+ }
81
+ });
82
+ }
67
83
  }
68
84
  exports.CloudCloudService = CloudCloudService;
@@ -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/LONGVAN/available/${empId}`;
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "4.4.5",
3
+ "version": "4.4.7",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [