@longvansoftware/storefront-js-client 2.9.1 → 2.9.3
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 +24 -1
- package/dist/src/graphql/payment/queries.d.ts +1 -0
- package/dist/src/graphql/payment/queries.js +26 -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
|
@@ -1,3 +1,4 @@
|
|
|
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
3
|
export declare const REQUEST_PUBLISH_VAT_INVOICE: import("graphql").DocumentNode;
|
|
4
|
+
export declare const UPDATE_INVOICE_ITEM: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.REQUEST_PUBLISH_VAT_INVOICE = exports.REQUEST_UNPUBLISH_VAT_INVOICE = exports.CREATE_PAYMENT_ORDER_MUTATION = void 0;
|
|
3
|
+
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(
|
|
@@ -129,3 +129,26 @@ exports.REQUEST_PUBLISH_VAT_INVOICE = (0, graphql_tag_1.gql) `
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
`;
|
|
132
|
+
exports.UPDATE_INVOICE_ITEM = (0, graphql_tag_1.gql) `
|
|
133
|
+
mutation UpdateInvoiceItem(
|
|
134
|
+
$partnerId: String!
|
|
135
|
+
$invoiceId: String!
|
|
136
|
+
$updateInvoiceItemDTO: UpdateInvoiceItemDTO!
|
|
137
|
+
$byUser: String!
|
|
138
|
+
) {
|
|
139
|
+
updateInvoiceItem(
|
|
140
|
+
partnerId: $partnerId
|
|
141
|
+
invoiceId: $invoiceId
|
|
142
|
+
updateInvoiceItemDTO: $updateInvoiceItemDTO
|
|
143
|
+
byUser: $byUser
|
|
144
|
+
) {
|
|
145
|
+
code
|
|
146
|
+
message
|
|
147
|
+
invoiceId
|
|
148
|
+
sourceId
|
|
149
|
+
sourceType
|
|
150
|
+
previewLink
|
|
151
|
+
lookupLink
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
`;
|
|
@@ -4,3 +4,4 @@ export declare const GET_PAYMENT_METHOD_OF_STORE_CHANNEL: import("graphql").Docu
|
|
|
4
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
|
+
export declare const GET_INVOICE_ITEM_OF_INVOICE: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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.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) {
|
|
@@ -100,3 +100,28 @@ exports.VIEW_PUBLISHED_INVOICE = (0, graphql_tag_1.gql) `
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
`;
|
|
103
|
+
exports.GET_INVOICE_ITEM_OF_INVOICE = (0, graphql_tag_1.gql) `
|
|
104
|
+
query GetInvoiceItemOfInvoie($invoiceId: String!) {
|
|
105
|
+
getInvoiceItemOfInvoie(invoiceId: $invoiceId) {
|
|
106
|
+
id
|
|
107
|
+
invoiceId
|
|
108
|
+
type
|
|
109
|
+
partyIdFrom
|
|
110
|
+
partyIdTo
|
|
111
|
+
status
|
|
112
|
+
productParentId
|
|
113
|
+
productId
|
|
114
|
+
productName
|
|
115
|
+
sku
|
|
116
|
+
unitType
|
|
117
|
+
quantity
|
|
118
|
+
amount
|
|
119
|
+
vatRateName
|
|
120
|
+
vatRate
|
|
121
|
+
totalVAT
|
|
122
|
+
totalAmount
|
|
123
|
+
invoiceDate
|
|
124
|
+
note
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
`;
|
|
@@ -11,4 +11,6 @@ export declare class PaymentService extends Service {
|
|
|
11
11
|
requestPublishVatInvoice(VatInvoiceRequest: VatInvoiceRequestDTO, byUser: string): Promise<any>;
|
|
12
12
|
getInvoicesOfOrder(orderId: string): Promise<any>;
|
|
13
13
|
viewPublishedInvoice(invoiceId: string): Promise<any>;
|
|
14
|
+
updateInvoiceItem(invoiceId: string, updateInvoiceItemDTO: any, byUser: string): Promise<any>;
|
|
15
|
+
getInvoiceItemOfInvoie(invoiceId: string): Promise<any>;
|
|
14
16
|
}
|
|
@@ -183,5 +183,38 @@ class PaymentService extends serviceSDK_1.Service {
|
|
|
183
183
|
}
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
|
+
updateInvoiceItem(invoiceId, updateInvoiceItemDTO, byUser) {
|
|
187
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
const mutation = mutations_1.UPDATE_INVOICE_ITEM;
|
|
189
|
+
const variables = {
|
|
190
|
+
partnerId: this.orgId,
|
|
191
|
+
invoiceId,
|
|
192
|
+
updateInvoiceItemDTO,
|
|
193
|
+
byUser,
|
|
194
|
+
};
|
|
195
|
+
try {
|
|
196
|
+
const response = yield this.graphqlMutationV3(mutation, variables);
|
|
197
|
+
return response.updateInvoiceItem;
|
|
198
|
+
}
|
|
199
|
+
catch (error) {
|
|
200
|
+
throw error;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
getInvoiceItemOfInvoie(invoiceId) {
|
|
205
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
const query = queries_1.GET_INVOICE_ITEM_OF_INVOICE;
|
|
207
|
+
const variables = {
|
|
208
|
+
invoiceId,
|
|
209
|
+
};
|
|
210
|
+
try {
|
|
211
|
+
const response = yield this.graphqlQueryV3(query, variables);
|
|
212
|
+
return response.getInvoiceItemOfInvoie;
|
|
213
|
+
}
|
|
214
|
+
catch (error) {
|
|
215
|
+
throw error;
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}
|
|
186
219
|
}
|
|
187
220
|
exports.PaymentService = PaymentService;
|