@quesmed/types-rn 2.0.4
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/User.d.ts +12 -0
- package/gql_input_output_types/User.js +2 -0
- package/gql_input_output_types/index.d.ts +75 -0
- package/gql_input_output_types/index.js +2 -0
- package/index.d.ts +22 -0
- package/index.js +124 -0
- package/models/Author.d.ts +14 -0
- package/models/Author.js +2 -0
- package/models/Blog.d.ts +15 -0
- package/models/Blog.js +2 -0
- package/models/Book.d.ts +22 -0
- package/models/Book.js +2 -0
- package/models/Card.d.ts +16 -0
- package/models/Card.js +2 -0
- package/models/Chapter.d.ts +15 -0
- package/models/Chapter.js +2 -0
- package/models/Concept.d.ts +15 -0
- package/models/Concept.js +2 -0
- package/models/Difficulty.d.ts +6 -0
- package/models/Difficulty.js +10 -0
- package/models/Feedback.d.ts +8 -0
- package/models/Feedback.js +2 -0
- package/models/File.d.ts +10 -0
- package/models/File.js +2 -0
- package/models/Marksheet.d.ts +36 -0
- package/models/Marksheet.js +2 -0
- package/models/MockTest.d.ts +22 -0
- package/models/MockTest.js +2 -0
- package/models/OsceMarksheet.d.ts +105 -0
- package/models/OsceMarksheet.js +103 -0
- package/models/OsceStation.d.ts +54 -0
- package/models/OsceStation.js +45 -0
- package/models/Picture.d.ts +14 -0
- package/models/Picture.js +2 -0
- package/models/Promo.d.ts +14 -0
- package/models/Promo.js +2 -0
- package/models/Question.d.ts +115 -0
- package/models/Question.js +43 -0
- package/models/Subscription.d.ts +17 -0
- package/models/Subscription.js +9 -0
- package/models/Todo.d.ts +33 -0
- package/models/Todo.js +2 -0
- package/models/Token.d.ts +9 -0
- package/models/Token.js +2 -0
- package/models/Topic.d.ts +32 -0
- package/models/Topic.js +13 -0
- package/models/Type.d.ts +7 -0
- package/models/Type.js +2 -0
- package/models/University.d.ts +5 -0
- package/models/University.js +2 -0
- package/models/User.d.ts +119 -0
- package/models/User.js +70 -0
- package/models/Video.d.ts +26 -0
- package/models/Video.js +2 -0
- package/models/index.d.ts +24 -0
- package/models/index.js +36 -0
- package/package.json +35 -0
- package/resolvers/apollo.d.ts +8 -0
- package/resolvers/apollo.js +2 -0
- package/resolvers/fragments/blog.d.ts +1 -0
- package/resolvers/fragments/blog.js +17 -0
- package/resolvers/fragments/chapter.d.ts +1 -0
- package/resolvers/fragments/chapter.js +25 -0
- package/resolvers/fragments/concept.d.ts +3 -0
- package/resolvers/fragments/concept.js +79 -0
- package/resolvers/fragments/index.d.ts +7 -0
- package/resolvers/fragments/index.js +19 -0
- package/resolvers/fragments/osce.d.ts +5 -0
- package/resolvers/fragments/osce.js +139 -0
- package/resolvers/fragments/picture.d.ts +1 -0
- package/resolvers/fragments/picture.js +22 -0
- package/resolvers/fragments/user.d.ts +1 -0
- package/resolvers/fragments/user.js +39 -0
- package/resolvers/fragments/video.d.ts +2 -0
- package/resolvers/fragments/video.js +58 -0
- package/resolvers/index.d.ts +12 -0
- package/resolvers/index.js +38 -0
- package/resolvers/mutation/admin/algoliaSync.d.ts +9 -0
- package/resolvers/mutation/admin/algoliaSync.js +2 -0
- package/resolvers/mutation/admin/index.d.ts +2 -0
- package/resolvers/mutation/admin/index.js +14 -0
- package/resolvers/mutation/admin/token.d.ts +25 -0
- package/resolvers/mutation/admin/token.js +2 -0
- package/resolvers/mutation/index.d.ts +5 -0
- package/resolvers/mutation/index.js +30 -0
- package/resolvers/mutation/restricted/agora.d.ts +10 -0
- package/resolvers/mutation/restricted/agora.js +11 -0
- package/resolvers/mutation/restricted/contactUs.d.ts +17 -0
- package/resolvers/mutation/restricted/contactUs.js +2 -0
- package/resolvers/mutation/restricted/index.d.ts +10 -0
- package/resolvers/mutation/restricted/index.js +22 -0
- package/resolvers/mutation/restricted/marksheet.d.ts +41 -0
- package/resolvers/mutation/restricted/marksheet.js +2 -0
- package/resolvers/mutation/restricted/mockTest.d.ts +16 -0
- package/resolvers/mutation/restricted/mockTest.js +2 -0
- package/resolvers/mutation/restricted/osce.d.ts +87 -0
- package/resolvers/mutation/restricted/osce.js +222 -0
- package/resolvers/mutation/restricted/questionDiscussion.d.ts +24 -0
- package/resolvers/mutation/restricted/questionDiscussion.js +2 -0
- package/resolvers/mutation/restricted/todo.d.ts +32 -0
- package/resolvers/mutation/restricted/todo.js +2 -0
- package/resolvers/mutation/restricted/token.d.ts +21 -0
- package/resolvers/mutation/restricted/token.js +2 -0
- package/resolvers/mutation/restricted/users.d.ts +29 -0
- package/resolvers/mutation/restricted/users.js +11 -0
- package/resolvers/mutation/restricted/video.d.ts +6 -0
- package/resolvers/mutation/restricted/video.js +2 -0
- package/resolvers/mutation/stripe.d.ts +11 -0
- package/resolvers/mutation/stripe.js +2 -0
- package/resolvers/mutation/users.d.ts +32 -0
- package/resolvers/mutation/users.js +2 -0
- package/resolvers/mutation/validUserToken/index.d.ts +1 -0
- package/resolvers/mutation/validUserToken/index.js +13 -0
- package/resolvers/mutation/validUserToken/user.d.ts +14 -0
- package/resolvers/mutation/validUserToken/user.js +2 -0
- package/resolvers/query/admin/getUserToken.d.ts +5 -0
- package/resolvers/query/admin/getUserToken.js +2 -0
- package/resolvers/query/admin/index.d.ts +1 -0
- package/resolvers/query/admin/index.js +13 -0
- package/resolvers/query/author.d.ts +3 -0
- package/resolvers/query/author.js +2 -0
- package/resolvers/query/blog.d.ts +15 -0
- package/resolvers/query/blog.js +36 -0
- package/resolvers/query/book.d.ts +8 -0
- package/resolvers/query/book.js +2 -0
- package/resolvers/query/feedback.d.ts +3 -0
- package/resolvers/query/feedback.js +2 -0
- package/resolvers/query/index.d.ts +11 -0
- package/resolvers/query/index.js +36 -0
- package/resolvers/query/restricted/index.d.ts +10 -0
- package/resolvers/query/restricted/index.js +22 -0
- package/resolvers/query/restricted/marksheet.d.ts +47 -0
- package/resolvers/query/restricted/marksheet.js +2 -0
- package/resolvers/query/restricted/mockTests.d.ts +10 -0
- package/resolvers/query/restricted/mockTests.js +2 -0
- package/resolvers/query/restricted/osce.d.ts +45 -0
- package/resolvers/query/restricted/osce.js +118 -0
- package/resolvers/query/restricted/quesBook.d.ts +7 -0
- package/resolvers/query/restricted/quesBook.js +17 -0
- package/resolvers/query/restricted/replication.d.ts +32 -0
- package/resolvers/query/restricted/replication.js +184 -0
- package/resolvers/query/restricted/todos.d.ts +15 -0
- package/resolvers/query/restricted/todos.js +2 -0
- package/resolvers/query/restricted/topics.d.ts +10 -0
- package/resolvers/query/restricted/topics.js +2 -0
- package/resolvers/query/restricted/university.d.ts +15 -0
- package/resolvers/query/restricted/university.js +2 -0
- package/resolvers/query/restricted/user.d.ts +13 -0
- package/resolvers/query/restricted/user.js +2 -0
- package/resolvers/query/restricted/video.d.ts +11 -0
- package/resolvers/query/restricted/video.js +2 -0
- package/resolvers/query/sample.d.ts +26 -0
- package/resolvers/query/sample.js +98 -0
- package/resolvers/query/subscription.d.ts +3 -0
- package/resolvers/query/subscription.js +2 -0
- package/resolvers/query/university.d.ts +6 -0
- package/resolvers/query/university.js +2 -0
- package/resolvers/query/user.d.ts +13 -0
- package/resolvers/query/user.js +2 -0
- package/resolvers/query/video.d.ts +15 -0
- package/resolvers/query/video.js +2 -0
- package/resolvers/subscription/index.d.ts +1 -0
- package/resolvers/subscription/index.js +13 -0
- package/resolvers/subscription/osce.d.ts +66 -0
- package/resolvers/subscription/osce.js +108 -0
- package/resolvers/types.d.ts +10 -0
- package/resolvers/types.js +2 -0
- package/utils/commonFunctions.d.ts +9 -0
- package/utils/commonFunctions.js +256 -0
- package/utils/index.d.ts +9 -0
- package/utils/index.js +42 -0
- package/utils/lightgallery.d.ts +9 -0
- package/utils/lightgallery.js +88 -0
- package/utils/offlineLink.d.ts +64 -0
- package/utils/offlineLink.js +221 -0
- package/utils/random.d.ts +1 -0
- package/utils/random.js +20 -0
- package/utils/uuid4.d.ts +107 -0
- package/utils/uuid4.js +282 -0
- package/utils/webSocketLink.d.ts +7 -0
- package/utils/webSocketLink.js +22 -0
- package/utils/wordsToNumber.d.ts +1 -0
- package/utils/wordsToNumber.js +48 -0
package/models/User.d.ts
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { ICard } from './Card';
|
|
2
|
+
import { IConcept } from './Concept';
|
|
3
|
+
import { IMarksheet, IMarksheetMark } from './Marksheet';
|
|
4
|
+
import { IQuestion } from './Question';
|
|
5
|
+
import { ISubscription } from './Subscription';
|
|
6
|
+
import { Id } from './Type';
|
|
7
|
+
import { IUniversity } from './University';
|
|
8
|
+
export declare type IAccessLevel = 'subscriber' | 'administrator' | 'tutor';
|
|
9
|
+
export declare type IClassYear = 'Year 1' | 'Year 2' | 'Year 3' | 'Year 4' | 'Year 5' | 'Graduated' | 'PhD' | 'BSc' | 'MSc' | 'Beta Tester';
|
|
10
|
+
export declare const classYears: IClassYear[];
|
|
11
|
+
export declare enum EClassYearGroup {
|
|
12
|
+
PRECLINICAL = 0,
|
|
13
|
+
CLINICAL = 1
|
|
14
|
+
}
|
|
15
|
+
export declare const classYearGroup: {
|
|
16
|
+
[key: string]: EClassYearGroup;
|
|
17
|
+
};
|
|
18
|
+
export interface IPayload {
|
|
19
|
+
id: Id;
|
|
20
|
+
displayName: string;
|
|
21
|
+
firstName: string;
|
|
22
|
+
lastName: string;
|
|
23
|
+
username: string;
|
|
24
|
+
accessLevel: IAccessLevel;
|
|
25
|
+
tocAccepted: boolean;
|
|
26
|
+
exp: number;
|
|
27
|
+
stripeQBankSubscriptionEndDate: number | null;
|
|
28
|
+
stripeOsceSubscriptionEndDate: number | null;
|
|
29
|
+
stripeBundleSubscriptionEndDate: number | null;
|
|
30
|
+
}
|
|
31
|
+
export interface IUser {
|
|
32
|
+
id: Id;
|
|
33
|
+
createdAt: number | Date;
|
|
34
|
+
updatedAt: number | Date;
|
|
35
|
+
displayName: string;
|
|
36
|
+
username: string;
|
|
37
|
+
firstName: string;
|
|
38
|
+
lastName: string;
|
|
39
|
+
tocAccepted: boolean;
|
|
40
|
+
dailyFeedResetTime: number;
|
|
41
|
+
dailyFeedMax: number;
|
|
42
|
+
stripeCustomerId: string;
|
|
43
|
+
stripeLastSyncAt: number | Date | null;
|
|
44
|
+
qBankSubscriptionId: Id;
|
|
45
|
+
qBankSubscription: ISubscription | null;
|
|
46
|
+
stripeQBankSubscriptionId: string;
|
|
47
|
+
stripeQBankSubscriptionEndDate: number | Date;
|
|
48
|
+
osceSubscriptionId: Id;
|
|
49
|
+
osceSubscription: ISubscription | null;
|
|
50
|
+
stripeOsceSubscriptionId: string;
|
|
51
|
+
stripeOsceSubscriptionEndDate: number | Date;
|
|
52
|
+
bundleSubscriptionId: Id;
|
|
53
|
+
bundleSubscription: ISubscription | null;
|
|
54
|
+
stripeBundleSubscriptionId: string;
|
|
55
|
+
stripeBundleSubscriptionEndDate: number | Date;
|
|
56
|
+
referralCount: number;
|
|
57
|
+
classYear: IClassYear;
|
|
58
|
+
graduationYear: number;
|
|
59
|
+
universityId: Id;
|
|
60
|
+
university: IUniversity;
|
|
61
|
+
examDate: number | Date | null;
|
|
62
|
+
accessLevel: IAccessLevel;
|
|
63
|
+
elo: number;
|
|
64
|
+
marksheets: IMarksheet[];
|
|
65
|
+
completedQuestions: IUserCompletedQuestions[];
|
|
66
|
+
completedCards: IUserCompletedCards[];
|
|
67
|
+
marksheetsCount?: number | null;
|
|
68
|
+
completedQuestionsCount?: number | null;
|
|
69
|
+
completedCorrectQuestionsCount?: number | null;
|
|
70
|
+
completedIncorrectQuestionsCount?: number | null;
|
|
71
|
+
completedCardsCount?: number | null;
|
|
72
|
+
completedGreenCardsCount?: number | null;
|
|
73
|
+
completedYellowCardsCount?: number | null;
|
|
74
|
+
completedRedCardsCount?: number | null;
|
|
75
|
+
}
|
|
76
|
+
export declare function currentClassYear(createdAtUnix: number, classYear: IClassYear): IClassYear;
|
|
77
|
+
export declare function currentClassGroup(createdAtUnix: number, classYear: IClassYear): EClassYearGroup;
|
|
78
|
+
export interface IUserCompletedQuestions {
|
|
79
|
+
id: Id;
|
|
80
|
+
createdAt: number | Date;
|
|
81
|
+
updatedAt: number | Date;
|
|
82
|
+
questionId: Id;
|
|
83
|
+
userId: Id;
|
|
84
|
+
correct: boolean;
|
|
85
|
+
question: IQuestion;
|
|
86
|
+
concept: IConcept;
|
|
87
|
+
}
|
|
88
|
+
export interface IUserCompletedCards {
|
|
89
|
+
id: Id;
|
|
90
|
+
createdAt: number | Date;
|
|
91
|
+
updatedAt: number | Date;
|
|
92
|
+
cardId: Id;
|
|
93
|
+
card: ICard;
|
|
94
|
+
userId: Id;
|
|
95
|
+
concept: IConcept;
|
|
96
|
+
lastSeen: number | Date;
|
|
97
|
+
score: number;
|
|
98
|
+
iteration: number;
|
|
99
|
+
optimalFactor: number;
|
|
100
|
+
}
|
|
101
|
+
export interface IUserFlaggedQuestion {
|
|
102
|
+
id: Id;
|
|
103
|
+
createdAt: number | Date;
|
|
104
|
+
updatedAt: number | Date;
|
|
105
|
+
questionId: Id;
|
|
106
|
+
question: IQuestion;
|
|
107
|
+
userId: Id;
|
|
108
|
+
markId: Id;
|
|
109
|
+
mark: IMarksheetMark;
|
|
110
|
+
}
|
|
111
|
+
export interface IUserProgress {
|
|
112
|
+
id: Id;
|
|
113
|
+
date: number | Date;
|
|
114
|
+
userId: Id;
|
|
115
|
+
topicId: Id;
|
|
116
|
+
count: number;
|
|
117
|
+
correct: number;
|
|
118
|
+
countCards: number;
|
|
119
|
+
}
|
package/models/User.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.currentClassGroup = exports.currentClassYear = exports.classYearGroup = exports.EClassYearGroup = exports.classYears = void 0;
|
|
4
|
+
exports.classYears = [
|
|
5
|
+
'Year 1',
|
|
6
|
+
'Year 2',
|
|
7
|
+
'Year 3',
|
|
8
|
+
'Year 4',
|
|
9
|
+
'Year 5',
|
|
10
|
+
'Graduated',
|
|
11
|
+
];
|
|
12
|
+
var EClassYearGroup;
|
|
13
|
+
(function (EClassYearGroup) {
|
|
14
|
+
EClassYearGroup[EClassYearGroup["PRECLINICAL"] = 0] = "PRECLINICAL";
|
|
15
|
+
EClassYearGroup[EClassYearGroup["CLINICAL"] = 1] = "CLINICAL";
|
|
16
|
+
})(EClassYearGroup = exports.EClassYearGroup || (exports.EClassYearGroup = {}));
|
|
17
|
+
exports.classYearGroup = {
|
|
18
|
+
'Year 1': EClassYearGroup.PRECLINICAL,
|
|
19
|
+
'Year 2': EClassYearGroup.PRECLINICAL,
|
|
20
|
+
'Year 3': EClassYearGroup.CLINICAL,
|
|
21
|
+
'Year 4': EClassYearGroup.CLINICAL,
|
|
22
|
+
'Year 5': EClassYearGroup.CLINICAL,
|
|
23
|
+
Graduated: EClassYearGroup.CLINICAL,
|
|
24
|
+
PhD: EClassYearGroup.CLINICAL,
|
|
25
|
+
BSc: EClassYearGroup.PRECLINICAL,
|
|
26
|
+
MSc: EClassYearGroup.CLINICAL,
|
|
27
|
+
'Beta Tester': EClassYearGroup.CLINICAL,
|
|
28
|
+
};
|
|
29
|
+
function currentClassYear(createdAtUnix, classYear) {
|
|
30
|
+
if (createdAtUnix === 0) {
|
|
31
|
+
throw new Error('createdAt not given in Unix');
|
|
32
|
+
}
|
|
33
|
+
if (!createdAtUnix) {
|
|
34
|
+
return classYear;
|
|
35
|
+
}
|
|
36
|
+
const lastClassYearIdx = exports.classYears.length - 1;
|
|
37
|
+
const classYearsIdx = exports.classYears.findIndex((x) => x === classYear);
|
|
38
|
+
if (classYearsIdx === -1) {
|
|
39
|
+
return exports.classYears[lastClassYearIdx];
|
|
40
|
+
}
|
|
41
|
+
const now = new Date();
|
|
42
|
+
const currentYear = now.getFullYear();
|
|
43
|
+
const createdAt = new Date(createdAtUnix * 1000);
|
|
44
|
+
if (createdAt.getFullYear() > now.getFullYear()) {
|
|
45
|
+
throw new Error('createdAt not given in Unix');
|
|
46
|
+
}
|
|
47
|
+
const createdYear = createdAt.getFullYear();
|
|
48
|
+
let yearsAdded = currentYear - createdYear;
|
|
49
|
+
const createdAcademicYear = new Date(createdYear, 7, 1);
|
|
50
|
+
const nowAcademicYear = new Date(currentYear, 7, 1);
|
|
51
|
+
if (createdAt > createdAcademicYear) {
|
|
52
|
+
yearsAdded--;
|
|
53
|
+
}
|
|
54
|
+
if (now > nowAcademicYear) {
|
|
55
|
+
yearsAdded++;
|
|
56
|
+
}
|
|
57
|
+
const newClassYearIdx = classYearsIdx + yearsAdded;
|
|
58
|
+
return newClassYearIdx > lastClassYearIdx
|
|
59
|
+
? exports.classYears[lastClassYearIdx]
|
|
60
|
+
: exports.classYears[newClassYearIdx];
|
|
61
|
+
}
|
|
62
|
+
exports.currentClassYear = currentClassYear;
|
|
63
|
+
function currentClassGroup(createdAtUnix, classYear) {
|
|
64
|
+
const currentClass = currentClassYear(createdAtUnix, classYear);
|
|
65
|
+
if (!exports.classYearGroup.hasOwnProperty(currentClass)) {
|
|
66
|
+
return EClassYearGroup.CLINICAL;
|
|
67
|
+
}
|
|
68
|
+
return exports.classYearGroup[currentClass];
|
|
69
|
+
}
|
|
70
|
+
exports.currentClassGroup = currentClassGroup;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IConcept } from './Concept';
|
|
2
|
+
import { IFile } from './File';
|
|
3
|
+
import { IOsceStation } from './OsceStation';
|
|
4
|
+
import { Id } from './Type';
|
|
5
|
+
export interface IVideo {
|
|
6
|
+
id: Id;
|
|
7
|
+
createdAt: number | Date;
|
|
8
|
+
updatedAt: number | Date;
|
|
9
|
+
startTime: number | Date;
|
|
10
|
+
endTime: number | Date;
|
|
11
|
+
title: string;
|
|
12
|
+
museId: string;
|
|
13
|
+
thumbnail: string;
|
|
14
|
+
views: number;
|
|
15
|
+
live: boolean;
|
|
16
|
+
description: string;
|
|
17
|
+
duration: number;
|
|
18
|
+
concepts: IConcept[];
|
|
19
|
+
osceStation: IOsceStation;
|
|
20
|
+
files: IFile[];
|
|
21
|
+
send1hrPushAt: number | Date | null;
|
|
22
|
+
sent1hrPushAt: number | Date | null;
|
|
23
|
+
send24hrPushAt: number | Date | null;
|
|
24
|
+
sent24hrPushAt: number | Date | null;
|
|
25
|
+
viewsToday?: number | null;
|
|
26
|
+
}
|
package/models/Video.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from './Author';
|
|
2
|
+
export * from './Blog';
|
|
3
|
+
export * from './Book';
|
|
4
|
+
export * from './Card';
|
|
5
|
+
export * from './Chapter';
|
|
6
|
+
export * from './Concept';
|
|
7
|
+
export * from './Difficulty';
|
|
8
|
+
export * from './Feedback';
|
|
9
|
+
export * from './File';
|
|
10
|
+
export * from './Marksheet';
|
|
11
|
+
export * from './MockTest';
|
|
12
|
+
export * from './OsceMarksheet';
|
|
13
|
+
export * from './OsceStation';
|
|
14
|
+
export * from './Picture';
|
|
15
|
+
export * from './Promo';
|
|
16
|
+
export * from './Question';
|
|
17
|
+
export * from './Subscription';
|
|
18
|
+
export * from './Todo';
|
|
19
|
+
export * from './Token';
|
|
20
|
+
export * from './Topic';
|
|
21
|
+
export * from './Type';
|
|
22
|
+
export * from './University';
|
|
23
|
+
export * from './User';
|
|
24
|
+
export * from './Video';
|
package/models/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./Author"), exports);
|
|
14
|
+
__exportStar(require("./Blog"), exports);
|
|
15
|
+
__exportStar(require("./Book"), exports);
|
|
16
|
+
__exportStar(require("./Card"), exports);
|
|
17
|
+
__exportStar(require("./Chapter"), exports);
|
|
18
|
+
__exportStar(require("./Concept"), exports);
|
|
19
|
+
__exportStar(require("./Difficulty"), exports);
|
|
20
|
+
__exportStar(require("./Feedback"), exports);
|
|
21
|
+
__exportStar(require("./File"), exports);
|
|
22
|
+
__exportStar(require("./Marksheet"), exports);
|
|
23
|
+
__exportStar(require("./MockTest"), exports);
|
|
24
|
+
__exportStar(require("./OsceMarksheet"), exports);
|
|
25
|
+
__exportStar(require("./OsceStation"), exports);
|
|
26
|
+
__exportStar(require("./Picture"), exports);
|
|
27
|
+
__exportStar(require("./Promo"), exports);
|
|
28
|
+
__exportStar(require("./Question"), exports);
|
|
29
|
+
__exportStar(require("./Subscription"), exports);
|
|
30
|
+
__exportStar(require("./Todo"), exports);
|
|
31
|
+
__exportStar(require("./Token"), exports);
|
|
32
|
+
__exportStar(require("./Topic"), exports);
|
|
33
|
+
__exportStar(require("./Type"), exports);
|
|
34
|
+
__exportStar(require("./University"), exports);
|
|
35
|
+
__exportStar(require("./User"), exports);
|
|
36
|
+
__exportStar(require("./Video"), exports);
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@quesmed/types-rn",
|
|
3
|
+
"version": "2.0.4",
|
|
4
|
+
"description": "Typescript types for Quesmed",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"quesmed",
|
|
7
|
+
"types",
|
|
8
|
+
"typescript"
|
|
9
|
+
],
|
|
10
|
+
"main": "index.js",
|
|
11
|
+
"types": "index.d.ts",
|
|
12
|
+
"author": "stefan@quesmed.com",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/Quesmed/quesmed_types/issues"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/Quesmed/quesmed_types.git"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/Quesmed/quesmed_types#readme",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@apollo/client": "^3.5.7",
|
|
24
|
+
"@react-native-async-storage/async-storage": "^1.15.16",
|
|
25
|
+
"@types/react-native": "^0.66.15",
|
|
26
|
+
"localforage": "^1.10.0",
|
|
27
|
+
"react-native": "^0.67.1",
|
|
28
|
+
"react-native-expo-image-cache": "^4.1.0"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"graphql": "^16.2.0",
|
|
32
|
+
"graphql-ws": "^5.5.5",
|
|
33
|
+
"react": "^17"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DefaultContext, FetchResult } from '@apollo/client';
|
|
2
|
+
export declare type ApolloUpdateResultRestricted<T> = Omit<FetchResult<{
|
|
3
|
+
restricted: T;
|
|
4
|
+
}>, 'context'>;
|
|
5
|
+
export interface ApolloUpdateOptions {
|
|
6
|
+
context?: DefaultContext;
|
|
7
|
+
variables?: Record<string, any>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BLOG_POST_FIELDS: import("@apollo/client").DocumentNode;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BLOG_POST_FIELDS = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
exports.BLOG_POST_FIELDS = (0, client_1.gql) `
|
|
6
|
+
fragment BlogPostFields on BlogPost {
|
|
7
|
+
id
|
|
8
|
+
createdAt
|
|
9
|
+
updatedAt
|
|
10
|
+
title
|
|
11
|
+
body
|
|
12
|
+
tags {
|
|
13
|
+
id
|
|
14
|
+
name
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CHAPTER_FIELDS: import("@apollo/client").DocumentNode;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CHAPTER_FIELDS = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
const picture_1 = require("./picture");
|
|
6
|
+
exports.CHAPTER_FIELDS = (0, client_1.gql) `
|
|
7
|
+
${picture_1.PICTURE_FIELDS}
|
|
8
|
+
fragment ChapterFields on Chapter {
|
|
9
|
+
id
|
|
10
|
+
createdAt
|
|
11
|
+
updatedAt
|
|
12
|
+
explanation
|
|
13
|
+
typeId
|
|
14
|
+
pictures {
|
|
15
|
+
...PictureFields
|
|
16
|
+
}
|
|
17
|
+
files {
|
|
18
|
+
id
|
|
19
|
+
title
|
|
20
|
+
url
|
|
21
|
+
videoId
|
|
22
|
+
conceptId
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONCEPT_VIDEO_FIELDS = exports.CONCEPT_FIELDS = exports.CONCEPT_TOPIC_FIELDS = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
const chapter_1 = require("./chapter");
|
|
6
|
+
const video_1 = require("./video");
|
|
7
|
+
exports.CONCEPT_TOPIC_FIELDS = (0, client_1.gql) `
|
|
8
|
+
fragment ConceptTopicFields on Topic {
|
|
9
|
+
id
|
|
10
|
+
name
|
|
11
|
+
typeId
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
exports.CONCEPT_FIELDS = (0, client_1.gql) `
|
|
15
|
+
${chapter_1.CHAPTER_FIELDS}
|
|
16
|
+
${exports.CONCEPT_TOPIC_FIELDS}
|
|
17
|
+
fragment ConceptFields on Concept {
|
|
18
|
+
id
|
|
19
|
+
createdAt
|
|
20
|
+
updatedAt
|
|
21
|
+
name
|
|
22
|
+
chapterId
|
|
23
|
+
chapter {
|
|
24
|
+
...ChapterFields
|
|
25
|
+
}
|
|
26
|
+
topicId
|
|
27
|
+
topic {
|
|
28
|
+
...ConceptTopicFields
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
exports.CONCEPT_VIDEO_FIELDS = (0, client_1.gql) `
|
|
33
|
+
${chapter_1.CHAPTER_FIELDS}
|
|
34
|
+
${exports.CONCEPT_TOPIC_FIELDS}
|
|
35
|
+
${video_1.VIDEO_FILE_FIELDS}
|
|
36
|
+
fragment ConceptVideoFields on Concept {
|
|
37
|
+
id
|
|
38
|
+
createdAt
|
|
39
|
+
updatedAt
|
|
40
|
+
name
|
|
41
|
+
chapterId
|
|
42
|
+
chapter {
|
|
43
|
+
...ChapterFields
|
|
44
|
+
}
|
|
45
|
+
topicId
|
|
46
|
+
topic {
|
|
47
|
+
...ConceptTopicFields
|
|
48
|
+
}
|
|
49
|
+
videos {
|
|
50
|
+
id
|
|
51
|
+
title
|
|
52
|
+
museId
|
|
53
|
+
thumbnail
|
|
54
|
+
views
|
|
55
|
+
concepts {
|
|
56
|
+
id
|
|
57
|
+
createdAt
|
|
58
|
+
updatedAt
|
|
59
|
+
name
|
|
60
|
+
chapterId
|
|
61
|
+
chapter {
|
|
62
|
+
...ChapterFields
|
|
63
|
+
}
|
|
64
|
+
topicId
|
|
65
|
+
topic {
|
|
66
|
+
...ConceptTopicFields
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
live
|
|
70
|
+
description
|
|
71
|
+
duration
|
|
72
|
+
startTime
|
|
73
|
+
endTime
|
|
74
|
+
files {
|
|
75
|
+
...VideoFileFields
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./blog"), exports);
|
|
14
|
+
__exportStar(require("./chapter"), exports);
|
|
15
|
+
__exportStar(require("./concept"), exports);
|
|
16
|
+
__exportStar(require("./osce"), exports);
|
|
17
|
+
__exportStar(require("./picture"), exports);
|
|
18
|
+
__exportStar(require("./user"), exports);
|
|
19
|
+
__exportStar(require("./video"), exports);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const OSCE_STATION_MARK_FIELDS: import("@apollo/client").DocumentNode;
|
|
2
|
+
export declare const OSCE_STATION_FIELDS: import("@apollo/client").DocumentNode;
|
|
3
|
+
export declare const OSCE_MARKSHEET_MARK_FIELDS: import("@apollo/client").DocumentNode;
|
|
4
|
+
export declare const OSCE_MARKSHEET_FIELDS: import("@apollo/client").DocumentNode;
|
|
5
|
+
export declare const OSCE_MATCHMAKING_ACTION_FIELDS: import("@apollo/client").DocumentNode;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OSCE_MATCHMAKING_ACTION_FIELDS = exports.OSCE_MARKSHEET_FIELDS = exports.OSCE_MARKSHEET_MARK_FIELDS = exports.OSCE_STATION_FIELDS = exports.OSCE_STATION_MARK_FIELDS = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
const picture_1 = require("./picture");
|
|
6
|
+
exports.OSCE_STATION_MARK_FIELDS = (0, client_1.gql) `
|
|
7
|
+
fragment OsceStationMarkFields on OsceStationMark {
|
|
8
|
+
id
|
|
9
|
+
index
|
|
10
|
+
osceStationId
|
|
11
|
+
header
|
|
12
|
+
name
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
exports.OSCE_STATION_FIELDS = (0, client_1.gql) `
|
|
16
|
+
${picture_1.PICTURE_FIELDS}
|
|
17
|
+
${exports.OSCE_STATION_MARK_FIELDS}
|
|
18
|
+
fragment OsceStationFields on OsceStation {
|
|
19
|
+
id
|
|
20
|
+
updatedAt
|
|
21
|
+
name
|
|
22
|
+
osceType {
|
|
23
|
+
id
|
|
24
|
+
name
|
|
25
|
+
}
|
|
26
|
+
difficulty
|
|
27
|
+
candidateBrief
|
|
28
|
+
examinerBrief
|
|
29
|
+
actorBrief
|
|
30
|
+
explanation
|
|
31
|
+
marks {
|
|
32
|
+
...OsceStationMarkFields
|
|
33
|
+
}
|
|
34
|
+
topics {
|
|
35
|
+
id
|
|
36
|
+
name
|
|
37
|
+
}
|
|
38
|
+
candidatePictures {
|
|
39
|
+
...PictureFields
|
|
40
|
+
}
|
|
41
|
+
actorPictures {
|
|
42
|
+
...PictureFields
|
|
43
|
+
}
|
|
44
|
+
examinerPictures {
|
|
45
|
+
...PictureFields
|
|
46
|
+
}
|
|
47
|
+
walkthroughPictures {
|
|
48
|
+
...PictureFields
|
|
49
|
+
}
|
|
50
|
+
videos {
|
|
51
|
+
id
|
|
52
|
+
title
|
|
53
|
+
museId
|
|
54
|
+
thumbnail
|
|
55
|
+
concepts {
|
|
56
|
+
name
|
|
57
|
+
}
|
|
58
|
+
live
|
|
59
|
+
description
|
|
60
|
+
duration
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
# user-specific keys
|
|
64
|
+
# lastOsceMarksheetId
|
|
65
|
+
# score
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
exports.OSCE_MARKSHEET_MARK_FIELDS = (0, client_1.gql) `
|
|
69
|
+
${exports.OSCE_STATION_MARK_FIELDS}
|
|
70
|
+
fragment OsceMarksheetMarkFields on OsceMarksheetMark {
|
|
71
|
+
id
|
|
72
|
+
index
|
|
73
|
+
mark
|
|
74
|
+
osceMarksheetId
|
|
75
|
+
osceStationMarkId
|
|
76
|
+
osceStationMark {
|
|
77
|
+
...OsceStationMarkFields
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
81
|
+
exports.OSCE_MARKSHEET_FIELDS = (0, client_1.gql) `
|
|
82
|
+
${exports.OSCE_MARKSHEET_MARK_FIELDS}
|
|
83
|
+
fragment OsceMarksheetFields on OsceMarksheet {
|
|
84
|
+
id
|
|
85
|
+
createdAt
|
|
86
|
+
updatedAt
|
|
87
|
+
timeTaken
|
|
88
|
+
osceStationId
|
|
89
|
+
userId
|
|
90
|
+
solo
|
|
91
|
+
role
|
|
92
|
+
globalScore
|
|
93
|
+
score
|
|
94
|
+
feedback
|
|
95
|
+
agoraId
|
|
96
|
+
readingTime
|
|
97
|
+
stationTime
|
|
98
|
+
feedbackTime
|
|
99
|
+
startedAt
|
|
100
|
+
endedAt
|
|
101
|
+
pausedAt
|
|
102
|
+
timeRemaining
|
|
103
|
+
totalStationTime
|
|
104
|
+
stageTime
|
|
105
|
+
stage
|
|
106
|
+
marks {
|
|
107
|
+
...OsceMarksheetMarkFields
|
|
108
|
+
}
|
|
109
|
+
users {
|
|
110
|
+
# id - do not pass otherwise all unassigned roles = candidate
|
|
111
|
+
osceMarksheetId
|
|
112
|
+
userId
|
|
113
|
+
user {
|
|
114
|
+
id
|
|
115
|
+
displayName
|
|
116
|
+
}
|
|
117
|
+
role
|
|
118
|
+
}
|
|
119
|
+
members {
|
|
120
|
+
id
|
|
121
|
+
displayName
|
|
122
|
+
}
|
|
123
|
+
state
|
|
124
|
+
completed
|
|
125
|
+
}
|
|
126
|
+
`;
|
|
127
|
+
exports.OSCE_MATCHMAKING_ACTION_FIELDS = (0, client_1.gql) `
|
|
128
|
+
fragment OsceMatchmakingActionFields on OsceMatchmakingAction {
|
|
129
|
+
osceMarksheetId
|
|
130
|
+
agoraId
|
|
131
|
+
matchedUsers
|
|
132
|
+
userId
|
|
133
|
+
classYear
|
|
134
|
+
lastSyncAt
|
|
135
|
+
startedAt
|
|
136
|
+
grouped
|
|
137
|
+
completed
|
|
138
|
+
}
|
|
139
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PICTURE_FIELDS: import("@apollo/client").DocumentNode;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PICTURE_FIELDS = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
exports.PICTURE_FIELDS = (0, client_1.gql) `
|
|
6
|
+
fragment PictureFields on Picture {
|
|
7
|
+
id
|
|
8
|
+
createdAt
|
|
9
|
+
updatedAt
|
|
10
|
+
name
|
|
11
|
+
caption
|
|
12
|
+
path
|
|
13
|
+
path512
|
|
14
|
+
path256
|
|
15
|
+
topicId
|
|
16
|
+
topic {
|
|
17
|
+
id
|
|
18
|
+
name
|
|
19
|
+
typeId
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const USER_FIELDS: import("@apollo/client").DocumentNode;
|