@quesmed/types 2.2.47 → 2.2.50

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.
@@ -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;
@@ -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,51 @@ 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 {
91
+ name
92
+ }
93
+ lastSeen
94
+ reviewDate
95
+ score
96
+ iteration
97
+ optimalFactor
98
+ cardId
99
+ card {
100
+ id
101
+ conceptId
102
+ concept {
92
103
  id
93
- question
94
- explanation
95
- pictures {
96
- ...PictureFields
97
- }
104
+ name
105
+ }
106
+ topic {
107
+ id
108
+ name
109
+ }
110
+ question
111
+ explanation
112
+ pictures {
113
+ ...PictureFields
98
114
  }
99
- score
100
- timeTaken
101
115
  }
102
- source
103
116
  }
104
117
  }
105
118
  }
106
119
  `;
107
120
  exports.REMOVE_FROM_DAILY_STACK = (0, client_1.gql) `
108
- mutation RemoveFromDailyStack($cardId: Int!, $todoId: Int!) {
121
+ mutation RemoveFromDailyStack($cardId: Int, $todoId: Int, $conceptId: Int) {
109
122
  restricted {
110
- removeFromDailyStack(cardId: $cardId, todoId: $todoId) {
123
+ removeFromDailyStack(
124
+ cardId: $cardId
125
+ todoId: $todoId
126
+ conceptId: $conceptId
127
+ ) {
111
128
  id
112
- dailyTask
113
- source
114
- marks {
115
- cardId
116
- score
117
- timeTaken
118
- card {
119
- question
120
- explanation
121
- }
129
+ concept {
130
+ id
131
+ name
122
132
  }
123
133
  }
124
134
  }
@@ -2,7 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DASHBOARD_QBANK = void 0;
4
4
  const client_1 = require("@apollo/client");
5
+ const fragments_1 = require("../../fragments");
5
6
  exports.DASHBOARD_QBANK = (0, client_1.gql) `
7
+ ${fragments_1.PICTURE_FIELDS}
6
8
  query Dashboard($filter: MarksheetFilterInput!) {
7
9
  restricted {
8
10
  latestPastMarksheetId
@@ -15,9 +17,34 @@ exports.DASHBOARD_QBANK = (0, client_1.gql) `
15
17
  completedIncorrectQuestionsCount
16
18
  completedCards {
17
19
  id
18
- conceptId
20
+ createdAt
21
+ updatedAt
19
22
  concept {
20
23
  id
24
+ name
25
+ }
26
+ lastSeen
27
+ reviewDate
28
+ score
29
+ iteration
30
+ optimalFactor
31
+ cardId
32
+ card {
33
+ id
34
+ conceptId
35
+ concept {
36
+ id
37
+ name
38
+ }
39
+ topic {
40
+ id
41
+ name
42
+ }
43
+ question
44
+ explanation
45
+ pictures {
46
+ ...PictureFields
47
+ }
21
48
  }
22
49
  }
23
50
  completedCardsCount
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.USER_COMPLETED_DATA = exports.REFERRALS = exports.USER = void 0;
4
4
  const client_1 = require("@apollo/client");
5
+ const fragments_1 = require("../../fragments");
5
6
  const user_1 = require("../../fragments/user");
6
7
  exports.USER = (0, client_1.gql) `
7
8
  ${user_1.USER_FIELDS}
@@ -25,16 +26,40 @@ exports.REFERRALS = (0, client_1.gql) `
25
26
  }
26
27
  `;
27
28
  exports.USER_COMPLETED_DATA = (0, client_1.gql) `
29
+ ${fragments_1.PICTURE_FIELDS}
28
30
  query CompletedQuestionCards {
29
31
  restricted {
30
32
  user {
31
- id
32
- displayName
33
33
  completedCards {
34
34
  id
35
- conceptId
35
+ createdAt
36
+ updatedAt
36
37
  concept {
37
38
  id
39
+ name
40
+ }
41
+ lastSeen
42
+ reviewDate
43
+ score
44
+ iteration
45
+ optimalFactor
46
+ cardId
47
+ card {
48
+ id
49
+ conceptId
50
+ concept {
51
+ id
52
+ name
53
+ }
54
+ topic {
55
+ id
56
+ name
57
+ }
58
+ question
59
+ explanation
60
+ pictures {
61
+ ...PictureFields
62
+ }
38
63
  }
39
64
  }
40
65
  completedCardsCount
@@ -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;
@@ -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'>;
@@ -80,41 +80,51 @@ export const ADD_TO_DAILY_STACK = gql `
80
80
  restricted {
81
81
  addToDailyStack(conceptIds: $conceptIds) {
82
82
  id
83
- dailyTask
84
- marks {
83
+ createdAt
84
+ updatedAt
85
+ concept {
85
86
  id
86
- cardId
87
- card {
87
+ name
88
+ }
89
+ lastSeen
90
+ reviewDate
91
+ score
92
+ iteration
93
+ optimalFactor
94
+ cardId
95
+ card {
96
+ id
97
+ conceptId
98
+ concept {
88
99
  id
89
- question
90
- explanation
91
- pictures {
92
- ...PictureFields
93
- }
100
+ name
101
+ }
102
+ topic {
103
+ id
104
+ name
105
+ }
106
+ question
107
+ explanation
108
+ pictures {
109
+ ...PictureFields
94
110
  }
95
- score
96
- timeTaken
97
111
  }
98
- source
99
112
  }
100
113
  }
101
114
  }
102
115
  `;
103
116
  export const REMOVE_FROM_DAILY_STACK = gql `
104
- mutation RemoveFromDailyStack($cardId: Int!, $todoId: Int!) {
117
+ mutation RemoveFromDailyStack($cardId: Int, $todoId: Int, $conceptId: Int) {
105
118
  restricted {
106
- removeFromDailyStack(cardId: $cardId, todoId: $todoId) {
119
+ removeFromDailyStack(
120
+ cardId: $cardId
121
+ todoId: $todoId
122
+ conceptId: $conceptId
123
+ ) {
107
124
  id
108
- dailyTask
109
- source
110
- marks {
111
- cardId
112
- score
113
- timeTaken
114
- card {
115
- question
116
- explanation
117
- }
125
+ concept {
126
+ id
127
+ name
118
128
  }
119
129
  }
120
130
  }
@@ -1,5 +1,7 @@
1
1
  import { gql } from '@apollo/client';
2
+ import { PICTURE_FIELDS } from '../../fragments';
2
3
  export const DASHBOARD_QBANK = gql `
4
+ ${PICTURE_FIELDS}
3
5
  query Dashboard($filter: MarksheetFilterInput!) {
4
6
  restricted {
5
7
  latestPastMarksheetId
@@ -12,9 +14,34 @@ export const DASHBOARD_QBANK = gql `
12
14
  completedIncorrectQuestionsCount
13
15
  completedCards {
14
16
  id
15
- conceptId
17
+ createdAt
18
+ updatedAt
16
19
  concept {
17
20
  id
21
+ name
22
+ }
23
+ lastSeen
24
+ reviewDate
25
+ score
26
+ iteration
27
+ optimalFactor
28
+ cardId
29
+ card {
30
+ id
31
+ conceptId
32
+ concept {
33
+ id
34
+ name
35
+ }
36
+ topic {
37
+ id
38
+ name
39
+ }
40
+ question
41
+ explanation
42
+ pictures {
43
+ ...PictureFields
44
+ }
18
45
  }
19
46
  }
20
47
  completedCardsCount
@@ -1,4 +1,5 @@
1
1
  import { gql } from '@apollo/client';
2
+ import { PICTURE_FIELDS } from '../../fragments';
2
3
  import { USER_FIELDS } from '../../fragments/user';
3
4
  export const USER = gql `
4
5
  ${USER_FIELDS}
@@ -22,16 +23,40 @@ export const REFERRALS = gql `
22
23
  }
23
24
  `;
24
25
  export const USER_COMPLETED_DATA = gql `
26
+ ${PICTURE_FIELDS}
25
27
  query CompletedQuestionCards {
26
28
  restricted {
27
29
  user {
28
- id
29
- displayName
30
30
  completedCards {
31
31
  id
32
- conceptId
32
+ createdAt
33
+ updatedAt
33
34
  concept {
34
35
  id
36
+ name
37
+ }
38
+ lastSeen
39
+ reviewDate
40
+ score
41
+ iteration
42
+ optimalFactor
43
+ cardId
44
+ card {
45
+ id
46
+ conceptId
47
+ concept {
48
+ id
49
+ name
50
+ }
51
+ topic {
52
+ id
53
+ name
54
+ }
55
+ question
56
+ explanation
57
+ pictures {
58
+ ...PictureFields
59
+ }
35
60
  }
36
61
  }
37
62
  completedCardsCount
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.2.47",
3
+ "version": "2.2.50",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",