@longvansoftware/service-js-client 1.14.2 → 1.14.4
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 +41 -4
- package/dist/src/graphql/quicklab_service/queries.js +14 -0
- package/dist/src/lib/quicklab_service/index.d.ts +1 -0
- package/dist/src/lib/quicklab_service/index.js +14 -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!
|
@@ -28,14 +28,21 @@ exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = (0, graphql_tag_1.gql) `
|
|
28
28
|
articleTitle
|
29
29
|
computingId
|
30
30
|
computingName
|
31
|
+
computingState
|
31
32
|
templateId
|
32
33
|
templateName
|
33
34
|
productId
|
34
35
|
productName
|
36
|
+
parent
|
37
|
+
labSessionIdLast
|
38
|
+
statusUseLast
|
39
|
+
startTimeLast
|
40
|
+
endTimeLast
|
41
|
+
noteLast
|
35
42
|
}
|
36
43
|
}
|
37
44
|
`;
|
38
|
-
// 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
|
39
46
|
exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = (0, graphql_tag_1.gql) `
|
40
47
|
mutation CreateLabSessionByLabSessionId(
|
41
48
|
$labSessionId: String!
|
@@ -59,14 +66,21 @@ exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = (0, graphql_tag_1.gql) `
|
|
59
66
|
articleTitle
|
60
67
|
computingId
|
61
68
|
computingName
|
69
|
+
computingState
|
62
70
|
templateId
|
63
71
|
templateName
|
64
72
|
productId
|
65
73
|
productName
|
74
|
+
parent
|
75
|
+
labSessionIdLast
|
76
|
+
statusUseLast
|
77
|
+
startTimeLast
|
78
|
+
endTimeLast
|
79
|
+
noteLast
|
66
80
|
}
|
67
81
|
}
|
68
82
|
`;
|
69
|
-
// 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
|
70
84
|
exports.CREATE_LAB_SESSION_BY_COMPUTING_ID = (0, graphql_tag_1.gql) `
|
71
85
|
mutation CreateLabSessionByComputingId(
|
72
86
|
$computingId: String!
|
@@ -90,10 +104,17 @@ exports.CREATE_LAB_SESSION_BY_COMPUTING_ID = (0, graphql_tag_1.gql) `
|
|
90
104
|
articleTitle
|
91
105
|
computingId
|
92
106
|
computingName
|
107
|
+
computingState
|
93
108
|
templateId
|
94
109
|
templateName
|
95
110
|
productId
|
96
111
|
productName
|
112
|
+
parent
|
113
|
+
labSessionIdLast
|
114
|
+
statusUseLast
|
115
|
+
startTimeLast
|
116
|
+
endTimeLast
|
117
|
+
noteLast
|
97
118
|
}
|
98
119
|
}
|
99
120
|
`;
|
@@ -119,3 +140,19 @@ exports.STOP_LAB_SESSION = (0, graphql_tag_1.gql) `
|
|
119
140
|
}
|
120
141
|
}
|
121
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
|
+
`;
|
@@ -40,10 +40,17 @@ exports.GET_LAB_SESSIONS_BY_USER_ID = (0, graphql_tag_1.gql) `
|
|
40
40
|
articleTitle
|
41
41
|
computingId
|
42
42
|
computingName
|
43
|
+
computingState
|
43
44
|
templateId
|
44
45
|
templateName
|
45
46
|
productId
|
46
47
|
productName
|
48
|
+
parent
|
49
|
+
labSessionIdLast
|
50
|
+
statusUseLast
|
51
|
+
startTimeLast
|
52
|
+
endTimeLast
|
53
|
+
noteLast
|
47
54
|
}
|
48
55
|
}
|
49
56
|
`;
|
@@ -66,10 +73,17 @@ exports.GET_LAB_SESSIONS_BY_USER_ID_AND_ARTICLE_ID = (0, graphql_tag_1.gql) `
|
|
66
73
|
articleTitle
|
67
74
|
computingId
|
68
75
|
computingName
|
76
|
+
computingState
|
69
77
|
templateId
|
70
78
|
templateName
|
71
79
|
productId
|
72
80
|
productName
|
81
|
+
parent
|
82
|
+
labSessionIdLast
|
83
|
+
statusUseLast
|
84
|
+
startTimeLast
|
85
|
+
endTimeLast
|
86
|
+
noteLast
|
73
87
|
}
|
74
88
|
}
|
75
89
|
`;
|
@@ -12,4 +12,5 @@ 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>;
|
15
16
|
}
|
@@ -151,5 +151,19 @@ 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
|
+
}
|
154
168
|
}
|
155
169
|
exports.QuicklabService = QuicklabService;
|