@longvansoftware/storefront-js-client 3.0.6 → 3.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.
- package/README.md +221 -221
- package/dist/src/graphql/auth/mutations.d.ts +1 -0
- package/dist/src/graphql/auth/mutations.js +192 -205
- package/dist/src/graphql/auth/queries.d.ts +0 -1
- package/dist/src/graphql/auth/queries.js +60 -65
- package/dist/src/graphql/campaign/mutations.js +26 -26
- package/dist/src/graphql/campaign/queries.js +375 -375
- package/dist/src/graphql/cashbook/queries.js +93 -93
- package/dist/src/graphql/cloud/mutations.js +103 -103
- package/dist/src/graphql/cloud/queries.js +112 -112
- package/dist/src/graphql/computing/mutations.js +96 -96
- package/dist/src/graphql/computing/queries.js +41 -41
- package/dist/src/graphql/crm/mutations.js +813 -813
- package/dist/src/graphql/crm/queries.js +661 -661
- package/dist/src/graphql/fragments/product.d.ts +38 -0
- package/dist/src/graphql/fragments/product.js +196 -0
- package/dist/src/graphql/payment/mutations.js +146 -146
- package/dist/src/graphql/payment/queries.js +116 -116
- package/dist/src/graphql/paymentV2/mutations.js +47 -47
- package/dist/src/graphql/paymentV2/queries.js +176 -176
- package/dist/src/graphql/product/mutations.js +94 -94
- package/dist/src/graphql/product/queries.js +472 -472
- package/dist/src/graphql/service/mutations.js +304 -304
- package/dist/src/graphql/service/queries.js +131 -131
- package/dist/src/graphql/store/mutations.js +24 -24
- package/dist/src/graphql/store/queries.js +24 -24
- package/dist/src/graphql/user/mutations.js +142 -142
- package/dist/src/graphql/user/queries.js +298 -298
- package/dist/src/lib/auth/index.d.ts +7 -36
- package/dist/src/lib/auth/index.js +6 -69
- package/dist/src/lib/order/index.d.ts +2 -0
- package/dist/src/lib/order/index.js +37 -0
- package/dist/src/lib/serviceSDK.js +12 -12
- package/dist/src/lib/shareZalo/index.d.ts +5 -0
- package/dist/src/lib/shareZalo/index.js +32 -0
- package/dist/src/types/auth.d.ts +0 -123
- package/dist/src/types/common.d.ts +264 -0
- package/dist/src/types/common.js +35 -0
- package/dist/src/utils/errorHandler.d.ts +64 -0
- package/dist/src/utils/errorHandler.js +197 -0
- package/package.json +43 -44
|
@@ -2,316 +2,316 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GET_VAT_INFO_BY_OWNER_PARTYID = exports.GET_PERSON_BY_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
|
-
exports.GET_PERSON_BY_IDS_QUERY = (0, graphql_tag_1.gql) `
|
|
6
|
-
query GetPersonByIds($partyIds: [String!]!) {
|
|
7
|
-
getPersonByPartyIds(partyIds: $partyIds) {
|
|
8
|
-
status
|
|
9
|
-
partyId
|
|
10
|
-
fullName
|
|
11
|
-
phone
|
|
12
|
-
address
|
|
13
|
-
gender
|
|
14
|
-
birthDate
|
|
15
|
-
email
|
|
16
|
-
personalTitle
|
|
17
|
-
imageUrl
|
|
18
|
-
identityNumber
|
|
19
|
-
id
|
|
20
|
-
addressModel {
|
|
21
|
-
id
|
|
22
|
-
addressInfo
|
|
23
|
-
provinceGeoId
|
|
24
|
-
districtGeoId
|
|
25
|
-
wardGeoId
|
|
26
|
-
provinceName
|
|
27
|
-
districtName
|
|
28
|
-
wardName
|
|
29
|
-
isDefault
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
5
|
+
exports.GET_PERSON_BY_IDS_QUERY = (0, graphql_tag_1.gql) `
|
|
6
|
+
query GetPersonByIds($partyIds: [String!]!) {
|
|
7
|
+
getPersonByPartyIds(partyIds: $partyIds) {
|
|
8
|
+
status
|
|
9
|
+
partyId
|
|
10
|
+
fullName
|
|
11
|
+
phone
|
|
12
|
+
address
|
|
13
|
+
gender
|
|
14
|
+
birthDate
|
|
15
|
+
email
|
|
16
|
+
personalTitle
|
|
17
|
+
imageUrl
|
|
18
|
+
identityNumber
|
|
19
|
+
id
|
|
20
|
+
addressModel {
|
|
21
|
+
id
|
|
22
|
+
addressInfo
|
|
23
|
+
provinceGeoId
|
|
24
|
+
districtGeoId
|
|
25
|
+
wardGeoId
|
|
26
|
+
provinceName
|
|
27
|
+
districtName
|
|
28
|
+
wardName
|
|
29
|
+
isDefault
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
33
|
`;
|
|
34
|
-
exports.SEARCH_COMPANY = (0, graphql_tag_1.gql) `
|
|
35
|
-
query SearchCompany($keyword: String, $orgId: String!, $limit: Int) {
|
|
36
|
-
searchCompany(keyword: $keyword, orgId: $orgId, limit: $limit) {
|
|
37
|
-
id
|
|
38
|
-
name
|
|
39
|
-
address
|
|
40
|
-
gender
|
|
41
|
-
identityNumber
|
|
42
|
-
birthDate
|
|
43
|
-
email
|
|
44
|
-
phone
|
|
45
|
-
createdStamp
|
|
46
|
-
createdBy
|
|
47
|
-
memberLevel
|
|
48
|
-
}
|
|
49
|
-
}
|
|
34
|
+
exports.SEARCH_COMPANY = (0, graphql_tag_1.gql) `
|
|
35
|
+
query SearchCompany($keyword: String, $orgId: String!, $limit: Int) {
|
|
36
|
+
searchCompany(keyword: $keyword, orgId: $orgId, limit: $limit) {
|
|
37
|
+
id
|
|
38
|
+
name
|
|
39
|
+
address
|
|
40
|
+
gender
|
|
41
|
+
identityNumber
|
|
42
|
+
birthDate
|
|
43
|
+
email
|
|
44
|
+
phone
|
|
45
|
+
createdStamp
|
|
46
|
+
createdBy
|
|
47
|
+
memberLevel
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
50
|
`;
|
|
51
|
-
exports.GET_CUSTOMER_BY_ID = (0, graphql_tag_1.gql) `
|
|
52
|
-
query GetCustomerById($id: String!) {
|
|
53
|
-
getCustomerById(id: $id) {
|
|
54
|
-
id
|
|
55
|
-
name
|
|
56
|
-
address
|
|
57
|
-
gender
|
|
58
|
-
identityNumber
|
|
59
|
-
birthDate
|
|
60
|
-
email
|
|
61
|
-
phone
|
|
62
|
-
createdStamp
|
|
63
|
-
createdBy
|
|
64
|
-
memberLevel
|
|
65
|
-
}
|
|
66
|
-
}
|
|
51
|
+
exports.GET_CUSTOMER_BY_ID = (0, graphql_tag_1.gql) `
|
|
52
|
+
query GetCustomerById($id: String!) {
|
|
53
|
+
getCustomerById(id: $id) {
|
|
54
|
+
id
|
|
55
|
+
name
|
|
56
|
+
address
|
|
57
|
+
gender
|
|
58
|
+
identityNumber
|
|
59
|
+
birthDate
|
|
60
|
+
email
|
|
61
|
+
phone
|
|
62
|
+
createdStamp
|
|
63
|
+
createdBy
|
|
64
|
+
memberLevel
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
67
|
`;
|
|
68
|
-
exports.SEARCH_CUSTOMER = (0, graphql_tag_1.gql) `
|
|
69
|
-
query SearchCustomers(
|
|
70
|
-
$keyword: String
|
|
71
|
-
$type: String
|
|
72
|
-
$startCreatedDate: DateCustom
|
|
73
|
-
$endCreatedDate: DateCustom
|
|
74
|
-
$memberLevel: String
|
|
75
|
-
$partnerId: String!
|
|
76
|
-
$currentPage: Int!
|
|
77
|
-
$pageSize: Int!
|
|
78
|
-
) {
|
|
79
|
-
searchCustomers(
|
|
80
|
-
keyword: $keyword
|
|
81
|
-
type: $type
|
|
82
|
-
startCreatedDate: $startCreatedDate
|
|
83
|
-
endCreatedDate: $endCreatedDate
|
|
84
|
-
memberLevel: $memberLevel
|
|
85
|
-
partnerId: $partnerId
|
|
86
|
-
currentPage: $currentPage
|
|
87
|
-
pageSize: $pageSize
|
|
88
|
-
) {
|
|
89
|
-
totalPages
|
|
90
|
-
totalElements
|
|
91
|
-
currentPage
|
|
92
|
-
content {
|
|
93
|
-
id
|
|
94
|
-
name
|
|
95
|
-
address
|
|
96
|
-
gender
|
|
97
|
-
identityNumber
|
|
98
|
-
birthDate
|
|
99
|
-
email
|
|
100
|
-
phone
|
|
101
|
-
createdStamp
|
|
102
|
-
createdBy
|
|
103
|
-
memberLevel
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
68
|
+
exports.SEARCH_CUSTOMER = (0, graphql_tag_1.gql) `
|
|
69
|
+
query SearchCustomers(
|
|
70
|
+
$keyword: String
|
|
71
|
+
$type: String
|
|
72
|
+
$startCreatedDate: DateCustom
|
|
73
|
+
$endCreatedDate: DateCustom
|
|
74
|
+
$memberLevel: String
|
|
75
|
+
$partnerId: String!
|
|
76
|
+
$currentPage: Int!
|
|
77
|
+
$pageSize: Int!
|
|
78
|
+
) {
|
|
79
|
+
searchCustomers(
|
|
80
|
+
keyword: $keyword
|
|
81
|
+
type: $type
|
|
82
|
+
startCreatedDate: $startCreatedDate
|
|
83
|
+
endCreatedDate: $endCreatedDate
|
|
84
|
+
memberLevel: $memberLevel
|
|
85
|
+
partnerId: $partnerId
|
|
86
|
+
currentPage: $currentPage
|
|
87
|
+
pageSize: $pageSize
|
|
88
|
+
) {
|
|
89
|
+
totalPages
|
|
90
|
+
totalElements
|
|
91
|
+
currentPage
|
|
92
|
+
content {
|
|
93
|
+
id
|
|
94
|
+
name
|
|
95
|
+
address
|
|
96
|
+
gender
|
|
97
|
+
identityNumber
|
|
98
|
+
birthDate
|
|
99
|
+
email
|
|
100
|
+
phone
|
|
101
|
+
createdStamp
|
|
102
|
+
createdBy
|
|
103
|
+
memberLevel
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
107
|
`;
|
|
108
|
-
exports.SEARCH_EMPLOYEES = (0, graphql_tag_1.gql) `
|
|
109
|
-
query SearchEmployees(
|
|
110
|
-
$keyword: String
|
|
111
|
-
$positionShortName: String
|
|
112
|
-
$partnerId: String
|
|
113
|
-
) {
|
|
114
|
-
searchEmployees(
|
|
115
|
-
keyword: $keyword
|
|
116
|
-
positionShortName: $positionShortName
|
|
117
|
-
partnerId: $partnerId
|
|
118
|
-
) {
|
|
119
|
-
id
|
|
120
|
-
name
|
|
121
|
-
address
|
|
122
|
-
gender
|
|
123
|
-
identityNumber
|
|
124
|
-
birthDate
|
|
125
|
-
email
|
|
126
|
-
phone
|
|
127
|
-
createdStamp
|
|
128
|
-
createdBy
|
|
129
|
-
memberLevel
|
|
130
|
-
}
|
|
131
|
-
}
|
|
108
|
+
exports.SEARCH_EMPLOYEES = (0, graphql_tag_1.gql) `
|
|
109
|
+
query SearchEmployees(
|
|
110
|
+
$keyword: String
|
|
111
|
+
$positionShortName: String
|
|
112
|
+
$partnerId: String
|
|
113
|
+
) {
|
|
114
|
+
searchEmployees(
|
|
115
|
+
keyword: $keyword
|
|
116
|
+
positionShortName: $positionShortName
|
|
117
|
+
partnerId: $partnerId
|
|
118
|
+
) {
|
|
119
|
+
id
|
|
120
|
+
name
|
|
121
|
+
address
|
|
122
|
+
gender
|
|
123
|
+
identityNumber
|
|
124
|
+
birthDate
|
|
125
|
+
email
|
|
126
|
+
phone
|
|
127
|
+
createdStamp
|
|
128
|
+
createdBy
|
|
129
|
+
memberLevel
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
132
|
`;
|
|
133
|
-
exports.GET_POSTIONS_BY_EMPLOYEES_ID = (0, graphql_tag_1.gql) `
|
|
134
|
-
query GetPositionsByEmployeeId($employeeId: String!, $partnerId: String!) {
|
|
135
|
-
getPositionsByEmployeeId(employeeId: $employeeId, partnerId: $partnerId)
|
|
136
|
-
}
|
|
133
|
+
exports.GET_POSTIONS_BY_EMPLOYEES_ID = (0, graphql_tag_1.gql) `
|
|
134
|
+
query GetPositionsByEmployeeId($employeeId: String!, $partnerId: String!) {
|
|
135
|
+
getPositionsByEmployeeId(employeeId: $employeeId, partnerId: $partnerId)
|
|
136
|
+
}
|
|
137
137
|
`;
|
|
138
|
-
exports.GET_STORE_CHANEL_IDS_BY_EMPLOYESS_ID = (0, graphql_tag_1.gql) `
|
|
139
|
-
query GetStoreChannelIdsByEmployeeId(
|
|
140
|
-
$employeeId: String!
|
|
141
|
-
$partnerId: String!
|
|
142
|
-
) {
|
|
143
|
-
getStoreChannelIdsByEmployeeId(
|
|
144
|
-
employeeId: $employeeId
|
|
145
|
-
partnerId: $partnerId
|
|
146
|
-
)
|
|
147
|
-
}
|
|
138
|
+
exports.GET_STORE_CHANEL_IDS_BY_EMPLOYESS_ID = (0, graphql_tag_1.gql) `
|
|
139
|
+
query GetStoreChannelIdsByEmployeeId(
|
|
140
|
+
$employeeId: String!
|
|
141
|
+
$partnerId: String!
|
|
142
|
+
) {
|
|
143
|
+
getStoreChannelIdsByEmployeeId(
|
|
144
|
+
employeeId: $employeeId
|
|
145
|
+
partnerId: $partnerId
|
|
146
|
+
)
|
|
147
|
+
}
|
|
148
148
|
`;
|
|
149
|
-
exports.GET_EMPLOYEES_BY_STORE_CHANEL_ID = (0, graphql_tag_1.gql) `
|
|
150
|
-
query GetEmployeesByStoreChannelId(
|
|
151
|
-
$storeChannelId: String!
|
|
152
|
-
$partnerId: String!
|
|
153
|
-
) {
|
|
154
|
-
getEmployeesByStoreChannelId(
|
|
155
|
-
storeChannelId: $storeChannelId
|
|
156
|
-
partnerId: $partnerId
|
|
157
|
-
) {
|
|
158
|
-
id
|
|
159
|
-
name
|
|
160
|
-
address
|
|
161
|
-
gender
|
|
162
|
-
identityNumber
|
|
163
|
-
birthDate
|
|
164
|
-
email
|
|
165
|
-
phone
|
|
166
|
-
createdStamp
|
|
167
|
-
createdBy
|
|
168
|
-
memberLevel
|
|
169
|
-
}
|
|
170
|
-
}
|
|
149
|
+
exports.GET_EMPLOYEES_BY_STORE_CHANEL_ID = (0, graphql_tag_1.gql) `
|
|
150
|
+
query GetEmployeesByStoreChannelId(
|
|
151
|
+
$storeChannelId: String!
|
|
152
|
+
$partnerId: String!
|
|
153
|
+
) {
|
|
154
|
+
getEmployeesByStoreChannelId(
|
|
155
|
+
storeChannelId: $storeChannelId
|
|
156
|
+
partnerId: $partnerId
|
|
157
|
+
) {
|
|
158
|
+
id
|
|
159
|
+
name
|
|
160
|
+
address
|
|
161
|
+
gender
|
|
162
|
+
identityNumber
|
|
163
|
+
birthDate
|
|
164
|
+
email
|
|
165
|
+
phone
|
|
166
|
+
createdStamp
|
|
167
|
+
createdBy
|
|
168
|
+
memberLevel
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
171
|
`;
|
|
172
|
-
exports.GET_COMPANY_BY_CONTACT_INFO_ID = (0, graphql_tag_1.gql) `
|
|
173
|
-
query GetCompanyByContactInfoId($contactId: String!, $partnerId: String!) {
|
|
174
|
-
getCompanyByContactInfoId(contactId: $contactId, partnerId: $partnerId) {
|
|
175
|
-
id
|
|
176
|
-
name
|
|
177
|
-
address
|
|
178
|
-
gender
|
|
179
|
-
identityNumber
|
|
180
|
-
birthDate
|
|
181
|
-
email
|
|
182
|
-
phone
|
|
183
|
-
createdStamp
|
|
184
|
-
createdBy
|
|
185
|
-
memberLevel
|
|
186
|
-
}
|
|
187
|
-
}
|
|
172
|
+
exports.GET_COMPANY_BY_CONTACT_INFO_ID = (0, graphql_tag_1.gql) `
|
|
173
|
+
query GetCompanyByContactInfoId($contactId: String!, $partnerId: String!) {
|
|
174
|
+
getCompanyByContactInfoId(contactId: $contactId, partnerId: $partnerId) {
|
|
175
|
+
id
|
|
176
|
+
name
|
|
177
|
+
address
|
|
178
|
+
gender
|
|
179
|
+
identityNumber
|
|
180
|
+
birthDate
|
|
181
|
+
email
|
|
182
|
+
phone
|
|
183
|
+
createdStamp
|
|
184
|
+
createdBy
|
|
185
|
+
memberLevel
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
188
|
`;
|
|
189
|
-
exports.GET_CONTACT_INFOS_BY_COMPANY_ID = (0, graphql_tag_1.gql) `
|
|
190
|
-
query GetContactInfosByCompanyId($companyId: String!, $partnerId: String!) {
|
|
191
|
-
getContactInfosByCompanyId(companyId: $companyId, partnerId: $partnerId) {
|
|
192
|
-
id
|
|
193
|
-
name
|
|
194
|
-
address
|
|
195
|
-
gender
|
|
196
|
-
identityNumber
|
|
197
|
-
birthDate
|
|
198
|
-
email
|
|
199
|
-
phone
|
|
200
|
-
createdStamp
|
|
201
|
-
createdBy
|
|
202
|
-
memberLevel
|
|
203
|
-
}
|
|
204
|
-
}
|
|
189
|
+
exports.GET_CONTACT_INFOS_BY_COMPANY_ID = (0, graphql_tag_1.gql) `
|
|
190
|
+
query GetContactInfosByCompanyId($companyId: String!, $partnerId: String!) {
|
|
191
|
+
getContactInfosByCompanyId(companyId: $companyId, partnerId: $partnerId) {
|
|
192
|
+
id
|
|
193
|
+
name
|
|
194
|
+
address
|
|
195
|
+
gender
|
|
196
|
+
identityNumber
|
|
197
|
+
birthDate
|
|
198
|
+
email
|
|
199
|
+
phone
|
|
200
|
+
createdStamp
|
|
201
|
+
createdBy
|
|
202
|
+
memberLevel
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
205
|
`;
|
|
206
|
-
exports.GET_PROVINCES = (0, graphql_tag_1.gql) `
|
|
207
|
-
query GetProvinces {
|
|
208
|
-
getProvinces {
|
|
209
|
-
geoId
|
|
210
|
-
geoTypeId
|
|
211
|
-
geoName
|
|
212
|
-
geoNameLocal
|
|
213
|
-
geoCode
|
|
214
|
-
geoSecCode
|
|
215
|
-
abbreviation
|
|
216
|
-
vnPostId
|
|
217
|
-
jtExpressId
|
|
218
|
-
vnPostRegion
|
|
219
|
-
inetId
|
|
220
|
-
lastUpdatedStamp
|
|
221
|
-
lastUpdatedTxStamp
|
|
222
|
-
createdStamp
|
|
223
|
-
createdTxStamp
|
|
224
|
-
}
|
|
225
|
-
}
|
|
206
|
+
exports.GET_PROVINCES = (0, graphql_tag_1.gql) `
|
|
207
|
+
query GetProvinces {
|
|
208
|
+
getProvinces {
|
|
209
|
+
geoId
|
|
210
|
+
geoTypeId
|
|
211
|
+
geoName
|
|
212
|
+
geoNameLocal
|
|
213
|
+
geoCode
|
|
214
|
+
geoSecCode
|
|
215
|
+
abbreviation
|
|
216
|
+
vnPostId
|
|
217
|
+
jtExpressId
|
|
218
|
+
vnPostRegion
|
|
219
|
+
inetId
|
|
220
|
+
lastUpdatedStamp
|
|
221
|
+
lastUpdatedTxStamp
|
|
222
|
+
createdStamp
|
|
223
|
+
createdTxStamp
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
226
|
`;
|
|
227
|
-
exports.GET_DISTRICTS = (0, graphql_tag_1.gql) `
|
|
228
|
-
query GetDistricts($provinceId: String!) {
|
|
229
|
-
getDistricts(provinceId: $provinceId) {
|
|
230
|
-
geoId
|
|
231
|
-
geoTypeId
|
|
232
|
-
geoName
|
|
233
|
-
geoNameLocal
|
|
234
|
-
geoCode
|
|
235
|
-
geoSecCode
|
|
236
|
-
abbreviation
|
|
237
|
-
vnPostId
|
|
238
|
-
jtExpressId
|
|
239
|
-
vnPostRegion
|
|
240
|
-
inetId
|
|
241
|
-
lastUpdatedStamp
|
|
242
|
-
lastUpdatedTxStamp
|
|
243
|
-
createdStamp
|
|
244
|
-
createdTxStamp
|
|
245
|
-
}
|
|
246
|
-
}
|
|
227
|
+
exports.GET_DISTRICTS = (0, graphql_tag_1.gql) `
|
|
228
|
+
query GetDistricts($provinceId: String!) {
|
|
229
|
+
getDistricts(provinceId: $provinceId) {
|
|
230
|
+
geoId
|
|
231
|
+
geoTypeId
|
|
232
|
+
geoName
|
|
233
|
+
geoNameLocal
|
|
234
|
+
geoCode
|
|
235
|
+
geoSecCode
|
|
236
|
+
abbreviation
|
|
237
|
+
vnPostId
|
|
238
|
+
jtExpressId
|
|
239
|
+
vnPostRegion
|
|
240
|
+
inetId
|
|
241
|
+
lastUpdatedStamp
|
|
242
|
+
lastUpdatedTxStamp
|
|
243
|
+
createdStamp
|
|
244
|
+
createdTxStamp
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
247
|
`;
|
|
248
|
-
exports.GET_WARDS = (0, graphql_tag_1.gql) `
|
|
249
|
-
query GetWards($districtId: String!) {
|
|
250
|
-
getWards(districtId: $districtId) {
|
|
251
|
-
geoId
|
|
252
|
-
geoTypeId
|
|
253
|
-
geoName
|
|
254
|
-
geoNameLocal
|
|
255
|
-
geoCode
|
|
256
|
-
geoSecCode
|
|
257
|
-
abbreviation
|
|
258
|
-
vnPostId
|
|
259
|
-
jtExpressId
|
|
260
|
-
vnPostRegion
|
|
261
|
-
inetId
|
|
262
|
-
lastUpdatedStamp
|
|
263
|
-
lastUpdatedTxStamp
|
|
264
|
-
createdStamp
|
|
265
|
-
createdTxStamp
|
|
266
|
-
}
|
|
267
|
-
}
|
|
248
|
+
exports.GET_WARDS = (0, graphql_tag_1.gql) `
|
|
249
|
+
query GetWards($districtId: String!) {
|
|
250
|
+
getWards(districtId: $districtId) {
|
|
251
|
+
geoId
|
|
252
|
+
geoTypeId
|
|
253
|
+
geoName
|
|
254
|
+
geoNameLocal
|
|
255
|
+
geoCode
|
|
256
|
+
geoSecCode
|
|
257
|
+
abbreviation
|
|
258
|
+
vnPostId
|
|
259
|
+
jtExpressId
|
|
260
|
+
vnPostRegion
|
|
261
|
+
inetId
|
|
262
|
+
lastUpdatedStamp
|
|
263
|
+
lastUpdatedTxStamp
|
|
264
|
+
createdStamp
|
|
265
|
+
createdTxStamp
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
268
|
`;
|
|
269
|
-
exports.GET_PERSON_BY_PARTY_ID = (0, graphql_tag_1.gql) `
|
|
270
|
-
query GetPersonByPartyId($partyId: String!) {
|
|
271
|
-
getPersonByPartyId(partyId: $partyId) {
|
|
272
|
-
status
|
|
273
|
-
partyId
|
|
274
|
-
fullName
|
|
275
|
-
phone
|
|
276
|
-
address
|
|
277
|
-
gender
|
|
278
|
-
birthDate
|
|
279
|
-
email
|
|
280
|
-
personalTitle
|
|
281
|
-
imageUrl
|
|
282
|
-
identityNumber
|
|
283
|
-
id
|
|
284
|
-
addressModel {
|
|
285
|
-
id
|
|
286
|
-
addressInfo
|
|
287
|
-
provinceGeoId
|
|
288
|
-
districtGeoId
|
|
289
|
-
wardGeoId
|
|
290
|
-
provinceName
|
|
291
|
-
districtName
|
|
292
|
-
wardName
|
|
293
|
-
isDefault
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
}
|
|
269
|
+
exports.GET_PERSON_BY_PARTY_ID = (0, graphql_tag_1.gql) `
|
|
270
|
+
query GetPersonByPartyId($partyId: String!) {
|
|
271
|
+
getPersonByPartyId(partyId: $partyId) {
|
|
272
|
+
status
|
|
273
|
+
partyId
|
|
274
|
+
fullName
|
|
275
|
+
phone
|
|
276
|
+
address
|
|
277
|
+
gender
|
|
278
|
+
birthDate
|
|
279
|
+
email
|
|
280
|
+
personalTitle
|
|
281
|
+
imageUrl
|
|
282
|
+
identityNumber
|
|
283
|
+
id
|
|
284
|
+
addressModel {
|
|
285
|
+
id
|
|
286
|
+
addressInfo
|
|
287
|
+
provinceGeoId
|
|
288
|
+
districtGeoId
|
|
289
|
+
wardGeoId
|
|
290
|
+
provinceName
|
|
291
|
+
districtName
|
|
292
|
+
wardName
|
|
293
|
+
isDefault
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
297
|
`;
|
|
298
|
-
exports.GET_VAT_INFO_BY_OWNER_PARTYID = (0, graphql_tag_1.gql) `
|
|
299
|
-
query GetVatInfoByOwnerPartyId(
|
|
300
|
-
$ownerPartyId:String!
|
|
301
|
-
){
|
|
302
|
-
getVatInfoByOwnerPartyId(
|
|
303
|
-
ownerPartyId: $ownerPartyId){
|
|
304
|
-
id
|
|
305
|
-
company
|
|
306
|
-
taxCode
|
|
307
|
-
address
|
|
308
|
-
invoiceReceiveEmail1
|
|
309
|
-
invoiceReceiveEmail2
|
|
310
|
-
ownerPartyId
|
|
311
|
-
createdStamp
|
|
312
|
-
updatedStamp
|
|
313
|
-
updatedBy
|
|
314
|
-
createdBy
|
|
315
|
-
}
|
|
316
|
-
}
|
|
298
|
+
exports.GET_VAT_INFO_BY_OWNER_PARTYID = (0, graphql_tag_1.gql) `
|
|
299
|
+
query GetVatInfoByOwnerPartyId(
|
|
300
|
+
$ownerPartyId:String!
|
|
301
|
+
){
|
|
302
|
+
getVatInfoByOwnerPartyId(
|
|
303
|
+
ownerPartyId: $ownerPartyId){
|
|
304
|
+
id
|
|
305
|
+
company
|
|
306
|
+
taxCode
|
|
307
|
+
address
|
|
308
|
+
invoiceReceiveEmail1
|
|
309
|
+
invoiceReceiveEmail2
|
|
310
|
+
ownerPartyId
|
|
311
|
+
createdStamp
|
|
312
|
+
updatedStamp
|
|
313
|
+
updatedBy
|
|
314
|
+
createdBy
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
317
|
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Service } from "../serviceSDK";
|
|
2
|
-
import { LoginRequest, LoginResponse, RegisterRequest, SendOTPResponse, ValidateOTPResponse, CreateUserLoginResponse, GetAccessTokenByOTPResponse
|
|
2
|
+
import { LoginRequest, LoginResponse, RegisterRequest, SendOTPResponse, ValidateOTPResponse, CreateUserLoginResponse, GetAccessTokenByOTPResponse } from "../../types/auth";
|
|
3
3
|
/**
|
|
4
4
|
* Represents the authentication service.
|
|
5
5
|
*/
|
|
@@ -36,15 +36,7 @@ export declare class AuthService extends Service {
|
|
|
36
36
|
getUserLoginByUserLoginId(userLoginId: string): Promise<any>;
|
|
37
37
|
checkUsernameExisted(username: string): Promise<any>;
|
|
38
38
|
linkingUserLoginAndUserDetail(userLoginId: string, partyId: string): Promise<any>;
|
|
39
|
-
|
|
40
|
-
* Creates user detail for the specified user login ID.
|
|
41
|
-
* Uses the SDK's configured orgId automatically.
|
|
42
|
-
*
|
|
43
|
-
* @param userLoginId - The user login ID to create detail for.
|
|
44
|
-
* @returns A promise that resolves to the created user detail with full profile information.
|
|
45
|
-
* @throws Will throw an error if the GraphQL mutation fails.
|
|
46
|
-
*/
|
|
47
|
-
createUserDetail(userLoginId: string): Promise<CreateUserDetailResponse>;
|
|
39
|
+
createUserDetail(userLoginId: string): Promise<any>;
|
|
48
40
|
sendSmsVerifyCode(username: string): Promise<any>;
|
|
49
41
|
verifyCode(username: string, code: string): Promise<any>;
|
|
50
42
|
resetPassword(username: string, newPassword: string, accessToken: string): Promise<any>;
|
|
@@ -62,10 +54,10 @@ export declare class AuthService extends Service {
|
|
|
62
54
|
* Creates a new organization.
|
|
63
55
|
*
|
|
64
56
|
* @param orgName - The name of the organization to create.
|
|
65
|
-
* @returns A promise that resolves to the
|
|
57
|
+
* @returns A promise that resolves to the result of the createOrg mutation.
|
|
66
58
|
* @throws Will throw an error if the GraphQL mutation fails.
|
|
67
59
|
*/
|
|
68
|
-
createOrg(orgName: string): Promise<
|
|
60
|
+
createOrg(orgName: string): Promise<any>;
|
|
69
61
|
/**
|
|
70
62
|
* Adds a role to a user in an organization.
|
|
71
63
|
*
|
|
@@ -100,7 +92,7 @@ export declare class AuthService extends Service {
|
|
|
100
92
|
* @returns A promise that resolves to the result of the sendOTP mutation.
|
|
101
93
|
* @throws Will throw an error if the GraphQL mutation fails.
|
|
102
94
|
*/
|
|
103
|
-
sendOTP(phone: string, type?:
|
|
95
|
+
sendOTP(phone: string, type?: 'SMS' | 'ZALO'): Promise<SendOTPResponse>;
|
|
104
96
|
/**
|
|
105
97
|
* Validates OTP code for the specified phone number.
|
|
106
98
|
*
|
|
@@ -110,7 +102,7 @@ export declare class AuthService extends Service {
|
|
|
110
102
|
* @returns A promise that resolves to the result of the validateOTP mutation.
|
|
111
103
|
* @throws Will throw an error if the GraphQL mutation fails.
|
|
112
104
|
*/
|
|
113
|
-
validateOTP(otpCode: string, phone: string, type?:
|
|
105
|
+
validateOTP(otpCode: string, phone: string, type?: 'SMS' | 'ZALO'): Promise<ValidateOTPResponse>;
|
|
114
106
|
/**
|
|
115
107
|
* Gets access token by validating OTP code for the specified phone number.
|
|
116
108
|
* This function validates the OTP and returns an access token if successful.
|
|
@@ -121,26 +113,5 @@ export declare class AuthService extends Service {
|
|
|
121
113
|
* @returns A promise that resolves to an object containing the access token.
|
|
122
114
|
* @throws Will throw an error if the GraphQL mutation fails.
|
|
123
115
|
*/
|
|
124
|
-
getAccessTokenByOTP(otpCode: string, phone: string, type?:
|
|
125
|
-
/**
|
|
126
|
-
* Updates user information.
|
|
127
|
-
* Uses the SDK's configured orgId and access token automatically.
|
|
128
|
-
*
|
|
129
|
-
* @param updateUserRequest - The user information to update.
|
|
130
|
-
* @param type - Optional type parameter.
|
|
131
|
-
* @param password - Optional password for verification.
|
|
132
|
-
* @returns A promise that resolves to the updated user information.
|
|
133
|
-
* @throws Will throw an error if the GraphQL mutation fails.
|
|
134
|
-
*/
|
|
135
|
-
updateInfo(updateUserRequest: UpdateInfoRequest, type?: string, password?: string): Promise<UpdateInfoResponse>;
|
|
136
|
-
/**
|
|
137
|
-
* Creates/updates user password.
|
|
138
|
-
* Uses the SDK's configured orgId and access token automatically.
|
|
139
|
-
* This is a simplified version of updateInfo specifically for password creation.
|
|
140
|
-
*
|
|
141
|
-
* @param password - The new password to set.
|
|
142
|
-
* @returns A promise that resolves to the updated user information.
|
|
143
|
-
* @throws Will throw an error if the GraphQL mutation fails.
|
|
144
|
-
*/
|
|
145
|
-
createPassword(password: string): Promise<UpdateInfoResponse>;
|
|
116
|
+
getAccessTokenByOTP(otpCode: string, phone: string, type?: 'SMS' | 'ZALO'): Promise<GetAccessTokenByOTPResponse>;
|
|
146
117
|
}
|