@quesmed/types 1.3.15 → 1.3.20

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 (90) hide show
  1. package/gql_input_output_types/User.mjs +1 -0
  2. package/gql_input_output_types/index.d.ts +1 -0
  3. package/gql_input_output_types/index.mjs +1 -0
  4. package/index.mjs +17 -0
  5. package/models/Author.mjs +1 -0
  6. package/models/Book.mjs +1 -0
  7. package/models/Card.mjs +1 -0
  8. package/models/Chapter.mjs +1 -0
  9. package/models/Concept.mjs +1 -0
  10. package/models/Difficulty.mjs +7 -0
  11. package/models/Feedback.mjs +1 -0
  12. package/models/File.mjs +1 -0
  13. package/models/Marksheet.mjs +6 -0
  14. package/models/MockTest.mjs +1 -0
  15. package/models/OsceMarksheet.mjs +20 -0
  16. package/models/OsceStation.mjs +42 -0
  17. package/models/Picture.mjs +5 -0
  18. package/models/Promo.mjs +1 -0
  19. package/models/Question.mjs +30 -0
  20. package/models/Subscription.mjs +6 -0
  21. package/models/Todo.mjs +1 -0
  22. package/models/Token.mjs +1 -0
  23. package/models/Topic.mjs +10 -0
  24. package/models/Type.mjs +1 -0
  25. package/models/University.mjs +1 -0
  26. package/models/User.mjs +1 -0
  27. package/models/Video.mjs +1 -0
  28. package/models/index.mjs +23 -0
  29. package/package.json +16 -3
  30. package/resolvers/apollo.d.ts +8 -0
  31. package/resolvers/apollo.js +2 -0
  32. package/resolvers/apollo.mjs +1 -0
  33. package/resolvers/mutation/admin/algoliaSync.mjs +1 -0
  34. package/resolvers/mutation/admin/index.mjs +2 -0
  35. package/resolvers/mutation/admin/token.mjs +1 -0
  36. package/resolvers/mutation/index.mjs +2 -0
  37. package/resolvers/mutation/restricted/agora.mjs +1 -0
  38. package/resolvers/mutation/restricted/contactUs.mjs +1 -0
  39. package/resolvers/mutation/restricted/index.mjs +10 -0
  40. package/resolvers/mutation/restricted/marksheet.mjs +1 -0
  41. package/resolvers/mutation/restricted/mockTest.mjs +1 -0
  42. package/resolvers/mutation/restricted/osce.mjs +1 -0
  43. package/resolvers/mutation/restricted/questionDiscussion.mjs +1 -0
  44. package/resolvers/mutation/restricted/todo.d.ts +5 -0
  45. package/resolvers/mutation/restricted/todo.js +27 -0
  46. package/resolvers/mutation/restricted/todo.mjs +25 -0
  47. package/resolvers/mutation/restricted/token.mjs +1 -0
  48. package/resolvers/mutation/restricted/users.mjs +1 -0
  49. package/resolvers/mutation/restricted/video.mjs +1 -0
  50. package/resolvers/mutation/stripe.mjs +1 -0
  51. package/resolvers/mutation/users.mjs +1 -0
  52. package/resolvers/mutation/validUserToken/index.mjs +1 -0
  53. package/resolvers/mutation/validUserToken/user.mjs +1 -0
  54. package/resolvers/query/admin/getUserToken.mjs +1 -0
  55. package/resolvers/query/admin/index.mjs +1 -0
  56. package/resolvers/query/author.mjs +1 -0
  57. package/resolvers/query/book.mjs +1 -0
  58. package/resolvers/query/feedback.mjs +1 -0
  59. package/resolvers/query/index.mjs +9 -0
  60. package/resolvers/query/restricted/anatomy.mjs +1 -0
  61. package/resolvers/query/restricted/index.mjs +10 -0
  62. package/resolvers/query/restricted/marksheet.mjs +1 -0
  63. package/resolvers/query/restricted/mockTests.mjs +1 -0
  64. package/resolvers/query/restricted/osce.mjs +1 -0
  65. package/resolvers/query/restricted/quesBook.mjs +1 -0
  66. package/resolvers/query/restricted/todos.mjs +1 -0
  67. package/resolvers/query/restricted/topics.mjs +1 -0
  68. package/resolvers/query/restricted/university.mjs +1 -0
  69. package/resolvers/query/restricted/user.mjs +1 -0
  70. package/resolvers/query/restricted/video.mjs +1 -0
  71. package/resolvers/query/sampleCards.mjs +1 -0
  72. package/resolvers/query/sampleQuestions.mjs +1 -0
  73. package/resolvers/query/subscription.mjs +1 -0
  74. package/resolvers/query/university.mjs +1 -0
  75. package/resolvers/query/user.mjs +1 -0
  76. package/resolvers/query/video.mjs +1 -0
  77. package/resolvers/subscription/index.mjs +1 -0
  78. package/resolvers/subscription/osce.mjs +39 -0
  79. package/utils/commonFunctions.mjs +217 -0
  80. package/utils/index.d.ts +5 -0
  81. package/utils/index.js +17 -0
  82. package/utils/index.mjs +5 -0
  83. package/utils/lightgallery.d.ts +4 -2
  84. package/utils/lightgallery.js +4 -1
  85. package/utils/lightgallery.mjs +87 -0
  86. package/utils/offlineLink.d.ts +64 -0
  87. package/utils/offlineLink.js +237 -0
  88. package/utils/offlineLink.mjs +230 -0
  89. package/utils/uuid4.mjs +285 -0
  90. package/utils/wordsToNumber.mjs +44 -0
@@ -0,0 +1 @@
1
+ export {};
@@ -19,6 +19,7 @@ export interface UserTopicCardsInfo {
19
19
  LearnCards: number;
20
20
  }
21
21
  export interface TodoInfo {
22
+ id: Id;
22
23
  todoId: Id;
23
24
  cardId: Id;
24
25
  question: string;
@@ -0,0 +1 @@
1
+ export {};
package/index.mjs ADDED
@@ -0,0 +1,17 @@
1
+ export const ERRORS = {
2
+ TOKEN_INVALID: 'Invalid token.',
3
+ TOKEN_MISSING: 'Missing token.',
4
+ TOKEN_EXPIRED: 'Expired token.',
5
+ SUBSCRIPTION_EXPIRED: 'Expired subscription.',
6
+ PERMISSION_INVALID: 'Invalid permission.',
7
+ };
8
+ export const FCM_TOPICS = {
9
+ GLOBAL: 'global',
10
+ QBANK: 'qbank',
11
+ OSCE: 'osce',
12
+ };
13
+ export var EPlatformId;
14
+ (function (EPlatformId) {
15
+ EPlatformId[EPlatformId["QBANK"] = 0] = "QBANK";
16
+ EPlatformId[EPlatformId["OSCE"] = 1] = "OSCE";
17
+ })(EPlatformId || (EPlatformId = {}));
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export var EDifficultyType;
2
+ (function (EDifficultyType) {
3
+ EDifficultyType[EDifficultyType["ALL"] = 0] = "ALL";
4
+ EDifficultyType[EDifficultyType["CORE"] = 1] = "CORE";
5
+ EDifficultyType[EDifficultyType["CHALLENGING"] = 2] = "CHALLENGING";
6
+ EDifficultyType[EDifficultyType["DIFFICULT"] = 3] = "DIFFICULT";
7
+ })(EDifficultyType || (EDifficultyType = {}));
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ export var EQuestionLike;
2
+ (function (EQuestionLike) {
3
+ EQuestionLike[EQuestionLike["NONE"] = 0] = "NONE";
4
+ EQuestionLike[EQuestionLike["LIKE"] = 1] = "LIKE";
5
+ EQuestionLike[EQuestionLike["DISLIKE"] = 2] = "DISLIKE";
6
+ })(EQuestionLike || (EQuestionLike = {}));
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ export var EOsceRoles;
2
+ (function (EOsceRoles) {
3
+ EOsceRoles[EOsceRoles["ALL"] = 0] = "ALL";
4
+ EOsceRoles[EOsceRoles["CANDIDATE"] = 1] = "CANDIDATE";
5
+ EOsceRoles[EOsceRoles["ACTOR"] = 2] = "ACTOR";
6
+ EOsceRoles[EOsceRoles["EXAMINER"] = 3] = "EXAMINER";
7
+ EOsceRoles[EOsceRoles["OBSERVER"] = 4] = "OBSERVER";
8
+ })(EOsceRoles || (EOsceRoles = {}));
9
+ export var EOsceMarksheetAction;
10
+ (function (EOsceMarksheetAction) {
11
+ EOsceMarksheetAction[EOsceMarksheetAction["PRESTART"] = 0] = "PRESTART";
12
+ EOsceMarksheetAction[EOsceMarksheetAction["START"] = 1] = "START";
13
+ EOsceMarksheetAction[EOsceMarksheetAction["END"] = 2] = "END";
14
+ EOsceMarksheetAction[EOsceMarksheetAction["PAUSE"] = 3] = "PAUSE";
15
+ EOsceMarksheetAction[EOsceMarksheetAction["CONTINUE"] = 4] = "CONTINUE";
16
+ EOsceMarksheetAction[EOsceMarksheetAction["CONNECT"] = 5] = "CONNECT";
17
+ EOsceMarksheetAction[EOsceMarksheetAction["DISCONNECT"] = 6] = "DISCONNECT";
18
+ EOsceMarksheetAction[EOsceMarksheetAction["SELECT"] = 7] = "SELECT";
19
+ EOsceMarksheetAction[EOsceMarksheetAction["LEFT"] = 8] = "LEFT";
20
+ })(EOsceMarksheetAction || (EOsceMarksheetAction = {}));
@@ -0,0 +1,42 @@
1
+ export var EOsceType;
2
+ (function (EOsceType) {
3
+ EOsceType[EOsceType["ALL"] = 0] = "ALL";
4
+ EOsceType[EOsceType["HISTORY_TAKING"] = 1] = "HISTORY_TAKING";
5
+ EOsceType[EOsceType["COMMUNICATION_SKILLS"] = 2] = "COMMUNICATION_SKILLS";
6
+ EOsceType[EOsceType["EXAMINATION"] = 3] = "EXAMINATION";
7
+ EOsceType[EOsceType["PROCEDURE"] = 4] = "PROCEDURE";
8
+ EOsceType[EOsceType["INTERPRETATION"] = 5] = "INTERPRETATION";
9
+ EOsceType[EOsceType["ABCDE"] = 6] = "ABCDE";
10
+ })(EOsceType || (EOsceType = {}));
11
+ export const OSCE_GLOBAL_RATING = {
12
+ [EOsceType.ABCDE]: `1. Fail - The candidate did not perform large parts of the scenario to the required standard
13
+ 2. Borderline - It is not clear whether the candidate demonstrated acceptable performance: either the whole task was performed slightly below passing level or there were some key errors or omissions
14
+ 3. Pass - The task was performed to an acceptable level. There may have been some minor errors or omissions.
15
+ 4. Good - The performance of the candidate was good in most areas. Technical and non-technical aspects of the task were performed equally well.
16
+ 5. Excellent - The candidate performed to a high standard throughout. They were fluent in all aspects of the task and displayed confidence, professionalism, and empathy.`,
17
+ [EOsceType.COMMUNICATION_SKILLS]: `1. Fail - The candidate did not perform large parts of the scenario to the required standard
18
+ 2. Borderline - It is not clear whether the candidate demonstrated acceptable performance: either the whole task was performed slightly below passing level or there were some key errors or omissions
19
+ 3. Pass - The task was performed to an acceptable level. There may have been some minor errors or omissions.
20
+ 4. Good - The performance of the candidate was good in most areas. Technical and non-technical aspects of the task were performed equally well.
21
+ 5. Excellent - The candidate performed to a high standard throughout. They were fluent in all aspects of the task and displayed confidence, professionalism, and empathy.`,
22
+ [EOsceType.EXAMINATION]: `1. Fail - The candidate did not perform large parts of the scenario to the required standard
23
+ 2. Borderline - It is not clear whether the candidate demonstrated acceptable performance: either the whole task was performed slightly below passing level or there were some key errors or omissions
24
+ 3. Pass - The task was performed to an acceptable level. There may have been some minor errors or omissions.
25
+ 4. Good - The performance of the candidate was good in most areas. Technical and non-technical aspects of the task were performed equally well.
26
+ 5. Excellent - The candidate performed to a high standard throughout. They were fluent in all aspects of the task and displayed confidence, professionalism, and empathy.`,
27
+ [EOsceType.HISTORY_TAKING]: `1. Fail - The candidate did not perform large parts of the scenario to the required standard.
28
+ 2. Borderline - It is not clear whether the candidate demonstrated acceptable performance: either the whole history was performed slightly below passing level or there were some key errors or omissions. The differentials have some important omissions.
29
+ 3. Pass - The history was performed to an acceptable level. There may have been some minor errors or omissions. The differentials were sensible.
30
+ 4. Good - The performance of the candidate was good in most areas. All aspects of the task were performed equally well. The differentials were thorough and well-reasoned.
31
+ 5. Excellent - The candidate performed to a high standard throughout. They were fluent in all aspects of the history and summary and displayed confidence, professionalism, and empathy.`,
32
+ [EOsceType.INTERPRETATION]: `1. Fail - The candidate did not perform large parts of the scenario to the required standard
33
+ 2. Borderline - It is not clear whether the candidate demonstrated acceptable performance: either the whole task was performed slightly below passing level or there were some key errors or omissions
34
+ 3. Pass - The task was performed to an acceptable level. There may have been some minor errors or omissions.
35
+ 4. Good - The performance of the candidate was good in most areas. Technical and non-technical aspects of the task were performed equally well.
36
+ 5. Excellent - The candidate performed to a high standard throughout. They were fluent in all aspects of the task and displayed confidence, professionalism, and empathy.`,
37
+ [EOsceType.PROCEDURE]: `1. Fail - The candidate did not perform large parts of the scenario to the required standard.
38
+ 2. Borderline - It is not clear whether the candidate demonstrated acceptable performance: either the whole task was performed slightly below passing level or there were some key errors or omissions.
39
+ 3. Pass - The task was performed to an acceptable level. There may have been some minor errors or omissions.
40
+ 4. Good - The performance of the candidate was good in most areas. Technical and non-technical aspects of the task were performed equally well.
41
+ 5. Excellent - The candidate performed to a high standard throughout. They were fluent in all aspects of the task and displayed confidence, professionalism, and empathy.`,
42
+ };
@@ -0,0 +1,5 @@
1
+ ;
2
+ ;
3
+ ;
4
+ ;
5
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,30 @@
1
+ export var EPsaSectionType;
2
+ (function (EPsaSectionType) {
3
+ EPsaSectionType[EPsaSectionType["PRESCRIBING"] = 1] = "PRESCRIBING";
4
+ EPsaSectionType[EPsaSectionType["PRESCRIPTION_REVIEW"] = 2] = "PRESCRIPTION_REVIEW";
5
+ EPsaSectionType[EPsaSectionType["PLANNING_MANAGEMENT"] = 3] = "PLANNING_MANAGEMENT";
6
+ EPsaSectionType[EPsaSectionType["PROVIDING_INFORMATION"] = 4] = "PROVIDING_INFORMATION";
7
+ EPsaSectionType[EPsaSectionType["CALCULATION_SKILLS"] = 5] = "CALCULATION_SKILLS";
8
+ EPsaSectionType[EPsaSectionType["ADVERSE_DRUG_REACTION"] = 6] = "ADVERSE_DRUG_REACTION";
9
+ EPsaSectionType[EPsaSectionType["DRUG_MONITORING"] = 7] = "DRUG_MONITORING";
10
+ EPsaSectionType[EPsaSectionType["DATA_INTERPRETATION"] = 8] = "DATA_INTERPRETATION";
11
+ })(EPsaSectionType || (EPsaSectionType = {}));
12
+ export var EQuestionType;
13
+ (function (EQuestionType) {
14
+ EQuestionType[EQuestionType["SINGLE_BEST_ANSWER"] = 1] = "SINGLE_BEST_ANSWER";
15
+ EQuestionType[EQuestionType["QUESTION_ANSWER"] = 2] = "QUESTION_ANSWER";
16
+ EQuestionType[EQuestionType["MULTIPLE_ANSWERS"] = 3] = "MULTIPLE_ANSWERS";
17
+ EQuestionType[EQuestionType["PRESCRIPTION_ANSWER"] = 4] = "PRESCRIPTION_ANSWER";
18
+ })(EQuestionType || (EQuestionType = {}));
19
+ export function isQuestionSBA(data) {
20
+ return data.typeId === EQuestionType.SINGLE_BEST_ANSWER;
21
+ }
22
+ export function isQuestionQA(data) {
23
+ return data.typeId === EQuestionType.QUESTION_ANSWER;
24
+ }
25
+ export function isQuestionMultiQ(data) {
26
+ return data.typeId === EQuestionType.MULTIPLE_ANSWERS;
27
+ }
28
+ export function isQuestionPrescribe(data) {
29
+ return data.typeId === EQuestionType.PRESCRIPTION_ANSWER;
30
+ }
@@ -0,0 +1,6 @@
1
+ export var ESubscriptionType;
2
+ (function (ESubscriptionType) {
3
+ ESubscriptionType[ESubscriptionType["QBANK"] = 1] = "QBANK";
4
+ ESubscriptionType[ESubscriptionType["OSCE"] = 2] = "OSCE";
5
+ ESubscriptionType[ESubscriptionType["BUNDLE"] = 3] = "BUNDLE";
6
+ })(ESubscriptionType || (ESubscriptionType = {}));
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ export var ETopicType;
2
+ (function (ETopicType) {
3
+ ETopicType[ETopicType["ALL"] = 0] = "ALL";
4
+ ETopicType[ETopicType["BASIC_SCIENCE"] = 1] = "BASIC_SCIENCE";
5
+ ETopicType[ETopicType["CLINICAL"] = 2] = "CLINICAL";
6
+ ETopicType[ETopicType["ANATOMY"] = 3] = "ANATOMY";
7
+ ETopicType[ETopicType["DATA_INTERPRETATION"] = 4] = "DATA_INTERPRETATION";
8
+ ETopicType[ETopicType["PSA"] = 5] = "PSA";
9
+ ETopicType[ETopicType["OSCE"] = 6] = "OSCE";
10
+ })(ETopicType || (ETopicType = {}));
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ export * from './Author';
2
+ export * from './Book';
3
+ export * from './Card';
4
+ export * from './Chapter';
5
+ export * from './Concept';
6
+ export * from './Difficulty';
7
+ export * from './Feedback';
8
+ export * from './File';
9
+ export * from './Marksheet';
10
+ export * from './MockTest';
11
+ export * from './OsceMarksheet';
12
+ export * from './OsceStation';
13
+ export * from './Picture';
14
+ export * from './Promo';
15
+ export * from './Question';
16
+ export * from './Subscription';
17
+ export * from './Todo';
18
+ export * from './Token';
19
+ export * from './Topic';
20
+ export * from './Type';
21
+ export * from './University';
22
+ export * from './User';
23
+ export * from './Video';
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "1.3.15",
3
+ "version": "1.3.20",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "main": "index.js",
6
- "types": "dist/index.d.ts",
6
+ "module": "index.mjs",
7
+ "types": "index.d.ts",
8
+ "type": "module",
7
9
  "scripts": {},
8
10
  "repository": {
9
11
  "type": "git",
@@ -21,5 +23,16 @@
21
23
  },
22
24
  "homepage": "https://github.com/Quesmed/quesmed_types#readme",
23
25
  "devDependencies": {},
24
- "packageManager": "yarn@3.1.1"
26
+ "packageManager": "yarn@3.1.1",
27
+ "dependencies": {
28
+ "@apollo/client": "^3.5.7",
29
+ "@react-native-async-storage/async-storage": "^1.15.16",
30
+ "@types/react-native": "^0.66.15",
31
+ "localforage": "^1.10.0",
32
+ "react-native": "^0.67.1",
33
+ "react-native-expo-image-cache": "^4.1.0"
34
+ },
35
+ "peerDependencies": {
36
+ "graphql": "^16"
37
+ }
25
38
  }
@@ -0,0 +1,8 @@
1
+ import { DefaultContext, FetchResult } from '@apollo/client';
2
+ export declare type ApolloUpdateResultRestricted<T> = Omit<FetchResult<{
3
+ restricted: T;
4
+ }>, 'context'>;
5
+ export interface ApolloUpdateOptions {
6
+ context?: DefaultContext;
7
+ variables?: Record<string, any>;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './algoliaSync';
2
+ export * from './token';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './stripe';
2
+ export * from './users';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ export * from './agora';
2
+ export * from './contactUs';
3
+ export * from './marksheet';
4
+ export * from './mockTest';
5
+ export * from './osce';
6
+ export * from './questionDiscussion';
7
+ export * from './todo';
8
+ export * from './token';
9
+ export * from './users';
10
+ export * from './video';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,6 @@
1
+ import { ApolloCache } from '@apollo/client';
1
2
  import { Id, ITodo } from '../../../models';
3
+ import { ApolloUpdateOptions, ApolloUpdateResultRestricted } from '../../apollo';
2
4
  export interface IBuildTodoInput {
3
5
  unseen: number;
4
6
  seen: number;
@@ -27,6 +29,9 @@ export interface ISaveTodosVar {
27
29
  todos: ITodoInput[];
28
30
  }
29
31
  export declare type ISaveTodosData = number[];
32
+ export declare function saveTodosCache(cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<{
33
+ saveTodos: ISaveTodosData;
34
+ }>, options: ApolloUpdateOptions): void;
30
35
  export interface IAddToDailyStackVar {
31
36
  concepts: number[];
32
37
  }
@@ -1,2 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.saveTodosCache = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ function saveTodosCache(cache, result, options) {
6
+ var _a;
7
+ const todoMarkIds = (_a = result.data) === null || _a === void 0 ? void 0 : _a.restricted.saveTodos;
8
+ if (!options.variables || !todoMarkIds) {
9
+ return;
10
+ }
11
+ for (let i = 0; i < todoMarkIds.length; i++) {
12
+ const todoMark = options.variables.todos[i];
13
+ const todoMarkId = todoMarkIds[i];
14
+ cache.writeFragment({
15
+ id: cache.identify({ id: todoMarkId, __typename: 'TodoMark' }),
16
+ data: {
17
+ score: todoMark.score,
18
+ timeTaken: todoMark.timeTaken || 0,
19
+ },
20
+ fragment: (0, client_1.gql) `
21
+ fragment NewTodoMark on TodoMark {
22
+ score
23
+ timeTaken
24
+ }
25
+ `,
26
+ });
27
+ }
28
+ }
29
+ exports.saveTodosCache = saveTodosCache;
@@ -0,0 +1,25 @@
1
+ import { gql } from '@apollo/client';
2
+ export function saveTodosCache(cache, result, options) {
3
+ var _a;
4
+ const todoMarkIds = (_a = result.data) === null || _a === void 0 ? void 0 : _a.restricted.saveTodos;
5
+ if (!options.variables || !todoMarkIds) {
6
+ return;
7
+ }
8
+ for (let i = 0; i < todoMarkIds.length; i++) {
9
+ const todoMark = options.variables.todos[i];
10
+ const todoMarkId = todoMarkIds[i];
11
+ cache.writeFragment({
12
+ id: cache.identify({ id: todoMarkId, __typename: 'TodoMark' }),
13
+ data: {
14
+ score: todoMark.score,
15
+ timeTaken: todoMark.timeTaken || 0,
16
+ },
17
+ fragment: gql `
18
+ fragment NewTodoMark on TodoMark {
19
+ score
20
+ timeTaken
21
+ }
22
+ `,
23
+ });
24
+ }
25
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './user';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './getUserToken';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ export * from './author';
2
+ export * from './book';
3
+ export * from './feedback';
4
+ export * from './sampleCards';
5
+ export * from './sampleQuestions';
6
+ export * from './subscription';
7
+ export * from './university';
8
+ export * from './user';
9
+ export * from './video';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ export * from './anatomy';
2
+ export * from './marksheet';
3
+ export * from './mockTests';
4
+ export * from './osce';
5
+ export * from './quesBook';
6
+ export * from './todos';
7
+ export * from './topics';
8
+ export * from './university';
9
+ export * from './user';
10
+ export * from './video';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './osce';
@@ -0,0 +1,39 @@
1
+ import { EOsceRoles, } from '../../models';
2
+ export const ROLE_CHANGED = 'ROLE_CHANGED';
3
+ export const OSCE_MARKSHEET_ACTION = 'OSCE_MARKSHEET_ACTION';
4
+ export const OSCE_MATCHMAKING = 'OSCE_MATCHMAKING';
5
+ export const OSCE_MATCHMAKING_USERS = 'OSCE_MATCHMAKING_USERS';
6
+ export const OsceGroupInit = (osceMarksheetId) => [
7
+ {
8
+ id: null,
9
+ createdAt: null,
10
+ osceMarksheetId,
11
+ userId: null,
12
+ user: null,
13
+ role: EOsceRoles.CANDIDATE,
14
+ },
15
+ {
16
+ id: null,
17
+ createdAt: null,
18
+ osceMarksheetId,
19
+ userId: null,
20
+ user: null,
21
+ role: EOsceRoles.EXAMINER,
22
+ },
23
+ {
24
+ id: null,
25
+ createdAt: null,
26
+ osceMarksheetId,
27
+ userId: null,
28
+ user: null,
29
+ role: EOsceRoles.ACTOR,
30
+ },
31
+ {
32
+ id: null,
33
+ createdAt: null,
34
+ osceMarksheetId,
35
+ userId: null,
36
+ user: null,
37
+ role: EOsceRoles.OBSERVER,
38
+ },
39
+ ];