@longvansoftware/storefront-js-client 4.3.9 → 4.4.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.
- package/dist/src/graphql/payment/mutations.d.ts +1 -0
- package/dist/src/graphql/payment/mutations.js +18 -1
- package/dist/src/graphql/payment/queries.d.ts +1 -0
- package/dist/src/graphql/payment/queries.js +6 -1
- package/dist/src/lib/payment/index.d.ts +2 -0
- package/dist/src/lib/payment/index.js +33 -0
- package/package.json +1 -1
|
@@ -4,3 +4,4 @@ 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
6
|
export declare const DELETE_INVOICE_ITEM: import("graphql").DocumentNode;
|
|
7
|
+
export declare const REORDER_INVOINCE_ITEMS: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
3
|
+
exports.REORDER_INVOINCE_ITEMS = 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(
|
|
@@ -202,3 +202,20 @@ exports.DELETE_INVOICE_ITEM = (0, graphql_tag_1.gql) `
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
`;
|
|
205
|
+
exports.REORDER_INVOINCE_ITEMS = (0, graphql_tag_1.gql) `
|
|
206
|
+
mutation ReorderInvoiceItems(
|
|
207
|
+
$invoiceId: String!
|
|
208
|
+
$items: [ReorderInvoiceItemInput]!
|
|
209
|
+
$byUser: String!
|
|
210
|
+
) {
|
|
211
|
+
reorderInvoiceItems(invoiceId: $invoiceId, items: $items, byUser: $byUser) {
|
|
212
|
+
code
|
|
213
|
+
message
|
|
214
|
+
invoiceId
|
|
215
|
+
sourceId
|
|
216
|
+
sourceType
|
|
217
|
+
previewLink
|
|
218
|
+
lookupLink
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
`;
|
|
@@ -5,3 +5,4 @@ export declare const GET_INVOICE_DETAIL: import("graphql").DocumentNode;
|
|
|
5
5
|
export declare const GET_INVOICES_OF_ORDER: import("graphql").DocumentNode;
|
|
6
6
|
export declare const VIEW_PUBLISHED_INVOICE: import("graphql").DocumentNode;
|
|
7
7
|
export declare const GET_INVOICE_ITEM_OF_INVOICE: import("graphql").DocumentNode;
|
|
8
|
+
export declare const SUGGEST_INVOINCE_NOTE: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_INVOICE_ITEM_OF_INVOICE = exports.VIEW_PUBLISHED_INVOICE = exports.GET_INVOICES_OF_ORDER = exports.GET_INVOICE_DETAIL = exports.GET_PAYMENT_METHOD_OF_STORE_CHANNEL = exports.GEN_QR_PAYMENT = exports.GET_PAYMENT_METHOD = void 0;
|
|
3
|
+
exports.SUGGEST_INVOINCE_NOTE = exports.GET_INVOICE_ITEM_OF_INVOICE = exports.VIEW_PUBLISHED_INVOICE = exports.GET_INVOICES_OF_ORDER = exports.GET_INVOICE_DETAIL = exports.GET_PAYMENT_METHOD_OF_STORE_CHANNEL = exports.GEN_QR_PAYMENT = exports.GET_PAYMENT_METHOD = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.GET_PAYMENT_METHOD = (0, graphql_tag_1.gql) `
|
|
6
6
|
query GetPaymentMethod($orgId: String!, $storeChannelId: String) {
|
|
@@ -126,3 +126,8 @@ exports.GET_INVOICE_ITEM_OF_INVOICE = (0, graphql_tag_1.gql) `
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
`;
|
|
129
|
+
exports.SUGGEST_INVOINCE_NOTE = (0, graphql_tag_1.gql) `
|
|
130
|
+
query SuggestInvoiceNote($partnerId: String!, $query: String) {
|
|
131
|
+
suggestInvoiceNote(partnerId: $partnerId, query: $query)
|
|
132
|
+
}
|
|
133
|
+
`;
|
|
@@ -15,4 +15,6 @@ export declare class PaymentService extends Service {
|
|
|
15
15
|
getInvoiceItemOfInvoie(invoiceId: string): Promise<any>;
|
|
16
16
|
addInvoiceItem(invoiceId: string, invoiceItem: any, byUser: string): Promise<any>;
|
|
17
17
|
deleteInvoiceItem(invoiceId: string, invoiceItemId: string, byUser: string): Promise<any>;
|
|
18
|
+
reorderInvoiceItems(invoiceId: string, items: [any], byUser: string): Promise<any>;
|
|
19
|
+
suggestInvoiceNote(query: string): Promise<any>;
|
|
18
20
|
}
|
|
@@ -254,5 +254,38 @@ class PaymentService extends serviceSDK_1.Service {
|
|
|
254
254
|
}
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
|
+
reorderInvoiceItems(invoiceId, items, byUser) {
|
|
258
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
259
|
+
const mutation = mutations_1.REORDER_INVOINCE_ITEMS;
|
|
260
|
+
const variables = {
|
|
261
|
+
invoiceId,
|
|
262
|
+
items,
|
|
263
|
+
byUser,
|
|
264
|
+
};
|
|
265
|
+
try {
|
|
266
|
+
const response = yield this.graphqlMutationV3(mutation, variables);
|
|
267
|
+
return response.reorderInvoiceItems;
|
|
268
|
+
}
|
|
269
|
+
catch (error) {
|
|
270
|
+
throw error;
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
suggestInvoiceNote(query) {
|
|
275
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
276
|
+
const queries = queries_1.SUGGEST_INVOINCE_NOTE;
|
|
277
|
+
const variables = {
|
|
278
|
+
partnerId: this.orgId,
|
|
279
|
+
query,
|
|
280
|
+
};
|
|
281
|
+
try {
|
|
282
|
+
const response = yield this.graphqlQueryV3(queries, variables);
|
|
283
|
+
return response.suggestInvoiceNote;
|
|
284
|
+
}
|
|
285
|
+
catch (error) {
|
|
286
|
+
throw error;
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
}
|
|
257
290
|
}
|
|
258
291
|
exports.PaymentService = PaymentService;
|