@longvansoftware/storefront-js-client 4.4.4 → 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.
@@ -163,12 +163,19 @@ exports.CREATE_USER_DETAIL_MUTATION = (0, graphql_tag_1.gql) `
163
163
  `;
164
164
  exports.CREATE_USER_DETAIL_MUTATION_V2 = (0, graphql_tag_1.gql) `
165
165
  mutation CreateUserDetail(
166
- $userLoginId: String!
167
- $orgId: String!
166
+ $userLoginId: String
167
+ $orgId: String
168
168
  $phone: String
169
+ $serviceOperator: String
169
170
  ) {
170
- createUserDetail(userLoginId: $userLoginId, orgId: $orgId, phone: $phone) {
171
+ createUserDetail(
172
+ userLoginId: $userLoginId
173
+ orgId: $orgId
174
+ phone: $phone
175
+ serviceOperator: $serviceOperator
176
+ ) {
171
177
  partyId
178
+ partyType
172
179
  orgId
173
180
  fullName
174
181
  email
@@ -184,6 +191,7 @@ exports.CREATE_USER_DETAIL_MUTATION_V2 = (0, graphql_tag_1.gql) `
184
191
  orgPermissionsMap
185
192
  orgPositionsMap
186
193
  orgRolesMap
194
+ lastVerified
187
195
  }
188
196
  }
189
197
  `;
@@ -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
@@ -37,7 +37,7 @@ export declare class AuthService extends Service {
37
37
  checkUsernameExisted(username: string): Promise<any>;
38
38
  linkingUserLoginAndUserDetail(userLoginId: string, partyId: string): Promise<any>;
39
39
  createUserDetail(userLoginId: string): Promise<any>;
40
- createUserDetailV2(userLoginId: string, phone: string): Promise<any>;
40
+ createUserDetailV2(orgId: string, userLoginId: string, phone: string, serviceOperator: string): Promise<any>;
41
41
  createUserDetailV3(userLoginId: string, phone: string, name: string, email: string): Promise<any>;
42
42
  sendSmsVerifyCode(username: string): Promise<any>;
43
43
  verifyCode(username: string, code: string): Promise<any>;
@@ -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
  }
@@ -181,12 +181,13 @@ class AuthService extends serviceSDK_1.Service {
181
181
  }
182
182
  });
183
183
  }
184
- createUserDetailV2(userLoginId, phone) {
184
+ createUserDetailV2(orgId, userLoginId, phone, serviceOperator) {
185
185
  return __awaiter(this, void 0, void 0, function* () {
186
186
  const variables = {
187
+ orgId,
187
188
  userLoginId,
188
- orgId: this.orgId,
189
189
  phone,
190
+ serviceOperator,
190
191
  };
191
192
  try {
192
193
  const response = yield this.graphqlMutation(mutations_1.CREATE_USER_DETAIL_MUTATION_V2, variables);
@@ -635,11 +636,13 @@ class AuthService extends serviceSDK_1.Service {
635
636
  }
636
637
  });
637
638
  }
638
- getOrganizationsByPartyId(partyId) {
639
+ getOrganizationsByPartyId(partyId, serviceOperator, role) {
639
640
  return __awaiter(this, void 0, void 0, function* () {
640
641
  const mutation = queries_1.GET_ORGANIZATIONS_BY_PARTY_ID;
641
642
  const variables = {
642
643
  partyId,
644
+ serviceOperator,
645
+ role,
643
646
  };
644
647
  try {
645
648
  const response = yield this.graphqlQueryV4(mutation, variables);
@@ -728,10 +731,11 @@ class AuthService extends serviceSDK_1.Service {
728
731
  }
729
732
  });
730
733
  }
731
- getPartyDetailsByPhone(phone) {
734
+ getPartyDetailsByPhone(phone, serviceOperator) {
732
735
  return __awaiter(this, void 0, void 0, function* () {
733
736
  const query = queries_1.GET_PARTY_DETAILS_BY_PHONE;
734
737
  const variables = {
738
+ serviceOperator,
735
739
  phone,
736
740
  };
737
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/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.4",
3
+ "version": "4.4.6",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [