@quesmed/types-rn 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/models/Job.d.ts +191 -0
- package/models/Job.js +132 -0
- package/models/User.d.ts +2 -1
- package/models/User.js +1 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +1 -0
- package/package.json +1 -1
- package/resolvers/constants.js +1 -1
- package/resolvers/fragments/index.d.ts +1 -0
- package/resolvers/fragments/index.js +1 -0
- package/resolvers/fragments/job.d.ts +16 -0
- package/resolvers/fragments/job.js +250 -0
- package/resolvers/mutation/admin/index.d.ts +1 -0
- package/resolvers/mutation/admin/index.js +1 -0
- package/resolvers/mutation/admin/job.d.ts +104 -0
- package/resolvers/mutation/admin/job.js +126 -0
- package/resolvers/mutation/stripe.d.ts +3 -1
- package/resolvers/mutation/stripe.js +2 -2
- package/resolvers/mutation/validUserToken/user.d.ts +4 -0
- package/resolvers/mutation/validUserToken/user.js +8 -0
- package/resolvers/query/admin/dashboard.d.ts +1 -0
- package/resolvers/query/admin/dashboard.js +1 -0
- package/resolvers/query/admin/index.d.ts +1 -0
- package/resolvers/query/admin/index.js +1 -0
- package/resolvers/query/admin/job.d.ts +41 -0
- package/resolvers/query/admin/job.js +62 -0
package/models/Job.d.ts
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
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
|
+
entitlementIds?: EEntitlementType[];
|
|
100
|
+
conditionIds?: number[];
|
|
101
|
+
presentationIds?: number[];
|
|
102
|
+
typeId: EQuestionType;
|
|
103
|
+
choices: Array<Pick<IQuestionChoice, 'label' | 'name' | 'answer'> & {
|
|
104
|
+
explanation?: IQuestionChoice['explanation'];
|
|
105
|
+
}>;
|
|
106
|
+
}
|
|
107
|
+
export interface IJobRecordChapter {
|
|
108
|
+
title: string;
|
|
109
|
+
concept: string;
|
|
110
|
+
explanation: string;
|
|
111
|
+
}
|
|
112
|
+
export interface IJobRecordStation {
|
|
113
|
+
question: string;
|
|
114
|
+
}
|
|
115
|
+
export interface IJobRecordMockTest {
|
|
116
|
+
question: string;
|
|
117
|
+
conceptId?: number | null;
|
|
118
|
+
explanation?: string | null;
|
|
119
|
+
learningPoint?: string | null;
|
|
120
|
+
typeId: EQuestionType;
|
|
121
|
+
choices: Array<Pick<IQuestionChoice, 'label' | 'name' | 'answer'> & {
|
|
122
|
+
explanation?: IQuestionChoice['explanation'];
|
|
123
|
+
}>;
|
|
124
|
+
}
|
|
125
|
+
export interface IJobRecord {
|
|
126
|
+
id: string;
|
|
127
|
+
index: number;
|
|
128
|
+
jobId: IJob['id'];
|
|
129
|
+
status: EJobRecordStatus;
|
|
130
|
+
data: IJobRecordQuestion | IJobRecordStation | IJobRecordChapter | IJobRecordMockTest;
|
|
131
|
+
publishedAt: Date | number | null;
|
|
132
|
+
createdAt: Date | number;
|
|
133
|
+
updatedAt: Date | number;
|
|
134
|
+
questionId: number | null;
|
|
135
|
+
stationId: number | null;
|
|
136
|
+
chapterId: number | null;
|
|
137
|
+
remarks: IJobRemark[];
|
|
138
|
+
}
|
|
139
|
+
export interface IJobMetaData {
|
|
140
|
+
productId: EProductType;
|
|
141
|
+
mockTest?: {
|
|
142
|
+
mockTestId: number;
|
|
143
|
+
} | {
|
|
144
|
+
typeId: EMockTestType;
|
|
145
|
+
title: string;
|
|
146
|
+
passingMark: number;
|
|
147
|
+
} | null;
|
|
148
|
+
question?: {
|
|
149
|
+
typeId: EQuestionType | null;
|
|
150
|
+
conceptId: number | null;
|
|
151
|
+
entitlementIds: EEntitlementType[] | null;
|
|
152
|
+
} | null;
|
|
153
|
+
}
|
|
154
|
+
export interface IJob {
|
|
155
|
+
id: string;
|
|
156
|
+
name: string;
|
|
157
|
+
description: string;
|
|
158
|
+
status: EJobStatus;
|
|
159
|
+
type: EJobType;
|
|
160
|
+
priority: EJobPriority;
|
|
161
|
+
totalRecords: number;
|
|
162
|
+
metadata: IJobMetaData;
|
|
163
|
+
dueDate: Date | number;
|
|
164
|
+
createdAt: Date | number;
|
|
165
|
+
updatedAt: Date | number;
|
|
166
|
+
recordCount: number;
|
|
167
|
+
remarkCount: number;
|
|
168
|
+
resolvedCount: number;
|
|
169
|
+
memberCount: number;
|
|
170
|
+
chatCount: number;
|
|
171
|
+
remarks: IJobRemark[];
|
|
172
|
+
members: IJobMember[];
|
|
173
|
+
assets: IJobAsset[];
|
|
174
|
+
records: IJobRecord[];
|
|
175
|
+
}
|
|
176
|
+
export declare const IsJobRecordQuestion: (record: IJobRecord['data']) => record is IJobRecordQuestion;
|
|
177
|
+
export declare const IsJobRecordMockTest: (record: IJobRecord['data']) => record is IJobRecordMockTest;
|
|
178
|
+
export declare const IsJobRecordStation: (record: IJobRecord['data']) => record is IJobRecordStation;
|
|
179
|
+
export declare const IsJobRecordChapter: (record: IJobRecord['data']) => record is IJobRecordChapter;
|
|
180
|
+
export declare const IsJobRecordQuestionByType: (type: EJobType, record: IJobRecord['data']) => record is IJobRecordQuestion;
|
|
181
|
+
export declare const IsJobRecordMockTestByType: (type: EJobType, record: IJobRecord['data']) => record is IJobRecordMockTest;
|
|
182
|
+
export declare const IsJobRecordStationByType: (type: EJobType, record: IJobRecord['data']) => record is IJobRecordStation;
|
|
183
|
+
export declare const IsJobRecordChapterByType: (type: EJobType, record: IJobRecord['data']) => record is IJobRecordChapter;
|
|
184
|
+
export declare const isExistingMockTestMeta: (metadata: IJobMetaData['mockTest']) => metadata is {
|
|
185
|
+
mockTestId: number;
|
|
186
|
+
};
|
|
187
|
+
export declare const isNewMockTestMeta: (metadata: IJobMetaData['mockTest']) => metadata is {
|
|
188
|
+
typeId: EMockTestType;
|
|
189
|
+
title: string;
|
|
190
|
+
passingMark: number;
|
|
191
|
+
};
|
package/models/Job.js
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
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.EJobType = exports.EJobStatus = exports.EJobPriority = void 0;
|
|
4
|
+
var EJobPriority;
|
|
5
|
+
(function (EJobPriority) {
|
|
6
|
+
EJobPriority[EJobPriority["LOW"] = 1] = "LOW";
|
|
7
|
+
EJobPriority[EJobPriority["MEDIUM"] = 2] = "MEDIUM";
|
|
8
|
+
EJobPriority[EJobPriority["HIGH"] = 3] = "HIGH";
|
|
9
|
+
})(EJobPriority = exports.EJobPriority || (exports.EJobPriority = {}));
|
|
10
|
+
var EJobStatus;
|
|
11
|
+
(function (EJobStatus) {
|
|
12
|
+
EJobStatus[EJobStatus["ALL"] = 0] = "ALL";
|
|
13
|
+
//Work not yet begun
|
|
14
|
+
EJobStatus[EJobStatus["IDLE"] = 1] = "IDLE";
|
|
15
|
+
//Actively being written or edited
|
|
16
|
+
EJobStatus[EJobStatus["ONGOING"] = 2] = "ONGOING";
|
|
17
|
+
//Submitted, pending reviewer feedback
|
|
18
|
+
EJobStatus[EJobStatus["SUBMITTED"] = 3] = "SUBMITTED";
|
|
19
|
+
//Returned by reviewer for changes
|
|
20
|
+
EJobStatus[EJobStatus["REJECTED"] = 4] = "REJECTED";
|
|
21
|
+
//Accepted by reviewer
|
|
22
|
+
EJobStatus[EJobStatus["APPROVED"] = 5] = "APPROVED";
|
|
23
|
+
//In QA, testing, or limited release
|
|
24
|
+
EJobStatus[EJobStatus["TESTING"] = 6] = "TESTING";
|
|
25
|
+
// Final version is live and visible
|
|
26
|
+
EJobStatus[EJobStatus["PUBLISHED"] = 7] = "PUBLISHED";
|
|
27
|
+
//Partial batch, some content is live
|
|
28
|
+
EJobStatus[EJobStatus["PARTIAL_TRIALING"] = 8] = "PARTIAL_TRIALING";
|
|
29
|
+
//Closed, revision not allowed
|
|
30
|
+
EJobStatus[EJobStatus["CLOSED"] = 9] = "CLOSED";
|
|
31
|
+
})(EJobStatus = exports.EJobStatus || (exports.EJobStatus = {}));
|
|
32
|
+
var EJobType;
|
|
33
|
+
(function (EJobType) {
|
|
34
|
+
EJobType[EJobType["ALL"] = 0] = "ALL";
|
|
35
|
+
EJobType[EJobType["QUESTION"] = 1] = "QUESTION";
|
|
36
|
+
EJobType[EJobType["STATION"] = 2] = "STATION";
|
|
37
|
+
EJobType[EJobType["CHAPTER"] = 3] = "CHAPTER";
|
|
38
|
+
EJobType[EJobType["MOCK_TEST"] = 4] = "MOCK_TEST";
|
|
39
|
+
})(EJobType = exports.EJobType || (exports.EJobType = {}));
|
|
40
|
+
var EJobRecordStatus;
|
|
41
|
+
(function (EJobRecordStatus) {
|
|
42
|
+
EJobRecordStatus[EJobRecordStatus["ALL"] = 0] = "ALL";
|
|
43
|
+
//Actively being written or edited
|
|
44
|
+
EJobRecordStatus[EJobRecordStatus["DRAFT"] = 1] = "DRAFT";
|
|
45
|
+
//Submitted, pending reviewer feedback
|
|
46
|
+
EJobRecordStatus[EJobRecordStatus["READY"] = 2] = "READY";
|
|
47
|
+
//Accepted by reviewer
|
|
48
|
+
EJobRecordStatus[EJobRecordStatus["APPROVED"] = 3] = "APPROVED";
|
|
49
|
+
//Returned by reviewer for changes
|
|
50
|
+
EJobRecordStatus[EJobRecordStatus["REJECTED"] = 4] = "REJECTED";
|
|
51
|
+
//In QA, testing, or limited release
|
|
52
|
+
EJobRecordStatus[EJobRecordStatus["TESTING"] = 5] = "TESTING";
|
|
53
|
+
// Final version is live and visible
|
|
54
|
+
EJobRecordStatus[EJobRecordStatus["PUBLISHED"] = 6] = "PUBLISHED";
|
|
55
|
+
})(EJobRecordStatus = exports.EJobRecordStatus || (exports.EJobRecordStatus = {}));
|
|
56
|
+
var ELightGalleryType;
|
|
57
|
+
(function (ELightGalleryType) {
|
|
58
|
+
// QUESTION = 'question',
|
|
59
|
+
// STEM = 'stem',
|
|
60
|
+
// EXPLANATION = 'explanation',
|
|
61
|
+
// LEARNING_POINT = 'learning_point',
|
|
62
|
+
// CHOICE = 'choice',
|
|
63
|
+
// EXAMINER = 'examiner',
|
|
64
|
+
// CANDIDATE = 'candidate',
|
|
65
|
+
// WALKTHROUGH = 'walkthrough',
|
|
66
|
+
// ACTOR = 'actor',
|
|
67
|
+
ELightGalleryType[ELightGalleryType["QUESTION"] = 1] = "QUESTION";
|
|
68
|
+
ELightGalleryType[ELightGalleryType["STEM"] = 2] = "STEM";
|
|
69
|
+
ELightGalleryType[ELightGalleryType["EXPLANATION"] = 3] = "EXPLANATION";
|
|
70
|
+
ELightGalleryType[ELightGalleryType["LEARNING_POINT"] = 4] = "LEARNING_POINT";
|
|
71
|
+
ELightGalleryType[ELightGalleryType["CHOICE"] = 5] = "CHOICE";
|
|
72
|
+
ELightGalleryType[ELightGalleryType["EXAMINER"] = 6] = "EXAMINER";
|
|
73
|
+
ELightGalleryType[ELightGalleryType["CANDIDATE"] = 7] = "CANDIDATE";
|
|
74
|
+
ELightGalleryType[ELightGalleryType["WALKTHROUGH"] = 8] = "WALKTHROUGH";
|
|
75
|
+
ELightGalleryType[ELightGalleryType["ACTOR"] = 9] = "ACTOR";
|
|
76
|
+
})(ELightGalleryType = exports.ELightGalleryType || (exports.ELightGalleryType = {}));
|
|
77
|
+
var EJobRemarkStatus;
|
|
78
|
+
(function (EJobRemarkStatus) {
|
|
79
|
+
EJobRemarkStatus[EJobRemarkStatus["ALL"] = 0] = "ALL";
|
|
80
|
+
EJobRemarkStatus[EJobRemarkStatus["OPEN"] = 1] = "OPEN";
|
|
81
|
+
EJobRemarkStatus[EJobRemarkStatus["RESOLVED"] = 2] = "RESOLVED";
|
|
82
|
+
EJobRemarkStatus[EJobRemarkStatus["REOPENED"] = 3] = "REOPENED";
|
|
83
|
+
})(EJobRemarkStatus = exports.EJobRemarkStatus || (exports.EJobRemarkStatus = {}));
|
|
84
|
+
var EJobRole;
|
|
85
|
+
(function (EJobRole) {
|
|
86
|
+
EJobRole[EJobRole["WRITER"] = 1] = "WRITER";
|
|
87
|
+
EJobRole[EJobRole["REVIEWER"] = 2] = "REVIEWER";
|
|
88
|
+
EJobRole[EJobRole["SENIOR_EDITOR"] = 3] = "SENIOR_EDITOR";
|
|
89
|
+
})(EJobRole = exports.EJobRole || (exports.EJobRole = {}));
|
|
90
|
+
const IsJobRecordQuestion = (record) => {
|
|
91
|
+
return !!record && typeof record === 'object' && 'question' in record;
|
|
92
|
+
};
|
|
93
|
+
exports.IsJobRecordQuestion = IsJobRecordQuestion;
|
|
94
|
+
const IsJobRecordMockTest = (record) => {
|
|
95
|
+
return !!record && typeof record === 'object' && 'title' in record;
|
|
96
|
+
};
|
|
97
|
+
exports.IsJobRecordMockTest = IsJobRecordMockTest;
|
|
98
|
+
const IsJobRecordStation = (record) => {
|
|
99
|
+
return !!record && typeof record === 'object' && 'question' in record;
|
|
100
|
+
};
|
|
101
|
+
exports.IsJobRecordStation = IsJobRecordStation;
|
|
102
|
+
const IsJobRecordChapter = (record) => {
|
|
103
|
+
return !!record && typeof record === 'object' && 'chapter' in record;
|
|
104
|
+
};
|
|
105
|
+
exports.IsJobRecordChapter = IsJobRecordChapter;
|
|
106
|
+
const IsJobRecordQuestionByType = (type, record) => {
|
|
107
|
+
return type === EJobType.QUESTION;
|
|
108
|
+
};
|
|
109
|
+
exports.IsJobRecordQuestionByType = IsJobRecordQuestionByType;
|
|
110
|
+
const IsJobRecordMockTestByType = (type, record) => {
|
|
111
|
+
return type === EJobType.MOCK_TEST;
|
|
112
|
+
};
|
|
113
|
+
exports.IsJobRecordMockTestByType = IsJobRecordMockTestByType;
|
|
114
|
+
const IsJobRecordStationByType = (type, record) => {
|
|
115
|
+
return type === EJobType.STATION;
|
|
116
|
+
};
|
|
117
|
+
exports.IsJobRecordStationByType = IsJobRecordStationByType;
|
|
118
|
+
const IsJobRecordChapterByType = (type, record) => {
|
|
119
|
+
return type === EJobType.CHAPTER;
|
|
120
|
+
};
|
|
121
|
+
exports.IsJobRecordChapterByType = IsJobRecordChapterByType;
|
|
122
|
+
const isExistingMockTestMeta = (metadata) => {
|
|
123
|
+
return (!!metadata &&
|
|
124
|
+
typeof metadata === 'object' &&
|
|
125
|
+
'mockTestId' in metadata &&
|
|
126
|
+
metadata.mockTestId !== null);
|
|
127
|
+
};
|
|
128
|
+
exports.isExistingMockTestMeta = isExistingMockTestMeta;
|
|
129
|
+
const isNewMockTestMeta = (metadata) => {
|
|
130
|
+
return !!metadata && typeof metadata === 'object' && 'typeId' in metadata;
|
|
131
|
+
};
|
|
132
|
+
exports.isNewMockTestMeta = isNewMockTestMeta;
|
package/models/User.d.ts
CHANGED
package/models/User.js
CHANGED
|
@@ -14,6 +14,7 @@ var IAccessLevel;
|
|
|
14
14
|
IAccessLevel["EXPIRED"] = "expired";
|
|
15
15
|
IAccessLevel["EDITOR"] = "editor";
|
|
16
16
|
IAccessLevel["MARKETING"] = "marketing";
|
|
17
|
+
IAccessLevel["WRITER"] = "writer";
|
|
17
18
|
})(IAccessLevel = exports.IAccessLevel || (exports.IAccessLevel = {}));
|
|
18
19
|
var ETheme;
|
|
19
20
|
(function (ETheme) {
|
package/models/index.d.ts
CHANGED
package/models/index.js
CHANGED
|
@@ -27,6 +27,7 @@ __exportStar(require("./Feedback"), exports);
|
|
|
27
27
|
__exportStar(require("./File"), exports);
|
|
28
28
|
__exportStar(require("./Highlight"), exports);
|
|
29
29
|
__exportStar(require("./Invoice"), exports);
|
|
30
|
+
__exportStar(require("./Job"), exports);
|
|
30
31
|
__exportStar(require("./Marksheet"), exports);
|
|
31
32
|
__exportStar(require("./MockTest"), exports);
|
|
32
33
|
__exportStar(require("./Note"), exports);
|
package/package.json
CHANGED
package/resolvers/constants.js
CHANGED
|
@@ -115,7 +115,7 @@ exports.productMapping = {
|
|
|
115
115
|
},
|
|
116
116
|
[models_1.EProductType.UCAT]: {
|
|
117
117
|
db: enums_1.DB_TYPE.UCAT,
|
|
118
|
-
topicType: [],
|
|
118
|
+
topicType: [models_1.ETopicType.UCAT],
|
|
119
119
|
mockType: [
|
|
120
120
|
models_1.EMockTestType.FULL_MOCK,
|
|
121
121
|
models_1.EMockTestType.VERBAL_REASONING,
|
|
@@ -18,6 +18,7 @@ __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);
|
|
21
22
|
__exportStar(require("./marksheet"), exports);
|
|
22
23
|
__exportStar(require("./mockTest"), exports);
|
|
23
24
|
__exportStar(require("./osce"), exports);
|
|
@@ -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,250 @@
|
|
|
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_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_REMARK_FRAGMENT = exports.JOB_USER_FRAGMENT = exports.JOB_FIELDS_FRAGMENT = exports.JOB_META_DATA_FRAGMENT = exports.JOB_STATUS_FRAGMENT = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
exports.JOB_STATUS_FRAGMENT = (0, client_1.gql) `
|
|
6
|
+
fragment JobStatus on Job {
|
|
7
|
+
status
|
|
8
|
+
}
|
|
9
|
+
`;
|
|
10
|
+
exports.JOB_META_DATA_FRAGMENT = (0, client_1.gql) `
|
|
11
|
+
fragment JobMetaData on JobMetaData {
|
|
12
|
+
productId
|
|
13
|
+
question {
|
|
14
|
+
typeId
|
|
15
|
+
conceptId
|
|
16
|
+
entitlementIds
|
|
17
|
+
}
|
|
18
|
+
mockTest {
|
|
19
|
+
mockTestId
|
|
20
|
+
typeId
|
|
21
|
+
title
|
|
22
|
+
passingMark
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
exports.JOB_FIELDS_FRAGMENT = (0, client_1.gql) `
|
|
27
|
+
${exports.JOB_META_DATA_FRAGMENT}
|
|
28
|
+
fragment JobFields on Job {
|
|
29
|
+
name
|
|
30
|
+
description
|
|
31
|
+
type
|
|
32
|
+
priority
|
|
33
|
+
totalRecords
|
|
34
|
+
dueDate
|
|
35
|
+
metadata {
|
|
36
|
+
...JobMetaData
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
exports.JOB_USER_FRAGMENT = (0, client_1.gql) `
|
|
41
|
+
fragment JobUser on User {
|
|
42
|
+
id
|
|
43
|
+
username
|
|
44
|
+
firstName
|
|
45
|
+
lastName
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
exports.JOB_REMARK_FRAGMENT = (0, client_1.gql) `
|
|
49
|
+
${exports.JOB_USER_FRAGMENT}
|
|
50
|
+
fragment JobRemark on JobRemark {
|
|
51
|
+
id
|
|
52
|
+
createdAt
|
|
53
|
+
jobId
|
|
54
|
+
status
|
|
55
|
+
remark
|
|
56
|
+
recordId
|
|
57
|
+
resolvedAt
|
|
58
|
+
createdByUser {
|
|
59
|
+
...JobUser
|
|
60
|
+
}
|
|
61
|
+
resolvedByUser {
|
|
62
|
+
...JobUser
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
`;
|
|
66
|
+
exports.JOB_RECORD_QUESTION_FRAGMENT = (0, client_1.gql) `
|
|
67
|
+
fragment JobRecordQuestion on JobRecordQuestion {
|
|
68
|
+
question
|
|
69
|
+
stem
|
|
70
|
+
conceptId
|
|
71
|
+
typeId
|
|
72
|
+
answer
|
|
73
|
+
entitlementIds
|
|
74
|
+
presentationIds
|
|
75
|
+
conditionIds
|
|
76
|
+
choices {
|
|
77
|
+
label
|
|
78
|
+
name
|
|
79
|
+
explanation
|
|
80
|
+
answer
|
|
81
|
+
}
|
|
82
|
+
learningPoint
|
|
83
|
+
explanation
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
exports.JOB_RECORD_CHAPTER_FRAGMENT = (0, client_1.gql) `
|
|
87
|
+
fragment JobRecordChapter on JobRecordChapter {
|
|
88
|
+
topic
|
|
89
|
+
concept
|
|
90
|
+
chapter
|
|
91
|
+
}
|
|
92
|
+
`;
|
|
93
|
+
exports.JOB_RECORD_STATION_FRAGMENT = (0, client_1.gql) `
|
|
94
|
+
fragment JobRecordStation on JobRecordStation {
|
|
95
|
+
question
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
exports.JOB_RECORD_MOCK_TEST_FRAGMENT = (0, client_1.gql) `
|
|
99
|
+
fragment JobRecordMockTest on JobRecordMockTest {
|
|
100
|
+
question
|
|
101
|
+
conceptId
|
|
102
|
+
typeId
|
|
103
|
+
answer
|
|
104
|
+
choices {
|
|
105
|
+
label
|
|
106
|
+
name
|
|
107
|
+
explanation
|
|
108
|
+
answer
|
|
109
|
+
}
|
|
110
|
+
learningPoint
|
|
111
|
+
explanation
|
|
112
|
+
}
|
|
113
|
+
`;
|
|
114
|
+
exports.JOB_RECORD_STATUS_FRAGMENT = (0, client_1.gql) `
|
|
115
|
+
fragment JobRecordStatus on JobRecord {
|
|
116
|
+
status
|
|
117
|
+
}
|
|
118
|
+
`;
|
|
119
|
+
exports.JOB_RECORD_FRAGMENT = (0, client_1.gql) `
|
|
120
|
+
${exports.JOB_REMARK_FRAGMENT}
|
|
121
|
+
${exports.JOB_RECORD_STATUS_FRAGMENT}
|
|
122
|
+
${exports.JOB_RECORD_QUESTION_FRAGMENT}
|
|
123
|
+
${exports.JOB_RECORD_CHAPTER_FRAGMENT}
|
|
124
|
+
${exports.JOB_RECORD_STATION_FRAGMENT}
|
|
125
|
+
${exports.JOB_RECORD_MOCK_TEST_FRAGMENT}
|
|
126
|
+
fragment JobRecord on JobRecord {
|
|
127
|
+
id
|
|
128
|
+
jobId
|
|
129
|
+
index
|
|
130
|
+
data {
|
|
131
|
+
... on JobRecordQuestion {
|
|
132
|
+
...JobRecordQuestion
|
|
133
|
+
}
|
|
134
|
+
... on JobRecordChapter {
|
|
135
|
+
...JobRecordChapter
|
|
136
|
+
}
|
|
137
|
+
... on JobRecordStation {
|
|
138
|
+
...JobRecordStation
|
|
139
|
+
}
|
|
140
|
+
... on JobRecordMockTest {
|
|
141
|
+
...JobRecordMockTest
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
remarks {
|
|
145
|
+
...JobRemark
|
|
146
|
+
}
|
|
147
|
+
questionId
|
|
148
|
+
stationId
|
|
149
|
+
chapterId
|
|
150
|
+
createdAt
|
|
151
|
+
updatedAt
|
|
152
|
+
publishedAt
|
|
153
|
+
...JobRecordStatus
|
|
154
|
+
}
|
|
155
|
+
`;
|
|
156
|
+
exports.JOB_MEMBER_FRAGMENT = (0, client_1.gql) `
|
|
157
|
+
${exports.JOB_USER_FRAGMENT}
|
|
158
|
+
fragment JobMember on JobMember {
|
|
159
|
+
id
|
|
160
|
+
createdAt
|
|
161
|
+
jobId
|
|
162
|
+
role
|
|
163
|
+
user {
|
|
164
|
+
...JobUser
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
`;
|
|
168
|
+
exports.JOB_ASSETS_FRAGMENT = (0, client_1.gql) `
|
|
169
|
+
${exports.JOB_USER_FRAGMENT}
|
|
170
|
+
fragment JobAssets on JobAsset {
|
|
171
|
+
id
|
|
172
|
+
jobId
|
|
173
|
+
recordId
|
|
174
|
+
index
|
|
175
|
+
type
|
|
176
|
+
choiceIdx
|
|
177
|
+
createdAt
|
|
178
|
+
picture {
|
|
179
|
+
id
|
|
180
|
+
thumbhash
|
|
181
|
+
name
|
|
182
|
+
caption
|
|
183
|
+
path
|
|
184
|
+
path512
|
|
185
|
+
path256
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
`;
|
|
189
|
+
exports.LIST_JOB_FRAGMENT = (0, client_1.gql) `
|
|
190
|
+
${exports.JOB_FIELDS_FRAGMENT}
|
|
191
|
+
${exports.JOB_STATUS_FRAGMENT}
|
|
192
|
+
fragment Job on Job {
|
|
193
|
+
id
|
|
194
|
+
updatedAt
|
|
195
|
+
createdAt
|
|
196
|
+
recordCount
|
|
197
|
+
resolvedCount
|
|
198
|
+
remarkCount
|
|
199
|
+
memberCount
|
|
200
|
+
chatCount
|
|
201
|
+
...JobFields
|
|
202
|
+
...JobStatus
|
|
203
|
+
}
|
|
204
|
+
`;
|
|
205
|
+
exports.LIMITED_JOB_FRAGMENT = (0, client_1.gql) `
|
|
206
|
+
${exports.LIST_JOB_FRAGMENT}
|
|
207
|
+
${exports.JOB_MEMBER_FRAGMENT}
|
|
208
|
+
${exports.JOB_ASSETS_FRAGMENT}
|
|
209
|
+
fragment LimitedJob on Job {
|
|
210
|
+
...Job
|
|
211
|
+
members {
|
|
212
|
+
...JobMember
|
|
213
|
+
}
|
|
214
|
+
assets {
|
|
215
|
+
...JobAssets
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
`;
|
|
219
|
+
exports.FULL_JOB_FRAGMENT = (0, client_1.gql) `
|
|
220
|
+
${exports.JOB_FIELDS_FRAGMENT}
|
|
221
|
+
${exports.JOB_STATUS_FRAGMENT}
|
|
222
|
+
${exports.JOB_RECORD_FRAGMENT}
|
|
223
|
+
${exports.JOB_REMARK_FRAGMENT}
|
|
224
|
+
${exports.JOB_MEMBER_FRAGMENT}
|
|
225
|
+
${exports.JOB_ASSETS_FRAGMENT}
|
|
226
|
+
fragment DetailedJob on Job {
|
|
227
|
+
id
|
|
228
|
+
updatedAt
|
|
229
|
+
createdAt
|
|
230
|
+
recordCount
|
|
231
|
+
resolvedCount
|
|
232
|
+
remarkCount
|
|
233
|
+
memberCount
|
|
234
|
+
chatCount
|
|
235
|
+
assets {
|
|
236
|
+
...JobAssets
|
|
237
|
+
}
|
|
238
|
+
records {
|
|
239
|
+
...JobRecord
|
|
240
|
+
}
|
|
241
|
+
remarks {
|
|
242
|
+
...JobRemark
|
|
243
|
+
}
|
|
244
|
+
members {
|
|
245
|
+
...JobMember
|
|
246
|
+
}
|
|
247
|
+
...JobFields
|
|
248
|
+
...JobStatus
|
|
249
|
+
}
|
|
250
|
+
`;
|
|
@@ -18,6 +18,7 @@ __exportStar(require("./ai"), exports);
|
|
|
18
18
|
__exportStar(require("./algoliaSync"), exports);
|
|
19
19
|
__exportStar(require("./content"), exports);
|
|
20
20
|
__exportStar(require("./database"), exports);
|
|
21
|
+
__exportStar(require("./job"), exports);
|
|
21
22
|
__exportStar(require("./notification"), exports);
|
|
22
23
|
__exportStar(require("./question"), exports);
|
|
23
24
|
__exportStar(require("./token"), exports);
|
|
@@ -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
|
+
`;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { RootData } from './../types';
|
|
2
2
|
export declare const CUSTOMER_PORTAL: import("@apollo/client").DocumentNode;
|
|
3
|
-
export type ICustomerPortalVar =
|
|
3
|
+
export type ICustomerPortalVar = {
|
|
4
|
+
returnUrl?: string;
|
|
5
|
+
};
|
|
4
6
|
export type ICustomerPortalData = RootData<string, 'customerPortal'>;
|
|
5
7
|
export interface IStripeLineItem {
|
|
6
8
|
price: string;
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.STRIPE_HOMEPAGE_CHECKOUT_SESSION = exports.CUSTOMER_PORTAL = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
exports.CUSTOMER_PORTAL = (0, client_1.gql) `
|
|
6
|
-
mutation CustomerPortal {
|
|
7
|
-
customerPortal
|
|
6
|
+
mutation CustomerPortal($returnUrl: String) {
|
|
7
|
+
customerPortal(returnUrl: $returnUrl)
|
|
8
8
|
}
|
|
9
9
|
`;
|
|
10
10
|
exports.STRIPE_HOMEPAGE_CHECKOUT_SESSION = (0, client_1.gql) `
|
|
@@ -2,6 +2,8 @@ export declare const CREATE_NEW_SUBSCRIPTION_CHECKOUT_SESSION: import("@apollo/c
|
|
|
2
2
|
export interface ICreateNewSubscriptionCheckoutSessionVar {
|
|
3
3
|
priceId: string;
|
|
4
4
|
additionalPriceId?: string;
|
|
5
|
+
successUrl?: string;
|
|
6
|
+
cancelUrl?: string;
|
|
5
7
|
}
|
|
6
8
|
export type ICreateNewSubscriptionCheckoutSessionData = {
|
|
7
9
|
validUserToken: {
|
|
@@ -12,6 +14,8 @@ export declare const CREATE_NEW_ONE_OFF_CHECKOUT_SESSION: import("@apollo/client
|
|
|
12
14
|
export interface ICreateNewOneOffCheckoutSessionVar {
|
|
13
15
|
priceId: string;
|
|
14
16
|
additionalPriceId?: string;
|
|
17
|
+
successUrl?: string;
|
|
18
|
+
cancelUrl?: string;
|
|
15
19
|
}
|
|
16
20
|
export type ICreateNewOneOffCheckoutSessionData = {
|
|
17
21
|
validUserToken: {
|
|
@@ -6,11 +6,15 @@ exports.CREATE_NEW_SUBSCRIPTION_CHECKOUT_SESSION = (0, client_1.gql) `
|
|
|
6
6
|
mutation CreateNewSubscriptionCheckoutSession(
|
|
7
7
|
$priceId: String!
|
|
8
8
|
$additionalPriceId: String
|
|
9
|
+
$successUrl: String
|
|
10
|
+
$cancelUrl: String
|
|
9
11
|
) {
|
|
10
12
|
validUserToken {
|
|
11
13
|
createNewSubscriptionCheckoutSession(
|
|
12
14
|
priceId: $priceId
|
|
13
15
|
additionalPriceId: $additionalPriceId
|
|
16
|
+
successUrl: $successUrl
|
|
17
|
+
cancelUrl: $cancelUrl
|
|
14
18
|
)
|
|
15
19
|
}
|
|
16
20
|
}
|
|
@@ -19,11 +23,15 @@ exports.CREATE_NEW_ONE_OFF_CHECKOUT_SESSION = (0, client_1.gql) `
|
|
|
19
23
|
mutation CreateNewOneOffCheckoutSession(
|
|
20
24
|
$priceId: String!
|
|
21
25
|
$additionalPriceId: String
|
|
26
|
+
$successUrl: String
|
|
27
|
+
$cancelUrl: String
|
|
22
28
|
) {
|
|
23
29
|
validUserToken {
|
|
24
30
|
createNewOneOffCheckoutSession(
|
|
25
31
|
priceId: $priceId
|
|
26
32
|
additionalPriceId: $additionalPriceId
|
|
33
|
+
successUrl: $successUrl
|
|
34
|
+
cancelUrl: $cancelUrl
|
|
27
35
|
)
|
|
28
36
|
}
|
|
29
37
|
}
|
|
@@ -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
|
+
`;
|