@longvansoftware/storefront-js-client 2.9.4 → 2.9.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/README.md +186 -93
- package/dist/src/graphql/auth/mutations.js +130 -130
- package/dist/src/graphql/auth/queries.js +55 -55
- package/dist/src/graphql/campaign/mutations.js +26 -26
- package/dist/src/graphql/campaign/queries.js +375 -375
- 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/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 +468 -468
- package/dist/src/graphql/service/mutations.js +304 -304
- package/dist/src/graphql/service/queries.js +131 -131
- package/dist/src/graphql/user/mutations.js +142 -142
- package/dist/src/graphql/user/queries.js +298 -298
- package/dist/src/lib/order/index.d.ts +10 -3
- package/dist/src/lib/order/index.js +25 -4
- package/dist/src/lib/serviceSDK.js +12 -12
- package/dist/src/types/order.d.ts +6 -0
- package/package.json +44 -43
- package/dist/src/lib/shareZalo/index.d.ts +0 -5
- package/dist/src/lib/shareZalo/index.js +0 -32
package/README.md
CHANGED
|
@@ -1,93 +1,186 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- [
|
|
30
|
-
- [
|
|
31
|
-
- [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- [ ]
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
- [ ]
|
|
43
|
-
- [ ]
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
1
|
+
# Longvan Storefront JavaScript Client SDK
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/js/%40longvansoftware%2Fstorefront-js-client)
|
|
4
|
+
[](http://www.typescriptlang.org/)
|
|
5
|
+
[](https://opensource.org/licenses/ISC)
|
|
6
|
+
|
|
7
|
+
A comprehensive TypeScript/JavaScript SDK for integrating with the Longvan e-commerce platform. This SDK provides easy-to-use interfaces for managing products, orders, users, payments, and other e-commerce functionalities.
|
|
8
|
+
|
|
9
|
+
## 🚀 Quick Start
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @longvansoftware/storefront-js-client
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { SDK } from '@longvansoftware/storefront-js-client';
|
|
17
|
+
|
|
18
|
+
const sdk = new SDK('your-org-id', 'your-store-id', 'dev');
|
|
19
|
+
sdk.setToken('your-access-token');
|
|
20
|
+
|
|
21
|
+
// Ready to use!
|
|
22
|
+
const products = await sdk.product.getSimpleProducts({ currentPage: 1, maxResult: 10 });
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## 📚 Documentation
|
|
26
|
+
|
|
27
|
+
### 🎯 Getting Started
|
|
28
|
+
- **[Installation & Setup](./docs/getting-started/installation.md)** - Complete installation guide
|
|
29
|
+
- **[Quick Start Guide](./docs/getting-started/quick-start.md)** - Get running in 5 minutes
|
|
30
|
+
- **[Configuration](./docs/getting-started/configuration.md)** - Environment and SDK configuration
|
|
31
|
+
- **[Authentication](./docs/getting-started/authentication.md)** - Authentication setup and patterns
|
|
32
|
+
|
|
33
|
+
### 🔧 Core Services
|
|
34
|
+
- **[Authentication Service](./docs/services/auth.md)** - User authentication and authorization
|
|
35
|
+
- **[Product Service](./docs/services/product.md)** - Product catalog management
|
|
36
|
+
- **[Order Service](./docs/services/order.md)** - Order lifecycle management
|
|
37
|
+
- **[User Service](./docs/services/user.md)** - Customer and user management
|
|
38
|
+
- **[Payment Service](./docs/services/payment.md)** - Payment processing and invoicing
|
|
39
|
+
- **[CRM Service](./docs/services/crm.md)** - Customer relationship management
|
|
40
|
+
|
|
41
|
+
### 🛠️ Extended Services
|
|
42
|
+
- **[Warehouse Service](./docs/services/warehouse.md)** - Inventory management
|
|
43
|
+
- **[Computing Service](./docs/services/computing.md)** - Cloud computing services
|
|
44
|
+
- **[Campaign Service](./docs/services/campaign.md)** - Marketing campaigns
|
|
45
|
+
- **[Image Service](./docs/services/image.md)** - Image and media management
|
|
46
|
+
- **[Upload Service](./docs/services/upload.md)** - File upload handling
|
|
47
|
+
|
|
48
|
+
### 📖 Advanced Topics
|
|
49
|
+
- **[Error Handling](./docs/advanced/error-handling.md)** - Robust error handling patterns
|
|
50
|
+
- **[TypeScript Support](./docs/advanced/typescript.md)** - Full TypeScript integration
|
|
51
|
+
- **[Testing](./docs/advanced/testing.md)** - Testing your integration
|
|
52
|
+
- **[Performance](./docs/advanced/performance.md)** - Optimization and best practices
|
|
53
|
+
|
|
54
|
+
### 💡 Examples & Patterns
|
|
55
|
+
- **[E-commerce Flow](./docs/examples/ecommerce-flow.md)** - Complete workflow examples
|
|
56
|
+
- **[Authentication Patterns](./docs/examples/auth-patterns.md)** - Auth implementation patterns
|
|
57
|
+
- **[Product Management](./docs/examples/product-management.md)** - Product handling examples
|
|
58
|
+
- **[Order Processing](./docs/examples/order-processing.md)** - Order workflow examples
|
|
59
|
+
|
|
60
|
+
### 🔍 API Reference
|
|
61
|
+
- **[Complete API Reference](./docs/api/README.md)** - Full API documentation
|
|
62
|
+
- **[Type Definitions](./docs/api/types.md)** - TypeScript type definitions
|
|
63
|
+
- **[Interfaces](./docs/api/interfaces.md)** - Interface specifications
|
|
64
|
+
|
|
65
|
+
## 🏗️ Architecture Overview
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Longvan SDK
|
|
69
|
+
├── 🔐 Authentication Layer
|
|
70
|
+
├── 🛍️ Core E-commerce Services
|
|
71
|
+
│ ├── Product Management
|
|
72
|
+
│ ├── Order Processing
|
|
73
|
+
│ ├── User Management
|
|
74
|
+
│ └── Payment Processing
|
|
75
|
+
├── 🔧 Extended Services
|
|
76
|
+
│ ├── Warehouse & Inventory
|
|
77
|
+
│ ├── CRM & Customer Support
|
|
78
|
+
│ ├── Marketing & Campaigns
|
|
79
|
+
│ └── Media & File Management
|
|
80
|
+
└── 🚀 Infrastructure
|
|
81
|
+
├── GraphQL Client
|
|
82
|
+
├── REST API Client
|
|
83
|
+
├── Error Handling
|
|
84
|
+
└── TypeScript Support
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## ✨ Key Features
|
|
88
|
+
|
|
89
|
+
- **🎯 Type-Safe**: Full TypeScript support with comprehensive type definitions
|
|
90
|
+
- **🔌 Multi-Protocol**: Supports both GraphQL and REST APIs
|
|
91
|
+
- **🔐 Secure**: Built-in authentication and token management
|
|
92
|
+
- **⚡ Performance**: Optimized for speed with caching and batching
|
|
93
|
+
- **🛠️ Developer-Friendly**: Intuitive API design with excellent IntelliSense
|
|
94
|
+
- **📱 Cross-Platform**: Works in Node.js, browsers, and React Native
|
|
95
|
+
- **🧪 Well-Tested**: Comprehensive test suite with high coverage
|
|
96
|
+
- **📖 Well-Documented**: Extensive documentation with real-world examples
|
|
97
|
+
|
|
98
|
+
## 🚀 Installation
|
|
99
|
+
|
|
100
|
+
### Using npm
|
|
101
|
+
```bash
|
|
102
|
+
npm install @longvansoftware/storefront-js-client
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Using yarn
|
|
106
|
+
```bash
|
|
107
|
+
yarn add @longvansoftware/storefront-js-client
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Using pnpm
|
|
111
|
+
```bash
|
|
112
|
+
pnpm add @longvansoftware/storefront-js-client
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## ⚡ Quick Example
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
import { SDK } from '@longvansoftware/storefront-js-client';
|
|
119
|
+
|
|
120
|
+
// Initialize SDK
|
|
121
|
+
const sdk = new SDK('your-org-id', 'your-store-id', 'dev');
|
|
122
|
+
|
|
123
|
+
// Authenticate user
|
|
124
|
+
const loginResponse = await sdk.auth.login({
|
|
125
|
+
username: 'user@example.com',
|
|
126
|
+
password: 'password123'
|
|
127
|
+
});
|
|
128
|
+
sdk.setToken(loginResponse.accessToken);
|
|
129
|
+
|
|
130
|
+
// Browse products
|
|
131
|
+
const products = await sdk.product.getSimpleProducts({
|
|
132
|
+
keyword: 'laptop',
|
|
133
|
+
currentPage: 1,
|
|
134
|
+
maxResult: 20
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// Create order
|
|
138
|
+
const order = await sdk.order.createOrder({
|
|
139
|
+
customer_id: loginResponse.partyId,
|
|
140
|
+
line_items: [{
|
|
141
|
+
product_id: products[0].id,
|
|
142
|
+
quantity: 1,
|
|
143
|
+
input_price: products[0].price
|
|
144
|
+
}]
|
|
145
|
+
}, 'web', false, loginResponse.partyId);
|
|
146
|
+
|
|
147
|
+
console.log('Order created:', order.id);
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## 🌟 What's New in v2.9.0
|
|
151
|
+
|
|
152
|
+
- ✨ Enhanced TypeScript support with stricter types
|
|
153
|
+
- 🚀 Improved error handling and debugging capabilities
|
|
154
|
+
- 🔧 New utility services for better platform integration
|
|
155
|
+
- ⚡ Performance optimizations and caching improvements
|
|
156
|
+
- 🔒 Updated dependencies and security enhancements
|
|
157
|
+
- 📖 Comprehensive documentation with real-world examples
|
|
158
|
+
|
|
159
|
+
## 🤝 Community & Support
|
|
160
|
+
|
|
161
|
+
- **📖 Documentation**: [Complete Documentation](./docs/README.md)
|
|
162
|
+
- **🐛 Issues**: [GitLab Issues](https://gitlab.longvan.vn/long-van-platform-2.0/website/storefront-js-client/-/issues)
|
|
163
|
+
- **💬 Discussions**: [GitLab Discussions](https://gitlab.longvan.vn/long-van-platform-2.0/website/storefront-js-client/-/issues)
|
|
164
|
+
- **📧 Support**: Contact the Longvan development team
|
|
165
|
+
|
|
166
|
+
## 🚀 Contributing
|
|
167
|
+
|
|
168
|
+
We welcome contributions! Please see our [Contributing Guide](./docs/contributing/README.md) for details on:
|
|
169
|
+
|
|
170
|
+
- 🔧 Setting up the development environment
|
|
171
|
+
- 📝 Code style and conventions
|
|
172
|
+
- 🧪 Running tests and quality checks
|
|
173
|
+
- 📤 Submitting pull requests
|
|
174
|
+
|
|
175
|
+
## 📄 License
|
|
176
|
+
|
|
177
|
+
This project is licensed under the ISC License - see the [LICENSE](./LICENSE) file for details.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
**Ready to get started?**
|
|
182
|
+
- 🚀 [Quick Start Guide](./docs/getting-started/quick-start.md)
|
|
183
|
+
- 📖 [Complete Documentation](./docs/README.md)
|
|
184
|
+
- 🔍 [API Reference](./docs/api/README.md)
|
|
185
|
+
|
|
186
|
+
**Need help?** Open an issue on [GitLab](https://gitlab.longvan.vn/long-van-platform-2.0/website/storefront-js-client/-/issues) or check our [documentation](./docs/README.md).
|
|
@@ -2,143 +2,143 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CREATE_USER_DETAIL_MUTATION = exports.LINKING_USER_LOGIN_AND_USER_DETAIL_MUTATION = exports.UPDATE_PROFILE_MUTATION = exports.UPDATE_PASSWORD_MUTATION = exports.UPDATE_INFO_MUTATION = exports.RESET_PASSWORD_MUTATION = exports.VERIFY_CODE_MUTATION = exports.SEND_SMS_VERIFY_CODE_MUTATION = exports.REGISTER_MUTATION = exports.LOGIN_MUTATION = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
-
exports.LOGIN_MUTATION = (0, graphql_tag_1.gql) `
|
|
6
|
-
mutation Login($loginRequest: LoginRequest!) {
|
|
7
|
-
login(loginRequest: $loginRequest) {
|
|
8
|
-
partyId
|
|
9
|
-
orgId
|
|
10
|
-
fullName
|
|
11
|
-
email
|
|
12
|
-
phone
|
|
13
|
-
address
|
|
14
|
-
identityNumber
|
|
15
|
-
gender
|
|
16
|
-
birthDate
|
|
17
|
-
avatarUrl
|
|
18
|
-
accessToken
|
|
19
|
-
username
|
|
20
|
-
orgPermissionsMap
|
|
21
|
-
orgPositionsMap
|
|
22
|
-
orgRolesMap
|
|
23
|
-
}
|
|
24
|
-
}
|
|
5
|
+
exports.LOGIN_MUTATION = (0, graphql_tag_1.gql) `
|
|
6
|
+
mutation Login($loginRequest: LoginRequest!) {
|
|
7
|
+
login(loginRequest: $loginRequest) {
|
|
8
|
+
partyId
|
|
9
|
+
orgId
|
|
10
|
+
fullName
|
|
11
|
+
email
|
|
12
|
+
phone
|
|
13
|
+
address
|
|
14
|
+
identityNumber
|
|
15
|
+
gender
|
|
16
|
+
birthDate
|
|
17
|
+
avatarUrl
|
|
18
|
+
accessToken
|
|
19
|
+
username
|
|
20
|
+
orgPermissionsMap
|
|
21
|
+
orgPositionsMap
|
|
22
|
+
orgRolesMap
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
25
|
`;
|
|
26
|
-
exports.REGISTER_MUTATION = (0, graphql_tag_1.gql) `
|
|
27
|
-
mutation Register($orgId: String!, $registerRequest: RegisterRequest!) {
|
|
28
|
-
register(orgId: $orgId, registerRequest: $registerRequest) {
|
|
29
|
-
id
|
|
30
|
-
partyId
|
|
31
|
-
type
|
|
32
|
-
username
|
|
33
|
-
status
|
|
34
|
-
accessToken
|
|
35
|
-
}
|
|
36
|
-
}
|
|
26
|
+
exports.REGISTER_MUTATION = (0, graphql_tag_1.gql) `
|
|
27
|
+
mutation Register($orgId: String!, $registerRequest: RegisterRequest!) {
|
|
28
|
+
register(orgId: $orgId, registerRequest: $registerRequest) {
|
|
29
|
+
id
|
|
30
|
+
partyId
|
|
31
|
+
type
|
|
32
|
+
username
|
|
33
|
+
status
|
|
34
|
+
accessToken
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
37
|
`;
|
|
38
|
-
exports.SEND_SMS_VERIFY_CODE_MUTATION = (0, graphql_tag_1.gql) `
|
|
39
|
-
mutation SendSmsVerifyCode($orgId: String!, $username: String!) {
|
|
40
|
-
sendSmsVerifyCode(orgId: $orgId, username: $username) {
|
|
41
|
-
id
|
|
42
|
-
code
|
|
43
|
-
username
|
|
44
|
-
timeExpired
|
|
45
|
-
}
|
|
46
|
-
}
|
|
38
|
+
exports.SEND_SMS_VERIFY_CODE_MUTATION = (0, graphql_tag_1.gql) `
|
|
39
|
+
mutation SendSmsVerifyCode($orgId: String!, $username: String!) {
|
|
40
|
+
sendSmsVerifyCode(orgId: $orgId, username: $username) {
|
|
41
|
+
id
|
|
42
|
+
code
|
|
43
|
+
username
|
|
44
|
+
timeExpired
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
47
|
`;
|
|
48
|
-
exports.VERIFY_CODE_MUTATION = (0, graphql_tag_1.gql) `
|
|
49
|
-
mutation VerifyCode($orgId: String!, $verifyCodeRequest: VerifyCodeRequest!) {
|
|
50
|
-
verifyCode(orgId: $orgId, verifyCodeRequest: $verifyCodeRequest)
|
|
51
|
-
}
|
|
48
|
+
exports.VERIFY_CODE_MUTATION = (0, graphql_tag_1.gql) `
|
|
49
|
+
mutation VerifyCode($orgId: String!, $verifyCodeRequest: VerifyCodeRequest!) {
|
|
50
|
+
verifyCode(orgId: $orgId, verifyCodeRequest: $verifyCodeRequest)
|
|
51
|
+
}
|
|
52
52
|
`;
|
|
53
|
-
exports.RESET_PASSWORD_MUTATION = (0, graphql_tag_1.gql) `
|
|
54
|
-
mutation ResetPassword(
|
|
55
|
-
$orgId: String!
|
|
56
|
-
$username: String!
|
|
57
|
-
$newPassword: String!
|
|
58
|
-
$accessToken: String!
|
|
59
|
-
) {
|
|
60
|
-
resetPassword(
|
|
61
|
-
orgId: $orgId
|
|
62
|
-
username: $username
|
|
63
|
-
newPassword: $newPassword
|
|
64
|
-
accessToken: $accessToken
|
|
65
|
-
)
|
|
66
|
-
}
|
|
53
|
+
exports.RESET_PASSWORD_MUTATION = (0, graphql_tag_1.gql) `
|
|
54
|
+
mutation ResetPassword(
|
|
55
|
+
$orgId: String!
|
|
56
|
+
$username: String!
|
|
57
|
+
$newPassword: String!
|
|
58
|
+
$accessToken: String!
|
|
59
|
+
) {
|
|
60
|
+
resetPassword(
|
|
61
|
+
orgId: $orgId
|
|
62
|
+
username: $username
|
|
63
|
+
newPassword: $newPassword
|
|
64
|
+
accessToken: $accessToken
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
67
|
`;
|
|
68
|
-
exports.UPDATE_INFO_MUTATION = (0, graphql_tag_1.gql) `
|
|
69
|
-
mutation UpdateInfo(
|
|
70
|
-
$orgId: String
|
|
71
|
-
$accessToken: String
|
|
72
|
-
$updateUserRequest: UpdateUserRequest
|
|
73
|
-
$type: String
|
|
74
|
-
$password: String
|
|
75
|
-
) {
|
|
76
|
-
updateInfo(
|
|
77
|
-
orgId: $orgId
|
|
78
|
-
accessToken: $accessToken
|
|
79
|
-
updateUserRequest: $updateUserRequest
|
|
80
|
-
type: $type
|
|
81
|
-
password: $password
|
|
82
|
-
) {
|
|
83
|
-
partyId
|
|
84
|
-
fullName
|
|
85
|
-
email
|
|
86
|
-
phone
|
|
87
|
-
address
|
|
88
|
-
identityNumber
|
|
89
|
-
gender
|
|
90
|
-
birthDate
|
|
91
|
-
avatarUrl
|
|
92
|
-
}
|
|
93
|
-
}
|
|
68
|
+
exports.UPDATE_INFO_MUTATION = (0, graphql_tag_1.gql) `
|
|
69
|
+
mutation UpdateInfo(
|
|
70
|
+
$orgId: String
|
|
71
|
+
$accessToken: String
|
|
72
|
+
$updateUserRequest: UpdateUserRequest
|
|
73
|
+
$type: String
|
|
74
|
+
$password: String
|
|
75
|
+
) {
|
|
76
|
+
updateInfo(
|
|
77
|
+
orgId: $orgId
|
|
78
|
+
accessToken: $accessToken
|
|
79
|
+
updateUserRequest: $updateUserRequest
|
|
80
|
+
type: $type
|
|
81
|
+
password: $password
|
|
82
|
+
) {
|
|
83
|
+
partyId
|
|
84
|
+
fullName
|
|
85
|
+
email
|
|
86
|
+
phone
|
|
87
|
+
address
|
|
88
|
+
identityNumber
|
|
89
|
+
gender
|
|
90
|
+
birthDate
|
|
91
|
+
avatarUrl
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
94
|
`;
|
|
95
|
-
exports.UPDATE_PASSWORD_MUTATION = `
|
|
96
|
-
mutation UpdatePassword($orgId: String!, $accessToken: String!, $currentPassword: String!, $newPassword: String!) {
|
|
97
|
-
updatePassword(orgId: $orgId, accessToken: $accessToken, currentPassword: $currentPassword, newPassword: $newPassword)
|
|
98
|
-
}
|
|
95
|
+
exports.UPDATE_PASSWORD_MUTATION = `
|
|
96
|
+
mutation UpdatePassword($orgId: String!, $accessToken: String!, $currentPassword: String!, $newPassword: String!) {
|
|
97
|
+
updatePassword(orgId: $orgId, accessToken: $accessToken, currentPassword: $currentPassword, newPassword: $newPassword)
|
|
98
|
+
}
|
|
99
99
|
`;
|
|
100
|
-
exports.UPDATE_PROFILE_MUTATION = (0, graphql_tag_1.gql) `
|
|
101
|
-
mutation UpdateProfile(
|
|
102
|
-
$userLoginId: String!
|
|
103
|
-
$name: String!
|
|
104
|
-
$phone: String!
|
|
105
|
-
$email: String
|
|
106
|
-
) {
|
|
107
|
-
updateProfile(
|
|
108
|
-
userLoginId: $userLoginId
|
|
109
|
-
name: $name
|
|
110
|
-
phone: $phone
|
|
111
|
-
email: $email
|
|
112
|
-
)
|
|
113
|
-
}
|
|
100
|
+
exports.UPDATE_PROFILE_MUTATION = (0, graphql_tag_1.gql) `
|
|
101
|
+
mutation UpdateProfile(
|
|
102
|
+
$userLoginId: String!
|
|
103
|
+
$name: String!
|
|
104
|
+
$phone: String!
|
|
105
|
+
$email: String
|
|
106
|
+
) {
|
|
107
|
+
updateProfile(
|
|
108
|
+
userLoginId: $userLoginId
|
|
109
|
+
name: $name
|
|
110
|
+
phone: $phone
|
|
111
|
+
email: $email
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
114
|
`;
|
|
115
|
-
exports.LINKING_USER_LOGIN_AND_USER_DETAIL_MUTATION = (0, graphql_tag_1.gql) `
|
|
116
|
-
mutation LinkingUserLoginAndUserDetail(
|
|
117
|
-
$userLoginId: String!
|
|
118
|
-
$partyId: String!
|
|
119
|
-
) {
|
|
120
|
-
linkingUserLoginAndUserDetail(userLoginId: $userLoginId, partyId: $partyId)
|
|
121
|
-
}
|
|
115
|
+
exports.LINKING_USER_LOGIN_AND_USER_DETAIL_MUTATION = (0, graphql_tag_1.gql) `
|
|
116
|
+
mutation LinkingUserLoginAndUserDetail(
|
|
117
|
+
$userLoginId: String!
|
|
118
|
+
$partyId: String!
|
|
119
|
+
) {
|
|
120
|
+
linkingUserLoginAndUserDetail(userLoginId: $userLoginId, partyId: $partyId)
|
|
121
|
+
}
|
|
122
122
|
`;
|
|
123
|
-
exports.CREATE_USER_DETAIL_MUTATION = (0, graphql_tag_1.gql) `
|
|
124
|
-
mutation CreateUserDetail($userLoginId: String!, $partnerId: String!) {
|
|
125
|
-
createUserDetail(userLoginId: $userLoginId, partnerId: $partnerId) {
|
|
126
|
-
partyId
|
|
127
|
-
orgId
|
|
128
|
-
fullName
|
|
129
|
-
email
|
|
130
|
-
phone
|
|
131
|
-
address
|
|
132
|
-
identityNumber
|
|
133
|
-
gender
|
|
134
|
-
birthDate
|
|
135
|
-
avatarUrl
|
|
136
|
-
accessToken
|
|
137
|
-
username
|
|
138
|
-
readyV2
|
|
139
|
-
orgPermissionsMap
|
|
140
|
-
orgPositionsMap
|
|
141
|
-
orgRolesMap
|
|
142
|
-
}
|
|
143
|
-
}
|
|
123
|
+
exports.CREATE_USER_DETAIL_MUTATION = (0, graphql_tag_1.gql) `
|
|
124
|
+
mutation CreateUserDetail($userLoginId: String!, $partnerId: String!) {
|
|
125
|
+
createUserDetail(userLoginId: $userLoginId, partnerId: $partnerId) {
|
|
126
|
+
partyId
|
|
127
|
+
orgId
|
|
128
|
+
fullName
|
|
129
|
+
email
|
|
130
|
+
phone
|
|
131
|
+
address
|
|
132
|
+
identityNumber
|
|
133
|
+
gender
|
|
134
|
+
birthDate
|
|
135
|
+
avatarUrl
|
|
136
|
+
accessToken
|
|
137
|
+
username
|
|
138
|
+
readyV2
|
|
139
|
+
orgPermissionsMap
|
|
140
|
+
orgPositionsMap
|
|
141
|
+
orgRolesMap
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
144
|
`;
|