@quesmed/types 2.6.173 → 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.
@@ -144,11 +144,14 @@ export interface IJobRecordMockTest {
144
144
  explanation?: IQuestionChoice['explanation'];
145
145
  }>;
146
146
  }
147
- export interface IJobRecordAttemptSummary {
147
+ export interface IJobRecordMetricsSummary {
148
148
  total: number;
149
149
  correct: number;
150
150
  incorrect: number;
151
151
  percentage: number;
152
+ commentCount: number;
153
+ likes: number;
154
+ dislikes: number;
152
155
  }
153
156
  export interface IJobRecordChoiceVote {
154
157
  id: Id;
@@ -157,10 +160,11 @@ export interface IJobRecordChoiceVote {
157
160
  percentage: number;
158
161
  }
159
162
  export interface IJobRecordChoiceSummary {
160
- total: number;
161
- questionId: number;
163
+ id: Id;
164
+ label: string;
165
+ votes: number;
162
166
  percentage: number;
163
- votes: IJobRecordChoiceVote[];
167
+ questionId: number;
164
168
  }
165
169
  export interface IJobRecord {
166
170
  id: string;
@@ -178,8 +182,8 @@ export interface IJobRecord {
178
182
  stationId: number | null;
179
183
  chapterId: number | null;
180
184
  remarks: IJobRemark[];
181
- attemptSummary: IJobRecordAttemptSummary | null;
182
- choiceSummary: IJobRecordChoiceSummary | null;
185
+ metricsSummary: IJobRecordMetricsSummary | null;
186
+ choiceSummary: IJobRecordChoiceSummary[] | null;
183
187
  }
184
188
  export interface IJobMetaData {
185
189
  productId: EProductType;
@@ -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,19 +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_ATTEMPT_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
9
- export declare const JOB_RECORD_CHOICE_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
10
- export declare const JOB_RECORD_STATISTICS_FRAGMENT: import("@apollo/client").DocumentNode;
11
- export declare const JOB_RECORD_QUESTION_FRAGMENT: import("@apollo/client").DocumentNode;
12
- export declare const JOB_RECORD_CHAPTER_FRAGMENT: import("@apollo/client").DocumentNode;
13
- export declare const JOB_RECORD_STATION_FRAGMENT: import("@apollo/client").DocumentNode;
14
- export declare const JOB_RECORD_MOCK_TEST_FRAGMENT: import("@apollo/client").DocumentNode;
15
- export declare const JOB_RECORD_STATUS_FRAGMENT: import("@apollo/client").DocumentNode;
16
- export declare const JOB_RECORD_FRAGMENT: import("@apollo/client").DocumentNode;
17
6
  export declare const JOB_MEMBER_FRAGMENT: import("@apollo/client").DocumentNode;
18
7
  export declare const JOB_ASSETS_FRAGMENT: import("@apollo/client").DocumentNode;
19
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_RECORD_STATISTICS_FRAGMENT = exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = exports.JOB_RECORD_ATTEMPT_SUMMARY_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,141 +69,8 @@ exports.JOB_HISTORY_FRAGMENT = (0, client_1.gql) `
95
69
  }
96
70
  }
97
71
  `;
98
- exports.JOB_RECORD_ATTEMPT_SUMMARY_FRAGMENT = (0, client_1.gql) `
99
- fragment JobRecordAttemptSummary on JobRecordAttemptSummary {
100
- total
101
- correct
102
- incorrect
103
- percentage
104
- }
105
- `;
106
- exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = (0, client_1.gql) `
107
- fragment JobRecordChoiceSummary on JobRecordChoiceSummary {
108
- total
109
- questionId
110
- percentage
111
- votes {
112
- id
113
- label
114
- votes
115
- percentage
116
- }
117
- }
118
- `;
119
- exports.JOB_RECORD_STATISTICS_FRAGMENT = (0, client_1.gql) `
120
- ${exports.JOB_RECORD_ATTEMPT_SUMMARY_FRAGMENT}
121
- ${exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT}
122
- fragment JobRecordStatistics on JobRecord {
123
- attemptSummary {
124
- ...JobRecordAttemptSummary
125
- }
126
- choiceSummary {
127
- ...JobRecordChoiceSummary
128
- }
129
- }
130
- `;
131
- exports.JOB_RECORD_QUESTION_FRAGMENT = (0, client_1.gql) `
132
- fragment JobRecordQuestion on JobRecordQuestion {
133
- question
134
- stem
135
- stemFromRecordId
136
- conceptId
137
- typeId
138
- answer
139
- entitlementIds
140
- themeIds
141
- subTypeId
142
- presentationIds
143
- conditionIds
144
- ukmlaTopicId
145
- choices {
146
- label
147
- name
148
- explanation
149
- answer
150
- }
151
- learningPoint
152
- explanation
153
- }
154
- `;
155
- exports.JOB_RECORD_CHAPTER_FRAGMENT = (0, client_1.gql) `
156
- fragment JobRecordChapter on JobRecordChapter {
157
- topic
158
- concept
159
- chapter
160
- }
161
- `;
162
- exports.JOB_RECORD_STATION_FRAGMENT = (0, client_1.gql) `
163
- fragment JobRecordStation on JobRecordStation {
164
- question
165
- }
166
- `;
167
- exports.JOB_RECORD_MOCK_TEST_FRAGMENT = (0, client_1.gql) `
168
- fragment JobRecordMockTest on JobRecordMockTest {
169
- question
170
- conceptId
171
- typeId
172
- answer
173
- choices {
174
- label
175
- name
176
- explanation
177
- answer
178
- }
179
- learningPoint
180
- explanation
181
- }
182
- `;
183
- exports.JOB_RECORD_STATUS_FRAGMENT = (0, client_1.gql) `
184
- fragment JobRecordStatus on JobRecord {
185
- status
186
- }
187
- `;
188
- exports.JOB_RECORD_FRAGMENT = (0, client_1.gql) `
189
- ${exports.JOB_REMARK_FRAGMENT}
190
- ${exports.JOB_RECORD_STATUS_FRAGMENT}
191
- ${exports.JOB_RECORD_QUESTION_FRAGMENT}
192
- ${exports.JOB_RECORD_CHAPTER_FRAGMENT}
193
- ${exports.JOB_RECORD_STATION_FRAGMENT}
194
- ${exports.JOB_RECORD_MOCK_TEST_FRAGMENT}
195
- ${exports.JOB_RECORD_STATISTICS_FRAGMENT}
196
- fragment JobRecord on JobRecord {
197
- id
198
- jobId
199
- index
200
- referenceId
201
- data {
202
- ... on JobRecordQuestion {
203
- ...JobRecordQuestion
204
- }
205
- ... on JobRecordChapter {
206
- ...JobRecordChapter
207
- }
208
- ... on JobRecordStation {
209
- ...JobRecordStation
210
- }
211
- ... on JobRecordMockTest {
212
- ...JobRecordMockTest
213
- }
214
- }
215
- remarks {
216
- ...JobRemark
217
- }
218
- createdByUser {
219
- ...JobUser
220
- }
221
- questionId
222
- stationId
223
- chapterId
224
- createdAt
225
- updatedAt
226
- publishedAt
227
- ...JobRecordStatus
228
- ...JobRecordStatistics
229
- }
230
- `;
231
72
  exports.JOB_MEMBER_FRAGMENT = (0, client_1.gql) `
232
- ${exports.JOB_USER_FRAGMENT}
73
+ ${record_1.JOB_USER_FRAGMENT}
233
74
  fragment JobMember on JobMember {
234
75
  id
235
76
  createdAt
@@ -241,7 +82,7 @@ exports.JOB_MEMBER_FRAGMENT = (0, client_1.gql) `
241
82
  }
242
83
  `;
243
84
  exports.JOB_ASSETS_FRAGMENT = (0, client_1.gql) `
244
- ${exports.JOB_USER_FRAGMENT}
85
+ ${record_1.JOB_USER_FRAGMENT}
245
86
  fragment JobAssets on JobAsset {
246
87
  id
247
88
  jobId
@@ -264,7 +105,7 @@ exports.JOB_ASSETS_FRAGMENT = (0, client_1.gql) `
264
105
  exports.LIST_JOB_FRAGMENT = (0, client_1.gql) `
265
106
  ${exports.JOB_FIELDS_FRAGMENT}
266
107
  ${exports.JOB_STATUS_FRAGMENT}
267
- ${exports.JOB_USER_FRAGMENT}
108
+ ${record_1.JOB_USER_FRAGMENT}
268
109
  fragment Job on Job {
269
110
  id
270
111
  updatedAt
@@ -303,8 +144,8 @@ exports.LIMITED_JOB_FRAGMENT = (0, client_1.gql) `
303
144
  exports.FULL_JOB_FRAGMENT = (0, client_1.gql) `
304
145
  ${exports.JOB_FIELDS_FRAGMENT}
305
146
  ${exports.JOB_STATUS_FRAGMENT}
306
- ${exports.JOB_RECORD_FRAGMENT}
307
- ${exports.JOB_REMARK_FRAGMENT}
147
+ ${record_1.JOB_RECORD_FRAGMENT}
148
+ ${record_1.JOB_REMARK_FRAGMENT}
308
149
  ${exports.JOB_MEMBER_FRAGMENT}
309
150
  ${exports.JOB_ASSETS_FRAGMENT}
310
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 {
@@ -144,11 +144,14 @@ export interface IJobRecordMockTest {
144
144
  explanation?: IQuestionChoice['explanation'];
145
145
  }>;
146
146
  }
147
- export interface IJobRecordAttemptSummary {
147
+ export interface IJobRecordMetricsSummary {
148
148
  total: number;
149
149
  correct: number;
150
150
  incorrect: number;
151
151
  percentage: number;
152
+ commentCount: number;
153
+ likes: number;
154
+ dislikes: number;
152
155
  }
153
156
  export interface IJobRecordChoiceVote {
154
157
  id: Id;
@@ -157,10 +160,11 @@ export interface IJobRecordChoiceVote {
157
160
  percentage: number;
158
161
  }
159
162
  export interface IJobRecordChoiceSummary {
160
- total: number;
161
- questionId: number;
163
+ id: Id;
164
+ label: string;
165
+ votes: number;
162
166
  percentage: number;
163
- votes: IJobRecordChoiceVote[];
167
+ questionId: number;
164
168
  }
165
169
  export interface IJobRecord {
166
170
  id: string;
@@ -178,8 +182,8 @@ export interface IJobRecord {
178
182
  stationId: number | null;
179
183
  chapterId: number | null;
180
184
  remarks: IJobRemark[];
181
- attemptSummary: IJobRecordAttemptSummary | null;
182
- choiceSummary: IJobRecordChoiceSummary | null;
185
+ metricsSummary: IJobRecordMetricsSummary | null;
186
+ choiceSummary: IJobRecordChoiceSummary[] | null;
183
187
  }
184
188
  export interface IJobMetaData {
185
189
  productId: EProductType;
@@ -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,19 +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_ATTEMPT_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
9
- export declare const JOB_RECORD_CHOICE_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
10
- export declare const JOB_RECORD_STATISTICS_FRAGMENT: import("@apollo/client").DocumentNode;
11
- export declare const JOB_RECORD_QUESTION_FRAGMENT: import("@apollo/client").DocumentNode;
12
- export declare const JOB_RECORD_CHAPTER_FRAGMENT: import("@apollo/client").DocumentNode;
13
- export declare const JOB_RECORD_STATION_FRAGMENT: import("@apollo/client").DocumentNode;
14
- export declare const JOB_RECORD_MOCK_TEST_FRAGMENT: import("@apollo/client").DocumentNode;
15
- export declare const JOB_RECORD_STATUS_FRAGMENT: import("@apollo/client").DocumentNode;
16
- export declare const JOB_RECORD_FRAGMENT: import("@apollo/client").DocumentNode;
17
6
  export declare const JOB_MEMBER_FRAGMENT: import("@apollo/client").DocumentNode;
18
7
  export declare const JOB_ASSETS_FRAGMENT: import("@apollo/client").DocumentNode;
19
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,139 +66,6 @@ export const JOB_HISTORY_FRAGMENT = gql `
92
66
  }
93
67
  }
94
68
  `;
95
- export const JOB_RECORD_ATTEMPT_SUMMARY_FRAGMENT = gql `
96
- fragment JobRecordAttemptSummary on JobRecordAttemptSummary {
97
- total
98
- correct
99
- incorrect
100
- percentage
101
- }
102
- `;
103
- export const JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = gql `
104
- fragment JobRecordChoiceSummary on JobRecordChoiceSummary {
105
- total
106
- questionId
107
- percentage
108
- votes {
109
- id
110
- label
111
- votes
112
- percentage
113
- }
114
- }
115
- `;
116
- export const JOB_RECORD_STATISTICS_FRAGMENT = gql `
117
- ${JOB_RECORD_ATTEMPT_SUMMARY_FRAGMENT}
118
- ${JOB_RECORD_CHOICE_SUMMARY_FRAGMENT}
119
- fragment JobRecordStatistics on JobRecord {
120
- attemptSummary {
121
- ...JobRecordAttemptSummary
122
- }
123
- choiceSummary {
124
- ...JobRecordChoiceSummary
125
- }
126
- }
127
- `;
128
- export const JOB_RECORD_QUESTION_FRAGMENT = gql `
129
- fragment JobRecordQuestion on JobRecordQuestion {
130
- question
131
- stem
132
- stemFromRecordId
133
- conceptId
134
- typeId
135
- answer
136
- entitlementIds
137
- themeIds
138
- subTypeId
139
- presentationIds
140
- conditionIds
141
- ukmlaTopicId
142
- choices {
143
- label
144
- name
145
- explanation
146
- answer
147
- }
148
- learningPoint
149
- explanation
150
- }
151
- `;
152
- export const JOB_RECORD_CHAPTER_FRAGMENT = gql `
153
- fragment JobRecordChapter on JobRecordChapter {
154
- topic
155
- concept
156
- chapter
157
- }
158
- `;
159
- export const JOB_RECORD_STATION_FRAGMENT = gql `
160
- fragment JobRecordStation on JobRecordStation {
161
- question
162
- }
163
- `;
164
- export const JOB_RECORD_MOCK_TEST_FRAGMENT = gql `
165
- fragment JobRecordMockTest on JobRecordMockTest {
166
- question
167
- conceptId
168
- typeId
169
- answer
170
- choices {
171
- label
172
- name
173
- explanation
174
- answer
175
- }
176
- learningPoint
177
- explanation
178
- }
179
- `;
180
- export const JOB_RECORD_STATUS_FRAGMENT = gql `
181
- fragment JobRecordStatus on JobRecord {
182
- status
183
- }
184
- `;
185
- export const JOB_RECORD_FRAGMENT = gql `
186
- ${JOB_REMARK_FRAGMENT}
187
- ${JOB_RECORD_STATUS_FRAGMENT}
188
- ${JOB_RECORD_QUESTION_FRAGMENT}
189
- ${JOB_RECORD_CHAPTER_FRAGMENT}
190
- ${JOB_RECORD_STATION_FRAGMENT}
191
- ${JOB_RECORD_MOCK_TEST_FRAGMENT}
192
- ${JOB_RECORD_STATISTICS_FRAGMENT}
193
- fragment JobRecord on JobRecord {
194
- id
195
- jobId
196
- index
197
- referenceId
198
- data {
199
- ... on JobRecordQuestion {
200
- ...JobRecordQuestion
201
- }
202
- ... on JobRecordChapter {
203
- ...JobRecordChapter
204
- }
205
- ... on JobRecordStation {
206
- ...JobRecordStation
207
- }
208
- ... on JobRecordMockTest {
209
- ...JobRecordMockTest
210
- }
211
- }
212
- remarks {
213
- ...JobRemark
214
- }
215
- createdByUser {
216
- ...JobUser
217
- }
218
- questionId
219
- stationId
220
- chapterId
221
- createdAt
222
- updatedAt
223
- publishedAt
224
- ...JobRecordStatus
225
- ...JobRecordStatistics
226
- }
227
- `;
228
69
  export const JOB_MEMBER_FRAGMENT = gql `
229
70
  ${JOB_USER_FRAGMENT}
230
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.173",
3
+ "version": "2.6.174",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",