@longvansoftware/storefront-js-client 4.6.8 → 4.6.9

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.
@@ -0,0 +1 @@
1
+ export declare const SEARCH_SERVICE: import("graphql").DocumentNode;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SEARCH_SERVICE = void 0;
4
+ const graphql_tag_1 = require("graphql-tag");
5
+ exports.SEARCH_SERVICE = (0, graphql_tag_1.gql) `
6
+ query SearchService($filter: CloudServiceFilterInput) {
7
+ searchService(filter: $filter) {
8
+ total
9
+ offset
10
+ maxResult
11
+ resultList {
12
+ supplierId
13
+ serviceId
14
+ partnerId
15
+ serviceName
16
+ type
17
+ typeName
18
+ status
19
+ statusFulfillment
20
+ ownerId
21
+ startDate
22
+ endDate
23
+ serviceType
24
+ urlPrivate
25
+ urlPublic
26
+ username
27
+ password
28
+ attrs
29
+ description
30
+ productGroupId
31
+ orderId
32
+ actionRequest {
33
+ id
34
+ name
35
+ uri
36
+ type
37
+ }
38
+ billingCycle {
39
+ quantity
40
+ unit
41
+ }
42
+ productConfiguration {
43
+ productId
44
+ productTitle
45
+ productResources {
46
+ name
47
+ quantity
48
+ unit
49
+ productId
50
+ giftProductId
51
+ gift
52
+ giftQuantity
53
+ campaignId
54
+ campaignActionId
55
+ qualify
56
+ idParent
57
+ addQuantity
58
+ defaultQuantity
59
+ title
60
+ price
61
+ unitPrice
62
+ totalResource
63
+ unitGift
64
+ giftDuration
65
+ giftDurationUnit
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+ `;
@@ -12,6 +12,7 @@ export declare const GET_BRAND_DETAIL_QUERY = "\n query GetBrandDetail($partner
12
12
  export declare const GET_PRODUCT_OPTION: DocumentNode;
13
13
  export declare const GET_POLICY: DocumentNode;
14
14
  export declare const GET_STORES: DocumentNode;
15
+ export declare const GET_STORES_V2: DocumentNode;
15
16
  export declare const GET_DETAIL_STORES: DocumentNode;
16
17
  export declare const GET_PRODUCT_IMAGE: DocumentNode;
17
18
  export declare const GET_PRODUCT: DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC = exports.GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER = exports.GET_PRODUCT_MARKET_PLACE_BY_ID = exports.GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG = exports.GET_PRODUCT_MARKET_PLACE = exports.GET_PRODUCT_STORE_PUBLIC = exports.GET_PRODUCT_STORE_BY_SCOPE = exports.GET_TAGS_BY_PRODUCT = exports.GET_CATEGORY_BY_HANDLE = exports.GET_CATEGORY_BY_ID = exports.GET_PRODUCT_BY_GROUPID = exports.GET_TAGS = exports.GET_BRAND = exports.GET_GROUPS = exports.GET_PRODUCT_TEMPLATES = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_UNITS = exports.GET_PRODUCT = exports.GET_PRODUCT_IMAGE = exports.GET_DETAIL_STORES = exports.GET_STORES = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_SIMPLE_PRODUCT_BY_ID_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
3
+ exports.GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC = exports.GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER = exports.GET_PRODUCT_MARKET_PLACE_BY_ID = exports.GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG = exports.GET_PRODUCT_MARKET_PLACE = exports.GET_PRODUCT_STORE_PUBLIC = exports.GET_PRODUCT_STORE_BY_SCOPE = exports.GET_TAGS_BY_PRODUCT = exports.GET_CATEGORY_BY_HANDLE = exports.GET_CATEGORY_BY_ID = exports.GET_PRODUCT_BY_GROUPID = exports.GET_TAGS = exports.GET_BRAND = exports.GET_GROUPS = exports.GET_PRODUCT_TEMPLATES = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_UNITS = exports.GET_PRODUCT = exports.GET_PRODUCT_IMAGE = exports.GET_DETAIL_STORES = exports.GET_STORES_V2 = exports.GET_STORES = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_SIMPLE_PRODUCT_BY_ID_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  // export const GET_PRODUCT_BY_ID_QUERY = gql`
6
6
  // query GetProductById(
@@ -500,7 +500,7 @@ exports.GET_SIMPLE_PRODUCTS_QUERY = (0, graphql_tag_1.gql) `
500
500
  vat
501
501
  qualify
502
502
  parentId
503
-
503
+
504
504
  handle
505
505
  price
506
506
  compareAtPrice
@@ -713,6 +713,65 @@ exports.GET_STORES = (0, graphql_tag_1.gql) `
713
713
  }
714
714
  }
715
715
  `;
716
+ exports.GET_STORES_V2 = (0, graphql_tag_1.gql) `
717
+ query GetStores(
718
+ $partnerId: String!
719
+ $enable: Boolean
720
+ $type: String
721
+ $enablePortal: Boolean
722
+ ) {
723
+ getStores(
724
+ partnerId: $partnerId
725
+ enable: $enable
726
+ type: $type
727
+ enablePortal: $enablePortal
728
+ ) {
729
+ id
730
+ createdStamp
731
+ name
732
+ type
733
+ enable
734
+ partyId
735
+ warehouses
736
+ warehouseIdDefault
737
+ enableOrderAbleFuture
738
+ enableOrderNegativeQuantity
739
+ storeEcommerceName
740
+ shippingCompanies
741
+ shippingCompanyIdPrimary
742
+ customerIdPrimary
743
+ paymentMethodIdPrimary
744
+ enableCustomProductPrice
745
+ enablePaymentPartial
746
+ paymentPartialPercent
747
+ productStoreLink
748
+ applyVat
749
+ scope
750
+ description {
751
+ name
752
+ phone
753
+ address
754
+ footer
755
+ description
756
+ slug
757
+ logo
758
+ banner
759
+ ward
760
+ wardId
761
+ province
762
+ provinceId
763
+ showLogo
764
+ showBanner
765
+ showMap
766
+ showInfoStore
767
+ showBarcode
768
+ showFooter
769
+ showVat
770
+ showPromotion
771
+ }
772
+ }
773
+ }
774
+ `;
716
775
  exports.GET_DETAIL_STORES = (0, graphql_tag_1.gql) `
717
776
  query GetDetailStores($partnerId: String!, $storeId: String!) {
718
777
  getDetailStores(partnerId: $partnerId, storeId: $storeId) {
@@ -1185,13 +1244,13 @@ exports.GET_PRODUCT_STORE_PUBLIC = (0, graphql_tag_1.gql) `
1185
1244
  exports.GET_PRODUCT_MARKET_PLACE = (0, graphql_tag_1.gql) `
1186
1245
  query GetProductMarketplace(
1187
1246
  $storeChannel: String!
1188
- $currentPage:Int
1247
+ $currentPage: Int
1189
1248
  $maxResult: Int
1190
1249
  ) {
1191
1250
  getProductMarketplace(
1192
1251
  storeChannel: $storeChannel
1193
- currentPage:$currentPage
1194
- maxResult:$maxResult
1252
+ currentPage: $currentPage
1253
+ maxResult: $maxResult
1195
1254
  ) {
1196
1255
  total
1197
1256
  currentPage
@@ -0,0 +1,5 @@
1
+ import { Service } from "../serviceSDK";
2
+ export declare class CloudServiceService extends Service {
3
+ constructor(endpoint: string, orgId: string, storeId: string);
4
+ searchService(data: any): Promise<any>;
5
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CloudServiceService = void 0;
13
+ const serviceSDK_1 = require("../serviceSDK");
14
+ const queries_1 = require("../../graphql/cloudService/queries");
15
+ class CloudServiceService extends serviceSDK_1.Service {
16
+ constructor(endpoint, orgId, storeId) {
17
+ super(endpoint, orgId, storeId);
18
+ }
19
+ searchService(data) {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ const query = queries_1.SEARCH_SERVICE;
22
+ const variables = {
23
+ filter: data,
24
+ };
25
+ try {
26
+ const response = yield this.graphqlQueryV4(query, variables);
27
+ return response.searchService;
28
+ }
29
+ catch (error) {
30
+ throw error;
31
+ }
32
+ });
33
+ }
34
+ }
35
+ exports.CloudServiceService = CloudServiceService;
@@ -93,4 +93,5 @@ export declare class ProductService extends Service {
93
93
  getProductMarketplaceDetailById(storeChannel: string, id: string): Promise<any>;
94
94
  getProductMarketplaceBySupplier(dataQuery: any): Promise<any>;
95
95
  getProductSimpleByHandle(handle: string, store: string, fields: string[]): Promise<any>;
96
+ getStoresAndDescription(dataQuery: any): Promise<any>;
96
97
  }
@@ -1092,5 +1092,17 @@ class ProductService extends serviceSDK_1.Service {
1092
1092
  }
1093
1093
  });
1094
1094
  }
1095
+ getStoresAndDescription(dataQuery) {
1096
+ return __awaiter(this, void 0, void 0, function* () {
1097
+ const queries = queries_1.GET_STORES_V2;
1098
+ try {
1099
+ const response = yield this.graphqlQuery(queries, dataQuery);
1100
+ return response.getStores;
1101
+ }
1102
+ catch (error) {
1103
+ throw error;
1104
+ }
1105
+ });
1106
+ }
1095
1107
  }
1096
1108
  exports.ProductService = ProductService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "4.6.8",
3
+ "version": "4.6.9",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [