@quesmed/types-rn 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 (103) hide show
  1. package/gql_input_output_types/index.d.ts +2 -2
  2. package/models/Notification.d.ts +39 -0
  3. package/models/Notification.js +2 -0
  4. package/models/OsceMarksheet.js +3 -4
  5. package/models/Question.d.ts +3 -0
  6. package/models/Type.d.ts +1 -0
  7. package/models/User.d.ts +7 -5
  8. package/models/index.d.ts +1 -0
  9. package/models/index.js +1 -0
  10. package/package.json +3 -3
  11. package/resolvers/apollo.d.ts +1 -3
  12. package/resolvers/fragments/chapter.js +14 -3
  13. package/resolvers/fragments/index.d.ts +2 -0
  14. package/resolvers/fragments/index.js +2 -0
  15. package/resolvers/fragments/marksheet.d.ts +1 -0
  16. package/resolvers/fragments/marksheet.js +109 -0
  17. package/resolvers/fragments/mockTest.d.ts +1 -0
  18. package/resolvers/fragments/mockTest.js +16 -0
  19. package/resolvers/fragments/osce.js +1 -0
  20. package/resolvers/fragments/topic.d.ts +1 -0
  21. package/resolvers/fragments/topic.js +18 -0
  22. package/resolvers/fragments/user.js +3 -3
  23. package/resolvers/mutation/admin/algoliaSync.d.ts +4 -0
  24. package/resolvers/mutation/admin/algoliaSync.js +30 -0
  25. package/resolvers/mutation/admin/index.d.ts +1 -0
  26. package/resolvers/mutation/admin/index.js +1 -0
  27. package/resolvers/mutation/admin/notification.d.ts +15 -0
  28. package/resolvers/mutation/admin/notification.js +2 -0
  29. package/resolvers/mutation/admin/token.d.ts +2 -0
  30. package/resolvers/mutation/admin/token.js +16 -0
  31. package/resolvers/mutation/restricted/contactUs.d.ts +1 -0
  32. package/resolvers/mutation/restricted/contactUs.js +13 -0
  33. package/resolvers/mutation/restricted/index.d.ts +1 -0
  34. package/resolvers/mutation/restricted/index.js +1 -0
  35. package/resolvers/mutation/restricted/marksheet.d.ts +5 -0
  36. package/resolvers/mutation/restricted/marksheet.js +92 -0
  37. package/resolvers/mutation/restricted/mockTest.d.ts +3 -0
  38. package/resolvers/mutation/restricted/mockTest.js +29 -0
  39. package/resolvers/mutation/restricted/notification.d.ts +28 -0
  40. package/resolvers/mutation/restricted/notification.js +2 -0
  41. package/resolvers/mutation/restricted/questionDiscussion.d.ts +5 -1
  42. package/resolvers/mutation/restricted/questionDiscussion.js +152 -0
  43. package/resolvers/mutation/restricted/todo.d.ts +8 -0
  44. package/resolvers/mutation/restricted/todo.js +150 -0
  45. package/resolvers/mutation/restricted/token.d.ts +2 -0
  46. package/resolvers/mutation/restricted/token.js +19 -0
  47. package/resolvers/mutation/restricted/users.d.ts +3 -0
  48. package/resolvers/mutation/restricted/users.js +24 -1
  49. package/resolvers/mutation/restricted/video.d.ts +1 -0
  50. package/resolvers/mutation/restricted/video.js +13 -0
  51. package/resolvers/mutation/stripe.d.ts +2 -0
  52. package/resolvers/mutation/stripe.js +12 -0
  53. package/resolvers/mutation/users.d.ts +4 -0
  54. package/resolvers/mutation/users.js +22 -0
  55. package/resolvers/mutation/validUserToken/user.d.ts +2 -0
  56. package/resolvers/mutation/validUserToken/user.js +16 -0
  57. package/resolvers/query/admin/getUserToken.d.ts +1 -0
  58. package/resolvers/query/admin/getUserToken.js +9 -0
  59. package/resolvers/query/author.d.ts +1 -0
  60. package/resolvers/query/author.js +16 -0
  61. package/resolvers/query/book.d.ts +3 -1
  62. package/resolvers/query/book.js +42 -0
  63. package/resolvers/query/feedback.d.ts +2 -0
  64. package/resolvers/query/feedback.js +12 -0
  65. package/resolvers/query/restricted/global.d.ts +2 -0
  66. package/resolvers/query/restricted/global.js +16 -0
  67. package/resolvers/query/restricted/index.d.ts +2 -0
  68. package/resolvers/query/restricted/index.js +2 -0
  69. package/resolvers/query/restricted/marksheet.d.ts +6 -0
  70. package/resolvers/query/restricted/marksheet.js +996 -0
  71. package/resolvers/query/restricted/mockTests.d.ts +2 -0
  72. package/resolvers/query/restricted/mockTests.js +23 -0
  73. package/resolvers/query/restricted/notification.d.ts +9 -0
  74. package/resolvers/query/restricted/notification.js +2 -0
  75. package/resolvers/query/restricted/osce.js +2 -2
  76. package/resolvers/query/restricted/qBank.d.ts +18 -0
  77. package/resolvers/query/restricted/qBank.js +77 -0
  78. package/resolvers/query/restricted/quesBook.d.ts +2 -1
  79. package/resolvers/query/restricted/quesBook.js +39 -1
  80. package/resolvers/query/restricted/replication.d.ts +2 -3
  81. package/resolvers/query/restricted/todos.d.ts +3 -1
  82. package/resolvers/query/restricted/todos.js +63 -0
  83. package/resolvers/query/restricted/topics.d.ts +2 -0
  84. package/resolvers/query/restricted/topics.js +38 -0
  85. package/resolvers/query/restricted/university.d.ts +1 -0
  86. package/resolvers/query/restricted/university.js +23 -0
  87. package/resolvers/query/restricted/user.d.ts +2 -2
  88. package/resolvers/query/restricted/user.js +24 -0
  89. package/resolvers/query/restricted/video.d.ts +5 -3
  90. package/resolvers/query/restricted/video.js +98 -0
  91. package/resolvers/query/sample.js +4 -0
  92. package/resolvers/query/subscription.d.ts +1 -0
  93. package/resolvers/query/subscription.js +18 -0
  94. package/resolvers/query/university.d.ts +1 -0
  95. package/resolvers/query/university.js +10 -0
  96. package/resolvers/query/user.d.ts +2 -0
  97. package/resolvers/query/user.js +12 -0
  98. package/resolvers/query/video.d.ts +4 -1
  99. package/resolvers/query/video.js +99 -0
  100. package/resolvers/subscription/index.d.ts +1 -0
  101. package/resolvers/subscription/index.js +1 -0
  102. package/resolvers/subscription/notification.d.ts +11 -0
  103. package/resolvers/subscription/notification.js +4 -0
@@ -1,2 +1,94 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REMOVE_FLAGGED_QUESTION = exports.ADD_FLAGGED_QUESTION = exports.SAVE_MARKSHEET = exports.RE_BUILD_MARKSHEET = exports.BUILD_MARKSHEET = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ const marksheet_1 = require("../../fragments/marksheet");
6
+ exports.BUILD_MARKSHEET = (0, client_1.gql) `
7
+ mutation BuildMarksheet($buildMarksheet: BuildMarksheetInput) {
8
+ restricted {
9
+ buildMarksheet(buildMarksheet: $buildMarksheet) {
10
+ id
11
+ }
12
+ }
13
+ }
14
+ `;
15
+ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
16
+ ${marksheet_1.MARKSHEET_MARK_FIELDS}
17
+ mutation ReBuildMarksheet($marksheetId: Int!) {
18
+ restricted {
19
+ reBuildMarksheet(marksheetId: $marksheetId) {
20
+ id
21
+ createdAt
22
+ startedAt
23
+ endedAt
24
+ topicIds
25
+ topicNames
26
+ source
27
+ userId
28
+ user {
29
+ displayName
30
+ id
31
+ }
32
+ marks {
33
+ ...MarksheetMarkFields
34
+ }
35
+ mockTestId
36
+ correct
37
+ incorrect
38
+ totalQuestions
39
+ isTestMarksheet
40
+ }
41
+ }
42
+ }
43
+ `;
44
+ exports.SAVE_MARKSHEET = (0, client_1.gql) `
45
+ mutation SaveMarksheet($marksheetInput: [MarksheetInput!]!) {
46
+ restricted {
47
+ saveMarksheets(marksheetInput: $marksheetInput) {
48
+ id
49
+ createdAt
50
+ startedAt
51
+ endedAt
52
+ topicIds
53
+ topicNames
54
+ source
55
+ userId
56
+ user {
57
+ displayName
58
+ id
59
+ }
60
+ marks {
61
+ id
62
+ marksheetId
63
+ questionChoiceId
64
+ timeTaken
65
+ flagged
66
+ mark
67
+ }
68
+ mockTestId
69
+ correct
70
+ incorrect
71
+ totalQuestions
72
+ isTestMarksheet
73
+ }
74
+ }
75
+ }
76
+ `;
77
+ exports.ADD_FLAGGED_QUESTION = (0, client_1.gql) `
78
+ mutation AddFlaggedQuestion($markId: Int!, $questionId: Int!) {
79
+ restricted {
80
+ addFlaggedQuestion(markId: $markId, questionId: $questionId) {
81
+ id
82
+ }
83
+ }
84
+ }
85
+ `;
86
+ exports.REMOVE_FLAGGED_QUESTION = (0, client_1.gql) `
87
+ mutation RemoveFlaggedQuestion($id: Int!) {
88
+ restricted {
89
+ removeFlaggedQuestion(id: $id) {
90
+ id
91
+ }
92
+ }
93
+ }
94
+ `;
@@ -1,15 +1,18 @@
1
1
  import { Id, IMarksheet, IMarksheetMark } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
+ export declare const BUILD_MOCK_TEST_MARKSHEET: import("@apollo/client").DocumentNode;
3
4
  export interface IBuildMockTestMarksheetVar {
4
5
  mockTestId: Id;
5
6
  duration: number;
6
7
  }
7
8
  export declare type IBuildMockTestMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'buildMockTestMarksheet'>;
9
+ export declare const TOGGLE_FLAGGED_MARK: import("@apollo/client").DocumentNode;
8
10
  export interface IToggleFlaggedMarkVar {
9
11
  markId: Id;
10
12
  isFlagged: boolean;
11
13
  }
12
14
  export declare type IToggleFlaggedMarkData = RestrictedData<graphqlNormalize & IMarksheetMark, 'toggleFlaggedMark'>;
15
+ export declare const END_MOCK_TEST: import("@apollo/client").DocumentNode;
13
16
  export interface IEndMockTestVar {
14
17
  marksheetId: Id;
15
18
  }
@@ -1,2 +1,31 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.END_MOCK_TEST = exports.TOGGLE_FLAGGED_MARK = exports.BUILD_MOCK_TEST_MARKSHEET = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.BUILD_MOCK_TEST_MARKSHEET = (0, client_1.gql) `
6
+ mutation BuildMockTestMarksheet($mockTestId: Int!, $duration: Int!) {
7
+ restricted {
8
+ buildMockTestMarksheet(mockTestId: $mockTestId, duration: $duration) {
9
+ id
10
+ }
11
+ }
12
+ }
13
+ `;
14
+ exports.TOGGLE_FLAGGED_MARK = (0, client_1.gql) `
15
+ mutation ToggleFlaggedMark($markId: Int!, $isFlagged: Boolean!) {
16
+ restricted {
17
+ toggleFlaggedMark(markId: $markId, isFlagged: $isFlagged) {
18
+ id
19
+ }
20
+ }
21
+ }
22
+ `;
23
+ exports.END_MOCK_TEST = (0, client_1.gql) `
24
+ mutation EndMockTest($marksheetId: Int!) {
25
+ restricted {
26
+ endMockTest(marksheetId: $marksheetId) {
27
+ id
28
+ }
29
+ }
30
+ }
31
+ `;
@@ -0,0 +1,28 @@
1
+ import { ENotificationActionType, ENotificationType, Id, INotification } from '../../../models';
2
+ import { graphqlNormalize, RestrictedData } from '../../types';
3
+ export interface IAddNotificationInput {
4
+ parentId: Id | null;
5
+ userId: Id | null;
6
+ commentId: Id | null;
7
+ conceptId: Id | null;
8
+ description: string;
9
+ actionType: ENotificationActionType;
10
+ type: ENotificationType;
11
+ _global: boolean;
12
+ _read: boolean;
13
+ _deleted: boolean;
14
+ }
15
+ export declare type IAddNotificationVar = {
16
+ data: IAddNotificationInput;
17
+ };
18
+ export declare type IAddNotificationData = RestrictedData<graphqlNormalize & INotification, 'addNotification'>;
19
+ export declare type IAddNotificationsVar = {
20
+ data: IAddNotificationInput[];
21
+ };
22
+ export declare type IAddNotificationsData = RestrictedData<graphqlNormalize & INotification[], 'addNotifications'>;
23
+ export declare type IMarkNotificationAsReadVar = {
24
+ id: Id;
25
+ };
26
+ export declare type IMarkNotificationAsReadData = RestrictedData<graphqlNormalize & INotification, 'markNotificationAsRead'>;
27
+ export declare type IMarkAllNotificationsAsReadVar = null;
28
+ export declare type IMarkAllNotificationsAsReadData = RestrictedData<graphqlNormalize & INotification[], 'markAllNotificationsAsRead'>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,21 +1,25 @@
1
1
  import { EQuestionLike, Id, IQuestion, IQuestionComment } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
+ export declare const QUESTION_LIKE: import("@apollo/client").DocumentNode;
3
4
  export interface IQuestionLikeVar {
4
5
  questionId: Id;
5
6
  like: EQuestionLike;
6
7
  }
7
8
  export declare type IQuestionLikeData = RestrictedData<graphqlNormalize & IQuestion, 'questionLike'>;
9
+ export declare const QUESTION_COMMENTS: import("@apollo/client").DocumentNode;
8
10
  export interface IQuestionCommentsVar {
9
11
  questionId: Id;
10
- parentId: Id;
12
+ parentId?: Id;
11
13
  comment: string;
12
14
  }
13
15
  export declare type IQuestionCommentsData = RestrictedData<graphqlNormalize & IQuestionComment, 'questionComments'>;
16
+ export declare const QUESTION_COMMENT_LIKE: import("@apollo/client").DocumentNode;
14
17
  export interface IQuestionCommentsLikeVar {
15
18
  commentId: Id;
16
19
  like: EQuestionLike;
17
20
  }
18
21
  export declare type IQuestionCommentsLikeData = RestrictedData<graphqlNormalize & IQuestionComment, 'questionCommentLike'>;
22
+ export declare const QUESTION_COMMENT_REMOVE: import("@apollo/client").DocumentNode;
19
23
  export interface IQuestionCommentRemoveVar {
20
24
  commentId: Id;
21
25
  }
@@ -1,2 +1,154 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QUESTION_COMMENT_REMOVE = exports.QUESTION_COMMENT_LIKE = exports.QUESTION_COMMENTS = exports.QUESTION_LIKE = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.QUESTION_LIKE = (0, client_1.gql) `
6
+ mutation QuestionLike($questionId: Int!, $like: Int!) {
7
+ restricted {
8
+ questionLike(questionId: $questionId, like: $like) {
9
+ id
10
+ likes
11
+ dislikes
12
+ isLikedByMe
13
+ comments {
14
+ id
15
+ userId
16
+ createdAt
17
+ comment
18
+ likes
19
+ user {
20
+ id
21
+ displayName
22
+ }
23
+ dislikes
24
+ isLikedByMe
25
+ questionId
26
+ replies {
27
+ id
28
+ userId
29
+ createdAt
30
+ comment
31
+ user {
32
+ id
33
+ displayName
34
+ }
35
+ likes
36
+ dislikes
37
+ isLikedByMe
38
+ questionId
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ `;
45
+ exports.QUESTION_COMMENTS = (0, client_1.gql) `
46
+ mutation QuestionComments(
47
+ $questionId: Int!
48
+ $parentId: Int
49
+ $comment: String!
50
+ ) {
51
+ restricted {
52
+ questionComments(
53
+ questionId: $questionId
54
+ parentId: $parentId
55
+ comment: $comment
56
+ ) {
57
+ id
58
+ userId
59
+ createdAt
60
+ comment
61
+ likes
62
+ user {
63
+ id
64
+ displayName
65
+ }
66
+ dislikes
67
+ isLikedByMe
68
+ questionId
69
+ replies {
70
+ id
71
+ userId
72
+ createdAt
73
+ comment
74
+ user {
75
+ id
76
+ displayName
77
+ }
78
+ likes
79
+ dislikes
80
+ isLikedByMe
81
+ questionId
82
+ }
83
+ }
84
+ }
85
+ }
86
+ `;
87
+ exports.QUESTION_COMMENT_LIKE = (0, client_1.gql) `
88
+ mutation QuestionCommentLike($commentId: Int!, $like: Int!) {
89
+ restricted {
90
+ questionCommentLike(commentId: $commentId, like: $like) {
91
+ id
92
+ userId
93
+ createdAt
94
+ comment
95
+ likes
96
+ user {
97
+ id
98
+ displayName
99
+ }
100
+ dislikes
101
+ isLikedByMe
102
+ questionId
103
+ replies {
104
+ id
105
+ userId
106
+ createdAt
107
+ comment
108
+ user {
109
+ id
110
+ displayName
111
+ }
112
+ likes
113
+ dislikes
114
+ isLikedByMe
115
+ questionId
116
+ }
117
+ }
118
+ }
119
+ }
120
+ `;
121
+ exports.QUESTION_COMMENT_REMOVE = (0, client_1.gql) `
122
+ mutation QuestionCommentRemove($commentId: Int!) {
123
+ restricted {
124
+ questionCommentRemove(commentId: $commentId) {
125
+ id
126
+ userId
127
+ createdAt
128
+ comment
129
+ likes
130
+ user {
131
+ id
132
+ displayName
133
+ }
134
+ dislikes
135
+ isLikedByMe
136
+ questionId
137
+ replies {
138
+ id
139
+ userId
140
+ createdAt
141
+ comment
142
+ user {
143
+ id
144
+ displayName
145
+ }
146
+ likes
147
+ dislikes
148
+ isLikedByMe
149
+ questionId
150
+ }
151
+ }
152
+ }
153
+ }
154
+ `;
@@ -1,5 +1,8 @@
1
+ import { ApolloCache } from '@apollo/client';
1
2
  import { Id, ITodo } from '../../../models';
3
+ import { ApolloUpdateOptions, ApolloUpdateResultRestricted } from '../../apollo';
2
4
  import { graphqlNormalize, RestrictedData } from '../../types';
5
+ export declare const BUILD_TODO: import("@apollo/client").DocumentNode;
3
6
  export interface IBuildTodoInput {
4
7
  unseen: number;
5
8
  seen: number;
@@ -15,18 +18,23 @@ export interface ITodoInput {
15
18
  score: number;
16
19
  timeTaken: number;
17
20
  }
21
+ export declare const SAVE_TODO: import("@apollo/client").DocumentNode;
18
22
  export interface ISaveTodosVar {
19
23
  todos: ITodoInput[];
20
24
  }
21
25
  export declare type ISaveTodosData = RestrictedData<(graphqlNormalize & ITodo)[], 'saveTodos'>;
26
+ export declare function saveTodosCache(cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<ISaveTodosData>, options: ApolloUpdateOptions): void;
27
+ export declare const ADD_TO_DAILY_STACK: import("@apollo/client").DocumentNode;
22
28
  export interface IAddToDailyStackVar {
23
29
  conceptIds: Id[];
24
30
  }
25
31
  export declare type IAddToDailyStackData = RestrictedData<graphqlNormalize & ITodo, 'addToDailyStack'>;
32
+ export declare const REMOVE_FROM_DAILY_STACK: import("@apollo/client").DocumentNode;
26
33
  export interface IRemoveFromDailyStackVar {
27
34
  cardId: Id;
28
35
  todoId: Id;
29
36
  }
30
37
  export declare type IRemoveFromDailyStackData = RestrictedData<graphqlNormalize & ITodo, 'removeFromDailyStack'>;
38
+ export declare const REFRESH_DAILY_TASK: import("@apollo/client").DocumentNode;
31
39
  export declare type IRefreshDailyTaskVar = null;
32
40
  export declare type IRefreshDailyTaskData = RestrictedData<graphqlNormalize & ITodo, 'refreshDailyTask'>;
@@ -1,2 +1,152 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REFRESH_DAILY_TASK = exports.REMOVE_FROM_DAILY_STACK = exports.ADD_TO_DAILY_STACK = exports.saveTodosCache = exports.SAVE_TODO = exports.BUILD_TODO = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ const fragments_1 = require("../../fragments");
6
+ exports.BUILD_TODO = (0, client_1.gql) `
7
+ mutation BuildTodo($buildTodo: BuildTodoInput!) {
8
+ restricted {
9
+ buildTodo(buildTodo: $buildTodo) {
10
+ id
11
+ }
12
+ }
13
+ }
14
+ `;
15
+ exports.SAVE_TODO = (0, client_1.gql) `
16
+ mutation SaveTodo($todos: [TodoInput!]!) {
17
+ restricted {
18
+ saveTodos(todos: $todos) {
19
+ id
20
+ dailyTask
21
+ source
22
+ marks {
23
+ id
24
+ cardId
25
+ score
26
+ timeTaken
27
+ card {
28
+ question
29
+ explanation
30
+ concept {
31
+ id
32
+ videos {
33
+ id
34
+ title
35
+ museId
36
+ thumbnail
37
+ concepts {
38
+ id
39
+ name
40
+ }
41
+ live
42
+ description
43
+ duration
44
+ }
45
+ }
46
+ pictures {
47
+ id
48
+ caption
49
+ path
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ `;
57
+ function saveTodosCache(cache, result, options) {
58
+ const { saveTodos } = result?.data?.restricted || {};
59
+ if (!options.variables || !saveTodos) {
60
+ return;
61
+ }
62
+ for (let i = 0; i < saveTodos.length; i++) {
63
+ const todoMark = options.variables.todos[i];
64
+ const todoMarkId = saveTodos[i];
65
+ cache.writeFragment({
66
+ id: cache.identify({ id: todoMarkId, __typename: 'TodoMark' }),
67
+ data: {
68
+ score: todoMark.score,
69
+ timeTaken: todoMark.timeTaken || 0,
70
+ },
71
+ fragment: (0, client_1.gql) `
72
+ fragment NewTodoMark on TodoMark {
73
+ score
74
+ timeTaken
75
+ }
76
+ `,
77
+ });
78
+ }
79
+ }
80
+ exports.saveTodosCache = saveTodosCache;
81
+ exports.ADD_TO_DAILY_STACK = (0, client_1.gql) `
82
+ ${fragments_1.PICTURE_FIELDS}
83
+ mutation AddToDailyStack($conceptIds: [Int!]!) {
84
+ restricted {
85
+ addToDailyStack(conceptIds: $conceptIds) {
86
+ id
87
+ dailyTask
88
+ marks {
89
+ id
90
+ cardId
91
+ card {
92
+ id
93
+ question
94
+ explanation
95
+ pictures {
96
+ ...PictureFields
97
+ }
98
+ }
99
+ score
100
+ timeTaken
101
+ }
102
+ source
103
+ }
104
+ }
105
+ }
106
+ `;
107
+ exports.REMOVE_FROM_DAILY_STACK = (0, client_1.gql) `
108
+ mutation RemoveFromDailyStack($cardId: Int!, $todoId: Int!) {
109
+ restricted {
110
+ removeFromDailyStack(cardId: $cardId, todoId: $todoId) {
111
+ id
112
+ dailyTask
113
+ source
114
+ marks {
115
+ cardId
116
+ score
117
+ timeTaken
118
+ card {
119
+ question
120
+ explanation
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
126
+ `;
127
+ exports.REFRESH_DAILY_TASK = (0, client_1.gql) `
128
+ ${fragments_1.PICTURE_FIELDS}
129
+ mutation RefreshDailyTask {
130
+ restricted {
131
+ refreshDailyTask {
132
+ id
133
+ dailyTask
134
+ marks {
135
+ id
136
+ cardId
137
+ card {
138
+ id
139
+ question
140
+ explanation
141
+ pictures {
142
+ ...PictureFields
143
+ }
144
+ }
145
+ score
146
+ timeTaken
147
+ }
148
+ source
149
+ }
150
+ }
151
+ }
152
+ `;
@@ -1,5 +1,6 @@
1
1
  import { IToken } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
+ export declare const UPSERT_TOKEN: import("@apollo/client").DocumentNode;
3
4
  export interface IUpsertTokenVar {
4
5
  token: string;
5
6
  deviceId: string;
@@ -9,6 +10,7 @@ export interface IRemoveTokenVar {
9
10
  token: string;
10
11
  }
11
12
  export declare type IRemoveTokenData = RestrictedData<string, 'removeToken'>;
13
+ export declare const REMOVE_TOKEN: import("@apollo/client").DocumentNode;
12
14
  export interface ISubscribeFCMTopicVar {
13
15
  token: string;
14
16
  topic: string;
@@ -1,2 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REMOVE_TOKEN = exports.UPSERT_TOKEN = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.UPSERT_TOKEN = (0, client_1.gql) `
6
+ mutation UpsertToken($token: String!, $deviceId: String!) {
7
+ restricted {
8
+ upsertToken(token: $token, deviceId: $deviceId) {
9
+ token
10
+ deviceId
11
+ }
12
+ }
13
+ }
14
+ `;
15
+ exports.REMOVE_TOKEN = (0, client_1.gql) `
16
+ mutation RemoveToken($token: String!) {
17
+ restricted {
18
+ removeToken(token: $token)
19
+ }
20
+ }
21
+ `;
@@ -1,5 +1,6 @@
1
1
  import { IUser } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
+ export declare const RESET_PROGRESS: import("@apollo/client").DocumentNode;
3
4
  export interface IResetProgressVar {
4
5
  questions?: boolean;
5
6
  cards?: boolean;
@@ -17,11 +18,13 @@ export interface IUserInput {
17
18
  dailyFeedResetTime?: number;
18
19
  dailyFeedMax?: number;
19
20
  }
21
+ export declare const UPDATE_USER: import("@apollo/client").DocumentNode;
20
22
  export interface IUpdateUserVar {
21
23
  id?: number;
22
24
  data: IUserInput;
23
25
  }
24
26
  export declare type IUpdateUserData = RestrictedData<string, 'updateUser'>;
27
+ export declare const RENEW_TOKEN: import("@apollo/client").DocumentNode;
25
28
  export declare type IRenewTokenVar = null;
26
29
  export declare type IRenewTokenData = RestrictedData<string, 'renewToken'>;
27
30
  export declare const TOC_ACCEPT: import("@apollo/client").DocumentNode;
@@ -1,7 +1,30 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TOC_ACCEPT = void 0;
3
+ exports.TOC_ACCEPT = exports.RENEW_TOKEN = exports.UPDATE_USER = exports.RESET_PROGRESS = void 0;
4
4
  const client_1 = require("@apollo/client");
5
+ exports.RESET_PROGRESS = (0, client_1.gql) `
6
+ mutation ResetProgress($questions: Boolean, $cards: Boolean) {
7
+ restricted {
8
+ resetProgress(questions: $questions, cards: $cards) {
9
+ id
10
+ }
11
+ }
12
+ }
13
+ `;
14
+ exports.UPDATE_USER = (0, client_1.gql) `
15
+ mutation UpdateUser($id: Int, $data: UserInput!) {
16
+ restricted {
17
+ updateUser(id: $id, data: $data)
18
+ }
19
+ }
20
+ `;
21
+ exports.RENEW_TOKEN = (0, client_1.gql) `
22
+ mutation RenewToken {
23
+ restricted {
24
+ renewToken
25
+ }
26
+ }
27
+ `;
5
28
  exports.TOC_ACCEPT = (0, client_1.gql) `
6
29
  mutation TocAccept {
7
30
  restricted {
@@ -1,5 +1,6 @@
1
1
  import { Id, IVideo } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
+ export declare const VIDEO_WATCHED: import("@apollo/client").DocumentNode;
3
4
  export interface IVideoWatchedVar {
4
5
  id: Id;
5
6
  }
@@ -1,2 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VIDEO_WATCHED = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.VIDEO_WATCHED = (0, client_1.gql) `
6
+ mutation VideoWatched($id: Int!) {
7
+ restricted {
8
+ videoWatched(id: $id) {
9
+ id
10
+ views
11
+ viewsToday
12
+ }
13
+ }
14
+ }
15
+ `;
@@ -1,10 +1,12 @@
1
1
  import { RootData } from './../types';
2
+ export declare const CUSTOMER_PORTAL: import("@apollo/client").DocumentNode;
2
3
  export declare type ICustomerPortalVar = null;
3
4
  export declare type ICustomerPortalData = RootData<string, 'customerPortal'>;
4
5
  export interface IStripeLineItem {
5
6
  price: string;
6
7
  quantity: number;
7
8
  }
9
+ export declare const STRIPE_HOMEPAGE_CHECKOUT_SESSION: import("@apollo/client").DocumentNode;
8
10
  export interface IStripeHomepageCheckoutSessionVar {
9
11
  lineItems: IStripeLineItem[];
10
12
  }
@@ -1,2 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.STRIPE_HOMEPAGE_CHECKOUT_SESSION = exports.CUSTOMER_PORTAL = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.CUSTOMER_PORTAL = (0, client_1.gql) `
6
+ mutation CustomerPortal {
7
+ customerPortal
8
+ }
9
+ `;
10
+ exports.STRIPE_HOMEPAGE_CHECKOUT_SESSION = (0, client_1.gql) `
11
+ mutation StripeHomepageCheckoutSession($lineItems: [LineItemInput!]!) {
12
+ stripeHomepageCheckoutSession(lineItems: $lineItems)
13
+ }
14
+ `;