@quesmed/types 1.5.4 → 1.5.7

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.
@@ -64,6 +64,7 @@ export interface IOsceMarksheet {
64
64
  pausedAt: number | Date;
65
65
  timeRemaining: string;
66
66
  totalStationTime: string;
67
+ stageTime: string;
67
68
  stage: EOsceStage;
68
69
  marks: IOsceMarksheetMark[];
69
70
  users: IOsceMarksheetUser[];
@@ -97,6 +98,7 @@ export interface IOsceMarksheetTimer {
97
98
  osceMarksheetId: number;
98
99
  timeRemaining: string;
99
100
  totalStationTime: string;
101
+ stageTime: string;
100
102
  stage: EOsceStage;
101
103
  state: EOsceTimerState;
102
104
  }
@@ -46,6 +46,7 @@ function createTimerPayload(osceMarksheet) {
46
46
  osceMarksheetId: osceMarksheet.id,
47
47
  timeRemaining: '00:00',
48
48
  totalStationTime: '00:00',
49
+ stageTime: '/00 secs',
49
50
  stage: EOsceStage.READING,
50
51
  state: EOsceTimerState.PAUSE,
51
52
  };
@@ -85,13 +86,16 @@ function createTimerPayload(osceMarksheet) {
85
86
  }
86
87
  if (timeRemainingDuration > stationDuration - osceMarksheet.readingTime) {
87
88
  payload.stage = EOsceStage.READING;
89
+ payload.stageTime = `/${osceMarksheet.readingTime} secs`;
88
90
  }
89
91
  else if (timeRemainingDuration >
90
92
  stationDuration - osceMarksheet.readingTime - osceMarksheet.stationTime * 60) {
91
93
  payload.stage = EOsceStage.STATION;
94
+ payload.stageTime = `/${osceMarksheet.stationTime} mins`;
92
95
  }
93
96
  else {
94
97
  payload.stage = EOsceStage.FEEDBACK;
98
+ payload.stageTime = `/${osceMarksheet.feedbackTime} mins`;
95
99
  }
96
100
  payload.timeRemaining = (0, utils_1.printDuration)(timeRemainingDuration);
97
101
  return payload;
@@ -43,6 +43,7 @@ export function createTimerPayload(osceMarksheet) {
43
43
  osceMarksheetId: osceMarksheet.id,
44
44
  timeRemaining: '00:00',
45
45
  totalStationTime: '00:00',
46
+ stageTime: '/00 secs',
46
47
  stage: EOsceStage.READING,
47
48
  state: EOsceTimerState.PAUSE,
48
49
  };
@@ -82,13 +83,16 @@ export function createTimerPayload(osceMarksheet) {
82
83
  }
83
84
  if (timeRemainingDuration > stationDuration - osceMarksheet.readingTime) {
84
85
  payload.stage = EOsceStage.READING;
86
+ payload.stageTime = `/${osceMarksheet.readingTime} secs`;
85
87
  }
86
88
  else if (timeRemainingDuration >
87
89
  stationDuration - osceMarksheet.readingTime - osceMarksheet.stationTime * 60) {
88
90
  payload.stage = EOsceStage.STATION;
91
+ payload.stageTime = `/${osceMarksheet.stationTime} mins`;
89
92
  }
90
93
  else {
91
94
  payload.stage = EOsceStage.FEEDBACK;
95
+ payload.stageTime = `/${osceMarksheet.feedbackTime} mins`;
92
96
  }
93
97
  payload.timeRemaining = printDuration(timeRemainingDuration);
94
98
  return payload;
@@ -42,7 +42,7 @@ export interface IOsceStation {
42
42
  walkthroughPictures?: IOsceWalkthroughPicture[];
43
43
  }
44
44
  export interface IOsceStationItem extends IOsceStation {
45
- attempted: boolean;
45
+ lastOsceMarksheetId: Id;
46
46
  score: number;
47
47
  }
48
48
  export declare const OSCE_GLOBAL_RATING: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "1.5.4",
3
+ "version": "1.5.7",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -50,7 +50,7 @@ exports.OSCE_STATION_FIELDS = (0, client_1.gql) `
50
50
  }
51
51
 
52
52
  # user-specific keys
53
- # attempted
53
+ # lastOsceMarksheetId
54
54
  # score
55
55
  }
56
56
  `;
@@ -90,6 +90,7 @@ exports.OSCE_MARKSHEET_FIELDS = (0, client_1.gql) `
90
90
  pausedAt
91
91
  timeRemaining
92
92
  totalStationTime
93
+ stageTime
93
94
  stage
94
95
  marks {
95
96
  ...OsceMarksheetMarkFields
@@ -47,7 +47,7 @@ export const OSCE_STATION_FIELDS = gql `
47
47
  }
48
48
 
49
49
  # user-specific keys
50
- # attempted
50
+ # lastOsceMarksheetId
51
51
  # score
52
52
  }
53
53
  `;
@@ -87,6 +87,7 @@ export const OSCE_MARKSHEET_FIELDS = gql `
87
87
  pausedAt
88
88
  timeRemaining
89
89
  totalStationTime
90
+ stageTime
90
91
  stage
91
92
  marks {
92
93
  ...OsceMarksheetMarkFields
@@ -1,4 +1,4 @@
1
- import { EOsceMarksheetAction, EOsceRoles, Id, IOsceMarksheet, IOsceMarksheetMark, IOsceMarksheetTimer } from '../../../models';
1
+ import { EOsceMarksheetAction, EOsceRoles, 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;
@@ -54,7 +54,7 @@ export declare const START_OSCE_TIMER: import("@apollo/client").DocumentNode;
54
54
  export interface IStartOsceTimerVar {
55
55
  osceMarksheetId: Id;
56
56
  }
57
- export declare type IStartOsceTimerData = RestrictedData<graphqlNormalize & IOsceMarksheetTimer, 'startOsceTimer'>;
57
+ export declare type IStartOsceTimerData = RestrictedData<graphqlNormalize & IOsceMarksheet, 'startOsceTimer'>;
58
58
  export declare const PRESTART_OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
59
59
  export interface IPrestartOsceMarksheetVar {
60
60
  osceMarksheetId: Id;
@@ -130,9 +130,12 @@ exports.START_OSCE_TIMER = (0, client_1.gql) `
130
130
  mutation StartOsceTimer($osceMarksheetId: Int!) {
131
131
  restricted {
132
132
  startOsceTimer(osceMarksheetId: $osceMarksheetId) {
133
- osceMarksheetId
133
+ id
134
+ startedAt
135
+ endedAt
134
136
  timeRemaining
135
137
  totalStationTime
138
+ stage
136
139
  state
137
140
  }
138
141
  }
@@ -175,7 +178,9 @@ exports.SAVE_OSCE_MARKSHEET = (0, client_1.gql) `
175
178
  feedback: $feedback
176
179
  globalScore: $globalScore
177
180
  ) {
178
- ...OsceMarksheetFields
181
+ id
182
+ feedback
183
+ globalScore
179
184
  }
180
185
  }
181
186
  }
@@ -126,9 +126,12 @@ export const START_OSCE_TIMER = gql `
126
126
  mutation StartOsceTimer($osceMarksheetId: Int!) {
127
127
  restricted {
128
128
  startOsceTimer(osceMarksheetId: $osceMarksheetId) {
129
- osceMarksheetId
129
+ id
130
+ startedAt
131
+ endedAt
130
132
  timeRemaining
131
133
  totalStationTime
134
+ stage
132
135
  state
133
136
  }
134
137
  }
@@ -171,7 +174,9 @@ export const SAVE_OSCE_MARKSHEET = gql `
171
174
  feedback: $feedback
172
175
  globalScore: $globalScore
173
176
  ) {
174
- ...OsceMarksheetFields
177
+ id
178
+ feedback
179
+ globalScore
175
180
  }
176
181
  }
177
182
  }
@@ -70,7 +70,7 @@ exports.OSCE_STATIONS = (0, client_1.gql) `
70
70
  topicIds: $topicIds
71
71
  ) {
72
72
  ...OsceStationFields
73
- attempted
73
+ lastOsceMarksheetId
74
74
  score
75
75
  }
76
76
  }
@@ -103,7 +103,7 @@ exports.SEARCH_OSCE_STATIONS = (0, client_1.gql) `
103
103
  restricted {
104
104
  searchOsceStations(search: $search) {
105
105
  ...OsceStationFields
106
- attempted
106
+ lastOsceMarksheetId
107
107
  score
108
108
  }
109
109
  }
@@ -67,7 +67,7 @@ export const OSCE_STATIONS = gql `
67
67
  topicIds: $topicIds
68
68
  ) {
69
69
  ...OsceStationFields
70
- attempted
70
+ lastOsceMarksheetId
71
71
  score
72
72
  }
73
73
  }
@@ -100,7 +100,7 @@ export const SEARCH_OSCE_STATIONS = gql `
100
100
  restricted {
101
101
  searchOsceStations(search: $search) {
102
102
  ...OsceStationFields
103
- attempted
103
+ lastOsceMarksheetId
104
104
  score
105
105
  }
106
106
  }
@@ -9,6 +9,8 @@ exports.OSCE_BOOK = (0, client_1.gql) `
9
9
  restricted {
10
10
  osceBook {
11
11
  ...OsceStationFields
12
+ lastOsceMarksheetId
13
+ score
12
14
  }
13
15
  }
14
16
  }
@@ -6,6 +6,8 @@ export const OSCE_BOOK = gql `
6
6
  restricted {
7
7
  osceBook {
8
8
  ...OsceStationFields
9
+ lastOsceMarksheetId
10
+ score
9
11
  }
10
12
  }
11
13
  }
@@ -142,7 +142,7 @@ const osceStationReplicationQuery = `query OsceStationReplication($lastId: Strin
142
142
  }
143
143
 
144
144
  # user-specific keys
145
- # attempted
145
+ # lastOsceMarksheetId
146
146
  # score
147
147
  }
148
148
 
@@ -137,7 +137,7 @@ const osceStationReplicationQuery = `query OsceStationReplication($lastId: Strin
137
137
  }
138
138
 
139
139
  # user-specific keys
140
- # attempted
140
+ # lastOsceMarksheetId
141
141
  # score
142
142
  }
143
143