@quesmed/types-rn 2.5.94 → 2.5.95

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,4 +1,6 @@
1
+ import { Nullable } from '../resolvers';
1
2
  import { IOsceStation, IOsceStationMark, IOsceType } from './OsceStation';
3
+ import { EPaceMarkType } from './Paces';
2
4
  import { EProductType } from './Product';
3
5
  import { Id } from './Type';
4
6
  import { IUser } from './User';
@@ -15,7 +17,8 @@ export interface IOsceMarksheetMember {
15
17
  export interface IOsceMarksheetMark {
16
18
  id: Id;
17
19
  index: number;
18
- mark: boolean;
20
+ mark: number;
21
+ selectedChoice: Nullable<EPaceMarkType>;
19
22
  osceMarksheetId: Id;
20
23
  osceMarksheet?: IOsceMarksheet;
21
24
  osceStationMarkId: Id;
@@ -1,5 +1,6 @@
1
1
  import { IConcept } from './Concept';
2
2
  import { EDifficultyType } from './Difficulty';
3
+ import { IPaceScore } from './Paces';
3
4
  import { IPicture } from './Picture';
4
5
  import { ITopic } from './Topic';
5
6
  import { Id } from './Type';
@@ -19,6 +20,7 @@ export interface IOsceStationMark {
19
20
  osceStationId: Id;
20
21
  header: string;
21
22
  name: string;
23
+ choices?: IPaceScore[];
22
24
  }
23
25
  export declare enum EOsceType {
24
26
  ALL = 0,
@@ -0,0 +1,45 @@
1
+ import { Nullable } from '../resolvers/types';
2
+ import { IOsceMarksheet } from './OsceMarksheet';
3
+ import { Id } from './Type';
4
+ export declare enum EPaceMarkType {
5
+ SATISFACTORY = 1,
6
+ UN_SATISFACTORY = 2,
7
+ BORDERLINE = 3
8
+ }
9
+ export interface IPaceScore {
10
+ id: string;
11
+ type: EPaceMarkType;
12
+ name: string;
13
+ score: number;
14
+ }
15
+ export interface IPaceTemplate {
16
+ id: number;
17
+ name: string;
18
+ description: string | null;
19
+ }
20
+ export interface IPaceTemplateStation {
21
+ id: number;
22
+ osceStationId: number;
23
+ paceTemplateId: number;
24
+ }
25
+ export interface IPaceTemplateMark {
26
+ id: number;
27
+ paceMarkId: number;
28
+ paceTemplateId: number;
29
+ }
30
+ export interface IPaceMark {
31
+ id: Id;
32
+ header: string;
33
+ satisfactoryText: string;
34
+ unSatisfactoryText: string;
35
+ borderLineText: string;
36
+ }
37
+ export interface IPaceMarksheetMark {
38
+ id: Id;
39
+ index: number;
40
+ mark: Nullable<EPaceMarkType>;
41
+ osceMarksheetId: Id;
42
+ osceMarksheet?: IOsceMarksheet;
43
+ paceMarkId: Id;
44
+ paceMark?: IPaceMark;
45
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EPaceMarkType = void 0;
4
+ var EPaceMarkType;
5
+ (function (EPaceMarkType) {
6
+ EPaceMarkType[EPaceMarkType["SATISFACTORY"] = 1] = "SATISFACTORY";
7
+ EPaceMarkType[EPaceMarkType["UN_SATISFACTORY"] = 2] = "UN_SATISFACTORY";
8
+ EPaceMarkType[EPaceMarkType["BORDERLINE"] = 3] = "BORDERLINE";
9
+ })(EPaceMarkType = exports.EPaceMarkType || (exports.EPaceMarkType = {}));
@@ -28,33 +28,23 @@ export interface IChapterPicture {
28
28
  picture: IPicture;
29
29
  pictureIdx: number;
30
30
  }
31
- export interface IOsceActorPicture {
31
+ export interface IStationPicture {
32
32
  id: Id;
33
33
  pictureId: Id;
34
- osceStationId: Id;
35
34
  picture: IPicture;
36
35
  pictureIdx: number;
37
36
  }
38
- export interface IOsceCandidatePicture {
39
- id: Id;
40
- pictureId: Id;
37
+ export interface IOsceActorPicture extends IStationPicture {
41
38
  osceStationId: Id;
42
- picture: IPicture;
43
- pictureIdx: number;
44
39
  }
45
- export interface IOsceExaminerPicture {
46
- id: Id;
47
- pictureId: Id;
40
+ export interface IOsceCandidatePicture extends IStationPicture {
48
41
  osceStationId: Id;
49
- picture: IPicture;
50
- pictureIdx: number;
51
42
  }
52
- export interface IOsceWalkthroughPicture {
53
- id: Id;
54
- pictureId: Id;
43
+ export interface IOsceExaminerPicture extends IStationPicture {
44
+ osceStationId: Id;
45
+ }
46
+ export interface IOsceWalkthroughPicture extends IStationPicture {
55
47
  osceStationId: Id;
56
- picture: IPicture;
57
- pictureIdx: number;
58
48
  }
59
49
  export interface IQuestionPicture {
60
50
  id: Id;
package/models/index.d.ts CHANGED
@@ -12,6 +12,7 @@ export * from './MockTest';
12
12
  export * from './Notification';
13
13
  export * from './OsceMarksheet';
14
14
  export * from './OsceStation';
15
+ export * from './Paces';
15
16
  export * from './Picture';
16
17
  export * from './Preset';
17
18
  export * from './Product';
package/models/index.js CHANGED
@@ -28,6 +28,7 @@ __exportStar(require("./MockTest"), exports);
28
28
  __exportStar(require("./Notification"), exports);
29
29
  __exportStar(require("./OsceMarksheet"), exports);
30
30
  __exportStar(require("./OsceStation"), exports);
31
+ __exportStar(require("./Paces"), exports);
31
32
  __exportStar(require("./Picture"), exports);
32
33
  __exportStar(require("./Preset"), exports);
33
34
  __exportStar(require("./Product"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.5.94",
3
+ "version": "2.5.95",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -1,4 +1,4 @@
1
- import { EOsceMarksheetAction, EOsceMarksheetState, EOsceRoles, EStudyAction, Id, IOsceMarksheet, IOsceMarksheetMark } from '../../../models';
1
+ import { EOsceMarksheetAction, EOsceMarksheetState, EOsceRoles, EPaceMarkType, EProductType, EStudyAction, Id, IOsceMarksheet, IOsceMarksheetMark } from '../../../models';
2
2
  import { IOsceMatchmakingAction } from '../../subscription/osce';
3
3
  import { graphqlNormalize, RestrictedData } from '../../types';
4
4
  export declare const START_OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
@@ -40,10 +40,10 @@ export type IChangeOsceRoleData = RestrictedData<graphqlNormalize & IOsceMarkshe
40
40
  export declare const MARK_OSCE_MARKSHEET_MARK: import("@apollo/client").DocumentNode;
41
41
  export interface IMarkOsceMarksheetMarkVar {
42
42
  osceMarksheetMarkId: Id;
43
- mark: boolean;
43
+ mark: number | EPaceMarkType;
44
44
  }
45
45
  export type IMarkOsceMarksheetMarkData = RestrictedData<graphqlNormalize & Partial<IOsceMarksheetMark>, 'markOsceMarksheetMark'>;
46
- export declare const optimisticMarkOsceMarksheetMark: (variables: IMarkOsceMarksheetMarkVar) => IMarkOsceMarksheetMarkData;
46
+ export declare const optimisticMarkOsceMarksheetMark: (variables: IMarkOsceMarksheetMarkVar, productType: EProductType) => IMarkOsceMarksheetMarkData;
47
47
  export declare const SELECT_OSCE_STATION: import("@apollo/client").DocumentNode;
48
48
  export interface ISelectOsceMarksheetStationVar {
49
49
  osceMarksheetId: Id;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LEAVE_OSCE_MARKSHEET = exports.END_OSCE_MARKSHEET = exports.MODIFY_OSCE_MARKSHEET = exports.SAVE_OSCE_MARKSHEET = exports.PRESTART_OSCE_MARKSHEET = exports.START_OSCE_TIMER = exports.START_OSCE_MARKSHEET = exports.SELECT_OSCE_STATION = exports.optimisticMarkOsceMarksheetMark = exports.MARK_OSCE_MARKSHEET_MARK = exports.CHANGE_OSCE_ROLE = exports.BUILD_OSCE_MARKSHEET = exports.CREATE_OR_JOIN_OSCE_MARKSHEET = exports.CANCEL_OSCE_MATCHMAKING = exports.CHECK_OSCE_MATCHMAKING = exports.ACCEPT_OSCE_MATCHMAKING = exports.START_OSCE_MATCHMAKING = void 0;
4
4
  const client_1 = require("@apollo/client");
5
+ const models_1 = require("../../../models");
5
6
  const osce_1 = require("../../fragments/osce");
6
7
  const osce_2 = require("./../../fragments/osce");
7
8
  exports.START_OSCE_MATCHMAKING = (0, client_1.gql) `
@@ -77,24 +78,31 @@ exports.CHANGE_OSCE_ROLE = (0, client_1.gql) `
77
78
  }
78
79
  `;
79
80
  exports.MARK_OSCE_MARKSHEET_MARK = (0, client_1.gql) `
80
- mutation MarkOsceMarksheetMark($osceMarksheetMarkId: Int!, $mark: Boolean!) {
81
+ mutation MarkOsceMarksheetMark($osceMarksheetMarkId: Int!, $mark: Int!) {
81
82
  restricted {
82
83
  markOsceMarksheetMark(
83
84
  osceMarksheetMarkId: $osceMarksheetMarkId
84
85
  mark: $mark
85
86
  ) {
86
87
  id
88
+ selectedChoice
87
89
  mark
88
90
  }
89
91
  }
90
92
  }
91
93
  `;
92
- const optimisticMarkOsceMarksheetMark = (variables) => {
94
+ const optimisticMarkOsceMarksheetMark = (variables, productType) => {
95
+ const data = {};
96
+ if (productType === models_1.EProductType.OSCE) {
97
+ data.mark = variables.mark;
98
+ }
99
+ else {
100
+ data.selectedChoice = variables.mark;
101
+ }
93
102
  return {
94
103
  restricted: {
95
104
  markOsceMarksheetMark: {
96
105
  id: variables.osceMarksheetMarkId,
97
- mark: variables.mark,
98
106
  __typename: 'OsceMarksheetMark',
99
107
  },
100
108
  },
@@ -1,3 +1,3 @@
1
- export * from './osce';
2
- export * from './notification';
3
1
  export * from './marksheet';
2
+ export * from './notification';
3
+ export * from './osce';
@@ -14,6 +14,6 @@ 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("./osce"), exports);
18
- __exportStar(require("./notification"), exports);
19
17
  __exportStar(require("./marksheet"), exports);
18
+ __exportStar(require("./notification"), exports);
19
+ __exportStar(require("./osce"), exports);
@@ -8,3 +8,4 @@ export type AdminData<T, K extends keyof any> = {
8
8
  admin: Record<K, T>;
9
9
  };
10
10
  export type RootData<T, K extends keyof any> = Record<K, T>;
11
+ export type Nullable<T> = T | null;