@quesmed/types-rn 2.6.234 → 2.6.236
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/Blog.d.ts +2 -1
- package/models/Blog.js +1 -0
- package/models/Question.d.ts +1 -1
- package/package.json +1 -1
- package/resolvers/fragments/index.d.ts +0 -2
- package/resolvers/fragments/index.js +0 -2
- package/resolvers/mutation/admin/index.d.ts +0 -4
- package/resolvers/mutation/admin/index.js +0 -4
- package/resolvers/mutation/restricted/marksheet.js +85 -31
- package/resolvers/mutation/restricted/questionDiscussion.js +1 -1
- package/resolvers/mutation/restricted/users.d.ts +1 -0
- package/resolvers/mutation/restricted/users.js +20 -1
- package/resolvers/query/admin/index.d.ts +0 -2
- package/resolvers/query/admin/index.js +0 -2
- package/resolvers/query/restricted/marksheet.d.ts +6 -0
- package/resolvers/query/restricted/marksheet.js +22 -1
- package/utils/evaluateMark.js +1 -1
- package/resolvers/fragments/job.d.ts +0 -10
- package/resolvers/fragments/job.js +0 -191
- package/resolvers/fragments/record.d.ts +0 -10
- package/resolvers/fragments/record.js +0 -187
- package/resolvers/mutation/admin/assets.d.ts +0 -44
- package/resolvers/mutation/admin/assets.js +0 -39
- package/resolvers/mutation/admin/job.d.ts +0 -75
- package/resolvers/mutation/admin/job.js +0 -102
- package/resolvers/mutation/admin/question.d.ts +0 -41
- package/resolvers/mutation/admin/question.js +0 -34
- package/resolvers/mutation/admin/record.d.ts +0 -52
- package/resolvers/mutation/admin/record.js +0 -62
- package/resolvers/query/admin/job.d.ts +0 -46
- package/resolvers/query/admin/job.js +0 -56
- package/resolvers/query/admin/record.d.ts +0 -25
- package/resolvers/query/admin/record.js +0 -35
package/models/Blog.d.ts
CHANGED
package/models/Blog.js
CHANGED
package/models/Question.d.ts
CHANGED
|
@@ -204,7 +204,7 @@ export interface IQuestionRanking extends IQuestion {
|
|
|
204
204
|
}
|
|
205
205
|
export interface IQuestionSjtTwoAnswer extends IQuestion {
|
|
206
206
|
answer: [string, string];
|
|
207
|
-
|
|
207
|
+
sbaAnswer: [string, string];
|
|
208
208
|
}
|
|
209
209
|
export interface IQuestionPrescribe extends IQuestion {
|
|
210
210
|
answer: IPrescribeAnswer[];
|
package/package.json
CHANGED
|
@@ -2,13 +2,11 @@ export * from './blog';
|
|
|
2
2
|
export * from './chapter';
|
|
3
3
|
export * from './concept';
|
|
4
4
|
export * from './highlight';
|
|
5
|
-
export * from './job';
|
|
6
5
|
export * from './marksheet';
|
|
7
6
|
export * from './mockTest';
|
|
8
7
|
export * from './osce';
|
|
9
8
|
export * from './picture';
|
|
10
9
|
export * from './question';
|
|
11
|
-
export * from './record';
|
|
12
10
|
export * from './topic';
|
|
13
11
|
export * from './user';
|
|
14
12
|
export * from './video';
|
|
@@ -18,13 +18,11 @@ __exportStar(require("./blog"), exports);
|
|
|
18
18
|
__exportStar(require("./chapter"), exports);
|
|
19
19
|
__exportStar(require("./concept"), exports);
|
|
20
20
|
__exportStar(require("./highlight"), exports);
|
|
21
|
-
__exportStar(require("./job"), exports);
|
|
22
21
|
__exportStar(require("./marksheet"), exports);
|
|
23
22
|
__exportStar(require("./mockTest"), exports);
|
|
24
23
|
__exportStar(require("./osce"), exports);
|
|
25
24
|
__exportStar(require("./picture"), exports);
|
|
26
25
|
__exportStar(require("./question"), exports);
|
|
27
|
-
__exportStar(require("./record"), exports);
|
|
28
26
|
__exportStar(require("./topic"), exports);
|
|
29
27
|
__exportStar(require("./user"), exports);
|
|
30
28
|
__exportStar(require("./video"), exports);
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
export * from './ai';
|
|
2
2
|
export * from './algoliaSync';
|
|
3
|
-
export * from './assets';
|
|
4
3
|
export * from './chapter';
|
|
5
4
|
export * from './content';
|
|
6
5
|
export * from './database';
|
|
7
|
-
export * from './job';
|
|
8
6
|
export * from './notification';
|
|
9
|
-
export * from './question';
|
|
10
|
-
export * from './record';
|
|
11
7
|
export * from './token';
|
|
@@ -16,12 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ai"), exports);
|
|
18
18
|
__exportStar(require("./algoliaSync"), exports);
|
|
19
|
-
__exportStar(require("./assets"), exports);
|
|
20
19
|
__exportStar(require("./chapter"), exports);
|
|
21
20
|
__exportStar(require("./content"), exports);
|
|
22
21
|
__exportStar(require("./database"), exports);
|
|
23
|
-
__exportStar(require("./job"), exports);
|
|
24
22
|
__exportStar(require("./notification"), exports);
|
|
25
|
-
__exportStar(require("./question"), exports);
|
|
26
|
-
__exportStar(require("./record"), exports);
|
|
27
23
|
__exportStar(require("./token"), exports);
|
|
@@ -81,10 +81,39 @@ exports.SAVE_MARKSHEET = (0, client_1.gql) `
|
|
|
81
81
|
flagged
|
|
82
82
|
mark
|
|
83
83
|
}
|
|
84
|
+
sections {
|
|
85
|
+
entitlementId
|
|
86
|
+
marks {
|
|
87
|
+
isAnswered
|
|
88
|
+
isInDailyStack
|
|
89
|
+
result
|
|
90
|
+
score
|
|
91
|
+
id
|
|
92
|
+
marksheetId
|
|
93
|
+
questionChoiceId
|
|
94
|
+
timeTaken
|
|
95
|
+
flagged
|
|
96
|
+
mark
|
|
97
|
+
}
|
|
98
|
+
}
|
|
84
99
|
}
|
|
85
100
|
}
|
|
86
101
|
}
|
|
87
102
|
`;
|
|
103
|
+
function getMarksFromMarksheet(marksheets, marksheetId) {
|
|
104
|
+
const marksheet = marksheets.find((m) => Number(m.id) === Number(marksheetId));
|
|
105
|
+
if (!marksheet)
|
|
106
|
+
return [];
|
|
107
|
+
// Case 1: direct marks
|
|
108
|
+
if (Array.isArray(marksheet.marks) && marksheet.marks.length > 0) {
|
|
109
|
+
return marksheet.marks;
|
|
110
|
+
}
|
|
111
|
+
// Case 2: nested sections → flatten marks
|
|
112
|
+
if (Array.isArray(marksheet.sections)) {
|
|
113
|
+
return marksheet.sections.flatMap((section) => section.marks || []);
|
|
114
|
+
}
|
|
115
|
+
return [];
|
|
116
|
+
}
|
|
88
117
|
const updateMarksheets = (cache, result, options) => {
|
|
89
118
|
const { saveMarksheets } = result?.data?.restricted || {};
|
|
90
119
|
const { variables } = options || {};
|
|
@@ -95,7 +124,7 @@ const updateMarksheets = (cache, result, options) => {
|
|
|
95
124
|
const { input } = variables;
|
|
96
125
|
for (let i = 0; i < input.length; i++) {
|
|
97
126
|
const inputData = input[i];
|
|
98
|
-
const savedMarks = saveMarksheets
|
|
127
|
+
const savedMarks = getMarksFromMarksheet(saveMarksheets, inputData.marksheetId);
|
|
99
128
|
const savedData = savedMarks?.find((m) => m.id === inputData.markId);
|
|
100
129
|
cache.writeFragment({
|
|
101
130
|
id: cache.identify({
|
|
@@ -121,43 +150,68 @@ const updateMarksheets = (cache, result, options) => {
|
|
|
121
150
|
exports.updateMarksheets = updateMarksheets;
|
|
122
151
|
const optimisticSaveMarksheets = (marksheet, marksheetInput, questionIndex) => {
|
|
123
152
|
const { timeTaken, choiceId, mark, marksheetId, markId } = marksheetInput;
|
|
124
|
-
const { marks = [], ...rest } = marksheet || {};
|
|
125
|
-
const
|
|
126
|
-
|
|
153
|
+
const { marks = [], sections = [], ...rest } = marksheet || {};
|
|
154
|
+
const updateMarksArray = (marksArr) => {
|
|
155
|
+
const currentMark = marksArr.find((m) => Number(m.id) === Number(markId));
|
|
156
|
+
if (!currentMark)
|
|
157
|
+
return marksArr;
|
|
158
|
+
const { psaSectionId, choices, typeId } = currentMark.question;
|
|
159
|
+
const { answerField } = (0, utils_1.getQuestionInfo)(typeId, psaSectionId);
|
|
160
|
+
const answer = currentMark.question[answerField];
|
|
161
|
+
const { result, score } = (0, utils_1.evaluateMark)({
|
|
162
|
+
mark: mark || '',
|
|
163
|
+
answer,
|
|
164
|
+
psaSectionId,
|
|
165
|
+
questionTypeId: typeId,
|
|
166
|
+
choices,
|
|
167
|
+
});
|
|
168
|
+
const updatedMark = {
|
|
169
|
+
...marksArr[questionIndex],
|
|
170
|
+
marksheetId,
|
|
171
|
+
timeTaken,
|
|
172
|
+
questionChoiceId: choiceId ?? null,
|
|
173
|
+
isAnswered: true,
|
|
174
|
+
mark: mark || null,
|
|
175
|
+
result,
|
|
176
|
+
score,
|
|
177
|
+
};
|
|
178
|
+
return [
|
|
179
|
+
...marksArr.slice(0, questionIndex),
|
|
180
|
+
updatedMark,
|
|
181
|
+
...marksArr.slice(questionIndex + 1),
|
|
182
|
+
];
|
|
183
|
+
};
|
|
184
|
+
// Case 1: marks
|
|
185
|
+
if (marks.length > 0) {
|
|
127
186
|
return {
|
|
128
187
|
restricted: {
|
|
129
|
-
saveMarksheets: [{ ...rest, marks }],
|
|
188
|
+
saveMarksheets: [{ ...rest, marks: updateMarksArray(marks), sections }],
|
|
130
189
|
},
|
|
131
190
|
};
|
|
132
191
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
const updatedMarks = [
|
|
154
|
-
...marks.slice(0, questionIndex),
|
|
155
|
-
updatedMark,
|
|
156
|
-
...marks.slice(questionIndex + 1),
|
|
157
|
-
];
|
|
192
|
+
// Case 2: sections
|
|
193
|
+
if (sections.length > 0) {
|
|
194
|
+
const updatedSections = sections.map((section) => {
|
|
195
|
+
if (!Array.isArray(section.marks))
|
|
196
|
+
return section;
|
|
197
|
+
const hasMark = section.marks.some((m) => Number(m.id) === Number(markId));
|
|
198
|
+
if (!hasMark)
|
|
199
|
+
return section;
|
|
200
|
+
return {
|
|
201
|
+
...section,
|
|
202
|
+
marks: updateMarksArray(section.marks),
|
|
203
|
+
};
|
|
204
|
+
});
|
|
205
|
+
return {
|
|
206
|
+
restricted: {
|
|
207
|
+
saveMarksheets: [{ ...rest, sections: updatedSections, marks }],
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
// fallback
|
|
158
212
|
return {
|
|
159
213
|
restricted: {
|
|
160
|
-
saveMarksheets: [{ ...rest, marks
|
|
214
|
+
saveMarksheets: [{ ...rest, marks, sections }],
|
|
161
215
|
},
|
|
162
216
|
};
|
|
163
217
|
};
|
|
@@ -46,7 +46,7 @@ const getQuestionTypeName = (typeId) => {
|
|
|
46
46
|
[models_1.EQuestionType.DECISION_MAKING_SBA]: 'QuestionSBA',
|
|
47
47
|
[models_1.EQuestionType.DECISION_MAKING_YES_NO]: 'QuestionMultiA',
|
|
48
48
|
[models_1.EQuestionType.SJT_SINGLE_CHOICE]: 'QuestionSBA',
|
|
49
|
-
[models_1.EQuestionType.SJT_TWO_ANSWERS]: '
|
|
49
|
+
[models_1.EQuestionType.SJT_TWO_ANSWERS]: 'QuestionSBA',
|
|
50
50
|
};
|
|
51
51
|
return mappedObj[typeId] ?? 'QuestionSBA';
|
|
52
52
|
};
|
|
@@ -63,6 +63,7 @@ export type IRenewTokenData = RestrictedData<string, 'renewToken'>;
|
|
|
63
63
|
export declare const TOC_ACCEPT: import("@apollo/client").DocumentNode;
|
|
64
64
|
export type ITocAcceptVar = null;
|
|
65
65
|
export type ITocAcceptData = RestrictedData<string, 'tocAccept'>;
|
|
66
|
+
export declare const updateCacheOnTocAccept: (userId: Id) => (cache: ApolloCache<any>, _result: ApolloUpdateResultRestricted<ITocAcceptData>, _options?: ApolloUpdateOptions<ITocAcceptVar>) => void;
|
|
66
67
|
export type ICompletedCardsData = Pick<IUser, 'completedCards' | 'completedCardsCount'>;
|
|
67
68
|
export type IUpsertUserConceptStatusVar = {
|
|
68
69
|
conceptIds: Id[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.optimisticVideoLearningStatus = exports.updateCacheOnVideoLearningStatusUpdate = exports.UPSERT_USER_VIDEO_STATUS = exports.optimisticStationLearningStatus = exports.updateCacheOnStationLearningStatusUpdate = exports.UPSERT_USER_STATION_STATUS = exports.optimisticConceptLearningStatus = exports.updateCacheOnConceptLearningStatusUpdate = exports.UPSERT_USER_CONCEPT_STATUS = exports.TOC_ACCEPT = exports.RENEW_TOKEN = exports.updateCacheOnUpdateUserSettings = exports.optimisticUpdateUserSettings = exports.optimisticAddProductFeedback = exports.ADD_PRODUCT_FEEDBACK = exports.UPDATE_USER_SETTINGS = exports.UPDATE_USER = exports.DELETE_USER = exports.RESET_CATEGORY_PROGRESS = exports.RESET_PROGRESS = exports.LOGOUT_USER = void 0;
|
|
3
|
+
exports.optimisticVideoLearningStatus = exports.updateCacheOnVideoLearningStatusUpdate = exports.UPSERT_USER_VIDEO_STATUS = exports.optimisticStationLearningStatus = exports.updateCacheOnStationLearningStatusUpdate = exports.UPSERT_USER_STATION_STATUS = exports.optimisticConceptLearningStatus = exports.updateCacheOnConceptLearningStatusUpdate = exports.UPSERT_USER_CONCEPT_STATUS = exports.updateCacheOnTocAccept = exports.TOC_ACCEPT = exports.RENEW_TOKEN = exports.updateCacheOnUpdateUserSettings = exports.optimisticUpdateUserSettings = exports.optimisticAddProductFeedback = exports.ADD_PRODUCT_FEEDBACK = exports.UPDATE_USER_SETTINGS = exports.UPDATE_USER = exports.DELETE_USER = exports.RESET_CATEGORY_PROGRESS = exports.RESET_PROGRESS = exports.LOGOUT_USER = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
const models_1 = require("../../../models");
|
|
6
6
|
const utils_1 = require("../../../utils");
|
|
@@ -159,6 +159,25 @@ exports.TOC_ACCEPT = (0, client_1.gql) `
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
`;
|
|
162
|
+
const TOC_ACCEPTED_FRAGMENT = (0, client_1.gql) `
|
|
163
|
+
fragment TocAcceptedFragment on User {
|
|
164
|
+
tocAccepted
|
|
165
|
+
}
|
|
166
|
+
`;
|
|
167
|
+
const updateCacheOnTocAccept = (userId) => (cache, _result, _options) => {
|
|
168
|
+
if (!userId) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
cache.writeFragment({
|
|
172
|
+
id: cache.identify({ id: userId, __typename: 'User' }),
|
|
173
|
+
data: {
|
|
174
|
+
tocAccepted: true,
|
|
175
|
+
},
|
|
176
|
+
fragment: TOC_ACCEPTED_FRAGMENT,
|
|
177
|
+
fragmentName: 'TocAcceptedFragment',
|
|
178
|
+
});
|
|
179
|
+
};
|
|
180
|
+
exports.updateCacheOnTocAccept = updateCacheOnTocAccept;
|
|
162
181
|
exports.UPSERT_USER_CONCEPT_STATUS = (0, client_1.gql) `
|
|
163
182
|
mutation UpsertUserConceptStatus($conceptIds: [Int!]!, $status: Int!) {
|
|
164
183
|
restricted {
|
|
@@ -18,5 +18,3 @@ __exportStar(require("./chapter"), exports);
|
|
|
18
18
|
__exportStar(require("./dashboard"), exports);
|
|
19
19
|
__exportStar(require("./database"), exports);
|
|
20
20
|
__exportStar(require("./getUserToken"), exports);
|
|
21
|
-
__exportStar(require("./job"), exports);
|
|
22
|
-
__exportStar(require("./record"), exports);
|
|
@@ -32,8 +32,14 @@ export interface IMarksheetsVar {
|
|
|
32
32
|
order?: ESortOrder;
|
|
33
33
|
lastId?: number;
|
|
34
34
|
solo?: boolean;
|
|
35
|
+
mockTestId?: number;
|
|
35
36
|
};
|
|
36
37
|
}
|
|
38
|
+
export type IMarksheetList = RestrictedData<graphqlNormalize & {
|
|
39
|
+
results: IMarksheet[];
|
|
40
|
+
total: number;
|
|
41
|
+
}, 'marksheetList'>;
|
|
42
|
+
export declare const MARKSHEET_LIST: import("@apollo/client").DocumentNode;
|
|
37
43
|
export type IMarksheetsData = RestrictedData<{
|
|
38
44
|
results: (graphqlNormalize & IMarksheet)[];
|
|
39
45
|
total: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PRE_BUILD_MARKSHEET = exports.HEARTBEAT_QBANK = exports.MARKSHEET_FEEDBACK = exports.FLAGGED_QUESTIONS_MARKSHEET = exports.FLAGGED_QUESTIONS = exports.LATEST_PAST_SESSION_ID = exports.LATEST_PAST_MARKSHEET_ID = exports.MARKSHEETS_TRACKER = exports.MARKSHEETS = exports.MARKSHEETS_WINDOW = exports.MARKSHEET = void 0;
|
|
3
|
+
exports.PRE_BUILD_MARKSHEET = exports.HEARTBEAT_QBANK = exports.MARKSHEET_FEEDBACK = exports.FLAGGED_QUESTIONS_MARKSHEET = exports.FLAGGED_QUESTIONS = exports.LATEST_PAST_SESSION_ID = exports.LATEST_PAST_MARKSHEET_ID = exports.MARKSHEETS_TRACKER = exports.MARKSHEETS = exports.MARKSHEET_LIST = exports.MARKSHEETS_WINDOW = exports.MARKSHEET = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
const marksheet_1 = require("../../fragments/marksheet");
|
|
6
6
|
exports.MARKSHEET = (0, client_1.gql) `
|
|
@@ -48,6 +48,27 @@ exports.MARKSHEETS_WINDOW = (0, client_1.gql) `
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
`;
|
|
51
|
+
exports.MARKSHEET_LIST = (0, client_1.gql) `
|
|
52
|
+
${marksheet_1.MARKSHEET_STATS_FIELDS}
|
|
53
|
+
query MarksheetList($options: MarksheetOptions!) {
|
|
54
|
+
restricted {
|
|
55
|
+
marksheetList(options: $options) {
|
|
56
|
+
results {
|
|
57
|
+
id
|
|
58
|
+
endedAt
|
|
59
|
+
stats {
|
|
60
|
+
...MarksheetStatsFields
|
|
61
|
+
}
|
|
62
|
+
isTestMarksheet
|
|
63
|
+
solo
|
|
64
|
+
completed
|
|
65
|
+
updatedAt
|
|
66
|
+
}
|
|
67
|
+
total
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
51
72
|
exports.MARKSHEETS = (0, client_1.gql) `
|
|
52
73
|
${marksheet_1.MARKSHEET_STATS_FIELDS}
|
|
53
74
|
query Marksheets($filter: MarksheetFilterInput!) {
|
package/utils/evaluateMark.js
CHANGED
|
@@ -81,7 +81,7 @@ function getQuestionInfo(questionType, psaSectionId) {
|
|
|
81
81
|
case models_1.EQuestionType.SJT_SINGLE_CHOICE:
|
|
82
82
|
return { maxScore: 1, answerField: 'sbaAnswer' };
|
|
83
83
|
case models_1.EQuestionType.SJT_TWO_ANSWERS:
|
|
84
|
-
return { maxScore: 1, answerField: '
|
|
84
|
+
return { maxScore: 1, answerField: 'sbaAnswer' };
|
|
85
85
|
default:
|
|
86
86
|
return { maxScore: 1, answerField: 'answer' };
|
|
87
87
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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_CHAT_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
5
|
-
export declare const JOB_HISTORY_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
6
|
-
export declare const JOB_MEMBER_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
7
|
-
export declare const JOB_ASSETS_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
8
|
-
export declare const LIST_JOB_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
9
|
-
export declare const LIMITED_JOB_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
10
|
-
export declare const FULL_JOB_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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_HISTORY_FRAGMENT = exports.JOB_CHAT_FRAGMENT = exports.JOB_FIELDS_FRAGMENT = exports.JOB_META_DATA_FRAGMENT = exports.JOB_STATUS_FRAGMENT = void 0;
|
|
4
|
-
const client_1 = require("@apollo/client");
|
|
5
|
-
const record_1 = require("./record");
|
|
6
|
-
exports.JOB_STATUS_FRAGMENT = (0, client_1.gql) `
|
|
7
|
-
fragment JobStatus on Job {
|
|
8
|
-
status
|
|
9
|
-
}
|
|
10
|
-
`;
|
|
11
|
-
exports.JOB_META_DATA_FRAGMENT = (0, client_1.gql) `
|
|
12
|
-
fragment JobMetaData on JobMetaData {
|
|
13
|
-
question {
|
|
14
|
-
typeId
|
|
15
|
-
conceptId
|
|
16
|
-
entitlementIds
|
|
17
|
-
}
|
|
18
|
-
mockTest {
|
|
19
|
-
mockTestId
|
|
20
|
-
typeId
|
|
21
|
-
isNew
|
|
22
|
-
title
|
|
23
|
-
passingMark
|
|
24
|
-
}
|
|
25
|
-
chapter {
|
|
26
|
-
topicId
|
|
27
|
-
entitlementIds
|
|
28
|
-
# topicTypeId
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
32
|
-
exports.JOB_FIELDS_FRAGMENT = (0, client_1.gql) `
|
|
33
|
-
${exports.JOB_META_DATA_FRAGMENT}
|
|
34
|
-
fragment JobFields on Job {
|
|
35
|
-
name
|
|
36
|
-
description
|
|
37
|
-
type
|
|
38
|
-
productId
|
|
39
|
-
priority
|
|
40
|
-
totalRecords
|
|
41
|
-
dueDate
|
|
42
|
-
metadata {
|
|
43
|
-
...JobMetaData
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
`;
|
|
47
|
-
exports.JOB_CHAT_FRAGMENT = (0, client_1.gql) `
|
|
48
|
-
${record_1.JOB_USER_FRAGMENT}
|
|
49
|
-
fragment JobChat on JobChat {
|
|
50
|
-
id
|
|
51
|
-
jobId
|
|
52
|
-
message
|
|
53
|
-
createdAt
|
|
54
|
-
updatedAt
|
|
55
|
-
user {
|
|
56
|
-
...JobUser
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
`;
|
|
60
|
-
exports.JOB_HISTORY_FRAGMENT = (0, client_1.gql) `
|
|
61
|
-
${record_1.JOB_USER_FRAGMENT}
|
|
62
|
-
fragment JobHistory on JobHistory {
|
|
63
|
-
id
|
|
64
|
-
createdAt
|
|
65
|
-
updatedAt
|
|
66
|
-
type
|
|
67
|
-
action
|
|
68
|
-
data
|
|
69
|
-
description
|
|
70
|
-
jobId
|
|
71
|
-
recordId
|
|
72
|
-
user {
|
|
73
|
-
...JobUser
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
`;
|
|
77
|
-
exports.JOB_MEMBER_FRAGMENT = (0, client_1.gql) `
|
|
78
|
-
${record_1.JOB_USER_FRAGMENT}
|
|
79
|
-
fragment JobMember on JobMember {
|
|
80
|
-
id
|
|
81
|
-
createdAt
|
|
82
|
-
jobId
|
|
83
|
-
role
|
|
84
|
-
user {
|
|
85
|
-
...JobUser
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
`;
|
|
89
|
-
exports.JOB_ASSETS_FRAGMENT = (0, client_1.gql) `
|
|
90
|
-
${record_1.JOB_USER_FRAGMENT}
|
|
91
|
-
fragment JobAssets on JobAsset {
|
|
92
|
-
id
|
|
93
|
-
jobId
|
|
94
|
-
recordId
|
|
95
|
-
index
|
|
96
|
-
type
|
|
97
|
-
choiceLabel
|
|
98
|
-
createdAt
|
|
99
|
-
picture {
|
|
100
|
-
id
|
|
101
|
-
thumbhash
|
|
102
|
-
name
|
|
103
|
-
caption
|
|
104
|
-
path
|
|
105
|
-
path512
|
|
106
|
-
path256
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
`;
|
|
110
|
-
exports.LIST_JOB_FRAGMENT = (0, client_1.gql) `
|
|
111
|
-
${exports.JOB_FIELDS_FRAGMENT}
|
|
112
|
-
${exports.JOB_STATUS_FRAGMENT}
|
|
113
|
-
${record_1.JOB_USER_FRAGMENT}
|
|
114
|
-
${exports.JOB_MEMBER_FRAGMENT}
|
|
115
|
-
fragment Job on Job {
|
|
116
|
-
id
|
|
117
|
-
trial
|
|
118
|
-
updatedAt
|
|
119
|
-
createdAt
|
|
120
|
-
recordCount
|
|
121
|
-
publishedCount
|
|
122
|
-
resolvedCount
|
|
123
|
-
remarkCount
|
|
124
|
-
memberCount
|
|
125
|
-
assetCount
|
|
126
|
-
chatCount
|
|
127
|
-
createdByUser {
|
|
128
|
-
...JobUser
|
|
129
|
-
}
|
|
130
|
-
members {
|
|
131
|
-
...JobMember
|
|
132
|
-
}
|
|
133
|
-
...JobFields
|
|
134
|
-
...JobStatus
|
|
135
|
-
}
|
|
136
|
-
`;
|
|
137
|
-
exports.LIMITED_JOB_FRAGMENT = (0, client_1.gql) `
|
|
138
|
-
${exports.LIST_JOB_FRAGMENT}
|
|
139
|
-
${exports.JOB_MEMBER_FRAGMENT}
|
|
140
|
-
${exports.JOB_ASSETS_FRAGMENT}
|
|
141
|
-
${exports.JOB_HISTORY_FRAGMENT}
|
|
142
|
-
fragment LimitedJob on Job {
|
|
143
|
-
...Job
|
|
144
|
-
members {
|
|
145
|
-
...JobMember
|
|
146
|
-
}
|
|
147
|
-
assets {
|
|
148
|
-
...JobAssets
|
|
149
|
-
}
|
|
150
|
-
history {
|
|
151
|
-
...JobHistory
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
`;
|
|
155
|
-
exports.FULL_JOB_FRAGMENT = (0, client_1.gql) `
|
|
156
|
-
${exports.JOB_FIELDS_FRAGMENT}
|
|
157
|
-
${exports.JOB_STATUS_FRAGMENT}
|
|
158
|
-
${record_1.JOB_RECORD_FRAGMENT}
|
|
159
|
-
${record_1.JOB_REMARK_FRAGMENT}
|
|
160
|
-
${exports.JOB_MEMBER_FRAGMENT}
|
|
161
|
-
fragment DetailedJob on Job {
|
|
162
|
-
id
|
|
163
|
-
updatedAt
|
|
164
|
-
createdAt
|
|
165
|
-
trial
|
|
166
|
-
recordCount
|
|
167
|
-
setCount
|
|
168
|
-
publishedCount
|
|
169
|
-
resolvedCount
|
|
170
|
-
remarkCount
|
|
171
|
-
memberCount
|
|
172
|
-
chatCount
|
|
173
|
-
createdByUser {
|
|
174
|
-
...JobUser
|
|
175
|
-
}
|
|
176
|
-
assets {
|
|
177
|
-
...JobAssets
|
|
178
|
-
}
|
|
179
|
-
records {
|
|
180
|
-
...JobRecord
|
|
181
|
-
}
|
|
182
|
-
remarks {
|
|
183
|
-
...JobRemark
|
|
184
|
-
}
|
|
185
|
-
members {
|
|
186
|
-
...JobMember
|
|
187
|
-
}
|
|
188
|
-
...JobFields
|
|
189
|
-
...JobStatus
|
|
190
|
-
}
|
|
191
|
-
`;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const JOB_USER_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
2
|
-
export declare const JOB_REMARK_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
3
|
-
export declare const JOB_ASSET_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
4
|
-
export declare const JOB_RECORD_CHOICE_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
5
|
-
export declare const JOB_RECORD_QUESTION_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
6
|
-
export declare const JOB_RECORD_CHAPTER_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
7
|
-
export declare const JOB_RECORD_STATION_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
8
|
-
export declare const JOB_RECORD_MOCK_TEST_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
9
|
-
export declare const JOB_RECORD_STATUS_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
10
|
-
export declare const JOB_RECORD_FRAGMENT: import("@apollo/client").DocumentNode;
|