@quesmed/types-rn 2.6.175 → 2.6.177

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.
@@ -0,0 +1,46 @@
1
+ import { IJob, IJobRecord } from './Job';
2
+ import { Id } from './Type';
3
+ import { IUser } from './User';
4
+ export declare enum EAdminNotificationType {
5
+ ANNOUNCEMENT = 1,
6
+ FEATURE = 2,
7
+ JOB = 3,
8
+ RECORD = 4
9
+ }
10
+ export declare enum EAdminNotificationActionType {
11
+ FEATURE = 0,
12
+ INFORMATION = 1,
13
+ JOB_CREATED = 2,
14
+ JOB_SUBMITTED = 3,
15
+ JOB_REMARK = 4,
16
+ JOB_APPROVED = 5,
17
+ JOB_REJECTED = 6,
18
+ JOB_TESTING = 7,
19
+ JOB_PUBLISHED = 8,
20
+ JOB_REOPENED = 9,
21
+ RECORD_READY = 10,
22
+ RECORD_APPROVED = 11,
23
+ RECORD_REJECTED = 12,
24
+ RECORD_TESTING = 13,
25
+ RECORD_PUBLISHED = 14,
26
+ RECORD_REOPENED = 15
27
+ }
28
+ export interface IAdminNotification {
29
+ id: Id;
30
+ createdAt: number | Date;
31
+ readAt: null | number | Date;
32
+ deletedAt: number | Date;
33
+ userId: Id | null;
34
+ user?: IUser;
35
+ fromUserId: Id | null;
36
+ fromUser?: IUser;
37
+ recordId: IJobRecord['id'] | null;
38
+ record?: IJobRecord;
39
+ jobId: IJob['id'] | null;
40
+ job?: IJob;
41
+ description: string;
42
+ actionType: EAdminNotificationActionType;
43
+ type: EAdminNotificationType;
44
+ global: boolean;
45
+ read: boolean;
46
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EAdminNotificationActionType = exports.EAdminNotificationType = void 0;
4
+ var EAdminNotificationType;
5
+ (function (EAdminNotificationType) {
6
+ EAdminNotificationType[EAdminNotificationType["ANNOUNCEMENT"] = 1] = "ANNOUNCEMENT";
7
+ EAdminNotificationType[EAdminNotificationType["FEATURE"] = 2] = "FEATURE";
8
+ EAdminNotificationType[EAdminNotificationType["JOB"] = 3] = "JOB";
9
+ EAdminNotificationType[EAdminNotificationType["RECORD"] = 4] = "RECORD";
10
+ })(EAdminNotificationType = exports.EAdminNotificationType || (exports.EAdminNotificationType = {}));
11
+ var EAdminNotificationActionType;
12
+ (function (EAdminNotificationActionType) {
13
+ EAdminNotificationActionType[EAdminNotificationActionType["FEATURE"] = 0] = "FEATURE";
14
+ EAdminNotificationActionType[EAdminNotificationActionType["INFORMATION"] = 1] = "INFORMATION";
15
+ EAdminNotificationActionType[EAdminNotificationActionType["JOB_CREATED"] = 2] = "JOB_CREATED";
16
+ EAdminNotificationActionType[EAdminNotificationActionType["JOB_SUBMITTED"] = 3] = "JOB_SUBMITTED";
17
+ EAdminNotificationActionType[EAdminNotificationActionType["JOB_REMARK"] = 4] = "JOB_REMARK";
18
+ EAdminNotificationActionType[EAdminNotificationActionType["JOB_APPROVED"] = 5] = "JOB_APPROVED";
19
+ EAdminNotificationActionType[EAdminNotificationActionType["JOB_REJECTED"] = 6] = "JOB_REJECTED";
20
+ EAdminNotificationActionType[EAdminNotificationActionType["JOB_TESTING"] = 7] = "JOB_TESTING";
21
+ EAdminNotificationActionType[EAdminNotificationActionType["JOB_PUBLISHED"] = 8] = "JOB_PUBLISHED";
22
+ EAdminNotificationActionType[EAdminNotificationActionType["JOB_REOPENED"] = 9] = "JOB_REOPENED";
23
+ EAdminNotificationActionType[EAdminNotificationActionType["RECORD_READY"] = 10] = "RECORD_READY";
24
+ EAdminNotificationActionType[EAdminNotificationActionType["RECORD_APPROVED"] = 11] = "RECORD_APPROVED";
25
+ EAdminNotificationActionType[EAdminNotificationActionType["RECORD_REJECTED"] = 12] = "RECORD_REJECTED";
26
+ EAdminNotificationActionType[EAdminNotificationActionType["RECORD_TESTING"] = 13] = "RECORD_TESTING";
27
+ EAdminNotificationActionType[EAdminNotificationActionType["RECORD_PUBLISHED"] = 14] = "RECORD_PUBLISHED";
28
+ EAdminNotificationActionType[EAdminNotificationActionType["RECORD_REOPENED"] = 15] = "RECORD_REOPENED";
29
+ })(EAdminNotificationActionType = exports.EAdminNotificationActionType || (exports.EAdminNotificationActionType = {}));
package/models/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './AdminNotification';
1
2
  export * from './Author';
2
3
  export * from './Blog';
3
4
  export * from './Book';
package/models/index.js CHANGED
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./AdminNotification"), exports);
17
18
  __exportStar(require("./Author"), exports);
18
19
  __exportStar(require("./Blog"), exports);
19
20
  __exportStar(require("./Book"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.6.175",
3
+ "version": "2.6.177",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -1,5 +1,5 @@
1
1
  import { IJob, IJobChat, IJobMember, IJobRemark } from '../../../models';
2
- import { AdminData } from '../../types';
2
+ import { AdminData, graphqlNormalize } from '../../types';
3
3
  export declare const CREATE_JOB: import("@apollo/client").DocumentNode;
4
4
  export type ICreateJobInput = {
5
5
  name: IJob['name'];
@@ -15,25 +15,25 @@ export type ICreateJobInput = {
15
15
  export type ICreateJobVar = {
16
16
  input: ICreateJobInput;
17
17
  };
18
- export type ICreateJobData = AdminData<IJob, 'createJob'>;
18
+ export type ICreateJobData = AdminData<graphqlNormalize & IJob, 'createJob'>;
19
19
  export declare const UPDATE_JOB: import("@apollo/client").DocumentNode;
20
20
  export type IUpdateJobVar = {
21
21
  id: IJob['id'];
22
22
  input: Partial<ICreateJobInput>;
23
23
  };
24
- export type IUpdateJobData = AdminData<IJob, 'updateJob'>;
24
+ export type IUpdateJobData = AdminData<graphqlNormalize & IJob, 'updateJob'>;
25
25
  export declare const DUPLICATE_JOB: import("@apollo/client").DocumentNode;
26
26
  export type IDuplicateJobVar = {
27
27
  id: IJob['id'];
28
28
  };
29
- export type IDuplicateJobData = AdminData<IJob, 'duplicateJob'>;
29
+ export type IDuplicateJobData = AdminData<graphqlNormalize & IJob, 'duplicateJob'>;
30
30
  export declare const UPDATE_JOB_STATUS: import("@apollo/client").DocumentNode;
31
31
  export type IUpdateJobStatusVar = {
32
32
  id: IJob['id'];
33
33
  status: IJob['status'];
34
34
  statusOnly?: boolean;
35
35
  };
36
- export type IUpdateJobStatusData = AdminData<IJob, 'updateJobStatus'>;
36
+ export type IUpdateJobStatusData = AdminData<graphqlNormalize & IJob, 'updateJobStatus'>;
37
37
  export declare const DELETE_JOB: import("@apollo/client").DocumentNode;
38
38
  export type IDeleteJobVar = {
39
39
  id: IJob['id'];
@@ -45,13 +45,13 @@ export type ICreateJobRemarkVar = {
45
45
  recordId?: IJobRemark['recordId'];
46
46
  };
47
47
  };
48
- export type ICreateJobRemarkData = AdminData<IJobRemark, 'createJobRemark'>;
48
+ export type ICreateJobRemarkData = AdminData<graphqlNormalize & IJobRemark, 'createJobRemark'>;
49
49
  export declare const UPDATE_JOB_REMARK: import("@apollo/client").DocumentNode;
50
50
  export type IUpdateJobRemarkVar = {
51
51
  id: IJobRemark['id'];
52
52
  input: Partial<Pick<IJobRemark, 'remark' | 'resolvedBy' | 'status' | 'resolvedAt'>>;
53
53
  };
54
- export type IUpdateJobRemarkData = AdminData<IJobRemark, 'updateJobRemark'>;
54
+ export type IUpdateJobRemarkData = AdminData<graphqlNormalize & IJobRemark, 'updateJobRemark'>;
55
55
  export declare const DELETE_JOB_REMARK: import("@apollo/client").DocumentNode;
56
56
  export type IDeleteJobRemarkVar = {
57
57
  id: IJobRemark['id'];
@@ -61,7 +61,7 @@ export declare const CREATE_JOB_CHAT: import("@apollo/client").DocumentNode;
61
61
  export type ICreateJobChatVar = {
62
62
  input: Pick<IJobChat, 'jobId' | 'message' | 'userId'>;
63
63
  };
64
- export type ICreateJobChatData = AdminData<IJobChat, 'createJobChat'>;
64
+ export type ICreateJobChatData = AdminData<graphqlNormalize & IJobChat, 'createJobChat'>;
65
65
  export declare const DELETE_JOB_CHAT: import("@apollo/client").DocumentNode;
66
66
  export type IDeleteJobChatVar = {
67
67
  id: IJobChat['id'];
@@ -1,5 +1,5 @@
1
1
  import { IJobRecord, IJobRecordChapter, IJobRecordMockTest, IJobRecordQuestion, IJobRecordStation } from '../../../models';
2
- import { AdminData } from '../../types';
2
+ import { AdminData, graphqlNormalize } from '../../types';
3
3
  export declare const CREATE_JOB_RECORD: import("@apollo/client").DocumentNode;
4
4
  export type ICreateJobRecordVar = {
5
5
  input: {
@@ -16,7 +16,7 @@ export type ICreateJobRecordVar = {
16
16
  } | null;
17
17
  };
18
18
  };
19
- export type ICreateJobRecordData = AdminData<IJobRecord, 'createJobRecord'>;
19
+ export type ICreateJobRecordData = AdminData<graphqlNormalize & IJobRecord, 'createJobRecord'>;
20
20
  export declare const DELETE_JOB_RECORD: import("@apollo/client").DocumentNode;
21
21
  export type IDeleteJobRecordVar = {
22
22
  id: IJobRecord['id'];
@@ -36,15 +36,15 @@ export type IUpdateJobRecordVar = {
36
36
  mockTest: Partial<IJobRecordMockTest>;
37
37
  } | null;
38
38
  };
39
- export type IUpdateJobRecordData = AdminData<IJobRecord, 'updateJobRecord'>;
39
+ export type IUpdateJobRecordData = AdminData<graphqlNormalize & IJobRecord, 'updateJobRecord'>;
40
40
  export declare const DUPLICATE_JOB_RECORD: import("@apollo/client").DocumentNode;
41
41
  export type IDuplicateJobRecordVar = {
42
42
  id: IJobRecord['id'];
43
43
  };
44
- export type IDuplicateJobRecordData = AdminData<IJobRecord, 'duplicateJobRecord'>;
44
+ export type IDuplicateJobRecordData = AdminData<graphqlNormalize & IJobRecord, 'duplicateJobRecord'>;
45
45
  export declare const UPDATE_JOB_RECORD_STATUS: import("@apollo/client").DocumentNode;
46
46
  export type IUpdateJobRecordStatusVar = {
47
47
  ids: IJobRecord['id'][];
48
48
  status: IJobRecord['status'];
49
49
  };
50
- export type IUpdateJobRecordStatusData = AdminData<IJobRecord[], 'updateJobRecordStatus'>;
50
+ export type IUpdateJobRecordStatusData = AdminData<(graphqlNormalize & IJobRecord)[], 'updateJobRecordStatus'>;
@@ -1,10 +1,11 @@
1
1
  import { EJobStatus, IJob, IJobChat, IJobRemark } from '../../../models';
2
- import { AdminData } from '../../types';
2
+ import { DB_TYPE } from '../../enums';
3
+ import { AdminData, graphqlNormalize } from '../../types';
3
4
  export declare const GET_JOB: import("@apollo/client").DocumentNode;
4
5
  export type IGetJobVar = {
5
6
  id: IJob['id'];
6
7
  };
7
- export type IGetJobData = AdminData<IJob, 'getJob'>;
8
+ export type IGetJobData = AdminData<graphqlNormalize & IJob, 'getJob'>;
8
9
  export declare const GET_JOBS: import("@apollo/client").DocumentNode;
9
10
  export type IGetJobsVar = {
10
11
  filter: {
@@ -13,11 +14,12 @@ export type IGetJobsVar = {
13
14
  priority?: IJob['priority'];
14
15
  searchText?: string;
15
16
  memberIds?: number[];
17
+ dbType: DB_TYPE;
16
18
  };
17
19
  page: number;
18
20
  take: number;
19
21
  };
20
- export type IGetJobsData = AdminData<{
22
+ export type IGetJobsData = AdminData<graphqlNormalize & {
21
23
  results: IJob[];
22
24
  total: number;
23
25
  counts: Array<{
@@ -29,7 +31,7 @@ export declare const GET_JOB_REMARKS: import("@apollo/client").DocumentNode;
29
31
  export type IGetJobRemarksVar = {
30
32
  jobId: IJob['id'];
31
33
  };
32
- export type IGetJobRemarksData = AdminData<IJobRemark[], 'getJobRemarks'>;
34
+ export type IGetJobRemarksData = AdminData<(graphqlNormalize & IJobRemark)[], 'getJobRemarks'>;
33
35
  export declare const GET_JOB_CHATS: import("@apollo/client").DocumentNode;
34
36
  export type IGetJobChatsVar = {
35
37
  jobId: IJob['id'];
@@ -39,4 +41,4 @@ export type IJobChatList = {
39
41
  date: Date | number;
40
42
  total: number;
41
43
  };
42
- export type IGetJobChatsData = AdminData<IJobChatList[], 'getJobChats'>;
44
+ export type IGetJobChatsData = AdminData<(graphqlNormalize & IJobChatList)[], 'getJobChats'>;
@@ -1,5 +1,5 @@
1
1
  import { EJobAttemptType, IJob, IJobRecord, Id } from '../../../models';
2
- import { AdminData } from '../../types';
2
+ import { AdminData, graphqlNormalize } from '../../types';
3
3
  export declare const GET_JOB_RECORDS: import("@apollo/client").DocumentNode;
4
4
  export interface IJobRecordsFilter {
5
5
  attemptType: EJobAttemptType;
@@ -8,12 +8,12 @@ export type IGetJobRecordsVar = {
8
8
  jobId: IJob['id'];
9
9
  filter: IJobRecordsFilter;
10
10
  };
11
- export type IGetJobRecordsData = AdminData<IJobRecord[], 'getJobRecords'>;
11
+ export type IGetJobRecordsData = AdminData<(graphqlNormalize & IJobRecord)[], 'getJobRecords'>;
12
12
  export declare const GET_JOB_RECORD: import("@apollo/client").DocumentNode;
13
13
  export type IGetJobRecordVar = {
14
14
  id: IJobRecord['id'];
15
15
  };
16
- export type IGetJobRecordData = AdminData<IJobRecord, 'getJobRecord'>;
16
+ export type IGetJobRecordData = AdminData<graphqlNormalize & IJobRecord, 'getJobRecord'>;
17
17
  export type IGetIdDetailsVar = {
18
18
  ids: Array<Id>;
19
19
  table: string;