@quesmed/types-rn 2.0.16 → 2.1.0
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/gql_input_output_types/index.d.ts +2 -2
- package/models/Question.d.ts +3 -0
- package/models/Type.d.ts +1 -0
- package/package.json +3 -3
- package/resolvers/apollo.d.ts +1 -3
- package/resolvers/fragments/chapter.js +14 -3
- package/resolvers/fragments/index.d.ts +2 -0
- package/resolvers/fragments/index.js +2 -0
- package/resolvers/fragments/marksheet.d.ts +1 -0
- package/resolvers/fragments/marksheet.js +109 -0
- package/resolvers/fragments/mockTest.d.ts +1 -0
- package/resolvers/fragments/mockTest.js +16 -0
- package/resolvers/fragments/osce.js +1 -0
- package/resolvers/fragments/topic.d.ts +1 -0
- package/resolvers/fragments/topic.js +18 -0
- package/resolvers/fragments/user.js +3 -3
- package/resolvers/mutation/admin/algoliaSync.d.ts +4 -0
- package/resolvers/mutation/admin/algoliaSync.js +30 -0
- package/resolvers/mutation/admin/token.d.ts +2 -0
- package/resolvers/mutation/admin/token.js +16 -0
- package/resolvers/mutation/restricted/contactUs.d.ts +1 -0
- package/resolvers/mutation/restricted/contactUs.js +13 -0
- package/resolvers/mutation/restricted/marksheet.d.ts +5 -0
- package/resolvers/mutation/restricted/marksheet.js +92 -0
- package/resolvers/mutation/restricted/mockTest.d.ts +3 -0
- package/resolvers/mutation/restricted/mockTest.js +29 -0
- package/resolvers/mutation/restricted/questionDiscussion.d.ts +5 -1
- package/resolvers/mutation/restricted/questionDiscussion.js +152 -0
- package/resolvers/mutation/restricted/todo.d.ts +8 -0
- package/resolvers/mutation/restricted/todo.js +150 -0
- package/resolvers/mutation/restricted/token.d.ts +2 -0
- package/resolvers/mutation/restricted/token.js +19 -0
- package/resolvers/mutation/restricted/users.d.ts +3 -0
- package/resolvers/mutation/restricted/users.js +24 -1
- package/resolvers/mutation/restricted/video.d.ts +1 -0
- package/resolvers/mutation/restricted/video.js +13 -0
- package/resolvers/mutation/stripe.d.ts +2 -0
- package/resolvers/mutation/stripe.js +12 -0
- package/resolvers/mutation/users.d.ts +4 -0
- package/resolvers/mutation/users.js +22 -0
- package/resolvers/mutation/validUserToken/user.d.ts +2 -0
- package/resolvers/mutation/validUserToken/user.js +16 -0
- package/resolvers/query/admin/getUserToken.d.ts +1 -0
- package/resolvers/query/admin/getUserToken.js +9 -0
- package/resolvers/query/author.d.ts +1 -0
- package/resolvers/query/author.js +16 -0
- package/resolvers/query/book.d.ts +3 -1
- package/resolvers/query/book.js +42 -0
- package/resolvers/query/feedback.d.ts +2 -0
- package/resolvers/query/feedback.js +12 -0
- package/resolvers/query/restricted/global.d.ts +2 -0
- package/resolvers/query/restricted/global.js +16 -0
- package/resolvers/query/restricted/index.d.ts +1 -0
- package/resolvers/query/restricted/index.js +1 -0
- package/resolvers/query/restricted/marksheet.d.ts +6 -0
- package/resolvers/query/restricted/marksheet.js +996 -0
- package/resolvers/query/restricted/mockTests.d.ts +2 -0
- package/resolvers/query/restricted/mockTests.js +23 -0
- package/resolvers/query/restricted/osce.js +2 -2
- package/resolvers/query/restricted/qBank.d.ts +18 -0
- package/resolvers/query/restricted/qBank.js +77 -0
- package/resolvers/query/restricted/quesBook.d.ts +2 -1
- package/resolvers/query/restricted/quesBook.js +39 -1
- package/resolvers/query/restricted/replication.d.ts +2 -3
- package/resolvers/query/restricted/todos.d.ts +3 -1
- package/resolvers/query/restricted/todos.js +63 -0
- package/resolvers/query/restricted/topics.d.ts +2 -0
- package/resolvers/query/restricted/topics.js +38 -0
- package/resolvers/query/restricted/university.d.ts +1 -0
- package/resolvers/query/restricted/university.js +23 -0
- package/resolvers/query/restricted/user.d.ts +2 -2
- package/resolvers/query/restricted/user.js +24 -0
- package/resolvers/query/restricted/video.d.ts +5 -3
- package/resolvers/query/restricted/video.js +98 -0
- package/resolvers/query/sample.js +4 -0
- package/resolvers/query/subscription.d.ts +1 -0
- package/resolvers/query/subscription.js +18 -0
- package/resolvers/query/university.d.ts +1 -0
- package/resolvers/query/university.js +10 -0
- package/resolvers/query/user.d.ts +2 -0
- package/resolvers/query/user.js +12 -0
- package/resolvers/query/video.d.ts +4 -1
- package/resolvers/query/video.js +99 -0
package/models/Question.d.ts
CHANGED
|
@@ -44,6 +44,9 @@ export declare type IQuestionAnswer = string | [string] | [IQuestionQAAnswer] |
|
|
|
44
44
|
export declare type IQuestionAll = IQuestion | IQuestionSBA | IQuestionQA | IQuestionMultiQ | IQuestionPrescribe;
|
|
45
45
|
export interface IQuestion {
|
|
46
46
|
id: Id;
|
|
47
|
+
createdAt: Date | number;
|
|
48
|
+
updatedAt: Date | number;
|
|
49
|
+
deleted: Boolean;
|
|
47
50
|
typeId: Id;
|
|
48
51
|
conceptId: Id;
|
|
49
52
|
public: boolean;
|
package/models/Type.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quesmed/types-rn",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Typescript types for Quesmed",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"quesmed",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@apollo/client": "^3.5.7",
|
|
24
24
|
"@react-native-async-storage/async-storage": "^1.15.16",
|
|
25
|
-
"@types/react-native": "^0.
|
|
25
|
+
"@types/react-native": "^0.64",
|
|
26
26
|
"localforage": "^1.10.0",
|
|
27
|
-
"react-native": "
|
|
27
|
+
"react-native": "0.64.0",
|
|
28
28
|
"react-native-expo-image-cache": "^4.1.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
package/resolvers/apollo.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { DefaultContext, FetchResult } from '@apollo/client';
|
|
2
|
-
export declare type ApolloUpdateResultRestricted<T> = Omit<FetchResult<
|
|
3
|
-
restricted: T;
|
|
4
|
-
}>, 'context'>;
|
|
2
|
+
export declare type ApolloUpdateResultRestricted<T> = Omit<FetchResult<T>, 'context'>;
|
|
5
3
|
export interface ApolloUpdateOptions {
|
|
6
4
|
context?: DefaultContext;
|
|
7
5
|
variables?: Record<string, any>;
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CHAPTER_FIELDS = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
|
-
const picture_1 = require("./picture");
|
|
6
5
|
exports.CHAPTER_FIELDS = (0, client_1.gql) `
|
|
7
|
-
${picture_1.PICTURE_FIELDS}
|
|
8
6
|
fragment ChapterFields on Chapter {
|
|
9
7
|
id
|
|
10
8
|
createdAt
|
|
@@ -12,7 +10,20 @@ exports.CHAPTER_FIELDS = (0, client_1.gql) `
|
|
|
12
10
|
explanation
|
|
13
11
|
typeId
|
|
14
12
|
pictures {
|
|
15
|
-
|
|
13
|
+
id
|
|
14
|
+
createdAt
|
|
15
|
+
updatedAt
|
|
16
|
+
name
|
|
17
|
+
caption
|
|
18
|
+
path
|
|
19
|
+
path512
|
|
20
|
+
path256
|
|
21
|
+
topicId
|
|
22
|
+
topic {
|
|
23
|
+
id
|
|
24
|
+
name
|
|
25
|
+
typeId
|
|
26
|
+
}
|
|
16
27
|
}
|
|
17
28
|
files {
|
|
18
29
|
id
|
|
@@ -13,7 +13,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
13
13
|
__exportStar(require("./blog"), exports);
|
|
14
14
|
__exportStar(require("./chapter"), exports);
|
|
15
15
|
__exportStar(require("./concept"), exports);
|
|
16
|
+
__exportStar(require("./mockTest"), exports);
|
|
16
17
|
__exportStar(require("./osce"), exports);
|
|
17
18
|
__exportStar(require("./picture"), exports);
|
|
19
|
+
__exportStar(require("./topic"), exports);
|
|
18
20
|
__exportStar(require("./user"), exports);
|
|
19
21
|
__exportStar(require("./video"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MARKSHEET_MARK_FIELDS: import("@apollo/client").DocumentNode;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MARKSHEET_MARK_FIELDS = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
exports.MARKSHEET_MARK_FIELDS = (0, client_1.gql) `
|
|
6
|
+
fragment MarksheetMarkFields on MarksheetMark {
|
|
7
|
+
id
|
|
8
|
+
createdAt
|
|
9
|
+
updatedAt
|
|
10
|
+
index
|
|
11
|
+
marksheetId
|
|
12
|
+
questionChoiceId
|
|
13
|
+
timeTaken
|
|
14
|
+
flagged
|
|
15
|
+
questionId
|
|
16
|
+
question {
|
|
17
|
+
conceptId
|
|
18
|
+
difficulty
|
|
19
|
+
dislikes
|
|
20
|
+
explanation
|
|
21
|
+
id
|
|
22
|
+
isLikedByMe
|
|
23
|
+
likes
|
|
24
|
+
question
|
|
25
|
+
totalVotes
|
|
26
|
+
typeId
|
|
27
|
+
choices {
|
|
28
|
+
id
|
|
29
|
+
explanation
|
|
30
|
+
name
|
|
31
|
+
label
|
|
32
|
+
answer
|
|
33
|
+
votes
|
|
34
|
+
}
|
|
35
|
+
comments {
|
|
36
|
+
id
|
|
37
|
+
userId
|
|
38
|
+
createdAt
|
|
39
|
+
comment
|
|
40
|
+
likes
|
|
41
|
+
user {
|
|
42
|
+
id
|
|
43
|
+
displayName
|
|
44
|
+
}
|
|
45
|
+
dislikes
|
|
46
|
+
isLikedByMe
|
|
47
|
+
questionId
|
|
48
|
+
replies {
|
|
49
|
+
id
|
|
50
|
+
userId
|
|
51
|
+
createdAt
|
|
52
|
+
comment
|
|
53
|
+
user {
|
|
54
|
+
id
|
|
55
|
+
displayName
|
|
56
|
+
}
|
|
57
|
+
likes
|
|
58
|
+
dislikes
|
|
59
|
+
isLikedByMe
|
|
60
|
+
questionId
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
concept {
|
|
64
|
+
id
|
|
65
|
+
name
|
|
66
|
+
chapter {
|
|
67
|
+
id
|
|
68
|
+
explanation
|
|
69
|
+
}
|
|
70
|
+
videos {
|
|
71
|
+
id
|
|
72
|
+
title
|
|
73
|
+
museId
|
|
74
|
+
startTime
|
|
75
|
+
endTime
|
|
76
|
+
thumbnail
|
|
77
|
+
concepts {
|
|
78
|
+
id
|
|
79
|
+
name
|
|
80
|
+
}
|
|
81
|
+
live
|
|
82
|
+
description
|
|
83
|
+
duration
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
pictures {
|
|
87
|
+
id
|
|
88
|
+
createdAt
|
|
89
|
+
updatedAt
|
|
90
|
+
name
|
|
91
|
+
caption
|
|
92
|
+
path
|
|
93
|
+
path512
|
|
94
|
+
path256
|
|
95
|
+
topicId
|
|
96
|
+
topic {
|
|
97
|
+
id
|
|
98
|
+
name
|
|
99
|
+
typeId
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
difficulty
|
|
103
|
+
psaSectionId
|
|
104
|
+
likes
|
|
105
|
+
dislikes
|
|
106
|
+
}
|
|
107
|
+
mark
|
|
108
|
+
}
|
|
109
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MOCK_TEST_FIELDS: import("@apollo/client").DocumentNode;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MOCK_TEST_FIELDS = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
exports.MOCK_TEST_FIELDS = (0, client_1.gql) `
|
|
6
|
+
fragment MockTestFields on MockTest {
|
|
7
|
+
id
|
|
8
|
+
title
|
|
9
|
+
correct
|
|
10
|
+
incorrect
|
|
11
|
+
totalQuestions
|
|
12
|
+
lastMarksheetEndedAt
|
|
13
|
+
lastMarksheetStartedAt
|
|
14
|
+
lastMarksheetId
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TOPIC_FIELDS: import("@apollo/client").DocumentNode;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOPIC_FIELDS = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
exports.TOPIC_FIELDS = (0, client_1.gql) `
|
|
6
|
+
fragment TopicFields on Topic {
|
|
7
|
+
id
|
|
8
|
+
name
|
|
9
|
+
totalQuestions
|
|
10
|
+
correctQuestions
|
|
11
|
+
incorrectQuestions
|
|
12
|
+
totalCards
|
|
13
|
+
greenCards
|
|
14
|
+
yellowCards
|
|
15
|
+
redCards
|
|
16
|
+
dailyFeedCards
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
@@ -7,6 +7,7 @@ exports.USER_FIELDS = (0, client_1.gql) `
|
|
|
7
7
|
id
|
|
8
8
|
createdAt
|
|
9
9
|
updatedAt
|
|
10
|
+
displayName
|
|
10
11
|
username
|
|
11
12
|
firstName
|
|
12
13
|
lastName
|
|
@@ -14,6 +15,8 @@ exports.USER_FIELDS = (0, client_1.gql) `
|
|
|
14
15
|
graduationYear
|
|
15
16
|
universityId
|
|
16
17
|
examDate
|
|
18
|
+
dailyFeedResetTime
|
|
19
|
+
dailyFeedMax
|
|
17
20
|
stripeCustomerId
|
|
18
21
|
stripeQBankSubscriptionId
|
|
19
22
|
stripeQBankSubscriptionEndDate
|
|
@@ -21,9 +24,6 @@ exports.USER_FIELDS = (0, client_1.gql) `
|
|
|
21
24
|
stripeOsceSubscriptionEndDate
|
|
22
25
|
stripeBundleSubscriptionId
|
|
23
26
|
stripeBundleSubscriptionEndDate
|
|
24
|
-
# TODO: Remove this from backwards compatibility
|
|
25
|
-
stripePriceNickname
|
|
26
|
-
stripeSubscriptionEndDate
|
|
27
27
|
|
|
28
28
|
# user-specific keys
|
|
29
29
|
# marksheets
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { AdminData } from '../../types';
|
|
2
|
+
export declare const UPDATE_CARDS_DATA_IN_ALGOLIA: import("@apollo/client").DocumentNode;
|
|
2
3
|
export declare type IUpdateCardsDataInAlgoliaVar = void;
|
|
3
4
|
export declare type IUpdateCardsDataInAlgoliaData = AdminData<string, 'updateCardsDataInAlgolia'>;
|
|
5
|
+
export declare const UPDATE_QUESTIONS_DATA_IN_ALGOLIA: import("@apollo/client").DocumentNode;
|
|
4
6
|
export declare type IUpdateQuestionsDataInAlgoliaVar = void;
|
|
5
7
|
export declare type IUpdateQuestionsDataInAlgoliaData = AdminData<string, 'updateQuestionsDataInAlgolia'>;
|
|
8
|
+
export declare const UPDATE_QUES_BOOK_DATA_IN_ALGOLIA: import("@apollo/client").DocumentNode;
|
|
6
9
|
export declare type IUpdateQuesBookDataInAlgoliaVar = void;
|
|
7
10
|
export declare type IUpdateQuesBookDataInAlgoliaData = AdminData<string, 'updateDataInAlgolia'>;
|
|
11
|
+
export declare const UPDATE_VIDEO_DATA_IN_ALGOLIA: import("@apollo/client").DocumentNode;
|
|
8
12
|
export declare type IUpdateVideoDataInAlgoliaVar = void;
|
|
9
13
|
export declare type IUpdateVideoDataInAlgoliaData = AdminData<string, 'updateVideoDataInAlgolia'>;
|
|
@@ -1,2 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UPDATE_VIDEO_DATA_IN_ALGOLIA = exports.UPDATE_QUES_BOOK_DATA_IN_ALGOLIA = exports.UPDATE_QUESTIONS_DATA_IN_ALGOLIA = exports.UPDATE_CARDS_DATA_IN_ALGOLIA = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
exports.UPDATE_CARDS_DATA_IN_ALGOLIA = (0, client_1.gql) `
|
|
6
|
+
mutation UpdateCardsDataInAlgolia {
|
|
7
|
+
admin {
|
|
8
|
+
updateCardsDataInAlgolia
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
exports.UPDATE_QUESTIONS_DATA_IN_ALGOLIA = (0, client_1.gql) `
|
|
13
|
+
mutation UpdateQuestionsDataInAlgolia {
|
|
14
|
+
admin {
|
|
15
|
+
updateQuestionsDataInAlgolia
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
exports.UPDATE_QUES_BOOK_DATA_IN_ALGOLIA = (0, client_1.gql) `
|
|
20
|
+
mutation UpdateQuesBookDataInAlgolia {
|
|
21
|
+
admin {
|
|
22
|
+
updateQuesBookDataInAlgolia
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
exports.UPDATE_VIDEO_DATA_IN_ALGOLIA = (0, client_1.gql) `
|
|
27
|
+
mutation UpdateVideoDataInAlgolia {
|
|
28
|
+
admin {
|
|
29
|
+
updateVideoDataInAlgolia
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
@@ -14,10 +14,12 @@ export interface ISendPushNotificationInput extends IFCMNotification {
|
|
|
14
14
|
export interface ISendTopicNotificationInput extends ISendPushNotificationInput {
|
|
15
15
|
topic: 'global' | 'qbank' | 'osce';
|
|
16
16
|
}
|
|
17
|
+
export declare const SEND_PUSH_NOTIFICATION: import("@apollo/client").DocumentNode;
|
|
17
18
|
export interface ISendPushNotificationVar {
|
|
18
19
|
data: ISendPushNotificationInput;
|
|
19
20
|
}
|
|
20
21
|
export declare type ISendPushNotificationData = AdminData<string, 'sendPushNotification'>;
|
|
22
|
+
export declare const SEND_TOPIC_NOTIFICATION: import("@apollo/client").DocumentNode;
|
|
21
23
|
export interface ISendTopicNotificationVar {
|
|
22
24
|
data: ISendTopicNotificationInput;
|
|
23
25
|
topic: string;
|
|
@@ -1,2 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SEND_TOPIC_NOTIFICATION = exports.SEND_PUSH_NOTIFICATION = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
exports.SEND_PUSH_NOTIFICATION = (0, client_1.gql) `
|
|
6
|
+
mutation SendPushNotification($data: FCMInput!) {
|
|
7
|
+
admin {
|
|
8
|
+
sendPushNotification(data: $data)
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
exports.SEND_TOPIC_NOTIFICATION = (0, client_1.gql) `
|
|
13
|
+
mutation sendTopicNotification($data: FCMInput!, $topic: String!) {
|
|
14
|
+
admin {
|
|
15
|
+
sendTopicNotification(data: $data, topic: $topic)
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONTACT_US = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
exports.CONTACT_US = (0, client_1.gql) `
|
|
6
|
+
mutation ContactUs(
|
|
7
|
+
$slack: SupportTicket!
|
|
8
|
+
$subject: String!
|
|
9
|
+
$message: String!
|
|
10
|
+
) {
|
|
11
|
+
restricted {
|
|
12
|
+
contactUs(slack: $slack, subject: $subject, message: $message)
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
@@ -8,6 +8,7 @@ export interface IPreBuildMarksheet {
|
|
|
8
8
|
seenIncorrect: number;
|
|
9
9
|
buildRef: number;
|
|
10
10
|
}
|
|
11
|
+
export declare const BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
11
12
|
export interface IBuildMarksheetInput extends IPreBuildMarksheet {
|
|
12
13
|
isTest: boolean;
|
|
13
14
|
}
|
|
@@ -15,6 +16,7 @@ export interface IBuildMarksheetVar {
|
|
|
15
16
|
buildMarksheet: IBuildMarksheetInput;
|
|
16
17
|
}
|
|
17
18
|
export declare type IBuildMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'buildMarksheet'>;
|
|
19
|
+
export declare const RE_BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
18
20
|
export interface IReBuildMarksheetVar {
|
|
19
21
|
marksheetId: number;
|
|
20
22
|
}
|
|
@@ -26,15 +28,18 @@ export interface IMarksheetInput {
|
|
|
26
28
|
mark?: string;
|
|
27
29
|
timeTaken: number;
|
|
28
30
|
}
|
|
31
|
+
export declare const SAVE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
29
32
|
export interface ISaveMarksheetsVar {
|
|
30
33
|
marksheetInput: IMarksheetInput[];
|
|
31
34
|
}
|
|
32
35
|
export declare type ISaveMarksheetsData = RestrictedData<(graphqlNormalize & IMarksheet)[], 'saveMarksheets'>;
|
|
36
|
+
export declare const ADD_FLAGGED_QUESTION: import("@apollo/client").DocumentNode;
|
|
33
37
|
export interface IAddFlaggedQuestionVar {
|
|
34
38
|
markId: number;
|
|
35
39
|
questionId: number;
|
|
36
40
|
}
|
|
37
41
|
export declare type IAddFlaggedQuestionData = RestrictedData<graphqlNormalize & IUserFlaggedQuestion, 'addFlaggedQuestion'>;
|
|
42
|
+
export declare const REMOVE_FLAGGED_QUESTION: import("@apollo/client").DocumentNode;
|
|
38
43
|
export interface IRemoveFlaggedQuestionVar {
|
|
39
44
|
id: Id;
|
|
40
45
|
}
|
|
@@ -1,2 +1,94 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REMOVE_FLAGGED_QUESTION = exports.ADD_FLAGGED_QUESTION = exports.SAVE_MARKSHEET = exports.RE_BUILD_MARKSHEET = exports.BUILD_MARKSHEET = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
const marksheet_1 = require("../../fragments/marksheet");
|
|
6
|
+
exports.BUILD_MARKSHEET = (0, client_1.gql) `
|
|
7
|
+
mutation BuildMarksheet($buildMarksheet: BuildMarksheetInput) {
|
|
8
|
+
restricted {
|
|
9
|
+
buildMarksheet(buildMarksheet: $buildMarksheet) {
|
|
10
|
+
id
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
|
|
16
|
+
${marksheet_1.MARKSHEET_MARK_FIELDS}
|
|
17
|
+
mutation ReBuildMarksheet($marksheetId: Int!) {
|
|
18
|
+
restricted {
|
|
19
|
+
reBuildMarksheet(marksheetId: $marksheetId) {
|
|
20
|
+
id
|
|
21
|
+
createdAt
|
|
22
|
+
startedAt
|
|
23
|
+
endedAt
|
|
24
|
+
topicIds
|
|
25
|
+
topicNames
|
|
26
|
+
source
|
|
27
|
+
userId
|
|
28
|
+
user {
|
|
29
|
+
displayName
|
|
30
|
+
id
|
|
31
|
+
}
|
|
32
|
+
marks {
|
|
33
|
+
...MarksheetMarkFields
|
|
34
|
+
}
|
|
35
|
+
mockTestId
|
|
36
|
+
correct
|
|
37
|
+
incorrect
|
|
38
|
+
totalQuestions
|
|
39
|
+
isTestMarksheet
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
exports.SAVE_MARKSHEET = (0, client_1.gql) `
|
|
45
|
+
mutation SaveMarksheet($marksheetInput: [MarksheetInput!]!) {
|
|
46
|
+
restricted {
|
|
47
|
+
saveMarksheets(marksheetInput: $marksheetInput) {
|
|
48
|
+
id
|
|
49
|
+
createdAt
|
|
50
|
+
startedAt
|
|
51
|
+
endedAt
|
|
52
|
+
topicIds
|
|
53
|
+
topicNames
|
|
54
|
+
source
|
|
55
|
+
userId
|
|
56
|
+
user {
|
|
57
|
+
displayName
|
|
58
|
+
id
|
|
59
|
+
}
|
|
60
|
+
marks {
|
|
61
|
+
id
|
|
62
|
+
marksheetId
|
|
63
|
+
questionChoiceId
|
|
64
|
+
timeTaken
|
|
65
|
+
flagged
|
|
66
|
+
mark
|
|
67
|
+
}
|
|
68
|
+
mockTestId
|
|
69
|
+
correct
|
|
70
|
+
incorrect
|
|
71
|
+
totalQuestions
|
|
72
|
+
isTestMarksheet
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
`;
|
|
77
|
+
exports.ADD_FLAGGED_QUESTION = (0, client_1.gql) `
|
|
78
|
+
mutation AddFlaggedQuestion($markId: Int!, $questionId: Int!) {
|
|
79
|
+
restricted {
|
|
80
|
+
addFlaggedQuestion(markId: $markId, questionId: $questionId) {
|
|
81
|
+
id
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
exports.REMOVE_FLAGGED_QUESTION = (0, client_1.gql) `
|
|
87
|
+
mutation RemoveFlaggedQuestion($id: Int!) {
|
|
88
|
+
restricted {
|
|
89
|
+
removeFlaggedQuestion(id: $id) {
|
|
90
|
+
id
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { Id, IMarksheet, IMarksheetMark } from '../../../models';
|
|
2
2
|
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
3
|
+
export declare const BUILD_MOCK_TEST_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
3
4
|
export interface IBuildMockTestMarksheetVar {
|
|
4
5
|
mockTestId: Id;
|
|
5
6
|
duration: number;
|
|
6
7
|
}
|
|
7
8
|
export declare type IBuildMockTestMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'buildMockTestMarksheet'>;
|
|
9
|
+
export declare const TOGGLE_FLAGGED_MARK: import("@apollo/client").DocumentNode;
|
|
8
10
|
export interface IToggleFlaggedMarkVar {
|
|
9
11
|
markId: Id;
|
|
10
12
|
isFlagged: boolean;
|
|
11
13
|
}
|
|
12
14
|
export declare type IToggleFlaggedMarkData = RestrictedData<graphqlNormalize & IMarksheetMark, 'toggleFlaggedMark'>;
|
|
15
|
+
export declare const END_MOCK_TEST: import("@apollo/client").DocumentNode;
|
|
13
16
|
export interface IEndMockTestVar {
|
|
14
17
|
marksheetId: Id;
|
|
15
18
|
}
|
|
@@ -1,2 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.END_MOCK_TEST = exports.TOGGLE_FLAGGED_MARK = exports.BUILD_MOCK_TEST_MARKSHEET = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
exports.BUILD_MOCK_TEST_MARKSHEET = (0, client_1.gql) `
|
|
6
|
+
mutation BuildMockTestMarksheet($mockTestId: Int!, $duration: Int!) {
|
|
7
|
+
restricted {
|
|
8
|
+
buildMockTestMarksheet(mockTestId: $mockTestId, duration: $duration) {
|
|
9
|
+
id
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
exports.TOGGLE_FLAGGED_MARK = (0, client_1.gql) `
|
|
15
|
+
mutation ToggleFlaggedMark($markId: Int!, $isFlagged: Boolean!) {
|
|
16
|
+
restricted {
|
|
17
|
+
toggleFlaggedMark(markId: $markId, isFlagged: $isFlagged) {
|
|
18
|
+
id
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
exports.END_MOCK_TEST = (0, client_1.gql) `
|
|
24
|
+
mutation EndMockTest($marksheetId: Int!) {
|
|
25
|
+
restricted {
|
|
26
|
+
endMockTest(marksheetId: $marksheetId) {
|
|
27
|
+
id
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import { EQuestionLike, Id, IQuestion, IQuestionComment } from '../../../models';
|
|
2
2
|
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
3
|
+
export declare const QUESTION_LIKE: import("@apollo/client").DocumentNode;
|
|
3
4
|
export interface IQuestionLikeVar {
|
|
4
5
|
questionId: Id;
|
|
5
6
|
like: EQuestionLike;
|
|
6
7
|
}
|
|
7
8
|
export declare type IQuestionLikeData = RestrictedData<graphqlNormalize & IQuestion, 'questionLike'>;
|
|
9
|
+
export declare const QUESTION_COMMENTS: import("@apollo/client").DocumentNode;
|
|
8
10
|
export interface IQuestionCommentsVar {
|
|
9
11
|
questionId: Id;
|
|
10
|
-
parentId
|
|
12
|
+
parentId?: Id;
|
|
11
13
|
comment: string;
|
|
12
14
|
}
|
|
13
15
|
export declare type IQuestionCommentsData = RestrictedData<graphqlNormalize & IQuestionComment, 'questionComments'>;
|
|
16
|
+
export declare const QUESTION_COMMENT_LIKE: import("@apollo/client").DocumentNode;
|
|
14
17
|
export interface IQuestionCommentsLikeVar {
|
|
15
18
|
commentId: Id;
|
|
16
19
|
like: EQuestionLike;
|
|
17
20
|
}
|
|
18
21
|
export declare type IQuestionCommentsLikeData = RestrictedData<graphqlNormalize & IQuestionComment, 'questionCommentLike'>;
|
|
22
|
+
export declare const QUESTION_COMMENT_REMOVE: import("@apollo/client").DocumentNode;
|
|
19
23
|
export interface IQuestionCommentRemoveVar {
|
|
20
24
|
commentId: Id;
|
|
21
25
|
}
|