@quesmed/types 2.4.30 → 2.4.31

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,6 +1,5 @@
1
1
  import { IBuildConfigData, IPreBuildMarksheet } from '../resolvers/mutation/restricted/marksheet';
2
2
  import { IPrescribeAnswer, IPrescribeMark, IQuestion, IQuestionChoice, IQuestionQAAnswer } from './Question';
3
- import { ETopicType } from './Topic';
4
3
  import { Id } from './Type';
5
4
  import { IUser } from './User';
6
5
  export declare enum EMarksheetState {
@@ -50,7 +49,6 @@ export interface IMarksheet {
50
49
  startedAt: number | Date;
51
50
  type: EMarksheetType;
52
51
  endedAt: number | Date;
53
- typeId: ETopicType;
54
52
  topicIds: number[];
55
53
  topicNames?: string[];
56
54
  source: string;
@@ -14,7 +14,6 @@ export interface IMockTest {
14
14
  export interface IUserMockTest {
15
15
  id: Id;
16
16
  title: string;
17
- passingMark: number;
18
17
  correct: number;
19
18
  incorrect: number;
20
19
  totalQuestions: number;
@@ -7,8 +7,7 @@ export declare enum ETopicType {
7
7
  ANATOMY = 3,
8
8
  DATA_INTERPRETATION = 4,
9
9
  PSA = 5,
10
- OSCE = 6,
11
- MOCK_TEST = 7
10
+ OSCE = 6
12
11
  }
13
12
  export interface ITopicType {
14
13
  id: ETopicType;
@@ -10,5 +10,4 @@ var ETopicType;
10
10
  ETopicType[ETopicType["DATA_INTERPRETATION"] = 4] = "DATA_INTERPRETATION";
11
11
  ETopicType[ETopicType["PSA"] = 5] = "PSA";
12
12
  ETopicType[ETopicType["OSCE"] = 6] = "OSCE";
13
- ETopicType[ETopicType["MOCK_TEST"] = 7] = "MOCK_TEST";
14
13
  })(ETopicType = exports.ETopicType || (exports.ETopicType = {}));
@@ -6,7 +6,6 @@ exports.MOCK_TEST_FIELDS = (0, client_1.gql) `
6
6
  fragment MockTestFields on MockTest {
7
7
  id
8
8
  title
9
- passingMark
10
9
  correct
11
10
  incorrect
12
11
  totalQuestions
@@ -54,7 +54,6 @@ export declare const updateMarksheets: (cache: ApolloCache<any>, result: ApolloU
54
54
  export declare const optimisticSaveMarksheets: (marksheet: IMarksheet, marksheetInput: ISaveMarksheetInput, questionIndex: number) => ISaveMarksheetsData;
55
55
  export interface ISaveMarksheetsVar {
56
56
  input: ISaveMarksheetInput[];
57
- updatesOnly?: boolean;
58
57
  }
59
58
  export declare type ISaveMarksheetsData = RestrictedData<(graphqlNormalize & IMarksheet)[], 'saveMarksheets'>;
60
59
  /**
@@ -148,7 +147,6 @@ export declare const optimisticModifyMarksheetBuilderConfig: (marksheetId: numbe
148
147
  startedAt: number | Date;
149
148
  type: import("../../../models").EMarksheetType;
150
149
  endedAt: number | Date;
151
- typeId: import("../../../models").ETopicType;
152
150
  topicIds: number[];
153
151
  topicNames?: string[] | undefined;
154
152
  source: string;
@@ -243,7 +241,6 @@ export declare const optimisticEndMarksheet: (marksheet: IMarksheet) => {
243
241
  startedAt: number | Date;
244
242
  type: import("../../../models").EMarksheetType;
245
243
  endedAt: number | Date;
246
- typeId: import("../../../models").ETopicType;
247
244
  topicIds: number[];
248
245
  topicNames?: string[] | undefined;
249
246
  source: string;
@@ -1914,14 +1914,14 @@ const optimisticSaveMarksheets = (marksheet, marksheetInput, questionIndex) => {
1914
1914
  isAnswered: true,
1915
1915
  mark: mark || null,
1916
1916
  };
1917
- const updatedMarks = [
1917
+ const udatedMarks = [
1918
1918
  ...marks.slice(0, questionIndex),
1919
1919
  updatedMark,
1920
1920
  ...marks.slice(questionIndex + 1),
1921
1921
  ];
1922
1922
  return {
1923
1923
  restricted: {
1924
- saveMarksheets: [{ ...rest, marks: updatedMarks }],
1924
+ saveMarksheets: [{ ...rest, marks: udatedMarks }],
1925
1925
  },
1926
1926
  };
1927
1927
  };
@@ -1953,10 +1953,7 @@ exports.ADD_FLAGGED_QUESTION = (0, client_1.gql) `
1953
1953
  exports.REMOVE_FLAGGED_QUESTION = (0, client_1.gql) `
1954
1954
  mutation RemoveFlaggedQuestion($questionId: Int!, $marksheetId: Int) {
1955
1955
  restricted {
1956
- removeFlaggedQuestion(
1957
- questionId: $questionId
1958
- marksheetId: $marksheetId
1959
- ) {
1956
+ removeFlaggedQuestion(questionId: $questionId, marksheetId: $marksheetId) {
1960
1957
  id
1961
1958
  markId
1962
1959
  }
@@ -53,7 +53,6 @@ export declare const optimisticEndMockTest: (marksheet: IMarksheet) => {
53
53
  startedAt: number | Date;
54
54
  type: import("../../../models").EMarksheetType;
55
55
  endedAt: number | Date;
56
- typeId: import("../../../models").ETopicType;
57
56
  topicIds: number[];
58
57
  topicNames?: string[] | undefined;
59
58
  source: string;
@@ -48,7 +48,6 @@ exports.MARKSHEET = (0, client_1.gql) `
48
48
  createdAt
49
49
  startedAt
50
50
  endedAt
51
- typeId
52
51
  isTestMarksheet
53
52
  source
54
53
  correct
@@ -153,10 +152,6 @@ exports.MARKSHEET = (0, client_1.gql) `
153
152
  }
154
153
  }
155
154
  }
156
- topic {
157
- id
158
- name
159
- }
160
155
  videos {
161
156
  id
162
157
  title
@@ -5,7 +5,7 @@ const client_1 = require("@apollo/client");
5
5
  const fragments_1 = require("../../fragments");
6
6
  exports.DASHBOARD_QBANK = (0, client_1.gql) `
7
7
  ${fragments_1.PICTURE_FIELDS}
8
- query Dashboard_Qbank($filter: MarksheetFilterInput!) {
8
+ query Dashboard($filter: MarksheetFilterInput!) {
9
9
  restricted {
10
10
  latestPastMarksheetId
11
11
  latestAgoraId
@@ -47,7 +47,7 @@ exports.TOPICS = (0, client_1.gql) `
47
47
  }
48
48
  `;
49
49
  exports.QUESTION_TOPICS = (0, client_1.gql) `
50
- query Question_Topics($filter: Int!) {
50
+ query Topics($filter: Int!) {
51
51
  restricted {
52
52
  topics(filter: $filter) {
53
53
  id
@@ -69,7 +69,7 @@ exports.QUESTION_TOPICS = (0, client_1.gql) `
69
69
  }
70
70
  `;
71
71
  exports.FLASHCARDS_TOPICS = (0, client_1.gql) `
72
- query Flashcard_Topics($filter: Int!) {
72
+ query Topics($filter: Int!) {
73
73
  restricted {
74
74
  topics(filter: $filter) {
75
75
  id
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.lightgalleryOsceResolve = void 0;
4
- const lightgalleryRegex = /\[lightgallery([0-9]{0,})\]/;
4
+ const lightgalleryRegex = /\[lightgallery([0-9]{0,})\]/g;
5
5
  function isOsceMarksheet(data) {
6
6
  return 'osceStationId' in data;
7
7
  }
@@ -4,6 +4,7 @@ export declare const ALGO_FRACTION: Decimal;
4
4
  export interface IScoreQuesCardInput {
5
5
  cardId: number;
6
6
  score: number;
7
+ timeTaken: number;
7
8
  }
8
9
  export interface IScoreQuesCardVar {
9
10
  input: IScoreQuesCardInput;
@@ -1,6 +1,5 @@
1
1
  import { IBuildConfigData, IPreBuildMarksheet } from '../resolvers/mutation/restricted/marksheet';
2
2
  import { IPrescribeAnswer, IPrescribeMark, IQuestion, IQuestionChoice, IQuestionQAAnswer } from './Question';
3
- import { ETopicType } from './Topic';
4
3
  import { Id } from './Type';
5
4
  import { IUser } from './User';
6
5
  export declare enum EMarksheetState {
@@ -50,7 +49,6 @@ export interface IMarksheet {
50
49
  startedAt: number | Date;
51
50
  type: EMarksheetType;
52
51
  endedAt: number | Date;
53
- typeId: ETopicType;
54
52
  topicIds: number[];
55
53
  topicNames?: string[];
56
54
  source: string;
@@ -14,7 +14,6 @@ export interface IMockTest {
14
14
  export interface IUserMockTest {
15
15
  id: Id;
16
16
  title: string;
17
- passingMark: number;
18
17
  correct: number;
19
18
  incorrect: number;
20
19
  totalQuestions: number;
@@ -7,8 +7,7 @@ export declare enum ETopicType {
7
7
  ANATOMY = 3,
8
8
  DATA_INTERPRETATION = 4,
9
9
  PSA = 5,
10
- OSCE = 6,
11
- MOCK_TEST = 7
10
+ OSCE = 6
12
11
  }
13
12
  export interface ITopicType {
14
13
  id: ETopicType;
@@ -7,5 +7,4 @@ export var ETopicType;
7
7
  ETopicType[ETopicType["DATA_INTERPRETATION"] = 4] = "DATA_INTERPRETATION";
8
8
  ETopicType[ETopicType["PSA"] = 5] = "PSA";
9
9
  ETopicType[ETopicType["OSCE"] = 6] = "OSCE";
10
- ETopicType[ETopicType["MOCK_TEST"] = 7] = "MOCK_TEST";
11
10
  })(ETopicType || (ETopicType = {}));
@@ -3,7 +3,6 @@ export const MOCK_TEST_FIELDS = gql `
3
3
  fragment MockTestFields on MockTest {
4
4
  id
5
5
  title
6
- passingMark
7
6
  correct
8
7
  incorrect
9
8
  totalQuestions
@@ -54,7 +54,6 @@ export declare const updateMarksheets: (cache: ApolloCache<any>, result: ApolloU
54
54
  export declare const optimisticSaveMarksheets: (marksheet: IMarksheet, marksheetInput: ISaveMarksheetInput, questionIndex: number) => ISaveMarksheetsData;
55
55
  export interface ISaveMarksheetsVar {
56
56
  input: ISaveMarksheetInput[];
57
- updatesOnly?: boolean;
58
57
  }
59
58
  export declare type ISaveMarksheetsData = RestrictedData<(graphqlNormalize & IMarksheet)[], 'saveMarksheets'>;
60
59
  /**
@@ -148,7 +147,6 @@ export declare const optimisticModifyMarksheetBuilderConfig: (marksheetId: numbe
148
147
  startedAt: number | Date;
149
148
  type: import("../../../models").EMarksheetType;
150
149
  endedAt: number | Date;
151
- typeId: import("../../../models").ETopicType;
152
150
  topicIds: number[];
153
151
  topicNames?: string[] | undefined;
154
152
  source: string;
@@ -243,7 +241,6 @@ export declare const optimisticEndMarksheet: (marksheet: IMarksheet) => {
243
241
  startedAt: number | Date;
244
242
  type: import("../../../models").EMarksheetType;
245
243
  endedAt: number | Date;
246
- typeId: import("../../../models").ETopicType;
247
244
  topicIds: number[];
248
245
  topicNames?: string[] | undefined;
249
246
  source: string;
@@ -1910,14 +1910,14 @@ export const optimisticSaveMarksheets = (marksheet, marksheetInput, questionInde
1910
1910
  isAnswered: true,
1911
1911
  mark: mark || null,
1912
1912
  };
1913
- const updatedMarks = [
1913
+ const udatedMarks = [
1914
1914
  ...marks.slice(0, questionIndex),
1915
1915
  updatedMark,
1916
1916
  ...marks.slice(questionIndex + 1),
1917
1917
  ];
1918
1918
  return {
1919
1919
  restricted: {
1920
- saveMarksheets: [{ ...rest, marks: updatedMarks }],
1920
+ saveMarksheets: [{ ...rest, marks: udatedMarks }],
1921
1921
  },
1922
1922
  };
1923
1923
  };
@@ -1948,10 +1948,7 @@ export const ADD_FLAGGED_QUESTION = gql `
1948
1948
  export const REMOVE_FLAGGED_QUESTION = gql `
1949
1949
  mutation RemoveFlaggedQuestion($questionId: Int!, $marksheetId: Int) {
1950
1950
  restricted {
1951
- removeFlaggedQuestion(
1952
- questionId: $questionId
1953
- marksheetId: $marksheetId
1954
- ) {
1951
+ removeFlaggedQuestion(questionId: $questionId, marksheetId: $marksheetId) {
1955
1952
  id
1956
1953
  markId
1957
1954
  }
@@ -53,7 +53,6 @@ export declare const optimisticEndMockTest: (marksheet: IMarksheet) => {
53
53
  startedAt: number | Date;
54
54
  type: import("../../../models").EMarksheetType;
55
55
  endedAt: number | Date;
56
- typeId: import("../../../models").ETopicType;
57
56
  topicIds: number[];
58
57
  topicNames?: string[] | undefined;
59
58
  source: string;
@@ -45,7 +45,6 @@ export const MARKSHEET = gql `
45
45
  createdAt
46
46
  startedAt
47
47
  endedAt
48
- typeId
49
48
  isTestMarksheet
50
49
  source
51
50
  correct
@@ -150,10 +149,6 @@ export const MARKSHEET = gql `
150
149
  }
151
150
  }
152
151
  }
153
- topic {
154
- id
155
- name
156
- }
157
152
  videos {
158
153
  id
159
154
  title
@@ -2,7 +2,7 @@ import { gql } from '@apollo/client';
2
2
  import { PICTURE_FIELDS } from '../../fragments';
3
3
  export const DASHBOARD_QBANK = gql `
4
4
  ${PICTURE_FIELDS}
5
- query Dashboard_Qbank($filter: MarksheetFilterInput!) {
5
+ query Dashboard($filter: MarksheetFilterInput!) {
6
6
  restricted {
7
7
  latestPastMarksheetId
8
8
  latestAgoraId
@@ -44,7 +44,7 @@ export const TOPICS = gql `
44
44
  }
45
45
  `;
46
46
  export const QUESTION_TOPICS = gql `
47
- query Question_Topics($filter: Int!) {
47
+ query Topics($filter: Int!) {
48
48
  restricted {
49
49
  topics(filter: $filter) {
50
50
  id
@@ -66,7 +66,7 @@ export const QUESTION_TOPICS = gql `
66
66
  }
67
67
  `;
68
68
  export const FLASHCARDS_TOPICS = gql `
69
- query Flashcard_Topics($filter: Int!) {
69
+ query Topics($filter: Int!) {
70
70
  restricted {
71
71
  topics(filter: $filter) {
72
72
  id
@@ -1,4 +1,4 @@
1
- const lightgalleryRegex = /\[lightgallery([0-9]{0,})\]/;
1
+ const lightgalleryRegex = /\[lightgallery([0-9]{0,})\]/g;
2
2
  function isOsceMarksheet(data) {
3
3
  return 'osceStationId' in data;
4
4
  }
@@ -4,6 +4,7 @@ export declare const ALGO_FRACTION: Decimal;
4
4
  export interface IScoreQuesCardInput {
5
5
  cardId: number;
6
6
  score: number;
7
+ timeTaken: number;
7
8
  }
8
9
  export interface IScoreQuesCardVar {
9
10
  input: IScoreQuesCardInput;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.4.30",
3
+ "version": "2.4.31",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",