@quesmed/types 2.2.0 → 2.2.1

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,6 +1,6 @@
1
- import { EDifficultyType, Id } from '../../../models';
2
1
  import { ApolloCache, ApolloClient } from '@apollo/client';
3
2
  import { ApolloUpdateOptions, ApolloUpdateResultRestricted } from '../..';
3
+ import { EDifficultyType, Id } from '../../../models';
4
4
  import { graphqlNormalize, RestrictedData } from '../../types';
5
5
  import { EMarksheetAction, EMarksheetState, IMarksheet, IMarksheetMarkJSONB } from './../../../models/Marksheet';
6
6
  import { IUser, IUserFlaggedQuestion } from './../../../models/User';
@@ -10,7 +10,9 @@ export interface IPreBuildMarksheet {
10
10
  seenIncorrect: number;
11
11
  buildRef: number;
12
12
  }
13
- export declare const BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
13
+ /**
14
+ * buildMarksheet
15
+ */
14
16
  export interface IBuildMarksheetInput extends IPreBuildMarksheet {
15
17
  isTest: boolean;
16
18
  marksheetId: Id;
@@ -20,6 +22,10 @@ export interface IBuildMarksheetVar {
20
22
  buildMarksheet: IBuildMarksheetInput;
21
23
  }
22
24
  export declare type IBuildMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'buildMarksheet'>;
25
+ export declare const BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
26
+ /**
27
+ * reBuildMarksheet
28
+ */
23
29
  export declare const RE_BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
24
30
  export interface IReBuildMarksheetVar {
25
31
  marksheetId: number;
@@ -67,6 +73,7 @@ export interface IStartOrJoinMarksheetVar {
67
73
  solo: boolean;
68
74
  }
69
75
  export declare type IStartOrJoinMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'startOrJoinMarksheet'>;
76
+ export declare const START_OR_JOIN_MARKSHEET: import("@apollo/client").DocumentNode;
70
77
  /**
71
78
  * modifyMarksheetInfo
72
79
  */
@@ -107,6 +114,7 @@ export interface IModifyMarksheetInfo {
107
114
  qBankInfo: IQbankInfoInput;
108
115
  }
109
116
  export declare type IModifyMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'modifyMarksheetInfo'>;
117
+ export declare const MODIFY_MARKSHEET_INFO: import("@apollo/client").DocumentNode;
110
118
  /**
111
119
  * preBuildMarksheet
112
120
  */
@@ -114,7 +122,7 @@ export interface IPreBuildMarksheetVarInput {
114
122
  topicIds: number[];
115
123
  conceptIds: number[];
116
124
  search: string;
117
- marksheetId: Id;
125
+ marksheetId?: Id;
118
126
  source: string;
119
127
  difficulty?: EDifficultyType[];
120
128
  }
@@ -122,6 +130,7 @@ export interface IPreBuildMarksheetVar {
122
130
  preBuildMarksheet: IPreBuildMarksheetVarInput;
123
131
  }
124
132
  export declare type IPreBuildMarksheetData = RestrictedData<graphqlNormalize & IPreBuildMarksheet, 'preBuildMarksheet'>;
133
+ export declare const PRE_BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
125
134
  /**
126
135
  * leaveMarksheet
127
136
  */
@@ -129,6 +138,7 @@ export interface ILeaveMarksheetVar {
129
138
  marksheetId: Id;
130
139
  }
131
140
  export declare type ILeaveMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'leaveMarksheet'>;
141
+ export declare const LEAVE_MARKSHEET: import("@apollo/client").DocumentNode;
132
142
  /**
133
143
  * endMarksheet
134
144
  */
@@ -136,3 +146,4 @@ export interface IEndMarksheetVar {
136
146
  marksheetId: Id;
137
147
  }
138
148
  export declare type IEndMarksheetData = RestrictedData<graphqlNormalize & boolean, 'endMarksheet'>;
149
+ export declare const END_MARKSHEET: import("@apollo/client").DocumentNode;
@@ -1,18 +1,50 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.REMOVE_FLAGGED_QUESTION = exports.ADD_FLAGGED_QUESTION = exports.optimisticSaveMarksheets = exports.updateMarksheets = exports.SAVE_MARKSHEET = exports.RE_BUILD_MARKSHEET = exports.BUILD_MARKSHEET = void 0;
3
+ exports.END_MARKSHEET = exports.LEAVE_MARKSHEET = exports.PRE_BUILD_MARKSHEET = exports.MODIFY_MARKSHEET_INFO = exports.START_OR_JOIN_MARKSHEET = exports.REMOVE_FLAGGED_QUESTION = exports.ADD_FLAGGED_QUESTION = exports.optimisticSaveMarksheets = exports.updateMarksheets = exports.SAVE_MARKSHEET = exports.RE_BUILD_MARKSHEET = exports.BUILD_MARKSHEET = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const marksheet_1 = require("../../fragments/marksheet");
6
6
  const restricted_1 = require("../../query/restricted");
7
7
  exports.BUILD_MARKSHEET = (0, client_1.gql) `
8
- mutation BuildMarksheet($buildMarksheet: BuildMarksheetInput) {
8
+ mutation BuildMarksheet($buildMarksheet: BuildMarksheetInput!) {
9
9
  restricted {
10
10
  buildMarksheet(buildMarksheet: $buildMarksheet) {
11
11
  id
12
+ createdAt
13
+ startedAt
14
+ endedAt
15
+ topicIds
16
+ state
17
+ currentMarkId
18
+ topicConceptData
19
+ preBuildData
20
+ builderConfig
21
+ topicNames
22
+ source
23
+ user {
24
+ displayName
25
+ id
26
+ }
27
+ users {
28
+ user {
29
+ id
30
+ displayName
31
+ }
32
+ }
33
+ marks {
34
+ ...MarksheetMarkFields
35
+ }
36
+ mockTestId
37
+ correct
38
+ incorrect
39
+ totalQuestions
40
+ isTestMarksheet
12
41
  }
13
42
  }
14
43
  }
15
44
  `;
45
+ /**
46
+ * reBuildMarksheet
47
+ */
16
48
  exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
17
49
  ${marksheet_1.MARKSHEET_MARK_FIELDS}
18
50
  mutation ReBuildMarksheet($marksheetId: Int!) {
@@ -24,8 +56,18 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
24
56
  endedAt
25
57
  topicIds
26
58
  topicNames
59
+ state
60
+ currentMarkId
61
+ topicConceptData
62
+ preBuildData
63
+ builderConfig
27
64
  source
28
- userId
65
+ users {
66
+ user {
67
+ id
68
+ displayName
69
+ }
70
+ }
29
71
  user {
30
72
  displayName
31
73
  id
@@ -160,3 +202,95 @@ exports.REMOVE_FLAGGED_QUESTION = (0, client_1.gql) `
160
202
  }
161
203
  }
162
204
  `;
205
+ exports.START_OR_JOIN_MARKSHEET = (0, client_1.gql) `
206
+ mutation StartOrJoinMarksheet($agoraId: String!, $solo: Boolean!) {
207
+ restricted {
208
+ startOrJoinMarksheet(agoraId: $agoraId, solo: $solo) {
209
+ id
210
+ createdAt
211
+ startedAt
212
+ agoraId
213
+ endedAt
214
+ source
215
+ user {
216
+ id
217
+ displayName
218
+ }
219
+ state
220
+ users {
221
+ user {
222
+ id
223
+ displayName
224
+ }
225
+ }
226
+ completed
227
+ }
228
+ }
229
+ }
230
+ `;
231
+ exports.MODIFY_MARKSHEET_INFO = (0, client_1.gql) `
232
+ mutation ModifyQbankInfo($qBankInfo: ModifyMarksheetInfoInput) {
233
+ restricted {
234
+ modifyQbankInfo(qBankInfo: $qBankInfo) {
235
+ id
236
+ createdAt
237
+ startedAt
238
+ endedAt
239
+ topicIds
240
+ state
241
+ currentMarkId
242
+ topicConceptData
243
+ preBuildData
244
+ builderConfig
245
+ topicNames
246
+ source
247
+ user {
248
+ displayName
249
+ id
250
+ }
251
+ users {
252
+ user {
253
+ id
254
+ displayName
255
+ }
256
+ }
257
+ marks {
258
+ ...MarksheetMarkFields
259
+ }
260
+ mockTestId
261
+ correct
262
+ incorrect
263
+ totalQuestions
264
+ isTestMarksheet
265
+ }
266
+ }
267
+ }
268
+ `;
269
+ exports.PRE_BUILD_MARKSHEET = (0, client_1.gql) `
270
+ mutation PreBuildMarksheet($preBuildMarksheet: PreBuildMarksheetInput) {
271
+ restricted {
272
+ preBuildMarksheet(preBuildMarksheet: $preBuildMarksheet) {
273
+ unseen
274
+ seenCorrect
275
+ seenIncorrect
276
+ buildRef
277
+ }
278
+ }
279
+ }
280
+ `;
281
+ exports.LEAVE_MARKSHEET = (0, client_1.gql) `
282
+ mutation LeaveMarksheet($marksheetId: Int!) {
283
+ restricted {
284
+ leaveMarksheet(marksheetId: $marksheetId) {
285
+ id
286
+ }
287
+ }
288
+ }
289
+ `;
290
+ exports.END_MARKSHEET = (0, client_1.gql) `
291
+ mutation EndMarksheet($marksheetId: Int!) {
292
+ restricted {
293
+ endMarksheet(marksheetId: $marksheetId)
294
+ }
295
+ }
296
+ `;
@@ -1,27 +1,15 @@
1
- import { EDifficultyType, Id, IMarksheet, IUserFlaggedQuestion } from '../../../models';
2
- import { IPreBuildMarksheet } from '../../mutation/restricted';
1
+ import { Id, IMarksheet, IUserFlaggedQuestion } from '../../../models';
3
2
  import { graphqlNormalize, RestrictedData } from '../../types';
4
3
  export interface IMarksheetVar {
5
4
  id: Id;
6
5
  }
7
6
  export declare type IMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'marksheet'>;
8
7
  export declare const MARKSHEET: import("@apollo/client").DocumentNode;
9
- export interface IPreBuildMarksheetVar {
10
- topicIds: number[];
11
- conceptIds: number[];
12
- search: string;
13
- marksheetId: Id;
14
- source: string;
15
- difficulty?: EDifficultyType[];
16
- }
17
- export declare type IPreBuildMarksheetData = RestrictedData<graphqlNormalize & IPreBuildMarksheet, 'preBuildMarksheet'>;
18
- export declare const PRE_BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
19
8
  export interface IMarksheetsVar {
20
9
  filter: {
21
10
  limit: number;
22
11
  date?: string;
23
12
  offset?: number;
24
- solo?: boolean;
25
13
  };
26
14
  }
27
15
  export declare type IMarksheetsData = RestrictedData<(graphqlNormalize & IMarksheet)[], 'marksheets'>;
@@ -60,3 +48,4 @@ export interface IQbankHeartbeatVar {
60
48
  agoraId: string;
61
49
  }
62
50
  export declare type IQBankHeartBeatData = RestrictedData<boolean, 'heartbeatQbank'>;
51
+ export declare const HEARTBEAT_QBANK: import("@apollo/client").DocumentNode;
@@ -1,12 +1,36 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MARKSHEET_FEEDBACK = exports.FLAGGED_QUESTIONS = exports.LATEST_PAST_MARKSHEET_ID = exports.MARKSHEETS = exports.PRE_BUILD_MARKSHEET = exports.MARKSHEET = void 0;
3
+ exports.HEARTBEAT_QBANK = exports.MARKSHEET_FEEDBACK = exports.FLAGGED_QUESTIONS = exports.LATEST_PAST_MARKSHEET_ID = exports.MARKSHEETS = exports.MARKSHEET = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  exports.MARKSHEET = (0, client_1.gql) `
6
6
  query Marksheet($id: Int!) {
7
7
  restricted {
8
8
  marksheet(id: $id) {
9
9
  id
10
+ topicConceptData
11
+ currentMarkId
12
+ state
13
+ users {
14
+ user {
15
+ id
16
+ displayName
17
+ }
18
+ }
19
+ builderConfig {
20
+ difficulty
21
+ isTest
22
+ numberOfQuestions
23
+ secondsPerQuestion
24
+ unseen
25
+ seenCorrect
26
+ seenIncorrect
27
+ }
28
+ preBuildData {
29
+ buildRef
30
+ seenCorrect
31
+ seenIncorrect
32
+ unseen
33
+ }
10
34
  createdAt
11
35
  startedAt
12
36
  endedAt
@@ -525,30 +549,6 @@ exports.MARKSHEET = (0, client_1.gql) `
525
549
  }
526
550
  }
527
551
  `;
528
- exports.PRE_BUILD_MARKSHEET = (0, client_1.gql) `
529
- query PreBuildMarksheet(
530
- $topicIds: [Int!]
531
- $conceptIds: [Int!]
532
- $search: String
533
- $source: String!
534
- $difficulty: [Int!]
535
- ) {
536
- restricted {
537
- preBuildMarksheet(
538
- difficulty: $difficulty
539
- topicIds: $topicIds
540
- conceptIds: $conceptIds
541
- search: $search
542
- source: $source
543
- ) {
544
- unseen
545
- seenCorrect
546
- seenIncorrect
547
- buildRef
548
- }
549
- }
550
- }
551
- `;
552
552
  exports.MARKSHEETS = (0, client_1.gql) `
553
553
  query Marksheets($filter: MarksheetFilterInput!) {
554
554
  restricted {
@@ -1216,3 +1216,10 @@ exports.MARKSHEET_FEEDBACK = (0, client_1.gql) `
1216
1216
  }
1217
1217
  }
1218
1218
  `;
1219
+ exports.HEARTBEAT_QBANK = (0, client_1.gql) `
1220
+ query HeartbeatQbank($agoraId: String!) {
1221
+ restricted {
1222
+ heartbeatQbank(agoraId: $agoraId)
1223
+ }
1224
+ }
1225
+ `;
@@ -1,3 +1,3 @@
1
1
  export * from './osce';
2
2
  export * from './notification';
3
- export * from './groupStudy';
3
+ export * from './marksheet';
@@ -12,4 +12,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./osce"), exports);
14
14
  __exportStar(require("./notification"), exports);
15
- __exportStar(require("./groupStudy"), exports);
15
+ __exportStar(require("./marksheet"), exports);
@@ -27,9 +27,10 @@ export interface IMarksheetActionInfo {
27
27
  action: EMarksheetAction;
28
28
  }
29
29
  export declare type IOnMarksheetActionChangeData = RootData<IMarksheetActionInfo, 'payload'>;
30
- export declare const ON_MARKSHEET_ACTION_INFO_CHANGE = "ON_MARKSHEET_ACTION_INFO_CHANGE";
30
+ export declare const ON_MARKSHEET_ACTION_INFO_CHANGE_KEY = "ON_MARKSHEET_ACTION_INFO_CHANGE";
31
+ export declare const ON_MARKSHEET_ACTION_INFO_CHANGE: import("@apollo/client").DocumentNode;
31
32
  /**
32
- * onTopicConceptModification
33
+ * onPreStartMarksheetModification
33
34
  */
34
35
  export interface IOnPreStartMarksheetModificationVar {
35
36
  marksheetId: Id;
@@ -41,7 +42,8 @@ export interface IPreStartMarksheetData {
41
42
  marksheetId: Id;
42
43
  }
43
44
  export declare type IOnPreStartMarksheetModificationData = RootData<IPreStartMarksheetData, 'payload'>;
44
- export declare const ON_PRESTART_MARKSHEET_MODIFICATION = "ON_PRESTART_MARKSHEET_MODIFICATION";
45
+ export declare const ON_PRESTART_MARKSHEET_MODIFICATION_KEY = "ON_PRESTART_MARKSHEET_MODIFICATION";
46
+ export declare const ON_PRESTART_MARKSHEET_MODIFICATION: import("@apollo/client").DocumentNode;
45
47
  /**
46
48
  * OnMarksheetDataModification
47
49
  */
@@ -59,4 +61,5 @@ export interface IMarksheetDataModification {
59
61
  action?: EMarksheetAction;
60
62
  }
61
63
  export declare type IOnMarksheetDataModificationData = RootData<IMarksheetDataModification, 'payload'>;
62
- export declare const ON_MARKSHEET_DATA_MODIFICATION = "ON_MARKSHEET_DATA_MODIFICATION";
64
+ export declare const ON_MARKSHEET_DATA_MODIFICATION_KEY = "ON_MARKSHEET_DATA_MODIFICATION";
65
+ export declare const ON_MARKSHEET_DATA_MODIFICATION: import("@apollo/client").DocumentNode;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ON_MARKSHEET_DATA_MODIFICATION = exports.ON_MARKSHEET_DATA_MODIFICATION_KEY = exports.ON_PRESTART_MARKSHEET_MODIFICATION = exports.ON_PRESTART_MARKSHEET_MODIFICATION_KEY = exports.ON_MARKSHEET_ACTION_INFO_CHANGE = exports.ON_MARKSHEET_ACTION_INFO_CHANGE_KEY = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.ON_MARKSHEET_ACTION_INFO_CHANGE_KEY = 'ON_MARKSHEET_ACTION_INFO_CHANGE';
6
+ exports.ON_MARKSHEET_ACTION_INFO_CHANGE = (0, client_1.gql) `
7
+ subscription OnMarksheetActionInfoChange($marksheetId: Int!) {
8
+ onMarksheetActionInfoChange(marksheetId: $marksheetId) {
9
+ marksheetId
10
+ agoraId
11
+ userId
12
+ user {
13
+ id
14
+ firstname
15
+ lastname
16
+ dispayname
17
+ }
18
+ startedAt
19
+ endedAt
20
+ state
21
+ action
22
+ }
23
+ }
24
+ `;
25
+ exports.ON_PRESTART_MARKSHEET_MODIFICATION_KEY = 'ON_PRESTART_MARKSHEET_MODIFICATION';
26
+ exports.ON_PRESTART_MARKSHEET_MODIFICATION = (0, client_1.gql) `
27
+ subscription OnPreStartMarksheetModification($marksheetId: Int!) {
28
+ onPreStartMarksheetModification(marksheetId: $marksheetId) {
29
+ marksheetId
30
+ topicConceptData
31
+ action
32
+ builderConfig {
33
+ difficulty
34
+ isTest
35
+ numberOfQuestions
36
+ secondsPerQuestion
37
+ unseen
38
+ seenCorrect
39
+ seenIncorrect
40
+ }
41
+ }
42
+ }
43
+ `;
44
+ exports.ON_MARKSHEET_DATA_MODIFICATION_KEY = 'ON_MARKSHEET_DATA_MODIFICATION';
45
+ exports.ON_MARKSHEET_DATA_MODIFICATION = (0, client_1.gql) `
46
+ subscription OnMarksheetDataModification($marksheetId: Int!) {
47
+ onMarksheetDataModification(marksheetId: $marksheetId) {
48
+ markId
49
+ updatedAt
50
+ marksheetId
51
+ questionId
52
+ questionChoiceId
53
+ timeTaken
54
+ mark
55
+ action
56
+ }
57
+ }
58
+ `;
@@ -1,6 +1,6 @@
1
- import { EDifficultyType, Id } from '../../../models';
2
1
  import { ApolloCache, ApolloClient } from '@apollo/client';
3
2
  import { ApolloUpdateOptions, ApolloUpdateResultRestricted } from '../..';
3
+ import { EDifficultyType, Id } from '../../../models';
4
4
  import { graphqlNormalize, RestrictedData } from '../../types';
5
5
  import { EMarksheetAction, EMarksheetState, IMarksheet, IMarksheetMarkJSONB } from './../../../models/Marksheet';
6
6
  import { IUser, IUserFlaggedQuestion } from './../../../models/User';
@@ -10,7 +10,9 @@ export interface IPreBuildMarksheet {
10
10
  seenIncorrect: number;
11
11
  buildRef: number;
12
12
  }
13
- export declare const BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
13
+ /**
14
+ * buildMarksheet
15
+ */
14
16
  export interface IBuildMarksheetInput extends IPreBuildMarksheet {
15
17
  isTest: boolean;
16
18
  marksheetId: Id;
@@ -20,6 +22,10 @@ export interface IBuildMarksheetVar {
20
22
  buildMarksheet: IBuildMarksheetInput;
21
23
  }
22
24
  export declare type IBuildMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'buildMarksheet'>;
25
+ export declare const BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
26
+ /**
27
+ * reBuildMarksheet
28
+ */
23
29
  export declare const RE_BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
24
30
  export interface IReBuildMarksheetVar {
25
31
  marksheetId: number;
@@ -67,6 +73,7 @@ export interface IStartOrJoinMarksheetVar {
67
73
  solo: boolean;
68
74
  }
69
75
  export declare type IStartOrJoinMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'startOrJoinMarksheet'>;
76
+ export declare const START_OR_JOIN_MARKSHEET: import("@apollo/client").DocumentNode;
70
77
  /**
71
78
  * modifyMarksheetInfo
72
79
  */
@@ -107,6 +114,7 @@ export interface IModifyMarksheetInfo {
107
114
  qBankInfo: IQbankInfoInput;
108
115
  }
109
116
  export declare type IModifyMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'modifyMarksheetInfo'>;
117
+ export declare const MODIFY_MARKSHEET_INFO: import("@apollo/client").DocumentNode;
110
118
  /**
111
119
  * preBuildMarksheet
112
120
  */
@@ -114,7 +122,7 @@ export interface IPreBuildMarksheetVarInput {
114
122
  topicIds: number[];
115
123
  conceptIds: number[];
116
124
  search: string;
117
- marksheetId: Id;
125
+ marksheetId?: Id;
118
126
  source: string;
119
127
  difficulty?: EDifficultyType[];
120
128
  }
@@ -122,6 +130,7 @@ export interface IPreBuildMarksheetVar {
122
130
  preBuildMarksheet: IPreBuildMarksheetVarInput;
123
131
  }
124
132
  export declare type IPreBuildMarksheetData = RestrictedData<graphqlNormalize & IPreBuildMarksheet, 'preBuildMarksheet'>;
133
+ export declare const PRE_BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
125
134
  /**
126
135
  * leaveMarksheet
127
136
  */
@@ -129,6 +138,7 @@ export interface ILeaveMarksheetVar {
129
138
  marksheetId: Id;
130
139
  }
131
140
  export declare type ILeaveMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'leaveMarksheet'>;
141
+ export declare const LEAVE_MARKSHEET: import("@apollo/client").DocumentNode;
132
142
  /**
133
143
  * endMarksheet
134
144
  */
@@ -136,3 +146,4 @@ export interface IEndMarksheetVar {
136
146
  marksheetId: Id;
137
147
  }
138
148
  export declare type IEndMarksheetData = RestrictedData<graphqlNormalize & boolean, 'endMarksheet'>;
149
+ export declare const END_MARKSHEET: import("@apollo/client").DocumentNode;
@@ -2,14 +2,46 @@ import { gql } from '@apollo/client';
2
2
  import { MARKSHEET_MARK_FIELDS } from '../../fragments/marksheet';
3
3
  import { MARKSHEET, } from '../../query/restricted';
4
4
  export const BUILD_MARKSHEET = gql `
5
- mutation BuildMarksheet($buildMarksheet: BuildMarksheetInput) {
5
+ mutation BuildMarksheet($buildMarksheet: BuildMarksheetInput!) {
6
6
  restricted {
7
7
  buildMarksheet(buildMarksheet: $buildMarksheet) {
8
8
  id
9
+ createdAt
10
+ startedAt
11
+ endedAt
12
+ topicIds
13
+ state
14
+ currentMarkId
15
+ topicConceptData
16
+ preBuildData
17
+ builderConfig
18
+ topicNames
19
+ source
20
+ user {
21
+ displayName
22
+ id
23
+ }
24
+ users {
25
+ user {
26
+ id
27
+ displayName
28
+ }
29
+ }
30
+ marks {
31
+ ...MarksheetMarkFields
32
+ }
33
+ mockTestId
34
+ correct
35
+ incorrect
36
+ totalQuestions
37
+ isTestMarksheet
9
38
  }
10
39
  }
11
40
  }
12
41
  `;
42
+ /**
43
+ * reBuildMarksheet
44
+ */
13
45
  export const RE_BUILD_MARKSHEET = gql `
14
46
  ${MARKSHEET_MARK_FIELDS}
15
47
  mutation ReBuildMarksheet($marksheetId: Int!) {
@@ -21,8 +53,18 @@ export const RE_BUILD_MARKSHEET = gql `
21
53
  endedAt
22
54
  topicIds
23
55
  topicNames
56
+ state
57
+ currentMarkId
58
+ topicConceptData
59
+ preBuildData
60
+ builderConfig
24
61
  source
25
- userId
62
+ users {
63
+ user {
64
+ id
65
+ displayName
66
+ }
67
+ }
26
68
  user {
27
69
  displayName
28
70
  id
@@ -155,3 +197,95 @@ export const REMOVE_FLAGGED_QUESTION = gql `
155
197
  }
156
198
  }
157
199
  `;
200
+ export const START_OR_JOIN_MARKSHEET = gql `
201
+ mutation StartOrJoinMarksheet($agoraId: String!, $solo: Boolean!) {
202
+ restricted {
203
+ startOrJoinMarksheet(agoraId: $agoraId, solo: $solo) {
204
+ id
205
+ createdAt
206
+ startedAt
207
+ agoraId
208
+ endedAt
209
+ source
210
+ user {
211
+ id
212
+ displayName
213
+ }
214
+ state
215
+ users {
216
+ user {
217
+ id
218
+ displayName
219
+ }
220
+ }
221
+ completed
222
+ }
223
+ }
224
+ }
225
+ `;
226
+ export const MODIFY_MARKSHEET_INFO = gql `
227
+ mutation ModifyQbankInfo($qBankInfo: ModifyMarksheetInfoInput) {
228
+ restricted {
229
+ modifyQbankInfo(qBankInfo: $qBankInfo) {
230
+ id
231
+ createdAt
232
+ startedAt
233
+ endedAt
234
+ topicIds
235
+ state
236
+ currentMarkId
237
+ topicConceptData
238
+ preBuildData
239
+ builderConfig
240
+ topicNames
241
+ source
242
+ user {
243
+ displayName
244
+ id
245
+ }
246
+ users {
247
+ user {
248
+ id
249
+ displayName
250
+ }
251
+ }
252
+ marks {
253
+ ...MarksheetMarkFields
254
+ }
255
+ mockTestId
256
+ correct
257
+ incorrect
258
+ totalQuestions
259
+ isTestMarksheet
260
+ }
261
+ }
262
+ }
263
+ `;
264
+ export const PRE_BUILD_MARKSHEET = gql `
265
+ mutation PreBuildMarksheet($preBuildMarksheet: PreBuildMarksheetInput) {
266
+ restricted {
267
+ preBuildMarksheet(preBuildMarksheet: $preBuildMarksheet) {
268
+ unseen
269
+ seenCorrect
270
+ seenIncorrect
271
+ buildRef
272
+ }
273
+ }
274
+ }
275
+ `;
276
+ export const LEAVE_MARKSHEET = gql `
277
+ mutation LeaveMarksheet($marksheetId: Int!) {
278
+ restricted {
279
+ leaveMarksheet(marksheetId: $marksheetId) {
280
+ id
281
+ }
282
+ }
283
+ }
284
+ `;
285
+ export const END_MARKSHEET = gql `
286
+ mutation EndMarksheet($marksheetId: Int!) {
287
+ restricted {
288
+ endMarksheet(marksheetId: $marksheetId)
289
+ }
290
+ }
291
+ `;
@@ -1,27 +1,15 @@
1
- import { EDifficultyType, Id, IMarksheet, IUserFlaggedQuestion } from '../../../models';
2
- import { IPreBuildMarksheet } from '../../mutation/restricted';
1
+ import { Id, IMarksheet, IUserFlaggedQuestion } from '../../../models';
3
2
  import { graphqlNormalize, RestrictedData } from '../../types';
4
3
  export interface IMarksheetVar {
5
4
  id: Id;
6
5
  }
7
6
  export declare type IMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'marksheet'>;
8
7
  export declare const MARKSHEET: import("@apollo/client").DocumentNode;
9
- export interface IPreBuildMarksheetVar {
10
- topicIds: number[];
11
- conceptIds: number[];
12
- search: string;
13
- marksheetId: Id;
14
- source: string;
15
- difficulty?: EDifficultyType[];
16
- }
17
- export declare type IPreBuildMarksheetData = RestrictedData<graphqlNormalize & IPreBuildMarksheet, 'preBuildMarksheet'>;
18
- export declare const PRE_BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
19
8
  export interface IMarksheetsVar {
20
9
  filter: {
21
10
  limit: number;
22
11
  date?: string;
23
12
  offset?: number;
24
- solo?: boolean;
25
13
  };
26
14
  }
27
15
  export declare type IMarksheetsData = RestrictedData<(graphqlNormalize & IMarksheet)[], 'marksheets'>;
@@ -60,3 +48,4 @@ export interface IQbankHeartbeatVar {
60
48
  agoraId: string;
61
49
  }
62
50
  export declare type IQBankHeartBeatData = RestrictedData<boolean, 'heartbeatQbank'>;
51
+ export declare const HEARTBEAT_QBANK: import("@apollo/client").DocumentNode;
@@ -4,6 +4,30 @@ export const MARKSHEET = gql `
4
4
  restricted {
5
5
  marksheet(id: $id) {
6
6
  id
7
+ topicConceptData
8
+ currentMarkId
9
+ state
10
+ users {
11
+ user {
12
+ id
13
+ displayName
14
+ }
15
+ }
16
+ builderConfig {
17
+ difficulty
18
+ isTest
19
+ numberOfQuestions
20
+ secondsPerQuestion
21
+ unseen
22
+ seenCorrect
23
+ seenIncorrect
24
+ }
25
+ preBuildData {
26
+ buildRef
27
+ seenCorrect
28
+ seenIncorrect
29
+ unseen
30
+ }
7
31
  createdAt
8
32
  startedAt
9
33
  endedAt
@@ -522,30 +546,6 @@ export const MARKSHEET = gql `
522
546
  }
523
547
  }
524
548
  `;
525
- export const PRE_BUILD_MARKSHEET = gql `
526
- query PreBuildMarksheet(
527
- $topicIds: [Int!]
528
- $conceptIds: [Int!]
529
- $search: String
530
- $source: String!
531
- $difficulty: [Int!]
532
- ) {
533
- restricted {
534
- preBuildMarksheet(
535
- difficulty: $difficulty
536
- topicIds: $topicIds
537
- conceptIds: $conceptIds
538
- search: $search
539
- source: $source
540
- ) {
541
- unseen
542
- seenCorrect
543
- seenIncorrect
544
- buildRef
545
- }
546
- }
547
- }
548
- `;
549
549
  export const MARKSHEETS = gql `
550
550
  query Marksheets($filter: MarksheetFilterInput!) {
551
551
  restricted {
@@ -1213,3 +1213,10 @@ export const MARKSHEET_FEEDBACK = gql `
1213
1213
  }
1214
1214
  }
1215
1215
  `;
1216
+ export const HEARTBEAT_QBANK = gql `
1217
+ query HeartbeatQbank($agoraId: String!) {
1218
+ restricted {
1219
+ heartbeatQbank(agoraId: $agoraId)
1220
+ }
1221
+ }
1222
+ `;
@@ -1,3 +1,3 @@
1
1
  export * from './osce';
2
2
  export * from './notification';
3
- export * from './groupStudy';
3
+ export * from './marksheet';
@@ -1,3 +1,3 @@
1
1
  export * from './osce';
2
2
  export * from './notification';
3
- export * from './groupStudy';
3
+ export * from './marksheet';
@@ -27,9 +27,10 @@ export interface IMarksheetActionInfo {
27
27
  action: EMarksheetAction;
28
28
  }
29
29
  export declare type IOnMarksheetActionChangeData = RootData<IMarksheetActionInfo, 'payload'>;
30
- export declare const ON_MARKSHEET_ACTION_INFO_CHANGE = "ON_MARKSHEET_ACTION_INFO_CHANGE";
30
+ export declare const ON_MARKSHEET_ACTION_INFO_CHANGE_KEY = "ON_MARKSHEET_ACTION_INFO_CHANGE";
31
+ export declare const ON_MARKSHEET_ACTION_INFO_CHANGE: import("@apollo/client").DocumentNode;
31
32
  /**
32
- * onTopicConceptModification
33
+ * onPreStartMarksheetModification
33
34
  */
34
35
  export interface IOnPreStartMarksheetModificationVar {
35
36
  marksheetId: Id;
@@ -41,7 +42,8 @@ export interface IPreStartMarksheetData {
41
42
  marksheetId: Id;
42
43
  }
43
44
  export declare type IOnPreStartMarksheetModificationData = RootData<IPreStartMarksheetData, 'payload'>;
44
- export declare const ON_PRESTART_MARKSHEET_MODIFICATION = "ON_PRESTART_MARKSHEET_MODIFICATION";
45
+ export declare const ON_PRESTART_MARKSHEET_MODIFICATION_KEY = "ON_PRESTART_MARKSHEET_MODIFICATION";
46
+ export declare const ON_PRESTART_MARKSHEET_MODIFICATION: import("@apollo/client").DocumentNode;
45
47
  /**
46
48
  * OnMarksheetDataModification
47
49
  */
@@ -59,4 +61,5 @@ export interface IMarksheetDataModification {
59
61
  action?: EMarksheetAction;
60
62
  }
61
63
  export declare type IOnMarksheetDataModificationData = RootData<IMarksheetDataModification, 'payload'>;
62
- export declare const ON_MARKSHEET_DATA_MODIFICATION = "ON_MARKSHEET_DATA_MODIFICATION";
64
+ export declare const ON_MARKSHEET_DATA_MODIFICATION_KEY = "ON_MARKSHEET_DATA_MODIFICATION";
65
+ export declare const ON_MARKSHEET_DATA_MODIFICATION: import("@apollo/client").DocumentNode;
@@ -0,0 +1,55 @@
1
+ import { gql } from '@apollo/client';
2
+ export const ON_MARKSHEET_ACTION_INFO_CHANGE_KEY = 'ON_MARKSHEET_ACTION_INFO_CHANGE';
3
+ export const ON_MARKSHEET_ACTION_INFO_CHANGE = gql `
4
+ subscription OnMarksheetActionInfoChange($marksheetId: Int!) {
5
+ onMarksheetActionInfoChange(marksheetId: $marksheetId) {
6
+ marksheetId
7
+ agoraId
8
+ userId
9
+ user {
10
+ id
11
+ firstname
12
+ lastname
13
+ dispayname
14
+ }
15
+ startedAt
16
+ endedAt
17
+ state
18
+ action
19
+ }
20
+ }
21
+ `;
22
+ export const ON_PRESTART_MARKSHEET_MODIFICATION_KEY = 'ON_PRESTART_MARKSHEET_MODIFICATION';
23
+ export const ON_PRESTART_MARKSHEET_MODIFICATION = gql `
24
+ subscription OnPreStartMarksheetModification($marksheetId: Int!) {
25
+ onPreStartMarksheetModification(marksheetId: $marksheetId) {
26
+ marksheetId
27
+ topicConceptData
28
+ action
29
+ builderConfig {
30
+ difficulty
31
+ isTest
32
+ numberOfQuestions
33
+ secondsPerQuestion
34
+ unseen
35
+ seenCorrect
36
+ seenIncorrect
37
+ }
38
+ }
39
+ }
40
+ `;
41
+ export const ON_MARKSHEET_DATA_MODIFICATION_KEY = 'ON_MARKSHEET_DATA_MODIFICATION';
42
+ export const ON_MARKSHEET_DATA_MODIFICATION = gql `
43
+ subscription OnMarksheetDataModification($marksheetId: Int!) {
44
+ onMarksheetDataModification(marksheetId: $marksheetId) {
45
+ markId
46
+ updatedAt
47
+ marksheetId
48
+ questionId
49
+ questionChoiceId
50
+ timeTaken
51
+ mark
52
+ action
53
+ }
54
+ }
55
+ `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ON_MARKSHEET_DATA_MODIFICATION = exports.ON_PRESTART_MARKSHEET_MODIFICATION = exports.ON_MARKSHEET_ACTION_INFO_CHANGE = void 0;
4
- exports.ON_MARKSHEET_ACTION_INFO_CHANGE = 'ON_MARKSHEET_ACTION_INFO_CHANGE';
5
- exports.ON_PRESTART_MARKSHEET_MODIFICATION = 'ON_PRESTART_MARKSHEET_MODIFICATION';
6
- exports.ON_MARKSHEET_DATA_MODIFICATION = 'ON_MARKSHEET_DATA_MODIFICATION';
@@ -1,3 +0,0 @@
1
- export const ON_MARKSHEET_ACTION_INFO_CHANGE = 'ON_MARKSHEET_ACTION_INFO_CHANGE';
2
- export const ON_PRESTART_MARKSHEET_MODIFICATION = 'ON_PRESTART_MARKSHEET_MODIFICATION';
3
- export const ON_MARKSHEET_DATA_MODIFICATION = 'ON_MARKSHEET_DATA_MODIFICATION';