@quesmed/types-rn 2.6.148 → 2.6.150
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/Chapter.d.ts +1 -0
- package/models/Content.d.ts +4 -1
- package/models/Content.js +2 -0
- package/models/Question.d.ts +3 -0
- package/package.json +1 -1
- package/resolvers/mutation/admin/content.d.ts +7 -5
- package/resolvers/mutation/admin/content.js +4 -4
- package/resolvers/query/admin/dashboard.d.ts +2 -1
- package/resolvers/query/admin/dashboard.js +11 -0
- package/resolvers/query/restricted/question.d.ts +3 -1
- package/resolvers/query/restricted/question.js +87 -1
- package/resolvers/query/restricted/video.js +7 -0
package/models/Chapter.d.ts
CHANGED
package/models/Content.d.ts
CHANGED
|
@@ -9,7 +9,9 @@ export declare enum EBatchType {
|
|
|
9
9
|
CHAPTER = 2,
|
|
10
10
|
VIDEO = 3,
|
|
11
11
|
MOCK_TEST = 4,
|
|
12
|
-
CONCEPT = 5
|
|
12
|
+
CONCEPT = 5,
|
|
13
|
+
TOPIC = 6,
|
|
14
|
+
CARD = 7
|
|
13
15
|
}
|
|
14
16
|
export declare enum EContentType {
|
|
15
17
|
MARKDOWN = 0,
|
|
@@ -61,6 +63,7 @@ export interface IQuestionRevision {
|
|
|
61
63
|
cases: IQuestion['cases'];
|
|
62
64
|
choices: IQuestion['choices'];
|
|
63
65
|
explanation: IQuestion['explanation'];
|
|
66
|
+
learningPoint: IQuestion['learningPoint'];
|
|
64
67
|
elo: IQuestion['elo'];
|
|
65
68
|
psaSectionId: IQuestion['psaSectionId'];
|
|
66
69
|
createdAt: number | Date;
|
package/models/Content.js
CHANGED
|
@@ -9,6 +9,8 @@ var EBatchType;
|
|
|
9
9
|
EBatchType[EBatchType["VIDEO"] = 3] = "VIDEO";
|
|
10
10
|
EBatchType[EBatchType["MOCK_TEST"] = 4] = "MOCK_TEST";
|
|
11
11
|
EBatchType[EBatchType["CONCEPT"] = 5] = "CONCEPT";
|
|
12
|
+
EBatchType[EBatchType["TOPIC"] = 6] = "TOPIC";
|
|
13
|
+
EBatchType[EBatchType["CARD"] = 7] = "CARD";
|
|
12
14
|
})(EBatchType = exports.EBatchType || (exports.EBatchType = {}));
|
|
13
15
|
var EContentType;
|
|
14
16
|
(function (EContentType) {
|
package/models/Question.d.ts
CHANGED
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -58,12 +58,14 @@ export interface IUpdateBatchVar {
|
|
|
58
58
|
}
|
|
59
59
|
export type IUpdateBatchData = AdminData<IContentResult, 'updateBatch'>;
|
|
60
60
|
export declare const UPDATE_BATCH: import("@apollo/client").DocumentNode;
|
|
61
|
-
export
|
|
62
|
-
batchId
|
|
61
|
+
export type IToggleVisibilityVar = {
|
|
62
|
+
batchId?: string;
|
|
63
63
|
visibility: boolean;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
type?: EBatchType;
|
|
65
|
+
ids?: number[];
|
|
66
|
+
};
|
|
67
|
+
export type IToggleVisibilityData = AdminData<IContentResult, 'toggleVisibility'>;
|
|
68
|
+
export declare const TOGGLE_VISIBILITY: import("@apollo/client").DocumentNode;
|
|
67
69
|
export interface IUploadImagesVar {
|
|
68
70
|
file: FileData;
|
|
69
71
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.REDIS_CALL = exports.GET_PRODUCT_TRANSACTIONS = exports.CONTACT_SYNC_STATUS = exports.CONTACT_SYNC = exports.CLONE_CONTENT = exports.DELETE_IMAGES = exports.QUEUE_STATUS = exports.DELETE_RECORDS = exports.DOWNLOAD_IMAGES = exports.UPLOAD_FILES = exports.DELETE_FILES = exports.ES3Folder = exports.UPLOAD_IMAGES = exports.
|
|
3
|
+
exports.REDIS_CALL = exports.GET_PRODUCT_TRANSACTIONS = exports.CONTACT_SYNC_STATUS = exports.CONTACT_SYNC = exports.CLONE_CONTENT = exports.DELETE_IMAGES = exports.QUEUE_STATUS = exports.DELETE_RECORDS = exports.DOWNLOAD_IMAGES = exports.UPLOAD_FILES = exports.DELETE_FILES = exports.ES3Folder = exports.UPLOAD_IMAGES = exports.TOGGLE_VISIBILITY = exports.UPDATE_BATCH = exports.IMPORT_BATCH = exports.VALIDATE_MOCKTEST = exports.VALIDATE_UCAT_QUESTIONS = exports.VALIDATE_QUESTIONS = exports.VALIDATE_STATIONS = exports.VALIDATE_BOOK = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
exports.VALIDATE_BOOK = (0, client_1.gql) `
|
|
6
6
|
mutation ValidateBook($input: ValidateBookInput!) {
|
|
@@ -93,10 +93,10 @@ exports.UPDATE_BATCH = (0, client_1.gql) `
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
`;
|
|
96
|
-
exports.
|
|
97
|
-
mutation
|
|
96
|
+
exports.TOGGLE_VISIBILITY = (0, client_1.gql) `
|
|
97
|
+
mutation ToggleVisibility($input: VisibilityInput!) {
|
|
98
98
|
admin {
|
|
99
|
-
|
|
99
|
+
toggleVisibility(input: $input) {
|
|
100
100
|
batchId
|
|
101
101
|
logFile
|
|
102
102
|
status
|
|
@@ -22,6 +22,7 @@ export interface IRevenue {
|
|
|
22
22
|
subscriptionCount: number;
|
|
23
23
|
totalEarning: number;
|
|
24
24
|
invoiceCount: number;
|
|
25
|
+
breakdown: IRevenue[];
|
|
25
26
|
}
|
|
26
27
|
export declare enum ESubType {
|
|
27
28
|
ALL = 0,
|
|
@@ -144,7 +145,7 @@ export type IAppUsageGraphVar = {
|
|
|
144
145
|
year: number | null;
|
|
145
146
|
force: boolean;
|
|
146
147
|
productIds: EProductType[];
|
|
147
|
-
groupBy: 'question' | 'quiz';
|
|
148
|
+
groupBy: 'question' | 'quiz' | 'station';
|
|
148
149
|
};
|
|
149
150
|
export type IAppUsageGraphData = AdminData<Array<ITimeSeriesData>, 'appUsageGraph'>;
|
|
150
151
|
export declare const QUESTION_STATS: import("@apollo/client").DocumentNode;
|
|
@@ -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
|
+
`;
|