@quesmed/types 1.5.5 → 1.5.9

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;
@@ -2,6 +2,7 @@ import { EDifficultyType } from './Difficulty';
2
2
  import { IOsceActorPicture, IOsceCandidatePicture, IOsceExaminerPicture, IOsceWalkthroughPicture } from './Picture';
3
3
  import { ITopic } from './Topic';
4
4
  import { Id } from './Type';
5
+ import { IVideo } from './Video';
5
6
  export interface IOsceType {
6
7
  id: Id;
7
8
  name: string;
@@ -40,6 +41,7 @@ export interface IOsceStation {
40
41
  actorPictures?: IOsceActorPicture[];
41
42
  examinerPictures?: IOsceExaminerPicture[];
42
43
  walkthroughPictures?: IOsceWalkthroughPicture[];
44
+ videos?: IVideo[];
43
45
  }
44
46
  export interface IOsceStationItem extends IOsceStation {
45
47
  lastOsceMarksheetId: Id;
package/models/Video.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { IConcept } from './Concept';
2
2
  import { IFile } from './File';
3
+ import { IOsceStation } from './OsceStation';
3
4
  import { Id } from './Type';
4
5
  export interface IVideo {
5
6
  id: Id;
@@ -15,6 +16,7 @@ export interface IVideo {
15
16
  description: string;
16
17
  duration: number;
17
18
  concepts: IConcept[];
19
+ osceStation: IOsceStation;
18
20
  files: IFile[];
19
21
  send1hrPushAt: number | Date | null;
20
22
  sent1hrPushAt: number | Date | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "1.5.5",
3
+ "version": "1.5.9",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -48,6 +48,18 @@ exports.OSCE_STATION_FIELDS = (0, client_1.gql) `
48
48
  walkthroughPictures {
49
49
  ...OscePictureFields
50
50
  }
51
+ videos {
52
+ id
53
+ title
54
+ museId
55
+ thumbnail
56
+ concepts {
57
+ name
58
+ }
59
+ live
60
+ description
61
+ duration
62
+ }
51
63
 
52
64
  # user-specific keys
53
65
  # lastOsceMarksheetId
@@ -90,6 +102,7 @@ exports.OSCE_MARKSHEET_FIELDS = (0, client_1.gql) `
90
102
  pausedAt
91
103
  timeRemaining
92
104
  totalStationTime
105
+ stageTime
93
106
  stage
94
107
  marks {
95
108
  ...OsceMarksheetMarkFields
@@ -45,6 +45,18 @@ export const OSCE_STATION_FIELDS = gql `
45
45
  walkthroughPictures {
46
46
  ...OscePictureFields
47
47
  }
48
+ videos {
49
+ id
50
+ title
51
+ museId
52
+ thumbnail
53
+ concepts {
54
+ name
55
+ }
56
+ live
57
+ description
58
+ duration
59
+ }
48
60
 
49
61
  # user-specific keys
50
62
  # lastOsceMarksheetId
@@ -87,6 +99,7 @@ export const OSCE_MARKSHEET_FIELDS = gql `
87
99
  pausedAt
88
100
  timeRemaining
89
101
  totalStationTime
102
+ stageTime
90
103
  stage
91
104
  marks {
92
105
  ...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
  }
@@ -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
  }
@@ -4,7 +4,7 @@ export interface IVideoVar {
4
4
  }
5
5
  export declare type IVideoData = IVideo;
6
6
  export interface IVideosVar {
7
- filter: 'new' | 'popular' | 'personal' | 'live';
7
+ filter: 'new' | 'popular' | 'personal' | 'live' | 'osce';
8
8
  limit: number;
9
9
  }
10
10
  export declare type IVideosData = IVideo[];