@longvansoftware/service-js-client 1.14.3 → 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.
@@ -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
+ `;
@@ -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,12 @@ 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
75
87
  }
76
88
  }
77
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "1.14.3",
3
+ "version": "1.14.4",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [