@longvansoftware/storefront-js-client 4.3.4 → 4.3.6

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.
@@ -8,3 +8,4 @@ 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
10
  export declare const GET_CAMPAIGN: import("graphql").DocumentNode;
11
+ export declare const SEARCH_PRODUCT_PRICE_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 = 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.SEARCH_PRODUCT_PRICE_PROMOTION_RESPONSE = 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(
@@ -445,3 +445,52 @@ exports.GET_CAMPAIGN = (0, graphql_tag_1.gql) `
445
445
  }
446
446
  }
447
447
  `;
448
+ exports.SEARCH_PRODUCT_PRICE_PROMOTION_RESPONSE = (0, graphql_tag_1.gql) `
449
+ query SearchProductPricePromotionResponse(
450
+ $partyId: String!
451
+ $campaignId: String!
452
+ $campaignActionId: String
453
+ $statusActive: String
454
+ $sort: [BaseSortRequest]
455
+ ) {
456
+ searchProductPricePromotionResponse(
457
+ searchProductPricePromotionRequest: {
458
+ partyId: $partyId
459
+ campaignId: $campaignId
460
+ campaignActionId: $campaignActionId
461
+ statusActive: $statusActive
462
+ sort: $sort
463
+ }
464
+ ) {
465
+ content {
466
+ partyId
467
+ campaignId
468
+ campaignActionId
469
+ productId
470
+ sku
471
+ name
472
+ pricePromotions {
473
+ price
474
+ pricePromotion
475
+ statusActive
476
+ quantity
477
+ unit
478
+ targetDataId
479
+ createdStamp
480
+ updatedStamp
481
+ updatedBy
482
+ createdBy
483
+ }
484
+ }
485
+ total
486
+ totalPages
487
+ totalElements
488
+ last
489
+ first
490
+ number
491
+ numberOfElements
492
+ size
493
+ empty
494
+ }
495
+ }
496
+ `;
@@ -51,6 +51,7 @@ exports.REQUEST_UNPUBLISH_VAT_INVOICE = (0, graphql_tag_1.gql) `
51
51
  $signType: String
52
52
  $includeBuyerTaxCode: Boolean
53
53
  $buyerName: String
54
+ $buyerPhone: String
54
55
  $buyerTaxCode: String
55
56
  $buyerCompany: String
56
57
  $buyerAddress: String
@@ -67,6 +68,7 @@ exports.REQUEST_UNPUBLISH_VAT_INVOICE = (0, graphql_tag_1.gql) `
67
68
  signType: $signType
68
69
  includeBuyerTaxCode: $includeBuyerTaxCode
69
70
  buyerName: $buyerName
71
+ buyerPhone: $buyerPhone
70
72
  buyerTaxCode: $buyerTaxCode
71
73
  buyerCompany: $buyerCompany
72
74
  buyerAddress: $buyerAddress
@@ -94,6 +96,7 @@ exports.REQUEST_PUBLISH_VAT_INVOICE = (0, graphql_tag_1.gql) `
94
96
  $signType: String
95
97
  $includeBuyerTaxCode: Boolean
96
98
  $buyerName: String
99
+ $buyerPhone: String
97
100
  $buyerTaxCode: String
98
101
  $buyerCompany: String
99
102
  $buyerAddress: String
@@ -110,6 +113,7 @@ exports.REQUEST_PUBLISH_VAT_INVOICE = (0, graphql_tag_1.gql) `
110
113
  signType: $signType
111
114
  includeBuyerTaxCode: $includeBuyerTaxCode
112
115
  buyerName: $buyerName
116
+ buyerPhone: $buyerPhone
113
117
  buyerTaxCode: $buyerTaxCode
114
118
  buyerCompany: $buyerCompany
115
119
  buyerAddress: $buyerAddress
@@ -18,4 +18,5 @@ export declare class CampaignService extends Service {
18
18
  getCampaignActionById(id: string): Promise<any>;
19
19
  searchProductGiftPromotionResponse(productIds: string[], campaignActionId: string): Promise<any>;
20
20
  getCampaign(id: string): Promise<any>;
21
+ searchProductPricePromotionResponse(campaignId: string, campaignActionId: string, statusActive: string): Promise<any>;
21
22
  }
@@ -229,5 +229,24 @@ class CampaignService extends serviceSDK_1.Service {
229
229
  }
230
230
  });
231
231
  }
232
+ searchProductPricePromotionResponse(campaignId, campaignActionId, statusActive) {
233
+ return __awaiter(this, void 0, void 0, function* () {
234
+ const query = queries_1.SEARCH_PRODUCT_PRICE_PROMOTION_RESPONSE;
235
+ const variables = {
236
+ partyId: this.orgId,
237
+ campaignId,
238
+ campaignActionId,
239
+ statusActive,
240
+ sort: { asc: true, key: "productId" },
241
+ };
242
+ try {
243
+ const response = yield this.graphqlQuery(query, variables);
244
+ return response.searchProductPricePromotionResponse;
245
+ }
246
+ catch (error) {
247
+ throw error;
248
+ }
249
+ });
250
+ }
232
251
  }
233
252
  exports.CampaignService = CampaignService;
@@ -552,4 +552,5 @@ export declare class OrderService extends Service {
552
552
  }): Promise<any>;
553
553
  addEmployeeToStore(employeeId: string): Promise<any>;
554
554
  deleteEmployeeToStore(employeeId: string): Promise<any>;
555
+ checkNewCustomer(customerId: string, orderId: string): Promise<any>;
555
556
  }
@@ -1752,5 +1752,18 @@ class OrderService extends serviceSDK_1.Service {
1752
1752
  }
1753
1753
  });
1754
1754
  }
1755
+ checkNewCustomer(customerId, orderId) {
1756
+ return __awaiter(this, void 0, void 0, function* () {
1757
+ const endpoint = `/front/orders/${this.orgId}/${customerId}/${orderId}/newCustomer`;
1758
+ const method = "GET";
1759
+ try {
1760
+ const response = yield this.restApiCallWithToken(endpoint, method);
1761
+ return response;
1762
+ }
1763
+ catch (error) {
1764
+ throw error;
1765
+ }
1766
+ });
1767
+ }
1755
1768
  }
1756
1769
  exports.OrderService = OrderService;
@@ -99,7 +99,7 @@ class PaymentService extends serviceSDK_1.Service {
99
99
  requestUnpublishVatInvoice(VatInvoiceRequest, byUser) {
100
100
  return __awaiter(this, void 0, void 0, function* () {
101
101
  const mutation = mutations_1.REQUEST_UNPUBLISH_VAT_INVOICE;
102
- const { sourceId, sourceType, signType, includeBuyerTaxCode, buyerName, buyerTaxCode, buyerCompany, buyerAddress, sendMail, receiverName, receiverEmail, } = VatInvoiceRequest;
102
+ const { sourceId, sourceType, signType, includeBuyerTaxCode, buyerName, buyerPhone, buyerTaxCode, buyerCompany, buyerAddress, sendMail, receiverName, receiverEmail, } = VatInvoiceRequest;
103
103
  const variables = {
104
104
  partnerId: this.orgId,
105
105
  sourceId,
@@ -107,6 +107,7 @@ class PaymentService extends serviceSDK_1.Service {
107
107
  signType,
108
108
  includeBuyerTaxCode,
109
109
  buyerName,
110
+ buyerPhone,
110
111
  buyerTaxCode,
111
112
  buyerCompany,
112
113
  buyerAddress,
@@ -127,7 +128,7 @@ class PaymentService extends serviceSDK_1.Service {
127
128
  requestPublishVatInvoice(VatInvoiceRequest, byUser) {
128
129
  return __awaiter(this, void 0, void 0, function* () {
129
130
  const mutation = mutations_1.REQUEST_PUBLISH_VAT_INVOICE;
130
- const { sourceId, sourceType, signType, includeBuyerTaxCode, buyerName, buyerTaxCode, buyerCompany, buyerAddress, sendMail, receiverName, receiverEmail, } = VatInvoiceRequest;
131
+ const { sourceId, sourceType, signType, includeBuyerTaxCode, buyerName, buyerPhone, buyerTaxCode, buyerCompany, buyerAddress, sendMail, receiverName, receiverEmail, } = VatInvoiceRequest;
131
132
  const variables = {
132
133
  partnerId: this.orgId,
133
134
  sourceId,
@@ -135,6 +136,7 @@ class PaymentService extends serviceSDK_1.Service {
135
136
  signType,
136
137
  includeBuyerTaxCode,
137
138
  buyerName,
139
+ buyerPhone,
138
140
  buyerTaxCode,
139
141
  buyerCompany,
140
142
  buyerAddress,
@@ -4,6 +4,7 @@ export interface VatInvoiceRequestDTO {
4
4
  signType: String;
5
5
  includeBuyerTaxCode: Boolean;
6
6
  buyerName: String;
7
+ buyerPhone: String;
7
8
  buyerTaxCode: String;
8
9
  buyerCompany: String;
9
10
  buyerAddress: String;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "4.3.4",
3
+ "version": "4.3.6",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [