@longvansoftware/storefront-js-client 4.0.5 → 4.0.7
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.
|
@@ -2,3 +2,4 @@ export declare const CREATE_PAYMENT_ORDER_MUTATION: import("graphql").DocumentNo
|
|
|
2
2
|
export declare const REQUEST_UNPUBLISH_VAT_INVOICE: import("graphql").DocumentNode;
|
|
3
3
|
export declare const REQUEST_PUBLISH_VAT_INVOICE: import("graphql").DocumentNode;
|
|
4
4
|
export declare const UPDATE_INVOICE_ITEM: import("graphql").DocumentNode;
|
|
5
|
+
export declare const ADD_INVOICE_ITEM: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UPDATE_INVOICE_ITEM = exports.REQUEST_PUBLISH_VAT_INVOICE = exports.REQUEST_UNPUBLISH_VAT_INVOICE = exports.CREATE_PAYMENT_ORDER_MUTATION = void 0;
|
|
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;
|
|
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(
|
|
@@ -152,3 +152,26 @@ exports.UPDATE_INVOICE_ITEM = (0, graphql_tag_1.gql) `
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
`;
|
|
155
|
+
exports.ADD_INVOICE_ITEM = (0, graphql_tag_1.gql) `
|
|
156
|
+
mutation AddInvoiceItem(
|
|
157
|
+
$partnerId: String!
|
|
158
|
+
$invoiceId: String!
|
|
159
|
+
$invoiceItem: InvoiceItemInput!
|
|
160
|
+
$byUser: String!
|
|
161
|
+
) {
|
|
162
|
+
addInvoiceItem(
|
|
163
|
+
partnerId: $partnerId
|
|
164
|
+
invoiceId: $invoiceId
|
|
165
|
+
invoiceItem: $invoiceItem
|
|
166
|
+
byUser: $byUser
|
|
167
|
+
) {
|
|
168
|
+
code
|
|
169
|
+
message
|
|
170
|
+
invoiceId
|
|
171
|
+
sourceId
|
|
172
|
+
sourceType
|
|
173
|
+
previewLink
|
|
174
|
+
lookupLink
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
`;
|
|
@@ -13,4 +13,5 @@ export declare class PaymentService extends Service {
|
|
|
13
13
|
viewPublishedInvoice(invoiceId: string): Promise<any>;
|
|
14
14
|
updateInvoiceItem(invoiceId: string, updateInvoiceItemDTO: any, byUser: string): Promise<any>;
|
|
15
15
|
getInvoiceItemOfInvoie(invoiceId: string): Promise<any>;
|
|
16
|
+
addInvoiceItem(invoiceId: string, invoiceItem: any, byUser: string): Promise<any>;
|
|
16
17
|
}
|
|
@@ -216,5 +216,23 @@ class PaymentService extends serviceSDK_1.Service {
|
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
|
+
addInvoiceItem(invoiceId, invoiceItem, byUser) {
|
|
220
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
221
|
+
const mutation = mutations_1.ADD_INVOICE_ITEM;
|
|
222
|
+
const variables = {
|
|
223
|
+
partnerId: this.orgId,
|
|
224
|
+
invoiceId,
|
|
225
|
+
invoiceItem,
|
|
226
|
+
byUser,
|
|
227
|
+
};
|
|
228
|
+
try {
|
|
229
|
+
const response = yield this.graphqlMutationV3(mutation, variables);
|
|
230
|
+
return response.addInvoiceItem;
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
throw error;
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
}
|
|
219
237
|
}
|
|
220
238
|
exports.PaymentService = PaymentService;
|