@quesmed/types-rn 2.0.4

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 (183) hide show
  1. package/gql_input_output_types/User.d.ts +12 -0
  2. package/gql_input_output_types/User.js +2 -0
  3. package/gql_input_output_types/index.d.ts +75 -0
  4. package/gql_input_output_types/index.js +2 -0
  5. package/index.d.ts +22 -0
  6. package/index.js +124 -0
  7. package/models/Author.d.ts +14 -0
  8. package/models/Author.js +2 -0
  9. package/models/Blog.d.ts +15 -0
  10. package/models/Blog.js +2 -0
  11. package/models/Book.d.ts +22 -0
  12. package/models/Book.js +2 -0
  13. package/models/Card.d.ts +16 -0
  14. package/models/Card.js +2 -0
  15. package/models/Chapter.d.ts +15 -0
  16. package/models/Chapter.js +2 -0
  17. package/models/Concept.d.ts +15 -0
  18. package/models/Concept.js +2 -0
  19. package/models/Difficulty.d.ts +6 -0
  20. package/models/Difficulty.js +10 -0
  21. package/models/Feedback.d.ts +8 -0
  22. package/models/Feedback.js +2 -0
  23. package/models/File.d.ts +10 -0
  24. package/models/File.js +2 -0
  25. package/models/Marksheet.d.ts +36 -0
  26. package/models/Marksheet.js +2 -0
  27. package/models/MockTest.d.ts +22 -0
  28. package/models/MockTest.js +2 -0
  29. package/models/OsceMarksheet.d.ts +105 -0
  30. package/models/OsceMarksheet.js +103 -0
  31. package/models/OsceStation.d.ts +54 -0
  32. package/models/OsceStation.js +45 -0
  33. package/models/Picture.d.ts +14 -0
  34. package/models/Picture.js +2 -0
  35. package/models/Promo.d.ts +14 -0
  36. package/models/Promo.js +2 -0
  37. package/models/Question.d.ts +115 -0
  38. package/models/Question.js +43 -0
  39. package/models/Subscription.d.ts +17 -0
  40. package/models/Subscription.js +9 -0
  41. package/models/Todo.d.ts +33 -0
  42. package/models/Todo.js +2 -0
  43. package/models/Token.d.ts +9 -0
  44. package/models/Token.js +2 -0
  45. package/models/Topic.d.ts +32 -0
  46. package/models/Topic.js +13 -0
  47. package/models/Type.d.ts +7 -0
  48. package/models/Type.js +2 -0
  49. package/models/University.d.ts +5 -0
  50. package/models/University.js +2 -0
  51. package/models/User.d.ts +119 -0
  52. package/models/User.js +70 -0
  53. package/models/Video.d.ts +26 -0
  54. package/models/Video.js +2 -0
  55. package/models/index.d.ts +24 -0
  56. package/models/index.js +36 -0
  57. package/package.json +35 -0
  58. package/resolvers/apollo.d.ts +8 -0
  59. package/resolvers/apollo.js +2 -0
  60. package/resolvers/fragments/blog.d.ts +1 -0
  61. package/resolvers/fragments/blog.js +17 -0
  62. package/resolvers/fragments/chapter.d.ts +1 -0
  63. package/resolvers/fragments/chapter.js +25 -0
  64. package/resolvers/fragments/concept.d.ts +3 -0
  65. package/resolvers/fragments/concept.js +79 -0
  66. package/resolvers/fragments/index.d.ts +7 -0
  67. package/resolvers/fragments/index.js +19 -0
  68. package/resolvers/fragments/osce.d.ts +5 -0
  69. package/resolvers/fragments/osce.js +139 -0
  70. package/resolvers/fragments/picture.d.ts +1 -0
  71. package/resolvers/fragments/picture.js +22 -0
  72. package/resolvers/fragments/user.d.ts +1 -0
  73. package/resolvers/fragments/user.js +39 -0
  74. package/resolvers/fragments/video.d.ts +2 -0
  75. package/resolvers/fragments/video.js +58 -0
  76. package/resolvers/index.d.ts +12 -0
  77. package/resolvers/index.js +38 -0
  78. package/resolvers/mutation/admin/algoliaSync.d.ts +9 -0
  79. package/resolvers/mutation/admin/algoliaSync.js +2 -0
  80. package/resolvers/mutation/admin/index.d.ts +2 -0
  81. package/resolvers/mutation/admin/index.js +14 -0
  82. package/resolvers/mutation/admin/token.d.ts +25 -0
  83. package/resolvers/mutation/admin/token.js +2 -0
  84. package/resolvers/mutation/index.d.ts +5 -0
  85. package/resolvers/mutation/index.js +30 -0
  86. package/resolvers/mutation/restricted/agora.d.ts +10 -0
  87. package/resolvers/mutation/restricted/agora.js +11 -0
  88. package/resolvers/mutation/restricted/contactUs.d.ts +17 -0
  89. package/resolvers/mutation/restricted/contactUs.js +2 -0
  90. package/resolvers/mutation/restricted/index.d.ts +10 -0
  91. package/resolvers/mutation/restricted/index.js +22 -0
  92. package/resolvers/mutation/restricted/marksheet.d.ts +41 -0
  93. package/resolvers/mutation/restricted/marksheet.js +2 -0
  94. package/resolvers/mutation/restricted/mockTest.d.ts +16 -0
  95. package/resolvers/mutation/restricted/mockTest.js +2 -0
  96. package/resolvers/mutation/restricted/osce.d.ts +87 -0
  97. package/resolvers/mutation/restricted/osce.js +222 -0
  98. package/resolvers/mutation/restricted/questionDiscussion.d.ts +24 -0
  99. package/resolvers/mutation/restricted/questionDiscussion.js +2 -0
  100. package/resolvers/mutation/restricted/todo.d.ts +32 -0
  101. package/resolvers/mutation/restricted/todo.js +2 -0
  102. package/resolvers/mutation/restricted/token.d.ts +21 -0
  103. package/resolvers/mutation/restricted/token.js +2 -0
  104. package/resolvers/mutation/restricted/users.d.ts +29 -0
  105. package/resolvers/mutation/restricted/users.js +11 -0
  106. package/resolvers/mutation/restricted/video.d.ts +6 -0
  107. package/resolvers/mutation/restricted/video.js +2 -0
  108. package/resolvers/mutation/stripe.d.ts +11 -0
  109. package/resolvers/mutation/stripe.js +2 -0
  110. package/resolvers/mutation/users.d.ts +32 -0
  111. package/resolvers/mutation/users.js +2 -0
  112. package/resolvers/mutation/validUserToken/index.d.ts +1 -0
  113. package/resolvers/mutation/validUserToken/index.js +13 -0
  114. package/resolvers/mutation/validUserToken/user.d.ts +14 -0
  115. package/resolvers/mutation/validUserToken/user.js +2 -0
  116. package/resolvers/query/admin/getUserToken.d.ts +5 -0
  117. package/resolvers/query/admin/getUserToken.js +2 -0
  118. package/resolvers/query/admin/index.d.ts +1 -0
  119. package/resolvers/query/admin/index.js +13 -0
  120. package/resolvers/query/author.d.ts +3 -0
  121. package/resolvers/query/author.js +2 -0
  122. package/resolvers/query/blog.d.ts +15 -0
  123. package/resolvers/query/blog.js +36 -0
  124. package/resolvers/query/book.d.ts +8 -0
  125. package/resolvers/query/book.js +2 -0
  126. package/resolvers/query/feedback.d.ts +3 -0
  127. package/resolvers/query/feedback.js +2 -0
  128. package/resolvers/query/index.d.ts +11 -0
  129. package/resolvers/query/index.js +36 -0
  130. package/resolvers/query/restricted/index.d.ts +10 -0
  131. package/resolvers/query/restricted/index.js +22 -0
  132. package/resolvers/query/restricted/marksheet.d.ts +47 -0
  133. package/resolvers/query/restricted/marksheet.js +2 -0
  134. package/resolvers/query/restricted/mockTests.d.ts +10 -0
  135. package/resolvers/query/restricted/mockTests.js +2 -0
  136. package/resolvers/query/restricted/osce.d.ts +45 -0
  137. package/resolvers/query/restricted/osce.js +118 -0
  138. package/resolvers/query/restricted/quesBook.d.ts +7 -0
  139. package/resolvers/query/restricted/quesBook.js +17 -0
  140. package/resolvers/query/restricted/replication.d.ts +32 -0
  141. package/resolvers/query/restricted/replication.js +184 -0
  142. package/resolvers/query/restricted/todos.d.ts +15 -0
  143. package/resolvers/query/restricted/todos.js +2 -0
  144. package/resolvers/query/restricted/topics.d.ts +10 -0
  145. package/resolvers/query/restricted/topics.js +2 -0
  146. package/resolvers/query/restricted/university.d.ts +15 -0
  147. package/resolvers/query/restricted/university.js +2 -0
  148. package/resolvers/query/restricted/user.d.ts +13 -0
  149. package/resolvers/query/restricted/user.js +2 -0
  150. package/resolvers/query/restricted/video.d.ts +11 -0
  151. package/resolvers/query/restricted/video.js +2 -0
  152. package/resolvers/query/sample.d.ts +26 -0
  153. package/resolvers/query/sample.js +98 -0
  154. package/resolvers/query/subscription.d.ts +3 -0
  155. package/resolvers/query/subscription.js +2 -0
  156. package/resolvers/query/university.d.ts +6 -0
  157. package/resolvers/query/university.js +2 -0
  158. package/resolvers/query/user.d.ts +13 -0
  159. package/resolvers/query/user.js +2 -0
  160. package/resolvers/query/video.d.ts +15 -0
  161. package/resolvers/query/video.js +2 -0
  162. package/resolvers/subscription/index.d.ts +1 -0
  163. package/resolvers/subscription/index.js +13 -0
  164. package/resolvers/subscription/osce.d.ts +66 -0
  165. package/resolvers/subscription/osce.js +108 -0
  166. package/resolvers/types.d.ts +10 -0
  167. package/resolvers/types.js +2 -0
  168. package/utils/commonFunctions.d.ts +9 -0
  169. package/utils/commonFunctions.js +256 -0
  170. package/utils/index.d.ts +9 -0
  171. package/utils/index.js +42 -0
  172. package/utils/lightgallery.d.ts +9 -0
  173. package/utils/lightgallery.js +88 -0
  174. package/utils/offlineLink.d.ts +64 -0
  175. package/utils/offlineLink.js +221 -0
  176. package/utils/random.d.ts +1 -0
  177. package/utils/random.js +20 -0
  178. package/utils/uuid4.d.ts +107 -0
  179. package/utils/uuid4.js +282 -0
  180. package/utils/webSocketLink.d.ts +7 -0
  181. package/utils/webSocketLink.js +22 -0
  182. package/utils/wordsToNumber.d.ts +1 -0
  183. package/utils/wordsToNumber.js +48 -0
@@ -0,0 +1,47 @@
1
+ import { EDifficultyType, Id, IMarksheet, IUserFlaggedQuestion } from '../../../models';
2
+ import { IPreBuildMarksheet } from '../../mutation/restricted';
3
+ import { graphqlNormalize, RestrictedData } from '../../types';
4
+ export interface IMarksheetVar {
5
+ id: Id;
6
+ }
7
+ export declare type IMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'marksheet'>;
8
+ export interface IPreBuildMarksheetVar {
9
+ topicIds: number[];
10
+ conceptIds: number[];
11
+ search: string;
12
+ source: string;
13
+ difficulty?: EDifficultyType[];
14
+ }
15
+ export declare type IPreBuildMarksheetData = RestrictedData<graphqlNormalize & IPreBuildMarksheet, 'preBuildMarksheet'>;
16
+ export interface IMarksheetsVar {
17
+ filter: {
18
+ limit: number;
19
+ date?: string;
20
+ offset?: number;
21
+ };
22
+ }
23
+ export declare type IMarksheetsData = RestrictedData<(graphqlNormalize & IMarksheet)[], 'marksheets'>;
24
+ export declare type ILatestPastMarksheetIdVar = null;
25
+ export declare type ILatestPastMarksheetIdData = RestrictedData<number, 'latestPastMarksheetId'>;
26
+ export declare type IFlaggedQuestionsVar = null;
27
+ export declare type IFlaggedQuestionsData = RestrictedData<(graphqlNormalize & IUserFlaggedQuestion)[], 'flaggedQuestions'>;
28
+ export interface IMarksheetFeedbackVar {
29
+ id: Id;
30
+ }
31
+ export interface IMarksheetTopicFeedback {
32
+ topicId: Id;
33
+ name: string;
34
+ score: number;
35
+ avgScore: number;
36
+ }
37
+ export interface IMarksheetFeedback {
38
+ marksheetId: Id;
39
+ mockTestId: number;
40
+ correct: number;
41
+ incorrect: number;
42
+ total: number;
43
+ timeTaken: number;
44
+ passingMark: number;
45
+ topics: IMarksheetTopicFeedback[];
46
+ }
47
+ export declare type IMarksheetFeedbackData = RestrictedData<graphqlNormalize & IMarksheetFeedback, 'marksheetFeedback'>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { ETopicType, Id, IUserMockTest } from '../../../models';
2
+ import { graphqlNormalize, RestrictedData } from '../../types';
3
+ export interface IMockTestVar {
4
+ id: Id;
5
+ }
6
+ export declare type IMockTestData = RestrictedData<graphqlNormalize & IUserMockTest, 'mockTest'>;
7
+ export interface IMockTestsVar {
8
+ typeIds?: ETopicType[];
9
+ }
10
+ export declare type IMockTestsData = RestrictedData<(graphqlNormalize & IUserMockTest)[], 'mockTests'>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,45 @@
1
+ import { EDifficultyType, Id, IDashboardOsce, IOsceMarksheet, IOsceStation } from '../../../models';
2
+ import { graphqlNormalize, RestrictedData } from '../../types';
3
+ import { ITopic } from './../../../models/Topic';
4
+ export declare const DASHBOARD_OSCE: import("@apollo/client").DocumentNode;
5
+ export interface IDashboardOsceVar {
6
+ solo: boolean;
7
+ }
8
+ export declare type IDashboardOsceData = RestrictedData<graphqlNormalize & IDashboardOsce, 'dashboardOsce'>;
9
+ export declare const OSCE_MARKSHEETS: import("@apollo/client").DocumentNode;
10
+ export interface IOsceMarksheetsVar {
11
+ solo: boolean;
12
+ }
13
+ export declare type IOsceMarksheetsData = RestrictedData<(graphqlNormalize & IOsceMarksheet)[], 'osceMarksheets'>;
14
+ export declare const OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
15
+ export interface IOsceMarksheetVar {
16
+ id: number;
17
+ }
18
+ export declare type IOsceMarksheetData = RestrictedData<graphqlNormalize & IOsceMarksheet, 'osceMarksheet'>;
19
+ export declare const OSCE_STATIONS: import("@apollo/client").DocumentNode;
20
+ export interface IOsceStationsVar {
21
+ osceTypeId?: Id;
22
+ solo: boolean;
23
+ attempted?: boolean;
24
+ difficulty?: EDifficultyType[];
25
+ topicIds?: Id[];
26
+ }
27
+ export declare type IOsceStationsData = RestrictedData<(graphqlNormalize & IOsceStation)[], 'osceStations'>;
28
+ export declare const OSCE_STATION: import("@apollo/client").DocumentNode;
29
+ export interface IOsceStationVar {
30
+ id: Id;
31
+ }
32
+ export declare type IOsceStationData = RestrictedData<graphqlNormalize & IOsceStation, 'osceStation'>;
33
+ export declare const OSCE_TOPICS: import("@apollo/client").DocumentNode;
34
+ export declare type IOsceTopicsVar = null;
35
+ export declare type IOsceTopicsData = RestrictedData<(graphqlNormalize & ITopic)[], 'osceTopics'>;
36
+ export declare const SEARCH_OSCE_STATIONS: import("@apollo/client").DocumentNode;
37
+ export interface ISearchOsceStationsVar {
38
+ search: string;
39
+ }
40
+ export declare type ISearchOsceStationsData = RestrictedData<(graphqlNormalize & IOsceStation)[], 'searchOsceStations'>;
41
+ export declare const HEARTBEAT: import("@apollo/client").DocumentNode;
42
+ export interface IHeartbeatVar {
43
+ agoraId: string;
44
+ }
45
+ export declare type IHeartBeatData = RestrictedData<boolean, 'heartbeat'>;
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HEARTBEAT = exports.SEARCH_OSCE_STATIONS = exports.OSCE_TOPICS = exports.OSCE_STATION = exports.OSCE_STATIONS = exports.OSCE_MARKSHEET = exports.OSCE_MARKSHEETS = exports.DASHBOARD_OSCE = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ const osce_1 = require("../../fragments/osce");
6
+ const osce_2 = require("./../../fragments/osce");
7
+ exports.DASHBOARD_OSCE = (0, client_1.gql) `
8
+ query DashboardOsce($solo: Boolean!) {
9
+ restricted {
10
+ dashboardOsce(solo: $solo) {
11
+ lastAgoraId
12
+ types {
13
+ id
14
+ name
15
+ # user-specific
16
+ completed
17
+ total
18
+ avgScore
19
+ }
20
+ avgScore
21
+ completed
22
+ total
23
+ }
24
+ }
25
+ }
26
+ `;
27
+ exports.OSCE_MARKSHEETS = (0, client_1.gql) `
28
+ ${osce_2.OSCE_STATION_FIELDS}
29
+ ${osce_1.OSCE_MARKSHEET_FIELDS}
30
+ query OsceMarksheets($solo: Boolean!) {
31
+ restricted {
32
+ osceMarksheets(solo: $solo) {
33
+ ...OsceMarksheetFields
34
+ osceStation {
35
+ ...OsceStationFields
36
+ }
37
+ }
38
+ }
39
+ }
40
+ `;
41
+ exports.OSCE_MARKSHEET = (0, client_1.gql) `
42
+ ${osce_2.OSCE_STATION_FIELDS}
43
+ ${osce_1.OSCE_MARKSHEET_FIELDS}
44
+ query OsceMarksheet($id: Int!) {
45
+ restricted {
46
+ osceMarksheet(id: $id) {
47
+ ...OsceMarksheetFields
48
+ osceStation {
49
+ ...OsceStationFields
50
+ }
51
+ }
52
+ }
53
+ }
54
+ `;
55
+ exports.OSCE_STATIONS = (0, client_1.gql) `
56
+ ${osce_2.OSCE_STATION_FIELDS}
57
+ query OsceStations(
58
+ $osceTypeId: Int
59
+ $solo: Boolean!
60
+ $attempted: Boolean
61
+ $difficulty: [Int!]
62
+ $topicIds: [Int!]
63
+ ) {
64
+ restricted {
65
+ osceStations(
66
+ osceTypeId: $osceTypeId
67
+ solo: $solo
68
+ attempted: $attempted
69
+ difficulty: $difficulty
70
+ topicIds: $topicIds
71
+ ) {
72
+ ...OsceStationFields
73
+ lastOsceMarksheetId
74
+ score
75
+ }
76
+ }
77
+ }
78
+ `;
79
+ exports.OSCE_STATION = (0, client_1.gql) `
80
+ ${osce_2.OSCE_STATION_FIELDS}
81
+ query OsceStation($id: Int!) {
82
+ restricted {
83
+ osceStation(id: $id) {
84
+ ...OsceStationFields
85
+ }
86
+ }
87
+ }
88
+ `;
89
+ exports.OSCE_TOPICS = (0, client_1.gql) `
90
+ query OsceTopics {
91
+ restricted {
92
+ osceTopics {
93
+ id
94
+ name
95
+ typeId
96
+ }
97
+ }
98
+ }
99
+ `;
100
+ exports.SEARCH_OSCE_STATIONS = (0, client_1.gql) `
101
+ ${osce_2.OSCE_STATION_FIELDS}
102
+ query SearchOsceStations($search: String!) {
103
+ restricted {
104
+ searchOsceStations(search: $search) {
105
+ ...OsceStationFields
106
+ lastOsceMarksheetId
107
+ score
108
+ }
109
+ }
110
+ }
111
+ `;
112
+ exports.HEARTBEAT = (0, client_1.gql) `
113
+ query Heartbeat($agoraId: String!) {
114
+ restricted {
115
+ heartbeat(agoraId: $agoraId)
116
+ }
117
+ }
118
+ `;
@@ -0,0 +1,7 @@
1
+ import { IOsceStation, ITopic } from '../../../models';
2
+ import { graphqlNormalize, RestrictedData } from '../../types';
3
+ export declare type IQuesBookVar = null;
4
+ export declare type IQuesBookData = RestrictedData<(graphqlNormalize & ITopic)[], 'quesBook'>;
5
+ export declare const OSCE_BOOK: import("@apollo/client").DocumentNode;
6
+ export declare type IOsceBookVar = null;
7
+ export declare type IOsceBookData = RestrictedData<(graphqlNormalize & IOsceStation)[], 'osceBook'>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OSCE_BOOK = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ const osce_1 = require("./../../fragments/osce");
6
+ exports.OSCE_BOOK = (0, client_1.gql) `
7
+ ${osce_1.OSCE_STATION_FIELDS}
8
+ query OsceBook {
9
+ restricted {
10
+ osceBook {
11
+ ...OsceStationFields
12
+ lastOsceMarksheetId
13
+ score
14
+ }
15
+ }
16
+ }
17
+ `;
@@ -0,0 +1,32 @@
1
+ import { IOsceStation, IQuestion, ITopic } from './../../../models';
2
+ interface IQueryBuilder {
3
+ query: string;
4
+ variables: IReplicationVar;
5
+ }
6
+ interface IReplicationVar {
7
+ lastId: string;
8
+ minUpdatedAt: number;
9
+ limit: number;
10
+ }
11
+ export interface ITopicReplicationVar extends IReplicationVar {
12
+ }
13
+ export interface ITopicReplicationData extends ITopic {
14
+ updatedAt: number;
15
+ deleted: boolean;
16
+ }
17
+ export declare const pullTopicQueryBuilder: (doc: Partial<ITopicReplicationData>) => IQueryBuilder;
18
+ export interface IQuestionReplicationVar extends IReplicationVar {
19
+ }
20
+ export interface IQuestionReplicationData extends IQuestion {
21
+ updatedAt: number;
22
+ deleted: boolean;
23
+ }
24
+ export declare const pullQuestionQueryBuilder: (doc: Partial<IQuestionReplicationData>) => IQueryBuilder;
25
+ export interface IOsceStationReplicationVar extends IReplicationVar {
26
+ }
27
+ export interface IOsceStationReplicationData extends Omit<IOsceStation, 'updatedAt'> {
28
+ updatedAt: number;
29
+ deleted: boolean;
30
+ }
31
+ export declare const pullOsceStationQueryBuilder: (doc: Partial<IOsceStationReplicationData>) => IQueryBuilder;
32
+ export {};
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pullOsceStationQueryBuilder = exports.pullQuestionQueryBuilder = exports.pullTopicQueryBuilder = void 0;
4
+ const REPLICATION_LIMIT = 5;
5
+ const topicReplicationQuery = `query TopicReplication($lastId: String!, $minUpdatedAt: Int!, $limit: Int!){
6
+ topicReplication(lastId: $lastId, minUpdatedAt: $minUpdatedAt, limit: $limit) {
7
+ id
8
+ updatedAt
9
+ name
10
+ totalQuestions
11
+ correctQuestions
12
+ incorrectQuestions
13
+ totalCards
14
+ ConfidentCards
15
+ ReviewCards
16
+ LearnCards
17
+ deleted
18
+ }
19
+ }`;
20
+ const pullTopicQueryBuilder = (doc) => {
21
+ return {
22
+ query: topicReplicationQuery,
23
+ variables: {
24
+ lastId: doc?.id ? doc.id.toString() : '0',
25
+ minUpdatedAt: doc?.updatedAt ? doc.updatedAt : 0,
26
+ limit: REPLICATION_LIMIT,
27
+ },
28
+ };
29
+ };
30
+ exports.pullTopicQueryBuilder = pullTopicQueryBuilder;
31
+ const questionReplicationQuery = `query QuestionReplication($lastId: String!, $minUpdatedAt: Int!, $limit: Int!){
32
+ questionReplication(lastId: $lastId, minUpdatedAt: $minUpdatedAt, limit: $limit) {
33
+ id
34
+ __typename
35
+ createdAt
36
+ updatedAt
37
+ typeId
38
+ topic {
39
+ id
40
+ __typename
41
+ name
42
+ typeId
43
+ }
44
+ conceptId
45
+ concept {
46
+ id
47
+ __typename
48
+ createdAt
49
+ updatedAt
50
+ name
51
+ chapterId
52
+ topicId
53
+ }
54
+ question
55
+ explanation
56
+ totalVotes
57
+ choices {
58
+ id
59
+ __typename
60
+ questionId
61
+ name
62
+ explanation
63
+ label
64
+ answer
65
+ votes
66
+ }
67
+ pictures {
68
+ id
69
+ __typename
70
+ pictureId
71
+ questionId
72
+ choiceId
73
+ picture {
74
+ id
75
+ __typename
76
+ createdAt
77
+ updatedAt
78
+ name
79
+ caption
80
+ path
81
+ path512
82
+ topicId
83
+ path256
84
+ }
85
+ }
86
+ difficulty
87
+ elo
88
+ psaSectionId
89
+ }
90
+ }`;
91
+ const pullQuestionQueryBuilder = (doc) => {
92
+ return {
93
+ query: questionReplicationQuery,
94
+ variables: {
95
+ lastId: doc?.id ? doc.id.toString() : '0',
96
+ minUpdatedAt: doc?.updatedAt ? doc.updatedAt : 0,
97
+ limit: REPLICATION_LIMIT,
98
+ },
99
+ };
100
+ };
101
+ exports.pullQuestionQueryBuilder = pullQuestionQueryBuilder;
102
+ const osceStationReplicationQuery = `query OsceStationReplication($lastId: String!, $minUpdatedAt: Int!, $limit: Int!){
103
+ topicReplication(lastId: $lastId, minUpdatedAt: $minUpdatedAt, limit: $limit) {
104
+ id
105
+ updatedAt
106
+ deleted
107
+ name
108
+ osceType {
109
+ id
110
+ name
111
+ # user-specific keys
112
+ # completed
113
+ # total
114
+ # avgScore
115
+ }
116
+ difficulty
117
+ candidateBrief
118
+ examinerBrief
119
+ actorBrief
120
+ explanation
121
+ marks {
122
+ id
123
+ index
124
+ osceStationId
125
+ header
126
+ name
127
+ }
128
+ topics {
129
+ ...TopicFields
130
+ }
131
+ candidatePictures {
132
+ ...PictureFields
133
+ }
134
+ actorPictures {
135
+ ...PictureFields
136
+ }
137
+ exmainerPictures {
138
+ ...PictureFields
139
+ }
140
+ walkthroughPictures{
141
+ ...PictureFields
142
+ }
143
+
144
+ # user-specific keys
145
+ # lastOsceMarksheetId
146
+ # score
147
+ }
148
+
149
+ fragment PictureFields on OscePicture {
150
+ id
151
+ osceStationId
152
+ pictureId
153
+ picture {
154
+ id
155
+ createdAt
156
+ updatedAt
157
+ name
158
+ caption
159
+ path
160
+ path512
161
+ path256
162
+ topicId
163
+ topic {
164
+ ...TopicFields
165
+ }
166
+ }
167
+ }
168
+ fragment TopicFields on Topic {
169
+ id
170
+ name
171
+ typeId
172
+ }
173
+ }`;
174
+ const pullOsceStationQueryBuilder = (doc) => {
175
+ return {
176
+ query: osceStationReplicationQuery,
177
+ variables: {
178
+ lastId: doc?.id ? doc.id.toString() : '0',
179
+ minUpdatedAt: doc?.updatedAt ? doc.updatedAt : 0,
180
+ limit: REPLICATION_LIMIT,
181
+ },
182
+ };
183
+ };
184
+ exports.pullOsceStationQueryBuilder = pullOsceStationQueryBuilder;
@@ -0,0 +1,15 @@
1
+ import { Id, IPreBuildTodo, ITodo } from '../../../models';
2
+ import { graphqlNormalize, RestrictedData } from '../../types';
3
+ export interface IPreBuildTodoVar {
4
+ topicIds: number[];
5
+ conceptIds: number[];
6
+ search: string;
7
+ source: string;
8
+ }
9
+ export declare type IPreBuildTodoData = RestrictedData<graphqlNormalize & IPreBuildTodo, 'preBuildTodo'>;
10
+ export interface ITodoVar {
11
+ id: Id;
12
+ }
13
+ export declare type ITodoData = RestrictedData<graphqlNormalize & ITodo, 'todo'>;
14
+ export declare type IDailyFeedVar = null;
15
+ export declare type IDailyFeedData = RestrictedData<graphqlNormalize & ITodo, 'dailyFeed'>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { ETopicType, Id, ITopic } from '../../../models';
2
+ import { graphqlNormalize, RestrictedData } from '../../types';
3
+ export interface ITopicVar {
4
+ id: Id;
5
+ }
6
+ export declare type ITopicData = RestrictedData<graphqlNormalize & ITopic, 'topic'>;
7
+ export interface ITopicsVar {
8
+ filter: ETopicType;
9
+ }
10
+ export declare type ITopicsData = RestrictedData<(graphqlNormalize & ITopic)[], 'topics'>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import { graphqlNormalize, RestrictedData } from '../../types';
2
+ export interface IUniversityLeaderboardVar {
3
+ limit: number;
4
+ }
5
+ export interface IUniversitiesRankSpeciality {
6
+ name: string;
7
+ speciality: string;
8
+ rank: number;
9
+ }
10
+ export interface IUniversityLeaderboard {
11
+ updatedAt: number | Date | null;
12
+ month: IUniversitiesRankSpeciality[];
13
+ quarter: IUniversitiesRankSpeciality[];
14
+ }
15
+ export declare type IUniversityLeaderboardData = RestrictedData<graphqlNormalize & IUniversityLeaderboard, 'universityLeaderboard'>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import { IUser } from '../../../models';
2
+ import { graphqlNormalize, RestrictedData } from '../../types';
3
+ export declare type IDashboardUserVar = null;
4
+ export declare type IDashboardUserData = RestrictedData<graphqlNormalize & IUser, 'dashboardUser'>;
5
+ export declare type IUserVar = null;
6
+ export declare type IUserData = RestrictedData<graphqlNormalize & IUser, 'user'>;
7
+ export declare type IDailyProgressVar = null;
8
+ export interface IDailyProgressInfo {
9
+ totalCount: number;
10
+ totalTrue: number;
11
+ dateString: string;
12
+ }
13
+ export declare type IDailyProgressData = RestrictedData<(graphqlNormalize & IDailyProgressInfo)[], 'dailyProgress'>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { Id, IVideo } from '../../../models';
2
+ import { graphqlNormalize, RestrictedData } from '../../types';
3
+ export interface IVideoVar {
4
+ id: Id;
5
+ }
6
+ export declare type IVideoData = RestrictedData<graphqlNormalize & IVideo, 'video'>;
7
+ export interface IVideosVar {
8
+ filter: 'new' | 'popular' | 'personal' | 'live' | 'osce';
9
+ limit: number;
10
+ }
11
+ export declare type IVideosData = RestrictedData<(graphqlNormalize & IVideo)[], 'videos'>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,26 @@
1
+ import { IMarksheet, IOsceMarksheet, ITodo } from '../../models';
2
+ import { graphqlNormalize, RootData } from '../types';
3
+ export declare const SAMPLE_CONTENT: import("@apollo/client").DocumentNode;
4
+ export declare type ISampleContentVar = null;
5
+ interface ISampleContent {
6
+ marksheets: IMarksheet[];
7
+ todos: ITodo[];
8
+ osceMarksheets: IOsceMarksheet[];
9
+ }
10
+ export declare type ISampleContentData = RootData<graphqlNormalize & ISampleContent, 'sampleContent'>;
11
+ export declare const SAMPLE_MARKSHEET: import("@apollo/client").DocumentNode;
12
+ export interface ISampleMarksheetVar {
13
+ marksheetId: number;
14
+ }
15
+ export declare type ISampleMarksheetData = RootData<graphqlNormalize & IMarksheet, 'sampleMarksheet'>;
16
+ export declare const SAMPLE_TODO: import("@apollo/client").DocumentNode;
17
+ export interface ISampleTodoVar {
18
+ todoId: number;
19
+ }
20
+ export declare type ISampleTodoData = RootData<graphqlNormalize & ITodo, 'sampleTodo'>;
21
+ export declare const SAMPLE_OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
22
+ export interface ISampleOsceMarksheetVar {
23
+ osceMarksheetId: number;
24
+ }
25
+ export declare type ISampleOsceMarksheetData = RootData<graphqlNormalize & IOsceMarksheet, 'sampleOsceMarksheet'>;
26
+ export {};