@longvansoftware/service-js-client 1.3.8 → 1.3.9
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 +12 -1
- package/dist/src/graphql/payment/queries.d.ts +1 -0
- package/dist/src/graphql/payment/queries.js +38 -1
- package/dist/src/graphql/user/mutations.d.ts +3 -0
- package/dist/src/graphql/user/mutations.js +54 -1
- package/dist/src/graphql/user/queries.d.ts +1 -0
- package/dist/src/graphql/user/queries.js +39 -6
- package/dist/src/lib/payment/index.d.ts +2 -0
- package/dist/src/lib/payment/index.js +34 -0
- package/dist/src/lib/user/index.d.ts +4 -0
- package/dist/src/lib/user/index.js +68 -0
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.CREATE_PAYMENT_ORDER_MUTATION = void 0;
|
3
|
+
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(
|
@@ -38,3 +38,14 @@ exports.CREATE_PAYMENT_ORDER_MUTATION = (0, graphql_tag_1.gql) `
|
|
38
38
|
}
|
39
39
|
}
|
40
40
|
`;
|
41
|
+
exports.CREATE_VAT_INVOICE_REQUEST = (0, graphql_tag_1.gql) `
|
42
|
+
mutation CreateVatInvoiceRequest(
|
43
|
+
$vatInvoiceRequest: VatInvoiceRequest!
|
44
|
+
$createBy: String!
|
45
|
+
) {
|
46
|
+
createVatInvoiceRequest(
|
47
|
+
vatInvoiceRequest: $vatInvoiceRequest
|
48
|
+
createBy: $createBy
|
49
|
+
)
|
50
|
+
}
|
51
|
+
`;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GEN_QR_PAYMENT = exports.GET_PAYMENT_METHOD = void 0;
|
3
|
+
exports.GET_VAT_INVOICE_REQUEST_BY_ORDER = 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) {
|
@@ -28,3 +28,40 @@ exports.GEN_QR_PAYMENT = (0, graphql_tag_1.gql) `
|
|
28
28
|
)
|
29
29
|
}
|
30
30
|
`;
|
31
|
+
exports.GET_VAT_INVOICE_REQUEST_BY_ORDER = (0, graphql_tag_1.gql) `
|
32
|
+
query GetVatInvoiceRequestByOrder(
|
33
|
+
$orgId: String!
|
34
|
+
$orderId: String!
|
35
|
+
$offset: Int
|
36
|
+
$pageSize: Int
|
37
|
+
) {
|
38
|
+
getVatInvoiceRequestByOrder(
|
39
|
+
orgId: $orgId
|
40
|
+
orderId: $orderId
|
41
|
+
offset: $offset
|
42
|
+
pageSize: $pageSize
|
43
|
+
) {
|
44
|
+
content {
|
45
|
+
id
|
46
|
+
partyId
|
47
|
+
orderIds
|
48
|
+
vatInfoId
|
49
|
+
taxCode
|
50
|
+
represent
|
51
|
+
company
|
52
|
+
address
|
53
|
+
receiverName
|
54
|
+
receiverEmail
|
55
|
+
note
|
56
|
+
createdBy
|
57
|
+
createdStamp
|
58
|
+
updatedBy
|
59
|
+
updatedStamp
|
60
|
+
}
|
61
|
+
totalElements
|
62
|
+
totalPages
|
63
|
+
number
|
64
|
+
size
|
65
|
+
}
|
66
|
+
}
|
67
|
+
`;
|
@@ -2,3 +2,6 @@ export declare const CREATE_COMPANY: import("graphql").DocumentNode;
|
|
2
2
|
export declare const UPDATE_COMPANY_INFOR: import("graphql").DocumentNode;
|
3
3
|
export declare const UPDATE_CUSTOMER_V2: import("graphql").DocumentNode;
|
4
4
|
export declare const CREATE_CUSTOMER_V2: import("graphql").DocumentNode;
|
5
|
+
export declare const CREATE_VAT_INFO: import("graphql").DocumentNode;
|
6
|
+
export declare const UPDATE_VAT_INFO: import("graphql").DocumentNode;
|
7
|
+
export declare const DELETE_VAT_INFO: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.CREATE_CUSTOMER_V2 = exports.UPDATE_CUSTOMER_V2 = exports.UPDATE_COMPANY_INFOR = exports.CREATE_COMPANY = void 0;
|
3
|
+
exports.DELETE_VAT_INFO = exports.UPDATE_VAT_INFO = exports.CREATE_VAT_INFO = exports.CREATE_CUSTOMER_V2 = exports.UPDATE_CUSTOMER_V2 = exports.UPDATE_COMPANY_INFOR = exports.CREATE_COMPANY = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.CREATE_COMPANY = (0, graphql_tag_1.gql) `
|
6
6
|
mutation CreateCompany(
|
@@ -116,3 +116,56 @@ exports.CREATE_CUSTOMER_V2 = (0, graphql_tag_1.gql) `
|
|
116
116
|
}
|
117
117
|
}
|
118
118
|
`;
|
119
|
+
exports.CREATE_VAT_INFO = (0, graphql_tag_1.gql) `
|
120
|
+
mutation CreateVatInfo(
|
121
|
+
$createVatInfoRequest: CreateVatInfoRequest!
|
122
|
+
$createdBy: String!
|
123
|
+
) {
|
124
|
+
createVatInfo(
|
125
|
+
createVatInfoRequest: $createVatInfoRequest
|
126
|
+
createdBy: $createdBy
|
127
|
+
) {
|
128
|
+
id
|
129
|
+
company
|
130
|
+
taxCode
|
131
|
+
address
|
132
|
+
invoiceReceiveEmail1
|
133
|
+
invoiceReceiveEmail2
|
134
|
+
ownerPartyId
|
135
|
+
createdStamp
|
136
|
+
updatedStamp
|
137
|
+
updatedBy
|
138
|
+
createdBy
|
139
|
+
}
|
140
|
+
}
|
141
|
+
`;
|
142
|
+
exports.UPDATE_VAT_INFO = (0, graphql_tag_1.gql) `
|
143
|
+
mutation UpdateVatInfo(
|
144
|
+
$id: String!
|
145
|
+
$updateVatInfoRequest: UpdateVatInfoRequest!
|
146
|
+
$updateBy: String!
|
147
|
+
) {
|
148
|
+
updateVatInfo(
|
149
|
+
id: $id
|
150
|
+
updateVatInfoRequest: $updateVatInfoRequest
|
151
|
+
updateBy: $updateBy
|
152
|
+
) {
|
153
|
+
id
|
154
|
+
company
|
155
|
+
taxCode
|
156
|
+
address
|
157
|
+
invoiceReceiveEmail1
|
158
|
+
invoiceReceiveEmail2
|
159
|
+
ownerPartyId
|
160
|
+
createdStamp
|
161
|
+
updatedStamp
|
162
|
+
updatedBy
|
163
|
+
createdBy
|
164
|
+
}
|
165
|
+
}
|
166
|
+
`;
|
167
|
+
exports.DELETE_VAT_INFO = (0, graphql_tag_1.gql) `
|
168
|
+
mutation DeleteVatInfo($id: String!, $updatedBy: String!) {
|
169
|
+
deleteVatInfo(id: $id, updatedBy: $updatedBy)
|
170
|
+
}
|
171
|
+
`;
|
@@ -11,3 +11,4 @@ export declare const GET_CONTACT_INFOS_BY_COMPANY_ID: import("graphql").Document
|
|
11
11
|
export declare const GET_PROVINCES: import("graphql").DocumentNode;
|
12
12
|
export declare const GET_DISTRICTS: import("graphql").DocumentNode;
|
13
13
|
export declare const GET_WARDS: import("graphql").DocumentNode;
|
14
|
+
export declare const GET_VAT_INFOR_BY_OWNER_PARTY_ID: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GET_WARDS = exports.GET_DISTRICTS = exports.GET_PROVINCES = exports.GET_CONTACT_INFOS_BY_COMPANY_ID = exports.GET_COMPANY_BY_CONTACT_INFO_ID = exports.GET_EMPLOYEES_BY_STORE_CHANEL_ID = exports.GET_STORE_CHANEL_IDS_BY_EMPLOYESS_ID = exports.GET_POSTIONS_BY_EMPLOYEES_ID = exports.SEARCH_EMPLOYEES = exports.SEARCH_CUSTOMER = exports.GET_CUSTOMER_BY_ID = exports.SEARCH_COMPANY = exports.GET_PERSON_BY_IDS_QUERY = void 0;
|
3
|
+
exports.GET_VAT_INFOR_BY_OWNER_PARTY_ID = exports.GET_WARDS = exports.GET_DISTRICTS = exports.GET_PROVINCES = exports.GET_CONTACT_INFOS_BY_COMPANY_ID = exports.GET_COMPANY_BY_CONTACT_INFO_ID = exports.GET_EMPLOYEES_BY_STORE_CHANEL_ID = exports.GET_STORE_CHANEL_IDS_BY_EMPLOYESS_ID = exports.GET_POSTIONS_BY_EMPLOYEES_ID = exports.SEARCH_EMPLOYEES = exports.SEARCH_CUSTOMER = exports.GET_CUSTOMER_BY_ID = exports.SEARCH_COMPANY = exports.GET_PERSON_BY_IDS_QUERY = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.GET_PERSON_BY_IDS_QUERY = (0, graphql_tag_1.gql) `
|
6
6
|
query GetPersonByIds($partyIds: [String!]!) {
|
@@ -106,7 +106,11 @@ exports.SEARCH_CUSTOMER = (0, graphql_tag_1.gql) `
|
|
106
106
|
}
|
107
107
|
`;
|
108
108
|
exports.SEARCH_EMPLOYEES = (0, graphql_tag_1.gql) `
|
109
|
-
query SearchEmployees(
|
109
|
+
query SearchEmployees(
|
110
|
+
$keyword: String
|
111
|
+
$positionShortName: String
|
112
|
+
$partnerId: String
|
113
|
+
) {
|
110
114
|
searchEmployees(
|
111
115
|
keyword: $keyword
|
112
116
|
positionShortName: $positionShortName
|
@@ -132,13 +136,25 @@ exports.GET_POSTIONS_BY_EMPLOYEES_ID = (0, graphql_tag_1.gql) `
|
|
132
136
|
}
|
133
137
|
`;
|
134
138
|
exports.GET_STORE_CHANEL_IDS_BY_EMPLOYESS_ID = (0, graphql_tag_1.gql) `
|
135
|
-
query GetStoreChannelIdsByEmployeeId(
|
136
|
-
|
139
|
+
query GetStoreChannelIdsByEmployeeId(
|
140
|
+
$employeeId: String!
|
141
|
+
$partnerId: String!
|
142
|
+
) {
|
143
|
+
getStoreChannelIdsByEmployeeId(
|
144
|
+
employeeId: $employeeId
|
145
|
+
partnerId: $partnerId
|
146
|
+
)
|
137
147
|
}
|
138
148
|
`;
|
139
149
|
exports.GET_EMPLOYEES_BY_STORE_CHANEL_ID = (0, graphql_tag_1.gql) `
|
140
|
-
query GetEmployeesByStoreChannelId(
|
141
|
-
|
150
|
+
query GetEmployeesByStoreChannelId(
|
151
|
+
$storeChannelId: String!
|
152
|
+
$partnerId: String!
|
153
|
+
) {
|
154
|
+
getEmployeesByStoreChannelId(
|
155
|
+
storeChannelId: $storeChannelId
|
156
|
+
partnerId: $partnerId
|
157
|
+
) {
|
142
158
|
id
|
143
159
|
name
|
144
160
|
address
|
@@ -250,3 +266,20 @@ exports.GET_WARDS = (0, graphql_tag_1.gql) `
|
|
250
266
|
}
|
251
267
|
}
|
252
268
|
`;
|
269
|
+
exports.GET_VAT_INFOR_BY_OWNER_PARTY_ID = (0, graphql_tag_1.gql) `
|
270
|
+
query GetVatInfoByOwnerPartyId($ownerPartyId: String!) {
|
271
|
+
getVatInfoByOwnerPartyId(ownerPartyId: $ownerPartyId) {
|
272
|
+
id
|
273
|
+
company
|
274
|
+
taxCode
|
275
|
+
address
|
276
|
+
invoiceReceiveEmail1
|
277
|
+
invoiceReceiveEmail2
|
278
|
+
ownerPartyId
|
279
|
+
createdStamp
|
280
|
+
updatedStamp
|
281
|
+
updatedBy
|
282
|
+
createdBy
|
283
|
+
}
|
284
|
+
}
|
285
|
+
`;
|
@@ -4,4 +4,6 @@ export declare class PaymentService extends Service {
|
|
4
4
|
getPaymentMethod(): Promise<any>;
|
5
5
|
createPaymentOrder(paymentOrderData: any): Promise<any>;
|
6
6
|
genQRPayment(orderId: any, totalAmount: any): Promise<any>;
|
7
|
+
createVatInvoiceRequest(vatInvoiceRequest: any, createBy: string): Promise<any>;
|
8
|
+
getVatInvoiceRequestByOrder(orderId: string, offset: number, pageSize: number): Promise<any>;
|
7
9
|
}
|
@@ -66,5 +66,39 @@ class PaymentService extends serviceSDK_1.Service {
|
|
66
66
|
}
|
67
67
|
});
|
68
68
|
}
|
69
|
+
createVatInvoiceRequest(vatInvoiceRequest, createBy) {
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
71
|
+
const data = {
|
72
|
+
vatInvoiceRequest,
|
73
|
+
createBy,
|
74
|
+
};
|
75
|
+
try {
|
76
|
+
const response = yield this.graphqlMutation(mutations_1.CREATE_VAT_INVOICE_REQUEST, data);
|
77
|
+
return response.createVatInvoiceRequest;
|
78
|
+
}
|
79
|
+
catch (error) {
|
80
|
+
console.log(`Error in createVatInvoiceRequest: ${error}`);
|
81
|
+
throw error;
|
82
|
+
}
|
83
|
+
});
|
84
|
+
}
|
85
|
+
getVatInvoiceRequestByOrder(orderId, offset, pageSize) {
|
86
|
+
return __awaiter(this, void 0, void 0, function* () {
|
87
|
+
const data = {
|
88
|
+
orgId: this.orgId,
|
89
|
+
orderId,
|
90
|
+
offset,
|
91
|
+
pageSize,
|
92
|
+
};
|
93
|
+
try {
|
94
|
+
const response = yield this.graphqlQuery(queries_1.GET_VAT_INVOICE_REQUEST_BY_ORDER, data);
|
95
|
+
return response.getVatInvoiceRequestByOrder;
|
96
|
+
}
|
97
|
+
catch (error) {
|
98
|
+
console.log(`Error in getVatInvoiceRequestByOrder: ${error}`);
|
99
|
+
throw error;
|
100
|
+
}
|
101
|
+
});
|
102
|
+
}
|
69
103
|
}
|
70
104
|
exports.PaymentService = PaymentService;
|
@@ -20,4 +20,8 @@ export declare class UserService extends Service {
|
|
20
20
|
getProvinces(): Promise<any>;
|
21
21
|
getDistricts(provinceId: string): Promise<any>;
|
22
22
|
getWards(districtId: string): Promise<any>;
|
23
|
+
getVatInfoByOwnerPartyId(ownerPartyId: string): Promise<any>;
|
24
|
+
createVatInfo(createVatInfoRequest: any, createdBy: string): Promise<any>;
|
25
|
+
updateVatInfo(id: string, updateVatInfoRequest: any, updateBy: string): Promise<any>;
|
26
|
+
deleteVatInfo(id: string, updatedBy: string): Promise<any>;
|
23
27
|
}
|
@@ -341,5 +341,73 @@ class UserService extends serviceSDK_1.Service {
|
|
341
341
|
}
|
342
342
|
});
|
343
343
|
}
|
344
|
+
getVatInfoByOwnerPartyId(ownerPartyId) {
|
345
|
+
return __awaiter(this, void 0, void 0, function* () {
|
346
|
+
const query = queries_1.GET_VAT_INFOR_BY_OWNER_PARTY_ID;
|
347
|
+
const variables = {
|
348
|
+
ownerPartyId,
|
349
|
+
};
|
350
|
+
try {
|
351
|
+
const response = yield this.graphqlQuery(query, variables);
|
352
|
+
return response.getVatInfoByOwnerPartyId;
|
353
|
+
}
|
354
|
+
catch (error) {
|
355
|
+
console.log(`Error in getVatInfoByOwnerPartyId: ${error}`);
|
356
|
+
throw error;
|
357
|
+
}
|
358
|
+
});
|
359
|
+
}
|
360
|
+
createVatInfo(createVatInfoRequest, createdBy) {
|
361
|
+
return __awaiter(this, void 0, void 0, function* () {
|
362
|
+
const mutation = mutations_1.CREATE_VAT_INFO;
|
363
|
+
const variables = {
|
364
|
+
createVatInfoRequest,
|
365
|
+
createdBy,
|
366
|
+
};
|
367
|
+
try {
|
368
|
+
const response = yield this.graphqlMutation(mutation, variables);
|
369
|
+
return response.createVatInfo;
|
370
|
+
}
|
371
|
+
catch (error) {
|
372
|
+
console.log(`Error in createVatInfo: ${error}`);
|
373
|
+
throw error;
|
374
|
+
}
|
375
|
+
});
|
376
|
+
}
|
377
|
+
updateVatInfo(id, updateVatInfoRequest, updateBy) {
|
378
|
+
return __awaiter(this, void 0, void 0, function* () {
|
379
|
+
const mutation = mutations_1.UPDATE_VAT_INFO;
|
380
|
+
const variables = {
|
381
|
+
id,
|
382
|
+
updateVatInfoRequest,
|
383
|
+
updateBy,
|
384
|
+
};
|
385
|
+
try {
|
386
|
+
const response = yield this.graphqlMutation(mutation, variables);
|
387
|
+
return response.updateVatInfo;
|
388
|
+
}
|
389
|
+
catch (error) {
|
390
|
+
console.log(`Error in updateVatInfo: ${error}`);
|
391
|
+
throw error;
|
392
|
+
}
|
393
|
+
});
|
394
|
+
}
|
395
|
+
deleteVatInfo(id, updatedBy) {
|
396
|
+
return __awaiter(this, void 0, void 0, function* () {
|
397
|
+
const mutation = mutations_1.DELETE_VAT_INFO;
|
398
|
+
const variables = {
|
399
|
+
id,
|
400
|
+
updatedBy,
|
401
|
+
};
|
402
|
+
try {
|
403
|
+
const response = yield this.graphqlMutation(mutation, variables);
|
404
|
+
return response.deleteVatInfo;
|
405
|
+
}
|
406
|
+
catch (error) {
|
407
|
+
console.log(`Error in deleteVatInfo: ${error}`);
|
408
|
+
throw error;
|
409
|
+
}
|
410
|
+
});
|
411
|
+
}
|
344
412
|
}
|
345
413
|
exports.UserService = UserService;
|