@quesmed/types-rn 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
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 +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 +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';