@longvansoftware/service-js-client 2.4.1 → 2.4.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/auth/mutations.js +2 -2
- package/dist/src/graphql/payment/mutations.d.ts +4 -2
- package/dist/src/graphql/payment/mutations.js +19 -1
- package/dist/src/lib/auth/index.d.ts +1 -1
- package/dist/src/lib/auth/index.js +2 -1
- package/dist/src/lib/payment/index.d.ts +1 -0
- package/dist/src/lib/payment/index.js +17 -0
- package/package.json +1 -1
|
@@ -242,8 +242,8 @@ const CREATE_PARTY_DETAIL = (fields = []) => {
|
|
|
242
242
|
const fieldStr = fields.join("\n ");
|
|
243
243
|
const hasFields = fields.length > 0;
|
|
244
244
|
return (0, graphql_tag_1.gql) `
|
|
245
|
-
mutation CreatePartyDetail($name: String, $phone: String, $email: String, $orgId: String!, $createdBy: String!, $source: String) {
|
|
246
|
-
createPartyDetail(name: $name ,phone: $phone, email: $email, orgId: $orgId, createdBy: $createdBy, source: $source) {
|
|
245
|
+
mutation CreatePartyDetail($name: String, $phone: String, $email: String, $orgId: String!, $isCreateUserLogin: Boolean, $createdBy: String!, $source: String) {
|
|
246
|
+
createPartyDetail(name: $name ,phone: $phone, email: $email, orgId: $orgId, isCreateUserLogin: $isCreateUserLogin, createdBy: $createdBy, source: $source) {
|
|
247
247
|
${hasFields ? `${fieldStr}` : ""}
|
|
248
248
|
}
|
|
249
249
|
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
1
|
+
import { DocumentNode } from "graphql";
|
|
2
|
+
export declare const CREATE_PAYMENT_ORDER_MUTATION: DocumentNode;
|
|
3
|
+
export declare const CREATE_VAT_INVOICE_REQUEST: DocumentNode;
|
|
4
|
+
export declare const REQUEST_UNPUBLISH_VAT_INVOICE: (fields?: string[]) => DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CREATE_VAT_INVOICE_REQUEST = exports.CREATE_PAYMENT_ORDER_MUTATION = void 0;
|
|
3
|
+
exports.REQUEST_UNPUBLISH_VAT_INVOICE = exports.CREATE_VAT_INVOICE_REQUEST = 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(
|
|
@@ -49,3 +49,21 @@ exports.CREATE_VAT_INVOICE_REQUEST = (0, graphql_tag_1.gql) `
|
|
|
49
49
|
)
|
|
50
50
|
}
|
|
51
51
|
`;
|
|
52
|
+
const REQUEST_UNPUBLISH_VAT_INVOICE = (fields = []) => {
|
|
53
|
+
const fieldStr = fields.join("\n ");
|
|
54
|
+
const hasFields = fields.length > 0;
|
|
55
|
+
return (0, graphql_tag_1.gql) `
|
|
56
|
+
mutation RequestUnpublishVatInvoice(
|
|
57
|
+
$vatInvoiceRequest: VatInvoiceRequestDTO!
|
|
58
|
+
$byUser: String!
|
|
59
|
+
) {
|
|
60
|
+
requestUnpublishVatInvoice(
|
|
61
|
+
vatInvoiceRequest: $vatInvoiceRequest
|
|
62
|
+
byUser: $byUser
|
|
63
|
+
) {
|
|
64
|
+
${hasFields ? `${fieldStr}` : ""}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
};
|
|
69
|
+
exports.REQUEST_UNPUBLISH_VAT_INVOICE = REQUEST_UNPUBLISH_VAT_INVOICE;
|
|
@@ -46,7 +46,7 @@ export declare class AuthService extends Service {
|
|
|
46
46
|
getEmailByPartyId(partyId: string): Promise<any>;
|
|
47
47
|
getPartyDetailByPhone(phone: string, fields: string[]): Promise<any>;
|
|
48
48
|
getPartyDetailByContactInfo(contactInfo: string, fields: string[]): Promise<any>;
|
|
49
|
-
createPartyDetail(name: string, phone: string | null, email: string | null, createdBy: string, source: string, fields: string[]): Promise<any>;
|
|
49
|
+
createPartyDetail(name: string, phone: string | null, email: string | null, createdBy: string, isCreateUserLogin: boolean, source: string, fields: string[]): Promise<any>;
|
|
50
50
|
getOrganizationsByPartyIdDynamic(partyId: string, fields: string[]): Promise<any>;
|
|
51
51
|
checkEnabled2FA(partyId: string, fields: string[]): Promise<any>;
|
|
52
52
|
logout(accessToken: string, partyId: string): Promise<any>;
|
|
@@ -425,7 +425,7 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
425
425
|
}
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
|
-
createPartyDetail(name, phone, email, createdBy, source, fields) {
|
|
428
|
+
createPartyDetail(name, phone, email, createdBy, isCreateUserLogin, source, fields) {
|
|
429
429
|
return __awaiter(this, void 0, void 0, function* () {
|
|
430
430
|
const mutation = (0, mutations_1.CREATE_PARTY_DETAIL)(fields);
|
|
431
431
|
const variables = {
|
|
@@ -433,6 +433,7 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
433
433
|
phone,
|
|
434
434
|
email,
|
|
435
435
|
orgId: this.orgId,
|
|
436
|
+
isCreateUserLogin,
|
|
436
437
|
createdBy,
|
|
437
438
|
source,
|
|
438
439
|
};
|
|
@@ -7,5 +7,6 @@ export declare class PaymentService extends Service {
|
|
|
7
7
|
createPaymentOrder(paymentOrderData: any): Promise<any>;
|
|
8
8
|
genQRPayment(orderId: any, totalAmount: any): Promise<any>;
|
|
9
9
|
createVatInvoiceRequest(vatInvoiceRequest: any, createBy: string): Promise<any>;
|
|
10
|
+
requestUnpublishVatInvoice(vatInvoiceRequest: any, byUser: string, fields: string[]): Promise<any>;
|
|
10
11
|
getVatInvoiceRequestByOrder(orderId: string, offset: number, pageSize: number): Promise<any>;
|
|
11
12
|
}
|
|
@@ -88,6 +88,23 @@ class PaymentService extends serviceSDK_1.Service {
|
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
+
requestUnpublishVatInvoice(vatInvoiceRequest, byUser, fields) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
const mutation = (0, mutations_1.REQUEST_UNPUBLISH_VAT_INVOICE)(fields);
|
|
94
|
+
const variables = {
|
|
95
|
+
vatInvoiceRequest,
|
|
96
|
+
byUser,
|
|
97
|
+
};
|
|
98
|
+
try {
|
|
99
|
+
const response = yield this.graphqlMutation(mutation, variables);
|
|
100
|
+
return response.requestUnpublishVatInvoice;
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
console.log(`Error in requestUnpublishVatInvoice: ${error}`);
|
|
104
|
+
throw error;
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
91
108
|
getVatInvoiceRequestByOrder(orderId, offset, pageSize) {
|
|
92
109
|
return __awaiter(this, void 0, void 0, function* () {
|
|
93
110
|
const data = {
|