@quesmed/types-rn 2.2.45 → 2.2.48

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.
@@ -30,7 +30,8 @@ export declare enum EMarksheetAction {
30
30
  TOPIC_CONCEPT_SELECTION = 12,
31
31
  BUILDER_CONFIG_SELECTION = 13,
32
32
  STATE_CHANGE = 14,
33
- ANSWER_SELECTED = 15
33
+ ANSWER_SELECTED = 15,
34
+ MARK_CHECK_UNCHECK = 16
34
35
  }
35
36
  export interface IMarksheetMember {
36
37
  id: Id;
@@ -62,6 +63,7 @@ export interface IMarksheet {
62
63
  solo: boolean;
63
64
  agoraId: string;
64
65
  users: IUser[];
66
+ activeUsers?: IUser[];
65
67
  state: EMarksheetState;
66
68
  completed: boolean;
67
69
  timeTaken: number;
@@ -86,6 +88,7 @@ export interface IMarksheetMark {
86
88
  mark: IMarksheetMarkJSONB;
87
89
  marksheet?: IMarksheet;
88
90
  isAnswered: boolean;
91
+ striked: number[];
89
92
  }
90
93
  export interface IPreBuildMarksheetRef {
91
94
  id: Id;
@@ -33,4 +33,5 @@ var EMarksheetAction;
33
33
  EMarksheetAction[EMarksheetAction["BUILDER_CONFIG_SELECTION"] = 13] = "BUILDER_CONFIG_SELECTION";
34
34
  EMarksheetAction[EMarksheetAction["STATE_CHANGE"] = 14] = "STATE_CHANGE";
35
35
  EMarksheetAction[EMarksheetAction["ANSWER_SELECTED"] = 15] = "ANSWER_SELECTED";
36
+ EMarksheetAction[EMarksheetAction["MARK_CHECK_UNCHECK"] = 16] = "MARK_CHECK_UNCHECK";
36
37
  })(EMarksheetAction = exports.EMarksheetAction || (exports.EMarksheetAction = {}));
package/models/User.d.ts CHANGED
@@ -69,14 +69,12 @@ export interface IUser {
69
69
  accessLevel: IAccessLevel;
70
70
  elo: number;
71
71
  marksheets: IMarksheet[];
72
- userCompletedQuestions: IUserCompletedQuestions[];
73
- userCompletedCards: IUserCompletedCards[];
74
72
  marksheetsCount?: number | null;
75
- completedQuestions: IQuestion[];
73
+ completedQuestions: IUserCompletedQuestion[];
76
74
  completedQuestionsCount?: number | null;
77
75
  completedCorrectQuestionsCount?: number | null;
78
76
  completedIncorrectQuestionsCount?: number | null;
79
- completedCards: ICard[];
77
+ completedCards: IUserCompletedCard[];
80
78
  completedCardsCount?: number | null;
81
79
  completedGreenCardsCount?: number | null;
82
80
  completedYellowCardsCount?: number | null;
@@ -87,7 +85,7 @@ export interface IUser {
87
85
  }
88
86
  export declare function currentClassYear(createdAtUnix: number, classYear: IClassYear): IClassYear;
89
87
  export declare function currentClassGroup(createdAtUnix: number, classYear: IClassYear): EClassYearGroup;
90
- export interface IUserCompletedQuestions {
88
+ export interface IUserCompletedQuestion {
91
89
  id: Id;
92
90
  createdAt: number | Date;
93
91
  updatedAt: number | Date;
@@ -98,7 +96,7 @@ export interface IUserCompletedQuestions {
98
96
  question: IQuestion;
99
97
  concept: IConcept;
100
98
  }
101
- export interface IUserCompletedCards {
99
+ export interface IUserCompletedCard {
102
100
  id: Id;
103
101
  createdAt: number | Date;
104
102
  updatedAt: number | Date;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.2.45",
3
+ "version": "2.2.48",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -2,7 +2,7 @@ import { ApolloCache, ApolloClient } from '@apollo/client';
2
2
  import { ApolloUpdateOptions, ApolloUpdateResultRestricted } from '../..';
3
3
  import { Id } from '../../../models';
4
4
  import { graphqlNormalize, RestrictedData } from '../../types';
5
- import { EMarksheetAction, EMarksheetState, IMarksheet, IMarksheetMarkJSONB } from './../../../models/Marksheet';
5
+ import { EMarksheetAction, EMarksheetState, IMarksheet, IMarksheetMark, IMarksheetMarkJSONB } from './../../../models/Marksheet';
6
6
  import { IUser, IUserFlaggedQuestion } from './../../../models/User';
7
7
  export interface IPreBuildMarksheet {
8
8
  unseen: number;
@@ -93,6 +93,7 @@ export interface IMarksheetAction {
93
93
  state: EMarksheetState;
94
94
  action?: EMarksheetAction;
95
95
  users?: IUser[];
96
+ activeUsers?: IUser[];
96
97
  }
97
98
  export interface IMarkDataInfo {
98
99
  markId?: Id;
@@ -104,6 +105,7 @@ export interface IMarkDataInfo {
104
105
  timeTaken?: number;
105
106
  mark?: IMarksheetMarkJSONB;
106
107
  isAnswered?: boolean;
108
+ striked?: number[];
107
109
  }
108
110
  export interface IBuildConfigData {
109
111
  numberOfQuestions?: number;
@@ -152,7 +154,7 @@ export declare const optimisticModifyMarksheetBuilderConfig: (marksheetId: numbe
152
154
  source: string;
153
155
  userId: number;
154
156
  user?: IUser | undefined;
155
- marks: import("../../../models").IMarksheetMark[];
157
+ marks: IMarksheetMark[];
156
158
  mockTestId: number | null;
157
159
  correct?: number | undefined;
158
160
  incorrect?: number | undefined;
@@ -161,6 +163,7 @@ export declare const optimisticModifyMarksheetBuilderConfig: (marksheetId: numbe
161
163
  solo: boolean;
162
164
  agoraId: string;
163
165
  users: IUser[];
166
+ activeUsers?: IUser[] | undefined;
164
167
  state: EMarksheetState;
165
168
  completed: boolean;
166
169
  timeTaken: number;
@@ -187,3 +190,15 @@ export interface IEndMarksheetVar {
187
190
  }
188
191
  export declare type IEndMarksheetData = RestrictedData<graphqlNormalize & boolean, 'endMarksheet'>;
189
192
  export declare const END_MARKSHEET: import("@apollo/client").DocumentNode;
193
+ /**
194
+ * toggleStrikeOptions
195
+ */
196
+ export interface IToggleStrikeOptionsVar {
197
+ input: {
198
+ questionId: Id;
199
+ marksheetId: Id;
200
+ striked: number[];
201
+ }[];
202
+ }
203
+ export declare type IToggleStrikeOptionsData = RestrictedData<(graphqlNormalize & IMarksheetMark)[], 'toggleStrikeOptions'>;
204
+ export declare const TOGGLE_STRIKE_OPTIONS: import("@apollo/client").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.END_MARKSHEET = exports.LEAVE_MARKSHEET = exports.MODIFY_MARKSHEET_INFO = exports.optimisticModifyMarksheetBuilderConfig = 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 = exports.BUILD_QUESTION_MARKSHEET = void 0;
3
+ exports.TOGGLE_STRIKE_OPTIONS = exports.END_MARKSHEET = exports.LEAVE_MARKSHEET = exports.MODIFY_MARKSHEET_INFO = exports.optimisticModifyMarksheetBuilderConfig = 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 = exports.BUILD_QUESTION_MARKSHEET = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const restricted_1 = require("../../query/restricted");
6
6
  exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
@@ -604,6 +604,10 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
604
604
  displayName
605
605
  id
606
606
  }
607
+ activeUsers {
608
+ id
609
+ displayName
610
+ }
607
611
  users {
608
612
  id
609
613
  displayName
@@ -615,6 +619,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
615
619
  questionChoiceId
616
620
  marksheetId
617
621
  timeTaken
622
+ striked
618
623
  isAnswered
619
624
  mark
620
625
  question {
@@ -1157,6 +1162,10 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
1157
1162
  unseen
1158
1163
  }
1159
1164
  source
1165
+ activeUsers {
1166
+ id
1167
+ displayName
1168
+ }
1160
1169
  users {
1161
1170
  id
1162
1171
  displayName
@@ -1173,6 +1182,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
1173
1182
  marksheetId
1174
1183
  timeTaken
1175
1184
  isAnswered
1185
+ striked
1176
1186
  mark
1177
1187
  question {
1178
1188
  ... on QuestionSBA {
@@ -1828,6 +1838,10 @@ exports.START_OR_JOIN_MARKSHEET = (0, client_1.gql) `
1828
1838
  id
1829
1839
  displayName
1830
1840
  }
1841
+ activeUsers {
1842
+ id
1843
+ displayName
1844
+ }
1831
1845
  builderConfig {
1832
1846
  difficulty
1833
1847
  isTest
@@ -1858,6 +1872,7 @@ exports.START_OR_JOIN_MARKSHEET = (0, client_1.gql) `
1858
1872
  marksheetId
1859
1873
  timeTaken
1860
1874
  isAnswered
1875
+ striked
1861
1876
  mark
1862
1877
  question {
1863
1878
  ... on QuestionSBA {
@@ -2421,6 +2436,10 @@ exports.MODIFY_MARKSHEET_INFO = (0, client_1.gql) `
2421
2436
  id
2422
2437
  displayName
2423
2438
  }
2439
+ activeUsers {
2440
+ id
2441
+ displayName
2442
+ }
2424
2443
  marks {
2425
2444
  id
2426
2445
  flagged
@@ -2429,6 +2448,7 @@ exports.MODIFY_MARKSHEET_INFO = (0, client_1.gql) `
2429
2448
  marksheetId
2430
2449
  timeTaken
2431
2450
  isAnswered
2451
+ striked
2432
2452
  mark
2433
2453
  question {
2434
2454
  ... on QuestionSBA {
@@ -2954,3 +2974,29 @@ exports.END_MARKSHEET = (0, client_1.gql) `
2954
2974
  }
2955
2975
  }
2956
2976
  `;
2977
+ exports.TOGGLE_STRIKE_OPTIONS = (0, client_1.gql) `
2978
+ mutation ToggleStrikeOptions($input: [ToggleStrikeOptionsInput!]!) {
2979
+ restricted {
2980
+ toggleStrikeOptions(input: $input) {
2981
+ createdAt
2982
+ flagged
2983
+ id
2984
+ index
2985
+ isAnswered
2986
+ mark
2987
+ marksheetId
2988
+ question {
2989
+ id
2990
+ choices {
2991
+ id
2992
+ }
2993
+ }
2994
+ questionChoiceId
2995
+ questionId
2996
+ striked
2997
+ timeTaken
2998
+ updatedAt
2999
+ }
3000
+ }
3001
+ }
3002
+ `;
@@ -2,6 +2,7 @@ import { ApolloCache } from '@apollo/client';
2
2
  import { Id, ITodo } from '../../../models';
3
3
  import { ApolloUpdateOptions, ApolloUpdateResultRestricted } from '../../apollo';
4
4
  import { graphqlNormalize, RestrictedData } from '../../types';
5
+ import { IUserCompletedCard } from './../../../models/User';
5
6
  export declare const BUILD_TODO: import("@apollo/client").DocumentNode;
6
7
  export interface IBuildTodoInput {
7
8
  unseen: number;
@@ -28,13 +29,14 @@ export declare const ADD_TO_DAILY_STACK: import("@apollo/client").DocumentNode;
28
29
  export interface IAddToDailyStackVar {
29
30
  conceptIds: Id[];
30
31
  }
31
- export declare type IAddToDailyStackData = RestrictedData<graphqlNormalize & ITodo, 'addToDailyStack'>;
32
+ export declare type IAddToDailyStackData = RestrictedData<(graphqlNormalize & IUserCompletedCard)[], 'addToDailyStack'>;
32
33
  export declare const REMOVE_FROM_DAILY_STACK: import("@apollo/client").DocumentNode;
33
34
  export interface IRemoveFromDailyStackVar {
34
- cardId: Id;
35
- todoId: Id;
35
+ cardId?: Id;
36
+ todoId?: Id;
37
+ conceptId?: Id;
36
38
  }
37
- export declare type IRemoveFromDailyStackData = RestrictedData<graphqlNormalize & ITodo, 'removeFromDailyStack'>;
39
+ export declare type IRemoveFromDailyStackData = RestrictedData<(graphqlNormalize & IUserCompletedCard)[], 'removeFromDailyStack'>;
38
40
  export declare const REFRESH_DAILY_TASK: import("@apollo/client").DocumentNode;
39
41
  export declare type IRefreshDailyTaskVar = null;
40
42
  export declare type IRefreshDailyTaskData = RestrictedData<graphqlNormalize & ITodo, 'refreshDailyTask'>;
@@ -84,41 +84,41 @@ exports.ADD_TO_DAILY_STACK = (0, client_1.gql) `
84
84
  restricted {
85
85
  addToDailyStack(conceptIds: $conceptIds) {
86
86
  id
87
- dailyTask
88
- marks {
87
+ createdAt
88
+ updatedAt
89
+ concept {
89
90
  id
90
- cardId
91
- card {
92
- id
93
- question
94
- explanation
95
- pictures {
96
- ...PictureFields
97
- }
91
+ name
92
+ }
93
+ lastSeen
94
+ reviewDate
95
+ score
96
+ iteration
97
+ optimalFactor
98
+ card {
99
+ id
100
+ question
101
+ explanation
102
+ pictures {
103
+ ...PictureFields
98
104
  }
99
- score
100
- timeTaken
101
105
  }
102
- source
103
106
  }
104
107
  }
105
108
  }
106
109
  `;
107
110
  exports.REMOVE_FROM_DAILY_STACK = (0, client_1.gql) `
108
- mutation RemoveFromDailyStack($cardId: Int!, $todoId: Int!) {
111
+ mutation RemoveFromDailyStack($cardId: Int, $todoId: Int, $conceptId: Int) {
109
112
  restricted {
110
- removeFromDailyStack(cardId: $cardId, todoId: $todoId) {
113
+ removeFromDailyStack(
114
+ cardId: $cardId
115
+ todoId: $todoId
116
+ conceptId: $conceptId
117
+ ) {
111
118
  id
112
- dailyTask
113
- source
114
- marks {
115
- cardId
116
- score
117
- timeTaken
118
- card {
119
- question
120
- explanation
121
- }
119
+ concept {
120
+ id
121
+ name
122
122
  }
123
123
  }
124
124
  }
@@ -25,6 +25,10 @@ exports.MARKSHEET = (0, client_1.gql) `
25
25
  id
26
26
  displayName
27
27
  }
28
+ activeUsers {
29
+ id
30
+ displayName
31
+ }
28
32
  builderConfig {
29
33
  difficulty
30
34
  isTest
@@ -55,6 +59,7 @@ exports.MARKSHEET = (0, client_1.gql) `
55
59
  marksheetId
56
60
  timeTaken
57
61
  isAnswered
62
+ striked
58
63
  mark
59
64
  question {
60
65
  ... on QuestionSBA {
@@ -565,6 +570,7 @@ exports.MARKSHEETS = (0, client_1.gql) `
565
570
  marksheets(filter: $filter) {
566
571
  results {
567
572
  id
573
+ endedAt
568
574
  topicNames
569
575
  correct
570
576
  incorrect
@@ -15,7 +15,6 @@ exports.DASHBOARD_QBANK = (0, client_1.gql) `
15
15
  completedIncorrectQuestionsCount
16
16
  completedCards {
17
17
  id
18
- conceptId
19
18
  concept {
20
19
  id
21
20
  }
@@ -32,7 +32,6 @@ exports.USER_COMPLETED_DATA = (0, client_1.gql) `
32
32
  displayName
33
33
  completedCards {
34
34
  id
35
- conceptId
36
35
  concept {
37
36
  id
38
37
  }
@@ -26,6 +26,7 @@ export interface IMarksheetActionInfo {
26
26
  endedAt: Date | null;
27
27
  action: EMarksheetAction;
28
28
  users: IUser[];
29
+ activeUsers: IUser[];
29
30
  }
30
31
  export declare type IOnMarksheetActionChangeData = RootData<IMarksheetActionInfo, 'onMarksheetActionInfoChange'>;
31
32
  export declare const ON_MARKSHEET_ACTION_INFO_CHANGE_KEY = "ON_MARKSHEET_ACTION_INFO_CHANGE";
@@ -65,6 +66,7 @@ export interface IMarksheetDataModification {
65
66
  timeTaken?: number;
66
67
  updatedAt?: Date;
67
68
  user: IUser;
69
+ striked?: number[];
68
70
  }
69
71
  export declare type IOnMarksheetDataModificationData = RootData<IMarksheetDataModification, 'onMarksheetDataModification'>;
70
72
  export declare const ON_MARKSHEET_DATA_MODIFICATION_KEY = "ON_MARKSHEET_DATA_MODIFICATION";
@@ -17,6 +17,10 @@ exports.ON_MARKSHEET_ACTION_INFO_CHANGE = (0, client_1.gql) `
17
17
  id
18
18
  displayName
19
19
  }
20
+ activeUsers {
21
+ id
22
+ displayName
23
+ }
20
24
  startedAt
21
25
  endedAt
22
26
  state
@@ -61,6 +65,7 @@ exports.ON_MARKSHEET_DATA_MODIFICATION = (0, client_1.gql) `
61
65
  updatedAt
62
66
  marksheetId
63
67
  questionId
68
+ striked
64
69
  markIndex
65
70
  mark
66
71
  questionChoiceId