@quesmed/types-rn 2.6.171 → 2.6.173
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/Job.d.ts +27 -0
- package/models/Job.js +8 -1
- package/package.json +1 -1
- package/resolvers/fragments/job.d.ts +3 -0
- package/resolvers/fragments/job.js +36 -1
- package/resolvers/query/admin/record.d.ts +5 -1
- package/resolvers/query/admin/record.js +2 -2
- package/resolvers/query/blog.d.ts +2 -0
- package/resolvers/query/blog.js +2 -2
package/models/Job.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Id } from '../models';
|
|
1
2
|
import { EMockTestType } from './MockTest';
|
|
2
3
|
import { IPicture } from './Picture';
|
|
3
4
|
import { EEntitlementType, EProductType } from './Product';
|
|
@@ -8,6 +9,12 @@ export declare enum EJobPriority {
|
|
|
8
9
|
MEDIUM = 2,
|
|
9
10
|
HIGH = 3
|
|
10
11
|
}
|
|
12
|
+
export declare enum EJobAttemptType {
|
|
13
|
+
ALL = 0,
|
|
14
|
+
FIRST_ATTEMPT = 1,
|
|
15
|
+
LATEST_ATTEMPT = 2,
|
|
16
|
+
SINCE_LAST_MODIFICATION = 3
|
|
17
|
+
}
|
|
11
18
|
export declare enum EJobStatus {
|
|
12
19
|
ALL = 0,
|
|
13
20
|
IDLE = 1,
|
|
@@ -137,6 +144,24 @@ export interface IJobRecordMockTest {
|
|
|
137
144
|
explanation?: IQuestionChoice['explanation'];
|
|
138
145
|
}>;
|
|
139
146
|
}
|
|
147
|
+
export interface IJobRecordAttemptSummary {
|
|
148
|
+
total: number;
|
|
149
|
+
correct: number;
|
|
150
|
+
incorrect: number;
|
|
151
|
+
percentage: number;
|
|
152
|
+
}
|
|
153
|
+
export interface IJobRecordChoiceVote {
|
|
154
|
+
id: Id;
|
|
155
|
+
label: string;
|
|
156
|
+
votes: number;
|
|
157
|
+
percentage: number;
|
|
158
|
+
}
|
|
159
|
+
export interface IJobRecordChoiceSummary {
|
|
160
|
+
total: number;
|
|
161
|
+
questionId: number;
|
|
162
|
+
percentage: number;
|
|
163
|
+
votes: IJobRecordChoiceVote[];
|
|
164
|
+
}
|
|
140
165
|
export interface IJobRecord {
|
|
141
166
|
id: string;
|
|
142
167
|
index: number;
|
|
@@ -153,6 +178,8 @@ export interface IJobRecord {
|
|
|
153
178
|
stationId: number | null;
|
|
154
179
|
chapterId: number | null;
|
|
155
180
|
remarks: IJobRemark[];
|
|
181
|
+
attemptSummary: IJobRecordAttemptSummary | null;
|
|
182
|
+
choiceSummary: IJobRecordChoiceSummary | null;
|
|
156
183
|
}
|
|
157
184
|
export interface IJobMetaData {
|
|
158
185
|
productId: EProductType;
|
package/models/Job.js
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isNewMockTestMeta = exports.isExistingMockTestMeta = exports.IsJobRecordChapterByType = exports.IsJobRecordStationByType = exports.IsJobRecordMockTestByType = exports.IsJobRecordQuestionByType = exports.IsJobRecordChapter = exports.IsJobRecordStation = exports.IsJobRecordMockTest = exports.IsJobRecordQuestion = exports.EJobRole = exports.EJobRemarkStatus = exports.ELightGalleryType = exports.EJobRecordStatus = exports.EJobHistoryType = exports.EJobType = exports.EJobStatus = exports.EJobPriority = void 0;
|
|
3
|
+
exports.isNewMockTestMeta = exports.isExistingMockTestMeta = exports.IsJobRecordChapterByType = exports.IsJobRecordStationByType = exports.IsJobRecordMockTestByType = exports.IsJobRecordQuestionByType = exports.IsJobRecordChapter = exports.IsJobRecordStation = exports.IsJobRecordMockTest = exports.IsJobRecordQuestion = exports.EJobRole = exports.EJobRemarkStatus = exports.ELightGalleryType = exports.EJobRecordStatus = exports.EJobHistoryType = exports.EJobType = exports.EJobStatus = exports.EJobAttemptType = exports.EJobPriority = void 0;
|
|
4
4
|
var EJobPriority;
|
|
5
5
|
(function (EJobPriority) {
|
|
6
6
|
EJobPriority[EJobPriority["LOW"] = 1] = "LOW";
|
|
7
7
|
EJobPriority[EJobPriority["MEDIUM"] = 2] = "MEDIUM";
|
|
8
8
|
EJobPriority[EJobPriority["HIGH"] = 3] = "HIGH";
|
|
9
9
|
})(EJobPriority = exports.EJobPriority || (exports.EJobPriority = {}));
|
|
10
|
+
var EJobAttemptType;
|
|
11
|
+
(function (EJobAttemptType) {
|
|
12
|
+
EJobAttemptType[EJobAttemptType["ALL"] = 0] = "ALL";
|
|
13
|
+
EJobAttemptType[EJobAttemptType["FIRST_ATTEMPT"] = 1] = "FIRST_ATTEMPT";
|
|
14
|
+
EJobAttemptType[EJobAttemptType["LATEST_ATTEMPT"] = 2] = "LATEST_ATTEMPT";
|
|
15
|
+
EJobAttemptType[EJobAttemptType["SINCE_LAST_MODIFICATION"] = 3] = "SINCE_LAST_MODIFICATION";
|
|
16
|
+
})(EJobAttemptType = exports.EJobAttemptType || (exports.EJobAttemptType = {}));
|
|
10
17
|
var EJobStatus;
|
|
11
18
|
(function (EJobStatus) {
|
|
12
19
|
EJobStatus[EJobStatus["ALL"] = 0] = "ALL";
|
package/package.json
CHANGED
|
@@ -5,6 +5,9 @@ export declare const JOB_USER_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
|
5
5
|
export declare const JOB_CHAT_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
6
6
|
export declare const JOB_REMARK_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
7
7
|
export declare const JOB_HISTORY_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
8
|
+
export declare const JOB_RECORD_ATTEMPT_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
9
|
+
export declare const JOB_RECORD_CHOICE_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
10
|
+
export declare const JOB_RECORD_STATISTICS_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
8
11
|
export declare const JOB_RECORD_QUESTION_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
9
12
|
export declare const JOB_RECORD_CHAPTER_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
10
13
|
export declare const JOB_RECORD_STATION_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FULL_JOB_FRAGMENT = exports.LIMITED_JOB_FRAGMENT = exports.LIST_JOB_FRAGMENT = exports.JOB_ASSETS_FRAGMENT = exports.JOB_MEMBER_FRAGMENT = exports.JOB_RECORD_FRAGMENT = exports.JOB_RECORD_STATUS_FRAGMENT = exports.JOB_RECORD_MOCK_TEST_FRAGMENT = exports.JOB_RECORD_STATION_FRAGMENT = exports.JOB_RECORD_CHAPTER_FRAGMENT = exports.JOB_RECORD_QUESTION_FRAGMENT = exports.JOB_HISTORY_FRAGMENT = exports.JOB_REMARK_FRAGMENT = exports.JOB_CHAT_FRAGMENT = exports.JOB_USER_FRAGMENT = exports.JOB_FIELDS_FRAGMENT = exports.JOB_META_DATA_FRAGMENT = exports.JOB_STATUS_FRAGMENT = void 0;
|
|
3
|
+
exports.FULL_JOB_FRAGMENT = exports.LIMITED_JOB_FRAGMENT = exports.LIST_JOB_FRAGMENT = exports.JOB_ASSETS_FRAGMENT = exports.JOB_MEMBER_FRAGMENT = exports.JOB_RECORD_FRAGMENT = exports.JOB_RECORD_STATUS_FRAGMENT = exports.JOB_RECORD_MOCK_TEST_FRAGMENT = exports.JOB_RECORD_STATION_FRAGMENT = exports.JOB_RECORD_CHAPTER_FRAGMENT = exports.JOB_RECORD_QUESTION_FRAGMENT = exports.JOB_RECORD_STATISTICS_FRAGMENT = exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = exports.JOB_RECORD_ATTEMPT_SUMMARY_FRAGMENT = exports.JOB_HISTORY_FRAGMENT = exports.JOB_REMARK_FRAGMENT = exports.JOB_CHAT_FRAGMENT = exports.JOB_USER_FRAGMENT = exports.JOB_FIELDS_FRAGMENT = exports.JOB_META_DATA_FRAGMENT = exports.JOB_STATUS_FRAGMENT = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
exports.JOB_STATUS_FRAGMENT = (0, client_1.gql) `
|
|
6
6
|
fragment JobStatus on Job {
|
|
@@ -95,6 +95,39 @@ exports.JOB_HISTORY_FRAGMENT = (0, client_1.gql) `
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
`;
|
|
98
|
+
exports.JOB_RECORD_ATTEMPT_SUMMARY_FRAGMENT = (0, client_1.gql) `
|
|
99
|
+
fragment JobRecordAttemptSummary on JobRecordAttemptSummary {
|
|
100
|
+
total
|
|
101
|
+
correct
|
|
102
|
+
incorrect
|
|
103
|
+
percentage
|
|
104
|
+
}
|
|
105
|
+
`;
|
|
106
|
+
exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = (0, client_1.gql) `
|
|
107
|
+
fragment JobRecordChoiceSummary on JobRecordChoiceSummary {
|
|
108
|
+
total
|
|
109
|
+
questionId
|
|
110
|
+
percentage
|
|
111
|
+
votes {
|
|
112
|
+
id
|
|
113
|
+
label
|
|
114
|
+
votes
|
|
115
|
+
percentage
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
`;
|
|
119
|
+
exports.JOB_RECORD_STATISTICS_FRAGMENT = (0, client_1.gql) `
|
|
120
|
+
${exports.JOB_RECORD_ATTEMPT_SUMMARY_FRAGMENT}
|
|
121
|
+
${exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT}
|
|
122
|
+
fragment JobRecordStatistics on JobRecord {
|
|
123
|
+
attemptSummary {
|
|
124
|
+
...JobRecordAttemptSummary
|
|
125
|
+
}
|
|
126
|
+
choiceSummary {
|
|
127
|
+
...JobRecordChoiceSummary
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
`;
|
|
98
131
|
exports.JOB_RECORD_QUESTION_FRAGMENT = (0, client_1.gql) `
|
|
99
132
|
fragment JobRecordQuestion on JobRecordQuestion {
|
|
100
133
|
question
|
|
@@ -159,6 +192,7 @@ exports.JOB_RECORD_FRAGMENT = (0, client_1.gql) `
|
|
|
159
192
|
${exports.JOB_RECORD_CHAPTER_FRAGMENT}
|
|
160
193
|
${exports.JOB_RECORD_STATION_FRAGMENT}
|
|
161
194
|
${exports.JOB_RECORD_MOCK_TEST_FRAGMENT}
|
|
195
|
+
${exports.JOB_RECORD_STATISTICS_FRAGMENT}
|
|
162
196
|
fragment JobRecord on JobRecord {
|
|
163
197
|
id
|
|
164
198
|
jobId
|
|
@@ -191,6 +225,7 @@ exports.JOB_RECORD_FRAGMENT = (0, client_1.gql) `
|
|
|
191
225
|
updatedAt
|
|
192
226
|
publishedAt
|
|
193
227
|
...JobRecordStatus
|
|
228
|
+
...JobRecordStatistics
|
|
194
229
|
}
|
|
195
230
|
`;
|
|
196
231
|
exports.JOB_MEMBER_FRAGMENT = (0, client_1.gql) `
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { IJob, IJobRecord, Id } from '../../../models';
|
|
1
|
+
import { EJobAttemptType, IJob, IJobRecord, Id } from '../../../models';
|
|
2
2
|
import { AdminData } from '../../types';
|
|
3
3
|
export declare const GET_JOB_RECORDS: import("@apollo/client").DocumentNode;
|
|
4
|
+
export interface IJobRecordsFilter {
|
|
5
|
+
attemptType: EJobAttemptType;
|
|
6
|
+
}
|
|
4
7
|
export type IGetJobRecordsVar = {
|
|
5
8
|
jobId: IJob['id'];
|
|
9
|
+
filter: IJobRecordsFilter;
|
|
6
10
|
};
|
|
7
11
|
export type IGetJobRecordsData = AdminData<IJobRecord[], 'getJobRecords'>;
|
|
8
12
|
export declare const GET_JOB_RECORD: import("@apollo/client").DocumentNode;
|
|
@@ -5,9 +5,9 @@ const client_1 = require("@apollo/client");
|
|
|
5
5
|
const fragments_1 = require("../../fragments");
|
|
6
6
|
exports.GET_JOB_RECORDS = (0, client_1.gql) `
|
|
7
7
|
${fragments_1.JOB_RECORD_FRAGMENT}
|
|
8
|
-
query GetJobRecords($jobId: ID!) {
|
|
8
|
+
query GetJobRecords($jobId: ID!, $filter: JobRecordsFilterInput!) {
|
|
9
9
|
admin {
|
|
10
|
-
getJobRecords(jobId: $jobId) {
|
|
10
|
+
getJobRecords(jobId: $jobId, filter: $filter) {
|
|
11
11
|
...JobRecord
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -11,5 +11,7 @@ export type IBlogPostData = RootData<graphqlNormalize & IBlogPost, 'blogPost'>;
|
|
|
11
11
|
export declare const BLOG_POSTS: import("@apollo/client").DocumentNode;
|
|
12
12
|
export interface IBlogPostsVar {
|
|
13
13
|
tags?: EBlogTags[];
|
|
14
|
+
limit?: number;
|
|
15
|
+
offset?: number;
|
|
14
16
|
}
|
|
15
17
|
export type IBlogPostsData = RootData<(graphqlNormalize & IBlogPost)[], 'blogPosts'>;
|
package/resolvers/query/blog.js
CHANGED
|
@@ -25,8 +25,8 @@ exports.BLOG_POST = (0, client_1.gql) `
|
|
|
25
25
|
`;
|
|
26
26
|
exports.BLOG_POSTS = (0, client_1.gql) `
|
|
27
27
|
${blog_1.BLOG_POST_FIELDS}
|
|
28
|
-
query BlogPosts($tags: [String]) {
|
|
29
|
-
blogPosts(tags: $tags) {
|
|
28
|
+
query BlogPosts($tags: [String], $limit: Int, $offset: Int) {
|
|
29
|
+
blogPosts(tags: $tags, limit: $limit, offset: $offset) {
|
|
30
30
|
...BlogPostFields
|
|
31
31
|
relatedBlogPosts {
|
|
32
32
|
...BlogPostFields
|