@longvansoftware/service-js-client 1.14.4 → 1.14.6
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 +14 -1
- package/dist/src/graphql/quicklab_service/queries.d.ts +1 -0
- package/dist/src/graphql/quicklab_service/queries.js +33 -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
@@ -5,3 +5,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
7
|
export declare const UPDATE_TYPE_LAB_SESSION: DocumentNode;
|
8
|
+
export declare const STOP_LAB_SESSION_FOR_CUSTOMER: DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
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;
|
3
|
+
exports.STOP_LAB_SESSION_FOR_CUSTOMER = 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
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) `
|
@@ -156,3 +156,16 @@ exports.UPDATE_TYPE_LAB_SESSION = (0, graphql_tag_1.gql) `
|
|
156
156
|
}
|
157
157
|
}
|
158
158
|
`;
|
159
|
+
// Dừng thực hành
|
160
|
+
exports.STOP_LAB_SESSION_FOR_CUSTOMER = (0, graphql_tag_1.gql) `
|
161
|
+
mutation StopLabSessionForCustomer(
|
162
|
+
$labSessionId: String!
|
163
|
+
$userId: String!
|
164
|
+
$note: String
|
165
|
+
) {
|
166
|
+
stopLabSessionForCustomer(labSessionId: $labSessionId, userId: $userId, note: $note) {
|
167
|
+
status
|
168
|
+
message
|
169
|
+
}
|
170
|
+
}
|
171
|
+
`;
|
@@ -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) `
|
@@ -87,3 +87,35 @@ exports.GET_LAB_SESSIONS_BY_USER_ID_AND_ARTICLE_ID = (0, graphql_tag_1.gql) `
|
|
87
87
|
}
|
88
88
|
}
|
89
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
|
119
|
+
}
|
120
|
+
}
|
121
|
+
`;
|
@@ -13,4 +13,6 @@ export declare class QuicklabService extends Service {
|
|
13
13
|
updateEndTimeLabSession(labSessionId: string, userId: string): Promise<any>;
|
14
14
|
stopLabSession(labSessionId: string, userId: string, note: string): Promise<any>;
|
15
15
|
updateTypeLabSession(labSessionId: string, typeLabSessionCode: string, userId: string): Promise<any>;
|
16
|
+
getLabSessionsChillByParent(labSessionId: string, userId: string): Promise<any>;
|
17
|
+
stopLabSessionForCustomer(labSessionId: string, userId: string, note: string): Promise<any>;
|
16
18
|
}
|
@@ -165,5 +165,33 @@ class QuicklabService extends serviceSDK_1.Service {
|
|
165
165
|
}
|
166
166
|
});
|
167
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
|
+
}
|
182
|
+
stopLabSessionForCustomer(labSessionId, userId, note) {
|
183
|
+
return __awaiter(this, void 0, void 0, function* () {
|
184
|
+
const mutation = mutations_1.STOP_LAB_SESSION_FOR_CUSTOMER;
|
185
|
+
const variables = { labSessionId, userId, note };
|
186
|
+
try {
|
187
|
+
const response = yield this.graphqlMutation(mutation, variables);
|
188
|
+
return response.stopLabSessionForCustomer;
|
189
|
+
}
|
190
|
+
catch (error) {
|
191
|
+
console.log(`Error in stopLabSessionForCustomer : ${error}`);
|
192
|
+
throw error;
|
193
|
+
}
|
194
|
+
});
|
195
|
+
}
|
168
196
|
}
|
169
197
|
exports.QuicklabService = QuicklabService;
|