@quesmed/types 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.
Files changed (47) hide show
  1. package/dist/cjs/models/Marksheet.d.ts +2 -0
  2. package/dist/cjs/models/Tutor.d.ts +128 -0
  3. package/dist/cjs/models/Tutor.js +36 -0
  4. package/dist/cjs/models/Ukmla2026.d.ts +62 -0
  5. package/dist/cjs/models/index.d.ts +1 -0
  6. package/dist/cjs/models/index.js +1 -0
  7. package/dist/cjs/resolvers/fragments/index.d.ts +1 -0
  8. package/dist/cjs/resolvers/fragments/index.js +1 -0
  9. package/dist/cjs/resolvers/fragments/tutor.d.ts +4 -0
  10. package/dist/cjs/resolvers/fragments/tutor.js +78 -0
  11. package/dist/cjs/resolvers/mutation/restricted/index.d.ts +1 -0
  12. package/dist/cjs/resolvers/mutation/restricted/index.js +1 -0
  13. package/dist/cjs/resolvers/mutation/restricted/marksheet.d.ts +2 -6
  14. package/dist/cjs/resolvers/mutation/restricted/mockTest.d.ts +1 -0
  15. package/dist/cjs/resolvers/mutation/restricted/tutor.d.ts +33 -0
  16. package/dist/cjs/resolvers/mutation/restricted/tutor.js +75 -0
  17. package/dist/cjs/resolvers/query/restricted/index.d.ts +1 -0
  18. package/dist/cjs/resolvers/query/restricted/index.js +1 -0
  19. package/dist/cjs/resolvers/query/restricted/quesBook.js +99 -3
  20. package/dist/cjs/resolvers/query/restricted/tutor.d.ts +16 -0
  21. package/dist/cjs/resolvers/query/restricted/tutor.js +28 -0
  22. package/dist/cjs/resolvers/query/restricted/ukmla2026.d.ts +16 -1
  23. package/dist/cjs/resolvers/query/restricted/ukmla2026.js +74 -1
  24. package/dist/mjs/models/Marksheet.d.ts +2 -0
  25. package/dist/mjs/models/Tutor.d.ts +128 -0
  26. package/dist/mjs/models/Tutor.js +33 -0
  27. package/dist/mjs/models/Ukmla2026.d.ts +62 -0
  28. package/dist/mjs/models/index.d.ts +1 -0
  29. package/dist/mjs/models/index.js +1 -0
  30. package/dist/mjs/resolvers/fragments/index.d.ts +1 -0
  31. package/dist/mjs/resolvers/fragments/index.js +1 -0
  32. package/dist/mjs/resolvers/fragments/tutor.d.ts +4 -0
  33. package/dist/mjs/resolvers/fragments/tutor.js +75 -0
  34. package/dist/mjs/resolvers/mutation/restricted/index.d.ts +1 -0
  35. package/dist/mjs/resolvers/mutation/restricted/index.js +1 -0
  36. package/dist/mjs/resolvers/mutation/restricted/marksheet.d.ts +2 -6
  37. package/dist/mjs/resolvers/mutation/restricted/mockTest.d.ts +1 -0
  38. package/dist/mjs/resolvers/mutation/restricted/tutor.d.ts +33 -0
  39. package/dist/mjs/resolvers/mutation/restricted/tutor.js +72 -0
  40. package/dist/mjs/resolvers/query/restricted/index.d.ts +1 -0
  41. package/dist/mjs/resolvers/query/restricted/index.js +1 -0
  42. package/dist/mjs/resolvers/query/restricted/quesBook.js +100 -4
  43. package/dist/mjs/resolvers/query/restricted/tutor.d.ts +16 -0
  44. package/dist/mjs/resolvers/query/restricted/tutor.js +25 -0
  45. package/dist/mjs/resolvers/query/restricted/ukmla2026.d.ts +16 -1
  46. package/dist/mjs/resolvers/query/restricted/ukmla2026.js +73 -0
  47. package/package.json +1 -1
@@ -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
@@ -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
+ };
@@ -0,0 +1,33 @@
1
+ export var ETutorPhase;
2
+ (function (ETutorPhase) {
3
+ ETutorPhase["PRE_ANSWER"] = "PRE_ANSWER";
4
+ ETutorPhase["POST_ANSWER"] = "POST_ANSWER";
5
+ })(ETutorPhase || (ETutorPhase = {}));
6
+ export var ETutorPreset;
7
+ (function (ETutorPreset) {
8
+ ETutorPreset["NONE"] = "NONE";
9
+ ETutorPreset["STUDY_MODE"] = "STUDY_MODE";
10
+ ETutorPreset["SOCRATIC"] = "SOCRATIC";
11
+ ETutorPreset["EXAM_TECHNIQUE"] = "EXAM_TECHNIQUE";
12
+ ETutorPreset["ELI5"] = "ELI5";
13
+ })(ETutorPreset || (ETutorPreset = {}));
14
+ export var ETutorRating;
15
+ (function (ETutorRating) {
16
+ ETutorRating["LIKE"] = "LIKE";
17
+ ETutorRating["DISLIKE"] = "DISLIKE";
18
+ })(ETutorRating || (ETutorRating = {}));
19
+ export var ETutorBlockType;
20
+ (function (ETutorBlockType) {
21
+ ETutorBlockType["TEXT"] = "TEXT";
22
+ ETutorBlockType["QUIZ"] = "QUIZ";
23
+ ETutorBlockType["HINT"] = "HINT";
24
+ ETutorBlockType["FOLLOW_UP"] = "FOLLOW_UP";
25
+ })(ETutorBlockType || (ETutorBlockType = {}));
26
+ export var ETutorResourceType;
27
+ (function (ETutorResourceType) {
28
+ ETutorResourceType["QUIZ_QUESTION"] = "quiz_question";
29
+ ETutorResourceType["QUESBOOK"] = "quesbook";
30
+ ETutorResourceType["VIDEO"] = "video";
31
+ ETutorResourceType["IMAGE"] = "image";
32
+ ETutorResourceType["EXTERNAL"] = "external";
33
+ })(ETutorResourceType || (ETutorResourceType = {}));
@@ -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
+ }
@@ -35,6 +35,7 @@ export * from './Todo';
35
35
  export * from './Token';
36
36
  export * from './Topic';
37
37
  export * from './Type';
38
+ export * from './Tutor';
38
39
  export * from './Ucat';
39
40
  export * from './Ukmla2026';
40
41
  export * from './UkmlaTopic';
@@ -35,6 +35,7 @@ export * from './Todo';
35
35
  export * from './Token';
36
36
  export * from './Topic';
37
37
  export * from './Type';
38
+ export * from './Tutor';
38
39
  export * from './Ucat';
39
40
  export * from './Ukmla2026';
40
41
  export * from './UkmlaTopic';
@@ -9,5 +9,6 @@ export * from './osce';
9
9
  export * from './picture';
10
10
  export * from './question';
11
11
  export * from './topic';
12
+ export * from './tutor';
12
13
  export * from './user';
13
14
  export * from './video';
@@ -9,5 +9,6 @@ export * from './osce';
9
9
  export * from './picture';
10
10
  export * from './question';
11
11
  export * from './topic';
12
+ export * from './tutor';
12
13
  export * from './user';
13
14
  export * from './video';
@@ -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,75 @@
1
+ import { gql } from '@apollo/client';
2
+ export const TUTOR_OPTION_FIELDS = gql `
3
+ fragment TutorOptionFields on TutorOption {
4
+ id
5
+ label
6
+ }
7
+ `;
8
+ export const TUTOR_BLOCK_FIELDS = gql `
9
+ ${TUTOR_OPTION_FIELDS}
10
+ fragment TutorBlockFields on TutorBlock {
11
+ type
12
+ content
13
+ blockId
14
+ prompt
15
+ options {
16
+ ...TutorOptionFields
17
+ }
18
+ result {
19
+ selectedOptionId
20
+ correctOptionId
21
+ correct
22
+ rationale
23
+ answeredAt
24
+ }
25
+ hints {
26
+ id
27
+ text
28
+ revealedAt
29
+ }
30
+ followUps {
31
+ ...TutorOptionFields
32
+ }
33
+ data
34
+ }
35
+ `;
36
+ export const TUTOR_MESSAGE_FIELDS = gql `
37
+ ${TUTOR_BLOCK_FIELDS}
38
+ fragment TutorMessageFields on TutorMessage {
39
+ id
40
+ conversationId
41
+ role
42
+ phase
43
+ preset
44
+ blocks {
45
+ ...TutorBlockFields
46
+ }
47
+ rating
48
+ ratedAt
49
+ createdAt
50
+ }
51
+ `;
52
+ export const TUTOR_CONVERSATION_FIELDS = gql `
53
+ ${TUTOR_MESSAGE_FIELDS}
54
+ fragment TutorConversationFields on TutorConversation {
55
+ id
56
+ title
57
+ marksheetId
58
+ questionId
59
+ resources {
60
+ type
61
+ title
62
+ url
63
+ summary
64
+ }
65
+ messages {
66
+ ...TutorMessageFields
67
+ }
68
+ feedback {
69
+ rating
70
+ comment
71
+ }
72
+ lastActivityAt
73
+ createdAt
74
+ }
75
+ `;
@@ -14,5 +14,6 @@ export * from './station';
14
14
  export * from './stripe';
15
15
  export * from './todo';
16
16
  export * from './token';
17
+ export * from './tutor';
17
18
  export * from './users';
18
19
  export * from './video';
@@ -14,5 +14,6 @@ export * from './station';
14
14
  export * from './stripe';
15
15
  export * from './todo';
16
16
  export * from './token';
17
+ export * from './tutor';
17
18
  export * from './users';
18
19
  export * from './video';
@@ -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,72 @@
1
+ import { gql } from '@apollo/client';
2
+ import { TUTOR_CONVERSATION_FIELDS, TUTOR_MESSAGE_FIELDS, } from '../../fragments/tutor';
3
+ export const ANSWER_TUTOR_QUIZ = gql `
4
+ ${TUTOR_MESSAGE_FIELDS}
5
+ mutation AnswerTutorQuiz(
6
+ $messageId: ID!
7
+ $blockId: String!
8
+ $optionId: String!
9
+ ) {
10
+ restricted {
11
+ answerTutorQuiz(
12
+ messageId: $messageId
13
+ blockId: $blockId
14
+ optionId: $optionId
15
+ ) {
16
+ ...TutorMessageFields
17
+ }
18
+ }
19
+ }
20
+ `;
21
+ export const REVEAL_TUTOR_HINT = gql `
22
+ ${TUTOR_MESSAGE_FIELDS}
23
+ mutation RevealTutorHint(
24
+ $messageId: ID!
25
+ $blockId: String!
26
+ $hintId: String!
27
+ ) {
28
+ restricted {
29
+ revealTutorHint(
30
+ messageId: $messageId
31
+ blockId: $blockId
32
+ hintId: $hintId
33
+ ) {
34
+ ...TutorMessageFields
35
+ }
36
+ }
37
+ }
38
+ `;
39
+ export const RATE_TUTOR_MESSAGE = gql `
40
+ mutation RateTutorMessage($messageId: ID!, $rating: TutorRating) {
41
+ restricted {
42
+ rateTutorMessage(messageId: $messageId, rating: $rating) {
43
+ id
44
+ rating
45
+ ratedAt
46
+ }
47
+ }
48
+ }
49
+ `;
50
+ export const SUBMIT_TUTOR_FEEDBACK = gql `
51
+ ${TUTOR_CONVERSATION_FIELDS}
52
+ mutation SubmitTutorFeedback(
53
+ $conversationId: Int!
54
+ $feedback: TutorFeedbackInput!
55
+ ) {
56
+ restricted {
57
+ submitTutorFeedback(
58
+ conversationId: $conversationId
59
+ feedback: $feedback
60
+ ) {
61
+ ...TutorConversationFields
62
+ }
63
+ }
64
+ }
65
+ `;
66
+ export const DELETE_TUTOR_CONVERSATION = gql `
67
+ mutation DeleteTutorConversation($conversationId: Int!) {
68
+ restricted {
69
+ deleteTutorConversation(conversationId: $conversationId)
70
+ }
71
+ }
72
+ `;