@longvansoftware/storefront-js-client 4.3.3 → 4.3.5
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/queries.d.ts +1 -0
- package/dist/src/graphql/auth/queries.js +11 -1
- package/dist/src/graphql/payment/mutations.js +4 -0
- package/dist/src/lib/auth/index.d.ts +1 -0
- package/dist/src/lib/auth/index.js +15 -0
- package/dist/src/lib/payment/index.js +4 -2
- package/dist/src/types/invoice.d.ts +1 -0
- package/package.json +1 -1
|
@@ -12,3 +12,4 @@ export declare const GET_MENUS: import("graphql").DocumentNode;
|
|
|
12
12
|
export declare const GET_WORK_SPACES: import("graphql").DocumentNode;
|
|
13
13
|
export declare const GET_ORGANIZATION_BY_ID: import("graphql").DocumentNode;
|
|
14
14
|
export declare const SHOW_LOGIN_SOCIAL: import("graphql").DocumentNode;
|
|
15
|
+
export declare const GET_PARTY_DETAILS_BY_PHONE: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SHOW_LOGIN_SOCIAL = exports.GET_ORGANIZATION_BY_ID = exports.GET_WORK_SPACES = exports.GET_MENUS = exports.GET_ORGANIZATIONS_BY_PARTY_ID = exports.GET_ACCESS_TOKEN_BY_OTP_QUERY = exports.CHECK_USER_LOGIN = exports.LOGIN_ZALO = exports.LOGIN_FACEBOOK = exports.LOGIN_GOOGLE = exports.CHECK_USERNAME_EXISTED = exports.GET_USER_LOGIN_BY_USER_LOGIN_ID = exports.GET_USER_LOGIN_BY_TOKEN = exports.GET_USER_DETAIL = void 0;
|
|
3
|
+
exports.GET_PARTY_DETAILS_BY_PHONE = exports.SHOW_LOGIN_SOCIAL = exports.GET_ORGANIZATION_BY_ID = exports.GET_WORK_SPACES = exports.GET_MENUS = exports.GET_ORGANIZATIONS_BY_PARTY_ID = exports.GET_ACCESS_TOKEN_BY_OTP_QUERY = exports.CHECK_USER_LOGIN = exports.LOGIN_ZALO = exports.LOGIN_FACEBOOK = exports.LOGIN_GOOGLE = exports.CHECK_USERNAME_EXISTED = exports.GET_USER_LOGIN_BY_USER_LOGIN_ID = exports.GET_USER_LOGIN_BY_TOKEN = exports.GET_USER_DETAIL = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.GET_USER_DETAIL = (0, graphql_tag_1.gql) `
|
|
6
6
|
query GetUserDetail($orgId: String!, $accessToken: String!) {
|
|
@@ -225,3 +225,13 @@ exports.SHOW_LOGIN_SOCIAL = (0, graphql_tag_1.gql) `
|
|
|
225
225
|
showLoginSocial(orgId: $orgId, serviceOperator: $serviceOperator)
|
|
226
226
|
}
|
|
227
227
|
`;
|
|
228
|
+
exports.GET_PARTY_DETAILS_BY_PHONE = (0, graphql_tag_1.gql) `
|
|
229
|
+
query GetPartyDetailsByPhone($phone: String!) {
|
|
230
|
+
getPartyDetailsByPhone(phone: $phone) {
|
|
231
|
+
id
|
|
232
|
+
name
|
|
233
|
+
phone
|
|
234
|
+
email
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
`;
|
|
@@ -51,6 +51,7 @@ exports.REQUEST_UNPUBLISH_VAT_INVOICE = (0, graphql_tag_1.gql) `
|
|
|
51
51
|
$signType: String
|
|
52
52
|
$includeBuyerTaxCode: Boolean
|
|
53
53
|
$buyerName: String
|
|
54
|
+
$buyerPhone: String
|
|
54
55
|
$buyerTaxCode: String
|
|
55
56
|
$buyerCompany: String
|
|
56
57
|
$buyerAddress: String
|
|
@@ -67,6 +68,7 @@ exports.REQUEST_UNPUBLISH_VAT_INVOICE = (0, graphql_tag_1.gql) `
|
|
|
67
68
|
signType: $signType
|
|
68
69
|
includeBuyerTaxCode: $includeBuyerTaxCode
|
|
69
70
|
buyerName: $buyerName
|
|
71
|
+
buyerPhone: $buyerPhone
|
|
70
72
|
buyerTaxCode: $buyerTaxCode
|
|
71
73
|
buyerCompany: $buyerCompany
|
|
72
74
|
buyerAddress: $buyerAddress
|
|
@@ -94,6 +96,7 @@ exports.REQUEST_PUBLISH_VAT_INVOICE = (0, graphql_tag_1.gql) `
|
|
|
94
96
|
$signType: String
|
|
95
97
|
$includeBuyerTaxCode: Boolean
|
|
96
98
|
$buyerName: String
|
|
99
|
+
$buyerPhone: String
|
|
97
100
|
$buyerTaxCode: String
|
|
98
101
|
$buyerCompany: String
|
|
99
102
|
$buyerAddress: String
|
|
@@ -110,6 +113,7 @@ exports.REQUEST_PUBLISH_VAT_INVOICE = (0, graphql_tag_1.gql) `
|
|
|
110
113
|
signType: $signType
|
|
111
114
|
includeBuyerTaxCode: $includeBuyerTaxCode
|
|
112
115
|
buyerName: $buyerName
|
|
116
|
+
buyerPhone: $buyerPhone
|
|
113
117
|
buyerTaxCode: $buyerTaxCode
|
|
114
118
|
buyerCompany: $buyerCompany
|
|
115
119
|
buyerAddress: $buyerAddress
|
|
@@ -728,5 +728,20 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
728
728
|
}
|
|
729
729
|
});
|
|
730
730
|
}
|
|
731
|
+
getPartyDetailsByPhone(phone) {
|
|
732
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
733
|
+
const query = queries_1.GET_PARTY_DETAILS_BY_PHONE;
|
|
734
|
+
const variables = {
|
|
735
|
+
phone,
|
|
736
|
+
};
|
|
737
|
+
try {
|
|
738
|
+
const response = yield this.graphqlQuery(query, variables);
|
|
739
|
+
return response.getPartyDetailsByPhone;
|
|
740
|
+
}
|
|
741
|
+
catch (error) {
|
|
742
|
+
throw error;
|
|
743
|
+
}
|
|
744
|
+
});
|
|
745
|
+
}
|
|
731
746
|
}
|
|
732
747
|
exports.AuthService = AuthService;
|
|
@@ -99,7 +99,7 @@ class PaymentService extends serviceSDK_1.Service {
|
|
|
99
99
|
requestUnpublishVatInvoice(VatInvoiceRequest, byUser) {
|
|
100
100
|
return __awaiter(this, void 0, void 0, function* () {
|
|
101
101
|
const mutation = mutations_1.REQUEST_UNPUBLISH_VAT_INVOICE;
|
|
102
|
-
const { sourceId, sourceType, signType, includeBuyerTaxCode, buyerName, buyerTaxCode, buyerCompany, buyerAddress, sendMail, receiverName, receiverEmail, } = VatInvoiceRequest;
|
|
102
|
+
const { sourceId, sourceType, signType, includeBuyerTaxCode, buyerName, buyerPhone, buyerTaxCode, buyerCompany, buyerAddress, sendMail, receiverName, receiverEmail, } = VatInvoiceRequest;
|
|
103
103
|
const variables = {
|
|
104
104
|
partnerId: this.orgId,
|
|
105
105
|
sourceId,
|
|
@@ -107,6 +107,7 @@ class PaymentService extends serviceSDK_1.Service {
|
|
|
107
107
|
signType,
|
|
108
108
|
includeBuyerTaxCode,
|
|
109
109
|
buyerName,
|
|
110
|
+
buyerPhone,
|
|
110
111
|
buyerTaxCode,
|
|
111
112
|
buyerCompany,
|
|
112
113
|
buyerAddress,
|
|
@@ -127,7 +128,7 @@ class PaymentService extends serviceSDK_1.Service {
|
|
|
127
128
|
requestPublishVatInvoice(VatInvoiceRequest, byUser) {
|
|
128
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129
130
|
const mutation = mutations_1.REQUEST_PUBLISH_VAT_INVOICE;
|
|
130
|
-
const { sourceId, sourceType, signType, includeBuyerTaxCode, buyerName, buyerTaxCode, buyerCompany, buyerAddress, sendMail, receiverName, receiverEmail, } = VatInvoiceRequest;
|
|
131
|
+
const { sourceId, sourceType, signType, includeBuyerTaxCode, buyerName, buyerPhone, buyerTaxCode, buyerCompany, buyerAddress, sendMail, receiverName, receiverEmail, } = VatInvoiceRequest;
|
|
131
132
|
const variables = {
|
|
132
133
|
partnerId: this.orgId,
|
|
133
134
|
sourceId,
|
|
@@ -135,6 +136,7 @@ class PaymentService extends serviceSDK_1.Service {
|
|
|
135
136
|
signType,
|
|
136
137
|
includeBuyerTaxCode,
|
|
137
138
|
buyerName,
|
|
139
|
+
buyerPhone,
|
|
138
140
|
buyerTaxCode,
|
|
139
141
|
buyerCompany,
|
|
140
142
|
buyerAddress,
|