@quesmed/types-rn 2.6.61 → 2.6.62

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.
@@ -63,7 +63,12 @@ export declare enum EEntitlementType {
63
63
  ANATOMY = 36,
64
64
  PRE_CLINICAL = 37,
65
65
  MRCP_PART_1 = 38,
66
- MRCP_PART_2 = 39
66
+ MRCP_PART_2 = 39,
67
+ INTERVIEW_ANAESTHETICS = 40,
68
+ INTERVIEW_CST = 41,
69
+ INTERVIEW_IMT = 42,
70
+ INTERVIEW_RADIOLOGY = 43,
71
+ PLAB_1 = 44
67
72
  }
68
73
  export interface IProduct {
69
74
  id: Id;
package/models/Product.js CHANGED
@@ -68,6 +68,11 @@ var EEntitlementType;
68
68
  EEntitlementType[EEntitlementType["PRE_CLINICAL"] = 37] = "PRE_CLINICAL";
69
69
  EEntitlementType[EEntitlementType["MRCP_PART_1"] = 38] = "MRCP_PART_1";
70
70
  EEntitlementType[EEntitlementType["MRCP_PART_2"] = 39] = "MRCP_PART_2";
71
+ EEntitlementType[EEntitlementType["INTERVIEW_ANAESTHETICS"] = 40] = "INTERVIEW_ANAESTHETICS";
72
+ EEntitlementType[EEntitlementType["INTERVIEW_CST"] = 41] = "INTERVIEW_CST";
73
+ EEntitlementType[EEntitlementType["INTERVIEW_IMT"] = 42] = "INTERVIEW_IMT";
74
+ EEntitlementType[EEntitlementType["INTERVIEW_RADIOLOGY"] = 43] = "INTERVIEW_RADIOLOGY";
75
+ EEntitlementType[EEntitlementType["PLAB_1"] = 44] = "PLAB_1";
71
76
  })(EEntitlementType = exports.EEntitlementType || (exports.EEntitlementType = {}));
72
77
  var EAppType;
73
78
  (function (EAppType) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.6.61",
3
+ "version": "2.6.62",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -10,22 +10,11 @@ export interface IUpsertChapterNoteVar {
10
10
  chapterId: number;
11
11
  note: string;
12
12
  }
13
- export type IUpsertChapterNoteData = RestrictedData<IUserChapterNote, 'upsertChapterNote'>;
13
+ export type IUpsertChapterNoteData = RestrictedData<graphqlNormalize & Omit<IUserChapterNote, 'chapter'>, 'upsertChapterNote'>;
14
14
  export declare const updateCacheOnUpsertChapterNote: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IUpsertChapterNoteData>, options: ApolloUpdateOptions<IUpsertChapterNoteVar>) => void;
15
15
  export declare const optimisticUpsertChapterNote: (data: IUpsertChapterNoteVar & {
16
16
  userId: number;
17
- }) => {
18
- restricted: {
19
- upsertChapterNote: {
20
- createdAt: Date;
21
- updatedAt: Date;
22
- chapterId: number;
23
- note: string;
24
- userId: number;
25
- __typename: string;
26
- };
27
- };
28
- };
17
+ }) => IUpsertChapterNoteData;
29
18
  /**
30
19
  * addChapterHighlight
31
20
  */
@@ -39,16 +39,18 @@ const updateCacheOnUpsertChapterNote = (cache, result, options) => {
39
39
  };
40
40
  exports.updateCacheOnUpsertChapterNote = updateCacheOnUpsertChapterNote;
41
41
  const optimisticUpsertChapterNote = (data) => {
42
- return {
42
+ const payload = {
43
43
  restricted: {
44
44
  upsertChapterNote: {
45
45
  __typename: 'UserChapterNote',
46
46
  ...data,
47
+ id: Date.now(),
47
48
  createdAt: new Date(),
48
49
  updatedAt: new Date(),
49
50
  },
50
51
  },
51
52
  };
53
+ return payload;
52
54
  };
53
55
  exports.optimisticUpsertChapterNote = optimisticUpsertChapterNote;
54
56
  exports.ADD_CHAPTER_HIGHLIGHT = (0, client_1.gql) `
@@ -149,19 +149,8 @@ export interface IUpsertStationNoteVar {
149
149
  stationId: number;
150
150
  note: string;
151
151
  }
152
- export type IUpsertStationNoteData = RestrictedData<IUserStationNote, 'upsertStationNote'>;
152
+ export type IUpsertStationNoteData = RestrictedData<graphqlNormalize & Omit<IUserStationNote, 'station'>, 'upsertStationNote'>;
153
153
  export declare const updateCacheOnUpsertStationNote: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IUpsertStationNoteData>, options: ApolloUpdateOptions<IUpsertStationNoteVar>) => void;
154
154
  export declare const optimisticUpsertStationNote: (data: IUpsertStationNoteVar & {
155
155
  userId: number;
156
- }) => {
157
- restricted: {
158
- upsertStationNote: {
159
- createdAt: Date;
160
- updatedAt: Date;
161
- stationId: number;
162
- note: string;
163
- userId: number;
164
- __typename: string;
165
- };
166
- };
167
- };
156
+ }) => IUpsertStationNoteData;
@@ -52,7 +52,11 @@ exports.CREATE_OR_JOIN_OSCE_MARKSHEET = (0, client_1.gql) `
52
52
  exports.BUILD_OSCE_MARKSHEET = (0, client_1.gql) `
53
53
  ${fragments_1.OSCE_STATION_FIELDS}
54
54
  ${fragments_1.OSCE_MARKSHEET_FIELDS}
55
- mutation BuildOsceMarksheet($osceStationId: Int!, $osceMarksheetId: Int, $entitlementId: Int) {
55
+ mutation BuildOsceMarksheet(
56
+ $osceStationId: Int!
57
+ $osceMarksheetId: Int
58
+ $entitlementId: Int
59
+ ) {
56
60
  restricted {
57
61
  buildOsceMarksheet(
58
62
  osceStationId: $osceStationId
@@ -332,15 +336,17 @@ const updateCacheOnUpsertStationNote = (cache, result, options) => {
332
336
  };
333
337
  exports.updateCacheOnUpsertStationNote = updateCacheOnUpsertStationNote;
334
338
  const optimisticUpsertStationNote = (data) => {
335
- return {
339
+ const payload = {
336
340
  restricted: {
337
341
  upsertStationNote: {
338
342
  __typename: 'UserStationNote',
339
343
  ...data,
344
+ id: Date.now(),
340
345
  createdAt: new Date(),
341
346
  updatedAt: new Date(),
342
347
  },
343
348
  },
344
349
  };
350
+ return payload;
345
351
  };
346
352
  exports.optimisticUpsertStationNote = optimisticUpsertStationNote;
package/utils/random.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export declare function getRandom<T>(arr: T[], n?: number): T[];
2
+ export declare function randomInt(min?: number, max?: number): number;
package/utils/random.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRandom = void 0;
3
+ exports.randomInt = exports.getRandom = void 0;
4
4
  function getRandom(arr, n) {
5
5
  if (n === undefined || n === null) {
6
6
  n = arr.length;
@@ -18,3 +18,7 @@ function getRandom(arr, n) {
18
18
  return result;
19
19
  }
20
20
  exports.getRandom = getRandom;
21
+ function randomInt(min = 1, max = 100) {
22
+ return Math.floor(Math.random() * (max - min + 1)) + min;
23
+ }
24
+ exports.randomInt = randomInt;