@quesmed/types 2.2.8 → 2.2.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.
@@ -1,4 +1,4 @@
1
- import { IPreBuildMarksheet } from '../resolvers/mutation/restricted/marksheet';
1
+ import { IBuildConfigData, IPreBuildMarksheet } from '../resolvers/mutation/restricted/marksheet';
2
2
  import { IPrescribeAnswer, IPrescribeMark, IQuestion, IQuestionChoice, IQuestionQAAnswer } from './Question';
3
3
  import { Id } from './Type';
4
4
  import { IUser } from './User';
@@ -24,7 +24,8 @@ export declare enum EMarksheetAction {
24
24
  QUESTION_CHANGE = 11,
25
25
  TOPIC_CONCEPT_SELECTION = 12,
26
26
  BUILDER_CONFIG_SELECTION = 13,
27
- STATE_CHANGE = 14
27
+ STATE_CHANGE = 14,
28
+ ANSWER_SELECTED = 15
28
29
  }
29
30
  export interface IMarksheetMember {
30
31
  id: Id;
@@ -54,13 +55,14 @@ export interface IMarksheet {
54
55
  isTestMarksheet?: boolean;
55
56
  solo: boolean;
56
57
  agoraId: string;
57
- users: IMarksheetMember[];
58
+ users: IUser[];
58
59
  state: EMarksheetState;
59
60
  completed: boolean;
60
61
  timeTaken: number;
61
62
  currentMarkId?: number;
62
63
  topicConceptData?: string;
63
64
  preBuildData?: IPreBuildMarksheet;
65
+ builderConfig?: IBuildConfigData;
64
66
  }
65
67
  export declare type IMarksheetMarkJSONB = string | [string] | [IQuestionQAAnswer] | [string[], string[]] | [IPrescribeMark] | IPrescribeAnswer | null;
66
68
  export interface IMarksheetMark {
@@ -77,6 +79,7 @@ export interface IMarksheetMark {
77
79
  question: IQuestion;
78
80
  mark: IMarksheetMarkJSONB;
79
81
  marksheet?: IMarksheet;
82
+ isAnswered: boolean;
80
83
  }
81
84
  export interface IPreBuildMarksheetRef {
82
85
  id: Id;
@@ -26,4 +26,5 @@ var EMarksheetAction;
26
26
  EMarksheetAction[EMarksheetAction["TOPIC_CONCEPT_SELECTION"] = 12] = "TOPIC_CONCEPT_SELECTION";
27
27
  EMarksheetAction[EMarksheetAction["BUILDER_CONFIG_SELECTION"] = 13] = "BUILDER_CONFIG_SELECTION";
28
28
  EMarksheetAction[EMarksheetAction["STATE_CHANGE"] = 14] = "STATE_CHANGE";
29
+ EMarksheetAction[EMarksheetAction["ANSWER_SELECTED"] = 15] = "ANSWER_SELECTED";
29
30
  })(EMarksheetAction = exports.EMarksheetAction || (exports.EMarksheetAction = {}));
@@ -13,6 +13,7 @@ exports.MARKSHEET_MARK_FIELDS = (0, client_1.gql) `
13
13
  timeTaken
14
14
  flagged
15
15
  questionId
16
+ isAnswered
16
17
  question {
17
18
  conceptId
18
19
  difficulty
@@ -78,13 +78,13 @@ export declare const START_OR_JOIN_MARKSHEET: import("@apollo/client").DocumentN
78
78
  * modifyMarksheetInfo
79
79
  */
80
80
  export interface IMarksheetAction {
81
- userId: Id;
82
- user: IUser;
83
- startedAt: Date | null;
84
- endedAt: Date | null;
81
+ userId?: Id;
82
+ user?: IUser;
83
+ startedAt?: Date | null;
84
+ endedAt?: Date | null;
85
85
  state: EMarksheetState;
86
86
  action: EMarksheetAction;
87
- users: IUser[];
87
+ users?: IUser[];
88
88
  }
89
89
  export interface IMarkDataInfo {
90
90
  markId?: Id;
@@ -93,6 +93,7 @@ export interface IMarkDataInfo {
93
93
  questionId?: Id;
94
94
  timeTaken?: number;
95
95
  mark?: IMarksheetMarkJSONB;
96
+ isAnswered?: boolean;
96
97
  }
97
98
  export interface IBuildConfigData {
98
99
  numberOfQuestions?: number;
@@ -104,7 +105,7 @@ export interface IBuildConfigData {
104
105
  isTest?: boolean;
105
106
  }
106
107
  export interface IQbankInfoInput {
107
- markSheetAction?: IMarksheetAction;
108
+ marksheetAction?: IMarksheetAction;
108
109
  topicConceptData?: string;
109
110
  builderConfig?: IBuildConfigData;
110
111
  markData?: IMarkDataInfo;
@@ -39,10 +39,8 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
39
39
  id
40
40
  }
41
41
  users {
42
- user {
43
- id
44
- displayName
45
- }
42
+ id
43
+ displayName
46
44
  }
47
45
  marks {
48
46
  ...MarksheetMarkFields
@@ -90,10 +88,8 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
90
88
  }
91
89
  source
92
90
  users {
93
- user {
94
- id
95
- displayName
96
- }
91
+ id
92
+ displayName
97
93
  }
98
94
  user {
99
95
  displayName
@@ -245,10 +241,8 @@ exports.START_OR_JOIN_MARKSHEET = (0, client_1.gql) `
245
241
  }
246
242
  state
247
243
  users {
248
- user {
249
- id
250
- displayName
251
- }
244
+ id
245
+ displayName
252
246
  }
253
247
  completed
254
248
  }
@@ -257,7 +251,7 @@ exports.START_OR_JOIN_MARKSHEET = (0, client_1.gql) `
257
251
  `;
258
252
  exports.MODIFY_MARKSHEET_INFO = (0, client_1.gql) `
259
253
  ${marksheet_1.MARKSHEET_MARK_FIELDS}
260
- mutation ModifyMarksheetInfo($input: input) {
254
+ mutation ModifyMarksheetInfo($input: ModifyMarksheetInfoInput) {
261
255
  restricted {
262
256
  modifyMarksheetInfo(input: $input) {
263
257
  id
@@ -290,10 +284,8 @@ exports.MODIFY_MARKSHEET_INFO = (0, client_1.gql) `
290
284
  id
291
285
  }
292
286
  users {
293
- user {
294
- id
295
- displayName
296
- }
287
+ id
288
+ displayName
297
289
  }
298
290
  marks {
299
291
  ...MarksheetMarkFields
@@ -11,10 +11,8 @@ exports.MARKSHEET = (0, client_1.gql) `
11
11
  currentMarkId
12
12
  state
13
13
  users {
14
- user {
15
- id
16
- displayName
17
- }
14
+ id
15
+ displayName
18
16
  }
19
17
  builderConfig {
20
18
  difficulty
@@ -45,6 +43,7 @@ exports.MARKSHEET = (0, client_1.gql) `
45
43
  questionChoiceId
46
44
  marksheetId
47
45
  timeTaken
46
+ isAnswered
48
47
  mark
49
48
  question {
50
49
  ... on QuestionSBA {
@@ -1224,9 +1223,23 @@ exports.HEARTBEAT_QBANK = (0, client_1.gql) `
1224
1223
  }
1225
1224
  `;
1226
1225
  exports.PRE_BUILD_MARKSHEET = (0, client_1.gql) `
1227
- query PreBuildMarksheet($preBuildMarksheet: PreBuildMarksheetInput) {
1226
+ query PreBuildMarksheet(
1227
+ $topicIds: [Int!]
1228
+ $conceptIds: [Int!]
1229
+ $source: String!
1230
+ $search: String
1231
+ $marksheetId: Int
1232
+ $difficulty: [Int!]
1233
+ ) {
1228
1234
  restricted {
1229
- preBuildMarksheet(preBuildMarksheet: $preBuildMarksheet) {
1235
+ preBuildMarksheet(
1236
+ topicIds: $topicIds
1237
+ conceptIds: $conceptIds
1238
+ source: $source
1239
+ search: $search
1240
+ marksheetId: $marksheetId
1241
+ difficulty: $difficulty
1242
+ ) {
1230
1243
  unseen
1231
1244
  seenCorrect
1232
1245
  seenIncorrect
@@ -41,6 +41,7 @@ export interface IPreStartMarksheetData {
41
41
  action: EMarksheetAction;
42
42
  builderConfig?: IBuildConfigData;
43
43
  marksheetId: Id;
44
+ user: IUser;
44
45
  }
45
46
  export declare type IOnPreStartMarksheetModificationData = RootData<IPreStartMarksheetData, 'payload'>;
46
47
  export declare const ON_PRESTART_MARKSHEET_MODIFICATION_KEY = "ON_PRESTART_MARKSHEET_MODIFICATION";
@@ -60,6 +61,8 @@ export interface IMarksheetDataModification {
60
61
  timeTaken?: number;
61
62
  mark?: IMarksheetMarkJSONB;
62
63
  action?: EMarksheetAction;
64
+ user: IUser;
65
+ isAnswered?: boolean;
63
66
  }
64
67
  export declare type IOnMarksheetDataModificationData = RootData<IMarksheetDataModification, 'payload'>;
65
68
  export declare const ON_MARKSHEET_DATA_MODIFICATION_KEY = "ON_MARKSHEET_DATA_MODIFICATION";
@@ -27,6 +27,10 @@ exports.ON_PRESTART_MARKSHEET_MODIFICATION = (0, client_1.gql) `
27
27
  marksheetId
28
28
  topicConceptData
29
29
  action
30
+ user {
31
+ id
32
+ displayName
33
+ }
30
34
  builderConfig {
31
35
  difficulty
32
36
  isTest
@@ -48,8 +52,13 @@ exports.ON_MARKSHEET_DATA_MODIFICATION = (0, client_1.gql) `
48
52
  marksheetId
49
53
  questionId
50
54
  questionChoiceId
55
+ isAnswered
51
56
  timeTaken
52
57
  action
58
+ user {
59
+ id
60
+ displayName
61
+ }
53
62
  }
54
63
  }
55
64
  `;
@@ -1,4 +1,4 @@
1
- import { IPreBuildMarksheet } from '../resolvers/mutation/restricted/marksheet';
1
+ import { IBuildConfigData, IPreBuildMarksheet } from '../resolvers/mutation/restricted/marksheet';
2
2
  import { IPrescribeAnswer, IPrescribeMark, IQuestion, IQuestionChoice, IQuestionQAAnswer } from './Question';
3
3
  import { Id } from './Type';
4
4
  import { IUser } from './User';
@@ -24,7 +24,8 @@ export declare enum EMarksheetAction {
24
24
  QUESTION_CHANGE = 11,
25
25
  TOPIC_CONCEPT_SELECTION = 12,
26
26
  BUILDER_CONFIG_SELECTION = 13,
27
- STATE_CHANGE = 14
27
+ STATE_CHANGE = 14,
28
+ ANSWER_SELECTED = 15
28
29
  }
29
30
  export interface IMarksheetMember {
30
31
  id: Id;
@@ -54,13 +55,14 @@ export interface IMarksheet {
54
55
  isTestMarksheet?: boolean;
55
56
  solo: boolean;
56
57
  agoraId: string;
57
- users: IMarksheetMember[];
58
+ users: IUser[];
58
59
  state: EMarksheetState;
59
60
  completed: boolean;
60
61
  timeTaken: number;
61
62
  currentMarkId?: number;
62
63
  topicConceptData?: string;
63
64
  preBuildData?: IPreBuildMarksheet;
65
+ builderConfig?: IBuildConfigData;
64
66
  }
65
67
  export declare type IMarksheetMarkJSONB = string | [string] | [IQuestionQAAnswer] | [string[], string[]] | [IPrescribeMark] | IPrescribeAnswer | null;
66
68
  export interface IMarksheetMark {
@@ -77,6 +79,7 @@ export interface IMarksheetMark {
77
79
  question: IQuestion;
78
80
  mark: IMarksheetMarkJSONB;
79
81
  marksheet?: IMarksheet;
82
+ isAnswered: boolean;
80
83
  }
81
84
  export interface IPreBuildMarksheetRef {
82
85
  id: Id;
@@ -23,4 +23,5 @@ export var EMarksheetAction;
23
23
  EMarksheetAction[EMarksheetAction["TOPIC_CONCEPT_SELECTION"] = 12] = "TOPIC_CONCEPT_SELECTION";
24
24
  EMarksheetAction[EMarksheetAction["BUILDER_CONFIG_SELECTION"] = 13] = "BUILDER_CONFIG_SELECTION";
25
25
  EMarksheetAction[EMarksheetAction["STATE_CHANGE"] = 14] = "STATE_CHANGE";
26
+ EMarksheetAction[EMarksheetAction["ANSWER_SELECTED"] = 15] = "ANSWER_SELECTED";
26
27
  })(EMarksheetAction || (EMarksheetAction = {}));
@@ -10,6 +10,7 @@ export const MARKSHEET_MARK_FIELDS = gql `
10
10
  timeTaken
11
11
  flagged
12
12
  questionId
13
+ isAnswered
13
14
  question {
14
15
  conceptId
15
16
  difficulty
@@ -78,13 +78,13 @@ export declare const START_OR_JOIN_MARKSHEET: import("@apollo/client").DocumentN
78
78
  * modifyMarksheetInfo
79
79
  */
80
80
  export interface IMarksheetAction {
81
- userId: Id;
82
- user: IUser;
83
- startedAt: Date | null;
84
- endedAt: Date | null;
81
+ userId?: Id;
82
+ user?: IUser;
83
+ startedAt?: Date | null;
84
+ endedAt?: Date | null;
85
85
  state: EMarksheetState;
86
86
  action: EMarksheetAction;
87
- users: IUser[];
87
+ users?: IUser[];
88
88
  }
89
89
  export interface IMarkDataInfo {
90
90
  markId?: Id;
@@ -93,6 +93,7 @@ export interface IMarkDataInfo {
93
93
  questionId?: Id;
94
94
  timeTaken?: number;
95
95
  mark?: IMarksheetMarkJSONB;
96
+ isAnswered?: boolean;
96
97
  }
97
98
  export interface IBuildConfigData {
98
99
  numberOfQuestions?: number;
@@ -104,7 +105,7 @@ export interface IBuildConfigData {
104
105
  isTest?: boolean;
105
106
  }
106
107
  export interface IQbankInfoInput {
107
- markSheetAction?: IMarksheetAction;
108
+ marksheetAction?: IMarksheetAction;
108
109
  topicConceptData?: string;
109
110
  builderConfig?: IBuildConfigData;
110
111
  markData?: IMarkDataInfo;
@@ -36,10 +36,8 @@ export const BUILD_MARKSHEET = gql `
36
36
  id
37
37
  }
38
38
  users {
39
- user {
40
- id
41
- displayName
42
- }
39
+ id
40
+ displayName
43
41
  }
44
42
  marks {
45
43
  ...MarksheetMarkFields
@@ -87,10 +85,8 @@ export const RE_BUILD_MARKSHEET = gql `
87
85
  }
88
86
  source
89
87
  users {
90
- user {
91
- id
92
- displayName
93
- }
88
+ id
89
+ displayName
94
90
  }
95
91
  user {
96
92
  displayName
@@ -240,10 +236,8 @@ export const START_OR_JOIN_MARKSHEET = gql `
240
236
  }
241
237
  state
242
238
  users {
243
- user {
244
- id
245
- displayName
246
- }
239
+ id
240
+ displayName
247
241
  }
248
242
  completed
249
243
  }
@@ -252,7 +246,7 @@ export const START_OR_JOIN_MARKSHEET = gql `
252
246
  `;
253
247
  export const MODIFY_MARKSHEET_INFO = gql `
254
248
  ${MARKSHEET_MARK_FIELDS}
255
- mutation ModifyMarksheetInfo($input: input) {
249
+ mutation ModifyMarksheetInfo($input: ModifyMarksheetInfoInput) {
256
250
  restricted {
257
251
  modifyMarksheetInfo(input: $input) {
258
252
  id
@@ -285,10 +279,8 @@ export const MODIFY_MARKSHEET_INFO = gql `
285
279
  id
286
280
  }
287
281
  users {
288
- user {
289
- id
290
- displayName
291
- }
282
+ id
283
+ displayName
292
284
  }
293
285
  marks {
294
286
  ...MarksheetMarkFields
@@ -8,10 +8,8 @@ export const MARKSHEET = gql `
8
8
  currentMarkId
9
9
  state
10
10
  users {
11
- user {
12
- id
13
- displayName
14
- }
11
+ id
12
+ displayName
15
13
  }
16
14
  builderConfig {
17
15
  difficulty
@@ -42,6 +40,7 @@ export const MARKSHEET = gql `
42
40
  questionChoiceId
43
41
  marksheetId
44
42
  timeTaken
43
+ isAnswered
45
44
  mark
46
45
  question {
47
46
  ... on QuestionSBA {
@@ -1221,9 +1220,23 @@ export const HEARTBEAT_QBANK = gql `
1221
1220
  }
1222
1221
  `;
1223
1222
  export const PRE_BUILD_MARKSHEET = gql `
1224
- query PreBuildMarksheet($preBuildMarksheet: PreBuildMarksheetInput) {
1223
+ query PreBuildMarksheet(
1224
+ $topicIds: [Int!]
1225
+ $conceptIds: [Int!]
1226
+ $source: String!
1227
+ $search: String
1228
+ $marksheetId: Int
1229
+ $difficulty: [Int!]
1230
+ ) {
1225
1231
  restricted {
1226
- preBuildMarksheet(preBuildMarksheet: $preBuildMarksheet) {
1232
+ preBuildMarksheet(
1233
+ topicIds: $topicIds
1234
+ conceptIds: $conceptIds
1235
+ source: $source
1236
+ search: $search
1237
+ marksheetId: $marksheetId
1238
+ difficulty: $difficulty
1239
+ ) {
1227
1240
  unseen
1228
1241
  seenCorrect
1229
1242
  seenIncorrect
@@ -41,6 +41,7 @@ export interface IPreStartMarksheetData {
41
41
  action: EMarksheetAction;
42
42
  builderConfig?: IBuildConfigData;
43
43
  marksheetId: Id;
44
+ user: IUser;
44
45
  }
45
46
  export declare type IOnPreStartMarksheetModificationData = RootData<IPreStartMarksheetData, 'payload'>;
46
47
  export declare const ON_PRESTART_MARKSHEET_MODIFICATION_KEY = "ON_PRESTART_MARKSHEET_MODIFICATION";
@@ -60,6 +61,8 @@ export interface IMarksheetDataModification {
60
61
  timeTaken?: number;
61
62
  mark?: IMarksheetMarkJSONB;
62
63
  action?: EMarksheetAction;
64
+ user: IUser;
65
+ isAnswered?: boolean;
63
66
  }
64
67
  export declare type IOnMarksheetDataModificationData = RootData<IMarksheetDataModification, 'payload'>;
65
68
  export declare const ON_MARKSHEET_DATA_MODIFICATION_KEY = "ON_MARKSHEET_DATA_MODIFICATION";
@@ -24,6 +24,10 @@ export const ON_PRESTART_MARKSHEET_MODIFICATION = gql `
24
24
  marksheetId
25
25
  topicConceptData
26
26
  action
27
+ user {
28
+ id
29
+ displayName
30
+ }
27
31
  builderConfig {
28
32
  difficulty
29
33
  isTest
@@ -45,8 +49,13 @@ export const ON_MARKSHEET_DATA_MODIFICATION = gql `
45
49
  marksheetId
46
50
  questionId
47
51
  questionChoiceId
52
+ isAnswered
48
53
  timeTaken
49
54
  action
55
+ user {
56
+ id
57
+ displayName
58
+ }
50
59
  }
51
60
  }
52
61
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.2.8",
3
+ "version": "2.2.9",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",