@quesmed/types-rn 2.0.16 → 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 (83) hide show
  1. package/gql_input_output_types/index.d.ts +2 -2
  2. package/models/Question.d.ts +3 -0
  3. package/models/Type.d.ts +1 -0
  4. package/package.json +3 -3
  5. package/resolvers/apollo.d.ts +1 -3
  6. package/resolvers/fragments/chapter.js +14 -3
  7. package/resolvers/fragments/index.d.ts +2 -0
  8. package/resolvers/fragments/index.js +2 -0
  9. package/resolvers/fragments/marksheet.d.ts +1 -0
  10. package/resolvers/fragments/marksheet.js +109 -0
  11. package/resolvers/fragments/mockTest.d.ts +1 -0
  12. package/resolvers/fragments/mockTest.js +16 -0
  13. package/resolvers/fragments/osce.js +1 -0
  14. package/resolvers/fragments/topic.d.ts +1 -0
  15. package/resolvers/fragments/topic.js +18 -0
  16. package/resolvers/fragments/user.js +3 -3
  17. package/resolvers/mutation/admin/algoliaSync.d.ts +4 -0
  18. package/resolvers/mutation/admin/algoliaSync.js +30 -0
  19. package/resolvers/mutation/admin/token.d.ts +2 -0
  20. package/resolvers/mutation/admin/token.js +16 -0
  21. package/resolvers/mutation/restricted/contactUs.d.ts +1 -0
  22. package/resolvers/mutation/restricted/contactUs.js +13 -0
  23. package/resolvers/mutation/restricted/marksheet.d.ts +5 -0
  24. package/resolvers/mutation/restricted/marksheet.js +92 -0
  25. package/resolvers/mutation/restricted/mockTest.d.ts +3 -0
  26. package/resolvers/mutation/restricted/mockTest.js +29 -0
  27. package/resolvers/mutation/restricted/questionDiscussion.d.ts +5 -1
  28. package/resolvers/mutation/restricted/questionDiscussion.js +152 -0
  29. package/resolvers/mutation/restricted/todo.d.ts +8 -0
  30. package/resolvers/mutation/restricted/todo.js +150 -0
  31. package/resolvers/mutation/restricted/token.d.ts +2 -0
  32. package/resolvers/mutation/restricted/token.js +19 -0
  33. package/resolvers/mutation/restricted/users.d.ts +3 -0
  34. package/resolvers/mutation/restricted/users.js +24 -1
  35. package/resolvers/mutation/restricted/video.d.ts +1 -0
  36. package/resolvers/mutation/restricted/video.js +13 -0
  37. package/resolvers/mutation/stripe.d.ts +2 -0
  38. package/resolvers/mutation/stripe.js +12 -0
  39. package/resolvers/mutation/users.d.ts +4 -0
  40. package/resolvers/mutation/users.js +22 -0
  41. package/resolvers/mutation/validUserToken/user.d.ts +2 -0
  42. package/resolvers/mutation/validUserToken/user.js +16 -0
  43. package/resolvers/query/admin/getUserToken.d.ts +1 -0
  44. package/resolvers/query/admin/getUserToken.js +9 -0
  45. package/resolvers/query/author.d.ts +1 -0
  46. package/resolvers/query/author.js +16 -0
  47. package/resolvers/query/book.d.ts +3 -1
  48. package/resolvers/query/book.js +42 -0
  49. package/resolvers/query/feedback.d.ts +2 -0
  50. package/resolvers/query/feedback.js +12 -0
  51. package/resolvers/query/restricted/global.d.ts +2 -0
  52. package/resolvers/query/restricted/global.js +16 -0
  53. package/resolvers/query/restricted/index.d.ts +1 -0
  54. package/resolvers/query/restricted/index.js +1 -0
  55. package/resolvers/query/restricted/marksheet.d.ts +6 -0
  56. package/resolvers/query/restricted/marksheet.js +996 -0
  57. package/resolvers/query/restricted/mockTests.d.ts +2 -0
  58. package/resolvers/query/restricted/mockTests.js +23 -0
  59. package/resolvers/query/restricted/osce.js +2 -2
  60. package/resolvers/query/restricted/qBank.d.ts +18 -0
  61. package/resolvers/query/restricted/qBank.js +77 -0
  62. package/resolvers/query/restricted/quesBook.d.ts +2 -1
  63. package/resolvers/query/restricted/quesBook.js +39 -1
  64. package/resolvers/query/restricted/replication.d.ts +2 -3
  65. package/resolvers/query/restricted/todos.d.ts +3 -1
  66. package/resolvers/query/restricted/todos.js +63 -0
  67. package/resolvers/query/restricted/topics.d.ts +2 -0
  68. package/resolvers/query/restricted/topics.js +38 -0
  69. package/resolvers/query/restricted/university.d.ts +1 -0
  70. package/resolvers/query/restricted/university.js +23 -0
  71. package/resolvers/query/restricted/user.d.ts +2 -2
  72. package/resolvers/query/restricted/user.js +24 -0
  73. package/resolvers/query/restricted/video.d.ts +5 -3
  74. package/resolvers/query/restricted/video.js +98 -0
  75. package/resolvers/query/sample.js +4 -0
  76. package/resolvers/query/subscription.d.ts +1 -0
  77. package/resolvers/query/subscription.js +18 -0
  78. package/resolvers/query/university.d.ts +1 -0
  79. package/resolvers/query/university.js +10 -0
  80. package/resolvers/query/user.d.ts +2 -0
  81. package/resolvers/query/user.js +12 -0
  82. package/resolvers/query/video.d.ts +4 -1
  83. package/resolvers/query/video.js +99 -0
@@ -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
+ `;
@@ -1,10 +1,12 @@
1
1
  import { RootData } from '../types';
2
+ export declare const LOGIN_USER: import("@apollo/client").DocumentNode;
2
3
  export interface ILoginUserVar {
3
4
  username: string;
4
5
  password: string;
5
6
  days: number;
6
7
  }
7
8
  export declare type ILoginUserData = RootData<string, 'loginUser'>;
9
+ export declare const REGISTER_USER: import("@apollo/client").DocumentNode;
8
10
  export interface RegisterUserInput {
9
11
  displayName: string;
10
12
  username: string;
@@ -21,10 +23,12 @@ export interface IRegisterUserVar {
21
23
  userData: RegisterUserInput;
22
24
  }
23
25
  export declare type IRegisterUserData = RootData<string, 'registerUser'>;
26
+ export declare const RESET_PASSWORD_PREP: import("@apollo/client").DocumentNode;
24
27
  export interface IResetPasswordPrepVar {
25
28
  username: string;
26
29
  }
27
30
  export declare type IResetPasswordPrepData = RootData<string, 'resetPasswordPrep'>;
31
+ export declare const RESET_PASSWORD: import("@apollo/client").DocumentNode;
28
32
  export interface IResetPasswordVar {
29
33
  token: string;
30
34
  password: string;
@@ -1,2 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RESET_PASSWORD = exports.RESET_PASSWORD_PREP = exports.REGISTER_USER = exports.LOGIN_USER = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.LOGIN_USER = (0, client_1.gql) `
6
+ mutation LoginUser($username: String!, $password: String!, $days: Int!) {
7
+ loginUser(username: $username, password: $password, days: $days)
8
+ }
9
+ `;
10
+ exports.REGISTER_USER = (0, client_1.gql) `
11
+ mutation RegisterUser($userData: RegisterUser!) {
12
+ registerUser(userData: $userData)
13
+ }
14
+ `;
15
+ exports.RESET_PASSWORD_PREP = (0, client_1.gql) `
16
+ mutation ResetPasswordPrep($username: String!) {
17
+ resetPasswordPrep(username: $username)
18
+ }
19
+ `;
20
+ exports.RESET_PASSWORD = (0, client_1.gql) `
21
+ mutation ResetPassword($password: String!, $token: String!) {
22
+ resetPassword(password: $password, token: $token)
23
+ }
24
+ `;
@@ -1,3 +1,4 @@
1
+ export declare const CREATE_NEW_SUBSCRIPTION_CHECKOUT_SESSION: import("@apollo/client").DocumentNode;
1
2
  export interface ICreateNewSubscriptionCheckoutSessionVar {
2
3
  priceId: string;
3
4
  }
@@ -12,3 +13,4 @@ export declare type IRenewTokenData = {
12
13
  renewToken: string;
13
14
  };
14
15
  };
16
+ export declare const VALID_USER_TOKEN: import("@apollo/client").DocumentNode;
@@ -1,2 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VALID_USER_TOKEN = exports.CREATE_NEW_SUBSCRIPTION_CHECKOUT_SESSION = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.CREATE_NEW_SUBSCRIPTION_CHECKOUT_SESSION = (0, client_1.gql) `
6
+ mutation CreateNewSubscriptionCheckoutSession($priceId: String!) {
7
+ validUserToken {
8
+ createNewSubscriptionCheckoutSession(priceId: $priceId)
9
+ }
10
+ }
11
+ `;
12
+ exports.VALID_USER_TOKEN = (0, client_1.gql) `
13
+ mutation ValidUserToken {
14
+ validUserToken {
15
+ renewToken
16
+ }
17
+ }
18
+ `;
@@ -3,3 +3,4 @@ export interface IGetUserTokenVar {
3
3
  username: string;
4
4
  }
5
5
  export declare type IGetUserTokenData = AdminData<string, 'getUserToken'>;
6
+ export declare const GET_USER_TOKEN: import("@apollo/client").DocumentNode;
@@ -1,2 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET_USER_TOKEN = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.GET_USER_TOKEN = (0, client_1.gql) `
6
+ query getUserToken($username: String!) {
7
+ admin {
8
+ getUserToken(username: $username)
9
+ }
10
+ }
11
+ `;
@@ -1,3 +1,4 @@
1
1
  import { IAuthor } from '../../models';
2
2
  import { graphqlNormalize, RootData } from '../types';
3
3
  export declare type IAuthorsData = RootData<(graphqlNormalize & IAuthor)[], 'authors'>;
4
+ export declare const AUTHORS: import("@apollo/client").DocumentNode;
@@ -1,2 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AUTHORS = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.AUTHORS = (0, client_1.gql) `
6
+ query Authors {
7
+ authors {
8
+ id
9
+ name
10
+ qualifications
11
+ title
12
+ description
13
+ avatar
14
+ linkedIn
15
+ twitter
16
+ }
17
+ }
18
+ `;
@@ -1,8 +1,10 @@
1
1
  import { IBook } from '../../models';
2
2
  import { graphqlNormalize, RootData } from './../types';
3
- export declare type IBooksData = RootData<(graphqlNormalize & IBook)[], 'book'>;
3
+ export declare type IBooksData = RootData<(graphqlNormalize & IBook)[], 'books'>;
4
4
  export declare type IBooksVar = null;
5
+ export declare const BOOKS: import("@apollo/client").DocumentNode;
5
6
  export declare type IBookData = RootData<graphqlNormalize & IBook, 'book'>;
6
7
  export interface IBookVar {
7
8
  id: number;
8
9
  }
10
+ export declare const BOOK: import("@apollo/client").DocumentNode;
@@ -1,2 +1,44 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BOOK = exports.BOOKS = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.BOOKS = (0, client_1.gql) `
6
+ query Books {
7
+ books {
8
+ id
9
+ name
10
+ avatar
11
+ }
12
+ }
13
+ `;
14
+ exports.BOOK = (0, client_1.gql) `
15
+ query Book($bookId: Int!) {
16
+ book(id: $bookId) {
17
+ id
18
+ name
19
+ publishDate
20
+ publisher
21
+ pages
22
+ language
23
+ format
24
+ avatar
25
+ price
26
+ ISBN
27
+ type
28
+ description
29
+ heroImg
30
+ chapters
31
+ stripePriceId
32
+ authors {
33
+ id
34
+ name
35
+ linkedIn
36
+ avatar
37
+ description
38
+ title
39
+ qualifications
40
+ twitter
41
+ }
42
+ }
43
+ }
44
+ `;
@@ -1,3 +1,5 @@
1
1
  import { IFeedback } from '../../models';
2
2
  import { graphqlNormalize, RootData } from '../types';
3
3
  export declare type IFeedbackData = RootData<(graphqlNormalize & IFeedback)[], 'feedback'>;
4
+ export declare type IFeedbackVar = null;
5
+ export declare const FEEDBACK: import("@apollo/client").DocumentNode;
@@ -1,2 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FEEDBACK = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.FEEDBACK = (0, client_1.gql) `
6
+ query Feedback {
7
+ feedback {
8
+ id
9
+ name
10
+ feedback
11
+ university
12
+ }
13
+ }
14
+ `;