@quesmed/types-rn 2.5.76 → 2.5.77

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.
package/models/User.d.ts CHANGED
@@ -9,7 +9,13 @@ import { ITodo } from './Todo';
9
9
  import { Id } from './Type';
10
10
  import { IUniversity } from './University';
11
11
  import { IVideo } from './Video';
12
- export type IAccessLevel = 'subscriber' | 'administrator' | 'tutor';
12
+ export declare enum IAccessLevel {
13
+ SUBSCRIBER = "subscriber",
14
+ ADMINISTRATOR = "administrator",
15
+ TUTOR = "tutor",
16
+ DEMO = "demo",
17
+ EXPIRED = "expired"
18
+ }
13
19
  export type IClassYear = 'Year 1' | 'Year 2' | 'Year 3' | 'Year 4' | 'Year 5' | 'Graduated' | 'PhD' | 'BSc' | 'MSc' | 'Beta Tester';
14
20
  export declare const classYears: IClassYear[];
15
21
  export declare enum EClassYearGroup {
@@ -48,6 +54,7 @@ export interface IPayload {
48
54
  anaestheticsInterviewSubscriptionEndDate: number | null;
49
55
  cstInterviewSubscriptionEndDate: number | null;
50
56
  imtInterviewSubscriptionEndDate: number | null;
57
+ radiologyInterviewSubscriptionEndDate: number | null;
51
58
  ver: number;
52
59
  }
53
60
  export interface IDailyProgressVar {
@@ -123,6 +130,7 @@ export interface IUser {
123
130
  anaestheticsInterviewSubscriptionEndDate: number | Date | null;
124
131
  cstInterviewSubscriptionEndDate: number | Date | null;
125
132
  imtInterviewSubscriptionEndDate: number | Date | null;
133
+ radiologyInterviewSubscriptionEndDate: number | Date | null;
126
134
  questionHighlights?: IQuestionHighlights[];
127
135
  }
128
136
  export declare function currentClassYear(createdAtUnix: number, classYear: IClassYear, compareUnix?: number): IClassYear;
package/models/User.js CHANGED
@@ -1,7 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.currentClassGroup = exports.currentClassYear = exports.EPracticeIntensity = exports.classYearGroup = exports.EUserLearningStatus = exports.EClassYearGroup = exports.classYears = void 0;
3
+ exports.currentClassGroup = exports.currentClassYear = exports.EPracticeIntensity = exports.classYearGroup = exports.EUserLearningStatus = exports.EClassYearGroup = exports.classYears = exports.IAccessLevel = void 0;
4
4
  const luxon_1 = require("luxon");
5
+ var IAccessLevel;
6
+ (function (IAccessLevel) {
7
+ IAccessLevel["SUBSCRIBER"] = "subscriber";
8
+ IAccessLevel["ADMINISTRATOR"] = "administrator";
9
+ IAccessLevel["TUTOR"] = "tutor";
10
+ IAccessLevel["DEMO"] = "demo";
11
+ IAccessLevel["EXPIRED"] = "expired";
12
+ })(IAccessLevel = exports.IAccessLevel || (exports.IAccessLevel = {}));
5
13
  exports.classYears = [
6
14
  'Year 1',
7
15
  'Year 2',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.5.76",
3
+ "version": "2.5.77",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -0,0 +1,4 @@
1
+ export declare enum ESortOrder {
2
+ ASC = 1,
3
+ DESC = 0
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ESortOrder = void 0;
4
+ var ESortOrder;
5
+ (function (ESortOrder) {
6
+ ESortOrder[ESortOrder["ASC"] = 1] = "ASC";
7
+ ESortOrder[ESortOrder["DESC"] = 0] = "DESC";
8
+ })(ESortOrder = exports.ESortOrder || (exports.ESortOrder = {}));
@@ -55,6 +55,7 @@ exports.USER_FIELDS = (0, client_1.gql) `
55
55
  anaestheticsInterviewSubscriptionEndDate
56
56
  cstInterviewSubscriptionEndDate
57
57
  imtInterviewSubscriptionEndDate
58
+ radiologyInterviewSubscriptionEndDate
58
59
 
59
60
  # user-specific keys
60
61
  # marksheets
@@ -4,6 +4,7 @@ import * as query from './query';
4
4
  import * as subscription from './subscription';
5
5
  export * from './apollo';
6
6
  export * from './types';
7
+ export * from './enums';
7
8
  export declare namespace Resolvers {
8
9
  export import Fragment = fragment;
9
10
  export import Muation = mutation;
@@ -33,6 +33,7 @@ const query = __importStar(require("./query"));
33
33
  const subscription = __importStar(require("./subscription"));
34
34
  __exportStar(require("./apollo"), exports);
35
35
  __exportStar(require("./types"), exports);
36
+ __exportStar(require("./enums"), exports);
36
37
  var Resolvers;
37
38
  (function (Resolvers) {
38
39
  Resolvers.Fragment = fragment;
@@ -14,10 +14,20 @@ exports.DUPLICATE_PRESET = (0, client_1.gql) `
14
14
  restricted {
15
15
  duplicatePreset(presetId: $presetId) {
16
16
  id
17
- userId
17
+ createdAt
18
+ updatedAt
18
19
  name
19
- topicType
20
20
  likes
21
+ topicType
22
+ total
23
+ correct
24
+ incorrect
25
+ userId
26
+ university {
27
+ id
28
+ name
29
+ country
30
+ }
21
31
  topics {
22
32
  id
23
33
  name
@@ -35,10 +45,20 @@ exports.EDIT_PRESET = (0, client_1.gql) `
35
45
  restricted {
36
46
  editPreset(presetId: $presetId, data: $data) {
37
47
  id
38
- userId
48
+ createdAt
49
+ updatedAt
39
50
  name
40
- topicType
41
51
  likes
52
+ topicType
53
+ total
54
+ correct
55
+ incorrect
56
+ userId
57
+ university {
58
+ id
59
+ name
60
+ country
61
+ }
42
62
  topics {
43
63
  id
44
64
  name
@@ -57,10 +77,19 @@ exports.CREATE_PRESET = (0, client_1.gql) `
57
77
  createPreset(data: $data) {
58
78
  id
59
79
  createdAt
60
- userId
80
+ updatedAt
61
81
  name
62
- topicType
63
82
  likes
83
+ topicType
84
+ total
85
+ correct
86
+ incorrect
87
+ userId
88
+ university {
89
+ id
90
+ name
91
+ country
92
+ }
64
93
  topics {
65
94
  id
66
95
  name
@@ -1,6 +1,7 @@
1
1
  import { EDifficultyType, Id, IMarksheet, IUserFlaggedQuestion } from '../../../models';
2
2
  import { IPreBuildMarksheet } from '../../mutation/restricted';
3
3
  import { graphqlNormalize, RestrictedData } from '../../types';
4
+ import { ESortOrder } from '../../enums';
4
5
  export interface IMarksheetVar {
5
6
  id: Id;
6
7
  }
@@ -9,7 +10,7 @@ export declare const MARKSHEET: import("@apollo/client").DocumentNode;
9
10
  export interface IMarksheetsVar {
10
11
  filter: {
11
12
  limit: number;
12
- date?: string;
13
+ order?: ESortOrder;
13
14
  offset?: number;
14
15
  solo?: boolean;
15
16
  period?: number;
@@ -18,7 +19,7 @@ export interface IMarksheetsVar {
18
19
  export interface IMarksheetsWindowVar {
19
20
  filter: {
20
21
  limit: number;
21
- order?: string;
22
+ order?: ESortOrder;
22
23
  updatedAt?: Date | number;
23
24
  solo?: boolean;
24
25
  period?: number;
@@ -29,11 +30,15 @@ export type IMarksheetsData = RestrictedData<{
29
30
  total: number;
30
31
  score: number;
31
32
  }, 'marksheets'>;
32
- export type IMarksheetsWindowData = RestrictedData<{
33
- results: (graphqlNormalize & IMarksheet)[];
33
+ export interface IMarksheetsDashboardData {
34
34
  total: number;
35
35
  score: number;
36
- }, 'marksheetsWindow'>;
36
+ results: Array<{
37
+ date: Date | number;
38
+ result: IMarksheet[];
39
+ }>;
40
+ }
41
+ export type IMarksheetsWindowData = RestrictedData<graphqlNormalize & IMarksheetsDashboardData, 'marksheetsWindow'>;
37
42
  export interface PaginatedMarksheets {
38
43
  results: (graphqlNormalize & IMarksheet)[];
39
44
  total: number;
@@ -1022,17 +1022,20 @@ exports.MARKSHEETS_WINDOW = (0, client_1.gql) `
1022
1022
  restricted {
1023
1023
  marksheetsWindow(filter: $filter) {
1024
1024
  results {
1025
- id
1026
- endedAt
1027
- topicNames
1028
- correct
1029
- incorrect
1030
- totalQuestions
1031
- typeId
1032
- isTestMarksheet
1033
- solo
1034
- completed
1035
- updatedAt
1025
+ date
1026
+ result {
1027
+ id
1028
+ endedAt
1029
+ topicNames
1030
+ correct
1031
+ incorrect
1032
+ totalQuestions
1033
+ typeId
1034
+ isTestMarksheet
1035
+ solo
1036
+ completed
1037
+ updatedAt
1038
+ }
1036
1039
  }
1037
1040
  total
1038
1041
  score
@@ -1,6 +1,7 @@
1
1
  import { EDifficultyType, EOsceType, Id, IDashboardOsce, IOsceMarksheet, IOsceStation, IOsceStats } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
3
  import { ITopic } from './../../../models/Topic';
4
+ import { ESortOrder } from '../../enums';
4
5
  export interface IOsceStatsVar {
5
6
  typeId?: EOsceType[];
6
7
  solo: boolean;
@@ -10,6 +11,7 @@ export declare const OSCE_STATS: import("@apollo/client").DocumentNode;
10
11
  export declare const DASHBOARD_OSCE: import("@apollo/client").DocumentNode;
11
12
  export interface IDashboardOsceVar {
12
13
  solo: boolean;
14
+ order?: ESortOrder;
13
15
  }
14
16
  export type IDashboardOsceData = RestrictedData<graphqlNormalize & IDashboardOsce, 'dashboardOsce'>;
15
17
  export declare const OSCE_MARKSHEETS: import("@apollo/client").DocumentNode;
@@ -21,7 +23,7 @@ export type IOsceMarksheetsData = RestrictedData<(graphqlNormalize & IOsceMarksh
21
23
  export interface IOsceMarksheetsWindowVar {
22
24
  filter: {
23
25
  limit: number;
24
- order?: string;
26
+ order?: ESortOrder;
25
27
  updatedAt?: Date | number;
26
28
  solo?: boolean;
27
29
  period?: number;
@@ -31,7 +33,10 @@ export declare const OSCE_MARKSHEET_WINDOW: import("@apollo/client").DocumentNod
31
33
  export interface IOsceMarksheetsDashboardData {
32
34
  total: number;
33
35
  score: number;
34
- results: IOsceMarksheet[];
36
+ results: Array<{
37
+ date: Date | number;
38
+ result: IOsceMarksheet[];
39
+ }>;
35
40
  }
36
41
  export type IOsceMarksheetsWindowData = RestrictedData<graphqlNormalize & IOsceMarksheetsDashboardData, 'osceMarksheetsWindow'>;
37
42
  export declare const OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
@@ -23,9 +23,9 @@ exports.OSCE_STATS = (0, client_1.gql) `
23
23
  }
24
24
  `;
25
25
  exports.DASHBOARD_OSCE = (0, client_1.gql) `
26
- query DashboardOsce($solo: Boolean!) {
26
+ query DashboardOsce($solo: Boolean!, $order: Int) {
27
27
  restricted {
28
- dashboardOsce(solo: $solo) {
28
+ dashboardOsce(solo: $solo, order: $order) {
29
29
  lastSessionId
30
30
  types {
31
31
  id
@@ -63,12 +63,15 @@ exports.OSCE_MARKSHEET_WINDOW = (0, client_1.gql) `
63
63
  restricted {
64
64
  osceMarksheetsWindow(filter: $filter) {
65
65
  results {
66
- ...OsceMarksheetFields
67
- correct
68
- total
69
- osceStation {
70
- ...OsceStationFields
71
- __typename
66
+ date
67
+ result {
68
+ ...OsceMarksheetFields
69
+ correct
70
+ total
71
+ osceStation {
72
+ ...OsceStationFields
73
+ __typename
74
+ }
72
75
  }
73
76
  }
74
77
  score
@@ -125,7 +125,7 @@ exports.DASHBOARD_QBANK = (0, client_1.gql) `
125
125
  `;
126
126
  exports.DASHBOARD = (0, client_1.gql) `
127
127
  ${fragments_1.PICTURE_FIELDS}
128
- query Dashboard($filter: MarksheetFilterInput!) {
128
+ query Dashboard($filter: MarksheetFilterInput!, $order: Int) {
129
129
  restricted {
130
130
  latestPastMarksheetId
131
131
  latestSessionId
@@ -200,7 +200,7 @@ exports.DASHBOARD = (0, client_1.gql) `
200
200
  }
201
201
  total
202
202
  }
203
- topics(filter: 0) {
203
+ topics(filter: 0, order: $order) {
204
204
  id
205
205
  name
206
206
  totalQuestions
@@ -1,5 +1,6 @@
1
1
  import { ETopicType, Id, ITopic, ITopicStats } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
+ import { ESortOrder } from '../../enums';
3
4
  export interface ITopicStatsVar {
4
5
  typeId?: ETopicType[];
5
6
  }
@@ -12,6 +13,7 @@ export type ITopicData = RestrictedData<graphqlNormalize & ITopic, 'topic'>;
12
13
  export declare const TOPIC: import("@apollo/client").DocumentNode;
13
14
  export interface ITopicsVar {
14
15
  filter: ETopicType;
16
+ order?: ESortOrder;
15
17
  }
16
18
  export type ITopicsData = RestrictedData<(graphqlNormalize & ITopic)[], 'topics'>;
17
19
  export declare const TOPICS: import("@apollo/client").DocumentNode;
@@ -54,10 +54,11 @@ exports.TOPIC = (0, client_1.gql) `
54
54
  }
55
55
  }
56
56
  `;
57
+ // TODO: rename filter->typeId
57
58
  exports.TOPICS = (0, client_1.gql) `
58
- query Topics($filter: Int!) {
59
+ query Topics($filter: Int!, $order: Int) {
59
60
  restricted {
60
- topics(filter: $filter) {
61
+ topics(filter: $filter, order: $order) {
61
62
  id
62
63
  name
63
64
  totalQuestions
@@ -1,8 +1,9 @@
1
1
  import { Id, IUniversity } from '../../models';
2
2
  import { graphqlNormalize, RootData } from '../types';
3
+ import { ESortOrder } from '../enums';
3
4
  export interface IUniversitiesVar {
4
5
  id?: Id;
5
- order?: string;
6
+ order?: ESortOrder;
6
7
  }
7
8
  export type IUniversitiesData = RootData<graphqlNormalize & IUniversity[], 'universities'>;
8
9
  export declare const UNIVERSITIES: import("@apollo/client").DocumentNode;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UNIVERSITIES = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  exports.UNIVERSITIES = (0, client_1.gql) `
6
- query universities($id: Int, $order: String) {
6
+ query universities($id: Int, $order: Int) {
7
7
  universities(id: $id, order: $order) {
8
8
  name
9
9
  id