@quesmed/types-rn 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.
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:
|
|
73
|
+
completedQuestions: IUserCompletedQuestion[];
|
|
76
74
|
completedQuestionsCount?: number | null;
|
|
77
75
|
completedCorrectQuestionsCount?: number | null;
|
|
78
76
|
completedIncorrectQuestionsCount?: number | null;
|
|
79
|
-
completedCards:
|
|
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
|
|
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
|
|
99
|
+
export interface IUserCompletedCard {
|
|
102
100
|
id: Id;
|
|
103
101
|
createdAt: number | Date;
|
|
104
102
|
updatedAt: number | Date;
|
package/package.json
CHANGED
|
@@ -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 &
|
|
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
|
|
35
|
-
todoId
|
|
35
|
+
cardId?: Id;
|
|
36
|
+
todoId?: Id;
|
|
37
|
+
conceptId?: Id;
|
|
36
38
|
}
|
|
37
|
-
export declare type IRemoveFromDailyStackData = RestrictedData<graphqlNormalize &
|
|
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
|
-
|
|
88
|
-
|
|
87
|
+
createdAt
|
|
88
|
+
updatedAt
|
|
89
|
+
concept {
|
|
89
90
|
id
|
|
90
|
-
|
|
91
|
-
|
|
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
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
|
121
|
+
mutation RemoveFromDailyStack($cardId: Int, $todoId: Int, $conceptId: Int) {
|
|
109
122
|
restricted {
|
|
110
|
-
removeFromDailyStack(
|
|
123
|
+
removeFromDailyStack(
|
|
124
|
+
cardId: $cardId
|
|
125
|
+
todoId: $todoId
|
|
126
|
+
conceptId: $conceptId
|
|
127
|
+
) {
|
|
111
128
|
id
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|