@longvansoftware/storefront-js-client 4.0.1 → 4.0.3

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.
@@ -19,3 +19,4 @@ export declare const VALIDATE_OTP_MUTATION: import("graphql").DocumentNode;
19
19
  export declare const CREATE_RESET_KEY: import("graphql").DocumentNode;
20
20
  export declare const CHECK_RESET_KEY: import("graphql").DocumentNode;
21
21
  export declare const RESET_PASSWORD: import("graphql").DocumentNode;
22
+ export declare const LOGOUT: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RESET_PASSWORD = exports.CHECK_RESET_KEY = exports.CREATE_RESET_KEY = exports.VALIDATE_OTP_MUTATION = exports.SEND_OTP_MUTATION = exports.CREATE_USER_LOGIN_MUTATION = exports.ADD_ROLE_USER_MUTATION = exports.CREATE_ORG_MUTATION = exports.CREATE_USER_DETAIL_MUTATION_V3 = exports.CREATE_USER_DETAIL_MUTATION_V2 = exports.CREATE_USER_DETAIL_MUTATION = exports.LINKING_USER_LOGIN_AND_USER_DETAIL_MUTATION = exports.UPDATE_PROFILE_MUTATION = exports.CREATE_PASSWORD_MUTATION = exports.UPDATE_PASSWORD_MUTATION = exports.UPDATE_INFO_MUTATION = exports.RESET_PASSWORD_MUTATION = exports.VERIFY_CODE_MUTATION = exports.SEND_SMS_VERIFY_CODE_MUTATION = exports.REGISTER_MUTATION = exports.LOGIN_MUTATION = void 0;
3
+ exports.LOGOUT = exports.RESET_PASSWORD = exports.CHECK_RESET_KEY = exports.CREATE_RESET_KEY = exports.VALIDATE_OTP_MUTATION = exports.SEND_OTP_MUTATION = exports.CREATE_USER_LOGIN_MUTATION = exports.ADD_ROLE_USER_MUTATION = exports.CREATE_ORG_MUTATION = exports.CREATE_USER_DETAIL_MUTATION_V3 = exports.CREATE_USER_DETAIL_MUTATION_V2 = exports.CREATE_USER_DETAIL_MUTATION = exports.LINKING_USER_LOGIN_AND_USER_DETAIL_MUTATION = exports.UPDATE_PROFILE_MUTATION = exports.CREATE_PASSWORD_MUTATION = exports.UPDATE_PASSWORD_MUTATION = exports.UPDATE_INFO_MUTATION = exports.RESET_PASSWORD_MUTATION = exports.VERIFY_CODE_MUTATION = exports.SEND_SMS_VERIFY_CODE_MUTATION = exports.REGISTER_MUTATION = exports.LOGIN_MUTATION = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.LOGIN_MUTATION = (0, graphql_tag_1.gql) `
6
6
  mutation Login($loginRequest: LoginRequest!) {
@@ -328,3 +328,8 @@ exports.RESET_PASSWORD = (0, graphql_tag_1.gql) `
328
328
  )
329
329
  }
330
330
  `;
331
+ exports.LOGOUT = (0, graphql_tag_1.gql) `
332
+ mutation Logout($accessToken: String!, $partyId: String!) {
333
+ logout(accessToken: $accessToken, partyId: $partyId)
334
+ }
335
+ `;
@@ -877,13 +877,79 @@ exports.GET_CATEGORY_BY_HANDLE = (0, graphql_tag_1.gql) `
877
877
  ) {
878
878
  id
879
879
  title
880
- image
881
- icon
880
+ subType
881
+ description
882
+ sku
883
+ shortDescription
884
+ weight
885
+ width
886
+ depth
887
+ height
888
+ vat
889
+ qualify
882
890
  parentId
883
- level
884
891
  handle
885
- description
886
- child {
892
+ price
893
+ displayPrice
894
+ hint
895
+ compareAtPrices
896
+ priceUnit
897
+ priceQuantity
898
+ priceType
899
+ salePolicy
900
+ priceTypeName
901
+ priceVaries
902
+ available
903
+ tags
904
+ options
905
+ optionsRelationship
906
+ compareAtPrice
907
+ featuredImage
908
+ version
909
+ images
910
+ brand {
911
+ id
912
+ createStamp
913
+ createdBy
914
+ name
915
+ image
916
+ imageIcon
917
+ }
918
+ unitDTO {
919
+ id
920
+ name
921
+ }
922
+ variants {
923
+ id
924
+ handle
925
+ title
926
+ price
927
+ priceType
928
+ compareAtPrice
929
+ options
930
+ optionsIds
931
+ featuredImage
932
+ sku
933
+ }
934
+ featureTypes {
935
+ id
936
+ name
937
+ position
938
+ type
939
+ subType
940
+ fill
941
+ requireData
942
+ otherItem
943
+ values
944
+ description
945
+ createStamp
946
+ createdBy
947
+ valuesFull {
948
+ id
949
+ name
950
+ }
951
+ }
952
+ categories {
887
953
  id
888
954
  title
889
955
  image
@@ -893,6 +959,12 @@ exports.GET_CATEGORY_BY_HANDLE = (0, graphql_tag_1.gql) `
893
959
  handle
894
960
  description
895
961
  }
962
+ groups {
963
+ id
964
+ name
965
+ policy
966
+ image
967
+ }
896
968
  }
897
969
  }
898
970
  `;
@@ -143,4 +143,5 @@ export declare class AuthService extends Service {
143
143
  getOrganizationsByPartyId(partyId: String): Promise<any>;
144
144
  getMenus(partyId: string, workspaceId: string, scope: string): Promise<any>;
145
145
  getWorkspaces(partyId: string, scope: string): Promise<any>;
146
+ logout(token: string): Promise<any>;
146
147
  }
@@ -682,5 +682,21 @@ class AuthService extends serviceSDK_1.Service {
682
682
  }
683
683
  });
684
684
  }
685
+ logout(token) {
686
+ return __awaiter(this, void 0, void 0, function* () {
687
+ const mutation = mutations_1.LOGOUT;
688
+ const variables = {
689
+ accessToken: token,
690
+ partyId: this.orgId,
691
+ };
692
+ try {
693
+ const response = yield this.graphqlMutation(mutation, variables);
694
+ return response.logout;
695
+ }
696
+ catch (error) {
697
+ throw error;
698
+ }
699
+ });
700
+ }
685
701
  }
686
702
  exports.AuthService = AuthService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [