@quesmed/types 1.3.17 → 1.4.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 (186) hide show
  1. package/gql_input_output_types/User.js +2 -1
  2. package/gql_input_output_types/User.mjs +1 -0
  3. package/gql_input_output_types/index.d.ts +1 -0
  4. package/gql_input_output_types/index.js +2 -1
  5. package/gql_input_output_types/index.mjs +1 -0
  6. package/index.js +7 -4
  7. package/index.mjs +17 -0
  8. package/models/Author.js +2 -1
  9. package/models/Author.mjs +1 -0
  10. package/models/Book.js +2 -1
  11. package/models/Book.mjs +1 -0
  12. package/models/Card.js +2 -1
  13. package/models/Card.mjs +1 -0
  14. package/models/Chapter.js +2 -1
  15. package/models/Chapter.mjs +1 -0
  16. package/models/Concept.js +2 -1
  17. package/models/Concept.mjs +1 -0
  18. package/models/Difficulty.js +5 -2
  19. package/models/Difficulty.mjs +7 -0
  20. package/models/Feedback.js +2 -1
  21. package/models/Feedback.mjs +1 -0
  22. package/models/File.js +2 -1
  23. package/models/File.mjs +1 -0
  24. package/models/Marksheet.js +5 -2
  25. package/models/Marksheet.mjs +6 -0
  26. package/models/MockTest.js +2 -1
  27. package/models/MockTest.mjs +1 -0
  28. package/models/OsceMarksheet.js +7 -4
  29. package/models/OsceMarksheet.mjs +20 -0
  30. package/models/OsceStation.js +6 -3
  31. package/models/OsceStation.mjs +42 -0
  32. package/models/Picture.js +2 -1
  33. package/models/Picture.mjs +5 -0
  34. package/models/Promo.js +2 -1
  35. package/models/Promo.mjs +1 -0
  36. package/models/Question.js +15 -8
  37. package/models/Question.mjs +30 -0
  38. package/models/Subscription.js +5 -2
  39. package/models/Subscription.mjs +6 -0
  40. package/models/Todo.js +2 -1
  41. package/models/Todo.mjs +1 -0
  42. package/models/Token.js +2 -1
  43. package/models/Token.mjs +1 -0
  44. package/models/Topic.js +5 -2
  45. package/models/Topic.mjs +10 -0
  46. package/models/Type.js +2 -1
  47. package/models/Type.mjs +1 -0
  48. package/models/University.js +2 -1
  49. package/models/University.mjs +1 -0
  50. package/models/User.js +2 -1
  51. package/models/User.mjs +1 -0
  52. package/models/Video.js +2 -1
  53. package/models/Video.mjs +1 -0
  54. package/models/index.js +35 -23
  55. package/models/index.mjs +23 -0
  56. package/package.json +4 -2
  57. package/resolvers/apollo.js +2 -1
  58. package/resolvers/apollo.mjs +1 -0
  59. package/resolvers/fragments/chapter.d.ts +2 -0
  60. package/resolvers/fragments/chapter.js +31 -0
  61. package/resolvers/fragments/chapter.mjs +28 -0
  62. package/resolvers/fragments/concept.d.ts +3 -0
  63. package/resolvers/fragments/concept.js +79 -0
  64. package/resolvers/fragments/concept.mjs +76 -0
  65. package/resolvers/fragments/osce.d.ts +10 -0
  66. package/resolvers/fragments/osce.js +171 -0
  67. package/resolvers/fragments/osce.mjs +168 -0
  68. package/resolvers/fragments/picture.d.ts +3 -0
  69. package/resolvers/fragments/picture.js +44 -0
  70. package/resolvers/fragments/picture.mjs +41 -0
  71. package/resolvers/fragments/user.d.ts +1 -0
  72. package/resolvers/fragments/user.js +26 -0
  73. package/resolvers/fragments/user.mjs +23 -0
  74. package/resolvers/fragments/video.d.ts +2 -0
  75. package/resolvers/fragments/video.js +49 -0
  76. package/resolvers/fragments/video.mjs +46 -0
  77. package/resolvers/mutation/admin/algoliaSync.js +2 -1
  78. package/resolvers/mutation/admin/algoliaSync.mjs +1 -0
  79. package/resolvers/mutation/admin/index.js +14 -2
  80. package/resolvers/mutation/admin/index.mjs +2 -0
  81. package/resolvers/mutation/admin/token.js +2 -1
  82. package/resolvers/mutation/admin/token.mjs +1 -0
  83. package/resolvers/mutation/index.js +14 -2
  84. package/resolvers/mutation/index.mjs +2 -0
  85. package/resolvers/mutation/restricted/agora.js +2 -1
  86. package/resolvers/mutation/restricted/agora.mjs +1 -0
  87. package/resolvers/mutation/restricted/contactUs.js +2 -1
  88. package/resolvers/mutation/restricted/contactUs.mjs +1 -0
  89. package/resolvers/mutation/restricted/index.js +22 -10
  90. package/resolvers/mutation/restricted/index.mjs +10 -0
  91. package/resolvers/mutation/restricted/marksheet.js +2 -1
  92. package/resolvers/mutation/restricted/marksheet.mjs +1 -0
  93. package/resolvers/mutation/restricted/mockTest.js +2 -1
  94. package/resolvers/mutation/restricted/mockTest.mjs +1 -0
  95. package/resolvers/mutation/restricted/osce.d.ts +36 -8
  96. package/resolvers/mutation/restricted/osce.js +202 -1
  97. package/resolvers/mutation/restricted/osce.mjs +198 -0
  98. package/resolvers/mutation/restricted/questionDiscussion.js +2 -1
  99. package/resolvers/mutation/restricted/questionDiscussion.mjs +1 -0
  100. package/resolvers/mutation/restricted/todo.js +7 -3
  101. package/resolvers/mutation/restricted/todo.mjs +25 -0
  102. package/resolvers/mutation/restricted/token.js +2 -1
  103. package/resolvers/mutation/restricted/token.mjs +1 -0
  104. package/resolvers/mutation/restricted/users.js +2 -1
  105. package/resolvers/mutation/restricted/users.mjs +1 -0
  106. package/resolvers/mutation/restricted/video.js +2 -1
  107. package/resolvers/mutation/restricted/video.mjs +1 -0
  108. package/resolvers/mutation/stripe.js +2 -1
  109. package/resolvers/mutation/stripe.mjs +1 -0
  110. package/resolvers/mutation/users.js +2 -1
  111. package/resolvers/mutation/users.mjs +1 -0
  112. package/resolvers/mutation/validUserToken/index.js +13 -1
  113. package/resolvers/mutation/validUserToken/index.mjs +1 -0
  114. package/resolvers/mutation/validUserToken/user.js +2 -1
  115. package/resolvers/mutation/validUserToken/user.mjs +1 -0
  116. package/resolvers/query/admin/getUserToken.js +2 -1
  117. package/resolvers/query/admin/getUserToken.mjs +1 -0
  118. package/resolvers/query/admin/index.js +13 -1
  119. package/resolvers/query/admin/index.mjs +1 -0
  120. package/resolvers/query/author.js +2 -1
  121. package/resolvers/query/author.mjs +1 -0
  122. package/resolvers/query/book.js +2 -1
  123. package/resolvers/query/book.mjs +1 -0
  124. package/resolvers/query/feedback.js +2 -1
  125. package/resolvers/query/feedback.mjs +1 -0
  126. package/resolvers/query/index.js +21 -9
  127. package/resolvers/query/index.mjs +9 -0
  128. package/resolvers/query/restricted/anatomy.js +2 -1
  129. package/resolvers/query/restricted/anatomy.mjs +1 -0
  130. package/resolvers/query/restricted/index.d.ts +1 -0
  131. package/resolvers/query/restricted/index.js +23 -10
  132. package/resolvers/query/restricted/index.mjs +11 -0
  133. package/resolvers/query/restricted/marksheet.js +2 -1
  134. package/resolvers/query/restricted/marksheet.mjs +1 -0
  135. package/resolvers/query/restricted/mockTests.js +2 -1
  136. package/resolvers/query/restricted/mockTests.mjs +1 -0
  137. package/resolvers/query/restricted/osce.d.ts +20 -12
  138. package/resolvers/query/restricted/osce.js +93 -1
  139. package/resolvers/query/restricted/osce.mjs +90 -0
  140. package/resolvers/query/restricted/quesBook.d.ts +1 -0
  141. package/resolvers/query/restricted/quesBook.js +15 -1
  142. package/resolvers/query/restricted/quesBook.mjs +12 -0
  143. package/resolvers/query/restricted/replication.d.ts +33 -0
  144. package/resolvers/query/restricted/replication.js +184 -0
  145. package/resolvers/query/restricted/replication.mjs +178 -0
  146. package/resolvers/query/restricted/todos.js +2 -1
  147. package/resolvers/query/restricted/todos.mjs +1 -0
  148. package/resolvers/query/restricted/topics.js +2 -1
  149. package/resolvers/query/restricted/topics.mjs +1 -0
  150. package/resolvers/query/restricted/university.js +2 -1
  151. package/resolvers/query/restricted/university.mjs +1 -0
  152. package/resolvers/query/restricted/user.js +2 -1
  153. package/resolvers/query/restricted/user.mjs +1 -0
  154. package/resolvers/query/restricted/video.js +2 -1
  155. package/resolvers/query/restricted/video.mjs +1 -0
  156. package/resolvers/query/sampleCards.js +2 -1
  157. package/resolvers/query/sampleCards.mjs +1 -0
  158. package/resolvers/query/sampleQuestions.js +2 -1
  159. package/resolvers/query/sampleQuestions.mjs +1 -0
  160. package/resolvers/query/subscription.js +2 -1
  161. package/resolvers/query/subscription.mjs +1 -0
  162. package/resolvers/query/university.js +2 -1
  163. package/resolvers/query/university.mjs +1 -0
  164. package/resolvers/query/user.js +2 -1
  165. package/resolvers/query/user.mjs +1 -0
  166. package/resolvers/query/video.js +2 -1
  167. package/resolvers/query/video.mjs +1 -0
  168. package/resolvers/subscription/index.js +13 -1
  169. package/resolvers/subscription/index.mjs +1 -0
  170. package/resolvers/subscription/osce.d.ts +14 -7
  171. package/resolvers/subscription/osce.js +45 -10
  172. package/resolvers/subscription/osce.mjs +70 -0
  173. package/utils/commonFunctions.js +17 -11
  174. package/utils/commonFunctions.mjs +217 -0
  175. package/utils/index.d.ts +5 -0
  176. package/utils/index.js +17 -0
  177. package/utils/index.mjs +5 -0
  178. package/utils/lightgallery.js +5 -1
  179. package/utils/lightgallery.mjs +87 -0
  180. package/{resolvers → utils}/offlineLink.d.ts +0 -0
  181. package/utils/offlineLink.js +237 -0
  182. package/{resolvers/offlineLink.js → utils/offlineLink.mjs} +4 -4
  183. package/utils/uuid4.js +3 -1
  184. package/utils/uuid4.mjs +285 -0
  185. package/utils/wordsToNumber.js +5 -1
  186. package/utils/wordsToNumber.mjs +44 -0
@@ -0,0 +1,90 @@
1
+ import { gql } from '@apollo/client';
2
+ import { OSCE_MARKSHEET_FIELDS, OSCE_STATION_TOPIC_FIELDS, OSCE_TYPE_FIELDS, } from '../../fragments/osce';
3
+ import { OSCE_STATION_FIELDS } from './../../fragments/osce';
4
+ export const DASHBOARD_OSCE = gql `
5
+ ${OSCE_TYPE_FIELDS}
6
+ query DashboardOsce($solo: Boolean!) {
7
+ restricted {
8
+ dashboardOsce(solo: $solo) {
9
+ lastAgoraId
10
+ types {
11
+ ...OsceTypeFields
12
+ # user-specific
13
+ completed
14
+ total
15
+ avgScore
16
+ }
17
+ avgScore
18
+ completed
19
+ total
20
+ }
21
+ }
22
+ }
23
+ `;
24
+ export const OSCE_MARKSHEETS = gql `
25
+ ${OSCE_MARKSHEET_FIELDS}
26
+ query OsceMarksheets($solo: Boolean!) {
27
+ restricted {
28
+ osceMarksheets(solo: $solo) {
29
+ ...OsceMarksheetFields
30
+ }
31
+ }
32
+ }
33
+ `;
34
+ export const OSCE_MARKSHEET = gql `
35
+ ${OSCE_MARKSHEET_FIELDS}
36
+ query OsceMarksheet($osceMarksheetId: Int!) {
37
+ restricted {
38
+ osceMarksheet(id: $osceMarksheetId) {
39
+ ...OsceMarksheetFields
40
+ }
41
+ }
42
+ }
43
+ `;
44
+ export const OSCE_STATIONS = gql `
45
+ ${OSCE_STATION_FIELDS}
46
+ query OsceStations($solo: Boolean!) {
47
+ restricted {
48
+ osceStations(solo: $solo) {
49
+ ...OsceStationFields
50
+ }
51
+ }
52
+ }
53
+ `;
54
+ export const OSCE_STATION = gql `
55
+ ${OSCE_STATION_FIELDS}
56
+ query OsceStation($osceStationId: Int!) {
57
+ restricted {
58
+ osceStation(id: $osceStationId) {
59
+ ...OsceStationFields
60
+ }
61
+ }
62
+ }
63
+ `;
64
+ export const OSCE_TOPICS = gql `
65
+ ${OSCE_STATION_TOPIC_FIELDS}
66
+ query OsceTopics {
67
+ restricted {
68
+ osceTopics {
69
+ ...OsceStationTopicFields
70
+ }
71
+ }
72
+ }
73
+ `;
74
+ export const SEARCH_OSCE_STATIONS = gql `
75
+ ${OSCE_STATION_FIELDS}
76
+ query SearchOsceStations($search: String!) {
77
+ restricted {
78
+ searchOsceStations(search: $search) {
79
+ ...OsceStationFields
80
+ }
81
+ }
82
+ }
83
+ `;
84
+ export const HEARTBEAT = gql `
85
+ query Heartbeat($agoraId: String!) {
86
+ restricted {
87
+ heartbeat(agoraId: $agoraId)
88
+ }
89
+ }
90
+ `;
@@ -1,5 +1,6 @@
1
1
  import { IOsceStation, ITopic } from '../../../models';
2
2
  export declare type IQuesBookVar = null;
3
3
  export declare type IQuesBookData = ITopic[];
4
+ export declare const OSCE_BOOK: import("@apollo/client").DocumentNode;
4
5
  export declare type IOsceBookVar = null;
5
6
  export declare type IOsceBookData = IOsceStation[];
@@ -1 +1,15 @@
1
- export {};
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
+ }
13
+ }
14
+ }
15
+ `;
@@ -0,0 +1,12 @@
1
+ import { gql } from '@apollo/client';
2
+ import { OSCE_STATION_FIELDS } from './../../fragments/osce';
3
+ export const OSCE_BOOK = gql `
4
+ ${OSCE_STATION_FIELDS}
5
+ query OsceBook {
6
+ restricted {
7
+ osceBook {
8
+ ...OsceStationFields
9
+ }
10
+ }
11
+ }
12
+ `;
@@ -0,0 +1,33 @@
1
+ import { IOsceStation, IQuestion } from './../../../models';
2
+ import { ITopicInfo } from './topics';
3
+ interface IQueryBuilder {
4
+ query: string;
5
+ variables: IReplicationVar;
6
+ }
7
+ interface IReplicationVar {
8
+ lastId: string;
9
+ minUpdatedAt: number;
10
+ limit: number;
11
+ }
12
+ export interface ITopicReplicationVar extends IReplicationVar {
13
+ }
14
+ export interface ITopicReplicationData extends ITopicInfo {
15
+ updatedAt: number;
16
+ deleted: boolean;
17
+ }
18
+ export declare const pullTopicQueryBuilder: (doc: Partial<ITopicReplicationData>) => IQueryBuilder;
19
+ export interface IQuestionReplicationVar extends IReplicationVar {
20
+ }
21
+ export interface IQuestionReplicationData extends IQuestion {
22
+ updatedAt: number;
23
+ deleted: boolean;
24
+ }
25
+ export declare const pullQuestionQueryBuilder: (doc: Partial<IQuestionReplicationData>) => IQueryBuilder;
26
+ export interface IOsceStationReplicationVar extends IReplicationVar {
27
+ }
28
+ export interface IOsceStationReplicationData extends Omit<IOsceStation, 'updatedAt'> {
29
+ updatedAt: number;
30
+ deleted: boolean;
31
+ }
32
+ export declare const pullOsceStationQueryBuilder: (doc: Partial<IOsceStationReplicationData>) => IQueryBuilder;
33
+ 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 === null || doc === void 0 ? void 0 : doc.id) ? doc.id.toString() : '0',
25
+ minUpdatedAt: (doc === null || doc === void 0 ? void 0 : 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 === null || doc === void 0 ? void 0 : doc.id) ? doc.id.toString() : '0',
96
+ minUpdatedAt: (doc === null || doc === void 0 ? void 0 : 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
+ # attempted
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 === null || doc === void 0 ? void 0 : doc.id) ? doc.id.toString() : '0',
179
+ minUpdatedAt: (doc === null || doc === void 0 ? void 0 : doc.updatedAt) ? doc.updatedAt : 0,
180
+ limit: REPLICATION_LIMIT,
181
+ },
182
+ };
183
+ };
184
+ exports.pullOsceStationQueryBuilder = pullOsceStationQueryBuilder;
@@ -0,0 +1,178 @@
1
+ const REPLICATION_LIMIT = 5;
2
+ const topicReplicationQuery = `query TopicReplication($lastId: String!, $minUpdatedAt: Int!, $limit: Int!){
3
+ topicReplication(lastId: $lastId, minUpdatedAt: $minUpdatedAt, limit: $limit) {
4
+ id
5
+ updatedAt
6
+ name
7
+ totalQuestions
8
+ correctQuestions
9
+ incorrectQuestions
10
+ totalCards
11
+ ConfidentCards
12
+ ReviewCards
13
+ LearnCards
14
+ deleted
15
+ }
16
+ }`;
17
+ export const pullTopicQueryBuilder = (doc) => {
18
+ return {
19
+ query: topicReplicationQuery,
20
+ variables: {
21
+ lastId: (doc === null || doc === void 0 ? void 0 : doc.id) ? doc.id.toString() : '0',
22
+ minUpdatedAt: (doc === null || doc === void 0 ? void 0 : doc.updatedAt) ? doc.updatedAt : 0,
23
+ limit: REPLICATION_LIMIT,
24
+ },
25
+ };
26
+ };
27
+ const questionReplicationQuery = `query QuestionReplication($lastId: String!, $minUpdatedAt: Int!, $limit: Int!){
28
+ questionReplication(lastId: $lastId, minUpdatedAt: $minUpdatedAt, limit: $limit) {
29
+ id
30
+ __typename
31
+ createdAt
32
+ updatedAt
33
+ typeId
34
+ topic {
35
+ id
36
+ __typename
37
+ name
38
+ typeId
39
+ }
40
+ conceptId
41
+ concept {
42
+ id
43
+ __typename
44
+ createdAt
45
+ updatedAt
46
+ name
47
+ chapterId
48
+ topicId
49
+ }
50
+ question
51
+ explanation
52
+ totalVotes
53
+ choices {
54
+ id
55
+ __typename
56
+ questionId
57
+ name
58
+ explanation
59
+ label
60
+ answer
61
+ votes
62
+ }
63
+ pictures {
64
+ id
65
+ __typename
66
+ pictureId
67
+ questionId
68
+ choiceId
69
+ picture {
70
+ id
71
+ __typename
72
+ createdAt
73
+ updatedAt
74
+ name
75
+ caption
76
+ path
77
+ path512
78
+ topicId
79
+ path256
80
+ }
81
+ }
82
+ difficulty
83
+ elo
84
+ psaSectionId
85
+ }
86
+ }`;
87
+ export const pullQuestionQueryBuilder = (doc) => {
88
+ return {
89
+ query: questionReplicationQuery,
90
+ variables: {
91
+ lastId: (doc === null || doc === void 0 ? void 0 : doc.id) ? doc.id.toString() : '0',
92
+ minUpdatedAt: (doc === null || doc === void 0 ? void 0 : doc.updatedAt) ? doc.updatedAt : 0,
93
+ limit: REPLICATION_LIMIT,
94
+ },
95
+ };
96
+ };
97
+ const osceStationReplicationQuery = `query OsceStationReplication($lastId: String!, $minUpdatedAt: Int!, $limit: Int!){
98
+ topicReplication(lastId: $lastId, minUpdatedAt: $minUpdatedAt, limit: $limit) {
99
+ id
100
+ updatedAt
101
+ deleted
102
+ name
103
+ osceType {
104
+ id
105
+ name
106
+ # user-specific keys
107
+ # completed
108
+ # total
109
+ # avgScore
110
+ }
111
+ difficulty
112
+ candidateBrief
113
+ examinerBrief
114
+ actorBrief
115
+ explanation
116
+ marks {
117
+ id
118
+ index
119
+ osceStationId
120
+ header
121
+ name
122
+ }
123
+ topics {
124
+ ...TopicFields
125
+ }
126
+ candidatePictures {
127
+ ...PictureFields
128
+ }
129
+ actorPictures {
130
+ ...PictureFields
131
+ }
132
+ exmainerPictures {
133
+ ...PictureFields
134
+ }
135
+ walkthroughPictures{
136
+ ...PictureFields
137
+ }
138
+
139
+ # user-specific keys
140
+ # attempted
141
+ # score
142
+ }
143
+
144
+ fragment PictureFields on OscePicture {
145
+ id
146
+ osceStationId
147
+ pictureId
148
+ picture {
149
+ id
150
+ createdAt
151
+ updatedAt
152
+ name
153
+ caption
154
+ path
155
+ path512
156
+ path256
157
+ topicId
158
+ topic {
159
+ ...TopicFields
160
+ }
161
+ }
162
+ }
163
+ fragment TopicFields on Topic {
164
+ id
165
+ name
166
+ typeId
167
+ }
168
+ }`;
169
+ export const pullOsceStationQueryBuilder = (doc) => {
170
+ return {
171
+ query: osceStationReplicationQuery,
172
+ variables: {
173
+ lastId: (doc === null || doc === void 0 ? void 0 : doc.id) ? doc.id.toString() : '0',
174
+ minUpdatedAt: (doc === null || doc === void 0 ? void 0 : doc.updatedAt) ? doc.updatedAt : 0,
175
+ limit: REPLICATION_LIMIT,
176
+ },
177
+ };
178
+ };
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,13 @@
1
- export * from './osce';
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./osce"), exports);
@@ -0,0 +1 @@
1
+ export * from './osce';
@@ -1,8 +1,8 @@
1
1
  import { EOsceMarksheetAction, EOsceRoles, IClassYear, Id, IOsceMarksheetUser, IUser } from '../../models';
2
- export declare const ROLE_CHANGED = "ROLE_CHANGED";
3
- export declare const OSCE_MARKSHEET_ACTION = "OSCE_MARKSHEET_ACTION";
4
- export declare const OSCE_MATCHMAKING = "OSCE_MATCHMAKING";
5
- export declare const OSCE_MATCHMAKING_USERS = "OSCE_MATCHMAKING_USERS";
2
+ export declare const OSCE_ROLE_CHANGE_KEY = "OSCE_ROLE_CHANGE";
3
+ export declare const OSCE_MARKSHEET_ACTION_KEY = "OSCE_MARKSHEET_ACTION";
4
+ export declare const OSCE_MATCHMAKING_KEY = "OSCE_MATCHMAKING";
5
+ export declare const OSCE_MATCHMAKING_USERS_KEY = "OSCE_MATCHMAKING_USERS";
6
6
  export interface IOsceGroupMember {
7
7
  role: EOsceRoles;
8
8
  user: IUser | null;
@@ -13,11 +13,13 @@ export interface IOsceGroup {
13
13
  members: IOsceMarksheetUser[];
14
14
  }
15
15
  export declare const OsceGroupInit: (osceMarksheetId: number) => IOsceMarksheetUser[];
16
- export interface IRoleChangedVar {
16
+ export declare const OSCE_ROLE_CHANGE: import("@apollo/client").DocumentNode;
17
+ export interface IOsceRoleChangedVar {
17
18
  osceMarksheetId: Id;
18
19
  }
19
- export interface IRoleChangedData extends IOsceGroup {
20
+ export interface IOsceRoleChangedData extends IOsceGroup {
20
21
  }
22
+ export declare const OSCE_MARKSHEET_ACTION: import("@apollo/client").DocumentNode;
21
23
  export interface IOsceMarksheetActionsVar {
22
24
  osceMarksheetId: Id;
23
25
  }
@@ -32,6 +34,7 @@ export interface IOsceMarksheetAction {
32
34
  }
33
35
  export interface IOsceMarksheetActionsData extends IOsceMarksheetAction {
34
36
  }
37
+ export declare const OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
35
38
  export interface IOsceMatchmakingAction {
36
39
  osceMarksheetId: Id;
37
40
  agoraId: string;
@@ -40,7 +43,11 @@ export interface IOsceMatchmakingAction {
40
43
  classYear: IClassYear;
41
44
  lastSyncAt: number;
42
45
  startedAt: number;
43
- complete: boolean;
46
+ grouped: boolean;
47
+ completed: boolean;
44
48
  }
45
49
  export interface IOsceMatchmakingData extends IOsceMatchmakingAction {
46
50
  }
51
+ export declare const OSCE_MATCHMAKING_USERS: import("@apollo/client").DocumentNode;
52
+ export declare type IOsceMatchmakingUsersData = number;
53
+ export declare type IOsceMatchmakingUsersVar = null;