@quesmed/types 2.6.149 → 2.6.151
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/dist/cjs/models/Chapter.d.ts +1 -0
- package/dist/cjs/models/Content.d.ts +1 -0
- package/dist/cjs/models/Question.d.ts +3 -0
- package/dist/cjs/resolvers/fragments/chapter.js +2 -1
- package/dist/cjs/resolvers/query/restricted/question.d.ts +3 -1
- package/dist/cjs/resolvers/query/restricted/question.js +87 -1
- package/dist/cjs/resolvers/query/restricted/video.js +7 -0
- package/dist/cjs/resolvers/query/video.js +2 -0
- package/dist/mjs/models/Chapter.d.ts +1 -0
- package/dist/mjs/models/Content.d.ts +1 -0
- package/dist/mjs/models/Question.d.ts +3 -0
- package/dist/mjs/resolvers/fragments/chapter.js +2 -1
- package/dist/mjs/resolvers/query/restricted/question.d.ts +3 -1
- package/dist/mjs/resolvers/query/restricted/question.js +87 -1
- package/dist/mjs/resolvers/query/restricted/video.js +7 -0
- package/dist/mjs/resolvers/query/video.js +2 -0
- package/package.json +1 -1
|
@@ -63,6 +63,7 @@ export interface IQuestionRevision {
|
|
|
63
63
|
cases: IQuestion['cases'];
|
|
64
64
|
choices: IQuestion['choices'];
|
|
65
65
|
explanation: IQuestion['explanation'];
|
|
66
|
+
learningPoint: IQuestion['learningPoint'];
|
|
66
67
|
elo: IQuestion['elo'];
|
|
67
68
|
psaSectionId: IQuestion['psaSectionId'];
|
|
68
69
|
createdAt: number | Date;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IChapter } from './Chapter';
|
|
2
2
|
import { IConcept } from './Concept';
|
|
3
3
|
import { ICondition } from './Condition';
|
|
4
|
+
import { IQuestionRevision } from './Content';
|
|
4
5
|
import { EDifficultyType } from './Difficulty';
|
|
5
6
|
import { IHighlightNode } from './Highlight';
|
|
6
7
|
import { IPicture } from './Picture';
|
|
@@ -113,6 +114,8 @@ export interface IQuestion {
|
|
|
113
114
|
highlights?: IHighlightNode[];
|
|
114
115
|
timeTaken?: number;
|
|
115
116
|
avgTimeTaken?: number;
|
|
117
|
+
revisions?: IQuestionRevision[];
|
|
118
|
+
entitlements?: IQuestionEntitlement[];
|
|
116
119
|
}
|
|
117
120
|
export interface IQuestionChoice {
|
|
118
121
|
id: Id;
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CHAPTER_WITH_HIGHLIGHT_FIELDS = exports.CHAPTER_FIELDS = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
|
-
const picture_1 = require("./picture");
|
|
6
5
|
const highlight_1 = require("./highlight");
|
|
6
|
+
const picture_1 = require("./picture");
|
|
7
7
|
exports.CHAPTER_FIELDS = (0, client_1.gql) `
|
|
8
8
|
${picture_1.PICTURE_FIELDS}
|
|
9
9
|
${highlight_1.HIGHLIGHT_FIELDS}
|
|
10
10
|
fragment ChapterFields on Chapter {
|
|
11
11
|
id
|
|
12
12
|
explanation
|
|
13
|
+
summary
|
|
13
14
|
typeId
|
|
14
15
|
pictures {
|
|
15
16
|
...PictureFields
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Id, IQuestion } from '../../../models';
|
|
2
|
-
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
2
|
+
import { AdminData, graphqlNormalize, RestrictedData } from '../../types';
|
|
3
3
|
export interface IQuestionVar {
|
|
4
4
|
id: Id;
|
|
5
5
|
}
|
|
6
6
|
export type IQuestionData = RestrictedData<graphqlNormalize & IQuestion, 'question'>;
|
|
7
7
|
export declare const QUESTION: import("@apollo/client").DocumentNode;
|
|
8
|
+
export declare const ADMIN_QUESTION: import("@apollo/client").DocumentNode;
|
|
9
|
+
export type IAdminQuestionData = AdminData<graphqlNormalize & IQuestion, 'question'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QUESTION = void 0;
|
|
3
|
+
exports.ADMIN_QUESTION = exports.QUESTION = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
const fragments_1 = require("../../fragments");
|
|
6
6
|
exports.QUESTION = (0, client_1.gql) `
|
|
@@ -13,3 +13,89 @@ exports.QUESTION = (0, client_1.gql) `
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
`;
|
|
16
|
+
exports.ADMIN_QUESTION = (0, client_1.gql) `
|
|
17
|
+
${fragments_1.QUESTION_COMMENT_FIELDS}
|
|
18
|
+
${fragments_1.PICTURE_FIELDS}
|
|
19
|
+
query QuestionData($id: Int!) {
|
|
20
|
+
admin {
|
|
21
|
+
question(id: $id) {
|
|
22
|
+
... on QuestionEMQ {
|
|
23
|
+
cases {
|
|
24
|
+
id
|
|
25
|
+
questionId
|
|
26
|
+
case
|
|
27
|
+
explanation
|
|
28
|
+
label
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
id
|
|
32
|
+
public
|
|
33
|
+
conceptId
|
|
34
|
+
difficulty
|
|
35
|
+
question
|
|
36
|
+
learningPoint
|
|
37
|
+
explanation
|
|
38
|
+
createdAt
|
|
39
|
+
updatedAt
|
|
40
|
+
typeId
|
|
41
|
+
entitlements {
|
|
42
|
+
id
|
|
43
|
+
entitlementId
|
|
44
|
+
questionId
|
|
45
|
+
}
|
|
46
|
+
pictures {
|
|
47
|
+
...PictureFields
|
|
48
|
+
}
|
|
49
|
+
comments {
|
|
50
|
+
...QuestionCommentFields
|
|
51
|
+
}
|
|
52
|
+
revisions {
|
|
53
|
+
id
|
|
54
|
+
questionId
|
|
55
|
+
createdAt
|
|
56
|
+
updatedAt
|
|
57
|
+
conceptId
|
|
58
|
+
difficulty
|
|
59
|
+
typeId
|
|
60
|
+
question
|
|
61
|
+
explanation
|
|
62
|
+
learningPoint
|
|
63
|
+
answer
|
|
64
|
+
choices {
|
|
65
|
+
id
|
|
66
|
+
name
|
|
67
|
+
explanation
|
|
68
|
+
label
|
|
69
|
+
answer
|
|
70
|
+
votes
|
|
71
|
+
updatedAt
|
|
72
|
+
}
|
|
73
|
+
cases {
|
|
74
|
+
id
|
|
75
|
+
questionId
|
|
76
|
+
case
|
|
77
|
+
explanation
|
|
78
|
+
label
|
|
79
|
+
updatedAt
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
choices {
|
|
83
|
+
id
|
|
84
|
+
name
|
|
85
|
+
explanation
|
|
86
|
+
label
|
|
87
|
+
answer
|
|
88
|
+
}
|
|
89
|
+
topic {
|
|
90
|
+
id
|
|
91
|
+
name
|
|
92
|
+
}
|
|
93
|
+
concept {
|
|
94
|
+
id
|
|
95
|
+
name
|
|
96
|
+
topicId
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
@@ -41,6 +41,7 @@ exports.SAMPLE_VIDEOS = (0, client_1.gql) `
|
|
|
41
41
|
chapter {
|
|
42
42
|
id
|
|
43
43
|
explanation
|
|
44
|
+
summary
|
|
44
45
|
pictures {
|
|
45
46
|
...PictureFields
|
|
46
47
|
}
|
|
@@ -66,6 +67,7 @@ exports.SAMPLE_VIDEO = (0, client_1.gql) `
|
|
|
66
67
|
chapter {
|
|
67
68
|
id
|
|
68
69
|
explanation
|
|
70
|
+
summary
|
|
69
71
|
pictures {
|
|
70
72
|
...PictureFields
|
|
71
73
|
}
|
|
@@ -63,6 +63,7 @@ export interface IQuestionRevision {
|
|
|
63
63
|
cases: IQuestion['cases'];
|
|
64
64
|
choices: IQuestion['choices'];
|
|
65
65
|
explanation: IQuestion['explanation'];
|
|
66
|
+
learningPoint: IQuestion['learningPoint'];
|
|
66
67
|
elo: IQuestion['elo'];
|
|
67
68
|
psaSectionId: IQuestion['psaSectionId'];
|
|
68
69
|
createdAt: number | Date;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IChapter } from './Chapter';
|
|
2
2
|
import { IConcept } from './Concept';
|
|
3
3
|
import { ICondition } from './Condition';
|
|
4
|
+
import { IQuestionRevision } from './Content';
|
|
4
5
|
import { EDifficultyType } from './Difficulty';
|
|
5
6
|
import { IHighlightNode } from './Highlight';
|
|
6
7
|
import { IPicture } from './Picture';
|
|
@@ -113,6 +114,8 @@ export interface IQuestion {
|
|
|
113
114
|
highlights?: IHighlightNode[];
|
|
114
115
|
timeTaken?: number;
|
|
115
116
|
avgTimeTaken?: number;
|
|
117
|
+
revisions?: IQuestionRevision[];
|
|
118
|
+
entitlements?: IQuestionEntitlement[];
|
|
116
119
|
}
|
|
117
120
|
export interface IQuestionChoice {
|
|
118
121
|
id: Id;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { gql } from '@apollo/client';
|
|
2
|
-
import { PICTURE_FIELDS } from './picture';
|
|
3
2
|
import { HIGHLIGHT_FIELDS } from './highlight';
|
|
3
|
+
import { PICTURE_FIELDS } from './picture';
|
|
4
4
|
export const CHAPTER_FIELDS = gql `
|
|
5
5
|
${PICTURE_FIELDS}
|
|
6
6
|
${HIGHLIGHT_FIELDS}
|
|
7
7
|
fragment ChapterFields on Chapter {
|
|
8
8
|
id
|
|
9
9
|
explanation
|
|
10
|
+
summary
|
|
10
11
|
typeId
|
|
11
12
|
pictures {
|
|
12
13
|
...PictureFields
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Id, IQuestion } from '../../../models';
|
|
2
|
-
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
2
|
+
import { AdminData, graphqlNormalize, RestrictedData } from '../../types';
|
|
3
3
|
export interface IQuestionVar {
|
|
4
4
|
id: Id;
|
|
5
5
|
}
|
|
6
6
|
export type IQuestionData = RestrictedData<graphqlNormalize & IQuestion, 'question'>;
|
|
7
7
|
export declare const QUESTION: import("@apollo/client").DocumentNode;
|
|
8
|
+
export declare const ADMIN_QUESTION: import("@apollo/client").DocumentNode;
|
|
9
|
+
export type IAdminQuestionData = AdminData<graphqlNormalize & IQuestion, 'question'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { gql } from '@apollo/client';
|
|
2
|
-
import { QUESTION_FIELDS } from '../../fragments';
|
|
2
|
+
import { PICTURE_FIELDS, QUESTION_COMMENT_FIELDS, QUESTION_FIELDS, } from '../../fragments';
|
|
3
3
|
export const QUESTION = gql `
|
|
4
4
|
${QUESTION_FIELDS}
|
|
5
5
|
query Question($id: Int!) {
|
|
@@ -10,3 +10,89 @@ export const QUESTION = gql `
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
`;
|
|
13
|
+
export const ADMIN_QUESTION = gql `
|
|
14
|
+
${QUESTION_COMMENT_FIELDS}
|
|
15
|
+
${PICTURE_FIELDS}
|
|
16
|
+
query QuestionData($id: Int!) {
|
|
17
|
+
admin {
|
|
18
|
+
question(id: $id) {
|
|
19
|
+
... on QuestionEMQ {
|
|
20
|
+
cases {
|
|
21
|
+
id
|
|
22
|
+
questionId
|
|
23
|
+
case
|
|
24
|
+
explanation
|
|
25
|
+
label
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
id
|
|
29
|
+
public
|
|
30
|
+
conceptId
|
|
31
|
+
difficulty
|
|
32
|
+
question
|
|
33
|
+
learningPoint
|
|
34
|
+
explanation
|
|
35
|
+
createdAt
|
|
36
|
+
updatedAt
|
|
37
|
+
typeId
|
|
38
|
+
entitlements {
|
|
39
|
+
id
|
|
40
|
+
entitlementId
|
|
41
|
+
questionId
|
|
42
|
+
}
|
|
43
|
+
pictures {
|
|
44
|
+
...PictureFields
|
|
45
|
+
}
|
|
46
|
+
comments {
|
|
47
|
+
...QuestionCommentFields
|
|
48
|
+
}
|
|
49
|
+
revisions {
|
|
50
|
+
id
|
|
51
|
+
questionId
|
|
52
|
+
createdAt
|
|
53
|
+
updatedAt
|
|
54
|
+
conceptId
|
|
55
|
+
difficulty
|
|
56
|
+
typeId
|
|
57
|
+
question
|
|
58
|
+
explanation
|
|
59
|
+
learningPoint
|
|
60
|
+
answer
|
|
61
|
+
choices {
|
|
62
|
+
id
|
|
63
|
+
name
|
|
64
|
+
explanation
|
|
65
|
+
label
|
|
66
|
+
answer
|
|
67
|
+
votes
|
|
68
|
+
updatedAt
|
|
69
|
+
}
|
|
70
|
+
cases {
|
|
71
|
+
id
|
|
72
|
+
questionId
|
|
73
|
+
case
|
|
74
|
+
explanation
|
|
75
|
+
label
|
|
76
|
+
updatedAt
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
choices {
|
|
80
|
+
id
|
|
81
|
+
name
|
|
82
|
+
explanation
|
|
83
|
+
label
|
|
84
|
+
answer
|
|
85
|
+
}
|
|
86
|
+
topic {
|
|
87
|
+
id
|
|
88
|
+
name
|
|
89
|
+
}
|
|
90
|
+
concept {
|
|
91
|
+
id
|
|
92
|
+
name
|
|
93
|
+
topicId
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
`;
|
|
@@ -38,6 +38,7 @@ export const SAMPLE_VIDEOS = gql `
|
|
|
38
38
|
chapter {
|
|
39
39
|
id
|
|
40
40
|
explanation
|
|
41
|
+
summary
|
|
41
42
|
pictures {
|
|
42
43
|
...PictureFields
|
|
43
44
|
}
|
|
@@ -63,6 +64,7 @@ export const SAMPLE_VIDEO = gql `
|
|
|
63
64
|
chapter {
|
|
64
65
|
id
|
|
65
66
|
explanation
|
|
67
|
+
summary
|
|
66
68
|
pictures {
|
|
67
69
|
...PictureFields
|
|
68
70
|
}
|