@quesmed/types 2.6.170 → 2.6.171

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.
@@ -27,6 +27,15 @@ export declare enum EJobType {
27
27
  CHAPTER = 3,
28
28
  MOCK_TEST = 4
29
29
  }
30
+ export declare enum EJobHistoryType {
31
+ ALL = "ALL",
32
+ JOB = "JOB",
33
+ RECORD = "RECORD",
34
+ CHAT = "CHAT",
35
+ MEMBER = "MEMBER",
36
+ ASSET = "ASSET",
37
+ REMARK = "REMARK"
38
+ }
30
39
  export declare enum EJobRecordStatus {
31
40
  ALL = 0,
32
41
  DRAFT = 1,
@@ -138,6 +147,8 @@ export interface IJobRecord {
138
147
  publishedAt: Date | number | null;
139
148
  createdAt: Date | number;
140
149
  updatedAt: Date | number;
150
+ createdBy: IUser['id'];
151
+ createdByUser: Pick<IUser, 'id' | 'firstName' | 'lastName' | 'username' | 'accessLevel'>;
141
152
  questionId: number | null;
142
153
  stationId: number | null;
143
154
  chapterId: number | null;
@@ -169,6 +180,18 @@ export interface IJobChat {
169
180
  createdAt: Date | number;
170
181
  updatedAt: Date | number;
171
182
  }
183
+ export interface IJobHistory {
184
+ id: number;
185
+ type: EJobHistoryType;
186
+ action: string;
187
+ data: any | null;
188
+ description: string | null;
189
+ jobId: IJob['id'];
190
+ recordId: IJobRecord['id'] | null;
191
+ userId: IUser['id'] | null;
192
+ createdAt: Date | number;
193
+ updatedAt: Date | number;
194
+ }
172
195
  export interface IJob {
173
196
  id: string;
174
197
  name: string;
@@ -193,6 +216,7 @@ export interface IJob {
193
216
  assets: IJobAsset[];
194
217
  records: IJobRecord[];
195
218
  chats: IJobChat[];
219
+ history: IJobHistory[];
196
220
  createdByUser: Pick<IUser, 'id' | 'firstName' | 'lastName' | 'username'>;
197
221
  }
198
222
  export declare const IsJobRecordQuestion: (record: IJobRecord['data']) => record is IJobRecordQuestion;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isNewMockTestMeta = exports.isExistingMockTestMeta = exports.IsJobRecordChapterByType = exports.IsJobRecordStationByType = exports.IsJobRecordMockTestByType = exports.IsJobRecordQuestionByType = exports.IsJobRecordChapter = exports.IsJobRecordStation = exports.IsJobRecordMockTest = exports.IsJobRecordQuestion = exports.EJobRole = exports.EJobRemarkStatus = exports.ELightGalleryType = exports.EJobRecordStatus = exports.EJobType = exports.EJobStatus = exports.EJobPriority = void 0;
3
+ exports.isNewMockTestMeta = exports.isExistingMockTestMeta = exports.IsJobRecordChapterByType = exports.IsJobRecordStationByType = exports.IsJobRecordMockTestByType = exports.IsJobRecordQuestionByType = exports.IsJobRecordChapter = exports.IsJobRecordStation = exports.IsJobRecordMockTest = exports.IsJobRecordQuestion = exports.EJobRole = exports.EJobRemarkStatus = exports.ELightGalleryType = exports.EJobRecordStatus = exports.EJobHistoryType = exports.EJobType = exports.EJobStatus = exports.EJobPriority = void 0;
4
4
  var EJobPriority;
5
5
  (function (EJobPriority) {
6
6
  EJobPriority[EJobPriority["LOW"] = 1] = "LOW";
@@ -37,6 +37,16 @@ var EJobType;
37
37
  EJobType[EJobType["CHAPTER"] = 3] = "CHAPTER";
38
38
  EJobType[EJobType["MOCK_TEST"] = 4] = "MOCK_TEST";
39
39
  })(EJobType = exports.EJobType || (exports.EJobType = {}));
40
+ var EJobHistoryType;
41
+ (function (EJobHistoryType) {
42
+ EJobHistoryType["ALL"] = "ALL";
43
+ EJobHistoryType["JOB"] = "JOB";
44
+ EJobHistoryType["RECORD"] = "RECORD";
45
+ EJobHistoryType["CHAT"] = "CHAT";
46
+ EJobHistoryType["MEMBER"] = "MEMBER";
47
+ EJobHistoryType["ASSET"] = "ASSET";
48
+ EJobHistoryType["REMARK"] = "REMARK";
49
+ })(EJobHistoryType = exports.EJobHistoryType || (exports.EJobHistoryType = {}));
40
50
  var EJobRecordStatus;
41
51
  (function (EJobRecordStatus) {
42
52
  EJobRecordStatus[EJobRecordStatus["ALL"] = 0] = "ALL";
@@ -4,6 +4,7 @@ export declare const JOB_FIELDS_FRAGMENT: import("@apollo/client").DocumentNode;
4
4
  export declare const JOB_USER_FRAGMENT: import("@apollo/client").DocumentNode;
5
5
  export declare const JOB_CHAT_FRAGMENT: import("@apollo/client").DocumentNode;
6
6
  export declare const JOB_REMARK_FRAGMENT: import("@apollo/client").DocumentNode;
7
+ export declare const JOB_HISTORY_FRAGMENT: import("@apollo/client").DocumentNode;
7
8
  export declare const JOB_RECORD_QUESTION_FRAGMENT: import("@apollo/client").DocumentNode;
8
9
  export declare const JOB_RECORD_CHAPTER_FRAGMENT: import("@apollo/client").DocumentNode;
9
10
  export declare const JOB_RECORD_STATION_FRAGMENT: import("@apollo/client").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FULL_JOB_FRAGMENT = exports.LIMITED_JOB_FRAGMENT = exports.LIST_JOB_FRAGMENT = exports.JOB_ASSETS_FRAGMENT = exports.JOB_MEMBER_FRAGMENT = exports.JOB_RECORD_FRAGMENT = exports.JOB_RECORD_STATUS_FRAGMENT = exports.JOB_RECORD_MOCK_TEST_FRAGMENT = exports.JOB_RECORD_STATION_FRAGMENT = exports.JOB_RECORD_CHAPTER_FRAGMENT = exports.JOB_RECORD_QUESTION_FRAGMENT = exports.JOB_REMARK_FRAGMENT = exports.JOB_CHAT_FRAGMENT = exports.JOB_USER_FRAGMENT = exports.JOB_FIELDS_FRAGMENT = exports.JOB_META_DATA_FRAGMENT = exports.JOB_STATUS_FRAGMENT = void 0;
3
+ exports.FULL_JOB_FRAGMENT = exports.LIMITED_JOB_FRAGMENT = exports.LIST_JOB_FRAGMENT = exports.JOB_ASSETS_FRAGMENT = exports.JOB_MEMBER_FRAGMENT = exports.JOB_RECORD_FRAGMENT = exports.JOB_RECORD_STATUS_FRAGMENT = exports.JOB_RECORD_MOCK_TEST_FRAGMENT = exports.JOB_RECORD_STATION_FRAGMENT = exports.JOB_RECORD_CHAPTER_FRAGMENT = exports.JOB_RECORD_QUESTION_FRAGMENT = exports.JOB_HISTORY_FRAGMENT = exports.JOB_REMARK_FRAGMENT = exports.JOB_CHAT_FRAGMENT = exports.JOB_USER_FRAGMENT = exports.JOB_FIELDS_FRAGMENT = exports.JOB_META_DATA_FRAGMENT = exports.JOB_STATUS_FRAGMENT = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  exports.JOB_STATUS_FRAGMENT = (0, client_1.gql) `
6
6
  fragment JobStatus on Job {
@@ -44,6 +44,7 @@ exports.JOB_USER_FRAGMENT = (0, client_1.gql) `
44
44
  username
45
45
  firstName
46
46
  lastName
47
+ accessLevel
47
48
  }
48
49
  `;
49
50
  exports.JOB_CHAT_FRAGMENT = (0, client_1.gql) `
@@ -77,6 +78,23 @@ exports.JOB_REMARK_FRAGMENT = (0, client_1.gql) `
77
78
  }
78
79
  }
79
80
  `;
81
+ exports.JOB_HISTORY_FRAGMENT = (0, client_1.gql) `
82
+ ${exports.JOB_USER_FRAGMENT}
83
+ fragment JobHistory on JobHistory {
84
+ id
85
+ createdAt
86
+ updatedAt
87
+ type
88
+ action
89
+ data
90
+ description
91
+ jobId
92
+ recordId
93
+ user {
94
+ ...JobUser
95
+ }
96
+ }
97
+ `;
80
98
  exports.JOB_RECORD_QUESTION_FRAGMENT = (0, client_1.gql) `
81
99
  fragment JobRecordQuestion on JobRecordQuestion {
82
100
  question
@@ -163,6 +181,9 @@ exports.JOB_RECORD_FRAGMENT = (0, client_1.gql) `
163
181
  remarks {
164
182
  ...JobRemark
165
183
  }
184
+ createdByUser {
185
+ ...JobUser
186
+ }
166
187
  questionId
167
188
  stationId
168
189
  chapterId
@@ -230,6 +251,7 @@ exports.LIMITED_JOB_FRAGMENT = (0, client_1.gql) `
230
251
  ${exports.LIST_JOB_FRAGMENT}
231
252
  ${exports.JOB_MEMBER_FRAGMENT}
232
253
  ${exports.JOB_ASSETS_FRAGMENT}
254
+ ${exports.JOB_HISTORY_FRAGMENT}
233
255
  fragment LimitedJob on Job {
234
256
  ...Job
235
257
  members {
@@ -238,6 +260,9 @@ exports.LIMITED_JOB_FRAGMENT = (0, client_1.gql) `
238
260
  assets {
239
261
  ...JobAssets
240
262
  }
263
+ history {
264
+ ...JobHistory
265
+ }
241
266
  }
242
267
  `;
243
268
  exports.FULL_JOB_FRAGMENT = (0, client_1.gql) `
@@ -27,6 +27,15 @@ export declare enum EJobType {
27
27
  CHAPTER = 3,
28
28
  MOCK_TEST = 4
29
29
  }
30
+ export declare enum EJobHistoryType {
31
+ ALL = "ALL",
32
+ JOB = "JOB",
33
+ RECORD = "RECORD",
34
+ CHAT = "CHAT",
35
+ MEMBER = "MEMBER",
36
+ ASSET = "ASSET",
37
+ REMARK = "REMARK"
38
+ }
30
39
  export declare enum EJobRecordStatus {
31
40
  ALL = 0,
32
41
  DRAFT = 1,
@@ -138,6 +147,8 @@ export interface IJobRecord {
138
147
  publishedAt: Date | number | null;
139
148
  createdAt: Date | number;
140
149
  updatedAt: Date | number;
150
+ createdBy: IUser['id'];
151
+ createdByUser: Pick<IUser, 'id' | 'firstName' | 'lastName' | 'username' | 'accessLevel'>;
141
152
  questionId: number | null;
142
153
  stationId: number | null;
143
154
  chapterId: number | null;
@@ -169,6 +180,18 @@ export interface IJobChat {
169
180
  createdAt: Date | number;
170
181
  updatedAt: Date | number;
171
182
  }
183
+ export interface IJobHistory {
184
+ id: number;
185
+ type: EJobHistoryType;
186
+ action: string;
187
+ data: any | null;
188
+ description: string | null;
189
+ jobId: IJob['id'];
190
+ recordId: IJobRecord['id'] | null;
191
+ userId: IUser['id'] | null;
192
+ createdAt: Date | number;
193
+ updatedAt: Date | number;
194
+ }
172
195
  export interface IJob {
173
196
  id: string;
174
197
  name: string;
@@ -193,6 +216,7 @@ export interface IJob {
193
216
  assets: IJobAsset[];
194
217
  records: IJobRecord[];
195
218
  chats: IJobChat[];
219
+ history: IJobHistory[];
196
220
  createdByUser: Pick<IUser, 'id' | 'firstName' | 'lastName' | 'username'>;
197
221
  }
198
222
  export declare const IsJobRecordQuestion: (record: IJobRecord['data']) => record is IJobRecordQuestion;
@@ -34,6 +34,16 @@ export var EJobType;
34
34
  EJobType[EJobType["CHAPTER"] = 3] = "CHAPTER";
35
35
  EJobType[EJobType["MOCK_TEST"] = 4] = "MOCK_TEST";
36
36
  })(EJobType || (EJobType = {}));
37
+ export var EJobHistoryType;
38
+ (function (EJobHistoryType) {
39
+ EJobHistoryType["ALL"] = "ALL";
40
+ EJobHistoryType["JOB"] = "JOB";
41
+ EJobHistoryType["RECORD"] = "RECORD";
42
+ EJobHistoryType["CHAT"] = "CHAT";
43
+ EJobHistoryType["MEMBER"] = "MEMBER";
44
+ EJobHistoryType["ASSET"] = "ASSET";
45
+ EJobHistoryType["REMARK"] = "REMARK";
46
+ })(EJobHistoryType || (EJobHistoryType = {}));
37
47
  export var EJobRecordStatus;
38
48
  (function (EJobRecordStatus) {
39
49
  EJobRecordStatus[EJobRecordStatus["ALL"] = 0] = "ALL";
@@ -4,6 +4,7 @@ export declare const JOB_FIELDS_FRAGMENT: import("@apollo/client").DocumentNode;
4
4
  export declare const JOB_USER_FRAGMENT: import("@apollo/client").DocumentNode;
5
5
  export declare const JOB_CHAT_FRAGMENT: import("@apollo/client").DocumentNode;
6
6
  export declare const JOB_REMARK_FRAGMENT: import("@apollo/client").DocumentNode;
7
+ export declare const JOB_HISTORY_FRAGMENT: import("@apollo/client").DocumentNode;
7
8
  export declare const JOB_RECORD_QUESTION_FRAGMENT: import("@apollo/client").DocumentNode;
8
9
  export declare const JOB_RECORD_CHAPTER_FRAGMENT: import("@apollo/client").DocumentNode;
9
10
  export declare const JOB_RECORD_STATION_FRAGMENT: import("@apollo/client").DocumentNode;
@@ -41,6 +41,7 @@ export const JOB_USER_FRAGMENT = gql `
41
41
  username
42
42
  firstName
43
43
  lastName
44
+ accessLevel
44
45
  }
45
46
  `;
46
47
  export const JOB_CHAT_FRAGMENT = gql `
@@ -74,6 +75,23 @@ export const JOB_REMARK_FRAGMENT = gql `
74
75
  }
75
76
  }
76
77
  `;
78
+ export const JOB_HISTORY_FRAGMENT = gql `
79
+ ${JOB_USER_FRAGMENT}
80
+ fragment JobHistory on JobHistory {
81
+ id
82
+ createdAt
83
+ updatedAt
84
+ type
85
+ action
86
+ data
87
+ description
88
+ jobId
89
+ recordId
90
+ user {
91
+ ...JobUser
92
+ }
93
+ }
94
+ `;
77
95
  export const JOB_RECORD_QUESTION_FRAGMENT = gql `
78
96
  fragment JobRecordQuestion on JobRecordQuestion {
79
97
  question
@@ -160,6 +178,9 @@ export const JOB_RECORD_FRAGMENT = gql `
160
178
  remarks {
161
179
  ...JobRemark
162
180
  }
181
+ createdByUser {
182
+ ...JobUser
183
+ }
163
184
  questionId
164
185
  stationId
165
186
  chapterId
@@ -227,6 +248,7 @@ export const LIMITED_JOB_FRAGMENT = gql `
227
248
  ${LIST_JOB_FRAGMENT}
228
249
  ${JOB_MEMBER_FRAGMENT}
229
250
  ${JOB_ASSETS_FRAGMENT}
251
+ ${JOB_HISTORY_FRAGMENT}
230
252
  fragment LimitedJob on Job {
231
253
  ...Job
232
254
  members {
@@ -235,6 +257,9 @@ export const LIMITED_JOB_FRAGMENT = gql `
235
257
  assets {
236
258
  ...JobAssets
237
259
  }
260
+ history {
261
+ ...JobHistory
262
+ }
238
263
  }
239
264
  `;
240
265
  export const FULL_JOB_FRAGMENT = gql `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.170",
3
+ "version": "2.6.171",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",