@quesmed/types 2.6.172 → 2.6.174

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.
@@ -1,3 +1,4 @@
1
+ import { Id } from '../models';
1
2
  import { EMockTestType } from './MockTest';
2
3
  import { IPicture } from './Picture';
3
4
  import { EEntitlementType, EProductType } from './Product';
@@ -8,6 +9,12 @@ export declare enum EJobPriority {
8
9
  MEDIUM = 2,
9
10
  HIGH = 3
10
11
  }
12
+ export declare enum EJobAttemptType {
13
+ ALL = 0,
14
+ FIRST_ATTEMPT = 1,
15
+ LATEST_ATTEMPT = 2,
16
+ SINCE_LAST_MODIFICATION = 3
17
+ }
11
18
  export declare enum EJobStatus {
12
19
  ALL = 0,
13
20
  IDLE = 1,
@@ -137,6 +144,28 @@ export interface IJobRecordMockTest {
137
144
  explanation?: IQuestionChoice['explanation'];
138
145
  }>;
139
146
  }
147
+ export interface IJobRecordMetricsSummary {
148
+ total: number;
149
+ correct: number;
150
+ incorrect: number;
151
+ percentage: number;
152
+ commentCount: number;
153
+ likes: number;
154
+ dislikes: number;
155
+ }
156
+ export interface IJobRecordChoiceVote {
157
+ id: Id;
158
+ label: string;
159
+ votes: number;
160
+ percentage: number;
161
+ }
162
+ export interface IJobRecordChoiceSummary {
163
+ id: Id;
164
+ label: string;
165
+ votes: number;
166
+ percentage: number;
167
+ questionId: number;
168
+ }
140
169
  export interface IJobRecord {
141
170
  id: string;
142
171
  index: number;
@@ -153,6 +182,8 @@ export interface IJobRecord {
153
182
  stationId: number | null;
154
183
  chapterId: number | null;
155
184
  remarks: IJobRemark[];
185
+ metricsSummary: IJobRecordMetricsSummary | null;
186
+ choiceSummary: IJobRecordChoiceSummary[] | null;
156
187
  }
157
188
  export interface IJobMetaData {
158
189
  productId: EProductType;
@@ -1,12 +1,19 @@
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.EJobHistoryType = 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.EJobAttemptType = exports.EJobPriority = void 0;
4
4
  var EJobPriority;
5
5
  (function (EJobPriority) {
6
6
  EJobPriority[EJobPriority["LOW"] = 1] = "LOW";
7
7
  EJobPriority[EJobPriority["MEDIUM"] = 2] = "MEDIUM";
8
8
  EJobPriority[EJobPriority["HIGH"] = 3] = "HIGH";
9
9
  })(EJobPriority = exports.EJobPriority || (exports.EJobPriority = {}));
10
+ var EJobAttemptType;
11
+ (function (EJobAttemptType) {
12
+ EJobAttemptType[EJobAttemptType["ALL"] = 0] = "ALL";
13
+ EJobAttemptType[EJobAttemptType["FIRST_ATTEMPT"] = 1] = "FIRST_ATTEMPT";
14
+ EJobAttemptType[EJobAttemptType["LATEST_ATTEMPT"] = 2] = "LATEST_ATTEMPT";
15
+ EJobAttemptType[EJobAttemptType["SINCE_LAST_MODIFICATION"] = 3] = "SINCE_LAST_MODIFICATION";
16
+ })(EJobAttemptType = exports.EJobAttemptType || (exports.EJobAttemptType = {}));
10
17
  var EJobStatus;
11
18
  (function (EJobStatus) {
12
19
  EJobStatus[EJobStatus["ALL"] = 0] = "ALL";
@@ -8,6 +8,7 @@ export * from './mockTest';
8
8
  export * from './osce';
9
9
  export * from './picture';
10
10
  export * from './question';
11
+ export * from './record';
11
12
  export * from './topic';
12
13
  export * from './user';
13
14
  export * from './video';
@@ -24,6 +24,7 @@ __exportStar(require("./mockTest"), exports);
24
24
  __exportStar(require("./osce"), exports);
25
25
  __exportStar(require("./picture"), exports);
26
26
  __exportStar(require("./question"), exports);
27
+ __exportStar(require("./record"), exports);
27
28
  __exportStar(require("./topic"), exports);
28
29
  __exportStar(require("./user"), exports);
29
30
  __exportStar(require("./video"), exports);
@@ -1,16 +1,8 @@
1
1
  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
- export declare const JOB_USER_FRAGMENT: import("@apollo/client").DocumentNode;
5
4
  export declare const JOB_CHAT_FRAGMENT: import("@apollo/client").DocumentNode;
6
- export declare const JOB_REMARK_FRAGMENT: import("@apollo/client").DocumentNode;
7
5
  export declare const JOB_HISTORY_FRAGMENT: import("@apollo/client").DocumentNode;
8
- export declare const JOB_RECORD_QUESTION_FRAGMENT: import("@apollo/client").DocumentNode;
9
- export declare const JOB_RECORD_CHAPTER_FRAGMENT: import("@apollo/client").DocumentNode;
10
- export declare const JOB_RECORD_STATION_FRAGMENT: import("@apollo/client").DocumentNode;
11
- export declare const JOB_RECORD_MOCK_TEST_FRAGMENT: import("@apollo/client").DocumentNode;
12
- export declare const JOB_RECORD_STATUS_FRAGMENT: import("@apollo/client").DocumentNode;
13
- export declare const JOB_RECORD_FRAGMENT: import("@apollo/client").DocumentNode;
14
6
  export declare const JOB_MEMBER_FRAGMENT: import("@apollo/client").DocumentNode;
15
7
  export declare const JOB_ASSETS_FRAGMENT: import("@apollo/client").DocumentNode;
16
8
  export declare const LIST_JOB_FRAGMENT: import("@apollo/client").DocumentNode;
@@ -1,7 +1,8 @@
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_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;
3
+ exports.FULL_JOB_FRAGMENT = exports.LIMITED_JOB_FRAGMENT = exports.LIST_JOB_FRAGMENT = exports.JOB_ASSETS_FRAGMENT = exports.JOB_MEMBER_FRAGMENT = exports.JOB_HISTORY_FRAGMENT = exports.JOB_CHAT_FRAGMENT = exports.JOB_FIELDS_FRAGMENT = exports.JOB_META_DATA_FRAGMENT = exports.JOB_STATUS_FRAGMENT = void 0;
4
4
  const client_1 = require("@apollo/client");
5
+ const record_1 = require("./record");
5
6
  exports.JOB_STATUS_FRAGMENT = (0, client_1.gql) `
6
7
  fragment JobStatus on Job {
7
8
  status
@@ -38,17 +39,8 @@ exports.JOB_FIELDS_FRAGMENT = (0, client_1.gql) `
38
39
  }
39
40
  }
40
41
  `;
41
- exports.JOB_USER_FRAGMENT = (0, client_1.gql) `
42
- fragment JobUser on User {
43
- id
44
- username
45
- firstName
46
- lastName
47
- accessLevel
48
- }
49
- `;
50
42
  exports.JOB_CHAT_FRAGMENT = (0, client_1.gql) `
51
- ${exports.JOB_USER_FRAGMENT}
43
+ ${record_1.JOB_USER_FRAGMENT}
52
44
  fragment JobChat on JobChat {
53
45
  id
54
46
  jobId
@@ -60,26 +52,8 @@ exports.JOB_CHAT_FRAGMENT = (0, client_1.gql) `
60
52
  }
61
53
  }
62
54
  `;
63
- exports.JOB_REMARK_FRAGMENT = (0, client_1.gql) `
64
- ${exports.JOB_USER_FRAGMENT}
65
- fragment JobRemark on JobRemark {
66
- id
67
- createdAt
68
- jobId
69
- status
70
- remark
71
- recordId
72
- resolvedAt
73
- createdByUser {
74
- ...JobUser
75
- }
76
- resolvedByUser {
77
- ...JobUser
78
- }
79
- }
80
- `;
81
55
  exports.JOB_HISTORY_FRAGMENT = (0, client_1.gql) `
82
- ${exports.JOB_USER_FRAGMENT}
56
+ ${record_1.JOB_USER_FRAGMENT}
83
57
  fragment JobHistory on JobHistory {
84
58
  id
85
59
  createdAt
@@ -95,106 +69,8 @@ exports.JOB_HISTORY_FRAGMENT = (0, client_1.gql) `
95
69
  }
96
70
  }
97
71
  `;
98
- exports.JOB_RECORD_QUESTION_FRAGMENT = (0, client_1.gql) `
99
- fragment JobRecordQuestion on JobRecordQuestion {
100
- question
101
- stem
102
- stemFromRecordId
103
- conceptId
104
- typeId
105
- answer
106
- entitlementIds
107
- themeIds
108
- subTypeId
109
- presentationIds
110
- conditionIds
111
- ukmlaTopicId
112
- choices {
113
- label
114
- name
115
- explanation
116
- answer
117
- }
118
- learningPoint
119
- explanation
120
- }
121
- `;
122
- exports.JOB_RECORD_CHAPTER_FRAGMENT = (0, client_1.gql) `
123
- fragment JobRecordChapter on JobRecordChapter {
124
- topic
125
- concept
126
- chapter
127
- }
128
- `;
129
- exports.JOB_RECORD_STATION_FRAGMENT = (0, client_1.gql) `
130
- fragment JobRecordStation on JobRecordStation {
131
- question
132
- }
133
- `;
134
- exports.JOB_RECORD_MOCK_TEST_FRAGMENT = (0, client_1.gql) `
135
- fragment JobRecordMockTest on JobRecordMockTest {
136
- question
137
- conceptId
138
- typeId
139
- answer
140
- choices {
141
- label
142
- name
143
- explanation
144
- answer
145
- }
146
- learningPoint
147
- explanation
148
- }
149
- `;
150
- exports.JOB_RECORD_STATUS_FRAGMENT = (0, client_1.gql) `
151
- fragment JobRecordStatus on JobRecord {
152
- status
153
- }
154
- `;
155
- exports.JOB_RECORD_FRAGMENT = (0, client_1.gql) `
156
- ${exports.JOB_REMARK_FRAGMENT}
157
- ${exports.JOB_RECORD_STATUS_FRAGMENT}
158
- ${exports.JOB_RECORD_QUESTION_FRAGMENT}
159
- ${exports.JOB_RECORD_CHAPTER_FRAGMENT}
160
- ${exports.JOB_RECORD_STATION_FRAGMENT}
161
- ${exports.JOB_RECORD_MOCK_TEST_FRAGMENT}
162
- fragment JobRecord on JobRecord {
163
- id
164
- jobId
165
- index
166
- referenceId
167
- data {
168
- ... on JobRecordQuestion {
169
- ...JobRecordQuestion
170
- }
171
- ... on JobRecordChapter {
172
- ...JobRecordChapter
173
- }
174
- ... on JobRecordStation {
175
- ...JobRecordStation
176
- }
177
- ... on JobRecordMockTest {
178
- ...JobRecordMockTest
179
- }
180
- }
181
- remarks {
182
- ...JobRemark
183
- }
184
- createdByUser {
185
- ...JobUser
186
- }
187
- questionId
188
- stationId
189
- chapterId
190
- createdAt
191
- updatedAt
192
- publishedAt
193
- ...JobRecordStatus
194
- }
195
- `;
196
72
  exports.JOB_MEMBER_FRAGMENT = (0, client_1.gql) `
197
- ${exports.JOB_USER_FRAGMENT}
73
+ ${record_1.JOB_USER_FRAGMENT}
198
74
  fragment JobMember on JobMember {
199
75
  id
200
76
  createdAt
@@ -206,7 +82,7 @@ exports.JOB_MEMBER_FRAGMENT = (0, client_1.gql) `
206
82
  }
207
83
  `;
208
84
  exports.JOB_ASSETS_FRAGMENT = (0, client_1.gql) `
209
- ${exports.JOB_USER_FRAGMENT}
85
+ ${record_1.JOB_USER_FRAGMENT}
210
86
  fragment JobAssets on JobAsset {
211
87
  id
212
88
  jobId
@@ -229,7 +105,7 @@ exports.JOB_ASSETS_FRAGMENT = (0, client_1.gql) `
229
105
  exports.LIST_JOB_FRAGMENT = (0, client_1.gql) `
230
106
  ${exports.JOB_FIELDS_FRAGMENT}
231
107
  ${exports.JOB_STATUS_FRAGMENT}
232
- ${exports.JOB_USER_FRAGMENT}
108
+ ${record_1.JOB_USER_FRAGMENT}
233
109
  fragment Job on Job {
234
110
  id
235
111
  updatedAt
@@ -268,8 +144,8 @@ exports.LIMITED_JOB_FRAGMENT = (0, client_1.gql) `
268
144
  exports.FULL_JOB_FRAGMENT = (0, client_1.gql) `
269
145
  ${exports.JOB_FIELDS_FRAGMENT}
270
146
  ${exports.JOB_STATUS_FRAGMENT}
271
- ${exports.JOB_RECORD_FRAGMENT}
272
- ${exports.JOB_REMARK_FRAGMENT}
147
+ ${record_1.JOB_RECORD_FRAGMENT}
148
+ ${record_1.JOB_REMARK_FRAGMENT}
273
149
  ${exports.JOB_MEMBER_FRAGMENT}
274
150
  ${exports.JOB_ASSETS_FRAGMENT}
275
151
  fragment DetailedJob on Job {
@@ -0,0 +1,11 @@
1
+ export declare const JOB_USER_FRAGMENT: import("@apollo/client").DocumentNode;
2
+ export declare const JOB_REMARK_FRAGMENT: import("@apollo/client").DocumentNode;
3
+ export declare const JOB_RECORD_METRICS_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
4
+ export declare const JOB_RECORD_CHOICE_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
5
+ export declare const JOB_RECORD_STATISTICS_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;
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ 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_RECORD_STATISTICS_FRAGMENT = exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = exports.JOB_RECORD_METRICS_SUMMARY_FRAGMENT = exports.JOB_REMARK_FRAGMENT = exports.JOB_USER_FRAGMENT = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.JOB_USER_FRAGMENT = (0, client_1.gql) `
6
+ fragment JobUser on User {
7
+ id
8
+ username
9
+ firstName
10
+ lastName
11
+ accessLevel
12
+ }
13
+ `;
14
+ exports.JOB_REMARK_FRAGMENT = (0, client_1.gql) `
15
+ ${exports.JOB_USER_FRAGMENT}
16
+ fragment JobRemark on JobRemark {
17
+ id
18
+ createdAt
19
+ jobId
20
+ status
21
+ remark
22
+ recordId
23
+ resolvedAt
24
+ createdByUser {
25
+ ...JobUser
26
+ }
27
+ resolvedByUser {
28
+ ...JobUser
29
+ }
30
+ }
31
+ `;
32
+ exports.JOB_RECORD_METRICS_SUMMARY_FRAGMENT = (0, client_1.gql) `
33
+ fragment JobRecordMetricsSummary on JobRecordMetricsSummary {
34
+ total
35
+ correct
36
+ incorrect
37
+ percentage
38
+ commentCount
39
+ likes
40
+ dislikes
41
+ }
42
+ `;
43
+ exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = (0, client_1.gql) `
44
+ fragment JobRecordChoiceSummary on JobRecordChoiceSummary {
45
+ id
46
+ label
47
+ votes
48
+ percentage
49
+ questionId
50
+ }
51
+ `;
52
+ exports.JOB_RECORD_STATISTICS_FRAGMENT = (0, client_1.gql) `
53
+ ${exports.JOB_RECORD_METRICS_SUMMARY_FRAGMENT}
54
+ ${exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT}
55
+ fragment JobRecordStatistics on JobRecord {
56
+ metricsSummary {
57
+ ...JobRecordMetricsSummary
58
+ }
59
+ choiceSummary {
60
+ ...JobRecordChoiceSummary
61
+ }
62
+ }
63
+ `;
64
+ exports.JOB_RECORD_QUESTION_FRAGMENT = (0, client_1.gql) `
65
+ fragment JobRecordQuestion on JobRecordQuestion {
66
+ question
67
+ stem
68
+ stemFromRecordId
69
+ conceptId
70
+ typeId
71
+ answer
72
+ entitlementIds
73
+ themeIds
74
+ subTypeId
75
+ presentationIds
76
+ conditionIds
77
+ ukmlaTopicId
78
+ choices {
79
+ label
80
+ name
81
+ explanation
82
+ answer
83
+ }
84
+ learningPoint
85
+ explanation
86
+ }
87
+ `;
88
+ exports.JOB_RECORD_CHAPTER_FRAGMENT = (0, client_1.gql) `
89
+ fragment JobRecordChapter on JobRecordChapter {
90
+ topic
91
+ concept
92
+ chapter
93
+ }
94
+ `;
95
+ exports.JOB_RECORD_STATION_FRAGMENT = (0, client_1.gql) `
96
+ fragment JobRecordStation on JobRecordStation {
97
+ question
98
+ }
99
+ `;
100
+ exports.JOB_RECORD_MOCK_TEST_FRAGMENT = (0, client_1.gql) `
101
+ fragment JobRecordMockTest on JobRecordMockTest {
102
+ question
103
+ conceptId
104
+ typeId
105
+ answer
106
+ choices {
107
+ label
108
+ name
109
+ explanation
110
+ answer
111
+ }
112
+ learningPoint
113
+ explanation
114
+ }
115
+ `;
116
+ exports.JOB_RECORD_STATUS_FRAGMENT = (0, client_1.gql) `
117
+ fragment JobRecordStatus on JobRecord {
118
+ status
119
+ }
120
+ `;
121
+ exports.JOB_RECORD_FRAGMENT = (0, client_1.gql) `
122
+ ${exports.JOB_REMARK_FRAGMENT}
123
+ ${exports.JOB_RECORD_STATUS_FRAGMENT}
124
+ ${exports.JOB_RECORD_QUESTION_FRAGMENT}
125
+ ${exports.JOB_RECORD_CHAPTER_FRAGMENT}
126
+ ${exports.JOB_RECORD_STATION_FRAGMENT}
127
+ ${exports.JOB_RECORD_MOCK_TEST_FRAGMENT}
128
+ ${exports.JOB_RECORD_STATISTICS_FRAGMENT}
129
+ fragment JobRecord on JobRecord {
130
+ id
131
+ jobId
132
+ index
133
+ referenceId
134
+ data {
135
+ ... on JobRecordQuestion {
136
+ ...JobRecordQuestion
137
+ }
138
+ ... on JobRecordChapter {
139
+ ...JobRecordChapter
140
+ }
141
+ ... on JobRecordStation {
142
+ ...JobRecordStation
143
+ }
144
+ ... on JobRecordMockTest {
145
+ ...JobRecordMockTest
146
+ }
147
+ }
148
+ remarks {
149
+ ...JobRemark
150
+ }
151
+ createdByUser {
152
+ ...JobUser
153
+ }
154
+ questionId
155
+ stationId
156
+ chapterId
157
+ createdAt
158
+ updatedAt
159
+ publishedAt
160
+ ...JobRecordStatus
161
+ ...JobRecordStatistics
162
+ }
163
+ `;
@@ -20,6 +20,7 @@ export interface IRevenue {
20
20
  duration: number;
21
21
  name: string;
22
22
  subscriptionCount: number;
23
+ subscriptionIds: number[];
23
24
  totalEarning: number;
24
25
  invoiceCount: number;
25
26
  breakdown: IRevenue[];
@@ -44,6 +45,9 @@ export type IEarningsVar = {
44
45
  classYear?: string;
45
46
  };
46
47
  export type IEarningsData = AdminData<IRevenue[], 'earnings'>;
48
+ export declare const REFUNDS: import("@apollo/client").DocumentNode;
49
+ export type IRefundsVar = Omit<IEarningsVar, 'useNetEarning'>;
50
+ export type IRefundsData = AdminData<IRevenue[], 'refunds'>;
47
51
  export declare const USER_STATUS: import("@apollo/client").DocumentNode;
48
52
  export interface IUserStatus {
49
53
  total: number;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DROPDOWN_OPTIONS = exports.USER_CANCELLATION_REASONS = exports.QUESTION_STATS = exports.APP_USAGE_GRAPH = exports.EARNINGS_GRAPH = exports.USER_FEEDBACK_GRAPH = exports.USER_FEEDBACKS = exports.USER_BREAKDOWN = exports.USER_STATUS = exports.ESubType = exports.EARNINGS = exports.IMPORT_STATS = void 0;
3
+ exports.DROPDOWN_OPTIONS = exports.USER_CANCELLATION_REASONS = exports.QUESTION_STATS = exports.APP_USAGE_GRAPH = exports.EARNINGS_GRAPH = exports.USER_FEEDBACK_GRAPH = exports.USER_FEEDBACKS = exports.USER_BREAKDOWN = exports.USER_STATUS = exports.REFUNDS = exports.ESubType = exports.EARNINGS = exports.IMPORT_STATS = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  exports.IMPORT_STATS = (0, client_1.gql) `
6
6
  query ImportStats($from: Date, $to: Date, $force: Boolean) {
@@ -75,6 +75,58 @@ var ESubType;
75
75
  ESubType[ESubType["NEW"] = 1] = "NEW";
76
76
  ESubType[ESubType["OLD"] = 2] = "OLD";
77
77
  })(ESubType = exports.ESubType || (exports.ESubType = {}));
78
+ exports.REFUNDS = (0, client_1.gql) `
79
+ query Refunds(
80
+ $subType: Int
81
+ $duration: Int
82
+ $from: Date
83
+ $to: Date
84
+ $force: Boolean!
85
+ $source: Int
86
+ $universityId: Int
87
+ $productIds: [Int]
88
+ $countryName: String
89
+ $graduationYear: Int
90
+ $classYear: String
91
+ ) {
92
+ admin {
93
+ refunds(
94
+ subType: $subType
95
+ duration: $duration
96
+ universityId: $universityId
97
+ from: $from
98
+ to: $to
99
+ force: $force
100
+ source: $source
101
+ productIds: $productIds
102
+ countryName: $countryName
103
+ graduationYear: $graduationYear
104
+ classYear: $classYear
105
+ ) {
106
+ entitlement {
107
+ id
108
+ name
109
+ }
110
+ duration
111
+ name
112
+ subscriptionCount
113
+ totalEarning
114
+ invoiceCount
115
+ breakdown {
116
+ entitlement {
117
+ id
118
+ name
119
+ }
120
+ duration
121
+ name
122
+ subscriptionCount
123
+ totalEarning
124
+ invoiceCount
125
+ }
126
+ }
127
+ }
128
+ }
129
+ `;
78
130
  exports.USER_STATUS = (0, client_1.gql) `
79
131
  query UserStatus($from: Date, $to: Date, $force: Boolean!) {
80
132
  admin {
@@ -1,8 +1,12 @@
1
- import { IJob, IJobRecord, Id } from '../../../models';
1
+ import { EJobAttemptType, IJob, IJobRecord, Id } from '../../../models';
2
2
  import { AdminData } from '../../types';
3
3
  export declare const GET_JOB_RECORDS: import("@apollo/client").DocumentNode;
4
+ export interface IJobRecordsFilter {
5
+ attemptType: EJobAttemptType;
6
+ }
4
7
  export type IGetJobRecordsVar = {
5
8
  jobId: IJob['id'];
9
+ filter: IJobRecordsFilter;
6
10
  };
7
11
  export type IGetJobRecordsData = AdminData<IJobRecord[], 'getJobRecords'>;
8
12
  export declare const GET_JOB_RECORD: import("@apollo/client").DocumentNode;
@@ -5,9 +5,9 @@ const client_1 = require("@apollo/client");
5
5
  const fragments_1 = require("../../fragments");
6
6
  exports.GET_JOB_RECORDS = (0, client_1.gql) `
7
7
  ${fragments_1.JOB_RECORD_FRAGMENT}
8
- query GetJobRecords($jobId: ID!) {
8
+ query GetJobRecords($jobId: ID!, $filter: JobRecordsFilterInput!) {
9
9
  admin {
10
- getJobRecords(jobId: $jobId) {
10
+ getJobRecords(jobId: $jobId, filter: $filter) {
11
11
  ...JobRecord
12
12
  }
13
13
  }
@@ -1,3 +1,4 @@
1
+ import { Id } from '../models';
1
2
  import { EMockTestType } from './MockTest';
2
3
  import { IPicture } from './Picture';
3
4
  import { EEntitlementType, EProductType } from './Product';
@@ -8,6 +9,12 @@ export declare enum EJobPriority {
8
9
  MEDIUM = 2,
9
10
  HIGH = 3
10
11
  }
12
+ export declare enum EJobAttemptType {
13
+ ALL = 0,
14
+ FIRST_ATTEMPT = 1,
15
+ LATEST_ATTEMPT = 2,
16
+ SINCE_LAST_MODIFICATION = 3
17
+ }
11
18
  export declare enum EJobStatus {
12
19
  ALL = 0,
13
20
  IDLE = 1,
@@ -137,6 +144,28 @@ export interface IJobRecordMockTest {
137
144
  explanation?: IQuestionChoice['explanation'];
138
145
  }>;
139
146
  }
147
+ export interface IJobRecordMetricsSummary {
148
+ total: number;
149
+ correct: number;
150
+ incorrect: number;
151
+ percentage: number;
152
+ commentCount: number;
153
+ likes: number;
154
+ dislikes: number;
155
+ }
156
+ export interface IJobRecordChoiceVote {
157
+ id: Id;
158
+ label: string;
159
+ votes: number;
160
+ percentage: number;
161
+ }
162
+ export interface IJobRecordChoiceSummary {
163
+ id: Id;
164
+ label: string;
165
+ votes: number;
166
+ percentage: number;
167
+ questionId: number;
168
+ }
140
169
  export interface IJobRecord {
141
170
  id: string;
142
171
  index: number;
@@ -153,6 +182,8 @@ export interface IJobRecord {
153
182
  stationId: number | null;
154
183
  chapterId: number | null;
155
184
  remarks: IJobRemark[];
185
+ metricsSummary: IJobRecordMetricsSummary | null;
186
+ choiceSummary: IJobRecordChoiceSummary[] | null;
156
187
  }
157
188
  export interface IJobMetaData {
158
189
  productId: EProductType;
@@ -4,6 +4,13 @@ export var EJobPriority;
4
4
  EJobPriority[EJobPriority["MEDIUM"] = 2] = "MEDIUM";
5
5
  EJobPriority[EJobPriority["HIGH"] = 3] = "HIGH";
6
6
  })(EJobPriority || (EJobPriority = {}));
7
+ export var EJobAttemptType;
8
+ (function (EJobAttemptType) {
9
+ EJobAttemptType[EJobAttemptType["ALL"] = 0] = "ALL";
10
+ EJobAttemptType[EJobAttemptType["FIRST_ATTEMPT"] = 1] = "FIRST_ATTEMPT";
11
+ EJobAttemptType[EJobAttemptType["LATEST_ATTEMPT"] = 2] = "LATEST_ATTEMPT";
12
+ EJobAttemptType[EJobAttemptType["SINCE_LAST_MODIFICATION"] = 3] = "SINCE_LAST_MODIFICATION";
13
+ })(EJobAttemptType || (EJobAttemptType = {}));
7
14
  export var EJobStatus;
8
15
  (function (EJobStatus) {
9
16
  EJobStatus[EJobStatus["ALL"] = 0] = "ALL";
@@ -8,6 +8,7 @@ export * from './mockTest';
8
8
  export * from './osce';
9
9
  export * from './picture';
10
10
  export * from './question';
11
+ export * from './record';
11
12
  export * from './topic';
12
13
  export * from './user';
13
14
  export * from './video';
@@ -8,6 +8,7 @@ export * from './mockTest';
8
8
  export * from './osce';
9
9
  export * from './picture';
10
10
  export * from './question';
11
+ export * from './record';
11
12
  export * from './topic';
12
13
  export * from './user';
13
14
  export * from './video';
@@ -1,16 +1,8 @@
1
1
  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
- export declare const JOB_USER_FRAGMENT: import("@apollo/client").DocumentNode;
5
4
  export declare const JOB_CHAT_FRAGMENT: import("@apollo/client").DocumentNode;
6
- export declare const JOB_REMARK_FRAGMENT: import("@apollo/client").DocumentNode;
7
5
  export declare const JOB_HISTORY_FRAGMENT: import("@apollo/client").DocumentNode;
8
- export declare const JOB_RECORD_QUESTION_FRAGMENT: import("@apollo/client").DocumentNode;
9
- export declare const JOB_RECORD_CHAPTER_FRAGMENT: import("@apollo/client").DocumentNode;
10
- export declare const JOB_RECORD_STATION_FRAGMENT: import("@apollo/client").DocumentNode;
11
- export declare const JOB_RECORD_MOCK_TEST_FRAGMENT: import("@apollo/client").DocumentNode;
12
- export declare const JOB_RECORD_STATUS_FRAGMENT: import("@apollo/client").DocumentNode;
13
- export declare const JOB_RECORD_FRAGMENT: import("@apollo/client").DocumentNode;
14
6
  export declare const JOB_MEMBER_FRAGMENT: import("@apollo/client").DocumentNode;
15
7
  export declare const JOB_ASSETS_FRAGMENT: import("@apollo/client").DocumentNode;
16
8
  export declare const LIST_JOB_FRAGMENT: import("@apollo/client").DocumentNode;
@@ -1,4 +1,5 @@
1
1
  import { gql } from '@apollo/client';
2
+ import { JOB_RECORD_FRAGMENT, JOB_REMARK_FRAGMENT, JOB_USER_FRAGMENT, } from './record';
2
3
  export const JOB_STATUS_FRAGMENT = gql `
3
4
  fragment JobStatus on Job {
4
5
  status
@@ -35,15 +36,6 @@ export const JOB_FIELDS_FRAGMENT = gql `
35
36
  }
36
37
  }
37
38
  `;
38
- export const JOB_USER_FRAGMENT = gql `
39
- fragment JobUser on User {
40
- id
41
- username
42
- firstName
43
- lastName
44
- accessLevel
45
- }
46
- `;
47
39
  export const JOB_CHAT_FRAGMENT = gql `
48
40
  ${JOB_USER_FRAGMENT}
49
41
  fragment JobChat on JobChat {
@@ -57,24 +49,6 @@ export const JOB_CHAT_FRAGMENT = gql `
57
49
  }
58
50
  }
59
51
  `;
60
- export const JOB_REMARK_FRAGMENT = gql `
61
- ${JOB_USER_FRAGMENT}
62
- fragment JobRemark on JobRemark {
63
- id
64
- createdAt
65
- jobId
66
- status
67
- remark
68
- recordId
69
- resolvedAt
70
- createdByUser {
71
- ...JobUser
72
- }
73
- resolvedByUser {
74
- ...JobUser
75
- }
76
- }
77
- `;
78
52
  export const JOB_HISTORY_FRAGMENT = gql `
79
53
  ${JOB_USER_FRAGMENT}
80
54
  fragment JobHistory on JobHistory {
@@ -92,104 +66,6 @@ export const JOB_HISTORY_FRAGMENT = gql `
92
66
  }
93
67
  }
94
68
  `;
95
- export const JOB_RECORD_QUESTION_FRAGMENT = gql `
96
- fragment JobRecordQuestion on JobRecordQuestion {
97
- question
98
- stem
99
- stemFromRecordId
100
- conceptId
101
- typeId
102
- answer
103
- entitlementIds
104
- themeIds
105
- subTypeId
106
- presentationIds
107
- conditionIds
108
- ukmlaTopicId
109
- choices {
110
- label
111
- name
112
- explanation
113
- answer
114
- }
115
- learningPoint
116
- explanation
117
- }
118
- `;
119
- export const JOB_RECORD_CHAPTER_FRAGMENT = gql `
120
- fragment JobRecordChapter on JobRecordChapter {
121
- topic
122
- concept
123
- chapter
124
- }
125
- `;
126
- export const JOB_RECORD_STATION_FRAGMENT = gql `
127
- fragment JobRecordStation on JobRecordStation {
128
- question
129
- }
130
- `;
131
- export const JOB_RECORD_MOCK_TEST_FRAGMENT = gql `
132
- fragment JobRecordMockTest on JobRecordMockTest {
133
- question
134
- conceptId
135
- typeId
136
- answer
137
- choices {
138
- label
139
- name
140
- explanation
141
- answer
142
- }
143
- learningPoint
144
- explanation
145
- }
146
- `;
147
- export const JOB_RECORD_STATUS_FRAGMENT = gql `
148
- fragment JobRecordStatus on JobRecord {
149
- status
150
- }
151
- `;
152
- export const JOB_RECORD_FRAGMENT = gql `
153
- ${JOB_REMARK_FRAGMENT}
154
- ${JOB_RECORD_STATUS_FRAGMENT}
155
- ${JOB_RECORD_QUESTION_FRAGMENT}
156
- ${JOB_RECORD_CHAPTER_FRAGMENT}
157
- ${JOB_RECORD_STATION_FRAGMENT}
158
- ${JOB_RECORD_MOCK_TEST_FRAGMENT}
159
- fragment JobRecord on JobRecord {
160
- id
161
- jobId
162
- index
163
- referenceId
164
- data {
165
- ... on JobRecordQuestion {
166
- ...JobRecordQuestion
167
- }
168
- ... on JobRecordChapter {
169
- ...JobRecordChapter
170
- }
171
- ... on JobRecordStation {
172
- ...JobRecordStation
173
- }
174
- ... on JobRecordMockTest {
175
- ...JobRecordMockTest
176
- }
177
- }
178
- remarks {
179
- ...JobRemark
180
- }
181
- createdByUser {
182
- ...JobUser
183
- }
184
- questionId
185
- stationId
186
- chapterId
187
- createdAt
188
- updatedAt
189
- publishedAt
190
- ...JobRecordStatus
191
- }
192
- `;
193
69
  export const JOB_MEMBER_FRAGMENT = gql `
194
70
  ${JOB_USER_FRAGMENT}
195
71
  fragment JobMember on JobMember {
@@ -0,0 +1,11 @@
1
+ export declare const JOB_USER_FRAGMENT: import("@apollo/client").DocumentNode;
2
+ export declare const JOB_REMARK_FRAGMENT: import("@apollo/client").DocumentNode;
3
+ export declare const JOB_RECORD_METRICS_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
4
+ export declare const JOB_RECORD_CHOICE_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
5
+ export declare const JOB_RECORD_STATISTICS_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;
@@ -0,0 +1,160 @@
1
+ import { gql } from '@apollo/client';
2
+ export const JOB_USER_FRAGMENT = gql `
3
+ fragment JobUser on User {
4
+ id
5
+ username
6
+ firstName
7
+ lastName
8
+ accessLevel
9
+ }
10
+ `;
11
+ export const JOB_REMARK_FRAGMENT = gql `
12
+ ${JOB_USER_FRAGMENT}
13
+ fragment JobRemark on JobRemark {
14
+ id
15
+ createdAt
16
+ jobId
17
+ status
18
+ remark
19
+ recordId
20
+ resolvedAt
21
+ createdByUser {
22
+ ...JobUser
23
+ }
24
+ resolvedByUser {
25
+ ...JobUser
26
+ }
27
+ }
28
+ `;
29
+ export const JOB_RECORD_METRICS_SUMMARY_FRAGMENT = gql `
30
+ fragment JobRecordMetricsSummary on JobRecordMetricsSummary {
31
+ total
32
+ correct
33
+ incorrect
34
+ percentage
35
+ commentCount
36
+ likes
37
+ dislikes
38
+ }
39
+ `;
40
+ export const JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = gql `
41
+ fragment JobRecordChoiceSummary on JobRecordChoiceSummary {
42
+ id
43
+ label
44
+ votes
45
+ percentage
46
+ questionId
47
+ }
48
+ `;
49
+ export const JOB_RECORD_STATISTICS_FRAGMENT = gql `
50
+ ${JOB_RECORD_METRICS_SUMMARY_FRAGMENT}
51
+ ${JOB_RECORD_CHOICE_SUMMARY_FRAGMENT}
52
+ fragment JobRecordStatistics on JobRecord {
53
+ metricsSummary {
54
+ ...JobRecordMetricsSummary
55
+ }
56
+ choiceSummary {
57
+ ...JobRecordChoiceSummary
58
+ }
59
+ }
60
+ `;
61
+ export const JOB_RECORD_QUESTION_FRAGMENT = gql `
62
+ fragment JobRecordQuestion on JobRecordQuestion {
63
+ question
64
+ stem
65
+ stemFromRecordId
66
+ conceptId
67
+ typeId
68
+ answer
69
+ entitlementIds
70
+ themeIds
71
+ subTypeId
72
+ presentationIds
73
+ conditionIds
74
+ ukmlaTopicId
75
+ choices {
76
+ label
77
+ name
78
+ explanation
79
+ answer
80
+ }
81
+ learningPoint
82
+ explanation
83
+ }
84
+ `;
85
+ export const JOB_RECORD_CHAPTER_FRAGMENT = gql `
86
+ fragment JobRecordChapter on JobRecordChapter {
87
+ topic
88
+ concept
89
+ chapter
90
+ }
91
+ `;
92
+ export const JOB_RECORD_STATION_FRAGMENT = gql `
93
+ fragment JobRecordStation on JobRecordStation {
94
+ question
95
+ }
96
+ `;
97
+ export const JOB_RECORD_MOCK_TEST_FRAGMENT = gql `
98
+ fragment JobRecordMockTest on JobRecordMockTest {
99
+ question
100
+ conceptId
101
+ typeId
102
+ answer
103
+ choices {
104
+ label
105
+ name
106
+ explanation
107
+ answer
108
+ }
109
+ learningPoint
110
+ explanation
111
+ }
112
+ `;
113
+ export const JOB_RECORD_STATUS_FRAGMENT = gql `
114
+ fragment JobRecordStatus on JobRecord {
115
+ status
116
+ }
117
+ `;
118
+ export const JOB_RECORD_FRAGMENT = gql `
119
+ ${JOB_REMARK_FRAGMENT}
120
+ ${JOB_RECORD_STATUS_FRAGMENT}
121
+ ${JOB_RECORD_QUESTION_FRAGMENT}
122
+ ${JOB_RECORD_CHAPTER_FRAGMENT}
123
+ ${JOB_RECORD_STATION_FRAGMENT}
124
+ ${JOB_RECORD_MOCK_TEST_FRAGMENT}
125
+ ${JOB_RECORD_STATISTICS_FRAGMENT}
126
+ fragment JobRecord on JobRecord {
127
+ id
128
+ jobId
129
+ index
130
+ referenceId
131
+ data {
132
+ ... on JobRecordQuestion {
133
+ ...JobRecordQuestion
134
+ }
135
+ ... on JobRecordChapter {
136
+ ...JobRecordChapter
137
+ }
138
+ ... on JobRecordStation {
139
+ ...JobRecordStation
140
+ }
141
+ ... on JobRecordMockTest {
142
+ ...JobRecordMockTest
143
+ }
144
+ }
145
+ remarks {
146
+ ...JobRemark
147
+ }
148
+ createdByUser {
149
+ ...JobUser
150
+ }
151
+ questionId
152
+ stationId
153
+ chapterId
154
+ createdAt
155
+ updatedAt
156
+ publishedAt
157
+ ...JobRecordStatus
158
+ ...JobRecordStatistics
159
+ }
160
+ `;
@@ -20,6 +20,7 @@ export interface IRevenue {
20
20
  duration: number;
21
21
  name: string;
22
22
  subscriptionCount: number;
23
+ subscriptionIds: number[];
23
24
  totalEarning: number;
24
25
  invoiceCount: number;
25
26
  breakdown: IRevenue[];
@@ -44,6 +45,9 @@ export type IEarningsVar = {
44
45
  classYear?: string;
45
46
  };
46
47
  export type IEarningsData = AdminData<IRevenue[], 'earnings'>;
48
+ export declare const REFUNDS: import("@apollo/client").DocumentNode;
49
+ export type IRefundsVar = Omit<IEarningsVar, 'useNetEarning'>;
50
+ export type IRefundsData = AdminData<IRevenue[], 'refunds'>;
47
51
  export declare const USER_STATUS: import("@apollo/client").DocumentNode;
48
52
  export interface IUserStatus {
49
53
  total: number;
@@ -72,6 +72,58 @@ export var ESubType;
72
72
  ESubType[ESubType["NEW"] = 1] = "NEW";
73
73
  ESubType[ESubType["OLD"] = 2] = "OLD";
74
74
  })(ESubType || (ESubType = {}));
75
+ export const REFUNDS = gql `
76
+ query Refunds(
77
+ $subType: Int
78
+ $duration: Int
79
+ $from: Date
80
+ $to: Date
81
+ $force: Boolean!
82
+ $source: Int
83
+ $universityId: Int
84
+ $productIds: [Int]
85
+ $countryName: String
86
+ $graduationYear: Int
87
+ $classYear: String
88
+ ) {
89
+ admin {
90
+ refunds(
91
+ subType: $subType
92
+ duration: $duration
93
+ universityId: $universityId
94
+ from: $from
95
+ to: $to
96
+ force: $force
97
+ source: $source
98
+ productIds: $productIds
99
+ countryName: $countryName
100
+ graduationYear: $graduationYear
101
+ classYear: $classYear
102
+ ) {
103
+ entitlement {
104
+ id
105
+ name
106
+ }
107
+ duration
108
+ name
109
+ subscriptionCount
110
+ totalEarning
111
+ invoiceCount
112
+ breakdown {
113
+ entitlement {
114
+ id
115
+ name
116
+ }
117
+ duration
118
+ name
119
+ subscriptionCount
120
+ totalEarning
121
+ invoiceCount
122
+ }
123
+ }
124
+ }
125
+ }
126
+ `;
75
127
  export const USER_STATUS = gql `
76
128
  query UserStatus($from: Date, $to: Date, $force: Boolean!) {
77
129
  admin {
@@ -1,8 +1,12 @@
1
- import { IJob, IJobRecord, Id } from '../../../models';
1
+ import { EJobAttemptType, IJob, IJobRecord, Id } from '../../../models';
2
2
  import { AdminData } from '../../types';
3
3
  export declare const GET_JOB_RECORDS: import("@apollo/client").DocumentNode;
4
+ export interface IJobRecordsFilter {
5
+ attemptType: EJobAttemptType;
6
+ }
4
7
  export type IGetJobRecordsVar = {
5
8
  jobId: IJob['id'];
9
+ filter: IJobRecordsFilter;
6
10
  };
7
11
  export type IGetJobRecordsData = AdminData<IJobRecord[], 'getJobRecords'>;
8
12
  export declare const GET_JOB_RECORD: import("@apollo/client").DocumentNode;
@@ -2,9 +2,9 @@ import { gql } from '@apollo/client';
2
2
  import { JOB_RECORD_FRAGMENT } from '../../fragments';
3
3
  export const GET_JOB_RECORDS = gql `
4
4
  ${JOB_RECORD_FRAGMENT}
5
- query GetJobRecords($jobId: ID!) {
5
+ query GetJobRecords($jobId: ID!, $filter: JobRecordsFilterInput!) {
6
6
  admin {
7
- getJobRecords(jobId: $jobId) {
7
+ getJobRecords(jobId: $jobId, filter: $filter) {
8
8
  ...JobRecord
9
9
  }
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.172",
3
+ "version": "2.6.174",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",