@quesmed/types-rn 2.0.14 → 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/Notification.d.ts +39 -0
- package/models/Notification.js +2 -0
- package/models/OsceMarksheet.js +3 -4
- package/models/Question.d.ts +3 -0
- package/models/Type.d.ts +1 -0
- package/models/User.d.ts +7 -5
- package/models/index.d.ts +1 -0
- package/models/index.js +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/index.d.ts +1 -0
- package/resolvers/mutation/admin/index.js +1 -0
- package/resolvers/mutation/admin/notification.d.ts +15 -0
- package/resolvers/mutation/admin/notification.js +2 -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/index.d.ts +1 -0
- package/resolvers/mutation/restricted/index.js +1 -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/notification.d.ts +28 -0
- package/resolvers/mutation/restricted/notification.js +2 -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 +2 -0
- package/resolvers/query/restricted/index.js +2 -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/notification.d.ts +9 -0
- package/resolvers/query/restricted/notification.js +2 -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/resolvers/subscription/index.d.ts +1 -0
- package/resolvers/subscription/index.js +1 -0
- package/resolvers/subscription/notification.d.ts +11 -0
- package/resolvers/subscription/notification.js +4 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IConcept } from './Concept';
|
|
2
|
+
import { IQuestionComment } from './Question';
|
|
3
|
+
import { Id } from './Type';
|
|
4
|
+
import { IUser } from './User';
|
|
5
|
+
export declare const enum ENotificationType {
|
|
6
|
+
COMMENT = "COMMENT",
|
|
7
|
+
ANNOUNCEMENT = "ANNOUNCEMENT",
|
|
8
|
+
FRIEND_REQUEST = "FRIEND_REQUEST"
|
|
9
|
+
}
|
|
10
|
+
export declare const enum ENotificationActionType {
|
|
11
|
+
REPLY = "REPLY",
|
|
12
|
+
UP_VOTE = "UP_VOTE",
|
|
13
|
+
DOWN_VOTE = "DOWN_VOTE",
|
|
14
|
+
LIKE = "LIKE",
|
|
15
|
+
DISLIKE = "DISLIKE",
|
|
16
|
+
FEATURE = "FEATURE",
|
|
17
|
+
WARNING = "WARNING",
|
|
18
|
+
REQUESTED = "REQUESTED",
|
|
19
|
+
ACCEPTED = "ACCEPTED"
|
|
20
|
+
}
|
|
21
|
+
export interface INotification {
|
|
22
|
+
id: Id;
|
|
23
|
+
createdAt: number | Date;
|
|
24
|
+
updatedAt: number | Date;
|
|
25
|
+
userId: Id | null;
|
|
26
|
+
user?: IUser;
|
|
27
|
+
parentId: Id | null;
|
|
28
|
+
parentUser?: IUser;
|
|
29
|
+
commentId: Id | null;
|
|
30
|
+
comment?: IQuestionComment;
|
|
31
|
+
conceptId: Id | null;
|
|
32
|
+
concept?: IConcept;
|
|
33
|
+
description: string;
|
|
34
|
+
actionType: ENotificationActionType;
|
|
35
|
+
type: ENotificationType;
|
|
36
|
+
_global: boolean;
|
|
37
|
+
_read: boolean;
|
|
38
|
+
_deleted: boolean;
|
|
39
|
+
}
|
package/models/OsceMarksheet.js
CHANGED
|
@@ -50,8 +50,7 @@ function createTimerPayload(osceMarksheet) {
|
|
|
50
50
|
stage: EOsceStage.READING,
|
|
51
51
|
state: EOsceTimerState.PAUSE,
|
|
52
52
|
};
|
|
53
|
-
if (!osceMarksheet.
|
|
54
|
-
!osceMarksheet.endedAt ||
|
|
53
|
+
if (!osceMarksheet.endedAt ||
|
|
55
54
|
!osceMarksheet.readingTime ||
|
|
56
55
|
!osceMarksheet.stationTime ||
|
|
57
56
|
!osceMarksheet.feedbackTime) {
|
|
@@ -66,7 +65,7 @@ function createTimerPayload(osceMarksheet) {
|
|
|
66
65
|
endedAt = osceMarksheet.endedAt;
|
|
67
66
|
}
|
|
68
67
|
else {
|
|
69
|
-
endedAt = Math.floor(osceMarksheet.endedAt.getTime() / 1000);
|
|
68
|
+
endedAt = Math.floor(new Date(osceMarksheet.endedAt).getTime() / 1000);
|
|
70
69
|
}
|
|
71
70
|
// calculate duration from pause timestamp or from current time
|
|
72
71
|
let timeRemainingDuration = endedAt - Math.floor(Date.now() / 1000);
|
|
@@ -79,7 +78,7 @@ function createTimerPayload(osceMarksheet) {
|
|
|
79
78
|
pausedAt = osceMarksheet.pausedAt;
|
|
80
79
|
}
|
|
81
80
|
else {
|
|
82
|
-
pausedAt = Math.floor(osceMarksheet.pausedAt.getTime() / 1000);
|
|
81
|
+
pausedAt = Math.floor(new Date(osceMarksheet.pausedAt).getTime() / 1000);
|
|
83
82
|
}
|
|
84
83
|
timeRemainingDuration = endedAt - pausedAt;
|
|
85
84
|
payload.state = EOsceTimerState.PAUSE;
|
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/models/User.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ICard } from './Card';
|
|
2
2
|
import { IConcept } from './Concept';
|
|
3
3
|
import { IMarksheet, IMarksheetMark } from './Marksheet';
|
|
4
|
+
import { INotification } from './Notification';
|
|
4
5
|
import { IQuestion } from './Question';
|
|
5
6
|
import { ISubscription } from './Subscription';
|
|
6
7
|
import { ITodo } from './Todo';
|
|
@@ -29,6 +30,11 @@ export interface IPayload {
|
|
|
29
30
|
stripeOsceSubscriptionEndDate: number | null;
|
|
30
31
|
stripeBundleSubscriptionEndDate: number | null;
|
|
31
32
|
}
|
|
33
|
+
export interface IDailyProgressInfo {
|
|
34
|
+
totalCount: number;
|
|
35
|
+
totalCorrect: number;
|
|
36
|
+
dateString: string;
|
|
37
|
+
}
|
|
32
38
|
export interface IUser {
|
|
33
39
|
id: Id;
|
|
34
40
|
createdAt: number | Date;
|
|
@@ -75,11 +81,7 @@ export interface IUser {
|
|
|
75
81
|
completedRedCardsCount?: number | null;
|
|
76
82
|
dailyFeed: ITodo;
|
|
77
83
|
dailyProgress: IDailyProgressInfo[];
|
|
78
|
-
|
|
79
|
-
export interface IDailyProgressInfo {
|
|
80
|
-
totalCount: number;
|
|
81
|
-
totalCorrect: number;
|
|
82
|
-
dateString: string;
|
|
84
|
+
notifications: INotification[];
|
|
83
85
|
}
|
|
84
86
|
export declare function currentClassYear(createdAtUnix: number, classYear: IClassYear): IClassYear;
|
|
85
87
|
export declare function currentClassGroup(createdAtUnix: number, classYear: IClassYear): EClassYearGroup;
|
package/models/index.d.ts
CHANGED
package/models/index.js
CHANGED
|
@@ -21,6 +21,7 @@ __exportStar(require("./Feedback"), exports);
|
|
|
21
21
|
__exportStar(require("./File"), exports);
|
|
22
22
|
__exportStar(require("./Marksheet"), exports);
|
|
23
23
|
__exportStar(require("./MockTest"), exports);
|
|
24
|
+
__exportStar(require("./Notification"), exports);
|
|
24
25
|
__exportStar(require("./OsceMarksheet"), exports);
|
|
25
26
|
__exportStar(require("./OsceStation"), exports);
|
|
26
27
|
__exportStar(require("./Picture"), exports);
|
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
|
+
`;
|
|
@@ -12,3 +12,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./algoliaSync"), exports);
|
|
14
14
|
__exportStar(require("./token"), exports);
|
|
15
|
+
__exportStar(require("./notification"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ENotificationActionType, ENotificationType, INotification } from '../../../models';
|
|
2
|
+
import { AdminData } from '../../types';
|
|
3
|
+
export interface IAdminAddNotificationInput {
|
|
4
|
+
description: string;
|
|
5
|
+
actionType: ENotificationActionType;
|
|
6
|
+
type: ENotificationType;
|
|
7
|
+
}
|
|
8
|
+
export declare type IAdminAddNotificationVar = {
|
|
9
|
+
data: IAdminAddNotificationInput;
|
|
10
|
+
};
|
|
11
|
+
export declare type IAdminAddNotificationData = AdminData<INotification, 'addNotification'>;
|
|
12
|
+
export declare type IAdminAddNotificationsVar = {
|
|
13
|
+
data: IAdminAddNotificationInput[];
|
|
14
|
+
};
|
|
15
|
+
export declare type IAdminAddNotificationsData = AdminData<INotification[], 'addNotifications'>;
|
|
@@ -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
|
}
|