@longvansoftware/service-js-client 1.14.3 → 1.14.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/quicklab_service/mutations.d.ts +1 -0
- package/dist/src/graphql/quicklab_service/mutations.js +38 -4
- package/dist/src/graphql/quicklab_service/queries.d.ts +1 -0
- package/dist/src/graphql/quicklab_service/queries.js +45 -1
- package/dist/src/lib/quicklab_service/index.d.ts +2 -0
- package/dist/src/lib/quicklab_service/index.js +28 -0
- package/package.json +1 -1
@@ -4,3 +4,4 @@ export declare const CREATE_LAB_SESSION_BY_LAB_SESSION_ID: DocumentNode;
|
|
4
4
|
export declare const CREATE_LAB_SESSION_BY_COMPUTING_ID: DocumentNode;
|
5
5
|
export declare const UPDATE_END_TIME_LAB_SESSION: DocumentNode;
|
6
6
|
export declare const STOP_LAB_SESSION: DocumentNode;
|
7
|
+
export declare const UPDATE_TYPE_LAB_SESSION: DocumentNode;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.STOP_LAB_SESSION = exports.UPDATE_END_TIME_LAB_SESSION = exports.CREATE_LAB_SESSION_BY_COMPUTING_ID = exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = void 0;
|
3
|
+
exports.UPDATE_TYPE_LAB_SESSION = exports.STOP_LAB_SESSION = exports.UPDATE_END_TIME_LAB_SESSION = exports.CREATE_LAB_SESSION_BY_COMPUTING_ID = exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
|
-
// Tạo phiên thực hành từ template
|
5
|
+
// Tạo phiên thực hành từ template
|
6
6
|
exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = (0, graphql_tag_1.gql) `
|
7
7
|
mutation CreateLabSessionByTemplateId(
|
8
8
|
$templateId: String!
|
@@ -33,10 +33,16 @@ exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = (0, graphql_tag_1.gql) `
|
|
33
33
|
templateName
|
34
34
|
productId
|
35
35
|
productName
|
36
|
+
parent
|
37
|
+
labSessionIdLast
|
38
|
+
statusUseLast
|
39
|
+
startTimeLast
|
40
|
+
endTimeLast
|
41
|
+
noteLast
|
36
42
|
}
|
37
43
|
}
|
38
44
|
`;
|
39
|
-
// Tạo phiên thực hành con từ phiên thực hành chính
|
45
|
+
// Tạo phiên thực hành con từ phiên thực hành chính
|
40
46
|
exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = (0, graphql_tag_1.gql) `
|
41
47
|
mutation CreateLabSessionByLabSessionId(
|
42
48
|
$labSessionId: String!
|
@@ -65,10 +71,16 @@ exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = (0, graphql_tag_1.gql) `
|
|
65
71
|
templateName
|
66
72
|
productId
|
67
73
|
productName
|
74
|
+
parent
|
75
|
+
labSessionIdLast
|
76
|
+
statusUseLast
|
77
|
+
startTimeLast
|
78
|
+
endTimeLast
|
79
|
+
noteLast
|
68
80
|
}
|
69
81
|
}
|
70
82
|
`;
|
71
|
-
// Tạo phiên thực hành từ computing của khách hàng
|
83
|
+
// Tạo phiên thực hành từ computing của khách hàng
|
72
84
|
exports.CREATE_LAB_SESSION_BY_COMPUTING_ID = (0, graphql_tag_1.gql) `
|
73
85
|
mutation CreateLabSessionByComputingId(
|
74
86
|
$computingId: String!
|
@@ -97,6 +109,12 @@ exports.CREATE_LAB_SESSION_BY_COMPUTING_ID = (0, graphql_tag_1.gql) `
|
|
97
109
|
templateName
|
98
110
|
productId
|
99
111
|
productName
|
112
|
+
parent
|
113
|
+
labSessionIdLast
|
114
|
+
statusUseLast
|
115
|
+
startTimeLast
|
116
|
+
endTimeLast
|
117
|
+
noteLast
|
100
118
|
}
|
101
119
|
}
|
102
120
|
`;
|
@@ -122,3 +140,19 @@ exports.STOP_LAB_SESSION = (0, graphql_tag_1.gql) `
|
|
122
140
|
}
|
123
141
|
}
|
124
142
|
`;
|
143
|
+
exports.UPDATE_TYPE_LAB_SESSION = (0, graphql_tag_1.gql) `
|
144
|
+
mutation StopLabSession(
|
145
|
+
$labSessionId: String!
|
146
|
+
$typeLabSessionCode: String!
|
147
|
+
$userId: String!
|
148
|
+
) {
|
149
|
+
updateTypeLabSession(
|
150
|
+
labSessionId: $labSessionId
|
151
|
+
typeLabSessionCode: $typeLabSessionCode
|
152
|
+
userId: $userId
|
153
|
+
) {
|
154
|
+
status
|
155
|
+
message
|
156
|
+
}
|
157
|
+
}
|
158
|
+
`;
|
@@ -3,3 +3,4 @@ export declare const GET_TEMPLATE_BY_ARTICLE_ID: DocumentNode;
|
|
3
3
|
export declare const GET_TYPE_LAB_SESSION: DocumentNode;
|
4
4
|
export declare const GET_LAB_SESSIONS_BY_USER_ID: DocumentNode;
|
5
5
|
export declare const GET_LAB_SESSIONS_BY_USER_ID_AND_ARTICLE_ID: DocumentNode;
|
6
|
+
export declare const GET_LAB_SESSIONS_CHILL_BY_PARENT: DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GET_LAB_SESSIONS_BY_USER_ID_AND_ARTICLE_ID = exports.GET_LAB_SESSIONS_BY_USER_ID = exports.GET_TYPE_LAB_SESSION = exports.GET_TEMPLATE_BY_ARTICLE_ID = void 0;
|
3
|
+
exports.GET_LAB_SESSIONS_CHILL_BY_PARENT = exports.GET_LAB_SESSIONS_BY_USER_ID_AND_ARTICLE_ID = exports.GET_LAB_SESSIONS_BY_USER_ID = exports.GET_TYPE_LAB_SESSION = exports.GET_TEMPLATE_BY_ARTICLE_ID = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
// Danh sách template của bài lab
|
6
6
|
exports.GET_TEMPLATE_BY_ARTICLE_ID = (0, graphql_tag_1.gql) `
|
@@ -45,6 +45,12 @@ exports.GET_LAB_SESSIONS_BY_USER_ID = (0, graphql_tag_1.gql) `
|
|
45
45
|
templateName
|
46
46
|
productId
|
47
47
|
productName
|
48
|
+
parent
|
49
|
+
labSessionIdLast
|
50
|
+
statusUseLast
|
51
|
+
startTimeLast
|
52
|
+
endTimeLast
|
53
|
+
noteLast
|
48
54
|
}
|
49
55
|
}
|
50
56
|
`;
|
@@ -72,6 +78,44 @@ exports.GET_LAB_SESSIONS_BY_USER_ID_AND_ARTICLE_ID = (0, graphql_tag_1.gql) `
|
|
72
78
|
templateName
|
73
79
|
productId
|
74
80
|
productName
|
81
|
+
parent
|
82
|
+
labSessionIdLast
|
83
|
+
statusUseLast
|
84
|
+
startTimeLast
|
85
|
+
endTimeLast
|
86
|
+
noteLast
|
87
|
+
}
|
88
|
+
}
|
89
|
+
`;
|
90
|
+
exports.GET_LAB_SESSIONS_CHILL_BY_PARENT = (0, graphql_tag_1.gql) `
|
91
|
+
query GetLabSessionsByUserIdAndArticleId(
|
92
|
+
$labSessionId: String!
|
93
|
+
$userId: String!
|
94
|
+
) {
|
95
|
+
getLabSessionsChillByParent(labSessionId: $labSessionId, userId: $userId) {
|
96
|
+
labSessionId
|
97
|
+
userId
|
98
|
+
typeLabSession
|
99
|
+
statusUseName
|
100
|
+
statusUse
|
101
|
+
startTime
|
102
|
+
endTime
|
103
|
+
note
|
104
|
+
articleId
|
105
|
+
articleTitle
|
106
|
+
computingId
|
107
|
+
computingName
|
108
|
+
computingState
|
109
|
+
templateId
|
110
|
+
templateName
|
111
|
+
productId
|
112
|
+
productName
|
113
|
+
parent
|
114
|
+
labSessionIdLast
|
115
|
+
statusUseLast
|
116
|
+
startTimeLast
|
117
|
+
endTimeLast
|
118
|
+
noteLast
|
75
119
|
}
|
76
120
|
}
|
77
121
|
`;
|
@@ -12,4 +12,6 @@ export declare class QuicklabService extends Service {
|
|
12
12
|
createLabSessionByComputingId(computingId: string, userId: string, articleId: string): Promise<any>;
|
13
13
|
updateEndTimeLabSession(labSessionId: string, userId: string): Promise<any>;
|
14
14
|
stopLabSession(labSessionId: string, userId: string, note: string): Promise<any>;
|
15
|
+
updateTypeLabSession(labSessionId: string, typeLabSessionCode: string, userId: string): Promise<any>;
|
16
|
+
getLabSessionsChillByParent(labSessionId: string, userId: string): Promise<any>;
|
15
17
|
}
|
@@ -151,5 +151,33 @@ class QuicklabService extends serviceSDK_1.Service {
|
|
151
151
|
}
|
152
152
|
});
|
153
153
|
}
|
154
|
+
updateTypeLabSession(labSessionId, typeLabSessionCode, userId) {
|
155
|
+
return __awaiter(this, void 0, void 0, function* () {
|
156
|
+
const mutation = mutations_1.UPDATE_TYPE_LAB_SESSION;
|
157
|
+
const variables = { labSessionId, typeLabSessionCode, userId };
|
158
|
+
try {
|
159
|
+
const response = yield this.graphqlMutation(mutation, variables);
|
160
|
+
return response.updateTypeLabSession;
|
161
|
+
}
|
162
|
+
catch (error) {
|
163
|
+
console.log(`Error in updateTypeLabSession : ${error}`);
|
164
|
+
throw error;
|
165
|
+
}
|
166
|
+
});
|
167
|
+
}
|
168
|
+
getLabSessionsChillByParent(labSessionId, userId) {
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
170
|
+
const query = queries_1.GET_LAB_SESSIONS_CHILL_BY_PARENT;
|
171
|
+
const variables = { labSessionId, userId };
|
172
|
+
try {
|
173
|
+
const response = yield this.graphqlQuery(query, variables);
|
174
|
+
return response.getLabSessionsChillByParent;
|
175
|
+
}
|
176
|
+
catch (error) {
|
177
|
+
console.log(`Error in getLabSessionsChillByParent : ${error}`);
|
178
|
+
throw error;
|
179
|
+
}
|
180
|
+
});
|
181
|
+
}
|
154
182
|
}
|
155
183
|
exports.QuicklabService = QuicklabService;
|