@longvansoftware/storefront-js-client 2.6.9 → 2.7.1

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.
@@ -6,3 +6,4 @@ export declare const GET_PROMOTION_PRODUCT_PRICE: import("graphql").DocumentNode
6
6
  export declare const GET_VOUCHER_AVAILABLE_FOR_CUSTOMER: import("graphql").DocumentNode;
7
7
  export declare const SUGGEST_VOUCHER: import("graphql").DocumentNode;
8
8
  export declare const GET_CAMPAIGN_ACTION_BY_ID: import("graphql").DocumentNode;
9
+ export declare const SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_CAMPAIGN_ACTION_BY_ID = exports.SUGGEST_VOUCHER = exports.GET_VOUCHER_AVAILABLE_FOR_CUSTOMER = 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;
3
+ exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = exports.GET_CAMPAIGN_ACTION_BY_ID = exports.SUGGEST_VOUCHER = exports.GET_VOUCHER_AVAILABLE_FOR_CUSTOMER = 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(
@@ -353,3 +353,53 @@ exports.GET_CAMPAIGN_ACTION_BY_ID = (0, graphql_tag_1.gql) `
353
353
  }
354
354
  }
355
355
  `;
356
+ exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = (0, graphql_tag_1.gql) `
357
+ query SearchProductGiftPromotionResponse(
358
+ $partyId: String!
359
+ $storeId: String
360
+ $campaignActionId: String
361
+ ){
362
+ searchProductGiftPromotionResponse(
363
+ parameterSearchProductGift:{
364
+ partyId: $partyId
365
+ storeId: $storeId
366
+ campaignActionId: $campaignActionId
367
+ }
368
+ ){
369
+ total
370
+ totalPages
371
+ totalElements
372
+ last
373
+ first
374
+ number
375
+ numberOfElements
376
+ size
377
+ empty
378
+ content {
379
+ id
380
+ partyId
381
+ campaignId
382
+ campaignActionId
383
+ productId
384
+ quantityLimit
385
+ campaignActionName
386
+ startDate
387
+ endDate
388
+ newCustomer
389
+ createdStamp
390
+ updatedStamp
391
+ updatedBy
392
+ createdBy
393
+ giftPromotions {
394
+ fromQuantity
395
+ toProductId
396
+ toQuantity
397
+ productName
398
+ sku
399
+ featureImage
400
+ }
401
+ }
402
+ }
403
+ }
404
+
405
+ `;
@@ -16,4 +16,5 @@ export declare class CampaignService extends Service {
16
16
  addCustomerToVoucher(voucherCode: string, userId: string): Promise<any>;
17
17
  suggestVoucher(): Promise<any>;
18
18
  getCampaignActionById(id: string): Promise<any>;
19
+ searchProductGiftPromotionResponse(campaignActionId: string): Promise<any>;
19
20
  }
@@ -190,5 +190,22 @@ class CampaignService extends serviceSDK_1.Service {
190
190
  }
191
191
  });
192
192
  }
193
+ searchProductGiftPromotionResponse(campaignActionId) {
194
+ return __awaiter(this, void 0, void 0, function* () {
195
+ const query = queries_1.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE;
196
+ const variables = {
197
+ partyId: this.orgId,
198
+ storeId: this.storeId,
199
+ campaignActionId: campaignActionId,
200
+ };
201
+ try {
202
+ const response = yield this.graphqlQuery(query, variables);
203
+ return response.searchProductGiftPromotionResponse;
204
+ }
205
+ catch (error) {
206
+ throw error;
207
+ }
208
+ });
209
+ }
193
210
  }
194
211
  exports.CampaignService = CampaignService;
@@ -17,7 +17,7 @@ class ComhubService extends serviceSDK_1.Service {
17
17
  }
18
18
  sendZns(dataTemplate, appId, messageType) {
19
19
  return __awaiter(this, void 0, void 0, function* () {
20
- const endpoint = `/web-hook/message/send/social/ZNS/app/${appId}/message-type/${messageType}`;
20
+ const endpoint = `/web-hook/message/v2/send/social/ZNS/app/${appId}/message-type/${messageType}`;
21
21
  const method = "POST";
22
22
  try {
23
23
  const response = yield this.restApiCallWithNoHeader(endpoint, method, dataTemplate);
@@ -17,4 +17,5 @@ export declare class PortalService extends Service {
17
17
  shipmentParameter(orderId: string): Promise<any>;
18
18
  connectShipment(orderId: string, byUser: string): Promise<any>;
19
19
  ffmStage(orderId: string): Promise<any>;
20
+ completeCancelFFMOrder(orderId: string, note: string, updateBy: string): Promise<any>;
20
21
  }
@@ -204,5 +204,22 @@ class PortalService extends serviceSDK_1.Service {
204
204
  }
205
205
  });
206
206
  }
207
+ completeCancelFFMOrder(orderId, note, updateBy) {
208
+ return __awaiter(this, void 0, void 0, function* () {
209
+ const endpoint = `/fulfillment-api/public/fulfillment/FOX/${orderId}/completeCancelOrder`;
210
+ const method = "PUT";
211
+ const reqData = {
212
+ note: note,
213
+ updateBy: updateBy,
214
+ };
215
+ try {
216
+ const response = yield this.restApiCallWithNoHeader(endpoint, method, reqData);
217
+ return response;
218
+ }
219
+ catch (error) {
220
+ throw error;
221
+ }
222
+ });
223
+ }
207
224
  }
208
225
  exports.PortalService = PortalService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "2.6.9",
3
+ "version": "2.7.1",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [