@quesmed/types 2.6.159 → 2.6.161
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/Job.d.ts +193 -0
- package/dist/cjs/models/Job.js +132 -0
- package/dist/cjs/models/User.d.ts +2 -1
- package/dist/cjs/models/User.js +1 -0
- package/dist/cjs/models/index.d.ts +1 -0
- package/dist/cjs/models/index.js +1 -0
- package/dist/cjs/resolvers/fragments/index.d.ts +1 -0
- package/dist/cjs/resolvers/fragments/index.js +1 -0
- package/dist/cjs/resolvers/fragments/job.d.ts +16 -0
- package/dist/cjs/resolvers/fragments/job.js +250 -0
- 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/job.d.ts +104 -0
- package/dist/cjs/resolvers/mutation/admin/job.js +126 -0
- package/dist/cjs/resolvers/query/admin/dashboard.d.ts +1 -0
- package/dist/cjs/resolvers/query/admin/dashboard.js +1 -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/job.d.ts +41 -0
- package/dist/cjs/resolvers/query/admin/job.js +62 -0
- package/dist/mjs/models/Job.d.ts +193 -0
- package/dist/mjs/models/Job.js +119 -0
- package/dist/mjs/models/User.d.ts +2 -1
- package/dist/mjs/models/User.js +1 -0
- package/dist/mjs/models/index.d.ts +1 -0
- package/dist/mjs/models/index.js +1 -0
- package/dist/mjs/resolvers/fragments/index.d.ts +1 -0
- package/dist/mjs/resolvers/fragments/index.js +1 -0
- package/dist/mjs/resolvers/fragments/job.d.ts +16 -0
- package/dist/mjs/resolvers/fragments/job.js +247 -0
- 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/job.d.ts +104 -0
- package/dist/mjs/resolvers/mutation/admin/job.js +123 -0
- package/dist/mjs/resolvers/query/admin/dashboard.d.ts +1 -0
- package/dist/mjs/resolvers/query/admin/dashboard.js +1 -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/job.d.ts +41 -0
- package/dist/mjs/resolvers/query/admin/job.js +59 -0
- package/package.json +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { IJob, IJobMember, IJobRecord, IJobRecordChapter, IJobRecordMockTest, IJobRecordQuestion, IJobRecordStation, IJobRemark } from '../../../models';
|
|
2
|
+
import { AdminData } from '../../types';
|
|
3
|
+
export declare const CREATE_JOB: import("@apollo/client").DocumentNode;
|
|
4
|
+
export type ICreateJobInput = {
|
|
5
|
+
name: IJob['name'];
|
|
6
|
+
description?: IJob['description'];
|
|
7
|
+
status: IJob['status'];
|
|
8
|
+
type: IJob['type'];
|
|
9
|
+
priority: IJob['priority'];
|
|
10
|
+
totalRecords: IJob['totalRecords'];
|
|
11
|
+
dueDate: IJob['dueDate'];
|
|
12
|
+
metadata: IJob['metadata'];
|
|
13
|
+
members: Pick<IJobMember, 'userId' | 'role'>[];
|
|
14
|
+
};
|
|
15
|
+
export type ICreateJobVar = {
|
|
16
|
+
input: ICreateJobInput;
|
|
17
|
+
};
|
|
18
|
+
export type ICreateJobData = AdminData<IJob, 'createJob'>;
|
|
19
|
+
export declare const UPDATE_JOB: import("@apollo/client").DocumentNode;
|
|
20
|
+
export type IUpdateJobVar = {
|
|
21
|
+
id: IJob['id'];
|
|
22
|
+
input: Partial<ICreateJobInput>;
|
|
23
|
+
};
|
|
24
|
+
export type IUpdateJobData = AdminData<IJob, 'updateJob'>;
|
|
25
|
+
export declare const DUPLICATE_JOB: import("@apollo/client").DocumentNode;
|
|
26
|
+
export type IDuplicateJobVar = {
|
|
27
|
+
id: IJob['id'];
|
|
28
|
+
};
|
|
29
|
+
export type IDuplicateJobData = AdminData<IJob, 'duplicateJob'>;
|
|
30
|
+
export declare const UPDATE_JOB_STATUS: import("@apollo/client").DocumentNode;
|
|
31
|
+
export type IUpdateJobStatusVar = {
|
|
32
|
+
id: IJob['id'];
|
|
33
|
+
status: IJob['status'];
|
|
34
|
+
};
|
|
35
|
+
export type IUpdateJobStatusData = AdminData<IJob, 'updateJobStatus'>;
|
|
36
|
+
export declare const DELETE_JOB: import("@apollo/client").DocumentNode;
|
|
37
|
+
export type IDeleteJobVar = {
|
|
38
|
+
id: IJob['id'];
|
|
39
|
+
};
|
|
40
|
+
export type IDeleteJobData = AdminData<boolean, 'deleteJob'>;
|
|
41
|
+
export declare const CREATE_JOB_REMARK: import("@apollo/client").DocumentNode;
|
|
42
|
+
export type ICreateJobRemarkVar = {
|
|
43
|
+
input: Pick<IJobRemark, 'jobId' | 'remark' | 'createdBy'> & {
|
|
44
|
+
recordId?: IJobRemark['recordId'];
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export type ICreateJobRemarkData = AdminData<IJobRemark, 'createJobRemark'>;
|
|
48
|
+
export declare const UPDATE_JOB_REMARK: import("@apollo/client").DocumentNode;
|
|
49
|
+
export type IUpdateJobRemarkVar = {
|
|
50
|
+
id: IJobRemark['id'];
|
|
51
|
+
input: Partial<Pick<IJobRemark, 'remark' | 'resolvedBy' | 'status' | 'resolvedAt'>>;
|
|
52
|
+
};
|
|
53
|
+
export type IUpdateJobRemarkData = AdminData<IJobRemark, 'updateJobRemark'>;
|
|
54
|
+
export declare const DELETE_JOB_REMARK: import("@apollo/client").DocumentNode;
|
|
55
|
+
export type IDeleteJobRemarkVar = {
|
|
56
|
+
id: IJobRemark['id'];
|
|
57
|
+
};
|
|
58
|
+
export type IDeleteJobRemarkData = AdminData<boolean, 'deleteJobRemark'>;
|
|
59
|
+
export declare const CREATE_JOB_RECORD: import("@apollo/client").DocumentNode;
|
|
60
|
+
export type ICreateJobRecordVar = {
|
|
61
|
+
input: {
|
|
62
|
+
jobId: IJobRecord['jobId'];
|
|
63
|
+
data: {
|
|
64
|
+
question: IJobRecordQuestion;
|
|
65
|
+
} | {
|
|
66
|
+
station: IJobRecordStation;
|
|
67
|
+
} | {
|
|
68
|
+
chapter: IJobRecordChapter;
|
|
69
|
+
} | {
|
|
70
|
+
mockTest: IJobRecordMockTest;
|
|
71
|
+
} | null;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export type ICreateJobRecordData = AdminData<IJobRecord, 'createJobRecord'>;
|
|
75
|
+
export declare const DELETE_JOB_RECORD: import("@apollo/client").DocumentNode;
|
|
76
|
+
export type IDeleteJobRecordVar = {
|
|
77
|
+
id: IJobRecord['id'];
|
|
78
|
+
};
|
|
79
|
+
export type IDeleteJobRecordData = AdminData<boolean, 'deleteJobRecord'>;
|
|
80
|
+
export declare const UPDATE_JOB_RECORD: import("@apollo/client").DocumentNode;
|
|
81
|
+
export type IUpdateJobRecordVar = {
|
|
82
|
+
id: IJobRecord['id'];
|
|
83
|
+
input: {
|
|
84
|
+
question: Partial<IJobRecordQuestion>;
|
|
85
|
+
} | {
|
|
86
|
+
station: Partial<IJobRecordStation>;
|
|
87
|
+
} | {
|
|
88
|
+
chapter: Partial<IJobRecordChapter>;
|
|
89
|
+
} | {
|
|
90
|
+
mockTest: Partial<IJobRecordMockTest>;
|
|
91
|
+
} | null;
|
|
92
|
+
};
|
|
93
|
+
export type IUpdateJobRecordData = AdminData<IJobRecord, 'updateJobRecord'>;
|
|
94
|
+
export declare const DUPLICATE_JOB_RECORD: import("@apollo/client").DocumentNode;
|
|
95
|
+
export type IDuplicateJobRecordVar = {
|
|
96
|
+
id: IJobRecord['id'];
|
|
97
|
+
};
|
|
98
|
+
export type IDuplicateJobRecordData = AdminData<IJobRecord, 'duplicateJobRecord'>;
|
|
99
|
+
export declare const UPDATE_JOB_RECORD_STATUS: import("@apollo/client").DocumentNode;
|
|
100
|
+
export type IUpdateJobRecordStatusVar = {
|
|
101
|
+
ids: IJobRecord['id'][];
|
|
102
|
+
status: IJobRecord['status'];
|
|
103
|
+
};
|
|
104
|
+
export type IUpdateJobRecordStatusData = AdminData<IJobRecord[], 'updateJobRecordStatus'>;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UPDATE_JOB_RECORD_STATUS = exports.DUPLICATE_JOB_RECORD = exports.UPDATE_JOB_RECORD = exports.DELETE_JOB_RECORD = exports.CREATE_JOB_RECORD = exports.DELETE_JOB_REMARK = exports.UPDATE_JOB_REMARK = exports.CREATE_JOB_REMARK = exports.DELETE_JOB = exports.UPDATE_JOB_STATUS = exports.DUPLICATE_JOB = exports.UPDATE_JOB = exports.CREATE_JOB = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
const fragments_1 = require("../../fragments");
|
|
6
|
+
exports.CREATE_JOB = (0, client_1.gql) `
|
|
7
|
+
${fragments_1.LIST_JOB_FRAGMENT}
|
|
8
|
+
mutation CreateJob($input: CreateJobInput!) {
|
|
9
|
+
admin {
|
|
10
|
+
createJob(input: $input) {
|
|
11
|
+
...Job
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
exports.UPDATE_JOB = (0, client_1.gql) `
|
|
17
|
+
${fragments_1.LIST_JOB_FRAGMENT}
|
|
18
|
+
mutation UpdateJob($id: ID!, $input: UpdateJobInput!) {
|
|
19
|
+
admin {
|
|
20
|
+
updateJob(id: $id, input: $input) {
|
|
21
|
+
...Job
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
exports.DUPLICATE_JOB = (0, client_1.gql) `
|
|
27
|
+
${fragments_1.LIST_JOB_FRAGMENT}
|
|
28
|
+
mutation DuplicateJob($id: ID!) {
|
|
29
|
+
admin {
|
|
30
|
+
duplicateJob(id: $id) {
|
|
31
|
+
...Job
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
exports.UPDATE_JOB_STATUS = (0, client_1.gql) `
|
|
37
|
+
${fragments_1.JOB_STATUS_FRAGMENT}
|
|
38
|
+
mutation UpdateJobStatus($id: ID!, $status: Int!) {
|
|
39
|
+
admin {
|
|
40
|
+
updateJobStatus(id: $id, status: $status) {
|
|
41
|
+
...JobStatus
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
exports.DELETE_JOB = (0, client_1.gql) `
|
|
47
|
+
mutation DeleteJob($id: ID!) {
|
|
48
|
+
admin {
|
|
49
|
+
deleteJob(id: $id)
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
exports.CREATE_JOB_REMARK = (0, client_1.gql) `
|
|
54
|
+
${fragments_1.JOB_REMARK_FRAGMENT}
|
|
55
|
+
mutation CreateJobRemark($input: CreateJobRemarkInput!) {
|
|
56
|
+
admin {
|
|
57
|
+
createJobRemark(input: $input) {
|
|
58
|
+
...JobRemark
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
exports.UPDATE_JOB_REMARK = (0, client_1.gql) `
|
|
64
|
+
${fragments_1.JOB_REMARK_FRAGMENT}
|
|
65
|
+
mutation UpdateJobRemark($id: ID!, $input: UpdateJobRemarkInput!) {
|
|
66
|
+
admin {
|
|
67
|
+
updateJobRemark(id: $id, input: $input) {
|
|
68
|
+
...JobRemark
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
73
|
+
exports.DELETE_JOB_REMARK = (0, client_1.gql) `
|
|
74
|
+
mutation DeleteJobRemark($id: ID!) {
|
|
75
|
+
admin {
|
|
76
|
+
deleteJobRemark(id: $id)
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
exports.CREATE_JOB_RECORD = (0, client_1.gql) `
|
|
81
|
+
${fragments_1.JOB_RECORD_FRAGMENT}
|
|
82
|
+
mutation CreateJobRecord($input: CreateJobRecordInput!) {
|
|
83
|
+
admin {
|
|
84
|
+
createJobRecord(input: $input) {
|
|
85
|
+
...JobRecord
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
`;
|
|
90
|
+
exports.DELETE_JOB_RECORD = (0, client_1.gql) `
|
|
91
|
+
mutation DeleteJobRecord($id: ID!) {
|
|
92
|
+
admin {
|
|
93
|
+
deleteJobRecord(id: $id)
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
`;
|
|
97
|
+
exports.UPDATE_JOB_RECORD = (0, client_1.gql) `
|
|
98
|
+
${fragments_1.JOB_RECORD_FRAGMENT}
|
|
99
|
+
mutation UpdateJobRecord($id: ID!, $input: JobRecordDataInput!) {
|
|
100
|
+
admin {
|
|
101
|
+
updateJobRecord(id: $id, input: $input) {
|
|
102
|
+
...JobRecord
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
exports.DUPLICATE_JOB_RECORD = (0, client_1.gql) `
|
|
108
|
+
${fragments_1.JOB_RECORD_FRAGMENT}
|
|
109
|
+
mutation DuplicateJobRecord($id: ID!) {
|
|
110
|
+
admin {
|
|
111
|
+
duplicateJobRecord(id: $id) {
|
|
112
|
+
...JobRecord
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
`;
|
|
117
|
+
exports.UPDATE_JOB_RECORD_STATUS = (0, client_1.gql) `
|
|
118
|
+
${fragments_1.JOB_RECORD_STATUS_FRAGMENT}
|
|
119
|
+
mutation UpdateJobRecordStatus($ids: [ID!]!, $status: Int!) {
|
|
120
|
+
admin {
|
|
121
|
+
updateJobRecordStatus(ids: $ids, status: $status) {
|
|
122
|
+
...JobRecordStatus
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
`;
|
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./dashboard"), exports);
|
|
18
18
|
__exportStar(require("./database"), exports);
|
|
19
19
|
__exportStar(require("./getUserToken"), exports);
|
|
20
|
+
__exportStar(require("./job"), exports);
|
|
20
21
|
__exportStar(require("./question"), exports);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { EJobStatus, IJob, IJobRecord, IJobRemark } from '../../../models';
|
|
2
|
+
import { AdminData } from '../../types';
|
|
3
|
+
export declare const GET_JOB: import("@apollo/client").DocumentNode;
|
|
4
|
+
export type IGetJobVar = {
|
|
5
|
+
id: IJob['id'];
|
|
6
|
+
};
|
|
7
|
+
export type IGetJobData = AdminData<IJob, 'getJob'>;
|
|
8
|
+
export declare const GET_JOBS: import("@apollo/client").DocumentNode;
|
|
9
|
+
export type IGetJobsVar = {
|
|
10
|
+
filter: {
|
|
11
|
+
status?: IJob['status'];
|
|
12
|
+
type?: IJob['type'];
|
|
13
|
+
priority?: IJob['priority'];
|
|
14
|
+
searchText?: string;
|
|
15
|
+
};
|
|
16
|
+
page: number;
|
|
17
|
+
take: number;
|
|
18
|
+
};
|
|
19
|
+
export type IGetJobsData = AdminData<{
|
|
20
|
+
results: IJob[];
|
|
21
|
+
total: number;
|
|
22
|
+
counts: Array<{
|
|
23
|
+
status: EJobStatus;
|
|
24
|
+
count: number;
|
|
25
|
+
}>;
|
|
26
|
+
}, 'getJobs'>;
|
|
27
|
+
export declare const GET_JOB_REMARKS: import("@apollo/client").DocumentNode;
|
|
28
|
+
export type IGetJobRemarksVar = {
|
|
29
|
+
jobId: IJob['id'];
|
|
30
|
+
};
|
|
31
|
+
export type IGetJobRemarksData = AdminData<IJobRemark[], 'getJobRemarks'>;
|
|
32
|
+
export declare const GET_JOB_RECORDS: import("@apollo/client").DocumentNode;
|
|
33
|
+
export type IGetJobRecordsVar = {
|
|
34
|
+
jobId: IJob['id'];
|
|
35
|
+
};
|
|
36
|
+
export type IGetJobRecordsData = AdminData<IJobRecord[], 'getJobRecords'>;
|
|
37
|
+
export declare const GET_JOB_RECORD: import("@apollo/client").DocumentNode;
|
|
38
|
+
export type IGetJobRecordVar = {
|
|
39
|
+
id: IJobRecord['id'];
|
|
40
|
+
};
|
|
41
|
+
export type IGetJobRecordData = AdminData<IJobRecord, 'getJobRecord'>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GET_JOB_RECORD = exports.GET_JOB_RECORDS = exports.GET_JOB_REMARKS = exports.GET_JOBS = exports.GET_JOB = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
const fragments_1 = require("../../fragments");
|
|
6
|
+
exports.GET_JOB = (0, client_1.gql) `
|
|
7
|
+
${fragments_1.LIMITED_JOB_FRAGMENT}
|
|
8
|
+
query GetJob($id: ID!) {
|
|
9
|
+
admin {
|
|
10
|
+
getJob(id: $id) {
|
|
11
|
+
...LimitedJob
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
exports.GET_JOBS = (0, client_1.gql) `
|
|
17
|
+
${fragments_1.LIST_JOB_FRAGMENT}
|
|
18
|
+
query GetJobs($filter: JobsFilterInput, $page: Int!, $take: Int!) {
|
|
19
|
+
admin {
|
|
20
|
+
getJobs(filter: $filter, page: $page, take: $take) {
|
|
21
|
+
results {
|
|
22
|
+
...Job
|
|
23
|
+
}
|
|
24
|
+
total
|
|
25
|
+
counts {
|
|
26
|
+
status
|
|
27
|
+
count
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
exports.GET_JOB_REMARKS = (0, client_1.gql) `
|
|
34
|
+
${fragments_1.JOB_REMARK_FRAGMENT}
|
|
35
|
+
query GetJobRemarks($jobId: ID!) {
|
|
36
|
+
admin {
|
|
37
|
+
getJobRemarks(jobId: $jobId) {
|
|
38
|
+
...JobRemark
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
exports.GET_JOB_RECORDS = (0, client_1.gql) `
|
|
44
|
+
${fragments_1.JOB_RECORD_FRAGMENT}
|
|
45
|
+
query GetJobRecords($jobId: ID!) {
|
|
46
|
+
admin {
|
|
47
|
+
getJobRecords(jobId: $jobId) {
|
|
48
|
+
...JobRecord
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
exports.GET_JOB_RECORD = (0, client_1.gql) `
|
|
54
|
+
${fragments_1.JOB_RECORD_FRAGMENT}
|
|
55
|
+
query GetJobRecord($id: ID!) {
|
|
56
|
+
admin {
|
|
57
|
+
getJobRecord(id: $id) {
|
|
58
|
+
...JobRecord
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { EMockTestType } from './MockTest';
|
|
2
|
+
import { IPicture } from './Picture';
|
|
3
|
+
import { EEntitlementType, EProductType } from './Product';
|
|
4
|
+
import { EQuestionType, IQuestionChoice } from './Question';
|
|
5
|
+
import { IUser } from './User';
|
|
6
|
+
export declare enum EJobPriority {
|
|
7
|
+
LOW = 1,
|
|
8
|
+
MEDIUM = 2,
|
|
9
|
+
HIGH = 3
|
|
10
|
+
}
|
|
11
|
+
export declare enum EJobStatus {
|
|
12
|
+
ALL = 0,
|
|
13
|
+
IDLE = 1,
|
|
14
|
+
ONGOING = 2,
|
|
15
|
+
SUBMITTED = 3,
|
|
16
|
+
REJECTED = 4,
|
|
17
|
+
APPROVED = 5,
|
|
18
|
+
TESTING = 6,
|
|
19
|
+
PUBLISHED = 7,
|
|
20
|
+
PARTIAL_TRIALING = 8,
|
|
21
|
+
CLOSED = 9
|
|
22
|
+
}
|
|
23
|
+
export declare enum EJobType {
|
|
24
|
+
ALL = 0,
|
|
25
|
+
QUESTION = 1,
|
|
26
|
+
STATION = 2,
|
|
27
|
+
CHAPTER = 3,
|
|
28
|
+
MOCK_TEST = 4
|
|
29
|
+
}
|
|
30
|
+
export declare enum EJobRecordStatus {
|
|
31
|
+
ALL = 0,
|
|
32
|
+
DRAFT = 1,
|
|
33
|
+
READY = 2,
|
|
34
|
+
APPROVED = 3,
|
|
35
|
+
REJECTED = 4,
|
|
36
|
+
TESTING = 5,
|
|
37
|
+
PUBLISHED = 6
|
|
38
|
+
}
|
|
39
|
+
export declare enum ELightGalleryType {
|
|
40
|
+
QUESTION = 1,
|
|
41
|
+
STEM = 2,
|
|
42
|
+
EXPLANATION = 3,
|
|
43
|
+
LEARNING_POINT = 4,
|
|
44
|
+
CHOICE = 5,
|
|
45
|
+
EXAMINER = 6,
|
|
46
|
+
CANDIDATE = 7,
|
|
47
|
+
WALKTHROUGH = 8,
|
|
48
|
+
ACTOR = 9
|
|
49
|
+
}
|
|
50
|
+
export declare enum EJobRemarkStatus {
|
|
51
|
+
ALL = 0,
|
|
52
|
+
OPEN = 1,
|
|
53
|
+
RESOLVED = 2,
|
|
54
|
+
REOPENED = 3
|
|
55
|
+
}
|
|
56
|
+
export declare enum EJobRole {
|
|
57
|
+
WRITER = 1,
|
|
58
|
+
REVIEWER = 2,
|
|
59
|
+
SENIOR_EDITOR = 3
|
|
60
|
+
}
|
|
61
|
+
export interface IJobRemark {
|
|
62
|
+
id: number;
|
|
63
|
+
jobId: string;
|
|
64
|
+
recordId: string;
|
|
65
|
+
remark: string;
|
|
66
|
+
status: EJobRemarkStatus;
|
|
67
|
+
createdBy: IUser['id'];
|
|
68
|
+
resolvedBy: IUser['id'] | null;
|
|
69
|
+
createdByUser: Pick<IUser, 'id' | 'firstName' | 'lastName' | 'username'>;
|
|
70
|
+
resolvedByUser: Pick<IUser, 'id' | 'firstName' | 'lastName' | 'username'> | null;
|
|
71
|
+
createdAt: Date | number;
|
|
72
|
+
resolvedAt: Date | number | null;
|
|
73
|
+
}
|
|
74
|
+
export interface IJobMember {
|
|
75
|
+
id: number;
|
|
76
|
+
jobId: string;
|
|
77
|
+
userId: IUser['id'];
|
|
78
|
+
user: Pick<IUser, 'id' | 'firstName' | 'lastName' | 'username'>;
|
|
79
|
+
role: EJobRole;
|
|
80
|
+
createdAt: Date | number;
|
|
81
|
+
}
|
|
82
|
+
export interface IJobAsset {
|
|
83
|
+
id: number;
|
|
84
|
+
jobId: string;
|
|
85
|
+
recordId: string | null;
|
|
86
|
+
pictureId: string;
|
|
87
|
+
picture: IPicture;
|
|
88
|
+
index: number;
|
|
89
|
+
type: ELightGalleryType;
|
|
90
|
+
choiceIdx: number | null;
|
|
91
|
+
createdAt: Date | number;
|
|
92
|
+
}
|
|
93
|
+
export interface IJobRecordQuestion {
|
|
94
|
+
question: string;
|
|
95
|
+
stem?: string | null;
|
|
96
|
+
conceptId?: number | null;
|
|
97
|
+
explanation?: string | null;
|
|
98
|
+
learningPoint?: string | null;
|
|
99
|
+
answer: string;
|
|
100
|
+
entitlementIds?: EEntitlementType[];
|
|
101
|
+
conditionIds?: number[];
|
|
102
|
+
presentationIds?: number[];
|
|
103
|
+
typeId: EQuestionType;
|
|
104
|
+
choices: Array<Pick<IQuestionChoice, 'label' | 'name' | 'answer'> & {
|
|
105
|
+
explanation?: IQuestionChoice['explanation'];
|
|
106
|
+
}>;
|
|
107
|
+
}
|
|
108
|
+
export interface IJobRecordChapter {
|
|
109
|
+
title: string;
|
|
110
|
+
concept: string;
|
|
111
|
+
explanation: string;
|
|
112
|
+
}
|
|
113
|
+
export interface IJobRecordStation {
|
|
114
|
+
question: string;
|
|
115
|
+
}
|
|
116
|
+
export interface IJobRecordMockTest {
|
|
117
|
+
question: string;
|
|
118
|
+
conceptId?: number | null;
|
|
119
|
+
explanation?: string | null;
|
|
120
|
+
learningPoint?: string | null;
|
|
121
|
+
typeId: EQuestionType;
|
|
122
|
+
answer: string;
|
|
123
|
+
choices: Array<Pick<IQuestionChoice, 'label' | 'name' | 'answer'> & {
|
|
124
|
+
explanation?: IQuestionChoice['explanation'];
|
|
125
|
+
}>;
|
|
126
|
+
}
|
|
127
|
+
export interface IJobRecord {
|
|
128
|
+
id: string;
|
|
129
|
+
index: number;
|
|
130
|
+
jobId: IJob['id'];
|
|
131
|
+
status: EJobRecordStatus;
|
|
132
|
+
data: IJobRecordQuestion | IJobRecordStation | IJobRecordChapter | IJobRecordMockTest;
|
|
133
|
+
publishedAt: Date | number | null;
|
|
134
|
+
createdAt: Date | number;
|
|
135
|
+
updatedAt: Date | number;
|
|
136
|
+
questionId: number | null;
|
|
137
|
+
stationId: number | null;
|
|
138
|
+
chapterId: number | null;
|
|
139
|
+
remarks: IJobRemark[];
|
|
140
|
+
}
|
|
141
|
+
export interface IJobMetaData {
|
|
142
|
+
productId: EProductType;
|
|
143
|
+
mockTest?: {
|
|
144
|
+
mockTestId: number;
|
|
145
|
+
} | {
|
|
146
|
+
typeId: EMockTestType;
|
|
147
|
+
title: string;
|
|
148
|
+
passingMark: number;
|
|
149
|
+
} | null;
|
|
150
|
+
question?: {
|
|
151
|
+
typeId: EQuestionType | null;
|
|
152
|
+
conceptId: number | null;
|
|
153
|
+
entitlementIds: EEntitlementType[] | null;
|
|
154
|
+
} | null;
|
|
155
|
+
}
|
|
156
|
+
export interface IJob {
|
|
157
|
+
id: string;
|
|
158
|
+
name: string;
|
|
159
|
+
description: string;
|
|
160
|
+
status: EJobStatus;
|
|
161
|
+
type: EJobType;
|
|
162
|
+
priority: EJobPriority;
|
|
163
|
+
totalRecords: number;
|
|
164
|
+
metadata: IJobMetaData;
|
|
165
|
+
dueDate: Date | number;
|
|
166
|
+
createdAt: Date | number;
|
|
167
|
+
updatedAt: Date | number;
|
|
168
|
+
recordCount: number;
|
|
169
|
+
remarkCount: number;
|
|
170
|
+
resolvedCount: number;
|
|
171
|
+
memberCount: number;
|
|
172
|
+
chatCount: number;
|
|
173
|
+
remarks: IJobRemark[];
|
|
174
|
+
members: IJobMember[];
|
|
175
|
+
assets: IJobAsset[];
|
|
176
|
+
records: IJobRecord[];
|
|
177
|
+
}
|
|
178
|
+
export declare const IsJobRecordQuestion: (record: IJobRecord['data']) => record is IJobRecordQuestion;
|
|
179
|
+
export declare const IsJobRecordMockTest: (record: IJobRecord['data']) => record is IJobRecordMockTest;
|
|
180
|
+
export declare const IsJobRecordStation: (record: IJobRecord['data']) => record is IJobRecordStation;
|
|
181
|
+
export declare const IsJobRecordChapter: (record: IJobRecord['data']) => record is IJobRecordChapter;
|
|
182
|
+
export declare const IsJobRecordQuestionByType: (type: EJobType, record: IJobRecord['data']) => record is IJobRecordQuestion;
|
|
183
|
+
export declare const IsJobRecordMockTestByType: (type: EJobType, record: IJobRecord['data']) => record is IJobRecordMockTest;
|
|
184
|
+
export declare const IsJobRecordStationByType: (type: EJobType, record: IJobRecord['data']) => record is IJobRecordStation;
|
|
185
|
+
export declare const IsJobRecordChapterByType: (type: EJobType, record: IJobRecord['data']) => record is IJobRecordChapter;
|
|
186
|
+
export declare const isExistingMockTestMeta: (metadata: IJobMetaData['mockTest']) => metadata is {
|
|
187
|
+
mockTestId: number;
|
|
188
|
+
};
|
|
189
|
+
export declare const isNewMockTestMeta: (metadata: IJobMetaData['mockTest']) => metadata is {
|
|
190
|
+
typeId: EMockTestType;
|
|
191
|
+
title: string;
|
|
192
|
+
passingMark: number;
|
|
193
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
export var EJobPriority;
|
|
2
|
+
(function (EJobPriority) {
|
|
3
|
+
EJobPriority[EJobPriority["LOW"] = 1] = "LOW";
|
|
4
|
+
EJobPriority[EJobPriority["MEDIUM"] = 2] = "MEDIUM";
|
|
5
|
+
EJobPriority[EJobPriority["HIGH"] = 3] = "HIGH";
|
|
6
|
+
})(EJobPriority || (EJobPriority = {}));
|
|
7
|
+
export var EJobStatus;
|
|
8
|
+
(function (EJobStatus) {
|
|
9
|
+
EJobStatus[EJobStatus["ALL"] = 0] = "ALL";
|
|
10
|
+
//Work not yet begun
|
|
11
|
+
EJobStatus[EJobStatus["IDLE"] = 1] = "IDLE";
|
|
12
|
+
//Actively being written or edited
|
|
13
|
+
EJobStatus[EJobStatus["ONGOING"] = 2] = "ONGOING";
|
|
14
|
+
//Submitted, pending reviewer feedback
|
|
15
|
+
EJobStatus[EJobStatus["SUBMITTED"] = 3] = "SUBMITTED";
|
|
16
|
+
//Returned by reviewer for changes
|
|
17
|
+
EJobStatus[EJobStatus["REJECTED"] = 4] = "REJECTED";
|
|
18
|
+
//Accepted by reviewer
|
|
19
|
+
EJobStatus[EJobStatus["APPROVED"] = 5] = "APPROVED";
|
|
20
|
+
//In QA, testing, or limited release
|
|
21
|
+
EJobStatus[EJobStatus["TESTING"] = 6] = "TESTING";
|
|
22
|
+
// Final version is live and visible
|
|
23
|
+
EJobStatus[EJobStatus["PUBLISHED"] = 7] = "PUBLISHED";
|
|
24
|
+
//Partial batch, some content is live
|
|
25
|
+
EJobStatus[EJobStatus["PARTIAL_TRIALING"] = 8] = "PARTIAL_TRIALING";
|
|
26
|
+
//Closed, revision not allowed
|
|
27
|
+
EJobStatus[EJobStatus["CLOSED"] = 9] = "CLOSED";
|
|
28
|
+
})(EJobStatus || (EJobStatus = {}));
|
|
29
|
+
export var EJobType;
|
|
30
|
+
(function (EJobType) {
|
|
31
|
+
EJobType[EJobType["ALL"] = 0] = "ALL";
|
|
32
|
+
EJobType[EJobType["QUESTION"] = 1] = "QUESTION";
|
|
33
|
+
EJobType[EJobType["STATION"] = 2] = "STATION";
|
|
34
|
+
EJobType[EJobType["CHAPTER"] = 3] = "CHAPTER";
|
|
35
|
+
EJobType[EJobType["MOCK_TEST"] = 4] = "MOCK_TEST";
|
|
36
|
+
})(EJobType || (EJobType = {}));
|
|
37
|
+
export var EJobRecordStatus;
|
|
38
|
+
(function (EJobRecordStatus) {
|
|
39
|
+
EJobRecordStatus[EJobRecordStatus["ALL"] = 0] = "ALL";
|
|
40
|
+
//Actively being written or edited
|
|
41
|
+
EJobRecordStatus[EJobRecordStatus["DRAFT"] = 1] = "DRAFT";
|
|
42
|
+
//Submitted, pending reviewer feedback
|
|
43
|
+
EJobRecordStatus[EJobRecordStatus["READY"] = 2] = "READY";
|
|
44
|
+
//Accepted by reviewer
|
|
45
|
+
EJobRecordStatus[EJobRecordStatus["APPROVED"] = 3] = "APPROVED";
|
|
46
|
+
//Returned by reviewer for changes
|
|
47
|
+
EJobRecordStatus[EJobRecordStatus["REJECTED"] = 4] = "REJECTED";
|
|
48
|
+
//In QA, testing, or limited release
|
|
49
|
+
EJobRecordStatus[EJobRecordStatus["TESTING"] = 5] = "TESTING";
|
|
50
|
+
// Final version is live and visible
|
|
51
|
+
EJobRecordStatus[EJobRecordStatus["PUBLISHED"] = 6] = "PUBLISHED";
|
|
52
|
+
})(EJobRecordStatus || (EJobRecordStatus = {}));
|
|
53
|
+
export var ELightGalleryType;
|
|
54
|
+
(function (ELightGalleryType) {
|
|
55
|
+
// QUESTION = 'question',
|
|
56
|
+
// STEM = 'stem',
|
|
57
|
+
// EXPLANATION = 'explanation',
|
|
58
|
+
// LEARNING_POINT = 'learning_point',
|
|
59
|
+
// CHOICE = 'choice',
|
|
60
|
+
// EXAMINER = 'examiner',
|
|
61
|
+
// CANDIDATE = 'candidate',
|
|
62
|
+
// WALKTHROUGH = 'walkthrough',
|
|
63
|
+
// ACTOR = 'actor',
|
|
64
|
+
ELightGalleryType[ELightGalleryType["QUESTION"] = 1] = "QUESTION";
|
|
65
|
+
ELightGalleryType[ELightGalleryType["STEM"] = 2] = "STEM";
|
|
66
|
+
ELightGalleryType[ELightGalleryType["EXPLANATION"] = 3] = "EXPLANATION";
|
|
67
|
+
ELightGalleryType[ELightGalleryType["LEARNING_POINT"] = 4] = "LEARNING_POINT";
|
|
68
|
+
ELightGalleryType[ELightGalleryType["CHOICE"] = 5] = "CHOICE";
|
|
69
|
+
ELightGalleryType[ELightGalleryType["EXAMINER"] = 6] = "EXAMINER";
|
|
70
|
+
ELightGalleryType[ELightGalleryType["CANDIDATE"] = 7] = "CANDIDATE";
|
|
71
|
+
ELightGalleryType[ELightGalleryType["WALKTHROUGH"] = 8] = "WALKTHROUGH";
|
|
72
|
+
ELightGalleryType[ELightGalleryType["ACTOR"] = 9] = "ACTOR";
|
|
73
|
+
})(ELightGalleryType || (ELightGalleryType = {}));
|
|
74
|
+
export var EJobRemarkStatus;
|
|
75
|
+
(function (EJobRemarkStatus) {
|
|
76
|
+
EJobRemarkStatus[EJobRemarkStatus["ALL"] = 0] = "ALL";
|
|
77
|
+
EJobRemarkStatus[EJobRemarkStatus["OPEN"] = 1] = "OPEN";
|
|
78
|
+
EJobRemarkStatus[EJobRemarkStatus["RESOLVED"] = 2] = "RESOLVED";
|
|
79
|
+
EJobRemarkStatus[EJobRemarkStatus["REOPENED"] = 3] = "REOPENED";
|
|
80
|
+
})(EJobRemarkStatus || (EJobRemarkStatus = {}));
|
|
81
|
+
export var EJobRole;
|
|
82
|
+
(function (EJobRole) {
|
|
83
|
+
EJobRole[EJobRole["WRITER"] = 1] = "WRITER";
|
|
84
|
+
EJobRole[EJobRole["REVIEWER"] = 2] = "REVIEWER";
|
|
85
|
+
EJobRole[EJobRole["SENIOR_EDITOR"] = 3] = "SENIOR_EDITOR";
|
|
86
|
+
})(EJobRole || (EJobRole = {}));
|
|
87
|
+
export const IsJobRecordQuestion = (record) => {
|
|
88
|
+
return !!record && typeof record === 'object' && 'question' in record;
|
|
89
|
+
};
|
|
90
|
+
export const IsJobRecordMockTest = (record) => {
|
|
91
|
+
return !!record && typeof record === 'object' && 'title' in record;
|
|
92
|
+
};
|
|
93
|
+
export const IsJobRecordStation = (record) => {
|
|
94
|
+
return !!record && typeof record === 'object' && 'question' in record;
|
|
95
|
+
};
|
|
96
|
+
export const IsJobRecordChapter = (record) => {
|
|
97
|
+
return !!record && typeof record === 'object' && 'chapter' in record;
|
|
98
|
+
};
|
|
99
|
+
export const IsJobRecordQuestionByType = (type, record) => {
|
|
100
|
+
return type === EJobType.QUESTION;
|
|
101
|
+
};
|
|
102
|
+
export const IsJobRecordMockTestByType = (type, record) => {
|
|
103
|
+
return type === EJobType.MOCK_TEST;
|
|
104
|
+
};
|
|
105
|
+
export const IsJobRecordStationByType = (type, record) => {
|
|
106
|
+
return type === EJobType.STATION;
|
|
107
|
+
};
|
|
108
|
+
export const IsJobRecordChapterByType = (type, record) => {
|
|
109
|
+
return type === EJobType.CHAPTER;
|
|
110
|
+
};
|
|
111
|
+
export const isExistingMockTestMeta = (metadata) => {
|
|
112
|
+
return (!!metadata &&
|
|
113
|
+
typeof metadata === 'object' &&
|
|
114
|
+
'mockTestId' in metadata &&
|
|
115
|
+
metadata.mockTestId !== null);
|
|
116
|
+
};
|
|
117
|
+
export const isNewMockTestMeta = (metadata) => {
|
|
118
|
+
return !!metadata && typeof metadata === 'object' && 'typeId' in metadata;
|
|
119
|
+
};
|