@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,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
+ `;
@@ -1,5 +1,7 @@
1
1
  import { graphqlNormalize, RestrictedData } from '../../types';
2
2
  export declare type ITotalQuestionsVar = null;
3
3
  export declare type ITotalQuestionsData = RestrictedData<graphqlNormalize & number, 'totalQuestions'>;
4
+ export declare const TOTAL_QUESTIONS: import("@apollo/client").DocumentNode;
4
5
  export declare type ITotalCardsVar = null;
5
6
  export declare type ITotalCardsData = RestrictedData<graphqlNormalize & number, 'totalCards'>;
7
+ export declare const TOTAL_CARDS: import("@apollo/client").DocumentNode;
@@ -1,2 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TOTAL_CARDS = exports.TOTAL_QUESTIONS = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.TOTAL_QUESTIONS = (0, client_1.gql) `
6
+ query TotalQuestions {
7
+ restricted {
8
+ totalQuestions
9
+ }
10
+ }
11
+ `;
12
+ exports.TOTAL_CARDS = (0, client_1.gql) `
13
+ query TotalCards {
14
+ restricted {
15
+ totalCards
16
+ }
17
+ }
18
+ `;
@@ -1,7 +1,9 @@
1
1
  export * from './global';
2
2
  export * from './marksheet';
3
3
  export * from './mockTests';
4
+ export * from './notification';
4
5
  export * from './osce';
6
+ export * from './qBank';
5
7
  export * from './quesBook';
6
8
  export * from './replication';
7
9
  export * from './todos';
@@ -13,7 +13,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./global"), exports);
14
14
  __exportStar(require("./marksheet"), exports);
15
15
  __exportStar(require("./mockTests"), exports);
16
+ __exportStar(require("./notification"), exports);
16
17
  __exportStar(require("./osce"), exports);
18
+ __exportStar(require("./qBank"), exports);
17
19
  __exportStar(require("./quesBook"), exports);
18
20
  __exportStar(require("./replication"), exports);
19
21
  __exportStar(require("./todos"), exports);
@@ -5,6 +5,7 @@ export interface IMarksheetVar {
5
5
  id: Id;
6
6
  }
7
7
  export declare type IMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'marksheet'>;
8
+ export declare const MARKSHEET: import("@apollo/client").DocumentNode;
8
9
  export interface IPreBuildMarksheetVar {
9
10
  topicIds: number[];
10
11
  conceptIds: number[];
@@ -13,6 +14,7 @@ export interface IPreBuildMarksheetVar {
13
14
  difficulty?: EDifficultyType[];
14
15
  }
15
16
  export declare type IPreBuildMarksheetData = RestrictedData<graphqlNormalize & IPreBuildMarksheet, 'preBuildMarksheet'>;
17
+ export declare const PRE_BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
16
18
  export interface IMarksheetsVar {
17
19
  filter: {
18
20
  limit: number;
@@ -21,10 +23,13 @@ export interface IMarksheetsVar {
21
23
  };
22
24
  }
23
25
  export declare type IMarksheetsData = RestrictedData<(graphqlNormalize & IMarksheet)[], 'marksheets'>;
26
+ export declare const MARKSHEETS: import("@apollo/client").DocumentNode;
24
27
  export declare type ILatestPastMarksheetIdVar = null;
25
28
  export declare type ILatestPastMarksheetIdData = RestrictedData<number, 'latestPastMarksheetId'>;
29
+ export declare const LATEST_PAST_MARKSHEET_ID: import("@apollo/client").DocumentNode;
26
30
  export declare type IFlaggedQuestionsVar = null;
27
31
  export declare type IFlaggedQuestionsData = RestrictedData<(graphqlNormalize & IUserFlaggedQuestion)[], 'flaggedQuestions'>;
32
+ export declare const FLAGGED_QUESTIONS: import("@apollo/client").DocumentNode;
28
33
  export interface IMarksheetFeedbackVar {
29
34
  id: Id;
30
35
  }
@@ -45,3 +50,4 @@ export interface IMarksheetFeedback {
45
50
  topics: IMarksheetTopicFeedback[];
46
51
  }
47
52
  export declare type IMarksheetFeedbackData = RestrictedData<graphqlNormalize & IMarksheetFeedback, 'marksheetFeedback'>;
53
+ export declare const MARKSHEET_FEEDBACK: import("@apollo/client").DocumentNode;