@quesmed/types-rn 2.6.295 → 2.6.297
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/models/Marksheet.d.ts +2 -0
- package/models/Tutor.d.ts +128 -0
- package/models/Tutor.js +36 -0
- package/models/Ukmla2026.d.ts +62 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +1 -0
- package/package.json +1 -1
- package/resolvers/fragments/index.d.ts +1 -0
- package/resolvers/fragments/index.js +1 -0
- package/resolvers/fragments/tutor.d.ts +4 -0
- package/resolvers/fragments/tutor.js +78 -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 +2 -6
- package/resolvers/mutation/restricted/mockTest.d.ts +1 -0
- package/resolvers/mutation/restricted/tutor.d.ts +33 -0
- package/resolvers/mutation/restricted/tutor.js +75 -0
- package/resolvers/query/restricted/index.d.ts +1 -0
- package/resolvers/query/restricted/index.js +1 -0
- package/resolvers/query/restricted/quesBook.js +99 -3
- package/resolvers/query/restricted/tutor.d.ts +16 -0
- package/resolvers/query/restricted/tutor.js +28 -0
- package/resolvers/query/restricted/ukmla2026.d.ts +16 -1
- package/resolvers/query/restricted/ukmla2026.js +74 -1
package/models/Marksheet.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { IMockTest } from './MockTest';
|
|
|
3
3
|
import { EEntitlementType, EProductType, IEntitlement } from './Product';
|
|
4
4
|
import { IPrescribeMark, IQuestion, IQuestionChoice, IQuestionQAAnswer } from './Question';
|
|
5
5
|
import { ETopicType } from './Topic';
|
|
6
|
+
import { ITutorConversation } from './Tutor';
|
|
6
7
|
import { Id } from './Type';
|
|
7
8
|
import { IUser } from './User';
|
|
8
9
|
export declare enum EMarksheetState {
|
|
@@ -124,6 +125,7 @@ export interface IMarksheet {
|
|
|
124
125
|
preBuildData?: IPreBuildMarksheet;
|
|
125
126
|
builderConfig?: IBuildConfigData;
|
|
126
127
|
entitlementId: EProductType | EEntitlementType;
|
|
128
|
+
chats?: ITutorConversation[];
|
|
127
129
|
}
|
|
128
130
|
export type IMarksheetMarkJSONB = string | [string] | string[] | [IQuestionQAAnswer] | [string[], string[]] | [IPrescribeMark] | [string, string, string] | [string, string] | [string, string][] | null;
|
|
129
131
|
export declare enum EMarkResult {
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { Id } from './Type';
|
|
2
|
+
export declare enum ETutorPhase {
|
|
3
|
+
PRE_ANSWER = "PRE_ANSWER",
|
|
4
|
+
POST_ANSWER = "POST_ANSWER"
|
|
5
|
+
}
|
|
6
|
+
export declare enum ETutorPreset {
|
|
7
|
+
NONE = "NONE",
|
|
8
|
+
STUDY_MODE = "STUDY_MODE",
|
|
9
|
+
SOCRATIC = "SOCRATIC",
|
|
10
|
+
EXAM_TECHNIQUE = "EXAM_TECHNIQUE",
|
|
11
|
+
ELI5 = "ELI5"
|
|
12
|
+
}
|
|
13
|
+
export declare enum ETutorRating {
|
|
14
|
+
LIKE = "LIKE",
|
|
15
|
+
DISLIKE = "DISLIKE"
|
|
16
|
+
}
|
|
17
|
+
export declare enum ETutorBlockType {
|
|
18
|
+
TEXT = "TEXT",
|
|
19
|
+
QUIZ = "QUIZ",
|
|
20
|
+
HINT = "HINT",
|
|
21
|
+
FOLLOW_UP = "FOLLOW_UP"
|
|
22
|
+
}
|
|
23
|
+
export declare enum ETutorResourceType {
|
|
24
|
+
QUIZ_QUESTION = "quiz_question",
|
|
25
|
+
QUESBOOK = "quesbook",
|
|
26
|
+
VIDEO = "video",
|
|
27
|
+
IMAGE = "image",
|
|
28
|
+
EXTERNAL = "external"
|
|
29
|
+
}
|
|
30
|
+
export type TTutorRole = 'human' | 'ai' | 'system';
|
|
31
|
+
export interface ITutorOption {
|
|
32
|
+
id: string;
|
|
33
|
+
label: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ITutorQuizResult {
|
|
36
|
+
selectedOptionId: string | null;
|
|
37
|
+
correctOptionId: string | null;
|
|
38
|
+
correct: boolean | null;
|
|
39
|
+
rationale: string | null;
|
|
40
|
+
answeredAt: number | Date | null;
|
|
41
|
+
}
|
|
42
|
+
export interface ITutorHint {
|
|
43
|
+
id: string;
|
|
44
|
+
text: string | null;
|
|
45
|
+
revealedAt: number | Date | null;
|
|
46
|
+
}
|
|
47
|
+
export interface ITutorFeedback {
|
|
48
|
+
rating: number | null;
|
|
49
|
+
comment: string | null;
|
|
50
|
+
}
|
|
51
|
+
export interface ITutorFeedbackInput {
|
|
52
|
+
rating?: number;
|
|
53
|
+
comment?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface ITutorResource {
|
|
56
|
+
type: ETutorResourceType | string;
|
|
57
|
+
title: string;
|
|
58
|
+
url: string | null;
|
|
59
|
+
summary: string | null;
|
|
60
|
+
}
|
|
61
|
+
export interface ITutorBlock {
|
|
62
|
+
type: ETutorBlockType;
|
|
63
|
+
content?: string | null;
|
|
64
|
+
blockId?: string | null;
|
|
65
|
+
prompt?: string | null;
|
|
66
|
+
options?: ITutorOption[] | null;
|
|
67
|
+
result?: ITutorQuizResult | null;
|
|
68
|
+
hints?: ITutorHint[] | null;
|
|
69
|
+
followUps?: ITutorOption[] | null;
|
|
70
|
+
data?: Record<string, unknown> | null;
|
|
71
|
+
}
|
|
72
|
+
export interface ITutorMessage {
|
|
73
|
+
id: Id;
|
|
74
|
+
conversationId: Id;
|
|
75
|
+
role: TTutorRole;
|
|
76
|
+
phase: ETutorPhase | null;
|
|
77
|
+
preset: ETutorPreset | null;
|
|
78
|
+
blocks: ITutorBlock[];
|
|
79
|
+
rating: ETutorRating | null;
|
|
80
|
+
ratedAt: number | Date | null;
|
|
81
|
+
createdAt: number | Date;
|
|
82
|
+
}
|
|
83
|
+
export interface ITutorConversation {
|
|
84
|
+
id: Id;
|
|
85
|
+
title: string | null;
|
|
86
|
+
marksheetId: Id | null;
|
|
87
|
+
questionId: Id | null;
|
|
88
|
+
resources: ITutorResource[];
|
|
89
|
+
messages: ITutorMessage[];
|
|
90
|
+
feedback: ITutorFeedback | null;
|
|
91
|
+
lastActivityAt: number | Date | null;
|
|
92
|
+
createdAt: number | Date;
|
|
93
|
+
}
|
|
94
|
+
export interface ITutorSendMessageBody {
|
|
95
|
+
marksheetId: number;
|
|
96
|
+
questionId: number;
|
|
97
|
+
message: string;
|
|
98
|
+
preset?: ETutorPreset;
|
|
99
|
+
followUpId?: string;
|
|
100
|
+
}
|
|
101
|
+
export type ITutorEvent = {
|
|
102
|
+
type: 'MESSAGE_START';
|
|
103
|
+
conversationId: number;
|
|
104
|
+
} | {
|
|
105
|
+
type: 'BLOCK_START';
|
|
106
|
+
blockIndex: number;
|
|
107
|
+
blockType: ETutorBlockType;
|
|
108
|
+
blockId?: string;
|
|
109
|
+
} | {
|
|
110
|
+
type: 'TEXT_DELTA';
|
|
111
|
+
blockIndex: number;
|
|
112
|
+
content: string;
|
|
113
|
+
openMarkup: string | null;
|
|
114
|
+
} | {
|
|
115
|
+
type: 'BLOCK_DATA';
|
|
116
|
+
blockIndex: number;
|
|
117
|
+
block: ITutorBlock;
|
|
118
|
+
} | {
|
|
119
|
+
type: 'BLOCK_STOP';
|
|
120
|
+
blockIndex: number;
|
|
121
|
+
} | {
|
|
122
|
+
type: 'MESSAGE_END';
|
|
123
|
+
messageId: string;
|
|
124
|
+
message: ITutorMessage;
|
|
125
|
+
} | {
|
|
126
|
+
type: 'ERROR';
|
|
127
|
+
message: string;
|
|
128
|
+
};
|
package/models/Tutor.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ETutorResourceType = exports.ETutorBlockType = exports.ETutorRating = exports.ETutorPreset = exports.ETutorPhase = void 0;
|
|
4
|
+
var ETutorPhase;
|
|
5
|
+
(function (ETutorPhase) {
|
|
6
|
+
ETutorPhase["PRE_ANSWER"] = "PRE_ANSWER";
|
|
7
|
+
ETutorPhase["POST_ANSWER"] = "POST_ANSWER";
|
|
8
|
+
})(ETutorPhase = exports.ETutorPhase || (exports.ETutorPhase = {}));
|
|
9
|
+
var ETutorPreset;
|
|
10
|
+
(function (ETutorPreset) {
|
|
11
|
+
ETutorPreset["NONE"] = "NONE";
|
|
12
|
+
ETutorPreset["STUDY_MODE"] = "STUDY_MODE";
|
|
13
|
+
ETutorPreset["SOCRATIC"] = "SOCRATIC";
|
|
14
|
+
ETutorPreset["EXAM_TECHNIQUE"] = "EXAM_TECHNIQUE";
|
|
15
|
+
ETutorPreset["ELI5"] = "ELI5";
|
|
16
|
+
})(ETutorPreset = exports.ETutorPreset || (exports.ETutorPreset = {}));
|
|
17
|
+
var ETutorRating;
|
|
18
|
+
(function (ETutorRating) {
|
|
19
|
+
ETutorRating["LIKE"] = "LIKE";
|
|
20
|
+
ETutorRating["DISLIKE"] = "DISLIKE";
|
|
21
|
+
})(ETutorRating = exports.ETutorRating || (exports.ETutorRating = {}));
|
|
22
|
+
var ETutorBlockType;
|
|
23
|
+
(function (ETutorBlockType) {
|
|
24
|
+
ETutorBlockType["TEXT"] = "TEXT";
|
|
25
|
+
ETutorBlockType["QUIZ"] = "QUIZ";
|
|
26
|
+
ETutorBlockType["HINT"] = "HINT";
|
|
27
|
+
ETutorBlockType["FOLLOW_UP"] = "FOLLOW_UP";
|
|
28
|
+
})(ETutorBlockType = exports.ETutorBlockType || (exports.ETutorBlockType = {}));
|
|
29
|
+
var ETutorResourceType;
|
|
30
|
+
(function (ETutorResourceType) {
|
|
31
|
+
ETutorResourceType["QUIZ_QUESTION"] = "quiz_question";
|
|
32
|
+
ETutorResourceType["QUESBOOK"] = "quesbook";
|
|
33
|
+
ETutorResourceType["VIDEO"] = "video";
|
|
34
|
+
ETutorResourceType["IMAGE"] = "image";
|
|
35
|
+
ETutorResourceType["EXTERNAL"] = "external";
|
|
36
|
+
})(ETutorResourceType = exports.ETutorResourceType || (exports.ETutorResourceType = {}));
|
package/models/Ukmla2026.d.ts
CHANGED
|
@@ -26,3 +26,65 @@ export interface IUkmla2026Condition {
|
|
|
26
26
|
correctQuestions?: number | null;
|
|
27
27
|
incorrectQuestions?: number | null;
|
|
28
28
|
}
|
|
29
|
+
export interface IUkmla2026PresentationLetter {
|
|
30
|
+
letter: string;
|
|
31
|
+
presentations?: IUkmla2026Presentation[];
|
|
32
|
+
totalQuestions?: number | null;
|
|
33
|
+
correctQuestions?: number | null;
|
|
34
|
+
incorrectQuestions?: number | null;
|
|
35
|
+
}
|
|
36
|
+
export interface IUkmla2026Presentation {
|
|
37
|
+
id: Id;
|
|
38
|
+
name: string;
|
|
39
|
+
changeType: EUkmla2026ChangeType;
|
|
40
|
+
legacyNames?: string[];
|
|
41
|
+
questionIds?: number[];
|
|
42
|
+
totalQuestions?: number | null;
|
|
43
|
+
correctQuestions?: number | null;
|
|
44
|
+
incorrectQuestions?: number | null;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A Quesmed area of clinical practice: our own curated grouping.
|
|
48
|
+
* Conditions and presentations can sit in several areas, and their counts here
|
|
49
|
+
* are specific to this area.
|
|
50
|
+
*/
|
|
51
|
+
export interface IUkmla2026Area {
|
|
52
|
+
id: Id;
|
|
53
|
+
name: string;
|
|
54
|
+
sortOrder: number;
|
|
55
|
+
descriptor?: string | null;
|
|
56
|
+
changeType: EUkmla2026ChangeType;
|
|
57
|
+
legacyNames?: string[];
|
|
58
|
+
conditions?: IUkmla2026AreaCondition[];
|
|
59
|
+
presentations?: IUkmla2026AreaPresentation[];
|
|
60
|
+
totalQuestions?: number | null;
|
|
61
|
+
correctQuestions?: number | null;
|
|
62
|
+
incorrectQuestions?: number | null;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* A condition as it appears inside one area.
|
|
66
|
+
*/
|
|
67
|
+
export interface IUkmla2026AreaCondition {
|
|
68
|
+
areaId: number;
|
|
69
|
+
conditionId: number;
|
|
70
|
+
name: string;
|
|
71
|
+
changeType: EUkmla2026ChangeType;
|
|
72
|
+
legacyNames?: string[];
|
|
73
|
+
concepts?: IConcept[];
|
|
74
|
+
questionIds?: number[];
|
|
75
|
+
totalQuestions?: number | null;
|
|
76
|
+
correctQuestions?: number | null;
|
|
77
|
+
incorrectQuestions?: number | null;
|
|
78
|
+
}
|
|
79
|
+
/** A presentation as it appears inside one area. */
|
|
80
|
+
export interface IUkmla2026AreaPresentation {
|
|
81
|
+
areaId: number;
|
|
82
|
+
presentationId: number;
|
|
83
|
+
name: string;
|
|
84
|
+
changeType: EUkmla2026ChangeType;
|
|
85
|
+
legacyNames?: string[];
|
|
86
|
+
questionIds?: number[];
|
|
87
|
+
totalQuestions?: number | null;
|
|
88
|
+
correctQuestions?: number | null;
|
|
89
|
+
incorrectQuestions?: number | null;
|
|
90
|
+
}
|
package/models/index.d.ts
CHANGED
package/models/index.js
CHANGED
|
@@ -51,6 +51,7 @@ __exportStar(require("./Todo"), exports);
|
|
|
51
51
|
__exportStar(require("./Token"), exports);
|
|
52
52
|
__exportStar(require("./Topic"), exports);
|
|
53
53
|
__exportStar(require("./Type"), exports);
|
|
54
|
+
__exportStar(require("./Tutor"), exports);
|
|
54
55
|
__exportStar(require("./Ucat"), exports);
|
|
55
56
|
__exportStar(require("./Ukmla2026"), exports);
|
|
56
57
|
__exportStar(require("./UkmlaTopic"), exports);
|
package/package.json
CHANGED
|
@@ -25,5 +25,6 @@ __exportStar(require("./osce"), exports);
|
|
|
25
25
|
__exportStar(require("./picture"), exports);
|
|
26
26
|
__exportStar(require("./question"), exports);
|
|
27
27
|
__exportStar(require("./topic"), exports);
|
|
28
|
+
__exportStar(require("./tutor"), exports);
|
|
28
29
|
__exportStar(require("./user"), exports);
|
|
29
30
|
__exportStar(require("./video"), exports);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const TUTOR_OPTION_FIELDS: import("@apollo/client").DocumentNode;
|
|
2
|
+
export declare const TUTOR_BLOCK_FIELDS: import("@apollo/client").DocumentNode;
|
|
3
|
+
export declare const TUTOR_MESSAGE_FIELDS: import("@apollo/client").DocumentNode;
|
|
4
|
+
export declare const TUTOR_CONVERSATION_FIELDS: import("@apollo/client").DocumentNode;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TUTOR_CONVERSATION_FIELDS = exports.TUTOR_MESSAGE_FIELDS = exports.TUTOR_BLOCK_FIELDS = exports.TUTOR_OPTION_FIELDS = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
exports.TUTOR_OPTION_FIELDS = (0, client_1.gql) `
|
|
6
|
+
fragment TutorOptionFields on TutorOption {
|
|
7
|
+
id
|
|
8
|
+
label
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
11
|
+
exports.TUTOR_BLOCK_FIELDS = (0, client_1.gql) `
|
|
12
|
+
${exports.TUTOR_OPTION_FIELDS}
|
|
13
|
+
fragment TutorBlockFields on TutorBlock {
|
|
14
|
+
type
|
|
15
|
+
content
|
|
16
|
+
blockId
|
|
17
|
+
prompt
|
|
18
|
+
options {
|
|
19
|
+
...TutorOptionFields
|
|
20
|
+
}
|
|
21
|
+
result {
|
|
22
|
+
selectedOptionId
|
|
23
|
+
correctOptionId
|
|
24
|
+
correct
|
|
25
|
+
rationale
|
|
26
|
+
answeredAt
|
|
27
|
+
}
|
|
28
|
+
hints {
|
|
29
|
+
id
|
|
30
|
+
text
|
|
31
|
+
revealedAt
|
|
32
|
+
}
|
|
33
|
+
followUps {
|
|
34
|
+
...TutorOptionFields
|
|
35
|
+
}
|
|
36
|
+
data
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
exports.TUTOR_MESSAGE_FIELDS = (0, client_1.gql) `
|
|
40
|
+
${exports.TUTOR_BLOCK_FIELDS}
|
|
41
|
+
fragment TutorMessageFields on TutorMessage {
|
|
42
|
+
id
|
|
43
|
+
conversationId
|
|
44
|
+
role
|
|
45
|
+
phase
|
|
46
|
+
preset
|
|
47
|
+
blocks {
|
|
48
|
+
...TutorBlockFields
|
|
49
|
+
}
|
|
50
|
+
rating
|
|
51
|
+
ratedAt
|
|
52
|
+
createdAt
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
exports.TUTOR_CONVERSATION_FIELDS = (0, client_1.gql) `
|
|
56
|
+
${exports.TUTOR_MESSAGE_FIELDS}
|
|
57
|
+
fragment TutorConversationFields on TutorConversation {
|
|
58
|
+
id
|
|
59
|
+
title
|
|
60
|
+
marksheetId
|
|
61
|
+
questionId
|
|
62
|
+
resources {
|
|
63
|
+
type
|
|
64
|
+
title
|
|
65
|
+
url
|
|
66
|
+
summary
|
|
67
|
+
}
|
|
68
|
+
messages {
|
|
69
|
+
...TutorMessageFields
|
|
70
|
+
}
|
|
71
|
+
feedback {
|
|
72
|
+
rating
|
|
73
|
+
comment
|
|
74
|
+
}
|
|
75
|
+
lastActivityAt
|
|
76
|
+
createdAt
|
|
77
|
+
}
|
|
78
|
+
`;
|
|
@@ -30,5 +30,6 @@ __exportStar(require("./station"), exports);
|
|
|
30
30
|
__exportStar(require("./stripe"), exports);
|
|
31
31
|
__exportStar(require("./todo"), exports);
|
|
32
32
|
__exportStar(require("./token"), exports);
|
|
33
|
+
__exportStar(require("./tutor"), exports);
|
|
33
34
|
__exportStar(require("./users"), exports);
|
|
34
35
|
__exportStar(require("./video"), exports);
|
|
@@ -179,9 +179,6 @@ export declare const optimisticModifyMarksheetBuilderConfig: (marksheetId: numbe
|
|
|
179
179
|
startedAt: number | Date;
|
|
180
180
|
type: import("../../../models").EMarksheetType;
|
|
181
181
|
endedAt: number | Date;
|
|
182
|
-
/**
|
|
183
|
-
* reBuildMarksheet
|
|
184
|
-
*/
|
|
185
182
|
typeId: import("../../../models").ETopicType;
|
|
186
183
|
entitlement: import("../../../models").IEntitlement;
|
|
187
184
|
topicIds: number[];
|
|
@@ -213,6 +210,7 @@ export declare const optimisticModifyMarksheetBuilderConfig: (marksheetId: numbe
|
|
|
213
210
|
topicConceptData?: string | undefined;
|
|
214
211
|
preBuildData?: IPreBuildMarksheet | undefined;
|
|
215
212
|
entitlementId: EEntitlementType | import("../../../models").EProductType;
|
|
213
|
+
chats?: import("../../../models").ITutorConversation[] | undefined;
|
|
216
214
|
};
|
|
217
215
|
};
|
|
218
216
|
};
|
|
@@ -287,9 +285,6 @@ export declare const optimisticEndMarksheet: (marksheet: IMarksheet) => {
|
|
|
287
285
|
startedAt: number | Date;
|
|
288
286
|
type: import("../../../models").EMarksheetType;
|
|
289
287
|
endedAt: number | Date;
|
|
290
|
-
/**
|
|
291
|
-
* reBuildMarksheet
|
|
292
|
-
*/
|
|
293
288
|
typeId: import("../../../models").ETopicType;
|
|
294
289
|
entitlement: import("../../../models").IEntitlement;
|
|
295
290
|
topicIds: number[];
|
|
@@ -321,6 +316,7 @@ export declare const optimisticEndMarksheet: (marksheet: IMarksheet) => {
|
|
|
321
316
|
preBuildData?: IPreBuildMarksheet | undefined;
|
|
322
317
|
builderConfig?: IBuildConfigData | undefined;
|
|
323
318
|
entitlementId: EEntitlementType | import("../../../models").EProductType;
|
|
319
|
+
chats?: import("../../../models").ITutorConversation[] | undefined;
|
|
324
320
|
__typename: string;
|
|
325
321
|
};
|
|
326
322
|
};
|
|
@@ -86,6 +86,7 @@ export declare const optimisticEndMockTest: (marksheet: IMarksheet) => {
|
|
|
86
86
|
preBuildData?: import("./marksheet").IPreBuildMarksheet | undefined;
|
|
87
87
|
builderConfig?: import("./marksheet").IBuildConfigData | undefined;
|
|
88
88
|
entitlementId: import("../../../models").EEntitlementType | import("../../../models").EProductType;
|
|
89
|
+
chats?: import("../../../models").ITutorConversation[] | undefined;
|
|
89
90
|
__typename: string;
|
|
90
91
|
};
|
|
91
92
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ETutorRating, Id, ITutorConversation, ITutorFeedbackInput, ITutorMessage } from '../../../models';
|
|
2
|
+
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
3
|
+
export declare const ANSWER_TUTOR_QUIZ: import("@apollo/client").DocumentNode;
|
|
4
|
+
export interface IAnswerTutorQuizVar {
|
|
5
|
+
messageId: Id;
|
|
6
|
+
blockId: string;
|
|
7
|
+
optionId: string;
|
|
8
|
+
}
|
|
9
|
+
export type IAnswerTutorQuizData = RestrictedData<graphqlNormalize & ITutorMessage, 'answerTutorQuiz'>;
|
|
10
|
+
export declare const REVEAL_TUTOR_HINT: import("@apollo/client").DocumentNode;
|
|
11
|
+
export interface IRevealTutorHintVar {
|
|
12
|
+
messageId: Id;
|
|
13
|
+
blockId: string;
|
|
14
|
+
hintId: string;
|
|
15
|
+
}
|
|
16
|
+
export type IRevealTutorHintData = RestrictedData<graphqlNormalize & ITutorMessage, 'revealTutorHint'>;
|
|
17
|
+
export declare const RATE_TUTOR_MESSAGE: import("@apollo/client").DocumentNode;
|
|
18
|
+
export interface IRateTutorMessageVar {
|
|
19
|
+
messageId: Id;
|
|
20
|
+
rating: ETutorRating | null;
|
|
21
|
+
}
|
|
22
|
+
export type IRateTutorMessageData = RestrictedData<graphqlNormalize & Pick<ITutorMessage, 'id' | 'rating' | 'ratedAt'>, 'rateTutorMessage'>;
|
|
23
|
+
export declare const SUBMIT_TUTOR_FEEDBACK: import("@apollo/client").DocumentNode;
|
|
24
|
+
export interface ISubmitTutorFeedbackVar {
|
|
25
|
+
conversationId: Id;
|
|
26
|
+
feedback: ITutorFeedbackInput;
|
|
27
|
+
}
|
|
28
|
+
export type ISubmitTutorFeedbackData = RestrictedData<graphqlNormalize & ITutorConversation, 'submitTutorFeedback'>;
|
|
29
|
+
export declare const DELETE_TUTOR_CONVERSATION: import("@apollo/client").DocumentNode;
|
|
30
|
+
export interface IDeleteTutorConversationVar {
|
|
31
|
+
conversationId: Id;
|
|
32
|
+
}
|
|
33
|
+
export type IDeleteTutorConversationData = RestrictedData<boolean, 'deleteTutorConversation'>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DELETE_TUTOR_CONVERSATION = exports.SUBMIT_TUTOR_FEEDBACK = exports.RATE_TUTOR_MESSAGE = exports.REVEAL_TUTOR_HINT = exports.ANSWER_TUTOR_QUIZ = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
const tutor_1 = require("../../fragments/tutor");
|
|
6
|
+
exports.ANSWER_TUTOR_QUIZ = (0, client_1.gql) `
|
|
7
|
+
${tutor_1.TUTOR_MESSAGE_FIELDS}
|
|
8
|
+
mutation AnswerTutorQuiz(
|
|
9
|
+
$messageId: ID!
|
|
10
|
+
$blockId: String!
|
|
11
|
+
$optionId: String!
|
|
12
|
+
) {
|
|
13
|
+
restricted {
|
|
14
|
+
answerTutorQuiz(
|
|
15
|
+
messageId: $messageId
|
|
16
|
+
blockId: $blockId
|
|
17
|
+
optionId: $optionId
|
|
18
|
+
) {
|
|
19
|
+
...TutorMessageFields
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
exports.REVEAL_TUTOR_HINT = (0, client_1.gql) `
|
|
25
|
+
${tutor_1.TUTOR_MESSAGE_FIELDS}
|
|
26
|
+
mutation RevealTutorHint(
|
|
27
|
+
$messageId: ID!
|
|
28
|
+
$blockId: String!
|
|
29
|
+
$hintId: String!
|
|
30
|
+
) {
|
|
31
|
+
restricted {
|
|
32
|
+
revealTutorHint(
|
|
33
|
+
messageId: $messageId
|
|
34
|
+
blockId: $blockId
|
|
35
|
+
hintId: $hintId
|
|
36
|
+
) {
|
|
37
|
+
...TutorMessageFields
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
exports.RATE_TUTOR_MESSAGE = (0, client_1.gql) `
|
|
43
|
+
mutation RateTutorMessage($messageId: ID!, $rating: TutorRating) {
|
|
44
|
+
restricted {
|
|
45
|
+
rateTutorMessage(messageId: $messageId, rating: $rating) {
|
|
46
|
+
id
|
|
47
|
+
rating
|
|
48
|
+
ratedAt
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
exports.SUBMIT_TUTOR_FEEDBACK = (0, client_1.gql) `
|
|
54
|
+
${tutor_1.TUTOR_CONVERSATION_FIELDS}
|
|
55
|
+
mutation SubmitTutorFeedback(
|
|
56
|
+
$conversationId: Int!
|
|
57
|
+
$feedback: TutorFeedbackInput!
|
|
58
|
+
) {
|
|
59
|
+
restricted {
|
|
60
|
+
submitTutorFeedback(
|
|
61
|
+
conversationId: $conversationId
|
|
62
|
+
feedback: $feedback
|
|
63
|
+
) {
|
|
64
|
+
...TutorConversationFields
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
exports.DELETE_TUTOR_CONVERSATION = (0, client_1.gql) `
|
|
70
|
+
mutation DeleteTutorConversation($conversationId: Int!) {
|
|
71
|
+
restricted {
|
|
72
|
+
deleteTutorConversation(conversationId: $conversationId)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
@@ -34,6 +34,7 @@ __exportStar(require("./replication"), exports);
|
|
|
34
34
|
__exportStar(require("./station"), exports);
|
|
35
35
|
__exportStar(require("./todos"), exports);
|
|
36
36
|
__exportStar(require("./topics"), exports);
|
|
37
|
+
__exportStar(require("./tutor"), exports);
|
|
37
38
|
__exportStar(require("./ukmla2026"), exports);
|
|
38
39
|
__exportStar(require("./ukmlaTopics"), exports);
|
|
39
40
|
__exportStar(require("./university"), exports);
|
|
@@ -137,14 +137,110 @@ exports.PUBLIC_QBANK_KNOWLEDGE_LIBRARY = (0, client_1.gql) `
|
|
|
137
137
|
}
|
|
138
138
|
`;
|
|
139
139
|
exports.OSCE_KNOWLEDGE_VIDEO_LIBRARY = (0, client_1.gql) `
|
|
140
|
-
|
|
140
|
+
${fragments_1.PICTURE_FIELDS}
|
|
141
|
+
fragment OsceStationMarkFields on OsceStationMark {
|
|
142
|
+
id
|
|
143
|
+
index
|
|
144
|
+
osceStationId
|
|
145
|
+
header
|
|
146
|
+
name
|
|
147
|
+
weight
|
|
148
|
+
__typename
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
fragment VideoFields on Video {
|
|
152
|
+
id
|
|
153
|
+
title
|
|
154
|
+
thumbnail
|
|
155
|
+
description
|
|
156
|
+
duration
|
|
157
|
+
watchLater
|
|
158
|
+
tokens {
|
|
159
|
+
bunnyUrl
|
|
160
|
+
thumbnail
|
|
161
|
+
gif
|
|
162
|
+
}
|
|
163
|
+
__typename
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
fragment OsceStationFields on OsceStation {
|
|
167
|
+
id
|
|
168
|
+
updatedAt
|
|
169
|
+
name
|
|
170
|
+
hiddenName
|
|
171
|
+
status
|
|
172
|
+
createdBy
|
|
173
|
+
preDefined
|
|
174
|
+
aiEnabled
|
|
175
|
+
phaseTimers
|
|
176
|
+
userNote {
|
|
177
|
+
id
|
|
178
|
+
userId
|
|
179
|
+
stationId
|
|
180
|
+
note
|
|
181
|
+
updatedAt
|
|
182
|
+
__typename
|
|
183
|
+
}
|
|
184
|
+
osceType {
|
|
185
|
+
id
|
|
186
|
+
name
|
|
187
|
+
__typename
|
|
188
|
+
}
|
|
189
|
+
entitlement {
|
|
190
|
+
id
|
|
191
|
+
name
|
|
192
|
+
index
|
|
193
|
+
__typename
|
|
194
|
+
}
|
|
195
|
+
difficulty
|
|
196
|
+
candidateBrief
|
|
197
|
+
examinerBrief
|
|
198
|
+
actorBrief
|
|
199
|
+
explanation
|
|
200
|
+
marks {
|
|
201
|
+
...OsceStationMarkFields
|
|
202
|
+
__typename
|
|
203
|
+
}
|
|
204
|
+
clinicalData
|
|
205
|
+
picture {
|
|
206
|
+
...PictureFields
|
|
207
|
+
__typename
|
|
208
|
+
}
|
|
209
|
+
candidatePictures {
|
|
210
|
+
...PictureFields
|
|
211
|
+
__typename
|
|
212
|
+
}
|
|
213
|
+
actorPictures {
|
|
214
|
+
...PictureFields
|
|
215
|
+
__typename
|
|
216
|
+
}
|
|
217
|
+
examinerPictures {
|
|
218
|
+
...PictureFields
|
|
219
|
+
__typename
|
|
220
|
+
}
|
|
221
|
+
walkthroughPictures {
|
|
222
|
+
...PictureFields
|
|
223
|
+
__typename
|
|
224
|
+
}
|
|
225
|
+
clinicalPictures {
|
|
226
|
+
...PictureFields
|
|
227
|
+
__typename
|
|
228
|
+
}
|
|
229
|
+
videos {
|
|
230
|
+
...VideoFields
|
|
231
|
+
__typename
|
|
232
|
+
}
|
|
233
|
+
demo
|
|
234
|
+
__typename
|
|
235
|
+
}
|
|
236
|
+
|
|
141
237
|
query OsceKnowledgeVideoLibrary($videosOnly: Boolean) {
|
|
142
238
|
restricted {
|
|
143
239
|
osceBook(videosOnly: $videosOnly) {
|
|
144
240
|
...OsceStationFields
|
|
145
|
-
|
|
146
|
-
score
|
|
241
|
+
__typename
|
|
147
242
|
}
|
|
243
|
+
__typename
|
|
148
244
|
}
|
|
149
245
|
}
|
|
150
246
|
`;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Id, ITutorConversation } from '../../../models';
|
|
2
|
+
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
3
|
+
export declare const TUTOR_CONVERSATION: import("@apollo/client").DocumentNode;
|
|
4
|
+
export interface ITutorConversationVar {
|
|
5
|
+
marksheetId: Id;
|
|
6
|
+
questionId: Id;
|
|
7
|
+
}
|
|
8
|
+
export type ITutorConversationData = RestrictedData<(graphqlNormalize & ITutorConversation) | null, 'tutorConversation'>;
|
|
9
|
+
export declare const MARKSHEET_CHATS: import("@apollo/client").DocumentNode;
|
|
10
|
+
export interface IMarksheetChatsVar {
|
|
11
|
+
id: Id;
|
|
12
|
+
}
|
|
13
|
+
export type IMarksheetChatsData = RestrictedData<{
|
|
14
|
+
id: Id;
|
|
15
|
+
chats: (graphqlNormalize & ITutorConversation)[];
|
|
16
|
+
}, 'marksheet'>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MARKSHEET_CHATS = exports.TUTOR_CONVERSATION = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
const tutor_1 = require("../../fragments/tutor");
|
|
6
|
+
exports.TUTOR_CONVERSATION = (0, client_1.gql) `
|
|
7
|
+
${tutor_1.TUTOR_CONVERSATION_FIELDS}
|
|
8
|
+
query TutorConversation($marksheetId: Int!, $questionId: Int!) {
|
|
9
|
+
restricted {
|
|
10
|
+
tutorConversation(marksheetId: $marksheetId, questionId: $questionId) {
|
|
11
|
+
...TutorConversationFields
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
exports.MARKSHEET_CHATS = (0, client_1.gql) `
|
|
17
|
+
${tutor_1.TUTOR_CONVERSATION_FIELDS}
|
|
18
|
+
query MarksheetChats($id: Int!) {
|
|
19
|
+
restricted {
|
|
20
|
+
marksheet(id: $id) {
|
|
21
|
+
id
|
|
22
|
+
chats {
|
|
23
|
+
...TutorConversationFields
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
@@ -1,12 +1,27 @@
|
|
|
1
|
-
import { EDifficultyType, IUkmla2026BodySystem, Id } from '../../../models';
|
|
1
|
+
import { EDifficultyType, IUkmla2026Area, IUkmla2026BodySystem, IUkmla2026PresentationLetter, Id } from '../../../models';
|
|
2
2
|
import { IPreBuildMarksheet } from '../../mutation/restricted';
|
|
3
3
|
import { RestrictedData, graphqlNormalize } from '../../types';
|
|
4
4
|
export type IUkmla2026BodySystemsData = RestrictedData<(graphqlNormalize & IUkmla2026BodySystem)[], 'ukmlaBodySystems'>;
|
|
5
5
|
export declare const UKMLA_2026_BODY_SYSTEMS: import("@apollo/client").DocumentNode;
|
|
6
|
+
export type IUkmla2026PresentationsData = RestrictedData<(graphqlNormalize & IUkmla2026PresentationLetter)[], 'ukmlaPresentations'>;
|
|
7
|
+
export declare const UKMLA_2026_PRESENTATIONS: import("@apollo/client").DocumentNode;
|
|
8
|
+
export type IUkmla2026AreasData = RestrictedData<(graphqlNormalize & IUkmla2026Area)[], 'ukmlaAreas'>;
|
|
9
|
+
export declare const UKMLA_2026_AREAS: import("@apollo/client").DocumentNode;
|
|
10
|
+
/**
|
|
11
|
+
* One item inside one area of the Areas of Practice tab. `itemId` is the
|
|
12
|
+
* `conditionId` or `presentationId`, depending on which list it is passed in.
|
|
13
|
+
*/
|
|
14
|
+
export interface IUkmla2026AreaItemInput {
|
|
15
|
+
areaId: number;
|
|
16
|
+
itemId: number;
|
|
17
|
+
}
|
|
6
18
|
export interface IPreBuildUkmla2026MarksheetVar {
|
|
7
19
|
bodySystemIds?: number[];
|
|
8
20
|
conditionIds?: number[];
|
|
9
21
|
presentationIds?: number[];
|
|
22
|
+
areaIds?: number[];
|
|
23
|
+
areaConditions?: IUkmla2026AreaItemInput[];
|
|
24
|
+
areaPresentations?: IUkmla2026AreaItemInput[];
|
|
10
25
|
search?: string;
|
|
11
26
|
marksheetId?: Id;
|
|
12
27
|
source: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PRE_BUILD_UKMLA_2026_MARKSHEET = exports.UKMLA_2026_BODY_SYSTEMS = void 0;
|
|
3
|
+
exports.PRE_BUILD_UKMLA_2026_MARKSHEET = exports.UKMLA_2026_AREAS = exports.UKMLA_2026_PRESENTATIONS = exports.UKMLA_2026_BODY_SYSTEMS = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
exports.UKMLA_2026_BODY_SYSTEMS = (0, client_1.gql) `
|
|
6
6
|
query Ukmla2026BodySystems {
|
|
@@ -33,11 +33,81 @@ exports.UKMLA_2026_BODY_SYSTEMS = (0, client_1.gql) `
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
`;
|
|
36
|
+
exports.UKMLA_2026_PRESENTATIONS = (0, client_1.gql) `
|
|
37
|
+
query Ukmla2026Presentations {
|
|
38
|
+
restricted {
|
|
39
|
+
ukmlaPresentations {
|
|
40
|
+
letter
|
|
41
|
+
totalQuestions
|
|
42
|
+
correctQuestions
|
|
43
|
+
incorrectQuestions
|
|
44
|
+
presentations {
|
|
45
|
+
id
|
|
46
|
+
name
|
|
47
|
+
changeType
|
|
48
|
+
legacyNames
|
|
49
|
+
questionIds
|
|
50
|
+
totalQuestions
|
|
51
|
+
correctQuestions
|
|
52
|
+
incorrectQuestions
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
58
|
+
exports.UKMLA_2026_AREAS = (0, client_1.gql) `
|
|
59
|
+
query Ukmla2026Areas {
|
|
60
|
+
restricted {
|
|
61
|
+
ukmlaAreas {
|
|
62
|
+
id
|
|
63
|
+
name
|
|
64
|
+
sortOrder
|
|
65
|
+
descriptor
|
|
66
|
+
changeType
|
|
67
|
+
legacyNames
|
|
68
|
+
totalQuestions
|
|
69
|
+
correctQuestions
|
|
70
|
+
incorrectQuestions
|
|
71
|
+
conditions {
|
|
72
|
+
areaId
|
|
73
|
+
conditionId
|
|
74
|
+
name
|
|
75
|
+
changeType
|
|
76
|
+
legacyNames
|
|
77
|
+
questionIds
|
|
78
|
+
totalQuestions
|
|
79
|
+
correctQuestions
|
|
80
|
+
incorrectQuestions
|
|
81
|
+
concepts {
|
|
82
|
+
id
|
|
83
|
+
name
|
|
84
|
+
topicId
|
|
85
|
+
chapterId
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
presentations {
|
|
89
|
+
areaId
|
|
90
|
+
presentationId
|
|
91
|
+
name
|
|
92
|
+
changeType
|
|
93
|
+
legacyNames
|
|
94
|
+
questionIds
|
|
95
|
+
totalQuestions
|
|
96
|
+
correctQuestions
|
|
97
|
+
incorrectQuestions
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
`;
|
|
36
103
|
exports.PRE_BUILD_UKMLA_2026_MARKSHEET = (0, client_1.gql) `
|
|
37
104
|
query PreBuildUkmla2026Marksheet(
|
|
38
105
|
$bodySystemIds: [Int!]
|
|
39
106
|
$conditionIds: [Int!]
|
|
40
107
|
$presentationIds: [Int!]
|
|
108
|
+
$areaIds: [Int!]
|
|
109
|
+
$areaConditions: [Ukmla2026AreaItemInput!]
|
|
110
|
+
$areaPresentations: [Ukmla2026AreaItemInput!]
|
|
41
111
|
$source: String!
|
|
42
112
|
$search: String
|
|
43
113
|
$marksheetId: Int
|
|
@@ -49,6 +119,9 @@ exports.PRE_BUILD_UKMLA_2026_MARKSHEET = (0, client_1.gql) `
|
|
|
49
119
|
bodySystemIds: $bodySystemIds
|
|
50
120
|
conditionIds: $conditionIds
|
|
51
121
|
presentationIds: $presentationIds
|
|
122
|
+
areaIds: $areaIds
|
|
123
|
+
areaConditions: $areaConditions
|
|
124
|
+
areaPresentations: $areaPresentations
|
|
52
125
|
source: $source
|
|
53
126
|
search: $search
|
|
54
127
|
marksheetId: $marksheetId
|