@longvansoftware/storefront-js-client 2.0.3 → 2.0.5

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.
@@ -26,13 +26,13 @@ exports.environmentEndpoints = {
26
26
  auth: "https://crm.longvan.vn/authorization-gateway/graphql",
27
27
  order: "https://storefront.longvan.vn/v2",
28
28
  user: "https://user.longvan.vn/user-gateway/graphql",
29
- payment: "https://portal-staging.longvan.vn/invoice-gateway/graphql",
29
+ payment: "https://portal.longvan.vn/invoice-gateway/graphql",
30
30
  service: "https://api-gateway.longvan.vn/service-api/graphql",
31
31
  warehouse: "https://portal.longvan.vn/facility-api/public-facility/1.0.0/inventory-item",
32
32
  computing: "https://api-gateway.longvan.vn/computing-service/graphql",
33
33
  campaign: "https://crm.longvan.vn/campaign-gateway/graphql",
34
34
  image: "https://product-service.dev.longvan.vn/product-service/v1/products",
35
- paymentV2: "https://payment-staging.longvan.vn/graphql",
35
+ paymentV2: "https://payment.longvan.vn/graphql",
36
36
  warehouseV2: "https://portal.longvan.vn/facility-api/public-facility/1.0.0/product-inventory",
37
37
  deepLinkVietQr: "https://api.vietqr.io/v2",
38
38
  comhub: "https://com-hub.longvan.vn/com-hub/v1",
@@ -2,3 +2,4 @@ export declare const GET_CAMPAIGN_ACTION_ACTIVE_NOW: import("graphql").DocumentN
2
2
  export declare const GET_VOUCHERS: import("graphql").DocumentNode;
3
3
  export declare const CHECK_VALID_VOUCHER: import("graphql").DocumentNode;
4
4
  export declare const GET_CAMPAIGN_ACTIVE_NOW: import("graphql").DocumentNode;
5
+ export declare const GET_PROMOTION_PRODUCT_PRICE: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_CAMPAIGN_ACTIVE_NOW = exports.CHECK_VALID_VOUCHER = exports.GET_VOUCHERS = exports.GET_CAMPAIGN_ACTION_ACTIVE_NOW = void 0;
3
+ exports.GET_PROMOTION_PRODUCT_PRICE = exports.GET_CAMPAIGN_ACTIVE_NOW = exports.CHECK_VALID_VOUCHER = exports.GET_VOUCHERS = exports.GET_CAMPAIGN_ACTION_ACTIVE_NOW = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.GET_CAMPAIGN_ACTION_ACTIVE_NOW = (0, graphql_tag_1.gql) `
6
6
  query GetCampaignActionActiveNow(
@@ -52,8 +52,8 @@ exports.GET_VOUCHERS = (0, graphql_tag_1.gql) `
52
52
  campaignActionType: $campaignActionType
53
53
  customerId: $customerId
54
54
  excludeExpired: $excludeExpired
55
- pageNumber:$pageNumber
56
- pageSize:$pageSize
55
+ pageNumber: $pageNumber
56
+ pageSize: $pageSize
57
57
  }
58
58
  ) {
59
59
  total
@@ -176,3 +176,34 @@ exports.GET_CAMPAIGN_ACTIVE_NOW = (0, graphql_tag_1.gql) `
176
176
  }
177
177
  }
178
178
  `;
179
+ exports.GET_PROMOTION_PRODUCT_PRICE = (0, graphql_tag_1.gql) `
180
+ query GetPromotionProductPrice(
181
+ $partyId: String!
182
+ $productStoreId: String!
183
+ $productId: String!
184
+ $productPrice: BigDecimal!
185
+ ) {
186
+ getPromotionProductPrice(
187
+ partyId: $partyId
188
+ productStoreId: $productStoreId
189
+ productId: $productId
190
+ productPrice: $productPrice
191
+ ) {
192
+ campaignId
193
+ campaignName
194
+ statusCampaign
195
+ campaignDescription
196
+ fromDate
197
+ toDate
198
+ campaignPrivateUse
199
+ useWithOtherCampaignIds
200
+ campaignActionId
201
+ campaignActionName
202
+ type
203
+ campaignActionDescription
204
+ priorityLevel
205
+ campaignActionPrivateUse
206
+ useWithOtherCampaignActionIds
207
+ }
208
+ }
209
+ `;
@@ -260,15 +260,19 @@ exports.GET_SIMPLE_PRODUCTS_QUERY = (0, graphql_tag_1.gql) `
260
260
  id
261
261
  title
262
262
  sku
263
- subType
264
263
  shortDescription
265
- vat
264
+ description
266
265
  subType
266
+ vat
267
267
  qualify
268
+ parentId
268
269
  handle
269
270
  price
270
271
  compareAtPrice
272
+ priceType
273
+ priceTypeName
271
274
  featuredImage
275
+ optionsRelationship
272
276
  images
273
277
  }
274
278
  }
@@ -11,4 +11,5 @@ export declare class CampaignService extends Service {
11
11
  searchVouchers(campaignId: String, campaignActionId: String, campaignActionType: String, customerId: String, excludeExpired: Boolean, pageNumber: number, pageSize: number): Promise<any>;
12
12
  checkValidVoucher(customerId: string, voucherCode: string): Promise<any>;
13
13
  getCampaignActiveNow(campaignActionType: string, customerId: string): Promise<any>;
14
+ getPromotionProductPrice(productId: String, productPrice: number): Promise<any>;
14
15
  }
@@ -101,5 +101,23 @@ class CampaignService extends serviceSDK_1.Service {
101
101
  }
102
102
  });
103
103
  }
104
+ getPromotionProductPrice(productId, productPrice) {
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ const query = queries_1.GET_PROMOTION_PRODUCT_PRICE;
107
+ const variables = {
108
+ partyId: this.orgId,
109
+ productStoreId: this.storeId,
110
+ productId,
111
+ productPrice,
112
+ };
113
+ try {
114
+ const response = yield this.graphqlQuery(query, variables);
115
+ return response.getPromotionProductPrice;
116
+ }
117
+ catch (error) {
118
+ throw error;
119
+ }
120
+ });
121
+ }
104
122
  }
105
123
  exports.CampaignService = CampaignService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [