@quesmed/types-rn 2.4.31 → 2.4.34
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/index.js +5 -1
- package/models/Chapter.d.ts +0 -2
- package/models/Marksheet.d.ts +3 -1
- package/models/MockTest.d.ts +14 -2
- package/models/MockTest.js +10 -0
- package/models/Question.d.ts +3 -3
- package/models/Topic.d.ts +2 -1
- package/models/Topic.js +1 -0
- package/models/Type.d.ts +3 -3
- package/models/User.d.ts +2 -2
- package/models/index.js +5 -1
- package/package.json +6 -6
- package/resolvers/apollo.d.ts +1 -1
- package/resolvers/fragments/index.js +5 -1
- package/resolvers/fragments/mockTest.js +1 -0
- package/resolvers/index.js +5 -1
- package/resolvers/mutation/admin/algoliaSync.d.ts +8 -8
- package/resolvers/mutation/admin/index.js +5 -1
- package/resolvers/mutation/admin/notification.d.ts +4 -4
- package/resolvers/mutation/admin/token.d.ts +2 -2
- package/resolvers/mutation/index.js +5 -1
- package/resolvers/mutation/restricted/agora.d.ts +1 -1
- package/resolvers/mutation/restricted/contactUs.d.ts +1 -1
- package/resolvers/mutation/restricted/index.js +5 -1
- package/resolvers/mutation/restricted/marksheet.d.ts +16 -13
- package/resolvers/mutation/restricted/marksheet.js +6 -3
- package/resolvers/mutation/restricted/mockTest.d.ts +4 -3
- package/resolvers/mutation/restricted/notification.d.ts +8 -8
- package/resolvers/mutation/restricted/osce.d.ts +16 -16
- package/resolvers/mutation/restricted/questionDiscussion.d.ts +6 -6
- package/resolvers/mutation/restricted/todo.d.ts +6 -6
- package/resolvers/mutation/restricted/token.d.ts +4 -4
- package/resolvers/mutation/restricted/users.d.ts +9 -9
- package/resolvers/mutation/restricted/video.d.ts +1 -1
- package/resolvers/mutation/stripe.d.ts +3 -3
- package/resolvers/mutation/users.d.ts +4 -4
- package/resolvers/mutation/validUserToken/index.js +5 -1
- package/resolvers/mutation/validUserToken/user.d.ts +3 -3
- package/resolvers/query/admin/getUserToken.d.ts +1 -1
- package/resolvers/query/admin/index.js +5 -1
- package/resolvers/query/author.d.ts +1 -1
- package/resolvers/query/blog.d.ts +4 -4
- package/resolvers/query/book.d.ts +3 -3
- package/resolvers/query/feedback.d.ts +2 -2
- package/resolvers/query/index.js +5 -1
- package/resolvers/query/product.d.ts +1 -1
- package/resolvers/query/restricted/conceptExplanation.d.ts +1 -1
- package/resolvers/query/restricted/global.d.ts +4 -4
- package/resolvers/query/restricted/index.js +5 -1
- package/resolvers/query/restricted/marksheet.d.ts +13 -13
- package/resolvers/query/restricted/marksheet.js +5 -0
- package/resolvers/query/restricted/mockTests.d.ts +4 -4
- package/resolvers/query/restricted/notification.d.ts +1 -1
- package/resolvers/query/restricted/osce.d.ts +9 -9
- package/resolvers/query/restricted/qBank.js +1 -1
- package/resolvers/query/restricted/quesBook.d.ts +4 -4
- package/resolvers/query/restricted/question.d.ts +1 -1
- package/resolvers/query/restricted/todos.d.ts +2 -2
- package/resolvers/query/restricted/topics.d.ts +2 -2
- package/resolvers/query/restricted/topics.js +2 -2
- package/resolvers/query/restricted/university.d.ts +1 -1
- package/resolvers/query/restricted/user.d.ts +4 -4
- package/resolvers/query/restricted/video.d.ts +2 -2
- package/resolvers/query/sample.d.ts +5 -5
- package/resolvers/query/university.d.ts +1 -1
- package/resolvers/query/user.d.ts +2 -2
- package/resolvers/query/video.d.ts +3 -3
- package/resolvers/subscription/index.js +5 -1
- package/resolvers/subscription/marksheet.d.ts +3 -3
- package/resolvers/subscription/notification.d.ts +2 -2
- package/resolvers/subscription/osce.d.ts +6 -6
- package/resolvers/types.d.ts +3 -3
- package/utils/index.js +5 -1
- package/utils/lightgallery.js +1 -1
- package/utils/supermemo.d.ts +0 -1
package/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/models/Chapter.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { IFile } from './File';
|
|
|
2
2
|
import { IPicture } from './Picture';
|
|
3
3
|
import { ETopicType } from './Topic';
|
|
4
4
|
import { Id } from './Type';
|
|
5
|
-
import { IVideo } from './Video';
|
|
6
5
|
export interface IChapter {
|
|
7
6
|
id: Id;
|
|
8
7
|
createdAt: number | Date;
|
|
@@ -11,6 +10,5 @@ export interface IChapter {
|
|
|
11
10
|
explanation: string | null;
|
|
12
11
|
typeId: ETopicType | null;
|
|
13
12
|
pictures?: IPicture[];
|
|
14
|
-
videos?: IVideo[];
|
|
15
13
|
files?: IFile[];
|
|
16
14
|
}
|
package/models/Marksheet.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IBuildConfigData, IPreBuildMarksheet } from '../resolvers/mutation/restricted/marksheet';
|
|
2
2
|
import { IPrescribeAnswer, IPrescribeMark, IQuestion, IQuestionChoice, IQuestionQAAnswer } from './Question';
|
|
3
|
+
import { ETopicType } from './Topic';
|
|
3
4
|
import { Id } from './Type';
|
|
4
5
|
import { IUser } from './User';
|
|
5
6
|
export declare enum EMarksheetState {
|
|
@@ -49,6 +50,7 @@ export interface IMarksheet {
|
|
|
49
50
|
startedAt: number | Date;
|
|
50
51
|
type: EMarksheetType;
|
|
51
52
|
endedAt: number | Date;
|
|
53
|
+
typeId: ETopicType;
|
|
52
54
|
topicIds: number[];
|
|
53
55
|
topicNames?: string[];
|
|
54
56
|
source: string;
|
|
@@ -72,7 +74,7 @@ export interface IMarksheet {
|
|
|
72
74
|
preBuildData?: IPreBuildMarksheet;
|
|
73
75
|
builderConfig?: IBuildConfigData;
|
|
74
76
|
}
|
|
75
|
-
export
|
|
77
|
+
export type IMarksheetMarkJSONB = string | [string] | [IQuestionQAAnswer] | [string[], string[]] | [IPrescribeMark] | IPrescribeAnswer | null;
|
|
76
78
|
export interface IMarksheetMark {
|
|
77
79
|
id: Id;
|
|
78
80
|
createdAt: number | Date;
|
package/models/MockTest.d.ts
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import { IQuestion } from './Question';
|
|
2
|
-
import { ETopicType } from './Topic';
|
|
3
2
|
import { Id } from './Type';
|
|
3
|
+
export declare enum EMockTestType {
|
|
4
|
+
ALL = 0,
|
|
5
|
+
FINALS = 1,
|
|
6
|
+
PSA = 2,
|
|
7
|
+
MISCELLANEOUS = 3,
|
|
8
|
+
UNIVERSITY_SPECIFIC = 4,
|
|
9
|
+
ANATOMY_SPOTTER = 5
|
|
10
|
+
}
|
|
11
|
+
export interface IMockTestType {
|
|
12
|
+
id: EMockTestType;
|
|
13
|
+
name: string;
|
|
14
|
+
}
|
|
4
15
|
export interface IMockTest {
|
|
5
16
|
id: Id;
|
|
6
17
|
createdAt: number | Date;
|
|
7
18
|
title: string;
|
|
8
19
|
topicIds: number[];
|
|
9
|
-
typeId:
|
|
20
|
+
typeId: EMockTestType | null;
|
|
10
21
|
passingMark: number;
|
|
11
22
|
public: boolean;
|
|
12
23
|
questions: IQuestion[];
|
|
@@ -14,6 +25,7 @@ export interface IMockTest {
|
|
|
14
25
|
export interface IUserMockTest {
|
|
15
26
|
id: Id;
|
|
16
27
|
title: string;
|
|
28
|
+
passingMark: number;
|
|
17
29
|
correct: number;
|
|
18
30
|
incorrect: number;
|
|
19
31
|
totalQuestions: number;
|
package/models/MockTest.js
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EMockTestType = void 0;
|
|
4
|
+
var EMockTestType;
|
|
5
|
+
(function (EMockTestType) {
|
|
6
|
+
EMockTestType[EMockTestType["ALL"] = 0] = "ALL";
|
|
7
|
+
EMockTestType[EMockTestType["FINALS"] = 1] = "FINALS";
|
|
8
|
+
EMockTestType[EMockTestType["PSA"] = 2] = "PSA";
|
|
9
|
+
EMockTestType[EMockTestType["MISCELLANEOUS"] = 3] = "MISCELLANEOUS";
|
|
10
|
+
EMockTestType[EMockTestType["UNIVERSITY_SPECIFIC"] = 4] = "UNIVERSITY_SPECIFIC";
|
|
11
|
+
EMockTestType[EMockTestType["ANATOMY_SPOTTER"] = 5] = "ANATOMY_SPOTTER";
|
|
12
|
+
})(EMockTestType = exports.EMockTestType || (exports.EMockTestType = {}));
|
package/models/Question.d.ts
CHANGED
|
@@ -53,8 +53,8 @@ export interface IQuestionCommentLike {
|
|
|
53
53
|
comment: IQuestionComment;
|
|
54
54
|
likeTrueDislikeFalse: boolean;
|
|
55
55
|
}
|
|
56
|
-
export
|
|
57
|
-
export
|
|
56
|
+
export type IQuestionAnswer = string | [string] | [IQuestionQAAnswer] | [string[], string[]] | IPrescribeAnswer[];
|
|
57
|
+
export type IQuestionAll = IQuestion | IQuestionSBA | IQuestionQA | IQuestionMultiQ | IQuestionPrescribe;
|
|
58
58
|
export interface IQuestion {
|
|
59
59
|
id: Id;
|
|
60
60
|
createdAt: Date | number;
|
|
@@ -154,7 +154,7 @@ export interface IQuestionPrescribe extends IQuestion {
|
|
|
154
154
|
answer: IPrescribeAnswer[];
|
|
155
155
|
prescribeAnswer: IPrescribeAnswer[];
|
|
156
156
|
}
|
|
157
|
-
export
|
|
157
|
+
export type IPrescribeAnswerData<T> = {
|
|
158
158
|
value: T;
|
|
159
159
|
display: boolean;
|
|
160
160
|
};
|
package/models/Topic.d.ts
CHANGED
package/models/Topic.js
CHANGED
|
@@ -10,4 +10,5 @@ var ETopicType;
|
|
|
10
10
|
ETopicType[ETopicType["DATA_INTERPRETATION"] = 4] = "DATA_INTERPRETATION";
|
|
11
11
|
ETopicType[ETopicType["PSA"] = 5] = "PSA";
|
|
12
12
|
ETopicType[ETopicType["OSCE"] = 6] = "OSCE";
|
|
13
|
+
ETopicType[ETopicType["MOCK_TEST"] = 7] = "MOCK_TEST";
|
|
13
14
|
})(ETopicType = exports.ETopicType || (exports.ETopicType = {}));
|
package/models/Type.d.ts
CHANGED
package/models/User.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ import { ISubscription } from './Subscription';
|
|
|
8
8
|
import { ITodo } from './Todo';
|
|
9
9
|
import { Id } from './Type';
|
|
10
10
|
import { IUniversity } from './University';
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type IAccessLevel = 'subscriber' | 'administrator' | 'tutor';
|
|
12
|
+
export type IClassYear = 'Year 1' | 'Year 2' | 'Year 3' | 'Year 4' | 'Year 5' | 'Graduated' | 'PhD' | 'BSc' | 'MSc' | 'Beta Tester';
|
|
13
13
|
export declare const classYears: IClassYear[];
|
|
14
14
|
export declare enum EClassYearGroup {
|
|
15
15
|
PRECLINICAL = 0,
|
package/models/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quesmed/types-rn",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.34",
|
|
4
4
|
"description": "Typescript types for Quesmed",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"quesmed",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
},
|
|
21
21
|
"homepage": "https://github.com/Quesmed/quesmed_types#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@apollo/client": "^3.
|
|
24
|
-
"@react-native-async-storage/async-storage": "^1.
|
|
25
|
-
"@types/react-native": "^0.
|
|
23
|
+
"@apollo/client": "^3.7.12",
|
|
24
|
+
"@react-native-async-storage/async-storage": "^1.18.1",
|
|
25
|
+
"@types/react-native": "^0.71.6",
|
|
26
26
|
"decimal.js": "^10.4.3",
|
|
27
27
|
"localforage": "^1.10.0",
|
|
28
|
-
"luxon": "^3.
|
|
29
|
-
"react-native": "0.
|
|
28
|
+
"luxon": "^3.3.0",
|
|
29
|
+
"react-native": "0.71.7",
|
|
30
30
|
"react-native-expo-image-cache": "^4.1.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
package/resolvers/apollo.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DefaultContext, FetchResult } from '@apollo/client';
|
|
2
|
-
export
|
|
2
|
+
export type ApolloUpdateResultRestricted<T> = Omit<FetchResult<T>, 'context'>;
|
|
3
3
|
export interface ApolloUpdateOptions {
|
|
4
4
|
context?: DefaultContext;
|
|
5
5
|
variables?: Record<string, any>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/resolvers/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AdminData } from '../../types';
|
|
2
2
|
export declare const UPDATE_CARDS_DATA_IN_ALGOLIA: import("@apollo/client").DocumentNode;
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type IUpdateCardsDataInAlgoliaVar = void;
|
|
4
|
+
export type IUpdateCardsDataInAlgoliaData = AdminData<string, 'updateCardsDataInAlgolia'>;
|
|
5
5
|
export declare const UPDATE_QUESTIONS_DATA_IN_ALGOLIA: import("@apollo/client").DocumentNode;
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type IUpdateQuestionsDataInAlgoliaVar = void;
|
|
7
|
+
export type IUpdateQuestionsDataInAlgoliaData = AdminData<string, 'updateQuestionsDataInAlgolia'>;
|
|
8
8
|
export declare const UPDATE_QUES_BOOK_DATA_IN_ALGOLIA: import("@apollo/client").DocumentNode;
|
|
9
|
-
export
|
|
10
|
-
export
|
|
9
|
+
export type IUpdateQuesBookDataInAlgoliaVar = void;
|
|
10
|
+
export type IUpdateQuesBookDataInAlgoliaData = AdminData<string, 'updateDataInAlgolia'>;
|
|
11
11
|
export declare const UPDATE_VIDEO_DATA_IN_ALGOLIA: import("@apollo/client").DocumentNode;
|
|
12
|
-
export
|
|
13
|
-
export
|
|
12
|
+
export type IUpdateVideoDataInAlgoliaVar = void;
|
|
13
|
+
export type IUpdateVideoDataInAlgoliaData = AdminData<string, 'updateVideoDataInAlgolia'>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -5,11 +5,11 @@ export interface IAdminAddNotificationInput {
|
|
|
5
5
|
actionType: ENotificationActionType;
|
|
6
6
|
type: ENotificationType;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type IAdminAddNotificationVar = {
|
|
9
9
|
data: IAdminAddNotificationInput;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type IAdminAddNotificationData = AdminData<INotification, 'addNotification'>;
|
|
12
|
+
export type IAdminAddNotificationsVar = {
|
|
13
13
|
data: IAdminAddNotificationInput[];
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type IAdminAddNotificationsData = AdminData<INotification[], 'addNotifications'>;
|
|
@@ -18,10 +18,10 @@ export declare const SEND_PUSH_NOTIFICATION: import("@apollo/client").DocumentNo
|
|
|
18
18
|
export interface ISendPushNotificationVar {
|
|
19
19
|
data: ISendPushNotificationInput;
|
|
20
20
|
}
|
|
21
|
-
export
|
|
21
|
+
export type ISendPushNotificationData = AdminData<string, 'sendPushNotification'>;
|
|
22
22
|
export declare const SEND_TOPIC_NOTIFICATION: import("@apollo/client").DocumentNode;
|
|
23
23
|
export interface ISendTopicNotificationVar {
|
|
24
24
|
data: ISendTopicNotificationInput;
|
|
25
25
|
topic: string;
|
|
26
26
|
}
|
|
27
|
-
export
|
|
27
|
+
export type ISendTopicNotificationData = AdminData<string, 'sendTopicNotification'>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -16,7 +16,7 @@ export interface IPreBuildMarksheet {
|
|
|
16
16
|
export interface IBuildQuestionMarksheetVar {
|
|
17
17
|
questionIds?: number[];
|
|
18
18
|
}
|
|
19
|
-
export
|
|
19
|
+
export type IBuildQuestionMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'buildQuestionMarksheet'>;
|
|
20
20
|
export declare const BUILD_QUESTION_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
21
21
|
/**
|
|
22
22
|
* buildMarksheet
|
|
@@ -29,7 +29,7 @@ export interface IBuildMarksheetInput extends IPreBuildMarksheet {
|
|
|
29
29
|
export interface IBuildMarksheetVar {
|
|
30
30
|
input: IBuildMarksheetInput;
|
|
31
31
|
}
|
|
32
|
-
export
|
|
32
|
+
export type IBuildMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'buildMarksheet'>;
|
|
33
33
|
export declare const BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
34
34
|
/**
|
|
35
35
|
* reBuildMarksheet
|
|
@@ -38,7 +38,7 @@ export declare const RE_BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
|
38
38
|
export interface IReBuildMarksheetVar {
|
|
39
39
|
marksheetId: number;
|
|
40
40
|
}
|
|
41
|
-
export
|
|
41
|
+
export type IReBuildMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'reBuildMarksheet'>;
|
|
42
42
|
export interface ISaveMarksheetInput {
|
|
43
43
|
marksheetId: Id;
|
|
44
44
|
markId: Id;
|
|
@@ -54,8 +54,9 @@ export declare const updateMarksheets: (cache: ApolloCache<any>, result: ApolloU
|
|
|
54
54
|
export declare const optimisticSaveMarksheets: (marksheet: IMarksheet, marksheetInput: ISaveMarksheetInput, questionIndex: number) => ISaveMarksheetsData;
|
|
55
55
|
export interface ISaveMarksheetsVar {
|
|
56
56
|
input: ISaveMarksheetInput[];
|
|
57
|
+
updatesOnly?: boolean;
|
|
57
58
|
}
|
|
58
|
-
export
|
|
59
|
+
export type ISaveMarksheetsData = RestrictedData<(graphqlNormalize & IMarksheet)[], 'saveMarksheets'>;
|
|
59
60
|
/**
|
|
60
61
|
* addFlaggedQuestion
|
|
61
62
|
*/
|
|
@@ -65,7 +66,7 @@ export interface IAddFlaggedQuestionVar {
|
|
|
65
66
|
questionId: number;
|
|
66
67
|
marksheetId?: number;
|
|
67
68
|
}
|
|
68
|
-
export
|
|
69
|
+
export type IAddFlaggedQuestionData = RestrictedData<graphqlNormalize & IUserFlaggedQuestion, 'addFlaggedQuestion'>;
|
|
69
70
|
/**
|
|
70
71
|
* removeFlaggedQuestion
|
|
71
72
|
*/
|
|
@@ -74,7 +75,7 @@ export interface IRemoveFlaggedQuestionVar {
|
|
|
74
75
|
questionId: Id;
|
|
75
76
|
marksheetId?: number;
|
|
76
77
|
}
|
|
77
|
-
export
|
|
78
|
+
export type IRemoveFlaggedQuestionData = RestrictedData<(graphqlNormalize & IUserFlaggedQuestion)[], 'removeFlaggedQuestion'>;
|
|
78
79
|
export declare const MARK_FLAGGED_FIELD: import("@apollo/client").DocumentNode;
|
|
79
80
|
export declare const updateCacheAddFlaggedQuestion: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IAddFlaggedQuestionData>) => void;
|
|
80
81
|
export declare const updateCacheRemoveFlaggedQuestion: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IRemoveFlaggedQuestionData>) => void;
|
|
@@ -85,7 +86,7 @@ export interface IStartOrJoinMarksheetVar {
|
|
|
85
86
|
agoraId: string;
|
|
86
87
|
solo: boolean;
|
|
87
88
|
}
|
|
88
|
-
export
|
|
89
|
+
export type IStartOrJoinMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'startOrJoinMarksheet'>;
|
|
89
90
|
export declare const START_OR_JOIN_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
90
91
|
/**
|
|
91
92
|
* modifyMarksheet
|
|
@@ -125,8 +126,8 @@ export interface IModifyMarksheetVarInput {
|
|
|
125
126
|
export interface IModifyMarksheetVar {
|
|
126
127
|
input: IModifyMarksheetVarInput;
|
|
127
128
|
}
|
|
128
|
-
export
|
|
129
|
-
export declare const optimisticModifyMarksheetBuilderConfig: (marksheetId: number, builderConfig: IBuildConfigData, client?: ApolloClient<any>
|
|
129
|
+
export type IModifyMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'modifyMarksheet'>;
|
|
130
|
+
export declare const optimisticModifyMarksheetBuilderConfig: (marksheetId: number, builderConfig: IBuildConfigData, client?: ApolloClient<any>) => {
|
|
130
131
|
restricted: {
|
|
131
132
|
__typename: string;
|
|
132
133
|
modifyMarksheet: {
|
|
@@ -147,6 +148,7 @@ export declare const optimisticModifyMarksheetBuilderConfig: (marksheetId: numbe
|
|
|
147
148
|
startedAt: number | Date;
|
|
148
149
|
type: import("../../../models").EMarksheetType;
|
|
149
150
|
endedAt: number | Date;
|
|
151
|
+
typeId: import("../../../models").ETopicType;
|
|
150
152
|
topicIds: number[];
|
|
151
153
|
topicNames?: string[] | undefined;
|
|
152
154
|
source: string;
|
|
@@ -204,7 +206,7 @@ export interface IModifyMarksheetMarkVarInput {
|
|
|
204
206
|
export interface IModifyMarksheetMarkVar {
|
|
205
207
|
input: IModifyMarksheetMarkVarInput;
|
|
206
208
|
}
|
|
207
|
-
export
|
|
209
|
+
export type IModifyMarksheetMarkData = RestrictedData<graphqlNormalize & IMarksheetMark, 'modifyMarksheetMark'>;
|
|
208
210
|
export declare const MODIFY_MARKSHEET_MARK: import("@apollo/client").DocumentNode;
|
|
209
211
|
export declare const MODIFY_MARKSHEET_MARK_STRIKED: import("@apollo/client").DocumentNode;
|
|
210
212
|
export declare const MODIFY_MARKSHEET_MARK_STRIKED_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
@@ -218,7 +220,7 @@ export declare const MODIFY_CURRENT_MARKSHEET_MARK_FRAGMENT: import("@apollo/cli
|
|
|
218
220
|
export interface ILeaveMarksheetVar {
|
|
219
221
|
marksheetId: Id;
|
|
220
222
|
}
|
|
221
|
-
export
|
|
223
|
+
export type ILeaveMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'leaveMarksheet'>;
|
|
222
224
|
export declare const LEAVE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
223
225
|
/**
|
|
224
226
|
* endMarksheet
|
|
@@ -226,7 +228,7 @@ export declare const LEAVE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
|
226
228
|
export interface IEndMarksheetVar {
|
|
227
229
|
marksheetId: Id;
|
|
228
230
|
}
|
|
229
|
-
export
|
|
231
|
+
export type IEndMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'endMarksheet'>;
|
|
230
232
|
export declare const END_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
231
233
|
export declare const updateCacheOnEndMarksheet: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IEndMarksheetData>, options: ApolloUpdateOptions) => void;
|
|
232
234
|
export declare const optimisticEndMarksheet: (marksheet: IMarksheet) => {
|
|
@@ -241,6 +243,7 @@ export declare const optimisticEndMarksheet: (marksheet: IMarksheet) => {
|
|
|
241
243
|
startedAt: number | Date;
|
|
242
244
|
type: import("../../../models").EMarksheetType;
|
|
243
245
|
endedAt: number | Date;
|
|
246
|
+
typeId: import("../../../models").ETopicType;
|
|
244
247
|
topicIds: number[];
|
|
245
248
|
topicNames?: string[] | undefined;
|
|
246
249
|
source: string;
|
|
@@ -276,5 +279,5 @@ export interface IToggleStrikeOptionsVar {
|
|
|
276
279
|
striked: number[];
|
|
277
280
|
}[];
|
|
278
281
|
}
|
|
279
|
-
export
|
|
282
|
+
export type IToggleStrikeOptionsData = RestrictedData<(graphqlNormalize & IMarksheetMark)[], 'toggleStrikeOptions'>;
|
|
280
283
|
export declare const TOGGLE_STRIKE_OPTIONS: import("@apollo/client").DocumentNode;
|
|
@@ -1914,14 +1914,14 @@ const optimisticSaveMarksheets = (marksheet, marksheetInput, questionIndex) => {
|
|
|
1914
1914
|
isAnswered: true,
|
|
1915
1915
|
mark: mark || null,
|
|
1916
1916
|
};
|
|
1917
|
-
const
|
|
1917
|
+
const updatedMarks = [
|
|
1918
1918
|
...marks.slice(0, questionIndex),
|
|
1919
1919
|
updatedMark,
|
|
1920
1920
|
...marks.slice(questionIndex + 1),
|
|
1921
1921
|
];
|
|
1922
1922
|
return {
|
|
1923
1923
|
restricted: {
|
|
1924
|
-
saveMarksheets: [{ ...rest, marks:
|
|
1924
|
+
saveMarksheets: [{ ...rest, marks: updatedMarks }],
|
|
1925
1925
|
},
|
|
1926
1926
|
};
|
|
1927
1927
|
};
|
|
@@ -1953,7 +1953,10 @@ exports.ADD_FLAGGED_QUESTION = (0, client_1.gql) `
|
|
|
1953
1953
|
exports.REMOVE_FLAGGED_QUESTION = (0, client_1.gql) `
|
|
1954
1954
|
mutation RemoveFlaggedQuestion($questionId: Int!, $marksheetId: Int) {
|
|
1955
1955
|
restricted {
|
|
1956
|
-
removeFlaggedQuestion(
|
|
1956
|
+
removeFlaggedQuestion(
|
|
1957
|
+
questionId: $questionId
|
|
1958
|
+
marksheetId: $marksheetId
|
|
1959
|
+
) {
|
|
1957
1960
|
id
|
|
1958
1961
|
markId
|
|
1959
1962
|
}
|
|
@@ -7,7 +7,7 @@ export interface IBuildMockTestMarksheetVar {
|
|
|
7
7
|
mockTestId: Id;
|
|
8
8
|
duration: number;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type IBuildMockTestMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'buildMockTestMarksheet'>;
|
|
11
11
|
export declare const TOGGLE_FLAGGED_MARK: import("@apollo/client").DocumentNode;
|
|
12
12
|
export declare const MARK_FLAGGED_QUESTION: import("@apollo/client").DocumentNode;
|
|
13
13
|
export declare const updateCacheToggleFlaggedQuestion: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IToggleFlaggedMarkData>) => void;
|
|
@@ -38,7 +38,7 @@ export interface IToggleFlaggedMarkVar {
|
|
|
38
38
|
markId: Id;
|
|
39
39
|
isFlagged: boolean;
|
|
40
40
|
}
|
|
41
|
-
export
|
|
41
|
+
export type IToggleFlaggedMarkData = RestrictedData<graphqlNormalize & IMarksheetMark, 'toggleFlaggedMark'>;
|
|
42
42
|
export declare const END_MOCK_TEST: import("@apollo/client").DocumentNode;
|
|
43
43
|
export declare const updateCacheOnEndMockTest: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IEndMockTestData>, options: ApolloUpdateOptions) => void;
|
|
44
44
|
export declare const optimisticEndMockTest: (marksheet: IMarksheet) => {
|
|
@@ -53,6 +53,7 @@ export declare const optimisticEndMockTest: (marksheet: IMarksheet) => {
|
|
|
53
53
|
startedAt: number | Date;
|
|
54
54
|
type: import("../../../models").EMarksheetType;
|
|
55
55
|
endedAt: number | Date;
|
|
56
|
+
typeId: import("../../../models").ETopicType;
|
|
56
57
|
topicIds: number[];
|
|
57
58
|
topicNames?: string[] | undefined;
|
|
58
59
|
source: string;
|
|
@@ -81,4 +82,4 @@ export declare const optimisticEndMockTest: (marksheet: IMarksheet) => {
|
|
|
81
82
|
export interface IEndMockTestVar {
|
|
82
83
|
marksheetId: Id;
|
|
83
84
|
}
|
|
84
|
-
export
|
|
85
|
+
export type IEndMockTestData = RestrictedData<graphqlNormalize & IMarksheet, 'endMockTest'>;
|
|
@@ -13,22 +13,22 @@ export interface IAddNotificationInput {
|
|
|
13
13
|
global: boolean;
|
|
14
14
|
read: boolean;
|
|
15
15
|
}
|
|
16
|
-
export
|
|
16
|
+
export type IAddNotificationVar = {
|
|
17
17
|
data: IAddNotificationInput;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
20
|
-
export
|
|
19
|
+
export type IAddNotificationData = RestrictedData<graphqlNormalize & INotification, 'addNotification'>;
|
|
20
|
+
export type IAddNotificationsVar = {
|
|
21
21
|
data: IAddNotificationInput[];
|
|
22
22
|
};
|
|
23
|
-
export
|
|
24
|
-
export
|
|
23
|
+
export type IAddNotificationsData = RestrictedData<graphqlNormalize & INotification[], 'addNotifications'>;
|
|
24
|
+
export type IMarkNotificationAsReadVar = {
|
|
25
25
|
id: Id;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type IMarkNotificationAsReadData = RestrictedData<graphqlNormalize & INotification, 'markNotificationAsRead'>;
|
|
28
28
|
export declare const MARK_AS_READ: import("@apollo/client").DocumentNode;
|
|
29
29
|
export declare const updateNotificatonsOnMarkAsRead: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IMarkNotificationAsReadData>, options: ApolloUpdateOptions) => void;
|
|
30
|
-
export
|
|
31
|
-
export
|
|
30
|
+
export type IMarkAllNotificationsAsReadVar = null;
|
|
31
|
+
export type IMarkAllNotificationsAsReadData = RestrictedData<graphqlNormalize & INotification[], 'markAllNotificationsAsRead'>;
|
|
32
32
|
export declare const MARK_ALL_AS_READ: import("@apollo/client").DocumentNode;
|
|
33
33
|
export declare const optimisticMarkAsRead: (notification: INotification) => () => {
|
|
34
34
|
restricted: {
|