@quesmed/types 2.2.47 → 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.
@@ -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,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
  }
@@ -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
  }
@@ -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,41 @@ 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 {
88
- id
89
- question
90
- explanation
91
- pictures {
92
- ...PictureFields
93
- }
87
+ name
88
+ }
89
+ lastSeen
90
+ reviewDate
91
+ score
92
+ iteration
93
+ optimalFactor
94
+ card {
95
+ id
96
+ question
97
+ explanation
98
+ pictures {
99
+ ...PictureFields
94
100
  }
95
- score
96
- timeTaken
97
101
  }
98
- source
99
102
  }
100
103
  }
101
104
  }
102
105
  `;
103
106
  export const REMOVE_FROM_DAILY_STACK = gql `
104
- mutation RemoveFromDailyStack($cardId: Int!, $todoId: Int!) {
107
+ mutation RemoveFromDailyStack($cardId: Int, $todoId: Int, $conceptId: Int) {
105
108
  restricted {
106
- removeFromDailyStack(cardId: $cardId, todoId: $todoId) {
109
+ removeFromDailyStack(
110
+ cardId: $cardId
111
+ todoId: $todoId
112
+ conceptId: $conceptId
113
+ ) {
107
114
  id
108
- dailyTask
109
- source
110
- marks {
111
- cardId
112
- score
113
- timeTaken
114
- card {
115
- question
116
- explanation
117
- }
115
+ concept {
116
+ id
117
+ name
118
118
  }
119
119
  }
120
120
  }
@@ -12,7 +12,6 @@ export const DASHBOARD_QBANK = gql `
12
12
  completedIncorrectQuestionsCount
13
13
  completedCards {
14
14
  id
15
- conceptId
16
15
  concept {
17
16
  id
18
17
  }
@@ -29,7 +29,6 @@ export const USER_COMPLETED_DATA = gql `
29
29
  displayName
30
30
  completedCards {
31
31
  id
32
- conceptId
33
32
  concept {
34
33
  id
35
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.2.47",
3
+ "version": "2.2.48",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",