@quesmed/types 2.5.21 → 2.5.25
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/cjs/models/OsceMarksheet.d.ts +9 -4
- package/dist/cjs/models/OsceMarksheet.js +5 -2
- package/dist/cjs/resolvers/fragments/osce.js +6 -1
- package/dist/cjs/resolvers/mutation/restricted/osce.d.ts +11 -6
- package/dist/cjs/resolvers/mutation/restricted/osce.js +30 -12
- package/dist/cjs/resolvers/mutation/restricted/users.d.ts +1 -1
- package/dist/cjs/resolvers/mutation/restricted/users.js +38 -26
- package/dist/cjs/resolvers/query/restricted/osce.d.ts +1 -1
- package/dist/cjs/resolvers/query/restricted/osce.js +3 -3
- package/dist/cjs/resolvers/subscription/osce.d.ts +9 -3
- package/dist/cjs/resolvers/subscription/osce.js +13 -1
- package/dist/mjs/models/OsceMarksheet.d.ts +9 -4
- package/dist/mjs/models/OsceMarksheet.js +5 -2
- package/dist/mjs/resolvers/fragments/osce.js +6 -1
- package/dist/mjs/resolvers/mutation/restricted/osce.d.ts +11 -6
- package/dist/mjs/resolvers/mutation/restricted/osce.js +29 -11
- package/dist/mjs/resolvers/mutation/restricted/users.d.ts +1 -1
- package/dist/mjs/resolvers/mutation/restricted/users.js +38 -26
- package/dist/mjs/resolvers/query/restricted/osce.d.ts +1 -1
- package/dist/mjs/resolvers/query/restricted/osce.js +3 -3
- package/dist/mjs/resolvers/subscription/osce.d.ts +9 -3
- package/dist/mjs/resolvers/subscription/osce.js +13 -1
- package/package.json +1 -1
|
@@ -37,12 +37,15 @@ export declare enum EOsceMarksheetAction {
|
|
|
37
37
|
DISCONNECT = 6,
|
|
38
38
|
SELECT = 7,
|
|
39
39
|
LEFT = 8,
|
|
40
|
-
KICK = 9
|
|
40
|
+
KICK = 9,
|
|
41
|
+
ROLE_CHANGE = 10
|
|
41
42
|
}
|
|
42
43
|
export declare enum EOsceMarksheetState {
|
|
43
44
|
LOBBY = 0,
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
STATION_BUILDER = 1,
|
|
46
|
+
PRESTART = 2,
|
|
47
|
+
STATION = 3,
|
|
48
|
+
RESULT = 4
|
|
46
49
|
}
|
|
47
50
|
export interface IOsceMarksheet {
|
|
48
51
|
id: Id;
|
|
@@ -58,6 +61,7 @@ export interface IOsceMarksheet {
|
|
|
58
61
|
globalScore: number;
|
|
59
62
|
feedback: string;
|
|
60
63
|
agoraId: string;
|
|
64
|
+
sessionId: string;
|
|
61
65
|
readingTime: number;
|
|
62
66
|
stationTime: number;
|
|
63
67
|
feedbackTime: number;
|
|
@@ -70,12 +74,13 @@ export interface IOsceMarksheet {
|
|
|
70
74
|
stage: EOsceStage;
|
|
71
75
|
marks: IOsceMarksheetMark[];
|
|
72
76
|
users: IUser[];
|
|
77
|
+
activeUsers?: IUser[];
|
|
73
78
|
members: IOsceMarksheetMember[];
|
|
74
79
|
state: EOsceMarksheetState;
|
|
75
80
|
completed: boolean;
|
|
76
81
|
}
|
|
77
82
|
export interface IDashboardOsce {
|
|
78
|
-
|
|
83
|
+
lastSessionId: string;
|
|
79
84
|
types: IOsceType[];
|
|
80
85
|
avgScore: number;
|
|
81
86
|
completed: number;
|
|
@@ -22,12 +22,15 @@ var EOsceMarksheetAction;
|
|
|
22
22
|
EOsceMarksheetAction[EOsceMarksheetAction["SELECT"] = 7] = "SELECT";
|
|
23
23
|
EOsceMarksheetAction[EOsceMarksheetAction["LEFT"] = 8] = "LEFT";
|
|
24
24
|
EOsceMarksheetAction[EOsceMarksheetAction["KICK"] = 9] = "KICK";
|
|
25
|
+
EOsceMarksheetAction[EOsceMarksheetAction["ROLE_CHANGE"] = 10] = "ROLE_CHANGE";
|
|
25
26
|
})(EOsceMarksheetAction = exports.EOsceMarksheetAction || (exports.EOsceMarksheetAction = {}));
|
|
26
27
|
var EOsceMarksheetState;
|
|
27
28
|
(function (EOsceMarksheetState) {
|
|
28
29
|
EOsceMarksheetState[EOsceMarksheetState["LOBBY"] = 0] = "LOBBY";
|
|
29
|
-
EOsceMarksheetState[EOsceMarksheetState["
|
|
30
|
-
EOsceMarksheetState[EOsceMarksheetState["
|
|
30
|
+
EOsceMarksheetState[EOsceMarksheetState["STATION_BUILDER"] = 1] = "STATION_BUILDER";
|
|
31
|
+
EOsceMarksheetState[EOsceMarksheetState["PRESTART"] = 2] = "PRESTART";
|
|
32
|
+
EOsceMarksheetState[EOsceMarksheetState["STATION"] = 3] = "STATION";
|
|
33
|
+
EOsceMarksheetState[EOsceMarksheetState["RESULT"] = 4] = "RESULT";
|
|
31
34
|
})(EOsceMarksheetState = exports.EOsceMarksheetState || (exports.EOsceMarksheetState = {}));
|
|
32
35
|
var EOsceTimerState;
|
|
33
36
|
(function (EOsceTimerState) {
|
|
@@ -94,6 +94,7 @@ exports.OSCE_MARKSHEET_FIELDS = (0, client_1.gql) `
|
|
|
94
94
|
score
|
|
95
95
|
feedback
|
|
96
96
|
agoraId
|
|
97
|
+
sessionId
|
|
97
98
|
readingTime
|
|
98
99
|
stationTime
|
|
99
100
|
feedbackTime
|
|
@@ -121,6 +122,10 @@ exports.OSCE_MARKSHEET_FIELDS = (0, client_1.gql) `
|
|
|
121
122
|
id
|
|
122
123
|
displayName
|
|
123
124
|
}
|
|
125
|
+
activeUsers {
|
|
126
|
+
id
|
|
127
|
+
displayName
|
|
128
|
+
}
|
|
124
129
|
state
|
|
125
130
|
completed
|
|
126
131
|
}
|
|
@@ -128,7 +133,7 @@ exports.OSCE_MARKSHEET_FIELDS = (0, client_1.gql) `
|
|
|
128
133
|
exports.OSCE_MATCHMAKING_ACTION_FIELDS = (0, client_1.gql) `
|
|
129
134
|
fragment OsceMatchmakingActionFields on OsceMatchmakingAction {
|
|
130
135
|
osceMarksheetId
|
|
131
|
-
|
|
136
|
+
sessionId
|
|
132
137
|
matchedUsers
|
|
133
138
|
userId
|
|
134
139
|
classYear
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { EOsceMarksheetAction, EOsceRoles, Id, IOsceMarksheet, IOsceMarksheetMark } from '../../../models';
|
|
1
|
+
import { EOsceMarksheetAction, EOsceRoles, EStudyAction, Id, IOsceMarksheet, IOsceMarksheetMark } from '../../../models';
|
|
2
2
|
import { IOsceMatchmakingAction } from '../../subscription/osce';
|
|
3
3
|
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
4
4
|
export declare const START_OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
|
|
5
5
|
export interface IStartOsceMatchmakingVar {
|
|
6
|
-
|
|
6
|
+
sessionId: string;
|
|
7
7
|
}
|
|
8
8
|
export type IStartOsceMatchmakingData = RestrictedData<boolean, 'startOsceMatchmaking'>;
|
|
9
9
|
export declare const ACCEPT_OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
|
|
10
10
|
export interface IAcceptOsceMatchmakingVar {
|
|
11
|
-
|
|
11
|
+
sessionId: string;
|
|
12
12
|
}
|
|
13
13
|
export type IAcceptOsceMatchmakingData = RestrictedData<boolean, 'acceptOsceMatchmaking'>;
|
|
14
14
|
export declare const CHECK_OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
|
|
@@ -16,14 +16,19 @@ export type ICheckOsceMatchmakingVar = null;
|
|
|
16
16
|
export type ICheckOsceMatchmakingData = RestrictedData<graphqlNormalize & IOsceMatchmakingAction, 'checkOsceMatchmaking'>;
|
|
17
17
|
export declare const CANCEL_OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
|
|
18
18
|
export interface ICancelOsceMatchmakingVar {
|
|
19
|
-
|
|
19
|
+
sessionId: string;
|
|
20
20
|
}
|
|
21
21
|
export type ICancelOsceMatchmakingData = RestrictedData<boolean, 'cancelOsceMatchmaking'>;
|
|
22
|
+
export declare const CREATE_OR_JOIN_OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
23
|
+
export interface ICreateOrJoinOsceMarksheetVar {
|
|
24
|
+
sessionId?: string;
|
|
25
|
+
action: EStudyAction;
|
|
26
|
+
}
|
|
27
|
+
export type ICreateOrJoinOsceMarksheetData = RestrictedData<graphqlNormalize & IOsceMarksheet, 'createOrJoinOsceMarksheet'>;
|
|
22
28
|
export declare const BUILD_OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
23
29
|
export interface IBuildOsceMarksheetVar {
|
|
24
30
|
osceStationId?: Id;
|
|
25
|
-
|
|
26
|
-
solo?: boolean;
|
|
31
|
+
osceMarksheetId?: Id;
|
|
27
32
|
}
|
|
28
33
|
export type IBuildOsceMarksheetData = RestrictedData<graphqlNormalize & IOsceMarksheet, 'buildOsceMarksheet'>;
|
|
29
34
|
export declare const CHANGE_OSCE_ROLE: import("@apollo/client").DocumentNode;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LEAVE_OSCE_MARKSHEET = exports.END_OSCE_MARKSHEET = exports.OSCE_MARKSHEET_ACTIONS = exports.SAVE_OSCE_MARKSHEET = exports.PRESTART_OSCE_MARKSHEET = exports.START_OSCE_TIMER = exports.START_OSCE_MARKSHEET = exports.SELECT_OSCE_STATION = exports.optimisticMarkOsceMarksheetMark = exports.MARK_OSCE_MARKSHEET_MARK = exports.CHANGE_OSCE_ROLE = exports.BUILD_OSCE_MARKSHEET = exports.CANCEL_OSCE_MATCHMAKING = exports.CHECK_OSCE_MATCHMAKING = exports.ACCEPT_OSCE_MATCHMAKING = exports.START_OSCE_MATCHMAKING = void 0;
|
|
3
|
+
exports.LEAVE_OSCE_MARKSHEET = exports.END_OSCE_MARKSHEET = exports.OSCE_MARKSHEET_ACTIONS = exports.SAVE_OSCE_MARKSHEET = exports.PRESTART_OSCE_MARKSHEET = exports.START_OSCE_TIMER = exports.START_OSCE_MARKSHEET = exports.SELECT_OSCE_STATION = exports.optimisticMarkOsceMarksheetMark = exports.MARK_OSCE_MARKSHEET_MARK = exports.CHANGE_OSCE_ROLE = exports.BUILD_OSCE_MARKSHEET = exports.CREATE_OR_JOIN_OSCE_MARKSHEET = exports.CANCEL_OSCE_MATCHMAKING = exports.CHECK_OSCE_MATCHMAKING = exports.ACCEPT_OSCE_MATCHMAKING = exports.START_OSCE_MATCHMAKING = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
const osce_1 = require("../../fragments/osce");
|
|
6
6
|
const osce_2 = require("./../../fragments/osce");
|
|
7
7
|
exports.START_OSCE_MATCHMAKING = (0, client_1.gql) `
|
|
8
|
-
mutation StartOsceMatchmaking($
|
|
8
|
+
mutation StartOsceMatchmaking($sessionId: String!) {
|
|
9
9
|
restricted {
|
|
10
|
-
startOsceMatchmaking(
|
|
10
|
+
startOsceMatchmaking(sessionId: $sessionId)
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
`;
|
|
14
14
|
exports.ACCEPT_OSCE_MATCHMAKING = (0, client_1.gql) `
|
|
15
|
-
mutation AcceptOsceMatchmaking($
|
|
15
|
+
mutation AcceptOsceMatchmaking($sessionId: String!) {
|
|
16
16
|
restricted {
|
|
17
|
-
acceptOsceMatchmaking(
|
|
17
|
+
acceptOsceMatchmaking(sessionId: $sessionId)
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
`;
|
|
@@ -29,9 +29,29 @@ exports.CHECK_OSCE_MATCHMAKING = (0, client_1.gql) `
|
|
|
29
29
|
}
|
|
30
30
|
`;
|
|
31
31
|
exports.CANCEL_OSCE_MATCHMAKING = (0, client_1.gql) `
|
|
32
|
-
mutation CancelOsceMatchmaking($
|
|
32
|
+
mutation CancelOsceMatchmaking($sessionId: String!) {
|
|
33
33
|
restricted {
|
|
34
|
-
cancelOsceMatchmaking(
|
|
34
|
+
cancelOsceMatchmaking(sessionId: $sessionId)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
exports.CREATE_OR_JOIN_OSCE_MARKSHEET = (0, client_1.gql) `
|
|
39
|
+
${osce_2.OSCE_STATION_FIELDS}
|
|
40
|
+
${osce_1.OSCE_MARKSHEET_FIELDS}
|
|
41
|
+
mutation CreateOrJoinOsceMarksheet(
|
|
42
|
+
$sessionId: String!
|
|
43
|
+
$action: Int!
|
|
44
|
+
) {
|
|
45
|
+
restricted {
|
|
46
|
+
createOrJoinOsceMarksheet(
|
|
47
|
+
sessionId: $sessionId
|
|
48
|
+
action: $action
|
|
49
|
+
) {
|
|
50
|
+
...OsceMarksheetFields
|
|
51
|
+
osceStation {
|
|
52
|
+
...OsceStationFields
|
|
53
|
+
}
|
|
54
|
+
}
|
|
35
55
|
}
|
|
36
56
|
}
|
|
37
57
|
`;
|
|
@@ -39,15 +59,13 @@ exports.BUILD_OSCE_MARKSHEET = (0, client_1.gql) `
|
|
|
39
59
|
${osce_2.OSCE_STATION_FIELDS}
|
|
40
60
|
${osce_1.OSCE_MARKSHEET_FIELDS}
|
|
41
61
|
mutation BuildOsceMarksheet(
|
|
42
|
-
$osceStationId: Int
|
|
43
|
-
$
|
|
44
|
-
$solo: Boolean
|
|
62
|
+
$osceStationId: Int!
|
|
63
|
+
$osceMarksheetId: Int
|
|
45
64
|
) {
|
|
46
65
|
restricted {
|
|
47
66
|
buildOsceMarksheet(
|
|
48
67
|
osceStationId: $osceStationId
|
|
49
|
-
|
|
50
|
-
solo: $solo
|
|
68
|
+
osceMarksheetId: $osceMarksheetId
|
|
51
69
|
) {
|
|
52
70
|
...OsceMarksheetFields
|
|
53
71
|
osceStation {
|
|
@@ -61,4 +61,4 @@ export type IUpsertUserVideoStatusVar = {
|
|
|
61
61
|
};
|
|
62
62
|
export type IUpsertUserVideoStatusData = RestrictedData<graphqlNormalize & IUserVideoStatus[], 'upsertUserVideoStatus'>;
|
|
63
63
|
export declare const UPSERT_USER_VIDEO_STATUS: import("@apollo/client").DocumentNode;
|
|
64
|
-
export declare const updateCacheOnVideoLearningStatusUpdate: (prevStatus?: EUserLearningStatus | null
|
|
64
|
+
export declare const updateCacheOnVideoLearningStatusUpdate: (prevStatus?: EUserLearningStatus | null) => (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IUpsertUserVideoStatusData>, options: ApolloUpdateOptions) => void;
|
|
@@ -232,7 +232,7 @@ const getVideoUpdatedFieldNames = (newStatus, prevStatus) => [
|
|
|
232
232
|
getVideoStatsFieldName(prevStatus),
|
|
233
233
|
getVideoStatsFieldName(newStatus),
|
|
234
234
|
];
|
|
235
|
-
const updateCacheOnVideoLearningStatusUpdate = (prevStatus
|
|
235
|
+
const updateCacheOnVideoLearningStatusUpdate = (prevStatus) => (cache, result, options) => {
|
|
236
236
|
const { upsertUserVideoStatus } = result?.data?.restricted || {};
|
|
237
237
|
const { variables } = options || {};
|
|
238
238
|
if (!variables || !upsertUserVideoStatus) {
|
|
@@ -248,34 +248,46 @@ const updateCacheOnVideoLearningStatusUpdate = (prevStatus, topicId) => (cache,
|
|
|
248
248
|
fragment: VIDEO_STATUS_FRAGMENT,
|
|
249
249
|
});
|
|
250
250
|
});
|
|
251
|
-
|
|
251
|
+
const topicIds = new Set();
|
|
252
|
+
upsertUserVideoStatus.forEach(({ video }) => {
|
|
253
|
+
const { concepts } = video;
|
|
254
|
+
if (concepts) {
|
|
255
|
+
concepts.forEach(({ topicId }) => {
|
|
256
|
+
topicIds.add(Number(topicId));
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
if (!topicIds.size) {
|
|
252
261
|
return;
|
|
253
262
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
id:
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
});
|
|
261
|
-
if (prevData) {
|
|
262
|
-
const [prevStatName, newStatName] = getVideoUpdatedFieldNames(status, prevStatus);
|
|
263
|
-
const newData = {
|
|
264
|
-
...prevData,
|
|
265
|
-
[newStatName]: (prevData[newStatName] || 0) + videoIds.length,
|
|
266
|
-
};
|
|
267
|
-
if (prevStatus !== undefined &&
|
|
268
|
-
prevStatus !== null &&
|
|
269
|
-
prevData[prevStatName]) {
|
|
270
|
-
newData[prevStatName] = (prevData[prevStatName] || 0) - videoIds.length;
|
|
271
|
-
}
|
|
272
|
-
cache.writeFragment({
|
|
273
|
-
id: cache.identify({ id: topicId, __typename: 'Topic' }),
|
|
274
|
-
data: {
|
|
275
|
-
...newData,
|
|
276
|
-
},
|
|
263
|
+
[...topicIds].forEach((topicId) => {
|
|
264
|
+
const prevData = cache.readFragment({
|
|
265
|
+
id: cache.identify({
|
|
266
|
+
id: topicId,
|
|
267
|
+
__typename: 'Topic',
|
|
268
|
+
}),
|
|
277
269
|
fragment: TOPIC_VIDEO_STATUS_STATS_FRAGMENT,
|
|
278
270
|
});
|
|
279
|
-
|
|
271
|
+
if (prevData) {
|
|
272
|
+
const [prevStatName, newStatName] = getVideoUpdatedFieldNames(status, prevStatus);
|
|
273
|
+
const newData = {
|
|
274
|
+
...prevData,
|
|
275
|
+
[newStatName]: (prevData[newStatName] || 0) + videoIds.length,
|
|
276
|
+
};
|
|
277
|
+
if (prevStatus !== undefined &&
|
|
278
|
+
prevStatus !== null &&
|
|
279
|
+
prevData[prevStatName]) {
|
|
280
|
+
newData[prevStatName] =
|
|
281
|
+
(prevData[prevStatName] || 0) - videoIds.length;
|
|
282
|
+
}
|
|
283
|
+
cache.writeFragment({
|
|
284
|
+
id: cache.identify({ id: topicId, __typename: 'Topic' }),
|
|
285
|
+
data: {
|
|
286
|
+
...newData,
|
|
287
|
+
},
|
|
288
|
+
fragment: TOPIC_VIDEO_STATUS_STATS_FRAGMENT,
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
});
|
|
280
292
|
};
|
|
281
293
|
exports.updateCacheOnVideoLearningStatusUpdate = updateCacheOnVideoLearningStatusUpdate;
|
|
@@ -47,6 +47,6 @@ export interface ISearchOsceStationsVar {
|
|
|
47
47
|
export type ISearchOsceStationsData = RestrictedData<(graphqlNormalize & IOsceStation)[], 'searchOsceStations'>;
|
|
48
48
|
export declare const HEARTBEAT: import("@apollo/client").DocumentNode;
|
|
49
49
|
export interface IHeartbeatVar {
|
|
50
|
-
|
|
50
|
+
sessionId: string;
|
|
51
51
|
}
|
|
52
52
|
export type IHeartBeatData = RestrictedData<boolean, 'heartbeat'>;
|
|
@@ -26,7 +26,7 @@ exports.DASHBOARD_OSCE = (0, client_1.gql) `
|
|
|
26
26
|
query DashboardOsce($solo: Boolean!) {
|
|
27
27
|
restricted {
|
|
28
28
|
dashboardOsce(solo: $solo) {
|
|
29
|
-
|
|
29
|
+
lastSessionId
|
|
30
30
|
types {
|
|
31
31
|
id
|
|
32
32
|
name
|
|
@@ -129,9 +129,9 @@ exports.SEARCH_OSCE_STATIONS = (0, client_1.gql) `
|
|
|
129
129
|
}
|
|
130
130
|
`;
|
|
131
131
|
exports.HEARTBEAT = (0, client_1.gql) `
|
|
132
|
-
query Heartbeat($
|
|
132
|
+
query Heartbeat($sessionId: String!) {
|
|
133
133
|
restricted {
|
|
134
|
-
heartbeat(
|
|
134
|
+
heartbeat(sessionId: $sessionId)
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EClassYearGroup, EOsceMarksheetAction, EOsceRoles, IAccessLevel, IClassYear, Id, IOsceMarksheetMember, IOsceMarksheetTimer, IUser } from '../../models';
|
|
1
|
+
import { EClassYearGroup, EOsceMarksheetAction, EOsceMarksheetState, EOsceRoles, IAccessLevel, IClassYear, Id, IOsceMarksheetMember, IOsceMarksheetTimer, IUser } from '../../models';
|
|
2
2
|
import { RootData } from '../types';
|
|
3
3
|
export declare const OSCE_ROLE_CHANGE_KEY = "OSCE_ROLE_CHANGE";
|
|
4
4
|
export declare const OSCE_MARKSHEET_ACTION_KEY = "OSCE_MARKSHEET_ACTION";
|
|
@@ -11,7 +11,7 @@ export interface IOsceGroupMember {
|
|
|
11
11
|
}
|
|
12
12
|
export interface IOsceGroup {
|
|
13
13
|
osceMarksheetId: Id;
|
|
14
|
-
|
|
14
|
+
sessionId: string;
|
|
15
15
|
members: IOsceMarksheetMember[];
|
|
16
16
|
users: IUser[];
|
|
17
17
|
}
|
|
@@ -27,18 +27,24 @@ export interface IOsceMarksheetActionVar {
|
|
|
27
27
|
}
|
|
28
28
|
export interface IOsceMarksheetAction {
|
|
29
29
|
osceMarksheetId: Id;
|
|
30
|
+
osceStationId: Id;
|
|
30
31
|
agoraId: string;
|
|
32
|
+
sessionId: string;
|
|
31
33
|
userId: Id;
|
|
32
34
|
user: IUser;
|
|
35
|
+
users: IUser[];
|
|
36
|
+
members: IOsceMarksheetMember[];
|
|
37
|
+
activeUsers: IUser[];
|
|
33
38
|
startedAt: Date | null;
|
|
34
39
|
endedAt: Date | null;
|
|
40
|
+
state: EOsceMarksheetState;
|
|
35
41
|
action: EOsceMarksheetAction;
|
|
36
42
|
}
|
|
37
43
|
export type IOsceMarksheetActionData = RootData<IOsceMarksheetAction, 'osceMarksheetAction'>;
|
|
38
44
|
export declare const OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
|
|
39
45
|
export interface IOsceMatchmakingAction {
|
|
40
46
|
osceMarksheetId: Id;
|
|
41
|
-
|
|
47
|
+
sessionId: string;
|
|
42
48
|
matchedUsers: number;
|
|
43
49
|
userId: Id;
|
|
44
50
|
classYear: IClassYear;
|
|
@@ -52,7 +52,7 @@ exports.OSCE_ROLE_CHANGE = (0, client_1.gql) `
|
|
|
52
52
|
subscription osceRoleChangeSubscription($osceMarksheetId: Int!) {
|
|
53
53
|
osceRoleChange(osceMarksheetId: $osceMarksheetId) {
|
|
54
54
|
osceMarksheetId
|
|
55
|
-
|
|
55
|
+
sessionId
|
|
56
56
|
members {
|
|
57
57
|
osceMarksheetId
|
|
58
58
|
userId
|
|
@@ -73,6 +73,9 @@ exports.OSCE_MARKSHEET_ACTION = (0, client_1.gql) `
|
|
|
73
73
|
subscription OsceMarksheetAction($osceMarksheetId: Int!) {
|
|
74
74
|
osceMarksheetAction(osceMarksheetId: $osceMarksheetId) {
|
|
75
75
|
osceMarksheetId
|
|
76
|
+
osceStationId
|
|
77
|
+
state
|
|
78
|
+
sessionId
|
|
76
79
|
agoraId
|
|
77
80
|
userId
|
|
78
81
|
user {
|
|
@@ -80,6 +83,15 @@ exports.OSCE_MARKSHEET_ACTION = (0, client_1.gql) `
|
|
|
80
83
|
displayName
|
|
81
84
|
universityId
|
|
82
85
|
}
|
|
86
|
+
activeUsers {
|
|
87
|
+
id
|
|
88
|
+
displayName
|
|
89
|
+
}
|
|
90
|
+
members {
|
|
91
|
+
id
|
|
92
|
+
userId
|
|
93
|
+
role
|
|
94
|
+
}
|
|
83
95
|
startedAt
|
|
84
96
|
endedAt
|
|
85
97
|
action
|
|
@@ -37,12 +37,15 @@ export declare enum EOsceMarksheetAction {
|
|
|
37
37
|
DISCONNECT = 6,
|
|
38
38
|
SELECT = 7,
|
|
39
39
|
LEFT = 8,
|
|
40
|
-
KICK = 9
|
|
40
|
+
KICK = 9,
|
|
41
|
+
ROLE_CHANGE = 10
|
|
41
42
|
}
|
|
42
43
|
export declare enum EOsceMarksheetState {
|
|
43
44
|
LOBBY = 0,
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
STATION_BUILDER = 1,
|
|
46
|
+
PRESTART = 2,
|
|
47
|
+
STATION = 3,
|
|
48
|
+
RESULT = 4
|
|
46
49
|
}
|
|
47
50
|
export interface IOsceMarksheet {
|
|
48
51
|
id: Id;
|
|
@@ -58,6 +61,7 @@ export interface IOsceMarksheet {
|
|
|
58
61
|
globalScore: number;
|
|
59
62
|
feedback: string;
|
|
60
63
|
agoraId: string;
|
|
64
|
+
sessionId: string;
|
|
61
65
|
readingTime: number;
|
|
62
66
|
stationTime: number;
|
|
63
67
|
feedbackTime: number;
|
|
@@ -70,12 +74,13 @@ export interface IOsceMarksheet {
|
|
|
70
74
|
stage: EOsceStage;
|
|
71
75
|
marks: IOsceMarksheetMark[];
|
|
72
76
|
users: IUser[];
|
|
77
|
+
activeUsers?: IUser[];
|
|
73
78
|
members: IOsceMarksheetMember[];
|
|
74
79
|
state: EOsceMarksheetState;
|
|
75
80
|
completed: boolean;
|
|
76
81
|
}
|
|
77
82
|
export interface IDashboardOsce {
|
|
78
|
-
|
|
83
|
+
lastSessionId: string;
|
|
79
84
|
types: IOsceType[];
|
|
80
85
|
avgScore: number;
|
|
81
86
|
completed: number;
|
|
@@ -19,12 +19,15 @@ export var EOsceMarksheetAction;
|
|
|
19
19
|
EOsceMarksheetAction[EOsceMarksheetAction["SELECT"] = 7] = "SELECT";
|
|
20
20
|
EOsceMarksheetAction[EOsceMarksheetAction["LEFT"] = 8] = "LEFT";
|
|
21
21
|
EOsceMarksheetAction[EOsceMarksheetAction["KICK"] = 9] = "KICK";
|
|
22
|
+
EOsceMarksheetAction[EOsceMarksheetAction["ROLE_CHANGE"] = 10] = "ROLE_CHANGE";
|
|
22
23
|
})(EOsceMarksheetAction || (EOsceMarksheetAction = {}));
|
|
23
24
|
export var EOsceMarksheetState;
|
|
24
25
|
(function (EOsceMarksheetState) {
|
|
25
26
|
EOsceMarksheetState[EOsceMarksheetState["LOBBY"] = 0] = "LOBBY";
|
|
26
|
-
EOsceMarksheetState[EOsceMarksheetState["
|
|
27
|
-
EOsceMarksheetState[EOsceMarksheetState["
|
|
27
|
+
EOsceMarksheetState[EOsceMarksheetState["STATION_BUILDER"] = 1] = "STATION_BUILDER";
|
|
28
|
+
EOsceMarksheetState[EOsceMarksheetState["PRESTART"] = 2] = "PRESTART";
|
|
29
|
+
EOsceMarksheetState[EOsceMarksheetState["STATION"] = 3] = "STATION";
|
|
30
|
+
EOsceMarksheetState[EOsceMarksheetState["RESULT"] = 4] = "RESULT";
|
|
28
31
|
})(EOsceMarksheetState || (EOsceMarksheetState = {}));
|
|
29
32
|
export var EOsceTimerState;
|
|
30
33
|
(function (EOsceTimerState) {
|
|
@@ -91,6 +91,7 @@ export const OSCE_MARKSHEET_FIELDS = gql `
|
|
|
91
91
|
score
|
|
92
92
|
feedback
|
|
93
93
|
agoraId
|
|
94
|
+
sessionId
|
|
94
95
|
readingTime
|
|
95
96
|
stationTime
|
|
96
97
|
feedbackTime
|
|
@@ -118,6 +119,10 @@ export const OSCE_MARKSHEET_FIELDS = gql `
|
|
|
118
119
|
id
|
|
119
120
|
displayName
|
|
120
121
|
}
|
|
122
|
+
activeUsers {
|
|
123
|
+
id
|
|
124
|
+
displayName
|
|
125
|
+
}
|
|
121
126
|
state
|
|
122
127
|
completed
|
|
123
128
|
}
|
|
@@ -125,7 +130,7 @@ export const OSCE_MARKSHEET_FIELDS = gql `
|
|
|
125
130
|
export const OSCE_MATCHMAKING_ACTION_FIELDS = gql `
|
|
126
131
|
fragment OsceMatchmakingActionFields on OsceMatchmakingAction {
|
|
127
132
|
osceMarksheetId
|
|
128
|
-
|
|
133
|
+
sessionId
|
|
129
134
|
matchedUsers
|
|
130
135
|
userId
|
|
131
136
|
classYear
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { EOsceMarksheetAction, EOsceRoles, Id, IOsceMarksheet, IOsceMarksheetMark } from '../../../models';
|
|
1
|
+
import { EOsceMarksheetAction, EOsceRoles, EStudyAction, Id, IOsceMarksheet, IOsceMarksheetMark } from '../../../models';
|
|
2
2
|
import { IOsceMatchmakingAction } from '../../subscription/osce';
|
|
3
3
|
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
4
4
|
export declare const START_OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
|
|
5
5
|
export interface IStartOsceMatchmakingVar {
|
|
6
|
-
|
|
6
|
+
sessionId: string;
|
|
7
7
|
}
|
|
8
8
|
export type IStartOsceMatchmakingData = RestrictedData<boolean, 'startOsceMatchmaking'>;
|
|
9
9
|
export declare const ACCEPT_OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
|
|
10
10
|
export interface IAcceptOsceMatchmakingVar {
|
|
11
|
-
|
|
11
|
+
sessionId: string;
|
|
12
12
|
}
|
|
13
13
|
export type IAcceptOsceMatchmakingData = RestrictedData<boolean, 'acceptOsceMatchmaking'>;
|
|
14
14
|
export declare const CHECK_OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
|
|
@@ -16,14 +16,19 @@ export type ICheckOsceMatchmakingVar = null;
|
|
|
16
16
|
export type ICheckOsceMatchmakingData = RestrictedData<graphqlNormalize & IOsceMatchmakingAction, 'checkOsceMatchmaking'>;
|
|
17
17
|
export declare const CANCEL_OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
|
|
18
18
|
export interface ICancelOsceMatchmakingVar {
|
|
19
|
-
|
|
19
|
+
sessionId: string;
|
|
20
20
|
}
|
|
21
21
|
export type ICancelOsceMatchmakingData = RestrictedData<boolean, 'cancelOsceMatchmaking'>;
|
|
22
|
+
export declare const CREATE_OR_JOIN_OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
23
|
+
export interface ICreateOrJoinOsceMarksheetVar {
|
|
24
|
+
sessionId?: string;
|
|
25
|
+
action: EStudyAction;
|
|
26
|
+
}
|
|
27
|
+
export type ICreateOrJoinOsceMarksheetData = RestrictedData<graphqlNormalize & IOsceMarksheet, 'createOrJoinOsceMarksheet'>;
|
|
22
28
|
export declare const BUILD_OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
23
29
|
export interface IBuildOsceMarksheetVar {
|
|
24
30
|
osceStationId?: Id;
|
|
25
|
-
|
|
26
|
-
solo?: boolean;
|
|
31
|
+
osceMarksheetId?: Id;
|
|
27
32
|
}
|
|
28
33
|
export type IBuildOsceMarksheetData = RestrictedData<graphqlNormalize & IOsceMarksheet, 'buildOsceMarksheet'>;
|
|
29
34
|
export declare const CHANGE_OSCE_ROLE: import("@apollo/client").DocumentNode;
|
|
@@ -2,16 +2,16 @@ import { gql } from '@apollo/client';
|
|
|
2
2
|
import { OSCE_MARKSHEET_FIELDS, OSCE_MATCHMAKING_ACTION_FIELDS, } from '../../fragments/osce';
|
|
3
3
|
import { OSCE_STATION_FIELDS } from './../../fragments/osce';
|
|
4
4
|
export const START_OSCE_MATCHMAKING = gql `
|
|
5
|
-
mutation StartOsceMatchmaking($
|
|
5
|
+
mutation StartOsceMatchmaking($sessionId: String!) {
|
|
6
6
|
restricted {
|
|
7
|
-
startOsceMatchmaking(
|
|
7
|
+
startOsceMatchmaking(sessionId: $sessionId)
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
`;
|
|
11
11
|
export const ACCEPT_OSCE_MATCHMAKING = gql `
|
|
12
|
-
mutation AcceptOsceMatchmaking($
|
|
12
|
+
mutation AcceptOsceMatchmaking($sessionId: String!) {
|
|
13
13
|
restricted {
|
|
14
|
-
acceptOsceMatchmaking(
|
|
14
|
+
acceptOsceMatchmaking(sessionId: $sessionId)
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
`;
|
|
@@ -26,9 +26,29 @@ export const CHECK_OSCE_MATCHMAKING = gql `
|
|
|
26
26
|
}
|
|
27
27
|
`;
|
|
28
28
|
export const CANCEL_OSCE_MATCHMAKING = gql `
|
|
29
|
-
mutation CancelOsceMatchmaking($
|
|
29
|
+
mutation CancelOsceMatchmaking($sessionId: String!) {
|
|
30
30
|
restricted {
|
|
31
|
-
cancelOsceMatchmaking(
|
|
31
|
+
cancelOsceMatchmaking(sessionId: $sessionId)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
export const CREATE_OR_JOIN_OSCE_MARKSHEET = gql `
|
|
36
|
+
${OSCE_STATION_FIELDS}
|
|
37
|
+
${OSCE_MARKSHEET_FIELDS}
|
|
38
|
+
mutation CreateOrJoinOsceMarksheet(
|
|
39
|
+
$sessionId: String!
|
|
40
|
+
$action: Int!
|
|
41
|
+
) {
|
|
42
|
+
restricted {
|
|
43
|
+
createOrJoinOsceMarksheet(
|
|
44
|
+
sessionId: $sessionId
|
|
45
|
+
action: $action
|
|
46
|
+
) {
|
|
47
|
+
...OsceMarksheetFields
|
|
48
|
+
osceStation {
|
|
49
|
+
...OsceStationFields
|
|
50
|
+
}
|
|
51
|
+
}
|
|
32
52
|
}
|
|
33
53
|
}
|
|
34
54
|
`;
|
|
@@ -36,15 +56,13 @@ export const BUILD_OSCE_MARKSHEET = gql `
|
|
|
36
56
|
${OSCE_STATION_FIELDS}
|
|
37
57
|
${OSCE_MARKSHEET_FIELDS}
|
|
38
58
|
mutation BuildOsceMarksheet(
|
|
39
|
-
$osceStationId: Int
|
|
40
|
-
$
|
|
41
|
-
$solo: Boolean
|
|
59
|
+
$osceStationId: Int!
|
|
60
|
+
$osceMarksheetId: Int
|
|
42
61
|
) {
|
|
43
62
|
restricted {
|
|
44
63
|
buildOsceMarksheet(
|
|
45
64
|
osceStationId: $osceStationId
|
|
46
|
-
|
|
47
|
-
solo: $solo
|
|
65
|
+
osceMarksheetId: $osceMarksheetId
|
|
48
66
|
) {
|
|
49
67
|
...OsceMarksheetFields
|
|
50
68
|
osceStation {
|
|
@@ -61,4 +61,4 @@ export type IUpsertUserVideoStatusVar = {
|
|
|
61
61
|
};
|
|
62
62
|
export type IUpsertUserVideoStatusData = RestrictedData<graphqlNormalize & IUserVideoStatus[], 'upsertUserVideoStatus'>;
|
|
63
63
|
export declare const UPSERT_USER_VIDEO_STATUS: import("@apollo/client").DocumentNode;
|
|
64
|
-
export declare const updateCacheOnVideoLearningStatusUpdate: (prevStatus?: EUserLearningStatus | null
|
|
64
|
+
export declare const updateCacheOnVideoLearningStatusUpdate: (prevStatus?: EUserLearningStatus | null) => (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IUpsertUserVideoStatusData>, options: ApolloUpdateOptions) => void;
|
|
@@ -227,7 +227,7 @@ const getVideoUpdatedFieldNames = (newStatus, prevStatus) => [
|
|
|
227
227
|
getVideoStatsFieldName(prevStatus),
|
|
228
228
|
getVideoStatsFieldName(newStatus),
|
|
229
229
|
];
|
|
230
|
-
export const updateCacheOnVideoLearningStatusUpdate = (prevStatus
|
|
230
|
+
export const updateCacheOnVideoLearningStatusUpdate = (prevStatus) => (cache, result, options) => {
|
|
231
231
|
const { upsertUserVideoStatus } = result?.data?.restricted || {};
|
|
232
232
|
const { variables } = options || {};
|
|
233
233
|
if (!variables || !upsertUserVideoStatus) {
|
|
@@ -243,33 +243,45 @@ export const updateCacheOnVideoLearningStatusUpdate = (prevStatus, topicId) => (
|
|
|
243
243
|
fragment: VIDEO_STATUS_FRAGMENT,
|
|
244
244
|
});
|
|
245
245
|
});
|
|
246
|
-
|
|
246
|
+
const topicIds = new Set();
|
|
247
|
+
upsertUserVideoStatus.forEach(({ video }) => {
|
|
248
|
+
const { concepts } = video;
|
|
249
|
+
if (concepts) {
|
|
250
|
+
concepts.forEach(({ topicId }) => {
|
|
251
|
+
topicIds.add(Number(topicId));
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
if (!topicIds.size) {
|
|
247
256
|
return;
|
|
248
257
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
id:
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
});
|
|
256
|
-
if (prevData) {
|
|
257
|
-
const [prevStatName, newStatName] = getVideoUpdatedFieldNames(status, prevStatus);
|
|
258
|
-
const newData = {
|
|
259
|
-
...prevData,
|
|
260
|
-
[newStatName]: (prevData[newStatName] || 0) + videoIds.length,
|
|
261
|
-
};
|
|
262
|
-
if (prevStatus !== undefined &&
|
|
263
|
-
prevStatus !== null &&
|
|
264
|
-
prevData[prevStatName]) {
|
|
265
|
-
newData[prevStatName] = (prevData[prevStatName] || 0) - videoIds.length;
|
|
266
|
-
}
|
|
267
|
-
cache.writeFragment({
|
|
268
|
-
id: cache.identify({ id: topicId, __typename: 'Topic' }),
|
|
269
|
-
data: {
|
|
270
|
-
...newData,
|
|
271
|
-
},
|
|
258
|
+
[...topicIds].forEach((topicId) => {
|
|
259
|
+
const prevData = cache.readFragment({
|
|
260
|
+
id: cache.identify({
|
|
261
|
+
id: topicId,
|
|
262
|
+
__typename: 'Topic',
|
|
263
|
+
}),
|
|
272
264
|
fragment: TOPIC_VIDEO_STATUS_STATS_FRAGMENT,
|
|
273
265
|
});
|
|
274
|
-
|
|
266
|
+
if (prevData) {
|
|
267
|
+
const [prevStatName, newStatName] = getVideoUpdatedFieldNames(status, prevStatus);
|
|
268
|
+
const newData = {
|
|
269
|
+
...prevData,
|
|
270
|
+
[newStatName]: (prevData[newStatName] || 0) + videoIds.length,
|
|
271
|
+
};
|
|
272
|
+
if (prevStatus !== undefined &&
|
|
273
|
+
prevStatus !== null &&
|
|
274
|
+
prevData[prevStatName]) {
|
|
275
|
+
newData[prevStatName] =
|
|
276
|
+
(prevData[prevStatName] || 0) - videoIds.length;
|
|
277
|
+
}
|
|
278
|
+
cache.writeFragment({
|
|
279
|
+
id: cache.identify({ id: topicId, __typename: 'Topic' }),
|
|
280
|
+
data: {
|
|
281
|
+
...newData,
|
|
282
|
+
},
|
|
283
|
+
fragment: TOPIC_VIDEO_STATUS_STATS_FRAGMENT,
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
});
|
|
275
287
|
};
|
|
@@ -47,6 +47,6 @@ export interface ISearchOsceStationsVar {
|
|
|
47
47
|
export type ISearchOsceStationsData = RestrictedData<(graphqlNormalize & IOsceStation)[], 'searchOsceStations'>;
|
|
48
48
|
export declare const HEARTBEAT: import("@apollo/client").DocumentNode;
|
|
49
49
|
export interface IHeartbeatVar {
|
|
50
|
-
|
|
50
|
+
sessionId: string;
|
|
51
51
|
}
|
|
52
52
|
export type IHeartBeatData = RestrictedData<boolean, 'heartbeat'>;
|
|
@@ -23,7 +23,7 @@ export const DASHBOARD_OSCE = gql `
|
|
|
23
23
|
query DashboardOsce($solo: Boolean!) {
|
|
24
24
|
restricted {
|
|
25
25
|
dashboardOsce(solo: $solo) {
|
|
26
|
-
|
|
26
|
+
lastSessionId
|
|
27
27
|
types {
|
|
28
28
|
id
|
|
29
29
|
name
|
|
@@ -126,9 +126,9 @@ export const SEARCH_OSCE_STATIONS = gql `
|
|
|
126
126
|
}
|
|
127
127
|
`;
|
|
128
128
|
export const HEARTBEAT = gql `
|
|
129
|
-
query Heartbeat($
|
|
129
|
+
query Heartbeat($sessionId: String!) {
|
|
130
130
|
restricted {
|
|
131
|
-
heartbeat(
|
|
131
|
+
heartbeat(sessionId: $sessionId)
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EClassYearGroup, EOsceMarksheetAction, EOsceRoles, IAccessLevel, IClassYear, Id, IOsceMarksheetMember, IOsceMarksheetTimer, IUser } from '../../models';
|
|
1
|
+
import { EClassYearGroup, EOsceMarksheetAction, EOsceMarksheetState, EOsceRoles, IAccessLevel, IClassYear, Id, IOsceMarksheetMember, IOsceMarksheetTimer, IUser } from '../../models';
|
|
2
2
|
import { RootData } from '../types';
|
|
3
3
|
export declare const OSCE_ROLE_CHANGE_KEY = "OSCE_ROLE_CHANGE";
|
|
4
4
|
export declare const OSCE_MARKSHEET_ACTION_KEY = "OSCE_MARKSHEET_ACTION";
|
|
@@ -11,7 +11,7 @@ export interface IOsceGroupMember {
|
|
|
11
11
|
}
|
|
12
12
|
export interface IOsceGroup {
|
|
13
13
|
osceMarksheetId: Id;
|
|
14
|
-
|
|
14
|
+
sessionId: string;
|
|
15
15
|
members: IOsceMarksheetMember[];
|
|
16
16
|
users: IUser[];
|
|
17
17
|
}
|
|
@@ -27,18 +27,24 @@ export interface IOsceMarksheetActionVar {
|
|
|
27
27
|
}
|
|
28
28
|
export interface IOsceMarksheetAction {
|
|
29
29
|
osceMarksheetId: Id;
|
|
30
|
+
osceStationId: Id;
|
|
30
31
|
agoraId: string;
|
|
32
|
+
sessionId: string;
|
|
31
33
|
userId: Id;
|
|
32
34
|
user: IUser;
|
|
35
|
+
users: IUser[];
|
|
36
|
+
members: IOsceMarksheetMember[];
|
|
37
|
+
activeUsers: IUser[];
|
|
33
38
|
startedAt: Date | null;
|
|
34
39
|
endedAt: Date | null;
|
|
40
|
+
state: EOsceMarksheetState;
|
|
35
41
|
action: EOsceMarksheetAction;
|
|
36
42
|
}
|
|
37
43
|
export type IOsceMarksheetActionData = RootData<IOsceMarksheetAction, 'osceMarksheetAction'>;
|
|
38
44
|
export declare const OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
|
|
39
45
|
export interface IOsceMatchmakingAction {
|
|
40
46
|
osceMarksheetId: Id;
|
|
41
|
-
|
|
47
|
+
sessionId: string;
|
|
42
48
|
matchedUsers: number;
|
|
43
49
|
userId: Id;
|
|
44
50
|
classYear: IClassYear;
|
|
@@ -48,7 +48,7 @@ export const OSCE_ROLE_CHANGE = gql `
|
|
|
48
48
|
subscription osceRoleChangeSubscription($osceMarksheetId: Int!) {
|
|
49
49
|
osceRoleChange(osceMarksheetId: $osceMarksheetId) {
|
|
50
50
|
osceMarksheetId
|
|
51
|
-
|
|
51
|
+
sessionId
|
|
52
52
|
members {
|
|
53
53
|
osceMarksheetId
|
|
54
54
|
userId
|
|
@@ -69,6 +69,9 @@ export const OSCE_MARKSHEET_ACTION = gql `
|
|
|
69
69
|
subscription OsceMarksheetAction($osceMarksheetId: Int!) {
|
|
70
70
|
osceMarksheetAction(osceMarksheetId: $osceMarksheetId) {
|
|
71
71
|
osceMarksheetId
|
|
72
|
+
osceStationId
|
|
73
|
+
state
|
|
74
|
+
sessionId
|
|
72
75
|
agoraId
|
|
73
76
|
userId
|
|
74
77
|
user {
|
|
@@ -76,6 +79,15 @@ export const OSCE_MARKSHEET_ACTION = gql `
|
|
|
76
79
|
displayName
|
|
77
80
|
universityId
|
|
78
81
|
}
|
|
82
|
+
activeUsers {
|
|
83
|
+
id
|
|
84
|
+
displayName
|
|
85
|
+
}
|
|
86
|
+
members {
|
|
87
|
+
id
|
|
88
|
+
userId
|
|
89
|
+
role
|
|
90
|
+
}
|
|
79
91
|
startedAt
|
|
80
92
|
endedAt
|
|
81
93
|
action
|