@quesmed/types-rn 2.6.197 → 2.6.198
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/Picture.d.ts +8 -0
- package/models/Question.d.ts +4 -0
- package/package.json +1 -1
- package/resolvers/fragments/picture.js +1 -0
- package/resolvers/fragments/question.d.ts +1 -0
- package/resolvers/fragments/question.js +14 -1
- package/resolvers/mutation/admin/chapter.d.ts +1 -7
- package/resolvers/mutation/admin/question.d.ts +2 -1
- package/resolvers/query/admin/question.js +17 -9
- package/resolvers/query/restricted/analytics.d.ts +26 -0
- package/resolvers/query/restricted/analytics.js +30 -1
package/models/Picture.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ELightGalleryType } from './Job';
|
|
1
2
|
import { EStationPictureType } from './OsceStation';
|
|
2
3
|
import { ITopic } from './Topic';
|
|
3
4
|
import { Id } from './Type';
|
|
@@ -19,6 +20,7 @@ export interface IPicture {
|
|
|
19
20
|
topicId: Id;
|
|
20
21
|
topic: ITopic;
|
|
21
22
|
index: number;
|
|
23
|
+
typeId?: ELightGalleryType;
|
|
22
24
|
}
|
|
23
25
|
export interface ICardPicture {
|
|
24
26
|
id: Id;
|
|
@@ -50,3 +52,9 @@ export interface IQuestionPicture {
|
|
|
50
52
|
picture: IPicture;
|
|
51
53
|
pictureIdx: number;
|
|
52
54
|
}
|
|
55
|
+
export interface IAssetBinding {
|
|
56
|
+
id: Id;
|
|
57
|
+
index: number;
|
|
58
|
+
choiceLabel?: string;
|
|
59
|
+
deleted: boolean;
|
|
60
|
+
}
|
package/models/Question.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ICondition } from './Condition';
|
|
|
4
4
|
import { IQuestionRevision } from './Content';
|
|
5
5
|
import { EDifficultyType } from './Difficulty';
|
|
6
6
|
import { IHighlightNode } from './Highlight';
|
|
7
|
+
import { IJobRecord, IJobRecordChoiceSummary, IJobRecordMetricsSummary } from './Job';
|
|
7
8
|
import { IPicture } from './Picture';
|
|
8
9
|
import { IPresentation } from './Presentation';
|
|
9
10
|
import { ITopic } from './Topic';
|
|
@@ -116,6 +117,9 @@ export interface IQuestion {
|
|
|
116
117
|
avgTimeTaken?: number;
|
|
117
118
|
revisions?: IQuestionRevision[];
|
|
118
119
|
entitlements?: IQuestionEntitlement[];
|
|
120
|
+
jobRecord?: IJobRecord | null;
|
|
121
|
+
metricsSummary?: IJobRecordMetricsSummary | null;
|
|
122
|
+
choiceSummary?: IJobRecordChoiceSummary[] | null;
|
|
119
123
|
}
|
|
120
124
|
export interface IQuestionChoice {
|
|
121
125
|
id: Id;
|
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const QUESTION_STATISTICS_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
1
2
|
export declare const QUESTION_COMMENT_FIELDS: import("@apollo/client").DocumentNode;
|
|
2
3
|
export declare const QUESTION_UKMLA_FIELDS: import("@apollo/client").DocumentNode;
|
|
3
4
|
export declare const QUESTION_UCAT_FIELDS: import("@apollo/client").DocumentNode;
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QUESTION_WITH_LEARNING_FIELDS = exports.QUESTION_WITH_COMMENT_FIELDS = exports.QUESTION_WITH_HIGHLIGHT_FIELDS = exports.QUESTION_FIELDS = exports.QUESTION_CATEGORY_FIELDS = exports.QUESTION_UCAT_FIELDS = exports.QUESTION_UKMLA_FIELDS = exports.QUESTION_COMMENT_FIELDS = void 0;
|
|
3
|
+
exports.QUESTION_WITH_LEARNING_FIELDS = exports.QUESTION_WITH_COMMENT_FIELDS = exports.QUESTION_WITH_HIGHLIGHT_FIELDS = exports.QUESTION_FIELDS = exports.QUESTION_CATEGORY_FIELDS = exports.QUESTION_UCAT_FIELDS = exports.QUESTION_UKMLA_FIELDS = exports.QUESTION_COMMENT_FIELDS = exports.QUESTION_STATISTICS_FRAGMENT = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
const chapter_1 = require("./chapter");
|
|
6
6
|
const concept_1 = require("./concept");
|
|
7
7
|
const highlight_1 = require("./highlight");
|
|
8
8
|
const picture_1 = require("./picture");
|
|
9
|
+
const record_1 = require("./record");
|
|
10
|
+
exports.QUESTION_STATISTICS_FRAGMENT = (0, client_1.gql) `
|
|
11
|
+
${record_1.JOB_RECORD_METRICS_SUMMARY_FRAGMENT}
|
|
12
|
+
${record_1.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT}
|
|
13
|
+
fragment QuestionStatistics on Question {
|
|
14
|
+
metricsSummary {
|
|
15
|
+
...JobRecordMetricsSummary
|
|
16
|
+
}
|
|
17
|
+
choiceSummary {
|
|
18
|
+
...JobRecordChoiceSummary
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
9
22
|
exports.QUESTION_COMMENT_FIELDS = (0, client_1.gql) `
|
|
10
23
|
fragment QuestionCommentFields on QuestionComment {
|
|
11
24
|
id
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { IChapter, Id } from '../../../models';
|
|
1
|
+
import { IAssetBinding, IChapter, Id } from '../../../models';
|
|
2
2
|
import { AdminData, graphqlNormalize } from '../../types';
|
|
3
3
|
export declare const UPDATE_CHAPTER: import("@apollo/client").DocumentNode;
|
|
4
|
-
export interface IAssetBinding {
|
|
5
|
-
id: Id;
|
|
6
|
-
index: number;
|
|
7
|
-
questionChoiceId?: Id;
|
|
8
|
-
deleted: boolean;
|
|
9
|
-
}
|
|
10
4
|
export interface IUpdateChapterVar {
|
|
11
5
|
id: Id;
|
|
12
6
|
explanation?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EEntitlementType, IQuestion, IQuestionCase, IQuestionChoice, Id } from '../../../models';
|
|
1
|
+
import { EEntitlementType, IAssetBinding, IQuestion, IQuestionCase, IQuestionChoice, Id } from '../../../models';
|
|
2
2
|
import { AdminData, graphqlNormalize } from '../../types';
|
|
3
3
|
export declare const UPDATE_QUESTION: import("@apollo/client").DocumentNode;
|
|
4
4
|
export interface IUpdateQuestionVar {
|
|
@@ -17,6 +17,7 @@ export interface IUpdateQuestionVar {
|
|
|
17
17
|
learningPoint?: string;
|
|
18
18
|
entitlements?: EEntitlementType[];
|
|
19
19
|
createRevision?: boolean;
|
|
20
|
+
assets?: IAssetBinding[];
|
|
20
21
|
}
|
|
21
22
|
export type IUpdateQuestionData = AdminData<graphqlNormalize & IQuestion, 'updateQuestion'>;
|
|
22
23
|
export declare const RESET_QUESTION: import("@apollo/client").DocumentNode;
|
|
@@ -4,20 +4,15 @@ exports.ADMIN_QUESTION = void 0;
|
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
const fragments_1 = require("../../fragments");
|
|
6
6
|
exports.ADMIN_QUESTION = (0, client_1.gql) `
|
|
7
|
+
${fragments_1.QUESTION_STATISTICS_FRAGMENT}
|
|
8
|
+
${fragments_1.QUESTION_CATEGORY_FIELDS}
|
|
7
9
|
${fragments_1.QUESTION_COMMENT_FIELDS}
|
|
8
10
|
${fragments_1.PICTURE_FIELDS}
|
|
9
11
|
query QuestionData($id: Int!) {
|
|
10
12
|
admin {
|
|
11
13
|
question(id: $id) {
|
|
12
|
-
...
|
|
13
|
-
|
|
14
|
-
id
|
|
15
|
-
questionId
|
|
16
|
-
case
|
|
17
|
-
explanation
|
|
18
|
-
label
|
|
19
|
-
}
|
|
20
|
-
}
|
|
14
|
+
...QuestionCategoryFields
|
|
15
|
+
...QuestionStatistics
|
|
21
16
|
id
|
|
22
17
|
public
|
|
23
18
|
conceptId
|
|
@@ -98,6 +93,9 @@ exports.ADMIN_QUESTION = (0, client_1.gql) `
|
|
|
98
93
|
answer
|
|
99
94
|
votes
|
|
100
95
|
updatedAt
|
|
96
|
+
picture {
|
|
97
|
+
...PictureFields
|
|
98
|
+
}
|
|
101
99
|
}
|
|
102
100
|
topic {
|
|
103
101
|
id
|
|
@@ -108,6 +106,16 @@ exports.ADMIN_QUESTION = (0, client_1.gql) `
|
|
|
108
106
|
name
|
|
109
107
|
topicId
|
|
110
108
|
}
|
|
109
|
+
jobRecord {
|
|
110
|
+
id
|
|
111
|
+
jobId
|
|
112
|
+
createdByUser {
|
|
113
|
+
id
|
|
114
|
+
firstName
|
|
115
|
+
lastName
|
|
116
|
+
username
|
|
117
|
+
}
|
|
118
|
+
}
|
|
111
119
|
}
|
|
112
120
|
}
|
|
113
121
|
}
|
|
@@ -17,6 +17,32 @@ export interface IUcatAnalytics {
|
|
|
17
17
|
}
|
|
18
18
|
export type IUcatAnalyticsData = RestrictedData<IUcatAnalytics[], 'ucatAnalytics'>;
|
|
19
19
|
export declare const UCAT_ANALYTICS: import("@apollo/client").DocumentNode;
|
|
20
|
+
export type IUcatOverallPerformanceVar = {
|
|
21
|
+
updatedAt?: Date | number;
|
|
22
|
+
entitlementId?: EEntitlementType;
|
|
23
|
+
};
|
|
24
|
+
export interface IUcatOverallStats {
|
|
25
|
+
date: Date | number;
|
|
26
|
+
correct: number;
|
|
27
|
+
total: number;
|
|
28
|
+
score: number;
|
|
29
|
+
}
|
|
30
|
+
export type IUcatOverallPerformanceData = RestrictedData<IUcatOverallStats[], 'ucatOverallPerformance'>;
|
|
31
|
+
export declare const UCAT_OVERALL_PERFORMANCE: import("@apollo/client").DocumentNode;
|
|
32
|
+
export type IUcatMockPerformanceVar = {
|
|
33
|
+
limit?: number;
|
|
34
|
+
mockTypeId?: number[];
|
|
35
|
+
};
|
|
36
|
+
export interface IUcatMockStats {
|
|
37
|
+
title: string;
|
|
38
|
+
typeId: number;
|
|
39
|
+
date: Date | number;
|
|
40
|
+
total: number;
|
|
41
|
+
correct: number;
|
|
42
|
+
incorrect: number;
|
|
43
|
+
}
|
|
44
|
+
export type IUcatMockPerformanceData = RestrictedData<IUcatMockStats[], 'ucatMockPerformance'>;
|
|
45
|
+
export declare const UCAT_MOCK_PERFORMANCE: import("@apollo/client").DocumentNode;
|
|
20
46
|
export type IUcatThemeAnalyticsVar = {
|
|
21
47
|
updatedAt?: Date | number;
|
|
22
48
|
entitlementId: EEntitlementType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UCAT_THEME_ANALYTICS = exports.UCAT_ANALYTICS = void 0;
|
|
3
|
+
exports.UCAT_THEME_ANALYTICS = exports.UCAT_MOCK_PERFORMANCE = exports.UCAT_OVERALL_PERFORMANCE = exports.UCAT_ANALYTICS = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
const fragments_1 = require("../../fragments");
|
|
6
6
|
exports.UCAT_ANALYTICS = (0, client_1.gql) `
|
|
@@ -29,6 +29,35 @@ exports.UCAT_ANALYTICS = (0, client_1.gql) `
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
`;
|
|
32
|
+
exports.UCAT_OVERALL_PERFORMANCE = (0, client_1.gql) `
|
|
33
|
+
query UcatOverallPerformance($updatedAt: Date, $entitlementId: Int) {
|
|
34
|
+
restricted {
|
|
35
|
+
ucatOverallPerformance(
|
|
36
|
+
updatedAt: $updatedAt
|
|
37
|
+
entitlementId: $entitlementId
|
|
38
|
+
) {
|
|
39
|
+
date
|
|
40
|
+
correct
|
|
41
|
+
total
|
|
42
|
+
score
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
exports.UCAT_MOCK_PERFORMANCE = (0, client_1.gql) `
|
|
48
|
+
query UcatMockPerformance($limit: Int, $mockTypeId: [Int!]) {
|
|
49
|
+
restricted {
|
|
50
|
+
ucatMockPerformance(limit: $limit, mockTypeId: $mockTypeId) {
|
|
51
|
+
title
|
|
52
|
+
typeId
|
|
53
|
+
date
|
|
54
|
+
total
|
|
55
|
+
correct
|
|
56
|
+
incorrect
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
32
61
|
exports.UCAT_THEME_ANALYTICS = (0, client_1.gql) `
|
|
33
62
|
${fragments_1.QUESTION_CATEGORY_FIELDS}
|
|
34
63
|
query UcatThemeAnalytics(
|