@quesmed/types 1.5.3 → 1.5.6

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.3",
3
+ "version": "1.5.6",
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;
@@ -67,7 +67,6 @@ export declare const SAVE_OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
67
67
  export interface ISaveOsceMarksheetVar {
68
68
  osceMarksheetId: Id;
69
69
  globalScore?: number;
70
- timeTaken?: number;
71
70
  feedback?: string;
72
71
  }
73
72
  export declare type ISaveOsceMarksheetData = RestrictedData<graphqlNormalize & IOsceMarksheet, 'saveOsceMarksheet'>;
@@ -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
  }
@@ -168,16 +171,16 @@ exports.SAVE_OSCE_MARKSHEET = (0, client_1.gql) `
168
171
  $osceMarksheetId: Int!
169
172
  $feedback: String
170
173
  $globalScore: Int
171
- $timeTaken: Int
172
174
  ) {
173
175
  restricted {
174
176
  saveOsceMarksheet(
175
177
  osceMarksheetId: $osceMarksheetId
176
178
  feedback: $feedback
177
179
  globalScore: $globalScore
178
- timeTaken: $timeTaken
179
180
  ) {
180
- ...OsceMarksheetFields
181
+ id
182
+ feedback
183
+ globalScore
181
184
  }
182
185
  }
183
186
  }
@@ -195,14 +198,12 @@ exports.END_OSCE_MARKSHEET = (0, client_1.gql) `
195
198
  $osceMarksheetId: Int!
196
199
  $feedback: String
197
200
  $globalScore: Int
198
- $timeTaken: Int
199
201
  ) {
200
202
  restricted {
201
203
  endOsceMarksheet(
202
204
  osceMarksheetId: $osceMarksheetId
203
205
  feedback: $feedback
204
206
  globalScore: $globalScore
205
- timeTaken: $timeTaken
206
207
  ) {
207
208
  ...OsceMarksheetFields
208
209
  }
@@ -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
  }
@@ -164,16 +167,16 @@ export const SAVE_OSCE_MARKSHEET = gql `
164
167
  $osceMarksheetId: Int!
165
168
  $feedback: String
166
169
  $globalScore: Int
167
- $timeTaken: Int
168
170
  ) {
169
171
  restricted {
170
172
  saveOsceMarksheet(
171
173
  osceMarksheetId: $osceMarksheetId
172
174
  feedback: $feedback
173
175
  globalScore: $globalScore
174
- timeTaken: $timeTaken
175
176
  ) {
176
- ...OsceMarksheetFields
177
+ id
178
+ feedback
179
+ globalScore
177
180
  }
178
181
  }
179
182
  }
@@ -191,14 +194,12 @@ export const END_OSCE_MARKSHEET = gql `
191
194
  $osceMarksheetId: Int!
192
195
  $feedback: String
193
196
  $globalScore: Int
194
- $timeTaken: Int
195
197
  ) {
196
198
  restricted {
197
199
  endOsceMarksheet(
198
200
  osceMarksheetId: $osceMarksheetId
199
201
  feedback: $feedback
200
202
  globalScore: $globalScore
201
- timeTaken: $timeTaken
202
203
  ) {
203
204
  ...OsceMarksheetFields
204
205
  }
@@ -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
  }
@@ -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