@quesmed/types 2.6.194 → 2.6.196

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.
Files changed (33) hide show
  1. package/dist/cjs/models/Job.d.ts +16 -1
  2. package/dist/cjs/models/Job.js +1 -1
  3. package/dist/cjs/resolvers/fragments/job.js +5 -0
  4. package/dist/cjs/resolvers/fragments/question.js +5 -0
  5. package/dist/cjs/resolvers/fragments/record.js +13 -1
  6. package/dist/cjs/resolvers/mutation/admin/chapter.d.ts +9 -0
  7. package/dist/cjs/resolvers/mutation/admin/chapter.js +15 -0
  8. package/dist/cjs/resolvers/mutation/admin/index.d.ts +1 -0
  9. package/dist/cjs/resolvers/mutation/admin/index.js +1 -0
  10. package/dist/cjs/resolvers/query/admin/chapter.d.ts +7 -0
  11. package/dist/cjs/resolvers/query/admin/chapter.js +17 -0
  12. package/dist/cjs/resolvers/query/admin/index.d.ts +1 -0
  13. package/dist/cjs/resolvers/query/admin/index.js +1 -0
  14. package/dist/cjs/resolvers/query/restricted/analytics.js +1 -0
  15. package/dist/cjs/resolvers/query/restricted/chapter.d.ts +1 -1
  16. package/dist/cjs/resolvers/query/restricted/chapter.js +3 -0
  17. package/dist/mjs/models/Job.d.ts +16 -1
  18. package/dist/mjs/models/Job.js +1 -1
  19. package/dist/mjs/resolvers/fragments/job.js +5 -0
  20. package/dist/mjs/resolvers/fragments/question.js +5 -0
  21. package/dist/mjs/resolvers/fragments/record.js +13 -1
  22. package/dist/mjs/resolvers/mutation/admin/chapter.d.ts +9 -0
  23. package/dist/mjs/resolvers/mutation/admin/chapter.js +12 -0
  24. package/dist/mjs/resolvers/mutation/admin/index.d.ts +1 -0
  25. package/dist/mjs/resolvers/mutation/admin/index.js +1 -0
  26. package/dist/mjs/resolvers/query/admin/chapter.d.ts +7 -0
  27. package/dist/mjs/resolvers/query/admin/chapter.js +14 -0
  28. package/dist/mjs/resolvers/query/admin/index.d.ts +1 -0
  29. package/dist/mjs/resolvers/query/admin/index.js +1 -0
  30. package/dist/mjs/resolvers/query/restricted/analytics.js +1 -0
  31. package/dist/mjs/resolvers/query/restricted/chapter.d.ts +1 -1
  32. package/dist/mjs/resolvers/query/restricted/chapter.js +3 -0
  33. package/package.json +1 -1
@@ -107,6 +107,11 @@ export interface IJobAsset {
107
107
  choiceLabel: string | null;
108
108
  createdAt: Date | number;
109
109
  }
110
+ export interface IRTParameters {
111
+ discrimination: number;
112
+ difficulty: number;
113
+ guessing: number;
114
+ }
110
115
  export interface IJobRecordQuestion {
111
116
  question: string;
112
117
  stem?: string | null;
@@ -125,11 +130,15 @@ export interface IJobRecordQuestion {
125
130
  choices: Array<Pick<IQuestionChoice, 'label' | 'name' | 'answer'> & {
126
131
  explanation?: IQuestionChoice['explanation'];
127
132
  }>;
133
+ irtParameters?: IRTParameters | null;
128
134
  }
129
135
  export interface IJobRecordChapter {
130
- title: string;
136
+ topic: string;
131
137
  concept: string;
132
138
  explanation: string;
139
+ summary: string;
140
+ entitlementIds?: EEntitlementType[] | null;
141
+ topicTypeId?: number | null;
133
142
  }
134
143
  export interface IJobRecordStation {
135
144
  station: string;
@@ -148,6 +157,7 @@ export interface IJobRecordMockTest {
148
157
  choices: Array<Pick<IQuestionChoice, 'label' | 'name' | 'answer'> & {
149
158
  explanation?: IQuestionChoice['explanation'];
150
159
  }>;
160
+ irtParameters?: IRTParameters | null;
151
161
  }
152
162
  export interface IJobRecordMetricsSummary {
153
163
  id: string;
@@ -210,6 +220,11 @@ export interface IJobMetaData {
210
220
  conceptId: number | null;
211
221
  entitlementIds: EEntitlementType[] | null;
212
222
  } | null;
223
+ chapter?: {
224
+ topicId: number | null;
225
+ conceptId: number | null;
226
+ entitlementIds: EEntitlementType[] | null;
227
+ } | null;
213
228
  }
214
229
  export interface IJobChat {
215
230
  id: string;
@@ -121,7 +121,7 @@ const IsJobRecordStation = (record) => {
121
121
  };
122
122
  exports.IsJobRecordStation = IsJobRecordStation;
123
123
  const IsJobRecordChapter = (record) => {
124
- return !!record && typeof record === 'object' && 'chapter' in record;
124
+ return !!record && typeof record === 'object' && 'summary' in record;
125
125
  };
126
126
  exports.IsJobRecordChapter = IsJobRecordChapter;
127
127
  const IsJobRecordQuestionByType = (type, record) => {
@@ -22,6 +22,11 @@ exports.JOB_META_DATA_FRAGMENT = (0, client_1.gql) `
22
22
  title
23
23
  passingMark
24
24
  }
25
+ chapter {
26
+ topicId
27
+ entitlementIds
28
+ # topicTypeId
29
+ }
25
30
  }
26
31
  `;
27
32
  exports.JOB_FIELDS_FRAGMENT = (0, client_1.gql) `
@@ -72,6 +72,11 @@ exports.QUESTION_UCAT_FIELDS = (0, client_1.gql) `
72
72
  name
73
73
  }
74
74
  }
75
+ # irtParameters {
76
+ # discrimination
77
+ # difficulty
78
+ # guessing
79
+ # }
75
80
  timeTaken
76
81
  avgTimeTaken
77
82
  stem {
@@ -110,6 +110,11 @@ exports.JOB_RECORD_QUESTION_FRAGMENT = (0, client_1.gql) `
110
110
  explanation
111
111
  answer
112
112
  }
113
+ irtParameters {
114
+ discrimination
115
+ difficulty
116
+ guessing
117
+ }
113
118
  learningPoint
114
119
  explanation
115
120
  }
@@ -118,7 +123,9 @@ exports.JOB_RECORD_CHAPTER_FRAGMENT = (0, client_1.gql) `
118
123
  fragment JobRecordChapter on JobRecordChapter {
119
124
  topic
120
125
  concept
121
- chapter
126
+ explanation
127
+ summary
128
+ entitlementIds
122
129
  }
123
130
  `;
124
131
  exports.JOB_RECORD_STATION_FRAGMENT = (0, client_1.gql) `
@@ -142,6 +149,11 @@ exports.JOB_RECORD_MOCK_TEST_FRAGMENT = (0, client_1.gql) `
142
149
  explanation
143
150
  answer
144
151
  }
152
+ irtParameters {
153
+ discrimination
154
+ difficulty
155
+ guessing
156
+ }
145
157
  learningPoint
146
158
  explanation
147
159
  }
@@ -0,0 +1,9 @@
1
+ import { IChapter, Id } from '../../../models';
2
+ import { AdminData, graphqlNormalize } from '../../types';
3
+ export declare const UPDATE_CHAPTER: import("@apollo/client").DocumentNode;
4
+ export interface IUpdateChapterVar {
5
+ id: Id;
6
+ explanation?: string;
7
+ summary?: string;
8
+ }
9
+ export type IUpdateChapterData = AdminData<graphqlNormalize & IChapter, 'updateChapter'>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UPDATE_CHAPTER = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ const fragments_1 = require("../../fragments");
6
+ exports.UPDATE_CHAPTER = (0, client_1.gql) `
7
+ ${fragments_1.CHAPTER_FIELDS}
8
+ mutation updateChapter($input: UpdateChapterInput!) {
9
+ admin {
10
+ updateChapter(input: $input) {
11
+ ...ChapterFields
12
+ }
13
+ }
14
+ }
15
+ `;
@@ -1,6 +1,7 @@
1
1
  export * from './ai';
2
2
  export * from './algoliaSync';
3
3
  export * from './assets';
4
+ export * from './chapter';
4
5
  export * from './content';
5
6
  export * from './database';
6
7
  export * from './job';
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./ai"), exports);
18
18
  __exportStar(require("./algoliaSync"), exports);
19
19
  __exportStar(require("./assets"), exports);
20
+ __exportStar(require("./chapter"), exports);
20
21
  __exportStar(require("./content"), exports);
21
22
  __exportStar(require("./database"), exports);
22
23
  __exportStar(require("./job"), exports);
@@ -0,0 +1,7 @@
1
+ import { IChapter } from '../../../models';
2
+ import { AdminData, graphqlNormalize } from '../../types';
3
+ export interface IAdminChapterVar {
4
+ id: number;
5
+ }
6
+ export type IAdminChapterData = AdminData<graphqlNormalize & IChapter, 'chapter'>;
7
+ export declare const ADMIN_CHAPTER: import("@apollo/client").DocumentNode;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ADMIN_CHAPTER = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.ADMIN_CHAPTER = (0, client_1.gql) `
6
+ query AdminChapter($id: Int!) {
7
+ admin {
8
+ chapter(id: $id) {
9
+ id
10
+ explanation
11
+ summary
12
+ createdAt
13
+ updatedAt
14
+ }
15
+ }
16
+ }
17
+ `;
@@ -1,3 +1,4 @@
1
+ export * from './chapter';
1
2
  export * from './dashboard';
2
3
  export * from './database';
3
4
  export * from './getUserToken';
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./chapter"), exports);
17
18
  __exportStar(require("./dashboard"), exports);
18
19
  __exportStar(require("./database"), exports);
19
20
  __exportStar(require("./getUserToken"), exports);
@@ -52,6 +52,7 @@ exports.UCAT_THEME_ANALYTICS = (0, client_1.gql) `
52
52
  marks {
53
53
  questionId
54
54
  updatedAt
55
+ mark
55
56
  marksheet {
56
57
  id
57
58
  isTestMarksheet
@@ -1,5 +1,5 @@
1
- import { graphqlNormalize, RestrictedData } from '../../types';
2
1
  import { IChapter } from '../../../models';
2
+ import { graphqlNormalize, RestrictedData } from '../../types';
3
3
  export interface IChapterVar {
4
4
  id: number;
5
5
  }
@@ -8,6 +8,9 @@ exports.CHAPTER = (0, client_1.gql) `
8
8
  chapter(id: $id) {
9
9
  id
10
10
  explanation
11
+ summary
12
+ createdAt
13
+ updatedAt
11
14
  }
12
15
  }
13
16
  }
@@ -107,6 +107,11 @@ export interface IJobAsset {
107
107
  choiceLabel: string | null;
108
108
  createdAt: Date | number;
109
109
  }
110
+ export interface IRTParameters {
111
+ discrimination: number;
112
+ difficulty: number;
113
+ guessing: number;
114
+ }
110
115
  export interface IJobRecordQuestion {
111
116
  question: string;
112
117
  stem?: string | null;
@@ -125,11 +130,15 @@ export interface IJobRecordQuestion {
125
130
  choices: Array<Pick<IQuestionChoice, 'label' | 'name' | 'answer'> & {
126
131
  explanation?: IQuestionChoice['explanation'];
127
132
  }>;
133
+ irtParameters?: IRTParameters | null;
128
134
  }
129
135
  export interface IJobRecordChapter {
130
- title: string;
136
+ topic: string;
131
137
  concept: string;
132
138
  explanation: string;
139
+ summary: string;
140
+ entitlementIds?: EEntitlementType[] | null;
141
+ topicTypeId?: number | null;
133
142
  }
134
143
  export interface IJobRecordStation {
135
144
  station: string;
@@ -148,6 +157,7 @@ export interface IJobRecordMockTest {
148
157
  choices: Array<Pick<IQuestionChoice, 'label' | 'name' | 'answer'> & {
149
158
  explanation?: IQuestionChoice['explanation'];
150
159
  }>;
160
+ irtParameters?: IRTParameters | null;
151
161
  }
152
162
  export interface IJobRecordMetricsSummary {
153
163
  id: string;
@@ -210,6 +220,11 @@ export interface IJobMetaData {
210
220
  conceptId: number | null;
211
221
  entitlementIds: EEntitlementType[] | null;
212
222
  } | null;
223
+ chapter?: {
224
+ topicId: number | null;
225
+ conceptId: number | null;
226
+ entitlementIds: EEntitlementType[] | null;
227
+ } | null;
213
228
  }
214
229
  export interface IJobChat {
215
230
  id: string;
@@ -115,7 +115,7 @@ export const IsJobRecordStation = (record) => {
115
115
  return !!record && typeof record === 'object' && 'question' in record;
116
116
  };
117
117
  export const IsJobRecordChapter = (record) => {
118
- return !!record && typeof record === 'object' && 'chapter' in record;
118
+ return !!record && typeof record === 'object' && 'summary' in record;
119
119
  };
120
120
  export const IsJobRecordQuestionByType = (type, record) => {
121
121
  return type === EJobType.QUESTION;
@@ -19,6 +19,11 @@ export const JOB_META_DATA_FRAGMENT = gql `
19
19
  title
20
20
  passingMark
21
21
  }
22
+ chapter {
23
+ topicId
24
+ entitlementIds
25
+ # topicTypeId
26
+ }
22
27
  }
23
28
  `;
24
29
  export const JOB_FIELDS_FRAGMENT = gql `
@@ -69,6 +69,11 @@ export const QUESTION_UCAT_FIELDS = gql `
69
69
  name
70
70
  }
71
71
  }
72
+ # irtParameters {
73
+ # discrimination
74
+ # difficulty
75
+ # guessing
76
+ # }
72
77
  timeTaken
73
78
  avgTimeTaken
74
79
  stem {
@@ -107,6 +107,11 @@ export const JOB_RECORD_QUESTION_FRAGMENT = gql `
107
107
  explanation
108
108
  answer
109
109
  }
110
+ irtParameters {
111
+ discrimination
112
+ difficulty
113
+ guessing
114
+ }
110
115
  learningPoint
111
116
  explanation
112
117
  }
@@ -115,7 +120,9 @@ export const JOB_RECORD_CHAPTER_FRAGMENT = gql `
115
120
  fragment JobRecordChapter on JobRecordChapter {
116
121
  topic
117
122
  concept
118
- chapter
123
+ explanation
124
+ summary
125
+ entitlementIds
119
126
  }
120
127
  `;
121
128
  export const JOB_RECORD_STATION_FRAGMENT = gql `
@@ -139,6 +146,11 @@ export const JOB_RECORD_MOCK_TEST_FRAGMENT = gql `
139
146
  explanation
140
147
  answer
141
148
  }
149
+ irtParameters {
150
+ discrimination
151
+ difficulty
152
+ guessing
153
+ }
142
154
  learningPoint
143
155
  explanation
144
156
  }
@@ -0,0 +1,9 @@
1
+ import { IChapter, Id } from '../../../models';
2
+ import { AdminData, graphqlNormalize } from '../../types';
3
+ export declare const UPDATE_CHAPTER: import("@apollo/client").DocumentNode;
4
+ export interface IUpdateChapterVar {
5
+ id: Id;
6
+ explanation?: string;
7
+ summary?: string;
8
+ }
9
+ export type IUpdateChapterData = AdminData<graphqlNormalize & IChapter, 'updateChapter'>;
@@ -0,0 +1,12 @@
1
+ import { gql } from '@apollo/client';
2
+ import { CHAPTER_FIELDS } from '../../fragments';
3
+ export const UPDATE_CHAPTER = gql `
4
+ ${CHAPTER_FIELDS}
5
+ mutation updateChapter($input: UpdateChapterInput!) {
6
+ admin {
7
+ updateChapter(input: $input) {
8
+ ...ChapterFields
9
+ }
10
+ }
11
+ }
12
+ `;
@@ -1,6 +1,7 @@
1
1
  export * from './ai';
2
2
  export * from './algoliaSync';
3
3
  export * from './assets';
4
+ export * from './chapter';
4
5
  export * from './content';
5
6
  export * from './database';
6
7
  export * from './job';
@@ -1,6 +1,7 @@
1
1
  export * from './ai';
2
2
  export * from './algoliaSync';
3
3
  export * from './assets';
4
+ export * from './chapter';
4
5
  export * from './content';
5
6
  export * from './database';
6
7
  export * from './job';
@@ -0,0 +1,7 @@
1
+ import { IChapter } from '../../../models';
2
+ import { AdminData, graphqlNormalize } from '../../types';
3
+ export interface IAdminChapterVar {
4
+ id: number;
5
+ }
6
+ export type IAdminChapterData = AdminData<graphqlNormalize & IChapter, 'chapter'>;
7
+ export declare const ADMIN_CHAPTER: import("@apollo/client").DocumentNode;
@@ -0,0 +1,14 @@
1
+ import { gql } from '@apollo/client';
2
+ export const ADMIN_CHAPTER = gql `
3
+ query AdminChapter($id: Int!) {
4
+ admin {
5
+ chapter(id: $id) {
6
+ id
7
+ explanation
8
+ summary
9
+ createdAt
10
+ updatedAt
11
+ }
12
+ }
13
+ }
14
+ `;
@@ -1,3 +1,4 @@
1
+ export * from './chapter';
1
2
  export * from './dashboard';
2
3
  export * from './database';
3
4
  export * from './getUserToken';
@@ -1,3 +1,4 @@
1
+ export * from './chapter';
1
2
  export * from './dashboard';
2
3
  export * from './database';
3
4
  export * from './getUserToken';
@@ -49,6 +49,7 @@ export const UCAT_THEME_ANALYTICS = gql `
49
49
  marks {
50
50
  questionId
51
51
  updatedAt
52
+ mark
52
53
  marksheet {
53
54
  id
54
55
  isTestMarksheet
@@ -1,5 +1,5 @@
1
- import { graphqlNormalize, RestrictedData } from '../../types';
2
1
  import { IChapter } from '../../../models';
2
+ import { graphqlNormalize, RestrictedData } from '../../types';
3
3
  export interface IChapterVar {
4
4
  id: number;
5
5
  }
@@ -5,6 +5,9 @@ export const CHAPTER = gql `
5
5
  chapter(id: $id) {
6
6
  id
7
7
  explanation
8
+ summary
9
+ createdAt
10
+ updatedAt
8
11
  }
9
12
  }
10
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.194",
3
+ "version": "2.6.196",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",