@quesmed/types 2.0.14 → 2.1.0

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.
Files changed (205) hide show
  1. package/dist/cjs/gql_input_output_types/index.d.ts +2 -2
  2. package/dist/cjs/models/Notification.d.ts +39 -0
  3. package/dist/cjs/models/Notification.js +2 -0
  4. package/dist/cjs/models/OsceMarksheet.js +3 -4
  5. package/dist/cjs/models/Question.d.ts +3 -0
  6. package/dist/cjs/models/Type.d.ts +1 -0
  7. package/dist/cjs/models/User.d.ts +7 -5
  8. package/dist/cjs/models/index.d.ts +1 -0
  9. package/dist/cjs/models/index.js +1 -0
  10. package/dist/cjs/resolvers/apollo.d.ts +1 -3
  11. package/dist/cjs/resolvers/fragments/chapter.js +14 -3
  12. package/dist/cjs/resolvers/fragments/index.d.ts +2 -0
  13. package/dist/cjs/resolvers/fragments/index.js +2 -0
  14. package/dist/cjs/resolvers/fragments/marksheet.d.ts +1 -0
  15. package/dist/cjs/resolvers/fragments/marksheet.js +109 -0
  16. package/dist/cjs/resolvers/fragments/mockTest.d.ts +1 -0
  17. package/dist/cjs/resolvers/fragments/mockTest.js +16 -0
  18. package/dist/cjs/resolvers/fragments/osce.js +1 -0
  19. package/dist/cjs/resolvers/fragments/topic.d.ts +1 -0
  20. package/dist/cjs/resolvers/fragments/topic.js +18 -0
  21. package/dist/cjs/resolvers/fragments/user.js +3 -3
  22. package/dist/cjs/resolvers/mutation/admin/algoliaSync.d.ts +4 -0
  23. package/dist/cjs/resolvers/mutation/admin/algoliaSync.js +30 -0
  24. package/dist/cjs/resolvers/mutation/admin/index.d.ts +1 -0
  25. package/dist/cjs/resolvers/mutation/admin/index.js +1 -0
  26. package/dist/cjs/resolvers/mutation/admin/notification.d.ts +15 -0
  27. package/dist/cjs/resolvers/mutation/admin/notification.js +2 -0
  28. package/dist/cjs/resolvers/mutation/admin/token.d.ts +2 -0
  29. package/dist/cjs/resolvers/mutation/admin/token.js +16 -0
  30. package/dist/cjs/resolvers/mutation/restricted/contactUs.d.ts +1 -0
  31. package/dist/cjs/resolvers/mutation/restricted/contactUs.js +13 -0
  32. package/dist/cjs/resolvers/mutation/restricted/index.d.ts +1 -0
  33. package/dist/cjs/resolvers/mutation/restricted/index.js +1 -0
  34. package/dist/cjs/resolvers/mutation/restricted/marksheet.d.ts +5 -0
  35. package/dist/cjs/resolvers/mutation/restricted/marksheet.js +92 -0
  36. package/dist/cjs/resolvers/mutation/restricted/mockTest.d.ts +3 -0
  37. package/dist/cjs/resolvers/mutation/restricted/mockTest.js +29 -0
  38. package/dist/cjs/resolvers/mutation/restricted/notification.d.ts +28 -0
  39. package/dist/cjs/resolvers/mutation/restricted/notification.js +2 -0
  40. package/dist/cjs/resolvers/mutation/restricted/questionDiscussion.d.ts +5 -1
  41. package/dist/cjs/resolvers/mutation/restricted/questionDiscussion.js +152 -0
  42. package/dist/cjs/resolvers/mutation/restricted/todo.d.ts +8 -0
  43. package/dist/cjs/resolvers/mutation/restricted/todo.js +150 -0
  44. package/dist/cjs/resolvers/mutation/restricted/token.d.ts +2 -0
  45. package/dist/cjs/resolvers/mutation/restricted/token.js +19 -0
  46. package/dist/cjs/resolvers/mutation/restricted/users.d.ts +3 -0
  47. package/dist/cjs/resolvers/mutation/restricted/users.js +24 -1
  48. package/dist/cjs/resolvers/mutation/restricted/video.d.ts +1 -0
  49. package/dist/cjs/resolvers/mutation/restricted/video.js +13 -0
  50. package/dist/cjs/resolvers/mutation/stripe.d.ts +2 -0
  51. package/dist/cjs/resolvers/mutation/stripe.js +12 -0
  52. package/dist/cjs/resolvers/mutation/users.d.ts +4 -0
  53. package/dist/cjs/resolvers/mutation/users.js +22 -0
  54. package/dist/cjs/resolvers/mutation/validUserToken/user.d.ts +2 -0
  55. package/dist/cjs/resolvers/mutation/validUserToken/user.js +16 -0
  56. package/dist/cjs/resolvers/query/admin/getUserToken.d.ts +1 -0
  57. package/dist/cjs/resolvers/query/admin/getUserToken.js +9 -0
  58. package/dist/cjs/resolvers/query/author.d.ts +1 -0
  59. package/dist/cjs/resolvers/query/author.js +16 -0
  60. package/dist/cjs/resolvers/query/book.d.ts +3 -1
  61. package/dist/cjs/resolvers/query/book.js +42 -0
  62. package/dist/cjs/resolvers/query/feedback.d.ts +2 -0
  63. package/dist/cjs/resolvers/query/feedback.js +12 -0
  64. package/dist/cjs/resolvers/query/restricted/global.d.ts +2 -0
  65. package/dist/cjs/resolvers/query/restricted/global.js +16 -0
  66. package/dist/cjs/resolvers/query/restricted/index.d.ts +2 -0
  67. package/dist/cjs/resolvers/query/restricted/index.js +2 -0
  68. package/dist/cjs/resolvers/query/restricted/marksheet.d.ts +6 -0
  69. package/dist/cjs/resolvers/query/restricted/marksheet.js +996 -0
  70. package/dist/cjs/resolvers/query/restricted/mockTests.d.ts +2 -0
  71. package/dist/cjs/resolvers/query/restricted/mockTests.js +23 -0
  72. package/dist/cjs/resolvers/query/restricted/notification.d.ts +9 -0
  73. package/dist/cjs/resolvers/query/restricted/notification.js +2 -0
  74. package/dist/cjs/resolvers/query/restricted/osce.js +2 -2
  75. package/dist/cjs/resolvers/query/restricted/qBank.d.ts +18 -0
  76. package/dist/cjs/resolvers/query/restricted/qBank.js +77 -0
  77. package/dist/cjs/resolvers/query/restricted/quesBook.d.ts +2 -1
  78. package/dist/cjs/resolvers/query/restricted/quesBook.js +39 -1
  79. package/dist/cjs/resolvers/query/restricted/replication.d.ts +2 -3
  80. package/dist/cjs/resolvers/query/restricted/todos.d.ts +3 -1
  81. package/dist/cjs/resolvers/query/restricted/todos.js +63 -0
  82. package/dist/cjs/resolvers/query/restricted/topics.d.ts +2 -0
  83. package/dist/cjs/resolvers/query/restricted/topics.js +38 -0
  84. package/dist/cjs/resolvers/query/restricted/university.d.ts +1 -0
  85. package/dist/cjs/resolvers/query/restricted/university.js +23 -0
  86. package/dist/cjs/resolvers/query/restricted/user.d.ts +2 -2
  87. package/dist/cjs/resolvers/query/restricted/user.js +24 -0
  88. package/dist/cjs/resolvers/query/restricted/video.d.ts +5 -3
  89. package/dist/cjs/resolvers/query/restricted/video.js +98 -0
  90. package/dist/cjs/resolvers/query/sample.js +4 -0
  91. package/dist/cjs/resolvers/query/subscription.d.ts +1 -0
  92. package/dist/cjs/resolvers/query/subscription.js +18 -0
  93. package/dist/cjs/resolvers/query/university.d.ts +1 -0
  94. package/dist/cjs/resolvers/query/university.js +10 -0
  95. package/dist/cjs/resolvers/query/user.d.ts +2 -0
  96. package/dist/cjs/resolvers/query/user.js +12 -0
  97. package/dist/cjs/resolvers/query/video.d.ts +4 -1
  98. package/dist/cjs/resolvers/query/video.js +99 -0
  99. package/dist/cjs/resolvers/subscription/index.d.ts +1 -0
  100. package/dist/cjs/resolvers/subscription/index.js +1 -0
  101. package/dist/cjs/resolvers/subscription/notification.d.ts +11 -0
  102. package/dist/cjs/resolvers/subscription/notification.js +4 -0
  103. package/dist/mjs/gql_input_output_types/index.d.ts +2 -2
  104. package/dist/mjs/models/Notification.d.ts +39 -0
  105. package/dist/mjs/models/Notification.js +1 -0
  106. package/dist/mjs/models/OsceMarksheet.js +3 -4
  107. package/dist/mjs/models/Question.d.ts +3 -0
  108. package/dist/mjs/models/Type.d.ts +1 -0
  109. package/dist/mjs/models/User.d.ts +7 -5
  110. package/dist/mjs/models/index.d.ts +1 -0
  111. package/dist/mjs/models/index.js +1 -0
  112. package/dist/mjs/resolvers/apollo.d.ts +1 -3
  113. package/dist/mjs/resolvers/fragments/chapter.js +14 -3
  114. package/dist/mjs/resolvers/fragments/index.d.ts +2 -0
  115. package/dist/mjs/resolvers/fragments/index.js +2 -0
  116. package/dist/mjs/resolvers/fragments/marksheet.d.ts +1 -0
  117. package/dist/mjs/resolvers/fragments/marksheet.js +106 -0
  118. package/dist/mjs/resolvers/fragments/mockTest.d.ts +1 -0
  119. package/dist/mjs/resolvers/fragments/mockTest.js +13 -0
  120. package/dist/mjs/resolvers/fragments/osce.js +1 -0
  121. package/dist/mjs/resolvers/fragments/topic.d.ts +1 -0
  122. package/dist/mjs/resolvers/fragments/topic.js +15 -0
  123. package/dist/mjs/resolvers/fragments/user.js +3 -3
  124. package/dist/mjs/resolvers/mutation/admin/algoliaSync.d.ts +4 -0
  125. package/dist/mjs/resolvers/mutation/admin/algoliaSync.js +29 -1
  126. package/dist/mjs/resolvers/mutation/admin/index.d.ts +1 -0
  127. package/dist/mjs/resolvers/mutation/admin/index.js +1 -0
  128. package/dist/mjs/resolvers/mutation/admin/notification.d.ts +15 -0
  129. package/dist/mjs/resolvers/mutation/admin/notification.js +1 -0
  130. package/dist/mjs/resolvers/mutation/admin/token.d.ts +2 -0
  131. package/dist/mjs/resolvers/mutation/admin/token.js +15 -1
  132. package/dist/mjs/resolvers/mutation/restricted/contactUs.d.ts +1 -0
  133. package/dist/mjs/resolvers/mutation/restricted/contactUs.js +12 -1
  134. package/dist/mjs/resolvers/mutation/restricted/index.d.ts +1 -0
  135. package/dist/mjs/resolvers/mutation/restricted/index.js +1 -0
  136. package/dist/mjs/resolvers/mutation/restricted/marksheet.d.ts +5 -0
  137. package/dist/mjs/resolvers/mutation/restricted/marksheet.js +91 -1
  138. package/dist/mjs/resolvers/mutation/restricted/mockTest.d.ts +3 -0
  139. package/dist/mjs/resolvers/mutation/restricted/mockTest.js +28 -1
  140. package/dist/mjs/resolvers/mutation/restricted/notification.d.ts +28 -0
  141. package/dist/mjs/resolvers/mutation/restricted/notification.js +1 -0
  142. package/dist/mjs/resolvers/mutation/restricted/questionDiscussion.d.ts +5 -1
  143. package/dist/mjs/resolvers/mutation/restricted/questionDiscussion.js +151 -1
  144. package/dist/mjs/resolvers/mutation/restricted/todo.d.ts +8 -0
  145. package/dist/mjs/resolvers/mutation/restricted/todo.js +148 -1
  146. package/dist/mjs/resolvers/mutation/restricted/token.d.ts +2 -0
  147. package/dist/mjs/resolvers/mutation/restricted/token.js +18 -1
  148. package/dist/mjs/resolvers/mutation/restricted/users.d.ts +3 -0
  149. package/dist/mjs/resolvers/mutation/restricted/users.js +23 -0
  150. package/dist/mjs/resolvers/mutation/restricted/video.d.ts +1 -0
  151. package/dist/mjs/resolvers/mutation/restricted/video.js +12 -1
  152. package/dist/mjs/resolvers/mutation/stripe.d.ts +2 -0
  153. package/dist/mjs/resolvers/mutation/stripe.js +11 -1
  154. package/dist/mjs/resolvers/mutation/users.d.ts +4 -0
  155. package/dist/mjs/resolvers/mutation/users.js +21 -1
  156. package/dist/mjs/resolvers/mutation/validUserToken/user.d.ts +2 -0
  157. package/dist/mjs/resolvers/mutation/validUserToken/user.js +15 -1
  158. package/dist/mjs/resolvers/query/admin/getUserToken.d.ts +1 -0
  159. package/dist/mjs/resolvers/query/admin/getUserToken.js +8 -1
  160. package/dist/mjs/resolvers/query/author.d.ts +1 -0
  161. package/dist/mjs/resolvers/query/author.js +15 -1
  162. package/dist/mjs/resolvers/query/book.d.ts +3 -1
  163. package/dist/mjs/resolvers/query/book.js +41 -1
  164. package/dist/mjs/resolvers/query/feedback.d.ts +2 -0
  165. package/dist/mjs/resolvers/query/feedback.js +11 -1
  166. package/dist/mjs/resolvers/query/restricted/global.d.ts +2 -0
  167. package/dist/mjs/resolvers/query/restricted/global.js +15 -1
  168. package/dist/mjs/resolvers/query/restricted/index.d.ts +2 -0
  169. package/dist/mjs/resolvers/query/restricted/index.js +2 -0
  170. package/dist/mjs/resolvers/query/restricted/marksheet.d.ts +6 -0
  171. package/dist/mjs/resolvers/query/restricted/marksheet.js +995 -1
  172. package/dist/mjs/resolvers/query/restricted/mockTests.d.ts +2 -0
  173. package/dist/mjs/resolvers/query/restricted/mockTests.js +22 -1
  174. package/dist/mjs/resolvers/query/restricted/notification.d.ts +9 -0
  175. package/dist/mjs/resolvers/query/restricted/notification.js +1 -0
  176. package/dist/mjs/resolvers/query/restricted/osce.js +2 -2
  177. package/dist/mjs/resolvers/query/restricted/qBank.d.ts +18 -0
  178. package/dist/mjs/resolvers/query/restricted/qBank.js +74 -0
  179. package/dist/mjs/resolvers/query/restricted/quesBook.d.ts +2 -1
  180. package/dist/mjs/resolvers/query/restricted/quesBook.js +38 -0
  181. package/dist/mjs/resolvers/query/restricted/replication.d.ts +2 -3
  182. package/dist/mjs/resolvers/query/restricted/todos.d.ts +3 -1
  183. package/dist/mjs/resolvers/query/restricted/todos.js +62 -1
  184. package/dist/mjs/resolvers/query/restricted/topics.d.ts +2 -0
  185. package/dist/mjs/resolvers/query/restricted/topics.js +37 -1
  186. package/dist/mjs/resolvers/query/restricted/university.d.ts +1 -0
  187. package/dist/mjs/resolvers/query/restricted/university.js +22 -1
  188. package/dist/mjs/resolvers/query/restricted/user.d.ts +2 -2
  189. package/dist/mjs/resolvers/query/restricted/user.js +23 -1
  190. package/dist/mjs/resolvers/query/restricted/video.d.ts +5 -3
  191. package/dist/mjs/resolvers/query/restricted/video.js +97 -1
  192. package/dist/mjs/resolvers/query/sample.js +4 -0
  193. package/dist/mjs/resolvers/query/subscription.d.ts +1 -0
  194. package/dist/mjs/resolvers/query/subscription.js +17 -1
  195. package/dist/mjs/resolvers/query/university.d.ts +1 -0
  196. package/dist/mjs/resolvers/query/university.js +9 -1
  197. package/dist/mjs/resolvers/query/user.d.ts +2 -0
  198. package/dist/mjs/resolvers/query/user.js +11 -1
  199. package/dist/mjs/resolvers/query/video.d.ts +4 -1
  200. package/dist/mjs/resolvers/query/video.js +98 -1
  201. package/dist/mjs/resolvers/subscription/index.d.ts +1 -0
  202. package/dist/mjs/resolvers/subscription/index.js +1 -0
  203. package/dist/mjs/resolvers/subscription/notification.d.ts +11 -0
  204. package/dist/mjs/resolvers/subscription/notification.js +1 -0
  205. package/package.json +4 -4
@@ -4,7 +4,9 @@ export interface IMockTestVar {
4
4
  id: Id;
5
5
  }
6
6
  export declare type IMockTestData = RestrictedData<graphqlNormalize & IUserMockTest, 'mockTest'>;
7
+ export declare const MOCK_TEST: import("@apollo/client").DocumentNode;
7
8
  export interface IMockTestsVar {
8
9
  typeIds?: ETopicType[];
9
10
  }
10
11
  export declare type IMockTestsData = RestrictedData<(graphqlNormalize & IUserMockTest)[], 'mockTests'>;
12
+ export declare const MOCK_TESTS: import("@apollo/client").DocumentNode;
@@ -1 +1,22 @@
1
- export {};
1
+ import { gql } from '@apollo/client';
2
+ import { MOCK_TEST_FIELDS } from '../../fragments';
3
+ export const MOCK_TEST = gql `
4
+ ${MOCK_TEST_FIELDS}
5
+ query MockTest($id: Int!) {
6
+ restricted {
7
+ mockTest(id: $id) {
8
+ ...MockTestFields
9
+ }
10
+ }
11
+ }
12
+ `;
13
+ export const MOCK_TESTS = gql `
14
+ ${MOCK_TEST_FIELDS}
15
+ query MockTests($typeIds: [Int!]) {
16
+ restricted {
17
+ mockTests(typeIds: $typeIds) {
18
+ ...MockTestFields
19
+ }
20
+ }
21
+ }
22
+ `;
@@ -0,0 +1,9 @@
1
+ import { INotification } from '../../../models';
2
+ import { graphqlNormalize, RestrictedData } from '../../types';
3
+ export interface INotificationsVar {
4
+ filter?: {
5
+ limit: number;
6
+ offset?: number;
7
+ };
8
+ }
9
+ export declare type INotificationsData = RestrictedData<graphqlNormalize & INotification[], 'notifications'>;
@@ -10,9 +10,9 @@ export const DASHBOARD_OSCE = gql `
10
10
  id
11
11
  name
12
12
  # user-specific
13
- completed
13
+ completed(solo: $solo)
14
14
  total
15
- avgScore
15
+ avgScore(solo: $solo)
16
16
  }
17
17
  avgScore
18
18
  completed
@@ -0,0 +1,18 @@
1
+ import { IDailyProgressInfo, IMarksheet, ITodo, ITopic, IUser } from '../../../models';
2
+ import { IUniversitiesRankSpeciality } from './university';
3
+ export interface IDashboardQBank {
4
+ restricted: {
5
+ latestPastMarksheetId: number;
6
+ user: IUser;
7
+ marksheets: IMarksheet[];
8
+ dailyFeed: ITodo;
9
+ dailyProgress: IDailyProgressInfo[];
10
+ topics: ITopic[];
11
+ totalQuestions: number;
12
+ totalCards: number;
13
+ universityLeaderboard: {
14
+ month: IUniversitiesRankSpeciality[];
15
+ };
16
+ };
17
+ }
18
+ export declare const DASHBOARD_QBANK: import("@apollo/client").DocumentNode;
@@ -0,0 +1,74 @@
1
+ import { gql } from '@apollo/client';
2
+ export const DASHBOARD_QBANK = gql `
3
+ query Dashboard($filter: MarksheetFilterInput!) {
4
+ restricted {
5
+ latestPastMarksheetId
6
+ user {
7
+ id
8
+ examDate
9
+ completedQuestionsCount
10
+ completedCorrectQuestionsCount
11
+ completedIncorrectQuestionsCount
12
+ completedCardsCount
13
+ completedGreenCardsCount
14
+ completedYellowCardsCount
15
+ completedRedCardsCount
16
+ marksheetsCount
17
+ dailyFeed {
18
+ topics {
19
+ id
20
+ name
21
+ typeId
22
+ totalCards
23
+ totalQuestions
24
+ dailyFeedCards
25
+ }
26
+ id
27
+ marks {
28
+ id
29
+ score
30
+ }
31
+ redCards
32
+ yellowCards
33
+ greenCards
34
+ dailyTask
35
+ }
36
+ dailyProgress {
37
+ totalCount
38
+ dateString
39
+ }
40
+ }
41
+ totalQuestions
42
+ totalCards
43
+ marksheets(filter: $filter) {
44
+ id
45
+ topicNames
46
+ correct
47
+ incorrect
48
+ totalQuestions
49
+ isTestMarksheet
50
+ }
51
+ topics(filter: 0) {
52
+ id
53
+ name
54
+ totalQuestions
55
+ correctQuestions
56
+ incorrectQuestions
57
+ totalCards
58
+ greenCards
59
+ yellowCards
60
+ redCards
61
+ dailyFeedCards
62
+ }
63
+ universityLeaderboard(limit: 3) {
64
+ updatedAt
65
+ month {
66
+ id
67
+ name
68
+ speciality
69
+ rank
70
+ }
71
+ }
72
+ }
73
+ }
74
+ `;
@@ -2,6 +2,7 @@ import { IOsceStation, ITopic } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
3
  export declare type IQuesBookVar = null;
4
4
  export declare type IQuesBookData = RestrictedData<(graphqlNormalize & ITopic)[], 'quesBook'>;
5
- export declare const OSCE_BOOK: import("@apollo/client").DocumentNode;
5
+ export declare const QUES_BOOK: import("@apollo/client").DocumentNode;
6
6
  export declare type IOsceBookVar = null;
7
7
  export declare type IOsceBookData = RestrictedData<(graphqlNormalize & IOsceStation)[], 'osceBook'>;
8
+ export declare const OSCE_BOOK: import("@apollo/client").DocumentNode;
@@ -1,5 +1,43 @@
1
1
  import { gql } from '@apollo/client';
2
2
  import { OSCE_STATION_FIELDS } from './../../fragments/osce';
3
+ export const QUES_BOOK = gql `
4
+ query quesBook {
5
+ restricted {
6
+ quesBook {
7
+ id
8
+ name
9
+ concepts {
10
+ id
11
+ name
12
+ chapter {
13
+ id
14
+ typeId
15
+ explanation
16
+ pictures {
17
+ id
18
+ caption
19
+ path
20
+ }
21
+ }
22
+ topicId
23
+ videos {
24
+ id
25
+ title
26
+ museId
27
+ thumbnail
28
+ concepts {
29
+ id
30
+ name
31
+ }
32
+ live
33
+ description
34
+ duration
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ `;
3
41
  export const OSCE_BOOK = gql `
4
42
  ${OSCE_STATION_FIELDS}
5
43
  query OsceBook {
@@ -5,20 +5,19 @@ interface IQueryBuilder {
5
5
  }
6
6
  interface IReplicationVar {
7
7
  lastId: string;
8
- minUpdatedAt: number;
8
+ minUpdatedAt: Date | number;
9
9
  limit: number;
10
10
  }
11
11
  export interface ITopicReplicationVar extends IReplicationVar {
12
12
  }
13
13
  export interface ITopicReplicationData extends ITopic {
14
- updatedAt: number;
14
+ updatedAt: Date | number;
15
15
  deleted: boolean;
16
16
  }
17
17
  export declare const pullTopicQueryBuilder: (doc: Partial<ITopicReplicationData>) => IQueryBuilder;
18
18
  export interface IQuestionReplicationVar extends IReplicationVar {
19
19
  }
20
20
  export interface IQuestionReplicationData extends IQuestion {
21
- updatedAt: number;
22
21
  deleted: boolean;
23
22
  }
24
23
  export declare const pullQuestionQueryBuilder: (doc: Partial<IQuestionReplicationData>) => IQueryBuilder;
@@ -7,7 +7,9 @@ export interface IPreBuildTodoVar {
7
7
  source: string;
8
8
  }
9
9
  export declare type IPreBuildTodoData = RestrictedData<graphqlNormalize & IPreBuildTodo, 'preBuildTodo'>;
10
+ export declare const PRE_BUILD_TODO: import("@apollo/client").DocumentNode;
10
11
  export interface ITodoVar {
11
- id: Id;
12
+ todoId: Id;
12
13
  }
13
14
  export declare type ITodoData = RestrictedData<graphqlNormalize & ITodo, 'todo'>;
15
+ export declare const TODO: import("@apollo/client").DocumentNode;
@@ -1 +1,62 @@
1
- export {};
1
+ import { gql } from '@apollo/client';
2
+ export const PRE_BUILD_TODO = gql `
3
+ query PreBuildTodo(
4
+ $topicIds: [Int!]
5
+ $conceptIds: [Int!]
6
+ $search: String
7
+ $source: String!
8
+ ) {
9
+ restricted {
10
+ preBuildTodo(
11
+ topicIds: $topicIds
12
+ conceptIds: $conceptIds
13
+ search: $search
14
+ source: $source
15
+ ) {
16
+ unseen
17
+ seen
18
+ buildRef
19
+ }
20
+ }
21
+ }
22
+ `;
23
+ export const TODO = gql `
24
+ query Todo($todoId: Int!) {
25
+ restricted {
26
+ todo(id: $todoId) {
27
+ id
28
+ dailyTask
29
+ source
30
+ marks {
31
+ id
32
+ cardId
33
+ score
34
+ timeTaken
35
+ card {
36
+ question
37
+ explanation
38
+ concept {
39
+ videos {
40
+ id
41
+ title
42
+ museId
43
+ thumbnail
44
+ concepts {
45
+ name
46
+ }
47
+ live
48
+ description
49
+ duration
50
+ }
51
+ }
52
+ pictures {
53
+ id
54
+ caption
55
+ path
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ `;
@@ -4,7 +4,9 @@ export interface ITopicVar {
4
4
  id: Id;
5
5
  }
6
6
  export declare type ITopicData = RestrictedData<graphqlNormalize & ITopic, 'topic'>;
7
+ export declare const TOPIC: import("@apollo/client").DocumentNode;
7
8
  export interface ITopicsVar {
8
9
  filter: ETopicType;
9
10
  }
10
11
  export declare type ITopicsData = RestrictedData<(graphqlNormalize & ITopic)[], 'topics'>;
12
+ export declare const TOPICS: import("@apollo/client").DocumentNode;
@@ -1 +1,37 @@
1
- export {};
1
+ import { gql } from '@apollo/client';
2
+ export const TOPIC = gql `
3
+ query Topic($topicId: Int!) {
4
+ restricted {
5
+ topic(id: $topicId) {
6
+ id
7
+ name
8
+ totalQuestions
9
+ correctQuestions
10
+ incorrectQuestions
11
+ totalCards
12
+ greenCards
13
+ yellowCards
14
+ redCards
15
+ dailyFeedCards
16
+ }
17
+ }
18
+ }
19
+ `;
20
+ export const TOPICS = gql `
21
+ query Topics($filter: Int!) {
22
+ restricted {
23
+ topics(filter: $filter) {
24
+ id
25
+ name
26
+ totalQuestions
27
+ correctQuestions
28
+ incorrectQuestions
29
+ totalCards
30
+ greenCards
31
+ yellowCards
32
+ redCards
33
+ dailyFeedCards
34
+ }
35
+ }
36
+ }
37
+ `;
@@ -13,3 +13,4 @@ export interface IUniversityLeaderboard {
13
13
  quarter: IUniversitiesRankSpeciality[];
14
14
  }
15
15
  export declare type IUniversityLeaderboardData = RestrictedData<graphqlNormalize & IUniversityLeaderboard, 'universityLeaderboard'>;
16
+ export declare const UNIVERSITY_LEADERBOARD: import("@apollo/client").DocumentNode;
@@ -1 +1,22 @@
1
- export {};
1
+ import { gql } from '@apollo/client';
2
+ export const UNIVERSITY_LEADERBOARD = gql `
3
+ query UniversityLeaderboard($limit: Int!) {
4
+ restricted {
5
+ universityLeaderboard(limit: $limit) {
6
+ updatedAt
7
+ month {
8
+ id
9
+ name
10
+ speciality
11
+ rank
12
+ }
13
+ quarter {
14
+ id
15
+ name
16
+ speciality
17
+ rank
18
+ }
19
+ }
20
+ }
21
+ }
22
+ `;
@@ -1,6 +1,6 @@
1
1
  import { IUser } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
- export declare type IDashboardUserVar = null;
4
- export declare type IDashboardUserData = RestrictedData<graphqlNormalize & IUser, 'dashboardUser'>;
5
3
  export declare type IUserVar = null;
6
4
  export declare type IUserData = RestrictedData<graphqlNormalize & IUser, 'user'>;
5
+ export declare const USER: import("@apollo/client").DocumentNode;
6
+ export declare const REFERRALS: import("@apollo/client").DocumentNode;
@@ -1 +1,23 @@
1
- export {};
1
+ import { gql } from '@apollo/client';
2
+ import { USER_FIELDS } from '../../fragments/user';
3
+ export const USER = gql `
4
+ ${USER_FIELDS}
5
+ query User {
6
+ restricted {
7
+ user {
8
+ ...UserFields
9
+ }
10
+ }
11
+ }
12
+ `;
13
+ export const REFERRALS = gql `
14
+ query Referrals {
15
+ restricted {
16
+ user {
17
+ id
18
+ username
19
+ referralCount
20
+ }
21
+ }
22
+ }
23
+ `;
@@ -1,12 +1,14 @@
1
- import { Id, IVideo } from '../../../models';
1
+ import { Id, IVideo, VideoFilter } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
3
  export interface IVideoVar {
4
4
  id: Id;
5
5
  }
6
6
  export declare type IVideoData = RestrictedData<graphqlNormalize & IVideo, 'video'>;
7
+ export declare const VIDEO: import("@apollo/client").DocumentNode;
7
8
  export interface IVideosVar {
8
- filter: 'new' | 'popular' | 'personal' | 'live' | 'osce';
9
- search?: string;
9
+ filter: VideoFilter;
10
10
  limit: number;
11
+ search?: String;
11
12
  }
12
13
  export declare type IVideosData = RestrictedData<(graphqlNormalize & IVideo)[], 'videos'>;
14
+ export declare const VIDEOS: import("@apollo/client").DocumentNode;
@@ -1 +1,97 @@
1
- export {};
1
+ import { gql } from '@apollo/client';
2
+ import { PICTURE_FIELDS, VIDEO_FILE_FIELDS } from '../../fragments';
3
+ export const VIDEO = gql `
4
+ ${PICTURE_FIELDS}
5
+ ${VIDEO_FILE_FIELDS}
6
+ query Video($videoId: Int!) {
7
+ restricted {
8
+ video(id: $videoId) {
9
+ id
10
+ title
11
+ museId
12
+ viewsToday
13
+ views
14
+ thumbnail
15
+ concepts {
16
+ id
17
+ name
18
+ chapter {
19
+ id
20
+ explanation
21
+ }
22
+ }
23
+ osceStation {
24
+ id
25
+ name
26
+ osceType {
27
+ id
28
+ }
29
+ candidateBrief
30
+ examinerBrief
31
+ actorBrief
32
+ marks {
33
+ id
34
+ index
35
+ osceStationId
36
+ header
37
+ name
38
+ }
39
+ candidatePictures {
40
+ ...PictureFields
41
+ }
42
+ actorPictures {
43
+ ...PictureFields
44
+ }
45
+ examinerPictures {
46
+ ...PictureFields
47
+ }
48
+ walkthroughPictures {
49
+ ...PictureFields
50
+ }
51
+ lastOsceMarksheetId
52
+ }
53
+ live
54
+ description
55
+ duration
56
+ startTime
57
+ endTime
58
+ files {
59
+ ...VideoFileFields
60
+ }
61
+ }
62
+ }
63
+ }
64
+ `;
65
+ export const VIDEOS = gql `
66
+ query Videos($filter: String!, $search: String, $limit: Int!) {
67
+ restricted {
68
+ videos(filter: $filter, search: $search, limit: $limit) {
69
+ id
70
+ title
71
+ museId
72
+ thumbnail
73
+ viewsToday
74
+ views
75
+ live
76
+ description
77
+ duration
78
+ startTime
79
+ endTime
80
+ concepts {
81
+ id
82
+ name
83
+ topicId
84
+ topic {
85
+ id
86
+ name
87
+ typeId
88
+ }
89
+ chapter {
90
+ id
91
+ explanation
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ `;
@@ -14,6 +14,7 @@ export const SAMPLE_CONTENT = gql `
14
14
  osceMarksheets {
15
15
  id
16
16
  osceStation {
17
+ id
17
18
  name
18
19
  }
19
20
  }
@@ -36,8 +37,10 @@ export const SAMPLE_MARKSHEET = gql `
36
37
  typeId
37
38
  conceptId
38
39
  concept {
40
+ id
39
41
  name
40
42
  chapter {
43
+ id
41
44
  explanation
42
45
  }
43
46
  }
@@ -73,6 +76,7 @@ export const SAMPLE_TODO = gql `
73
76
  concept {
74
77
  name
75
78
  chapter {
79
+ id
76
80
  explanation
77
81
  }
78
82
  }
@@ -1,3 +1,4 @@
1
1
  import { ISubscription } from '../../models';
2
2
  import { graphqlNormalize, RootData } from '../types';
3
3
  export declare type ISubscriptionsData = RootData<(graphqlNormalize & ISubscription)[], 'subscriptions'>;
4
+ export declare const SUBSCRIPTIONS: import("@apollo/client").DocumentNode;
@@ -1 +1,17 @@
1
- export {};
1
+ import { gql } from '@apollo/client';
2
+ export const SUBSCRIPTIONS = gql `
3
+ query Subscriptions {
4
+ subscriptions {
5
+ id
6
+ createdAt
7
+ description
8
+ duration
9
+ name
10
+ price
11
+ stripePriceId
12
+ duration
13
+ public
14
+ typeId
15
+ }
16
+ }
17
+ `;
@@ -4,3 +4,4 @@ export interface IUniversitiesVar {
4
4
  id: Id;
5
5
  }
6
6
  export declare type IUniversitiesData = RootData<graphqlNormalize & IUniversity[], 'universities'>;
7
+ export declare const UNIVERSITIES: import("@apollo/client").DocumentNode;
@@ -1 +1,9 @@
1
- export {};
1
+ import { gql } from '@apollo/client';
2
+ export const UNIVERSITIES = gql `
3
+ query universities($id: Int) {
4
+ universities(id: $id) {
5
+ name
6
+ id
7
+ }
8
+ }
9
+ `;
@@ -3,7 +3,9 @@ export interface IUsernameAvailableVar {
3
3
  username: string;
4
4
  }
5
5
  export declare type IUsernameAvailableData = RootData<boolean, 'usernameAvailable'>;
6
+ export declare const USERNAME_AVAILABILITY: import("@apollo/client").DocumentNode;
6
7
  export interface IUsernameProvisionedVar {
7
8
  username: string;
8
9
  }
9
10
  export declare type IUsernameProvisionedData = RootData<boolean, 'usernameProvisioned'>;
11
+ export declare const USERNAME_PROVISIONED: import("@apollo/client").DocumentNode;
@@ -1 +1,11 @@
1
- export {};
1
+ import { gql } from '@apollo/client';
2
+ export const USERNAME_AVAILABILITY = gql `
3
+ query UsernameAvailable($username: String!) {
4
+ usernameAvailable(username: $username)
5
+ }
6
+ `;
7
+ export const USERNAME_PROVISIONED = gql `
8
+ query UsernameProvisioned($username: String!) {
9
+ usernameProvisioned(username: $username)
10
+ }
11
+ `;
@@ -1,9 +1,12 @@
1
1
  import { IVideo } from '../../models';
2
2
  import { graphqlNormalize, RootData } from '../types';
3
3
  export { IVideosVar, IVideoVar } from './restricted/video';
4
- export declare type IVideosData = RootData<(graphqlNormalize & IVideo)[], 'videos'>;
5
4
  export declare type IVideoData = RootData<graphqlNormalize & IVideo, 'video'>;
5
+ export declare type IVideosData = RootData<(graphqlNormalize & IVideo)[], 'videos'>;
6
+ export declare const SAMPLE_VIDEOS: import("@apollo/client").DocumentNode;
7
+ export declare const SAMPLE_VIDEO: import("@apollo/client").DocumentNode;
6
8
  export interface IZoomSignatureVar {
7
9
  meetingNumber: string;
8
10
  }
9
11
  export declare type IZoomSignatureData = RootData<graphqlNormalize & string, 'zoomSignature'>;
12
+ export declare const ZOOM_SIGNATURE: import("@apollo/client").DocumentNode;