@quesmed/types 2.6.196 → 2.6.198

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 (29) hide show
  1. package/dist/cjs/models/Picture.d.ts +8 -0
  2. package/dist/cjs/models/Question.d.ts +4 -0
  3. package/dist/cjs/resolvers/fragments/picture.js +1 -0
  4. package/dist/cjs/resolvers/fragments/question.d.ts +1 -0
  5. package/dist/cjs/resolvers/fragments/question.js +14 -1
  6. package/dist/cjs/resolvers/mutation/admin/assets.d.ts +19 -1
  7. package/dist/cjs/resolvers/mutation/admin/assets.js +18 -1
  8. package/dist/cjs/resolvers/mutation/admin/chapter.d.ts +2 -1
  9. package/dist/cjs/resolvers/mutation/admin/question.d.ts +7 -1
  10. package/dist/cjs/resolvers/mutation/admin/question.js +8 -1
  11. package/dist/cjs/resolvers/query/admin/chapter.js +5 -0
  12. package/dist/cjs/resolvers/query/admin/question.js +17 -9
  13. package/dist/cjs/resolvers/query/restricted/analytics.d.ts +26 -0
  14. package/dist/cjs/resolvers/query/restricted/analytics.js +30 -1
  15. package/dist/mjs/models/Picture.d.ts +8 -0
  16. package/dist/mjs/models/Question.d.ts +4 -0
  17. package/dist/mjs/resolvers/fragments/picture.js +1 -0
  18. package/dist/mjs/resolvers/fragments/question.d.ts +1 -0
  19. package/dist/mjs/resolvers/fragments/question.js +13 -0
  20. package/dist/mjs/resolvers/mutation/admin/assets.d.ts +19 -1
  21. package/dist/mjs/resolvers/mutation/admin/assets.js +18 -1
  22. package/dist/mjs/resolvers/mutation/admin/chapter.d.ts +2 -1
  23. package/dist/mjs/resolvers/mutation/admin/question.d.ts +7 -1
  24. package/dist/mjs/resolvers/mutation/admin/question.js +7 -0
  25. package/dist/mjs/resolvers/query/admin/chapter.js +5 -0
  26. package/dist/mjs/resolvers/query/admin/question.js +18 -10
  27. package/dist/mjs/resolvers/query/restricted/analytics.d.ts +26 -0
  28. package/dist/mjs/resolvers/query/restricted/analytics.js +29 -0
  29. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import { ELightGalleryType } from './Job';
1
2
  import { EStationPictureType } from './OsceStation';
2
3
  import { ITopic } from './Topic';
3
4
  import { Id } from './Type';
@@ -19,6 +20,7 @@ export interface IPicture {
19
20
  topicId: Id;
20
21
  topic: ITopic;
21
22
  index: number;
23
+ typeId?: ELightGalleryType;
22
24
  }
23
25
  export interface ICardPicture {
24
26
  id: Id;
@@ -50,3 +52,9 @@ export interface IQuestionPicture {
50
52
  picture: IPicture;
51
53
  pictureIdx: number;
52
54
  }
55
+ export interface IAssetBinding {
56
+ id: Id;
57
+ index: number;
58
+ choiceLabel?: string;
59
+ deleted: boolean;
60
+ }
@@ -4,6 +4,7 @@ import { ICondition } from './Condition';
4
4
  import { IQuestionRevision } from './Content';
5
5
  import { EDifficultyType } from './Difficulty';
6
6
  import { IHighlightNode } from './Highlight';
7
+ import { IJobRecord, IJobRecordChoiceSummary, IJobRecordMetricsSummary } from './Job';
7
8
  import { IPicture } from './Picture';
8
9
  import { IPresentation } from './Presentation';
9
10
  import { ITopic } from './Topic';
@@ -116,6 +117,9 @@ export interface IQuestion {
116
117
  avgTimeTaken?: number;
117
118
  revisions?: IQuestionRevision[];
118
119
  entitlements?: IQuestionEntitlement[];
120
+ jobRecord?: IJobRecord | null;
121
+ metricsSummary?: IJobRecordMetricsSummary | null;
122
+ choiceSummary?: IJobRecordChoiceSummary[] | null;
119
123
  }
120
124
  export interface IQuestionChoice {
121
125
  id: Id;
@@ -19,6 +19,7 @@ exports.PICTURE_FIELDS = (0, client_1.gql) `
19
19
  thumbhash
20
20
  index
21
21
  topicId
22
+ typeId
22
23
  topic {
23
24
  id
24
25
  name
@@ -1,3 +1,4 @@
1
+ export declare const QUESTION_STATISTICS_FRAGMENT: import("@apollo/client").DocumentNode;
1
2
  export declare const QUESTION_COMMENT_FIELDS: import("@apollo/client").DocumentNode;
2
3
  export declare const QUESTION_UKMLA_FIELDS: import("@apollo/client").DocumentNode;
3
4
  export declare const QUESTION_UCAT_FIELDS: import("@apollo/client").DocumentNode;
@@ -1,11 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QUESTION_WITH_LEARNING_FIELDS = exports.QUESTION_WITH_COMMENT_FIELDS = exports.QUESTION_WITH_HIGHLIGHT_FIELDS = exports.QUESTION_FIELDS = exports.QUESTION_CATEGORY_FIELDS = exports.QUESTION_UCAT_FIELDS = exports.QUESTION_UKMLA_FIELDS = exports.QUESTION_COMMENT_FIELDS = void 0;
3
+ exports.QUESTION_WITH_LEARNING_FIELDS = exports.QUESTION_WITH_COMMENT_FIELDS = exports.QUESTION_WITH_HIGHLIGHT_FIELDS = exports.QUESTION_FIELDS = exports.QUESTION_CATEGORY_FIELDS = exports.QUESTION_UCAT_FIELDS = exports.QUESTION_UKMLA_FIELDS = exports.QUESTION_COMMENT_FIELDS = exports.QUESTION_STATISTICS_FRAGMENT = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const chapter_1 = require("./chapter");
6
6
  const concept_1 = require("./concept");
7
7
  const highlight_1 = require("./highlight");
8
8
  const picture_1 = require("./picture");
9
+ const record_1 = require("./record");
10
+ exports.QUESTION_STATISTICS_FRAGMENT = (0, client_1.gql) `
11
+ ${record_1.JOB_RECORD_METRICS_SUMMARY_FRAGMENT}
12
+ ${record_1.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT}
13
+ fragment QuestionStatistics on Question {
14
+ metricsSummary {
15
+ ...JobRecordMetricsSummary
16
+ }
17
+ choiceSummary {
18
+ ...JobRecordChoiceSummary
19
+ }
20
+ }
21
+ `;
9
22
  exports.QUESTION_COMMENT_FIELDS = (0, client_1.gql) `
10
23
  fragment QuestionCommentFields on QuestionComment {
11
24
  id
@@ -1,4 +1,4 @@
1
- import { ELightGalleryType, FileData, IJob, IJobAsset, IJobRecord, Id } from '../../../models';
1
+ import { ELightGalleryType, FileData, IJob, IJobAsset, IJobRecord, IPicture, Id } from '../../../models';
2
2
  import { AdminData, graphqlNormalize } from '../../types';
3
3
  export declare const REMOVE_JOB_ASSETS: import("@apollo/client").DocumentNode;
4
4
  export type IRemoveJobAssetsVar = {
@@ -24,3 +24,21 @@ export type ICreateJobAssetsVar = {
24
24
  inputs: IJobAssetInput[];
25
25
  };
26
26
  export type ICreateJobAssetsData = AdminData<(IJobAsset & graphqlNormalize)[], 'createJobAssets'>;
27
+ export interface IAssetInput {
28
+ file: File | FileData;
29
+ caption?: string | null;
30
+ name: string;
31
+ topicId?: Id;
32
+ sensitive: boolean;
33
+ overlay?: boolean;
34
+ }
35
+ export declare const CREATE_ASSETS: import("@apollo/client").DocumentNode;
36
+ export type ICreateAssetsVar = {
37
+ inputs: IAssetInput[];
38
+ };
39
+ export type ICreateAssetsData = AdminData<(IPicture & graphqlNormalize)[], 'createAssets'>;
40
+ export declare const REMOVE_ASSETS: import("@apollo/client").DocumentNode;
41
+ export type IRemoveAssetsVar = {
42
+ ids: Id[];
43
+ };
44
+ export type IRemoveAssetsData = AdminData<boolean, 'removeAssets'>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CREATE_JOB_ASSETS = exports.REMOVE_JOB_ASSETS = void 0;
3
+ exports.REMOVE_ASSETS = exports.CREATE_ASSETS = exports.CREATE_JOB_ASSETS = exports.REMOVE_JOB_ASSETS = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const fragments_1 = require("../../fragments");
6
6
  exports.REMOVE_JOB_ASSETS = (0, client_1.gql) `
@@ -20,3 +20,20 @@ exports.CREATE_JOB_ASSETS = (0, client_1.gql) `
20
20
  }
21
21
  }
22
22
  `;
23
+ exports.CREATE_ASSETS = (0, client_1.gql) `
24
+ ${fragments_1.PICTURE_FIELDS}
25
+ mutation CreateAssets($inputs: [CreateAssetsInput!]!) {
26
+ admin {
27
+ createAssets(inputs: $inputs) {
28
+ ...PictureFields
29
+ }
30
+ }
31
+ }
32
+ `;
33
+ exports.REMOVE_ASSETS = (0, client_1.gql) `
34
+ mutation RemoveAssets($ids: [ID!]!) {
35
+ admin {
36
+ removeAssets(ids: $ids)
37
+ }
38
+ }
39
+ `;
@@ -1,9 +1,10 @@
1
- import { IChapter, Id } from '../../../models';
1
+ import { IAssetBinding, IChapter, Id } from '../../../models';
2
2
  import { AdminData, graphqlNormalize } from '../../types';
3
3
  export declare const UPDATE_CHAPTER: import("@apollo/client").DocumentNode;
4
4
  export interface IUpdateChapterVar {
5
5
  id: Id;
6
6
  explanation?: string;
7
7
  summary?: string;
8
+ assets?: IAssetBinding[];
8
9
  }
9
10
  export type IUpdateChapterData = AdminData<graphqlNormalize & IChapter, 'updateChapter'>;
@@ -1,4 +1,4 @@
1
- import { EEntitlementType, IQuestion, IQuestionCase, IQuestionChoice, Id } from '../../../models';
1
+ import { EEntitlementType, IAssetBinding, IQuestion, IQuestionCase, IQuestionChoice, Id } from '../../../models';
2
2
  import { AdminData, graphqlNormalize } from '../../types';
3
3
  export declare const UPDATE_QUESTION: import("@apollo/client").DocumentNode;
4
4
  export interface IUpdateQuestionVar {
@@ -17,6 +17,7 @@ export interface IUpdateQuestionVar {
17
17
  learningPoint?: string;
18
18
  entitlements?: EEntitlementType[];
19
19
  createRevision?: boolean;
20
+ assets?: IAssetBinding[];
20
21
  }
21
22
  export type IUpdateQuestionData = AdminData<graphqlNormalize & IQuestion, 'updateQuestion'>;
22
23
  export declare const RESET_QUESTION: import("@apollo/client").DocumentNode;
@@ -31,3 +32,8 @@ export interface IManageQuestionCommentVar {
31
32
  operation: 'hide' | 'delete';
32
33
  }
33
34
  export type IManageQuestionCommentData = AdminData<graphqlNormalize & boolean, 'manageQuestionComment'>;
35
+ export declare const DELETE_QUESTIONS: import("@apollo/client").DocumentNode;
36
+ export interface IDeleteQuestionsVar {
37
+ ids: Id[];
38
+ }
39
+ export type IDeleteQuestionsData = AdminData<graphqlNormalize & boolean, 'deleteQuestions'>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MANAGE_QUESTION_COMMENT = exports.RESET_QUESTION = exports.UPDATE_QUESTION = void 0;
3
+ exports.DELETE_QUESTIONS = exports.MANAGE_QUESTION_COMMENT = exports.RESET_QUESTION = exports.UPDATE_QUESTION = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  exports.UPDATE_QUESTION = (0, client_1.gql) `
6
6
  mutation updateQuestion($input: UpdateQuestionInput!) {
@@ -25,3 +25,10 @@ exports.MANAGE_QUESTION_COMMENT = (0, client_1.gql) `
25
25
  }
26
26
  }
27
27
  `;
28
+ exports.DELETE_QUESTIONS = (0, client_1.gql) `
29
+ mutation DeleteQuestions($ids: [ID!]!) {
30
+ admin {
31
+ deleteQuestions(ids: $ids)
32
+ }
33
+ }
34
+ `;
@@ -2,7 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ADMIN_CHAPTER = void 0;
4
4
  const client_1 = require("@apollo/client");
5
+ const fragments_1 = require("../../fragments");
5
6
  exports.ADMIN_CHAPTER = (0, client_1.gql) `
7
+ ${fragments_1.PICTURE_FIELDS}
6
8
  query AdminChapter($id: Int!) {
7
9
  admin {
8
10
  chapter(id: $id) {
@@ -11,6 +13,9 @@ exports.ADMIN_CHAPTER = (0, client_1.gql) `
11
13
  summary
12
14
  createdAt
13
15
  updatedAt
16
+ pictures {
17
+ ...PictureFields
18
+ }
14
19
  }
15
20
  }
16
21
  }
@@ -4,20 +4,15 @@ exports.ADMIN_QUESTION = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const fragments_1 = require("../../fragments");
6
6
  exports.ADMIN_QUESTION = (0, client_1.gql) `
7
+ ${fragments_1.QUESTION_STATISTICS_FRAGMENT}
8
+ ${fragments_1.QUESTION_CATEGORY_FIELDS}
7
9
  ${fragments_1.QUESTION_COMMENT_FIELDS}
8
10
  ${fragments_1.PICTURE_FIELDS}
9
11
  query QuestionData($id: Int!) {
10
12
  admin {
11
13
  question(id: $id) {
12
- ... on QuestionEMQ {
13
- cases {
14
- id
15
- questionId
16
- case
17
- explanation
18
- label
19
- }
20
- }
14
+ ...QuestionCategoryFields
15
+ ...QuestionStatistics
21
16
  id
22
17
  public
23
18
  conceptId
@@ -98,6 +93,9 @@ exports.ADMIN_QUESTION = (0, client_1.gql) `
98
93
  answer
99
94
  votes
100
95
  updatedAt
96
+ picture {
97
+ ...PictureFields
98
+ }
101
99
  }
102
100
  topic {
103
101
  id
@@ -108,6 +106,16 @@ exports.ADMIN_QUESTION = (0, client_1.gql) `
108
106
  name
109
107
  topicId
110
108
  }
109
+ jobRecord {
110
+ id
111
+ jobId
112
+ createdByUser {
113
+ id
114
+ firstName
115
+ lastName
116
+ username
117
+ }
118
+ }
111
119
  }
112
120
  }
113
121
  }
@@ -17,6 +17,32 @@ export interface IUcatAnalytics {
17
17
  }
18
18
  export type IUcatAnalyticsData = RestrictedData<IUcatAnalytics[], 'ucatAnalytics'>;
19
19
  export declare const UCAT_ANALYTICS: import("@apollo/client").DocumentNode;
20
+ export type IUcatOverallPerformanceVar = {
21
+ updatedAt?: Date | number;
22
+ entitlementId?: EEntitlementType;
23
+ };
24
+ export interface IUcatOverallStats {
25
+ date: Date | number;
26
+ correct: number;
27
+ total: number;
28
+ score: number;
29
+ }
30
+ export type IUcatOverallPerformanceData = RestrictedData<IUcatOverallStats[], 'ucatOverallPerformance'>;
31
+ export declare const UCAT_OVERALL_PERFORMANCE: import("@apollo/client").DocumentNode;
32
+ export type IUcatMockPerformanceVar = {
33
+ limit?: number;
34
+ mockTypeId?: number[];
35
+ };
36
+ export interface IUcatMockStats {
37
+ title: string;
38
+ typeId: number;
39
+ date: Date | number;
40
+ total: number;
41
+ correct: number;
42
+ incorrect: number;
43
+ }
44
+ export type IUcatMockPerformanceData = RestrictedData<IUcatMockStats[], 'ucatMockPerformance'>;
45
+ export declare const UCAT_MOCK_PERFORMANCE: import("@apollo/client").DocumentNode;
20
46
  export type IUcatThemeAnalyticsVar = {
21
47
  updatedAt?: Date | number;
22
48
  entitlementId: EEntitlementType;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UCAT_THEME_ANALYTICS = exports.UCAT_ANALYTICS = void 0;
3
+ exports.UCAT_THEME_ANALYTICS = exports.UCAT_MOCK_PERFORMANCE = exports.UCAT_OVERALL_PERFORMANCE = exports.UCAT_ANALYTICS = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const fragments_1 = require("../../fragments");
6
6
  exports.UCAT_ANALYTICS = (0, client_1.gql) `
@@ -29,6 +29,35 @@ exports.UCAT_ANALYTICS = (0, client_1.gql) `
29
29
  }
30
30
  }
31
31
  `;
32
+ exports.UCAT_OVERALL_PERFORMANCE = (0, client_1.gql) `
33
+ query UcatOverallPerformance($updatedAt: Date, $entitlementId: Int) {
34
+ restricted {
35
+ ucatOverallPerformance(
36
+ updatedAt: $updatedAt
37
+ entitlementId: $entitlementId
38
+ ) {
39
+ date
40
+ correct
41
+ total
42
+ score
43
+ }
44
+ }
45
+ }
46
+ `;
47
+ exports.UCAT_MOCK_PERFORMANCE = (0, client_1.gql) `
48
+ query UcatMockPerformance($limit: Int, $mockTypeId: [Int!]) {
49
+ restricted {
50
+ ucatMockPerformance(limit: $limit, mockTypeId: $mockTypeId) {
51
+ title
52
+ typeId
53
+ date
54
+ total
55
+ correct
56
+ incorrect
57
+ }
58
+ }
59
+ }
60
+ `;
32
61
  exports.UCAT_THEME_ANALYTICS = (0, client_1.gql) `
33
62
  ${fragments_1.QUESTION_CATEGORY_FIELDS}
34
63
  query UcatThemeAnalytics(
@@ -1,3 +1,4 @@
1
+ import { ELightGalleryType } from './Job';
1
2
  import { EStationPictureType } from './OsceStation';
2
3
  import { ITopic } from './Topic';
3
4
  import { Id } from './Type';
@@ -19,6 +20,7 @@ export interface IPicture {
19
20
  topicId: Id;
20
21
  topic: ITopic;
21
22
  index: number;
23
+ typeId?: ELightGalleryType;
22
24
  }
23
25
  export interface ICardPicture {
24
26
  id: Id;
@@ -50,3 +52,9 @@ export interface IQuestionPicture {
50
52
  picture: IPicture;
51
53
  pictureIdx: number;
52
54
  }
55
+ export interface IAssetBinding {
56
+ id: Id;
57
+ index: number;
58
+ choiceLabel?: string;
59
+ deleted: boolean;
60
+ }
@@ -4,6 +4,7 @@ import { ICondition } from './Condition';
4
4
  import { IQuestionRevision } from './Content';
5
5
  import { EDifficultyType } from './Difficulty';
6
6
  import { IHighlightNode } from './Highlight';
7
+ import { IJobRecord, IJobRecordChoiceSummary, IJobRecordMetricsSummary } from './Job';
7
8
  import { IPicture } from './Picture';
8
9
  import { IPresentation } from './Presentation';
9
10
  import { ITopic } from './Topic';
@@ -116,6 +117,9 @@ export interface IQuestion {
116
117
  avgTimeTaken?: number;
117
118
  revisions?: IQuestionRevision[];
118
119
  entitlements?: IQuestionEntitlement[];
120
+ jobRecord?: IJobRecord | null;
121
+ metricsSummary?: IJobRecordMetricsSummary | null;
122
+ choiceSummary?: IJobRecordChoiceSummary[] | null;
119
123
  }
120
124
  export interface IQuestionChoice {
121
125
  id: Id;
@@ -16,6 +16,7 @@ export const PICTURE_FIELDS = gql `
16
16
  thumbhash
17
17
  index
18
18
  topicId
19
+ typeId
19
20
  topic {
20
21
  id
21
22
  name
@@ -1,3 +1,4 @@
1
+ export declare const QUESTION_STATISTICS_FRAGMENT: import("@apollo/client").DocumentNode;
1
2
  export declare const QUESTION_COMMENT_FIELDS: import("@apollo/client").DocumentNode;
2
3
  export declare const QUESTION_UKMLA_FIELDS: import("@apollo/client").DocumentNode;
3
4
  export declare const QUESTION_UCAT_FIELDS: import("@apollo/client").DocumentNode;
@@ -3,6 +3,19 @@ import { CHAPTER_FIELDS } from './chapter';
3
3
  import { CONCEPT_FIELDS } from './concept';
4
4
  import { HIGHLIGHT_FIELDS } from './highlight';
5
5
  import { PICTURE_FIELDS } from './picture';
6
+ import { JOB_RECORD_CHOICE_SUMMARY_FRAGMENT, JOB_RECORD_METRICS_SUMMARY_FRAGMENT, } from './record';
7
+ export const QUESTION_STATISTICS_FRAGMENT = gql `
8
+ ${JOB_RECORD_METRICS_SUMMARY_FRAGMENT}
9
+ ${JOB_RECORD_CHOICE_SUMMARY_FRAGMENT}
10
+ fragment QuestionStatistics on Question {
11
+ metricsSummary {
12
+ ...JobRecordMetricsSummary
13
+ }
14
+ choiceSummary {
15
+ ...JobRecordChoiceSummary
16
+ }
17
+ }
18
+ `;
6
19
  export const QUESTION_COMMENT_FIELDS = gql `
7
20
  fragment QuestionCommentFields on QuestionComment {
8
21
  id
@@ -1,4 +1,4 @@
1
- import { ELightGalleryType, FileData, IJob, IJobAsset, IJobRecord, Id } from '../../../models';
1
+ import { ELightGalleryType, FileData, IJob, IJobAsset, IJobRecord, IPicture, Id } from '../../../models';
2
2
  import { AdminData, graphqlNormalize } from '../../types';
3
3
  export declare const REMOVE_JOB_ASSETS: import("@apollo/client").DocumentNode;
4
4
  export type IRemoveJobAssetsVar = {
@@ -24,3 +24,21 @@ export type ICreateJobAssetsVar = {
24
24
  inputs: IJobAssetInput[];
25
25
  };
26
26
  export type ICreateJobAssetsData = AdminData<(IJobAsset & graphqlNormalize)[], 'createJobAssets'>;
27
+ export interface IAssetInput {
28
+ file: File | FileData;
29
+ caption?: string | null;
30
+ name: string;
31
+ topicId?: Id;
32
+ sensitive: boolean;
33
+ overlay?: boolean;
34
+ }
35
+ export declare const CREATE_ASSETS: import("@apollo/client").DocumentNode;
36
+ export type ICreateAssetsVar = {
37
+ inputs: IAssetInput[];
38
+ };
39
+ export type ICreateAssetsData = AdminData<(IPicture & graphqlNormalize)[], 'createAssets'>;
40
+ export declare const REMOVE_ASSETS: import("@apollo/client").DocumentNode;
41
+ export type IRemoveAssetsVar = {
42
+ ids: Id[];
43
+ };
44
+ export type IRemoveAssetsData = AdminData<boolean, 'removeAssets'>;
@@ -1,5 +1,5 @@
1
1
  import { gql } from '@apollo/client';
2
- import { JOB_ASSET_FRAGMENT } from '../../fragments';
2
+ import { JOB_ASSET_FRAGMENT, PICTURE_FIELDS } from '../../fragments';
3
3
  export const REMOVE_JOB_ASSETS = gql `
4
4
  mutation RemoveJobAssets($unlink: Boolean, $ids: [ID!]!) {
5
5
  admin {
@@ -17,3 +17,20 @@ export const CREATE_JOB_ASSETS = gql `
17
17
  }
18
18
  }
19
19
  `;
20
+ export const CREATE_ASSETS = gql `
21
+ ${PICTURE_FIELDS}
22
+ mutation CreateAssets($inputs: [CreateAssetsInput!]!) {
23
+ admin {
24
+ createAssets(inputs: $inputs) {
25
+ ...PictureFields
26
+ }
27
+ }
28
+ }
29
+ `;
30
+ export const REMOVE_ASSETS = gql `
31
+ mutation RemoveAssets($ids: [ID!]!) {
32
+ admin {
33
+ removeAssets(ids: $ids)
34
+ }
35
+ }
36
+ `;
@@ -1,9 +1,10 @@
1
- import { IChapter, Id } from '../../../models';
1
+ import { IAssetBinding, IChapter, Id } from '../../../models';
2
2
  import { AdminData, graphqlNormalize } from '../../types';
3
3
  export declare const UPDATE_CHAPTER: import("@apollo/client").DocumentNode;
4
4
  export interface IUpdateChapterVar {
5
5
  id: Id;
6
6
  explanation?: string;
7
7
  summary?: string;
8
+ assets?: IAssetBinding[];
8
9
  }
9
10
  export type IUpdateChapterData = AdminData<graphqlNormalize & IChapter, 'updateChapter'>;
@@ -1,4 +1,4 @@
1
- import { EEntitlementType, IQuestion, IQuestionCase, IQuestionChoice, Id } from '../../../models';
1
+ import { EEntitlementType, IAssetBinding, IQuestion, IQuestionCase, IQuestionChoice, Id } from '../../../models';
2
2
  import { AdminData, graphqlNormalize } from '../../types';
3
3
  export declare const UPDATE_QUESTION: import("@apollo/client").DocumentNode;
4
4
  export interface IUpdateQuestionVar {
@@ -17,6 +17,7 @@ export interface IUpdateQuestionVar {
17
17
  learningPoint?: string;
18
18
  entitlements?: EEntitlementType[];
19
19
  createRevision?: boolean;
20
+ assets?: IAssetBinding[];
20
21
  }
21
22
  export type IUpdateQuestionData = AdminData<graphqlNormalize & IQuestion, 'updateQuestion'>;
22
23
  export declare const RESET_QUESTION: import("@apollo/client").DocumentNode;
@@ -31,3 +32,8 @@ export interface IManageQuestionCommentVar {
31
32
  operation: 'hide' | 'delete';
32
33
  }
33
34
  export type IManageQuestionCommentData = AdminData<graphqlNormalize & boolean, 'manageQuestionComment'>;
35
+ export declare const DELETE_QUESTIONS: import("@apollo/client").DocumentNode;
36
+ export interface IDeleteQuestionsVar {
37
+ ids: Id[];
38
+ }
39
+ export type IDeleteQuestionsData = AdminData<graphqlNormalize & boolean, 'deleteQuestions'>;
@@ -22,3 +22,10 @@ export const MANAGE_QUESTION_COMMENT = gql `
22
22
  }
23
23
  }
24
24
  `;
25
+ export const DELETE_QUESTIONS = gql `
26
+ mutation DeleteQuestions($ids: [ID!]!) {
27
+ admin {
28
+ deleteQuestions(ids: $ids)
29
+ }
30
+ }
31
+ `;
@@ -1,5 +1,7 @@
1
1
  import { gql } from '@apollo/client';
2
+ import { PICTURE_FIELDS } from '../../fragments';
2
3
  export const ADMIN_CHAPTER = gql `
4
+ ${PICTURE_FIELDS}
3
5
  query AdminChapter($id: Int!) {
4
6
  admin {
5
7
  chapter(id: $id) {
@@ -8,6 +10,9 @@ export const ADMIN_CHAPTER = gql `
8
10
  summary
9
11
  createdAt
10
12
  updatedAt
13
+ pictures {
14
+ ...PictureFields
15
+ }
11
16
  }
12
17
  }
13
18
  }
@@ -1,20 +1,15 @@
1
1
  import { gql } from '@apollo/client';
2
- import { PICTURE_FIELDS, QUESTION_COMMENT_FIELDS } from '../../fragments';
2
+ import { PICTURE_FIELDS, QUESTION_CATEGORY_FIELDS, QUESTION_COMMENT_FIELDS, QUESTION_STATISTICS_FRAGMENT, } from '../../fragments';
3
3
  export const ADMIN_QUESTION = gql `
4
+ ${QUESTION_STATISTICS_FRAGMENT}
5
+ ${QUESTION_CATEGORY_FIELDS}
4
6
  ${QUESTION_COMMENT_FIELDS}
5
7
  ${PICTURE_FIELDS}
6
8
  query QuestionData($id: Int!) {
7
9
  admin {
8
10
  question(id: $id) {
9
- ... on QuestionEMQ {
10
- cases {
11
- id
12
- questionId
13
- case
14
- explanation
15
- label
16
- }
17
- }
11
+ ...QuestionCategoryFields
12
+ ...QuestionStatistics
18
13
  id
19
14
  public
20
15
  conceptId
@@ -95,6 +90,9 @@ export const ADMIN_QUESTION = gql `
95
90
  answer
96
91
  votes
97
92
  updatedAt
93
+ picture {
94
+ ...PictureFields
95
+ }
98
96
  }
99
97
  topic {
100
98
  id
@@ -105,6 +103,16 @@ export const ADMIN_QUESTION = gql `
105
103
  name
106
104
  topicId
107
105
  }
106
+ jobRecord {
107
+ id
108
+ jobId
109
+ createdByUser {
110
+ id
111
+ firstName
112
+ lastName
113
+ username
114
+ }
115
+ }
108
116
  }
109
117
  }
110
118
  }
@@ -17,6 +17,32 @@ export interface IUcatAnalytics {
17
17
  }
18
18
  export type IUcatAnalyticsData = RestrictedData<IUcatAnalytics[], 'ucatAnalytics'>;
19
19
  export declare const UCAT_ANALYTICS: import("@apollo/client").DocumentNode;
20
+ export type IUcatOverallPerformanceVar = {
21
+ updatedAt?: Date | number;
22
+ entitlementId?: EEntitlementType;
23
+ };
24
+ export interface IUcatOverallStats {
25
+ date: Date | number;
26
+ correct: number;
27
+ total: number;
28
+ score: number;
29
+ }
30
+ export type IUcatOverallPerformanceData = RestrictedData<IUcatOverallStats[], 'ucatOverallPerformance'>;
31
+ export declare const UCAT_OVERALL_PERFORMANCE: import("@apollo/client").DocumentNode;
32
+ export type IUcatMockPerformanceVar = {
33
+ limit?: number;
34
+ mockTypeId?: number[];
35
+ };
36
+ export interface IUcatMockStats {
37
+ title: string;
38
+ typeId: number;
39
+ date: Date | number;
40
+ total: number;
41
+ correct: number;
42
+ incorrect: number;
43
+ }
44
+ export type IUcatMockPerformanceData = RestrictedData<IUcatMockStats[], 'ucatMockPerformance'>;
45
+ export declare const UCAT_MOCK_PERFORMANCE: import("@apollo/client").DocumentNode;
20
46
  export type IUcatThemeAnalyticsVar = {
21
47
  updatedAt?: Date | number;
22
48
  entitlementId: EEntitlementType;
@@ -26,6 +26,35 @@ export const UCAT_ANALYTICS = gql `
26
26
  }
27
27
  }
28
28
  `;
29
+ export const UCAT_OVERALL_PERFORMANCE = gql `
30
+ query UcatOverallPerformance($updatedAt: Date, $entitlementId: Int) {
31
+ restricted {
32
+ ucatOverallPerformance(
33
+ updatedAt: $updatedAt
34
+ entitlementId: $entitlementId
35
+ ) {
36
+ date
37
+ correct
38
+ total
39
+ score
40
+ }
41
+ }
42
+ }
43
+ `;
44
+ export const UCAT_MOCK_PERFORMANCE = gql `
45
+ query UcatMockPerformance($limit: Int, $mockTypeId: [Int!]) {
46
+ restricted {
47
+ ucatMockPerformance(limit: $limit, mockTypeId: $mockTypeId) {
48
+ title
49
+ typeId
50
+ date
51
+ total
52
+ correct
53
+ incorrect
54
+ }
55
+ }
56
+ }
57
+ `;
29
58
  export const UCAT_THEME_ANALYTICS = gql `
30
59
  ${QUESTION_CATEGORY_FIELDS}
31
60
  query UcatThemeAnalytics(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.196",
3
+ "version": "2.6.198",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",