@longvansoftware/storefront-js-client 2.7.9 → 2.8.0

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.
@@ -263,7 +263,11 @@ exports.GET_VOUCHER_AVAILABLE_FOR_CUSTOMER = (0, graphql_tag_1.gql) `
263
263
  }
264
264
  `;
265
265
  exports.SUGGEST_VOUCHER = (0, graphql_tag_1.gql) `
266
- query SuggestVoucher($partyId: String,$customerId:String, $excludeExpired: Boolean) {
266
+ query SuggestVoucher(
267
+ $partyId: String
268
+ $customerId: String
269
+ $excludeExpired: Boolean
270
+ ) {
267
271
  suggestVoucher(
268
272
  searchVoucherRequest: {
269
273
  partyId: $partyId
@@ -300,6 +304,9 @@ exports.SUGGEST_VOUCHER = (0, graphql_tag_1.gql) `
300
304
  isBirthday
301
305
  customerId
302
306
  scope
307
+ affiliateId
308
+ maximumSpend
309
+ minimumSpend
303
310
  }
304
311
  }
305
312
  }
@@ -356,51 +363,50 @@ exports.GET_CAMPAIGN_ACTION_BY_ID = (0, graphql_tag_1.gql) `
356
363
  `;
357
364
  exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = (0, graphql_tag_1.gql) `
358
365
  query SearchProductGiftPromotionResponse(
359
- $partyId: String!
360
- $storeId: String
361
- $campaignActionId: String
362
- ){
363
- searchProductGiftPromotionResponse(
364
- parameterSearchProductGift:{
365
- partyId: $partyId
366
- storeId: $storeId
367
- campaignActionId: $campaignActionId
368
- }
369
- ){
370
- total
371
- totalPages
372
- totalElements
373
- last
374
- first
375
- number
376
- numberOfElements
377
- size
378
- empty
379
- content {
380
- id
381
- partyId
382
- campaignId
383
- campaignActionId
384
- productId
385
- quantityLimit
386
- campaignActionName
387
- startDate
388
- endDate
389
- newCustomer
390
- createdStamp
391
- updatedStamp
392
- updatedBy
393
- createdBy
394
- giftPromotions {
395
- fromQuantity
396
- toProductId
397
- toQuantity
398
- productName
399
- sku
400
- featureImage
401
- }
366
+ $partyId: String!
367
+ $storeId: String
368
+ $campaignActionId: String
369
+ ) {
370
+ searchProductGiftPromotionResponse(
371
+ parameterSearchProductGift: {
372
+ partyId: $partyId
373
+ storeId: $storeId
374
+ campaignActionId: $campaignActionId
375
+ }
376
+ ) {
377
+ total
378
+ totalPages
379
+ totalElements
380
+ last
381
+ first
382
+ number
383
+ numberOfElements
384
+ size
385
+ empty
386
+ content {
387
+ id
388
+ partyId
389
+ campaignId
390
+ campaignActionId
391
+ productId
392
+ quantityLimit
393
+ campaignActionName
394
+ startDate
395
+ endDate
396
+ newCustomer
397
+ createdStamp
398
+ updatedStamp
399
+ updatedBy
400
+ createdBy
401
+ giftPromotions {
402
+ fromQuantity
403
+ toProductId
404
+ toQuantity
405
+ productName
406
+ sku
407
+ featureImage
402
408
  }
409
+ }
403
410
  }
404
411
  }
405
-
406
412
  `;
@@ -1,2 +1,3 @@
1
1
  export declare const CREATE_PAYMENT_ORDER_MUTATION: import("graphql").DocumentNode;
2
2
  export declare const REQUEST_UNPUBLISH_VAT_INVOICE: import("graphql").DocumentNode;
3
+ export declare const REQUEST_PUBLISH_VAT_INVOICE: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.REQUEST_UNPUBLISH_VAT_INVOICE = exports.CREATE_PAYMENT_ORDER_MUTATION = void 0;
3
+ exports.REQUEST_PUBLISH_VAT_INVOICE = exports.REQUEST_UNPUBLISH_VAT_INVOICE = exports.CREATE_PAYMENT_ORDER_MUTATION = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.CREATE_PAYMENT_ORDER_MUTATION = (0, graphql_tag_1.gql) `
6
6
  mutation CreatePaymentOrder(
@@ -83,3 +83,43 @@ exports.REQUEST_UNPUBLISH_VAT_INVOICE = (0, graphql_tag_1.gql) `
83
83
  }
84
84
  }
85
85
  `;
86
+ exports.REQUEST_PUBLISH_VAT_INVOICE = (0, graphql_tag_1.gql) `
87
+ mutation RequestPublishVatInvoice(
88
+ $partnerId: String!,
89
+ $sourceId: String!,
90
+ $sourceType: String!,
91
+ $signType: String,
92
+ $buyerName: String,
93
+ $buyerTaxCode: String,
94
+ $buyerCompany: String,
95
+ $buyerAddress: String,
96
+ $sendMail: Boolean,
97
+ $receiverName: String,
98
+ $receiverEmail: String,
99
+ $byUser: String!
100
+ ) {
101
+ requestPublishVatInvoice(
102
+ vatInvoiceRequest: {
103
+ partnerId: $partnerId
104
+ sourceId: $sourceId
105
+ sourceType: $sourceType
106
+ signType: $signType
107
+ buyerName: $buyerName
108
+ buyerTaxCode: $buyerTaxCode
109
+ buyerCompany: $buyerCompany
110
+ buyerAddress: $buyerAddress
111
+ sendMail: $sendMail
112
+ receiverName: $receiverName
113
+ receiverEmail: $receiverEmail
114
+ }
115
+ byUser: $byUser
116
+ ) {
117
+ code
118
+ message
119
+ invoiceId
120
+ sourceId
121
+ sourceType
122
+ previewLink
123
+ }
124
+ }
125
+ `;
@@ -8,4 +8,5 @@ export declare class PaymentService extends Service {
8
8
  getPaymentMethodOfStoreChannel(): Promise<any>;
9
9
  getInvoiceDetail(invoiceId: string): Promise<any>;
10
10
  requestUnpublishVatInvoice(VatInvoiceRequest: VatInvoiceRequestDTO, byUser: string): Promise<any>;
11
+ requestPublishVatInvoice(VatInvoiceRequest: VatInvoiceRequestDTO, byUser: string): Promise<any>;
11
12
  }
@@ -123,5 +123,32 @@ class PaymentService extends serviceSDK_1.Service {
123
123
  }
124
124
  });
125
125
  }
126
+ requestPublishVatInvoice(VatInvoiceRequest, byUser) {
127
+ return __awaiter(this, void 0, void 0, function* () {
128
+ const mutation = mutations_1.REQUEST_PUBLISH_VAT_INVOICE;
129
+ const { sourceId, sourceType, signType, buyerName, buyerTaxCode, buyerCompany, buyerAddress, sendMail, receiverName, receiverEmail, } = VatInvoiceRequest;
130
+ const variables = {
131
+ partnerId: this.orgId,
132
+ sourceId,
133
+ sourceType,
134
+ signType,
135
+ buyerName,
136
+ buyerTaxCode,
137
+ buyerCompany,
138
+ buyerAddress,
139
+ sendMail,
140
+ receiverName,
141
+ receiverEmail,
142
+ byUser,
143
+ };
144
+ try {
145
+ const response = yield this.graphqlMutationV3(mutation, variables);
146
+ return response.requestPublishVatInvoice;
147
+ }
148
+ catch (error) {
149
+ throw error;
150
+ }
151
+ });
152
+ }
126
153
  }
127
154
  exports.PaymentService = PaymentService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "2.7.9",
3
+ "version": "2.8.0",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [