@quesmed/types-rn 2.2.1 → 2.2.2

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/Blog.d.ts CHANGED
@@ -13,3 +13,8 @@ export interface IBlogPost {
13
13
  tags?: IBlogTag[];
14
14
  relatedBlogPosts?: IBlogPost[];
15
15
  }
16
+ export interface IBlogPostTags {
17
+ id: Id;
18
+ blogPostId: Id;
19
+ blogTagId: Id;
20
+ }
package/models/Book.d.ts CHANGED
@@ -20,3 +20,10 @@ export interface IBook {
20
20
  stripePriceId: string;
21
21
  authors: IAuthor[];
22
22
  }
23
+ export interface IBookAuthor {
24
+ id: Id;
25
+ bookId: number;
26
+ book?: IBook;
27
+ authorId: number;
28
+ author?: IAuthor;
29
+ }
@@ -4,3 +4,7 @@ export declare enum EDifficultyType {
4
4
  CHALLENGING = 2,
5
5
  DIFFICULT = 3
6
6
  }
7
+ export interface IDifficultyType {
8
+ id: EDifficultyType;
9
+ name: string;
10
+ }
@@ -77,3 +77,12 @@ export interface IMarksheetMark {
77
77
  mark: IMarksheetMarkJSONB;
78
78
  marksheet?: IMarksheet;
79
79
  }
80
+ export interface IPreBuildMarksheetRef {
81
+ id: Id;
82
+ createdAt: number | Date;
83
+ userId: Id;
84
+ unseen: number[];
85
+ seenCorrect: number[];
86
+ seenIncorrect: number[];
87
+ source: string;
88
+ }
@@ -5,6 +5,7 @@ export interface IMockTest {
5
5
  id: Id;
6
6
  createdAt: number | Date;
7
7
  title: string;
8
+ topicIds: number[];
8
9
  typeId: ETopicType | null;
9
10
  passingMark: number;
10
11
  public: boolean;
@@ -20,3 +21,8 @@ export interface IUserMockTest {
20
21
  lastMarksheetStartedAt?: number | Date;
21
22
  lastMarksheetEndedAt?: number | Date;
22
23
  }
24
+ export interface IMockTestQuestion {
25
+ id: Id;
26
+ mockTestId: number;
27
+ questionId: number;
28
+ }
@@ -8,6 +8,7 @@ export interface IOsceMarksheetMember {
8
8
  userId: Id | null;
9
9
  user: IUser | null;
10
10
  role: EOsceRoles;
11
+ source?: string;
11
12
  }
12
13
  export interface IOsceMarksheetMark {
13
14
  id: Id;
@@ -1,3 +1,4 @@
1
+ import { IConcept } from './Concept';
1
2
  import { EDifficultyType } from './Difficulty';
2
3
  import { IPicture } from './Picture';
3
4
  import { ITopic } from './Topic';
@@ -49,6 +50,13 @@ export interface IOsceStation {
49
50
  lastOsceMarksheetId?: Id;
50
51
  score?: number;
51
52
  }
53
+ export interface IOsceStationTopic {
54
+ id: Id;
55
+ osceStationId: number;
56
+ topicId: number;
57
+ concept?: IConcept;
58
+ osceStation?: IOsceStation;
59
+ }
52
60
  export declare const OSCE_GLOBAL_RATING: {
53
61
  [key: number]: string;
54
62
  };
@@ -12,3 +12,46 @@ export interface IPicture {
12
12
  topicId: Id;
13
13
  topic: ITopic;
14
14
  }
15
+ export interface ICardPicture {
16
+ id: Id;
17
+ pictureId: Id;
18
+ cardId: Id;
19
+ picture: IPicture;
20
+ }
21
+ export interface IChapterPicture {
22
+ id: Id;
23
+ pictureId: Id;
24
+ chapterId: Id;
25
+ picture: IPicture;
26
+ }
27
+ export interface IOsceActorPicture {
28
+ id: Id;
29
+ pictureId: Id;
30
+ osceStationId: Id;
31
+ picture: IPicture;
32
+ }
33
+ export interface IOsceCandidatePicture {
34
+ id: Id;
35
+ pictureId: Id;
36
+ osceStationId: Id;
37
+ picture: IPicture;
38
+ }
39
+ export interface IOsceExaminerPicture {
40
+ id: Id;
41
+ pictureId: Id;
42
+ osceStationId: Id;
43
+ picture: IPicture;
44
+ }
45
+ export interface IOsceWalkthroughPicture {
46
+ id: Id;
47
+ pictureId: Id;
48
+ osceStationId: Id;
49
+ picture: IPicture;
50
+ }
51
+ export interface IQuestionPicture {
52
+ id: Id;
53
+ pictureId: Id;
54
+ questionId: Id;
55
+ choiceId: Id | null;
56
+ picture: IPicture;
57
+ }
@@ -1,6 +1,7 @@
1
1
  import { IConcept } from './Concept';
2
2
  import { EDifficultyType } from './Difficulty';
3
3
  import { IPicture } from './Picture';
4
+ import { ITopic } from './Topic';
4
5
  import { Id } from './Type';
5
6
  import { IUser } from './User';
6
7
  export declare enum EPsaSectionType {
@@ -40,6 +41,15 @@ export interface IQuestionComment {
40
41
  dislikes?: number;
41
42
  isLikedByMe?: EQuestionLike;
42
43
  }
44
+ export interface IQuestionCommentLike {
45
+ createdAt: number | Date;
46
+ updatedAt: number | Date;
47
+ userId: Id;
48
+ user: IUser;
49
+ commentId: Id;
50
+ comment: IQuestionComment;
51
+ likeTrueDislikeFalse: boolean;
52
+ }
43
53
  export declare type IQuestionAnswer = string | [string] | [IQuestionQAAnswer] | [string[], string[]] | IPrescribeAnswer[];
44
54
  export declare type IQuestionAll = IQuestion | IQuestionSBA | IQuestionQA | IQuestionMultiQ | IQuestionPrescribe;
45
55
  export interface IQuestion {
@@ -56,6 +66,7 @@ export interface IQuestion {
56
66
  answer: IQuestionAnswer;
57
67
  totalVotes: number;
58
68
  choices: IQuestionChoice[];
69
+ topic?: ITopic;
59
70
  pictures?: IPicture[];
60
71
  difficulty: EDifficultyType;
61
72
  elo: number;
@@ -74,6 +85,24 @@ export interface IQuestionChoice {
74
85
  votes: number;
75
86
  picture?: IPicture | null;
76
87
  }
88
+ export interface IQuestionElo {
89
+ id: Id;
90
+ date: number | Date;
91
+ questionId: Id;
92
+ question?: IQuestion;
93
+ elo: number;
94
+ }
95
+ export interface IQuestionLike {
96
+ createdAt: number | Date;
97
+ updatedAt: number | Date;
98
+ userId: Id;
99
+ questionId: Id;
100
+ likeTrueDislikeFalse: boolean;
101
+ }
102
+ export interface IQuestionType {
103
+ id: Id;
104
+ name: string;
105
+ }
77
106
  export declare function isQuestionSBA(data: IQuestionAll): data is IQuestionSBA;
78
107
  export interface IQuestionSBA extends IQuestion {
79
108
  answer: [string];
@@ -0,0 +1,11 @@
1
+ import { Id } from "./Type";
2
+ import { IUser } from "./User";
3
+ export interface IReferral {
4
+ id: Id;
5
+ createdAt: number | Date;
6
+ updatedAt: number | Date;
7
+ refereeUserId: Id;
8
+ referredUserId: Id;
9
+ referredUser: IUser;
10
+ applied: boolean;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/models/Todo.d.ts CHANGED
@@ -31,3 +31,11 @@ export interface IPreBuildTodo {
31
31
  seen: number;
32
32
  buildRef: number;
33
33
  }
34
+ export interface IPreBuildTodoRef {
35
+ id: Id;
36
+ createdAt: number | Date;
37
+ userId: Id;
38
+ unseen: number[];
39
+ seen: number[];
40
+ source: string;
41
+ }
@@ -1,5 +1,31 @@
1
+ import { ITopic } from './Topic';
2
+ import { Id } from './Type';
1
3
  export interface IUniversity {
2
4
  id: number;
3
5
  name: string;
4
6
  country: string;
5
7
  }
8
+ export interface IUniversitiesMonthlyLeaderboard {
9
+ id: Id;
10
+ updatedAt: number | Date;
11
+ yearMonth: number;
12
+ universityId: Id;
13
+ university: IUniversity;
14
+ rank: number;
15
+ correct: number;
16
+ incorrect: number;
17
+ topicId: Id;
18
+ topic: ITopic;
19
+ }
20
+ export interface IUniversitiesQuarterlyLeaderboard {
21
+ id: Id;
22
+ updatedAt: number | Date;
23
+ yearQuarter: number;
24
+ universityId: Id;
25
+ university: IUniversity;
26
+ rank: number;
27
+ correct: number;
28
+ incorrect: number;
29
+ topicId: Id;
30
+ topic: ITopic;
31
+ }
package/models/User.d.ts CHANGED
@@ -104,6 +104,7 @@ export interface IUserCompletedCards {
104
104
  userId: Id;
105
105
  concept: IConcept;
106
106
  lastSeen: number | Date;
107
+ reviewDate: number | Date;
107
108
  score: number;
108
109
  iteration: number;
109
110
  optimalFactor: number;
@@ -127,3 +128,24 @@ export interface IUserProgress {
127
128
  correct: number;
128
129
  countCards: number;
129
130
  }
131
+ export interface IResetPasswordToken {
132
+ id: Id;
133
+ userId: Id;
134
+ resetRef: string;
135
+ createdAt: number | Date;
136
+ updatedAt: number | Date;
137
+ isConsumed: boolean;
138
+ }
139
+ export interface IUserElo {
140
+ id: Id;
141
+ date: number | Date;
142
+ userId: Id;
143
+ user?: IUser;
144
+ elo: number;
145
+ }
146
+ export interface IUserQuestionsFirstAttempt {
147
+ createdAt: number | Date;
148
+ userId: Id;
149
+ questionId: Id;
150
+ answer: boolean;
151
+ }
package/models/Video.d.ts CHANGED
@@ -30,3 +30,21 @@ export interface IVideo {
30
30
  sent24hrPushAt: number | Date | null;
31
31
  viewsToday?: number | null;
32
32
  }
33
+ export interface IVideoOsceStation {
34
+ id: Id;
35
+ videoId: number;
36
+ osceStationId: number;
37
+ video: IVideo;
38
+ }
39
+ export interface IVideoConcept {
40
+ id: Id;
41
+ videoId: number;
42
+ conceptId: number;
43
+ video: IVideo;
44
+ }
45
+ export interface IVideoViews {
46
+ id: Id;
47
+ videoId: number;
48
+ date: number | Date;
49
+ views: number;
50
+ }
package/models/index.d.ts CHANGED
@@ -23,3 +23,4 @@ export * from './Type';
23
23
  export * from './University';
24
24
  export * from './User';
25
25
  export * from './Video';
26
+ export * from './Referrals';
package/models/index.js CHANGED
@@ -35,3 +35,4 @@ __exportStar(require("./Type"), exports);
35
35
  __exportStar(require("./University"), exports);
36
36
  __exportStar(require("./User"), exports);
37
37
  __exportStar(require("./Video"), exports);
38
+ __exportStar(require("./Referrals"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -1,6 +1,6 @@
1
1
  import { ApolloCache, ApolloClient } from '@apollo/client';
2
2
  import { ApolloUpdateOptions, ApolloUpdateResultRestricted } from '../..';
3
- import { EDifficultyType, Id } from '../../../models';
3
+ import { Id } from '../../../models';
4
4
  import { graphqlNormalize, RestrictedData } from '../../types';
5
5
  import { EMarksheetAction, EMarksheetState, IMarksheet, IMarksheetMarkJSONB } from './../../../models/Marksheet';
6
6
  import { IUser, IUserFlaggedQuestion } from './../../../models/User';
@@ -115,22 +115,6 @@ export interface IModifyMarksheetInfo {
115
115
  }
116
116
  export declare type IModifyMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'modifyMarksheetInfo'>;
117
117
  export declare const MODIFY_MARKSHEET_INFO: import("@apollo/client").DocumentNode;
118
- /**
119
- * preBuildMarksheet
120
- */
121
- export interface IPreBuildMarksheetVarInput {
122
- topicIds: number[];
123
- conceptIds: number[];
124
- search: string;
125
- marksheetId?: Id;
126
- source: string;
127
- difficulty?: EDifficultyType[];
128
- }
129
- export interface IPreBuildMarksheetVar {
130
- preBuildMarksheet: IPreBuildMarksheetVarInput;
131
- }
132
- export declare type IPreBuildMarksheetData = RestrictedData<graphqlNormalize & IPreBuildMarksheet, 'preBuildMarksheet'>;
133
- export declare const PRE_BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
134
118
  /**
135
119
  * leaveMarksheet
136
120
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.END_MARKSHEET = exports.LEAVE_MARKSHEET = exports.PRE_BUILD_MARKSHEET = exports.MODIFY_MARKSHEET_INFO = exports.START_OR_JOIN_MARKSHEET = exports.REMOVE_FLAGGED_QUESTION = exports.ADD_FLAGGED_QUESTION = exports.optimisticSaveMarksheets = exports.updateMarksheets = exports.SAVE_MARKSHEET = exports.RE_BUILD_MARKSHEET = exports.BUILD_MARKSHEET = void 0;
3
+ exports.END_MARKSHEET = exports.LEAVE_MARKSHEET = exports.MODIFY_MARKSHEET_INFO = exports.START_OR_JOIN_MARKSHEET = exports.REMOVE_FLAGGED_QUESTION = exports.ADD_FLAGGED_QUESTION = exports.optimisticSaveMarksheets = exports.updateMarksheets = exports.SAVE_MARKSHEET = exports.RE_BUILD_MARKSHEET = exports.BUILD_MARKSHEET = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const marksheet_1 = require("../../fragments/marksheet");
6
6
  const restricted_1 = require("../../query/restricted");
@@ -266,18 +266,6 @@ exports.MODIFY_MARKSHEET_INFO = (0, client_1.gql) `
266
266
  }
267
267
  }
268
268
  `;
269
- exports.PRE_BUILD_MARKSHEET = (0, client_1.gql) `
270
- mutation PreBuildMarksheet($preBuildMarksheet: PreBuildMarksheetInput) {
271
- restricted {
272
- preBuildMarksheet(preBuildMarksheet: $preBuildMarksheet) {
273
- unseen
274
- seenCorrect
275
- seenIncorrect
276
- buildRef
277
- }
278
- }
279
- }
280
- `;
281
269
  exports.LEAVE_MARKSHEET = (0, client_1.gql) `
282
270
  mutation LeaveMarksheet($marksheetId: Int!) {
283
271
  restricted {
@@ -1,4 +1,5 @@
1
- import { Id, IMarksheet, IUserFlaggedQuestion } from '../../../models';
1
+ import { EDifficultyType, Id, IMarksheet, IUserFlaggedQuestion } from '../../../models';
2
+ import { IPreBuildMarksheet } from '../../mutation/restricted';
2
3
  import { graphqlNormalize, RestrictedData } from '../../types';
3
4
  export interface IMarksheetVar {
4
5
  id: Id;
@@ -49,3 +50,19 @@ export interface IQbankHeartbeatVar {
49
50
  }
50
51
  export declare type IQBankHeartBeatData = RestrictedData<boolean, 'heartbeatQbank'>;
51
52
  export declare const HEARTBEAT_QBANK: import("@apollo/client").DocumentNode;
53
+ /**
54
+ * preBuildMarksheet
55
+ */
56
+ export interface IPreBuildMarksheetVarInput {
57
+ topicIds: number[];
58
+ conceptIds: number[];
59
+ search: string;
60
+ marksheetId?: Id;
61
+ source: string;
62
+ difficulty?: EDifficultyType[];
63
+ }
64
+ export interface IPreBuildMarksheetVar {
65
+ preBuildMarksheet: IPreBuildMarksheetVarInput;
66
+ }
67
+ export declare type IPreBuildMarksheetData = RestrictedData<graphqlNormalize & IPreBuildMarksheet, 'preBuildMarksheet'>;
68
+ export declare const PRE_BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HEARTBEAT_QBANK = exports.MARKSHEET_FEEDBACK = exports.FLAGGED_QUESTIONS = exports.LATEST_PAST_MARKSHEET_ID = exports.MARKSHEETS = exports.MARKSHEET = void 0;
3
+ exports.PRE_BUILD_MARKSHEET = exports.HEARTBEAT_QBANK = exports.MARKSHEET_FEEDBACK = exports.FLAGGED_QUESTIONS = exports.LATEST_PAST_MARKSHEET_ID = exports.MARKSHEETS = exports.MARKSHEET = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  exports.MARKSHEET = (0, client_1.gql) `
6
6
  query Marksheet($id: Int!) {
@@ -1223,3 +1223,15 @@ exports.HEARTBEAT_QBANK = (0, client_1.gql) `
1223
1223
  }
1224
1224
  }
1225
1225
  `;
1226
+ exports.PRE_BUILD_MARKSHEET = (0, client_1.gql) `
1227
+ query PreBuildMarksheet($preBuildMarksheet: PreBuildMarksheetInput) {
1228
+ restricted {
1229
+ preBuildMarksheet(preBuildMarksheet: $preBuildMarksheet) {
1230
+ unseen
1231
+ seenCorrect
1232
+ seenIncorrect
1233
+ buildRef
1234
+ }
1235
+ }
1236
+ }
1237
+ `;