@quesmed/types 2.6.158 → 2.6.160
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 +191 -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/constants.js +1 -1
- 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/mutation/stripe.d.ts +3 -1
- package/dist/cjs/resolvers/mutation/stripe.js +2 -2
- package/dist/cjs/resolvers/mutation/validUserToken/user.d.ts +4 -0
- package/dist/cjs/resolvers/mutation/validUserToken/user.js +8 -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 +191 -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/constants.js +1 -1
- 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/mutation/stripe.d.ts +3 -1
- package/dist/mjs/resolvers/mutation/stripe.js +2 -2
- package/dist/mjs/resolvers/mutation/validUserToken/user.d.ts +4 -0
- package/dist/mjs/resolvers/mutation/validUserToken/user.js +8 -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,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
|
+
};
|
package/dist/mjs/models/User.js
CHANGED
|
@@ -11,6 +11,7 @@ export var IAccessLevel;
|
|
|
11
11
|
IAccessLevel["EXPIRED"] = "expired";
|
|
12
12
|
IAccessLevel["EDITOR"] = "editor";
|
|
13
13
|
IAccessLevel["MARKETING"] = "marketing";
|
|
14
|
+
IAccessLevel["WRITER"] = "writer";
|
|
14
15
|
})(IAccessLevel || (IAccessLevel = {}));
|
|
15
16
|
export var ETheme;
|
|
16
17
|
(function (ETheme) {
|
package/dist/mjs/models/index.js
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const JOB_STATUS_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
2
|
+
export declare const JOB_META_DATA_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
3
|
+
export declare const JOB_FIELDS_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
4
|
+
export declare const JOB_USER_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
5
|
+
export declare const JOB_REMARK_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
6
|
+
export declare const JOB_RECORD_QUESTION_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
7
|
+
export declare const JOB_RECORD_CHAPTER_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
8
|
+
export declare const JOB_RECORD_STATION_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
9
|
+
export declare const JOB_RECORD_MOCK_TEST_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
10
|
+
export declare const JOB_RECORD_STATUS_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
11
|
+
export declare const JOB_RECORD_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
12
|
+
export declare const JOB_MEMBER_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
13
|
+
export declare const JOB_ASSETS_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
14
|
+
export declare const LIST_JOB_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
15
|
+
export declare const LIMITED_JOB_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
16
|
+
export declare const FULL_JOB_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
export const JOB_STATUS_FRAGMENT = gql `
|
|
3
|
+
fragment JobStatus on Job {
|
|
4
|
+
status
|
|
5
|
+
}
|
|
6
|
+
`;
|
|
7
|
+
export const JOB_META_DATA_FRAGMENT = gql `
|
|
8
|
+
fragment JobMetaData on JobMetaData {
|
|
9
|
+
productId
|
|
10
|
+
question {
|
|
11
|
+
typeId
|
|
12
|
+
conceptId
|
|
13
|
+
entitlementIds
|
|
14
|
+
}
|
|
15
|
+
mockTest {
|
|
16
|
+
mockTestId
|
|
17
|
+
typeId
|
|
18
|
+
title
|
|
19
|
+
passingMark
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
export const JOB_FIELDS_FRAGMENT = gql `
|
|
24
|
+
${JOB_META_DATA_FRAGMENT}
|
|
25
|
+
fragment JobFields on Job {
|
|
26
|
+
name
|
|
27
|
+
description
|
|
28
|
+
type
|
|
29
|
+
priority
|
|
30
|
+
totalRecords
|
|
31
|
+
dueDate
|
|
32
|
+
metadata {
|
|
33
|
+
...JobMetaData
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
export const JOB_USER_FRAGMENT = gql `
|
|
38
|
+
fragment JobUser on User {
|
|
39
|
+
id
|
|
40
|
+
username
|
|
41
|
+
firstName
|
|
42
|
+
lastName
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
export const JOB_REMARK_FRAGMENT = gql `
|
|
46
|
+
${JOB_USER_FRAGMENT}
|
|
47
|
+
fragment JobRemark on JobRemark {
|
|
48
|
+
id
|
|
49
|
+
createdAt
|
|
50
|
+
jobId
|
|
51
|
+
status
|
|
52
|
+
remark
|
|
53
|
+
recordId
|
|
54
|
+
resolvedAt
|
|
55
|
+
createdByUser {
|
|
56
|
+
...JobUser
|
|
57
|
+
}
|
|
58
|
+
resolvedByUser {
|
|
59
|
+
...JobUser
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
export const JOB_RECORD_QUESTION_FRAGMENT = gql `
|
|
64
|
+
fragment JobRecordQuestion on JobRecordQuestion {
|
|
65
|
+
question
|
|
66
|
+
stem
|
|
67
|
+
conceptId
|
|
68
|
+
typeId
|
|
69
|
+
answer
|
|
70
|
+
entitlementIds
|
|
71
|
+
presentationIds
|
|
72
|
+
conditionIds
|
|
73
|
+
choices {
|
|
74
|
+
label
|
|
75
|
+
name
|
|
76
|
+
explanation
|
|
77
|
+
answer
|
|
78
|
+
}
|
|
79
|
+
learningPoint
|
|
80
|
+
explanation
|
|
81
|
+
}
|
|
82
|
+
`;
|
|
83
|
+
export const JOB_RECORD_CHAPTER_FRAGMENT = gql `
|
|
84
|
+
fragment JobRecordChapter on JobRecordChapter {
|
|
85
|
+
topic
|
|
86
|
+
concept
|
|
87
|
+
chapter
|
|
88
|
+
}
|
|
89
|
+
`;
|
|
90
|
+
export const JOB_RECORD_STATION_FRAGMENT = gql `
|
|
91
|
+
fragment JobRecordStation on JobRecordStation {
|
|
92
|
+
question
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
95
|
+
export const JOB_RECORD_MOCK_TEST_FRAGMENT = gql `
|
|
96
|
+
fragment JobRecordMockTest on JobRecordMockTest {
|
|
97
|
+
question
|
|
98
|
+
conceptId
|
|
99
|
+
typeId
|
|
100
|
+
answer
|
|
101
|
+
choices {
|
|
102
|
+
label
|
|
103
|
+
name
|
|
104
|
+
explanation
|
|
105
|
+
answer
|
|
106
|
+
}
|
|
107
|
+
learningPoint
|
|
108
|
+
explanation
|
|
109
|
+
}
|
|
110
|
+
`;
|
|
111
|
+
export const JOB_RECORD_STATUS_FRAGMENT = gql `
|
|
112
|
+
fragment JobRecordStatus on JobRecord {
|
|
113
|
+
status
|
|
114
|
+
}
|
|
115
|
+
`;
|
|
116
|
+
export const JOB_RECORD_FRAGMENT = gql `
|
|
117
|
+
${JOB_REMARK_FRAGMENT}
|
|
118
|
+
${JOB_RECORD_STATUS_FRAGMENT}
|
|
119
|
+
${JOB_RECORD_QUESTION_FRAGMENT}
|
|
120
|
+
${JOB_RECORD_CHAPTER_FRAGMENT}
|
|
121
|
+
${JOB_RECORD_STATION_FRAGMENT}
|
|
122
|
+
${JOB_RECORD_MOCK_TEST_FRAGMENT}
|
|
123
|
+
fragment JobRecord on JobRecord {
|
|
124
|
+
id
|
|
125
|
+
jobId
|
|
126
|
+
index
|
|
127
|
+
data {
|
|
128
|
+
... on JobRecordQuestion {
|
|
129
|
+
...JobRecordQuestion
|
|
130
|
+
}
|
|
131
|
+
... on JobRecordChapter {
|
|
132
|
+
...JobRecordChapter
|
|
133
|
+
}
|
|
134
|
+
... on JobRecordStation {
|
|
135
|
+
...JobRecordStation
|
|
136
|
+
}
|
|
137
|
+
... on JobRecordMockTest {
|
|
138
|
+
...JobRecordMockTest
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
remarks {
|
|
142
|
+
...JobRemark
|
|
143
|
+
}
|
|
144
|
+
questionId
|
|
145
|
+
stationId
|
|
146
|
+
chapterId
|
|
147
|
+
createdAt
|
|
148
|
+
updatedAt
|
|
149
|
+
publishedAt
|
|
150
|
+
...JobRecordStatus
|
|
151
|
+
}
|
|
152
|
+
`;
|
|
153
|
+
export const JOB_MEMBER_FRAGMENT = gql `
|
|
154
|
+
${JOB_USER_FRAGMENT}
|
|
155
|
+
fragment JobMember on JobMember {
|
|
156
|
+
id
|
|
157
|
+
createdAt
|
|
158
|
+
jobId
|
|
159
|
+
role
|
|
160
|
+
user {
|
|
161
|
+
...JobUser
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
`;
|
|
165
|
+
export const JOB_ASSETS_FRAGMENT = gql `
|
|
166
|
+
${JOB_USER_FRAGMENT}
|
|
167
|
+
fragment JobAssets on JobAsset {
|
|
168
|
+
id
|
|
169
|
+
jobId
|
|
170
|
+
recordId
|
|
171
|
+
index
|
|
172
|
+
type
|
|
173
|
+
choiceIdx
|
|
174
|
+
createdAt
|
|
175
|
+
picture {
|
|
176
|
+
id
|
|
177
|
+
thumbhash
|
|
178
|
+
name
|
|
179
|
+
caption
|
|
180
|
+
path
|
|
181
|
+
path512
|
|
182
|
+
path256
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
`;
|
|
186
|
+
export const LIST_JOB_FRAGMENT = gql `
|
|
187
|
+
${JOB_FIELDS_FRAGMENT}
|
|
188
|
+
${JOB_STATUS_FRAGMENT}
|
|
189
|
+
fragment Job on Job {
|
|
190
|
+
id
|
|
191
|
+
updatedAt
|
|
192
|
+
createdAt
|
|
193
|
+
recordCount
|
|
194
|
+
resolvedCount
|
|
195
|
+
remarkCount
|
|
196
|
+
memberCount
|
|
197
|
+
chatCount
|
|
198
|
+
...JobFields
|
|
199
|
+
...JobStatus
|
|
200
|
+
}
|
|
201
|
+
`;
|
|
202
|
+
export const LIMITED_JOB_FRAGMENT = gql `
|
|
203
|
+
${LIST_JOB_FRAGMENT}
|
|
204
|
+
${JOB_MEMBER_FRAGMENT}
|
|
205
|
+
${JOB_ASSETS_FRAGMENT}
|
|
206
|
+
fragment LimitedJob on Job {
|
|
207
|
+
...Job
|
|
208
|
+
members {
|
|
209
|
+
...JobMember
|
|
210
|
+
}
|
|
211
|
+
assets {
|
|
212
|
+
...JobAssets
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
`;
|
|
216
|
+
export const FULL_JOB_FRAGMENT = gql `
|
|
217
|
+
${JOB_FIELDS_FRAGMENT}
|
|
218
|
+
${JOB_STATUS_FRAGMENT}
|
|
219
|
+
${JOB_RECORD_FRAGMENT}
|
|
220
|
+
${JOB_REMARK_FRAGMENT}
|
|
221
|
+
${JOB_MEMBER_FRAGMENT}
|
|
222
|
+
${JOB_ASSETS_FRAGMENT}
|
|
223
|
+
fragment DetailedJob on Job {
|
|
224
|
+
id
|
|
225
|
+
updatedAt
|
|
226
|
+
createdAt
|
|
227
|
+
recordCount
|
|
228
|
+
resolvedCount
|
|
229
|
+
remarkCount
|
|
230
|
+
memberCount
|
|
231
|
+
chatCount
|
|
232
|
+
assets {
|
|
233
|
+
...JobAssets
|
|
234
|
+
}
|
|
235
|
+
records {
|
|
236
|
+
...JobRecord
|
|
237
|
+
}
|
|
238
|
+
remarks {
|
|
239
|
+
...JobRemark
|
|
240
|
+
}
|
|
241
|
+
members {
|
|
242
|
+
...JobMember
|
|
243
|
+
}
|
|
244
|
+
...JobFields
|
|
245
|
+
...JobStatus
|
|
246
|
+
}
|
|
247
|
+
`;
|
|
@@ -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,123 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
import { JOB_RECORD_FRAGMENT, JOB_RECORD_STATUS_FRAGMENT, JOB_REMARK_FRAGMENT, JOB_STATUS_FRAGMENT, LIST_JOB_FRAGMENT, } from '../../fragments';
|
|
3
|
+
export const CREATE_JOB = gql `
|
|
4
|
+
${LIST_JOB_FRAGMENT}
|
|
5
|
+
mutation CreateJob($input: CreateJobInput!) {
|
|
6
|
+
admin {
|
|
7
|
+
createJob(input: $input) {
|
|
8
|
+
...Job
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
export const UPDATE_JOB = gql `
|
|
14
|
+
${LIST_JOB_FRAGMENT}
|
|
15
|
+
mutation UpdateJob($id: ID!, $input: UpdateJobInput!) {
|
|
16
|
+
admin {
|
|
17
|
+
updateJob(id: $id, input: $input) {
|
|
18
|
+
...Job
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
export const DUPLICATE_JOB = gql `
|
|
24
|
+
${LIST_JOB_FRAGMENT}
|
|
25
|
+
mutation DuplicateJob($id: ID!) {
|
|
26
|
+
admin {
|
|
27
|
+
duplicateJob(id: $id) {
|
|
28
|
+
...Job
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
export const UPDATE_JOB_STATUS = gql `
|
|
34
|
+
${JOB_STATUS_FRAGMENT}
|
|
35
|
+
mutation UpdateJobStatus($id: ID!, $status: Int!) {
|
|
36
|
+
admin {
|
|
37
|
+
updateJobStatus(id: $id, status: $status) {
|
|
38
|
+
...JobStatus
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
export const DELETE_JOB = gql `
|
|
44
|
+
mutation DeleteJob($id: ID!) {
|
|
45
|
+
admin {
|
|
46
|
+
deleteJob(id: $id)
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
export const CREATE_JOB_REMARK = gql `
|
|
51
|
+
${JOB_REMARK_FRAGMENT}
|
|
52
|
+
mutation CreateJobRemark($input: CreateJobRemarkInput!) {
|
|
53
|
+
admin {
|
|
54
|
+
createJobRemark(input: $input) {
|
|
55
|
+
...JobRemark
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
60
|
+
export const UPDATE_JOB_REMARK = gql `
|
|
61
|
+
${JOB_REMARK_FRAGMENT}
|
|
62
|
+
mutation UpdateJobRemark($id: ID!, $input: UpdateJobRemarkInput!) {
|
|
63
|
+
admin {
|
|
64
|
+
updateJobRemark(id: $id, input: $input) {
|
|
65
|
+
...JobRemark
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
70
|
+
export const DELETE_JOB_REMARK = gql `
|
|
71
|
+
mutation DeleteJobRemark($id: ID!) {
|
|
72
|
+
admin {
|
|
73
|
+
deleteJobRemark(id: $id)
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
`;
|
|
77
|
+
export const CREATE_JOB_RECORD = gql `
|
|
78
|
+
${JOB_RECORD_FRAGMENT}
|
|
79
|
+
mutation CreateJobRecord($input: CreateJobRecordInput!) {
|
|
80
|
+
admin {
|
|
81
|
+
createJobRecord(input: $input) {
|
|
82
|
+
...JobRecord
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
`;
|
|
87
|
+
export const DELETE_JOB_RECORD = gql `
|
|
88
|
+
mutation DeleteJobRecord($id: ID!) {
|
|
89
|
+
admin {
|
|
90
|
+
deleteJobRecord(id: $id)
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
`;
|
|
94
|
+
export const UPDATE_JOB_RECORD = gql `
|
|
95
|
+
${JOB_RECORD_FRAGMENT}
|
|
96
|
+
mutation UpdateJobRecord($id: ID!, $input: JobRecordDataInput!) {
|
|
97
|
+
admin {
|
|
98
|
+
updateJobRecord(id: $id, input: $input) {
|
|
99
|
+
...JobRecord
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
`;
|
|
104
|
+
export const DUPLICATE_JOB_RECORD = gql `
|
|
105
|
+
${JOB_RECORD_FRAGMENT}
|
|
106
|
+
mutation DuplicateJobRecord($id: ID!) {
|
|
107
|
+
admin {
|
|
108
|
+
duplicateJobRecord(id: $id) {
|
|
109
|
+
...JobRecord
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
`;
|
|
114
|
+
export const UPDATE_JOB_RECORD_STATUS = gql `
|
|
115
|
+
${JOB_RECORD_STATUS_FRAGMENT}
|
|
116
|
+
mutation UpdateJobRecordStatus($ids: [ID!]!, $status: Int!) {
|
|
117
|
+
admin {
|
|
118
|
+
updateJobRecordStatus(ids: $ids, status: $status) {
|
|
119
|
+
...JobRecordStatus
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
`;
|