@longvansoftware/storefront-js-client 4.0.4 → 4.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.
@@ -7,3 +7,4 @@ export declare const GET_VOUCHER_AVAILABLE_FOR_CUSTOMER: import("graphql").Docum
7
7
  export declare const SUGGEST_VOUCHER: import("graphql").DocumentNode;
8
8
  export declare const GET_CAMPAIGN_ACTION_BY_ID: import("graphql").DocumentNode;
9
9
  export declare const SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE: import("graphql").DocumentNode;
10
+ export declare const GET_CAMPAIGN: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
3
+ exports.GET_CAMPAIGN = 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(
@@ -425,3 +425,23 @@ exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = (0, graphql_tag_1.gql) `
425
425
  }
426
426
  }
427
427
  `;
428
+ exports.GET_CAMPAIGN = (0, graphql_tag_1.gql) `
429
+ query GetCampaign($id: String!) {
430
+ getCampaign(id: $id) {
431
+ id
432
+ createdStamp
433
+ updatedStamp
434
+ updatedBy
435
+ createdBy
436
+ useForAll
437
+ description
438
+ partyId
439
+ name
440
+ type
441
+ domain
442
+ fromDate
443
+ toDate
444
+ status
445
+ }
446
+ }
447
+ `;
@@ -17,4 +17,5 @@ export declare class CampaignService extends Service {
17
17
  suggestVoucher(customerId: string, campaignId: string, campaignActionId: string, isBirthday: Boolean): Promise<any>;
18
18
  getCampaignActionById(id: string): Promise<any>;
19
19
  searchProductGiftPromotionResponse(productIds: string[], campaignActionId: string): Promise<any>;
20
+ getCampaign(id: string): Promise<any>;
20
21
  }
@@ -214,5 +214,20 @@ class CampaignService extends serviceSDK_1.Service {
214
214
  }
215
215
  });
216
216
  }
217
+ getCampaign(id) {
218
+ return __awaiter(this, void 0, void 0, function* () {
219
+ const query = queries_1.GET_CAMPAIGN;
220
+ const variables = {
221
+ id,
222
+ };
223
+ try {
224
+ const response = yield this.graphqlQuery(query, variables);
225
+ return response.getCampaign;
226
+ }
227
+ catch (error) {
228
+ throw error;
229
+ }
230
+ });
231
+ }
217
232
  }
218
233
  exports.CampaignService = CampaignService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "4.0.4",
3
+ "version": "4.0.5",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [