@quesmed/types 2.6.167 → 2.6.169

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.
@@ -16,8 +16,8 @@ export declare enum EJobStatus {
16
16
  REJECTED = 4,
17
17
  APPROVED = 5,
18
18
  TESTING = 6,
19
- PUBLISHED = 7,
20
- PARTIAL_TRIALING = 8,
19
+ PARTIAL_TRIALING = 7,
20
+ PUBLISHED = 8,
21
21
  CLOSED = 9
22
22
  }
23
23
  export declare enum EJobType {
@@ -93,6 +93,7 @@ export interface IJobAsset {
93
93
  export interface IJobRecordQuestion {
94
94
  question: string;
95
95
  stem?: string | null;
96
+ stemFromRecordId?: IJobRecord['id'] | null;
96
97
  conceptId?: number | null;
97
98
  explanation?: string | null;
98
99
  learningPoint?: string | null;
@@ -145,10 +146,12 @@ export interface IJobMetaData {
145
146
  productId: EProductType;
146
147
  mockTest?: {
147
148
  mockTestId: number;
149
+ isNew: boolean;
148
150
  } | {
149
151
  typeId: EMockTestType;
150
152
  title: string;
151
153
  passingMark: number;
154
+ isNew: boolean;
152
155
  } | null;
153
156
  question?: {
154
157
  typeId: EQuestionType | null;
@@ -156,6 +159,15 @@ export interface IJobMetaData {
156
159
  entitlementIds: EEntitlementType[] | null;
157
160
  } | null;
158
161
  }
162
+ export interface IJobChat {
163
+ id: string;
164
+ jobId: IJob['id'];
165
+ userId: IUser['id'];
166
+ user: Pick<IUser, 'id' | 'firstName' | 'lastName' | 'username' | 'accessLevel'>;
167
+ message: string;
168
+ createdAt: Date | number;
169
+ updatedAt: Date | number;
170
+ }
159
171
  export interface IJob {
160
172
  id: string;
161
173
  name: string;
@@ -179,6 +191,7 @@ export interface IJob {
179
191
  members: IJobMember[];
180
192
  assets: IJobAsset[];
181
193
  records: IJobRecord[];
194
+ chats: IJobChat[];
182
195
  createdByUser: Pick<IUser, 'id' | 'firstName' | 'lastName' | 'username'>;
183
196
  }
184
197
  export declare const IsJobRecordQuestion: (record: IJobRecord['data']) => record is IJobRecordQuestion;
@@ -191,9 +204,11 @@ export declare const IsJobRecordStationByType: (type: EJobType, record: IJobReco
191
204
  export declare const IsJobRecordChapterByType: (type: EJobType, record: IJobRecord['data']) => record is IJobRecordChapter;
192
205
  export declare const isExistingMockTestMeta: (metadata: IJobMetaData['mockTest']) => metadata is {
193
206
  mockTestId: number;
207
+ isNew: false;
194
208
  };
195
209
  export declare const isNewMockTestMeta: (metadata: IJobMetaData['mockTest']) => metadata is {
196
210
  typeId: EMockTestType;
197
211
  title: string;
198
212
  passingMark: number;
213
+ isNew: true;
199
214
  };
@@ -22,10 +22,10 @@ var EJobStatus;
22
22
  EJobStatus[EJobStatus["APPROVED"] = 5] = "APPROVED";
23
23
  //In QA, testing, or limited release
24
24
  EJobStatus[EJobStatus["TESTING"] = 6] = "TESTING";
25
- // Final version is live and visible
26
- EJobStatus[EJobStatus["PUBLISHED"] = 7] = "PUBLISHED";
27
25
  //Partial batch, some content is live
28
- EJobStatus[EJobStatus["PARTIAL_TRIALING"] = 8] = "PARTIAL_TRIALING";
26
+ EJobStatus[EJobStatus["PARTIAL_TRIALING"] = 7] = "PARTIAL_TRIALING";
27
+ // Final version is live and visible
28
+ EJobStatus[EJobStatus["PUBLISHED"] = 8] = "PUBLISHED";
29
29
  //Closed, revision not allowed
30
30
  EJobStatus[EJobStatus["CLOSED"] = 9] = "CLOSED";
31
31
  })(EJobStatus = exports.EJobStatus || (exports.EJobStatus = {}));
@@ -123,13 +123,10 @@ const IsJobRecordChapterByType = (type, record) => {
123
123
  };
124
124
  exports.IsJobRecordChapterByType = IsJobRecordChapterByType;
125
125
  const isExistingMockTestMeta = (metadata) => {
126
- return (!!metadata &&
127
- typeof metadata === 'object' &&
128
- 'mockTestId' in metadata &&
129
- metadata.mockTestId !== null);
126
+ return !!metadata && typeof metadata === 'object' && metadata.isNew === false;
130
127
  };
131
128
  exports.isExistingMockTestMeta = isExistingMockTestMeta;
132
129
  const isNewMockTestMeta = (metadata) => {
133
- return !!metadata && typeof metadata === 'object' && 'typeId' in metadata;
130
+ return !!metadata && typeof metadata === 'object' && metadata.isNew === true;
134
131
  };
135
132
  exports.isNewMockTestMeta = isNewMockTestMeta;
@@ -2,6 +2,7 @@ export declare const JOB_STATUS_FRAGMENT: import("@apollo/client").DocumentNode;
2
2
  export declare const JOB_META_DATA_FRAGMENT: import("@apollo/client").DocumentNode;
3
3
  export declare const JOB_FIELDS_FRAGMENT: import("@apollo/client").DocumentNode;
4
4
  export declare const JOB_USER_FRAGMENT: import("@apollo/client").DocumentNode;
5
+ export declare const JOB_CHAT_FRAGMENT: import("@apollo/client").DocumentNode;
5
6
  export declare const JOB_REMARK_FRAGMENT: import("@apollo/client").DocumentNode;
6
7
  export declare const JOB_RECORD_QUESTION_FRAGMENT: import("@apollo/client").DocumentNode;
7
8
  export declare const JOB_RECORD_CHAPTER_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_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_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 {
@@ -18,6 +18,7 @@ exports.JOB_META_DATA_FRAGMENT = (0, client_1.gql) `
18
18
  mockTest {
19
19
  mockTestId
20
20
  typeId
21
+ isNew
21
22
  title
22
23
  passingMark
23
24
  }
@@ -45,6 +46,19 @@ exports.JOB_USER_FRAGMENT = (0, client_1.gql) `
45
46
  lastName
46
47
  }
47
48
  `;
49
+ exports.JOB_CHAT_FRAGMENT = (0, client_1.gql) `
50
+ ${exports.JOB_USER_FRAGMENT}
51
+ fragment JobChat on JobChat {
52
+ id
53
+ jobId
54
+ message
55
+ createdAt
56
+ updatedAt
57
+ user {
58
+ ...JobUser
59
+ }
60
+ }
61
+ `;
48
62
  exports.JOB_REMARK_FRAGMENT = (0, client_1.gql) `
49
63
  ${exports.JOB_USER_FRAGMENT}
50
64
  fragment JobRemark on JobRemark {
@@ -67,6 +81,7 @@ exports.JOB_RECORD_QUESTION_FRAGMENT = (0, client_1.gql) `
67
81
  fragment JobRecordQuestion on JobRecordQuestion {
68
82
  question
69
83
  stem
84
+ stemFromRecordId
70
85
  conceptId
71
86
  typeId
72
87
  answer
@@ -1,4 +1,4 @@
1
- import { IJob, IJobMember, IJobRecord, IJobRecordChapter, IJobRecordMockTest, IJobRecordQuestion, IJobRecordStation, IJobRemark } from '../../../models';
1
+ import { IJob, IJobChat, IJobMember, IJobRecord, IJobRecordChapter, IJobRecordMockTest, IJobRecordQuestion, IJobRecordStation, IJobRemark } from '../../../models';
2
2
  import { AdminData } from '../../types';
3
3
  export declare const CREATE_JOB: import("@apollo/client").DocumentNode;
4
4
  export type ICreateJobInput = {
@@ -102,3 +102,18 @@ export type IUpdateJobRecordStatusVar = {
102
102
  status: IJobRecord['status'];
103
103
  };
104
104
  export type IUpdateJobRecordStatusData = AdminData<IJobRecord[], 'updateJobRecordStatus'>;
105
+ export declare const CREATE_JOB_CHAT: import("@apollo/client").DocumentNode;
106
+ export type ICreateJobChatVar = {
107
+ input: Pick<IJobChat, 'jobId' | 'message' | 'userId'>;
108
+ };
109
+ export type ICreateJobChatData = AdminData<IJobChat, 'createJobChat'>;
110
+ export declare const DELETE_JOB_CHAT: import("@apollo/client").DocumentNode;
111
+ export type IDeleteJobChatVar = {
112
+ id: IJobChat['id'];
113
+ };
114
+ export type IDeleteJobChatData = AdminData<boolean, 'deleteJobChat'>;
115
+ export declare const DELETE_JOB_CHATS: import("@apollo/client").DocumentNode;
116
+ export type IDeleteJobChatsVar = {
117
+ jobId: IJobChat['jobId'];
118
+ };
119
+ export type IDeleteJobChatsData = AdminData<boolean, 'deleteJobChats'>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
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;
3
+ exports.DELETE_JOB_CHATS = exports.DELETE_JOB_CHAT = exports.CREATE_JOB_CHAT = 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
4
  const client_1 = require("@apollo/client");
5
5
  const fragments_1 = require("../../fragments");
6
6
  exports.CREATE_JOB = (0, client_1.gql) `
@@ -124,3 +124,26 @@ exports.UPDATE_JOB_RECORD_STATUS = (0, client_1.gql) `
124
124
  }
125
125
  }
126
126
  `;
127
+ exports.CREATE_JOB_CHAT = (0, client_1.gql) `
128
+ mutation CreateJobChat($input: CreateJobChatInput!) {
129
+ admin {
130
+ createJobChat(input: $input) {
131
+ id
132
+ }
133
+ }
134
+ }
135
+ `;
136
+ exports.DELETE_JOB_CHAT = (0, client_1.gql) `
137
+ mutation DeleteJobChat($id: ID!) {
138
+ admin {
139
+ deleteJobChat(id: $id)
140
+ }
141
+ }
142
+ `;
143
+ exports.DELETE_JOB_CHATS = (0, client_1.gql) `
144
+ mutation DeleteJobChats($jobId: ID!) {
145
+ admin {
146
+ deleteJobChats(jobId: $jobId)
147
+ }
148
+ }
149
+ `;
@@ -194,6 +194,7 @@ export type IDropdownOptionsVar = {
194
194
  force: boolean;
195
195
  entitlementIds?: number[] | null;
196
196
  topicIds?: number[] | null;
197
+ productId?: EProductType | null;
197
198
  };
198
199
  export type IDropdownOptionsData = AdminData<Array<{
199
200
  key: string;
@@ -364,6 +364,7 @@ exports.DROPDOWN_OPTIONS = (0, client_1.gql) `
364
364
  $force: Boolean!
365
365
  $entitlementIds: [Int!]
366
366
  $topicIds: [Int!]
367
+ $productId: Int
367
368
  ) {
368
369
  admin {
369
370
  dropdownOptions(
@@ -372,6 +373,7 @@ exports.DROPDOWN_OPTIONS = (0, client_1.gql) `
372
373
  table: $table
373
374
  entitlementIds: $entitlementIds
374
375
  topicIds: $topicIds
376
+ productId: $productId
375
377
  ) {
376
378
  key
377
379
  value
@@ -1,4 +1,4 @@
1
- import { EJobStatus, IJob, IJobRecord, IJobRemark, Id } from '../../../models';
1
+ import { EJobStatus, IJob, IJobChat, IJobRecord, IJobRemark, Id } from '../../../models';
2
2
  import { AdminData } from '../../types';
3
3
  export declare const GET_JOB: import("@apollo/client").DocumentNode;
4
4
  export type IGetJobVar = {
@@ -48,3 +48,13 @@ export type IGetIdDetailsData = AdminData<Array<{
48
48
  name: string;
49
49
  }>, 'getIdDetails'>;
50
50
  export declare const GET_ID_DETAILS: import("@apollo/client").DocumentNode;
51
+ export declare const GET_JOB_CHATS: import("@apollo/client").DocumentNode;
52
+ export type IGetJobChatsVar = {
53
+ jobId: IJob['id'];
54
+ };
55
+ export type IJobChatList = {
56
+ chats: IJobChat[];
57
+ date: Date | number;
58
+ total: number;
59
+ };
60
+ export type IGetJobChatsData = AdminData<IJobChatList[], 'getJobChats'>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_ID_DETAILS = exports.GET_JOB_RECORD = exports.GET_JOB_RECORDS = exports.GET_JOB_REMARKS = exports.GET_JOBS = exports.GET_JOB = void 0;
3
+ exports.GET_JOB_CHATS = exports.GET_ID_DETAILS = exports.GET_JOB_RECORD = exports.GET_JOB_RECORDS = exports.GET_JOB_REMARKS = exports.GET_JOBS = exports.GET_JOB = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const fragments_1 = require("../../fragments");
6
6
  exports.GET_JOB = (0, client_1.gql) `
@@ -70,3 +70,17 @@ exports.GET_ID_DETAILS = (0, client_1.gql) `
70
70
  }
71
71
  }
72
72
  `;
73
+ exports.GET_JOB_CHATS = (0, client_1.gql) `
74
+ ${fragments_1.JOB_CHAT_FRAGMENT}
75
+ query GetJobChats($jobId: ID!) {
76
+ admin {
77
+ getJobChats(jobId: $jobId) {
78
+ chats {
79
+ ...JobChat
80
+ }
81
+ date
82
+ total
83
+ }
84
+ }
85
+ }
86
+ `;
@@ -16,8 +16,8 @@ export declare enum EJobStatus {
16
16
  REJECTED = 4,
17
17
  APPROVED = 5,
18
18
  TESTING = 6,
19
- PUBLISHED = 7,
20
- PARTIAL_TRIALING = 8,
19
+ PARTIAL_TRIALING = 7,
20
+ PUBLISHED = 8,
21
21
  CLOSED = 9
22
22
  }
23
23
  export declare enum EJobType {
@@ -93,6 +93,7 @@ export interface IJobAsset {
93
93
  export interface IJobRecordQuestion {
94
94
  question: string;
95
95
  stem?: string | null;
96
+ stemFromRecordId?: IJobRecord['id'] | null;
96
97
  conceptId?: number | null;
97
98
  explanation?: string | null;
98
99
  learningPoint?: string | null;
@@ -145,10 +146,12 @@ export interface IJobMetaData {
145
146
  productId: EProductType;
146
147
  mockTest?: {
147
148
  mockTestId: number;
149
+ isNew: boolean;
148
150
  } | {
149
151
  typeId: EMockTestType;
150
152
  title: string;
151
153
  passingMark: number;
154
+ isNew: boolean;
152
155
  } | null;
153
156
  question?: {
154
157
  typeId: EQuestionType | null;
@@ -156,6 +159,15 @@ export interface IJobMetaData {
156
159
  entitlementIds: EEntitlementType[] | null;
157
160
  } | null;
158
161
  }
162
+ export interface IJobChat {
163
+ id: string;
164
+ jobId: IJob['id'];
165
+ userId: IUser['id'];
166
+ user: Pick<IUser, 'id' | 'firstName' | 'lastName' | 'username' | 'accessLevel'>;
167
+ message: string;
168
+ createdAt: Date | number;
169
+ updatedAt: Date | number;
170
+ }
159
171
  export interface IJob {
160
172
  id: string;
161
173
  name: string;
@@ -179,6 +191,7 @@ export interface IJob {
179
191
  members: IJobMember[];
180
192
  assets: IJobAsset[];
181
193
  records: IJobRecord[];
194
+ chats: IJobChat[];
182
195
  createdByUser: Pick<IUser, 'id' | 'firstName' | 'lastName' | 'username'>;
183
196
  }
184
197
  export declare const IsJobRecordQuestion: (record: IJobRecord['data']) => record is IJobRecordQuestion;
@@ -191,9 +204,11 @@ export declare const IsJobRecordStationByType: (type: EJobType, record: IJobReco
191
204
  export declare const IsJobRecordChapterByType: (type: EJobType, record: IJobRecord['data']) => record is IJobRecordChapter;
192
205
  export declare const isExistingMockTestMeta: (metadata: IJobMetaData['mockTest']) => metadata is {
193
206
  mockTestId: number;
207
+ isNew: false;
194
208
  };
195
209
  export declare const isNewMockTestMeta: (metadata: IJobMetaData['mockTest']) => metadata is {
196
210
  typeId: EMockTestType;
197
211
  title: string;
198
212
  passingMark: number;
213
+ isNew: true;
199
214
  };
@@ -19,10 +19,10 @@ export var EJobStatus;
19
19
  EJobStatus[EJobStatus["APPROVED"] = 5] = "APPROVED";
20
20
  //In QA, testing, or limited release
21
21
  EJobStatus[EJobStatus["TESTING"] = 6] = "TESTING";
22
- // Final version is live and visible
23
- EJobStatus[EJobStatus["PUBLISHED"] = 7] = "PUBLISHED";
24
22
  //Partial batch, some content is live
25
- EJobStatus[EJobStatus["PARTIAL_TRIALING"] = 8] = "PARTIAL_TRIALING";
23
+ EJobStatus[EJobStatus["PARTIAL_TRIALING"] = 7] = "PARTIAL_TRIALING";
24
+ // Final version is live and visible
25
+ EJobStatus[EJobStatus["PUBLISHED"] = 8] = "PUBLISHED";
26
26
  //Closed, revision not allowed
27
27
  EJobStatus[EJobStatus["CLOSED"] = 9] = "CLOSED";
28
28
  })(EJobStatus || (EJobStatus = {}));
@@ -112,11 +112,8 @@ export const IsJobRecordChapterByType = (type, record) => {
112
112
  return type === EJobType.CHAPTER;
113
113
  };
114
114
  export const isExistingMockTestMeta = (metadata) => {
115
- return (!!metadata &&
116
- typeof metadata === 'object' &&
117
- 'mockTestId' in metadata &&
118
- metadata.mockTestId !== null);
115
+ return !!metadata && typeof metadata === 'object' && metadata.isNew === false;
119
116
  };
120
117
  export const isNewMockTestMeta = (metadata) => {
121
- return !!metadata && typeof metadata === 'object' && 'typeId' in metadata;
118
+ return !!metadata && typeof metadata === 'object' && metadata.isNew === true;
122
119
  };
@@ -2,6 +2,7 @@ export declare const JOB_STATUS_FRAGMENT: import("@apollo/client").DocumentNode;
2
2
  export declare const JOB_META_DATA_FRAGMENT: import("@apollo/client").DocumentNode;
3
3
  export declare const JOB_FIELDS_FRAGMENT: import("@apollo/client").DocumentNode;
4
4
  export declare const JOB_USER_FRAGMENT: import("@apollo/client").DocumentNode;
5
+ export declare const JOB_CHAT_FRAGMENT: import("@apollo/client").DocumentNode;
5
6
  export declare const JOB_REMARK_FRAGMENT: import("@apollo/client").DocumentNode;
6
7
  export declare const JOB_RECORD_QUESTION_FRAGMENT: import("@apollo/client").DocumentNode;
7
8
  export declare const JOB_RECORD_CHAPTER_FRAGMENT: import("@apollo/client").DocumentNode;
@@ -15,6 +15,7 @@ export const JOB_META_DATA_FRAGMENT = gql `
15
15
  mockTest {
16
16
  mockTestId
17
17
  typeId
18
+ isNew
18
19
  title
19
20
  passingMark
20
21
  }
@@ -42,6 +43,19 @@ export const JOB_USER_FRAGMENT = gql `
42
43
  lastName
43
44
  }
44
45
  `;
46
+ export const JOB_CHAT_FRAGMENT = gql `
47
+ ${JOB_USER_FRAGMENT}
48
+ fragment JobChat on JobChat {
49
+ id
50
+ jobId
51
+ message
52
+ createdAt
53
+ updatedAt
54
+ user {
55
+ ...JobUser
56
+ }
57
+ }
58
+ `;
45
59
  export const JOB_REMARK_FRAGMENT = gql `
46
60
  ${JOB_USER_FRAGMENT}
47
61
  fragment JobRemark on JobRemark {
@@ -64,6 +78,7 @@ export const JOB_RECORD_QUESTION_FRAGMENT = gql `
64
78
  fragment JobRecordQuestion on JobRecordQuestion {
65
79
  question
66
80
  stem
81
+ stemFromRecordId
67
82
  conceptId
68
83
  typeId
69
84
  answer
@@ -1,4 +1,4 @@
1
- import { IJob, IJobMember, IJobRecord, IJobRecordChapter, IJobRecordMockTest, IJobRecordQuestion, IJobRecordStation, IJobRemark } from '../../../models';
1
+ import { IJob, IJobChat, IJobMember, IJobRecord, IJobRecordChapter, IJobRecordMockTest, IJobRecordQuestion, IJobRecordStation, IJobRemark } from '../../../models';
2
2
  import { AdminData } from '../../types';
3
3
  export declare const CREATE_JOB: import("@apollo/client").DocumentNode;
4
4
  export type ICreateJobInput = {
@@ -102,3 +102,18 @@ export type IUpdateJobRecordStatusVar = {
102
102
  status: IJobRecord['status'];
103
103
  };
104
104
  export type IUpdateJobRecordStatusData = AdminData<IJobRecord[], 'updateJobRecordStatus'>;
105
+ export declare const CREATE_JOB_CHAT: import("@apollo/client").DocumentNode;
106
+ export type ICreateJobChatVar = {
107
+ input: Pick<IJobChat, 'jobId' | 'message' | 'userId'>;
108
+ };
109
+ export type ICreateJobChatData = AdminData<IJobChat, 'createJobChat'>;
110
+ export declare const DELETE_JOB_CHAT: import("@apollo/client").DocumentNode;
111
+ export type IDeleteJobChatVar = {
112
+ id: IJobChat['id'];
113
+ };
114
+ export type IDeleteJobChatData = AdminData<boolean, 'deleteJobChat'>;
115
+ export declare const DELETE_JOB_CHATS: import("@apollo/client").DocumentNode;
116
+ export type IDeleteJobChatsVar = {
117
+ jobId: IJobChat['jobId'];
118
+ };
119
+ export type IDeleteJobChatsData = AdminData<boolean, 'deleteJobChats'>;
@@ -121,3 +121,26 @@ export const UPDATE_JOB_RECORD_STATUS = gql `
121
121
  }
122
122
  }
123
123
  `;
124
+ export const CREATE_JOB_CHAT = gql `
125
+ mutation CreateJobChat($input: CreateJobChatInput!) {
126
+ admin {
127
+ createJobChat(input: $input) {
128
+ id
129
+ }
130
+ }
131
+ }
132
+ `;
133
+ export const DELETE_JOB_CHAT = gql `
134
+ mutation DeleteJobChat($id: ID!) {
135
+ admin {
136
+ deleteJobChat(id: $id)
137
+ }
138
+ }
139
+ `;
140
+ export const DELETE_JOB_CHATS = gql `
141
+ mutation DeleteJobChats($jobId: ID!) {
142
+ admin {
143
+ deleteJobChats(jobId: $jobId)
144
+ }
145
+ }
146
+ `;
@@ -194,6 +194,7 @@ export type IDropdownOptionsVar = {
194
194
  force: boolean;
195
195
  entitlementIds?: number[] | null;
196
196
  topicIds?: number[] | null;
197
+ productId?: EProductType | null;
197
198
  };
198
199
  export type IDropdownOptionsData = AdminData<Array<{
199
200
  key: string;
@@ -361,6 +361,7 @@ export const DROPDOWN_OPTIONS = gql `
361
361
  $force: Boolean!
362
362
  $entitlementIds: [Int!]
363
363
  $topicIds: [Int!]
364
+ $productId: Int
364
365
  ) {
365
366
  admin {
366
367
  dropdownOptions(
@@ -369,6 +370,7 @@ export const DROPDOWN_OPTIONS = gql `
369
370
  table: $table
370
371
  entitlementIds: $entitlementIds
371
372
  topicIds: $topicIds
373
+ productId: $productId
372
374
  ) {
373
375
  key
374
376
  value
@@ -1,4 +1,4 @@
1
- import { EJobStatus, IJob, IJobRecord, IJobRemark, Id } from '../../../models';
1
+ import { EJobStatus, IJob, IJobChat, IJobRecord, IJobRemark, Id } from '../../../models';
2
2
  import { AdminData } from '../../types';
3
3
  export declare const GET_JOB: import("@apollo/client").DocumentNode;
4
4
  export type IGetJobVar = {
@@ -48,3 +48,13 @@ export type IGetIdDetailsData = AdminData<Array<{
48
48
  name: string;
49
49
  }>, 'getIdDetails'>;
50
50
  export declare const GET_ID_DETAILS: import("@apollo/client").DocumentNode;
51
+ export declare const GET_JOB_CHATS: import("@apollo/client").DocumentNode;
52
+ export type IGetJobChatsVar = {
53
+ jobId: IJob['id'];
54
+ };
55
+ export type IJobChatList = {
56
+ chats: IJobChat[];
57
+ date: Date | number;
58
+ total: number;
59
+ };
60
+ export type IGetJobChatsData = AdminData<IJobChatList[], 'getJobChats'>;
@@ -1,5 +1,5 @@
1
1
  import { gql } from '@apollo/client';
2
- import { JOB_RECORD_FRAGMENT, JOB_REMARK_FRAGMENT, LIMITED_JOB_FRAGMENT, LIST_JOB_FRAGMENT, } from '../../fragments';
2
+ import { JOB_CHAT_FRAGMENT, JOB_RECORD_FRAGMENT, JOB_REMARK_FRAGMENT, LIMITED_JOB_FRAGMENT, LIST_JOB_FRAGMENT, } from '../../fragments';
3
3
  export const GET_JOB = gql `
4
4
  ${LIMITED_JOB_FRAGMENT}
5
5
  query GetJob($id: ID!) {
@@ -67,3 +67,17 @@ export const GET_ID_DETAILS = gql `
67
67
  }
68
68
  }
69
69
  `;
70
+ export const GET_JOB_CHATS = gql `
71
+ ${JOB_CHAT_FRAGMENT}
72
+ query GetJobChats($jobId: ID!) {
73
+ admin {
74
+ getJobChats(jobId: $jobId) {
75
+ chats {
76
+ ...JobChat
77
+ }
78
+ date
79
+ total
80
+ }
81
+ }
82
+ }
83
+ `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.167",
3
+ "version": "2.6.169",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",