@quesmed/types 2.5.21 → 2.5.22

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.
@@ -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
- PRESTART = 1,
45
- STATION = 2
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
- lastAgoraId: string;
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["PRESTART"] = 1] = "PRESTART";
30
- EOsceMarksheetState[EOsceMarksheetState["STATION"] = 2] = "STATION";
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
- agoraId
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
- agoraId: string;
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
- agoraId: string;
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
- agoraId: string;
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
- agoraId?: string;
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($agoraId: String!) {
8
+ mutation StartOsceMatchmaking($sessionId: String!) {
9
9
  restricted {
10
- startOsceMatchmaking(agoraId: $agoraId)
10
+ startOsceMatchmaking(sessionId: $sessionId)
11
11
  }
12
12
  }
13
13
  `;
14
14
  exports.ACCEPT_OSCE_MATCHMAKING = (0, client_1.gql) `
15
- mutation AcceptOsceMatchmaking($agoraId: String!) {
15
+ mutation AcceptOsceMatchmaking($sessionId: String!) {
16
16
  restricted {
17
- acceptOsceMatchmaking(agoraId: $agoraId)
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($agoraId: String!) {
32
+ mutation CancelOsceMatchmaking($sessionId: String!) {
33
33
  restricted {
34
- cancelOsceMatchmaking(agoraId: $agoraId)
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
- $agoraId: String
44
- $solo: Boolean
62
+ $osceStationId: Int!
63
+ $osceMarksheetId: Int
45
64
  ) {
46
65
  restricted {
47
66
  buildOsceMarksheet(
48
67
  osceStationId: $osceStationId
49
- agoraId: $agoraId
50
- solo: $solo
68
+ osceMarksheetId: $osceMarksheetId
51
69
  ) {
52
70
  ...OsceMarksheetFields
53
71
  osceStation {
@@ -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
- agoraId: string;
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
- lastAgoraId
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($agoraId: String!) {
132
+ query Heartbeat($sessionId: String!) {
133
133
  restricted {
134
- heartbeat(agoraId: $agoraId)
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
- agoraId: string;
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
- agoraId: string;
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
- agoraId
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
- PRESTART = 1,
45
- STATION = 2
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
- lastAgoraId: string;
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["PRESTART"] = 1] = "PRESTART";
27
- EOsceMarksheetState[EOsceMarksheetState["STATION"] = 2] = "STATION";
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
- agoraId
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
- agoraId: string;
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
- agoraId: string;
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
- agoraId: string;
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
- agoraId?: string;
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($agoraId: String!) {
5
+ mutation StartOsceMatchmaking($sessionId: String!) {
6
6
  restricted {
7
- startOsceMatchmaking(agoraId: $agoraId)
7
+ startOsceMatchmaking(sessionId: $sessionId)
8
8
  }
9
9
  }
10
10
  `;
11
11
  export const ACCEPT_OSCE_MATCHMAKING = gql `
12
- mutation AcceptOsceMatchmaking($agoraId: String!) {
12
+ mutation AcceptOsceMatchmaking($sessionId: String!) {
13
13
  restricted {
14
- acceptOsceMatchmaking(agoraId: $agoraId)
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($agoraId: String!) {
29
+ mutation CancelOsceMatchmaking($sessionId: String!) {
30
30
  restricted {
31
- cancelOsceMatchmaking(agoraId: $agoraId)
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
- $agoraId: String
41
- $solo: Boolean
59
+ $osceStationId: Int!
60
+ $osceMarksheetId: Int
42
61
  ) {
43
62
  restricted {
44
63
  buildOsceMarksheet(
45
64
  osceStationId: $osceStationId
46
- agoraId: $agoraId
47
- solo: $solo
65
+ osceMarksheetId: $osceMarksheetId
48
66
  ) {
49
67
  ...OsceMarksheetFields
50
68
  osceStation {
@@ -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
- agoraId: string;
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
- lastAgoraId
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($agoraId: String!) {
129
+ query Heartbeat($sessionId: String!) {
130
130
  restricted {
131
- heartbeat(agoraId: $agoraId)
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
- agoraId: string;
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
- agoraId: string;
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
- agoraId
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.5.21",
3
+ "version": "2.5.22",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",