@longvansoftware/storefront-js-client 4.0.7 → 4.0.8

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.
@@ -3,3 +3,4 @@ export declare const REQUEST_UNPUBLISH_VAT_INVOICE: import("graphql").DocumentNo
3
3
  export declare const REQUEST_PUBLISH_VAT_INVOICE: import("graphql").DocumentNode;
4
4
  export declare const UPDATE_INVOICE_ITEM: import("graphql").DocumentNode;
5
5
  export declare const ADD_INVOICE_ITEM: import("graphql").DocumentNode;
6
+ export declare const DELETE_INVOICE_ITEM: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ADD_INVOICE_ITEM = exports.UPDATE_INVOICE_ITEM = exports.REQUEST_PUBLISH_VAT_INVOICE = exports.REQUEST_UNPUBLISH_VAT_INVOICE = exports.CREATE_PAYMENT_ORDER_MUTATION = void 0;
3
+ exports.DELETE_INVOICE_ITEM = exports.ADD_INVOICE_ITEM = exports.UPDATE_INVOICE_ITEM = 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(
@@ -175,3 +175,26 @@ exports.ADD_INVOICE_ITEM = (0, graphql_tag_1.gql) `
175
175
  }
176
176
  }
177
177
  `;
178
+ exports.DELETE_INVOICE_ITEM = (0, graphql_tag_1.gql) `
179
+ mutation DeleteInvoiceItem(
180
+ $partnerId: String!
181
+ $invoiceId: String!
182
+ $invoiceItemId: String!
183
+ $byUser: String!
184
+ ) {
185
+ deleteInvoiceItem(
186
+ partnerId: $partnerId
187
+ invoiceId: $invoiceId
188
+ invoiceItemId: $invoiceItemId
189
+ byUser: $byUser
190
+ ) {
191
+ code
192
+ message
193
+ invoiceId
194
+ sourceId
195
+ sourceType
196
+ previewLink
197
+ lookupLink
198
+ }
199
+ }
200
+ `;
@@ -14,4 +14,5 @@ export declare class PaymentService extends Service {
14
14
  updateInvoiceItem(invoiceId: string, updateInvoiceItemDTO: any, byUser: string): Promise<any>;
15
15
  getInvoiceItemOfInvoie(invoiceId: string): Promise<any>;
16
16
  addInvoiceItem(invoiceId: string, invoiceItem: any, byUser: string): Promise<any>;
17
+ deleteInvoiceItem(invoiceId: string, invoiceItemId: string, byUser: string): Promise<any>;
17
18
  }
@@ -234,5 +234,23 @@ class PaymentService extends serviceSDK_1.Service {
234
234
  }
235
235
  });
236
236
  }
237
+ deleteInvoiceItem(invoiceId, invoiceItemId, byUser) {
238
+ return __awaiter(this, void 0, void 0, function* () {
239
+ const mutation = mutations_1.DELETE_INVOICE_ITEM;
240
+ const variables = {
241
+ partnerId: this.orgId,
242
+ invoiceId,
243
+ invoiceItemId,
244
+ byUser,
245
+ };
246
+ try {
247
+ const response = yield this.graphqlMutationV3(mutation, variables);
248
+ return response.deleteInvoiceItem;
249
+ }
250
+ catch (error) {
251
+ throw error;
252
+ }
253
+ });
254
+ }
237
255
  }
238
256
  exports.PaymentService = PaymentService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "4.0.7",
3
+ "version": "4.0.8",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [