@quesmed/types 2.6.151 → 2.6.152
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/resolvers/mutation/admin/index.d.ts +1 -0
- package/dist/cjs/resolvers/mutation/admin/index.js +1 -0
- package/dist/cjs/resolvers/mutation/admin/question.d.ts +19 -0
- package/dist/cjs/resolvers/mutation/admin/question.js +13 -0
- package/dist/cjs/resolvers/query/admin/index.d.ts +1 -0
- package/dist/cjs/resolvers/query/admin/index.js +1 -0
- package/dist/cjs/resolvers/query/admin/question.d.ts +7 -0
- package/dist/cjs/resolvers/query/admin/question.js +91 -0
- package/dist/cjs/resolvers/query/restricted/question.d.ts +1 -3
- package/dist/cjs/resolvers/query/restricted/question.js +1 -87
- package/dist/mjs/resolvers/mutation/admin/index.d.ts +1 -0
- package/dist/mjs/resolvers/mutation/admin/index.js +1 -0
- package/dist/mjs/resolvers/mutation/admin/question.d.ts +19 -0
- package/dist/mjs/resolvers/mutation/admin/question.js +10 -0
- package/dist/mjs/resolvers/query/admin/index.d.ts +1 -0
- package/dist/mjs/resolvers/query/admin/index.js +1 -0
- package/dist/mjs/resolvers/query/admin/question.d.ts +7 -0
- package/dist/mjs/resolvers/query/admin/question.js +88 -0
- package/dist/mjs/resolvers/query/restricted/question.d.ts +1 -3
- package/dist/mjs/resolvers/query/restricted/question.js +1 -87
- package/package.json +1 -1
|
@@ -18,4 +18,5 @@ __exportStar(require("./algoliaSync"), exports);
|
|
|
18
18
|
__exportStar(require("./content"), exports);
|
|
19
19
|
__exportStar(require("./database"), exports);
|
|
20
20
|
__exportStar(require("./notification"), exports);
|
|
21
|
+
__exportStar(require("./question"), exports);
|
|
21
22
|
__exportStar(require("./token"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IQuestion, IQuestionCase, IQuestionChoice, IQuestionEntitlement, Id } from '../../../models';
|
|
2
|
+
import { AdminData, graphqlNormalize } from '../../types';
|
|
3
|
+
export declare const UPDATE_QUESTION: import("@apollo/client").DocumentNode;
|
|
4
|
+
export interface IUpdateQuestionVar {
|
|
5
|
+
id: Id;
|
|
6
|
+
public?: boolean;
|
|
7
|
+
question?: string;
|
|
8
|
+
conceptId?: number;
|
|
9
|
+
difficulty?: number;
|
|
10
|
+
typeId?: number;
|
|
11
|
+
answer?: string;
|
|
12
|
+
choices?: Partial<IQuestionChoice>[];
|
|
13
|
+
cases?: Partial<IQuestionCase>[];
|
|
14
|
+
explanation?: string;
|
|
15
|
+
learningPoint?: string;
|
|
16
|
+
entitlements?: Partial<IQuestionEntitlement>[];
|
|
17
|
+
createRevision?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export type IUpdateQuestionData = AdminData<graphqlNormalize & IQuestion, 'updateQuestion'>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UPDATE_QUESTION = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
exports.UPDATE_QUESTION = (0, client_1.gql) `
|
|
6
|
+
mutation updateQuestion($input: UpdateQuestionInput!) {
|
|
7
|
+
admin {
|
|
8
|
+
updateQuestion(input: $input) {
|
|
9
|
+
id
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IQuestion, Id } from '../../../models';
|
|
2
|
+
import { AdminData, graphqlNormalize } from '../../types';
|
|
3
|
+
export declare const ADMIN_QUESTION: import("@apollo/client").DocumentNode;
|
|
4
|
+
export interface IAdminQuestionVar {
|
|
5
|
+
id: Id;
|
|
6
|
+
}
|
|
7
|
+
export type IAdminQuestionData = AdminData<graphqlNormalize & IQuestion, 'question'>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ADMIN_QUESTION = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
const fragments_1 = require("../../fragments");
|
|
6
|
+
exports.ADMIN_QUESTION = (0, client_1.gql) `
|
|
7
|
+
${fragments_1.QUESTION_COMMENT_FIELDS}
|
|
8
|
+
${fragments_1.PICTURE_FIELDS}
|
|
9
|
+
query QuestionData($id: Int!) {
|
|
10
|
+
admin {
|
|
11
|
+
question(id: $id) {
|
|
12
|
+
... on QuestionEMQ {
|
|
13
|
+
cases {
|
|
14
|
+
id
|
|
15
|
+
questionId
|
|
16
|
+
case
|
|
17
|
+
explanation
|
|
18
|
+
label
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
id
|
|
22
|
+
public
|
|
23
|
+
conceptId
|
|
24
|
+
difficulty
|
|
25
|
+
question
|
|
26
|
+
learningPoint
|
|
27
|
+
explanation
|
|
28
|
+
createdAt
|
|
29
|
+
updatedAt
|
|
30
|
+
typeId
|
|
31
|
+
entitlements {
|
|
32
|
+
id
|
|
33
|
+
entitlementId
|
|
34
|
+
questionId
|
|
35
|
+
}
|
|
36
|
+
pictures {
|
|
37
|
+
...PictureFields
|
|
38
|
+
}
|
|
39
|
+
comments {
|
|
40
|
+
...QuestionCommentFields
|
|
41
|
+
}
|
|
42
|
+
revisions {
|
|
43
|
+
id
|
|
44
|
+
questionId
|
|
45
|
+
createdAt
|
|
46
|
+
updatedAt
|
|
47
|
+
conceptId
|
|
48
|
+
difficulty
|
|
49
|
+
typeId
|
|
50
|
+
question
|
|
51
|
+
explanation
|
|
52
|
+
learningPoint
|
|
53
|
+
answer
|
|
54
|
+
choices {
|
|
55
|
+
id
|
|
56
|
+
name
|
|
57
|
+
explanation
|
|
58
|
+
label
|
|
59
|
+
answer
|
|
60
|
+
votes
|
|
61
|
+
updatedAt
|
|
62
|
+
}
|
|
63
|
+
cases {
|
|
64
|
+
id
|
|
65
|
+
questionId
|
|
66
|
+
case
|
|
67
|
+
explanation
|
|
68
|
+
label
|
|
69
|
+
updatedAt
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
choices {
|
|
73
|
+
id
|
|
74
|
+
name
|
|
75
|
+
explanation
|
|
76
|
+
label
|
|
77
|
+
answer
|
|
78
|
+
}
|
|
79
|
+
topic {
|
|
80
|
+
id
|
|
81
|
+
name
|
|
82
|
+
}
|
|
83
|
+
concept {
|
|
84
|
+
id
|
|
85
|
+
name
|
|
86
|
+
topicId
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
`;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Id, IQuestion } from '../../../models';
|
|
2
|
-
import {
|
|
2
|
+
import { 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.
|
|
3
|
+
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,89 +13,3 @@ 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
|
-
`;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IQuestion, IQuestionCase, IQuestionChoice, IQuestionEntitlement, Id } from '../../../models';
|
|
2
|
+
import { AdminData, graphqlNormalize } from '../../types';
|
|
3
|
+
export declare const UPDATE_QUESTION: import("@apollo/client").DocumentNode;
|
|
4
|
+
export interface IUpdateQuestionVar {
|
|
5
|
+
id: Id;
|
|
6
|
+
public?: boolean;
|
|
7
|
+
question?: string;
|
|
8
|
+
conceptId?: number;
|
|
9
|
+
difficulty?: number;
|
|
10
|
+
typeId?: number;
|
|
11
|
+
answer?: string;
|
|
12
|
+
choices?: Partial<IQuestionChoice>[];
|
|
13
|
+
cases?: Partial<IQuestionCase>[];
|
|
14
|
+
explanation?: string;
|
|
15
|
+
learningPoint?: string;
|
|
16
|
+
entitlements?: Partial<IQuestionEntitlement>[];
|
|
17
|
+
createRevision?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export type IUpdateQuestionData = AdminData<graphqlNormalize & IQuestion, 'updateQuestion'>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IQuestion, Id } from '../../../models';
|
|
2
|
+
import { AdminData, graphqlNormalize } from '../../types';
|
|
3
|
+
export declare const ADMIN_QUESTION: import("@apollo/client").DocumentNode;
|
|
4
|
+
export interface IAdminQuestionVar {
|
|
5
|
+
id: Id;
|
|
6
|
+
}
|
|
7
|
+
export type IAdminQuestionData = AdminData<graphqlNormalize & IQuestion, 'question'>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
import { PICTURE_FIELDS, QUESTION_COMMENT_FIELDS } from '../../fragments';
|
|
3
|
+
export const ADMIN_QUESTION = gql `
|
|
4
|
+
${QUESTION_COMMENT_FIELDS}
|
|
5
|
+
${PICTURE_FIELDS}
|
|
6
|
+
query QuestionData($id: Int!) {
|
|
7
|
+
admin {
|
|
8
|
+
question(id: $id) {
|
|
9
|
+
... on QuestionEMQ {
|
|
10
|
+
cases {
|
|
11
|
+
id
|
|
12
|
+
questionId
|
|
13
|
+
case
|
|
14
|
+
explanation
|
|
15
|
+
label
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
id
|
|
19
|
+
public
|
|
20
|
+
conceptId
|
|
21
|
+
difficulty
|
|
22
|
+
question
|
|
23
|
+
learningPoint
|
|
24
|
+
explanation
|
|
25
|
+
createdAt
|
|
26
|
+
updatedAt
|
|
27
|
+
typeId
|
|
28
|
+
entitlements {
|
|
29
|
+
id
|
|
30
|
+
entitlementId
|
|
31
|
+
questionId
|
|
32
|
+
}
|
|
33
|
+
pictures {
|
|
34
|
+
...PictureFields
|
|
35
|
+
}
|
|
36
|
+
comments {
|
|
37
|
+
...QuestionCommentFields
|
|
38
|
+
}
|
|
39
|
+
revisions {
|
|
40
|
+
id
|
|
41
|
+
questionId
|
|
42
|
+
createdAt
|
|
43
|
+
updatedAt
|
|
44
|
+
conceptId
|
|
45
|
+
difficulty
|
|
46
|
+
typeId
|
|
47
|
+
question
|
|
48
|
+
explanation
|
|
49
|
+
learningPoint
|
|
50
|
+
answer
|
|
51
|
+
choices {
|
|
52
|
+
id
|
|
53
|
+
name
|
|
54
|
+
explanation
|
|
55
|
+
label
|
|
56
|
+
answer
|
|
57
|
+
votes
|
|
58
|
+
updatedAt
|
|
59
|
+
}
|
|
60
|
+
cases {
|
|
61
|
+
id
|
|
62
|
+
questionId
|
|
63
|
+
case
|
|
64
|
+
explanation
|
|
65
|
+
label
|
|
66
|
+
updatedAt
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
choices {
|
|
70
|
+
id
|
|
71
|
+
name
|
|
72
|
+
explanation
|
|
73
|
+
label
|
|
74
|
+
answer
|
|
75
|
+
}
|
|
76
|
+
topic {
|
|
77
|
+
id
|
|
78
|
+
name
|
|
79
|
+
}
|
|
80
|
+
concept {
|
|
81
|
+
id
|
|
82
|
+
name
|
|
83
|
+
topicId
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Id, IQuestion } from '../../../models';
|
|
2
|
-
import {
|
|
2
|
+
import { 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 {
|
|
2
|
+
import { QUESTION_FIELDS } from '../../fragments';
|
|
3
3
|
export const QUESTION = gql `
|
|
4
4
|
${QUESTION_FIELDS}
|
|
5
5
|
query Question($id: Int!) {
|
|
@@ -10,89 +10,3 @@ 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
|
-
`;
|