@quesmed/types 1.5.9 → 2.0.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.
- package/{gql_input_output_types → dist/cjs/gql_input_output_types}/User.d.ts +0 -0
- package/{gql_input_output_types → dist/cjs/gql_input_output_types}/User.js +0 -0
- package/{gql_input_output_types → dist/cjs/gql_input_output_types}/index.d.ts +0 -0
- package/{gql_input_output_types → dist/cjs/gql_input_output_types}/index.js +0 -0
- package/{index.d.ts → dist/cjs/index.d.ts} +0 -0
- package/{index.js → dist/cjs/index.js} +0 -0
- package/{models → dist/cjs/models}/Author.d.ts +0 -0
- package/{models → dist/cjs/models}/Author.js +0 -0
- package/{models → dist/cjs/models}/Blog.d.ts +0 -0
- package/{models → dist/cjs/models}/Blog.js +0 -0
- package/{models → dist/cjs/models}/Book.d.ts +0 -0
- package/{models → dist/cjs/models}/Book.js +0 -0
- package/{models → dist/cjs/models}/Card.d.ts +2 -2
- package/{models → dist/cjs/models}/Card.js +0 -0
- package/{models → dist/cjs/models}/Chapter.d.ts +5 -3
- package/{models → dist/cjs/models}/Chapter.js +0 -0
- package/{models → dist/cjs/models}/Concept.d.ts +2 -10
- package/{models → dist/cjs/models}/Concept.js +0 -0
- package/{models → dist/cjs/models}/Difficulty.d.ts +0 -0
- package/{models → dist/cjs/models}/Difficulty.js +0 -0
- package/{models → dist/cjs/models}/Feedback.d.ts +0 -0
- package/{models → dist/cjs/models}/Feedback.js +0 -0
- package/{models → dist/cjs/models}/File.d.ts +2 -2
- package/{models → dist/cjs/models}/File.js +0 -0
- package/dist/cjs/models/Marksheet.d.ts +36 -0
- package/{models/MockTest.js → dist/cjs/models/Marksheet.js} +0 -0
- package/{models → dist/cjs/models}/MockTest.d.ts +1 -0
- package/{models/Picture.js → dist/cjs/models/MockTest.js} +0 -0
- package/{models → dist/cjs/models}/OsceMarksheet.d.ts +2 -2
- package/{models → dist/cjs/models}/OsceMarksheet.js +0 -0
- package/{models → dist/cjs/models}/OsceStation.d.ts +11 -9
- package/{models → dist/cjs/models}/OsceStation.js +0 -0
- package/dist/cjs/models/Picture.d.ts +14 -0
- package/{models/Promo.js → dist/cjs/models/Picture.js} +0 -0
- package/{models → dist/cjs/models}/Promo.d.ts +0 -0
- package/{models/Todo.js → dist/cjs/models/Promo.js} +0 -0
- package/{models → dist/cjs/models}/Question.d.ts +27 -2
- package/{models → dist/cjs/models}/Question.js +7 -1
- package/{models → dist/cjs/models}/Subscription.d.ts +0 -0
- package/{models → dist/cjs/models}/Subscription.js +0 -0
- package/{models → dist/cjs/models}/Todo.d.ts +10 -1
- package/{models/Token.js → dist/cjs/models/Todo.js} +0 -0
- package/{models → dist/cjs/models}/Token.d.ts +2 -0
- package/{models/Type.js → dist/cjs/models/Token.js} +0 -0
- package/dist/cjs/models/Topic.d.ts +32 -0
- package/{models → dist/cjs/models}/Topic.js +0 -0
- package/{models → dist/cjs/models}/Type.d.ts +0 -0
- package/{models/University.js → dist/cjs/models/Type.js} +0 -0
- package/{models → dist/cjs/models}/University.d.ts +0 -0
- package/{models/Video.js → dist/cjs/models/University.js} +0 -0
- package/{models → dist/cjs/models}/User.d.ts +34 -20
- package/{models → dist/cjs/models}/User.js +0 -0
- package/{models → dist/cjs/models}/Video.d.ts +1 -0
- package/{resolvers/apollo.js → dist/cjs/models/Video.js} +0 -0
- package/{models → dist/cjs/models}/index.d.ts +0 -0
- package/{models → dist/cjs/models}/index.js +0 -0
- package/dist/cjs/package.json +3 -0
- package/{resolvers → dist/cjs/resolvers}/apollo.d.ts +0 -0
- package/{resolvers/mutation/admin/algoliaSync.js → dist/cjs/resolvers/apollo.js} +0 -0
- package/{resolvers → dist/cjs/resolvers}/fragments/blog.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/fragments/blog.js +0 -0
- package/dist/cjs/resolvers/fragments/chapter.d.ts +1 -0
- package/{resolvers → dist/cjs/resolvers}/fragments/chapter.js +8 -14
- package/{resolvers → dist/cjs/resolvers}/fragments/concept.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/fragments/concept.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/fragments/index.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/fragments/index.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/fragments/osce.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/fragments/osce.js +5 -6
- package/dist/cjs/resolvers/fragments/picture.d.ts +1 -0
- package/dist/cjs/resolvers/fragments/picture.js +22 -0
- package/{resolvers → dist/cjs/resolvers}/fragments/user.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/fragments/user.js +13 -0
- package/{resolvers → dist/cjs/resolvers}/fragments/video.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/fragments/video.js +3 -2
- package/{resolvers → dist/cjs/resolvers}/index.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/index.js +0 -0
- package/dist/cjs/resolvers/mutation/admin/algoliaSync.d.ts +9 -0
- package/{resolvers/mutation/admin/token.js → dist/cjs/resolvers/mutation/admin/algoliaSync.js} +0 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/admin/index.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/admin/index.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/admin/token.d.ts +3 -2
- package/{resolvers/mutation/restricted → dist/cjs/resolvers/mutation/admin}/token.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/index.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/index.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/restricted/agora.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/restricted/agora.js +0 -0
- package/dist/cjs/resolvers/mutation/restricted/contactUs.d.ts +17 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/restricted/contactUs.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/restricted/index.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/restricted/index.js +0 -0
- package/dist/cjs/resolvers/mutation/restricted/marksheet.d.ts +41 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/restricted/marksheet.js +0 -0
- package/dist/cjs/resolvers/mutation/restricted/mockTest.d.ts +16 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/restricted/mockTest.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/restricted/osce.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/restricted/osce.js +0 -0
- package/dist/cjs/resolvers/mutation/restricted/questionDiscussion.d.ts +24 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/restricted/questionDiscussion.js +0 -0
- package/dist/cjs/resolvers/mutation/restricted/todo.d.ts +32 -0
- package/{resolvers/mutation/restricted/video.js → dist/cjs/resolvers/mutation/restricted/todo.js} +0 -0
- package/dist/cjs/resolvers/mutation/restricted/token.d.ts +21 -0
- package/{resolvers/mutation/stripe.js → dist/cjs/resolvers/mutation/restricted/token.js} +0 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/restricted/users.d.ts +5 -8
- package/{resolvers → dist/cjs/resolvers}/mutation/restricted/users.js +0 -0
- package/dist/cjs/resolvers/mutation/restricted/video.d.ts +6 -0
- package/{resolvers/query → dist/cjs/resolvers/mutation}/restricted/video.js +0 -0
- package/dist/cjs/resolvers/mutation/stripe.d.ts +11 -0
- package/{resolvers/mutation/users.js → dist/cjs/resolvers/mutation/stripe.js} +0 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/users.d.ts +5 -4
- package/{resolvers/mutation/validUserToken/user.js → dist/cjs/resolvers/mutation/users.js} +0 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/validUserToken/index.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/mutation/validUserToken/index.js +0 -0
- package/dist/cjs/resolvers/mutation/validUserToken/user.d.ts +14 -0
- package/{resolvers/query/restricted → dist/cjs/resolvers/mutation/validUserToken}/user.js +0 -0
- package/dist/cjs/resolvers/query/admin/getUserToken.d.ts +5 -0
- package/{resolvers → dist/cjs/resolvers}/query/admin/getUserToken.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/query/admin/index.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/query/admin/index.js +0 -0
- package/dist/cjs/resolvers/query/author.d.ts +3 -0
- package/{resolvers → dist/cjs/resolvers}/query/author.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/query/blog.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/query/blog.js +0 -0
- package/dist/cjs/resolvers/query/book.d.ts +8 -0
- package/{resolvers → dist/cjs/resolvers}/query/book.js +0 -0
- package/dist/cjs/resolvers/query/feedback.d.ts +3 -0
- package/{resolvers → dist/cjs/resolvers}/query/feedback.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/query/index.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/query/index.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/query/restricted/index.d.ts +0 -1
- package/{resolvers → dist/cjs/resolvers}/query/restricted/index.js +0 -1
- package/{resolvers → dist/cjs/resolvers}/query/restricted/marksheet.d.ts +8 -8
- package/{resolvers → dist/cjs/resolvers}/query/restricted/marksheet.js +0 -0
- package/dist/cjs/resolvers/query/restricted/mockTests.d.ts +10 -0
- package/{resolvers → dist/cjs/resolvers}/query/restricted/mockTests.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/query/restricted/osce.d.ts +3 -3
- package/{resolvers → dist/cjs/resolvers}/query/restricted/osce.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/query/restricted/quesBook.d.ts +1 -1
- package/{resolvers → dist/cjs/resolvers}/query/restricted/quesBook.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/query/restricted/replication.d.ts +2 -3
- package/{resolvers → dist/cjs/resolvers}/query/restricted/replication.js +6 -6
- package/{resolvers → dist/cjs/resolvers}/query/restricted/todos.d.ts +6 -5
- package/{resolvers → dist/cjs/resolvers}/query/restricted/todos.js +0 -0
- package/dist/cjs/resolvers/query/restricted/topics.d.ts +10 -0
- package/{resolvers → dist/cjs/resolvers}/query/restricted/topics.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/query/restricted/university.d.ts +2 -2
- package/{resolvers → dist/cjs/resolvers}/query/restricted/university.js +0 -0
- package/dist/cjs/resolvers/query/restricted/user.d.ts +13 -0
- package/{resolvers/query → dist/cjs/resolvers/query/restricted}/user.js +0 -0
- package/dist/cjs/resolvers/query/restricted/video.d.ts +11 -0
- package/{resolvers/query → dist/cjs/resolvers/query/restricted}/video.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/query/sample.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/query/sample.js +0 -0
- package/dist/cjs/resolvers/query/subscription.d.ts +3 -0
- package/{resolvers → dist/cjs/resolvers}/query/subscription.js +0 -0
- package/dist/cjs/resolvers/query/university.d.ts +6 -0
- package/{resolvers → dist/cjs/resolvers}/query/university.js +0 -0
- package/dist/cjs/resolvers/query/user.d.ts +13 -0
- package/{resolvers/query/restricted/anatomy.js → dist/cjs/resolvers/query/user.js} +0 -0
- package/dist/cjs/resolvers/query/video.d.ts +15 -0
- package/{resolvers/types.js → dist/cjs/resolvers/query/video.js} +0 -0
- package/{resolvers → dist/cjs/resolvers}/subscription/index.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/subscription/index.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/subscription/osce.d.ts +0 -0
- package/{resolvers → dist/cjs/resolvers}/subscription/osce.js +0 -0
- package/{resolvers → dist/cjs/resolvers}/types.d.ts +0 -0
- package/dist/cjs/resolvers/types.js +2 -0
- package/dist/cjs/types.d.ts +1 -0
- package/{utils → dist/cjs/utils}/commonFunctions.d.ts +0 -0
- package/{utils → dist/cjs/utils}/commonFunctions.js +21 -1
- package/{utils → dist/cjs/utils}/index.d.ts +0 -0
- package/{utils → dist/cjs/utils}/index.js +0 -0
- package/{utils → dist/cjs/utils}/lightgallery.d.ts +0 -0
- package/dist/cjs/utils/lightgallery.js +88 -0
- package/{utils → dist/cjs/utils}/offlineLink.d.ts +0 -0
- package/dist/cjs/utils/offlineLink.js +221 -0
- package/{utils → dist/cjs/utils}/random.d.ts +0 -0
- package/{utils → dist/cjs/utils}/random.js +0 -0
- package/{utils → dist/cjs/utils}/uuid4.d.ts +0 -0
- package/{utils → dist/cjs/utils}/uuid4.js +1 -1
- package/{utils → dist/cjs/utils}/webSocketLink.d.ts +0 -0
- package/{utils → dist/cjs/utils}/webSocketLink.js +1 -1
- package/{utils → dist/cjs/utils}/wordsToNumber.d.ts +0 -0
- package/{utils → dist/cjs/utils}/wordsToNumber.js +0 -0
- package/dist/mjs/gql_input_output_types/User.d.ts +12 -0
- package/{gql_input_output_types/User.mjs → dist/mjs/gql_input_output_types/User.js} +0 -0
- package/dist/mjs/gql_input_output_types/index.d.ts +75 -0
- package/{gql_input_output_types/index.mjs → dist/mjs/gql_input_output_types/index.js} +0 -0
- package/dist/mjs/index.d.ts +22 -0
- package/{index.mjs → dist/mjs/index.js} +0 -0
- package/dist/mjs/models/Author.d.ts +14 -0
- package/{models/Author.mjs → dist/mjs/models/Author.js} +0 -0
- package/dist/mjs/models/Blog.d.ts +15 -0
- package/{models/Blog.mjs → dist/mjs/models/Blog.js} +0 -0
- package/dist/mjs/models/Book.d.ts +22 -0
- package/{models/Book.mjs → dist/mjs/models/Book.js} +0 -0
- package/dist/mjs/models/Card.d.ts +16 -0
- package/{models/Card.mjs → dist/mjs/models/Card.js} +0 -0
- package/dist/mjs/models/Chapter.d.ts +15 -0
- package/{models/Chapter.mjs → dist/mjs/models/Chapter.js} +0 -0
- package/dist/mjs/models/Concept.d.ts +15 -0
- package/{models/Concept.mjs → dist/mjs/models/Concept.js} +0 -0
- package/dist/mjs/models/Difficulty.d.ts +6 -0
- package/{models/Difficulty.mjs → dist/mjs/models/Difficulty.js} +0 -0
- package/dist/mjs/models/Feedback.d.ts +8 -0
- package/{models/Feedback.mjs → dist/mjs/models/Feedback.js} +0 -0
- package/dist/mjs/models/File.d.ts +10 -0
- package/{models/File.mjs → dist/mjs/models/File.js} +0 -0
- package/dist/mjs/models/Marksheet.d.ts +36 -0
- package/{models/MockTest.mjs → dist/mjs/models/Marksheet.js} +0 -0
- package/dist/mjs/models/MockTest.d.ts +22 -0
- package/{models/Picture.mjs → dist/mjs/models/MockTest.js} +0 -0
- package/dist/mjs/models/OsceMarksheet.d.ts +105 -0
- package/{models/OsceMarksheet.mjs → dist/mjs/models/OsceMarksheet.js} +0 -0
- package/dist/mjs/models/OsceStation.d.ts +54 -0
- package/{models/OsceStation.mjs → dist/mjs/models/OsceStation.js} +0 -0
- package/dist/mjs/models/Picture.d.ts +14 -0
- package/{models/Promo.mjs → dist/mjs/models/Picture.js} +0 -0
- package/dist/mjs/models/Promo.d.ts +14 -0
- package/{models/Todo.mjs → dist/mjs/models/Promo.js} +0 -0
- package/dist/mjs/models/Question.d.ts +115 -0
- package/{models/Question.mjs → dist/mjs/models/Question.js} +6 -0
- package/dist/mjs/models/Subscription.d.ts +17 -0
- package/{models/Subscription.mjs → dist/mjs/models/Subscription.js} +0 -0
- package/dist/mjs/models/Todo.d.ts +33 -0
- package/{models/Token.mjs → dist/mjs/models/Todo.js} +0 -0
- package/dist/mjs/models/Token.d.ts +9 -0
- package/{models/Type.mjs → dist/mjs/models/Token.js} +0 -0
- package/dist/mjs/models/Topic.d.ts +32 -0
- package/{models/Topic.mjs → dist/mjs/models/Topic.js} +0 -0
- package/dist/mjs/models/Type.d.ts +7 -0
- package/{models/University.mjs → dist/mjs/models/Type.js} +0 -0
- package/dist/mjs/models/University.d.ts +5 -0
- package/{models/Video.mjs → dist/mjs/models/University.js} +0 -0
- package/dist/mjs/models/User.d.ts +119 -0
- package/{models/User.mjs → dist/mjs/models/User.js} +0 -0
- package/dist/mjs/models/Video.d.ts +26 -0
- package/{resolvers/apollo.mjs → dist/mjs/models/Video.js} +0 -0
- package/{models/index.mjs → dist/mjs/models/index.d.ts} +0 -0
- package/dist/mjs/models/index.js +24 -0
- package/dist/mjs/package.json +3 -0
- package/dist/mjs/resolvers/apollo.d.ts +8 -0
- package/{resolvers/mutation/admin/algoliaSync.mjs → dist/mjs/resolvers/apollo.js} +0 -0
- package/dist/mjs/resolvers/fragments/blog.d.ts +1 -0
- package/{resolvers/fragments/blog.mjs → dist/mjs/resolvers/fragments/blog.js} +0 -0
- package/dist/mjs/resolvers/fragments/chapter.d.ts +1 -0
- package/dist/mjs/resolvers/fragments/chapter.js +22 -0
- package/dist/mjs/resolvers/fragments/concept.d.ts +3 -0
- package/{resolvers/fragments/concept.mjs → dist/mjs/resolvers/fragments/concept.js} +0 -0
- package/{resolvers/fragments/index.mjs → dist/mjs/resolvers/fragments/index.d.ts} +0 -0
- package/dist/mjs/resolvers/fragments/index.js +7 -0
- package/dist/mjs/resolvers/fragments/osce.d.ts +5 -0
- package/{resolvers/fragments/osce.mjs → dist/mjs/resolvers/fragments/osce.js} +6 -7
- package/dist/mjs/resolvers/fragments/picture.d.ts +1 -0
- package/dist/mjs/resolvers/fragments/picture.js +19 -0
- package/dist/mjs/resolvers/fragments/user.d.ts +1 -0
- package/{resolvers/fragments/user.mjs → dist/mjs/resolvers/fragments/user.js} +13 -0
- package/dist/mjs/resolvers/fragments/video.d.ts +2 -0
- package/{resolvers/fragments/video.mjs → dist/mjs/resolvers/fragments/video.js} +4 -3
- package/dist/mjs/resolvers/index.d.ts +12 -0
- package/{resolvers/index.mjs → dist/mjs/resolvers/index.js} +0 -0
- package/dist/mjs/resolvers/mutation/admin/algoliaSync.d.ts +9 -0
- package/{resolvers/mutation/admin/token.mjs → dist/mjs/resolvers/mutation/admin/algoliaSync.js} +0 -0
- package/{resolvers/mutation/admin/index.mjs → dist/mjs/resolvers/mutation/admin/index.d.ts} +0 -0
- package/dist/mjs/resolvers/mutation/admin/index.js +2 -0
- package/dist/mjs/resolvers/mutation/admin/token.d.ts +25 -0
- package/{resolvers/mutation/restricted/contactUs.mjs → dist/mjs/resolvers/mutation/admin/token.js} +0 -0
- package/{resolvers/mutation/index.mjs → dist/mjs/resolvers/mutation/index.d.ts} +0 -0
- package/dist/mjs/resolvers/mutation/index.js +5 -0
- package/dist/mjs/resolvers/mutation/restricted/agora.d.ts +10 -0
- package/{resolvers/mutation/restricted/agora.mjs → dist/mjs/resolvers/mutation/restricted/agora.js} +0 -0
- package/dist/mjs/resolvers/mutation/restricted/contactUs.d.ts +17 -0
- package/{resolvers/mutation/restricted/marksheet.mjs → dist/mjs/resolvers/mutation/restricted/contactUs.js} +0 -0
- package/{resolvers/mutation/restricted/index.mjs → dist/mjs/resolvers/mutation/restricted/index.d.ts} +0 -0
- package/dist/mjs/resolvers/mutation/restricted/index.js +10 -0
- package/dist/mjs/resolvers/mutation/restricted/marksheet.d.ts +41 -0
- package/{resolvers/mutation/restricted/mockTest.mjs → dist/mjs/resolvers/mutation/restricted/marksheet.js} +0 -0
- package/dist/mjs/resolvers/mutation/restricted/mockTest.d.ts +16 -0
- package/{resolvers/mutation/restricted/questionDiscussion.mjs → dist/mjs/resolvers/mutation/restricted/mockTest.js} +0 -0
- package/dist/mjs/resolvers/mutation/restricted/osce.d.ts +87 -0
- package/{resolvers/mutation/restricted/osce.mjs → dist/mjs/resolvers/mutation/restricted/osce.js} +0 -0
- package/dist/mjs/resolvers/mutation/restricted/questionDiscussion.d.ts +24 -0
- package/{resolvers/mutation/restricted/token.mjs → dist/mjs/resolvers/mutation/restricted/questionDiscussion.js} +0 -0
- package/dist/mjs/resolvers/mutation/restricted/todo.d.ts +32 -0
- package/{resolvers/mutation/restricted/video.mjs → dist/mjs/resolvers/mutation/restricted/todo.js} +0 -0
- package/dist/mjs/resolvers/mutation/restricted/token.d.ts +21 -0
- package/{resolvers/mutation/stripe.mjs → dist/mjs/resolvers/mutation/restricted/token.js} +0 -0
- package/dist/mjs/resolvers/mutation/restricted/users.d.ts +29 -0
- package/{resolvers/mutation/restricted/users.mjs → dist/mjs/resolvers/mutation/restricted/users.js} +0 -0
- package/dist/mjs/resolvers/mutation/restricted/video.d.ts +6 -0
- package/{resolvers/mutation/users.mjs → dist/mjs/resolvers/mutation/restricted/video.js} +0 -0
- package/dist/mjs/resolvers/mutation/stripe.d.ts +11 -0
- package/{resolvers/mutation/validUserToken/user.mjs → dist/mjs/resolvers/mutation/stripe.js} +0 -0
- package/dist/mjs/resolvers/mutation/users.d.ts +32 -0
- package/{resolvers/query/admin/getUserToken.mjs → dist/mjs/resolvers/mutation/users.js} +0 -0
- package/{resolvers/mutation/validUserToken/index.mjs → dist/mjs/resolvers/mutation/validUserToken/index.d.ts} +0 -0
- package/dist/mjs/resolvers/mutation/validUserToken/index.js +1 -0
- package/dist/mjs/resolvers/mutation/validUserToken/user.d.ts +14 -0
- package/{resolvers/query/author.mjs → dist/mjs/resolvers/mutation/validUserToken/user.js} +0 -0
- package/dist/mjs/resolvers/query/admin/getUserToken.d.ts +5 -0
- package/{resolvers/query/book.mjs → dist/mjs/resolvers/query/admin/getUserToken.js} +0 -0
- package/{resolvers/query/admin/index.mjs → dist/mjs/resolvers/query/admin/index.d.ts} +0 -0
- package/dist/mjs/resolvers/query/admin/index.js +1 -0
- package/dist/mjs/resolvers/query/author.d.ts +3 -0
- package/{resolvers/query/feedback.mjs → dist/mjs/resolvers/query/author.js} +0 -0
- package/dist/mjs/resolvers/query/blog.d.ts +15 -0
- package/{resolvers/query/blog.mjs → dist/mjs/resolvers/query/blog.js} +0 -0
- package/dist/mjs/resolvers/query/book.d.ts +8 -0
- package/{resolvers/query/restricted/anatomy.mjs → dist/mjs/resolvers/query/book.js} +0 -0
- package/dist/mjs/resolvers/query/feedback.d.ts +3 -0
- package/{resolvers/query/restricted/marksheet.mjs → dist/mjs/resolvers/query/feedback.js} +0 -0
- package/{resolvers/query/index.mjs → dist/mjs/resolvers/query/index.d.ts} +0 -0
- package/dist/mjs/resolvers/query/index.js +11 -0
- package/{resolvers/query/restricted/index.mjs → dist/mjs/resolvers/query/restricted/index.d.ts} +0 -1
- package/dist/mjs/resolvers/query/restricted/index.js +10 -0
- package/dist/mjs/resolvers/query/restricted/marksheet.d.ts +61 -0
- package/{resolvers/query/restricted/mockTests.mjs → dist/mjs/resolvers/query/restricted/marksheet.js} +0 -0
- package/dist/mjs/resolvers/query/restricted/mockTests.d.ts +10 -0
- package/{resolvers/query/restricted/todos.mjs → dist/mjs/resolvers/query/restricted/mockTests.js} +0 -0
- package/dist/mjs/resolvers/query/restricted/osce.d.ts +45 -0
- package/{resolvers/query/restricted/osce.mjs → dist/mjs/resolvers/query/restricted/osce.js} +0 -0
- package/dist/mjs/resolvers/query/restricted/quesBook.d.ts +7 -0
- package/{resolvers/query/restricted/quesBook.mjs → dist/mjs/resolvers/query/restricted/quesBook.js} +0 -0
- package/dist/mjs/resolvers/query/restricted/replication.d.ts +32 -0
- package/{resolvers/query/restricted/replication.mjs → dist/mjs/resolvers/query/restricted/replication.js} +6 -6
- package/dist/mjs/resolvers/query/restricted/todos.d.ts +29 -0
- package/{resolvers/query/restricted/topics.mjs → dist/mjs/resolvers/query/restricted/todos.js} +0 -0
- package/dist/mjs/resolvers/query/restricted/topics.d.ts +10 -0
- package/{resolvers/query/restricted/university.mjs → dist/mjs/resolvers/query/restricted/topics.js} +0 -0
- package/dist/mjs/resolvers/query/restricted/university.d.ts +15 -0
- package/{resolvers/query/restricted/user.mjs → dist/mjs/resolvers/query/restricted/university.js} +0 -0
- package/dist/mjs/resolvers/query/restricted/user.d.ts +13 -0
- package/{resolvers/query/restricted/video.mjs → dist/mjs/resolvers/query/restricted/user.js} +0 -0
- package/dist/mjs/resolvers/query/restricted/video.d.ts +11 -0
- package/{resolvers/query/subscription.mjs → dist/mjs/resolvers/query/restricted/video.js} +0 -0
- package/dist/mjs/resolvers/query/sample.d.ts +26 -0
- package/{resolvers/query/sample.mjs → dist/mjs/resolvers/query/sample.js} +0 -0
- package/dist/mjs/resolvers/query/subscription.d.ts +3 -0
- package/{resolvers/query/university.mjs → dist/mjs/resolvers/query/subscription.js} +0 -0
- package/dist/mjs/resolvers/query/university.d.ts +6 -0
- package/{resolvers/query/user.mjs → dist/mjs/resolvers/query/university.js} +0 -0
- package/dist/mjs/resolvers/query/user.d.ts +13 -0
- package/{resolvers/query/video.mjs → dist/mjs/resolvers/query/user.js} +0 -0
- package/dist/mjs/resolvers/query/video.d.ts +15 -0
- package/{resolvers/types.mjs → dist/mjs/resolvers/query/video.js} +0 -0
- package/{resolvers/subscription/index.mjs → dist/mjs/resolvers/subscription/index.d.ts} +0 -0
- package/dist/mjs/resolvers/subscription/index.js +1 -0
- package/dist/mjs/resolvers/subscription/osce.d.ts +66 -0
- package/{resolvers/subscription/osce.mjs → dist/mjs/resolvers/subscription/osce.js} +0 -0
- package/dist/mjs/resolvers/types.d.ts +10 -0
- package/dist/mjs/resolvers/types.js +1 -0
- package/dist/mjs/types.d.ts +1 -0
- package/dist/mjs/utils/commonFunctions.d.ts +9 -0
- package/{utils/commonFunctions.mjs → dist/mjs/utils/commonFunctions.js} +21 -1
- package/dist/mjs/utils/index.d.ts +9 -0
- package/{utils/index.mjs → dist/mjs/utils/index.js} +0 -0
- package/dist/mjs/utils/lightgallery.d.ts +9 -0
- package/dist/mjs/utils/lightgallery.js +84 -0
- package/dist/mjs/utils/offlineLink.d.ts +64 -0
- package/dist/mjs/utils/offlineLink.js +220 -0
- package/dist/mjs/utils/random.d.ts +1 -0
- package/{utils/random.mjs → dist/mjs/utils/random.js} +0 -0
- package/dist/mjs/utils/uuid4.d.ts +107 -0
- package/{utils/uuid4.mjs → dist/mjs/utils/uuid4.js} +73 -73
- package/dist/mjs/utils/webSocketLink.d.ts +7 -0
- package/{utils/webSocketLink.mjs → dist/mjs/utils/webSocketLink.js} +2 -1
- package/dist/mjs/utils/wordsToNumber.d.ts +1 -0
- package/{utils/wordsToNumber.mjs → dist/mjs/utils/wordsToNumber.js} +0 -0
- package/package.json +109 -14
- package/models/Marksheet.d.ts +0 -47
- package/models/Marksheet.js +0 -9
- package/models/Marksheet.mjs +0 -6
- package/models/Picture.d.ts +0 -47
- package/models/Topic.d.ts +0 -17
- package/resolvers/fragments/chapter.d.ts +0 -2
- package/resolvers/fragments/chapter.mjs +0 -28
- package/resolvers/fragments/picture.d.ts +0 -3
- package/resolvers/fragments/picture.js +0 -44
- package/resolvers/fragments/picture.mjs +0 -41
- package/resolvers/mutation/admin/algoliaSync.d.ts +0 -10
- package/resolvers/mutation/restricted/contactUs.d.ts +0 -16
- package/resolvers/mutation/restricted/marksheet.d.ts +0 -43
- package/resolvers/mutation/restricted/mockTest.d.ts +0 -15
- package/resolvers/mutation/restricted/questionDiscussion.d.ts +0 -28
- package/resolvers/mutation/restricted/todo.d.ts +0 -48
- package/resolvers/mutation/restricted/todo.js +0 -29
- package/resolvers/mutation/restricted/todo.mjs +0 -25
- package/resolvers/mutation/restricted/token.d.ts +0 -21
- package/resolvers/mutation/restricted/video.d.ts +0 -8
- package/resolvers/mutation/stripe.d.ts +0 -10
- package/resolvers/mutation/validUserToken/user.d.ts +0 -8
- package/resolvers/query/admin/getUserToken.d.ts +0 -4
- package/resolvers/query/author.d.ts +0 -3
- package/resolvers/query/book.d.ts +0 -6
- package/resolvers/query/feedback.d.ts +0 -3
- package/resolvers/query/restricted/anatomy.d.ts +0 -3
- package/resolvers/query/restricted/mockTests.d.ts +0 -10
- package/resolvers/query/restricted/topics.d.ts +0 -20
- package/resolvers/query/restricted/user.d.ts +0 -25
- package/resolvers/query/restricted/video.d.ts +0 -10
- package/resolvers/query/subscription.d.ts +0 -3
- package/resolvers/query/university.d.ts +0 -5
- package/resolvers/query/user.d.ts +0 -12
- package/resolvers/query/video.d.ts +0 -14
- package/utils/lightgallery.js +0 -91
- package/utils/lightgallery.mjs +0 -87
- package/utils/offlineLink.js +0 -237
- package/utils/offlineLink.mjs +0 -230
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IOsceStation, ITopic } from '../../../models';
|
|
2
2
|
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
3
3
|
export declare type IQuesBookVar = null;
|
|
4
|
-
export declare type IQuesBookData = ITopic[]
|
|
4
|
+
export declare type IQuesBookData = RestrictedData<(graphqlNormalize & ITopic)[], 'quesBook'>;
|
|
5
5
|
export declare const OSCE_BOOK: import("@apollo/client").DocumentNode;
|
|
6
6
|
export declare type IOsceBookVar = null;
|
|
7
7
|
export declare type IOsceBookData = RestrictedData<(graphqlNormalize & IOsceStation)[], 'osceBook'>;
|
|
File without changes
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IOsceStation, IQuestion } from './../../../models';
|
|
2
|
-
import { ITopicInfo } from './topics';
|
|
1
|
+
import { IOsceStation, IQuestion, ITopic } from './../../../models';
|
|
3
2
|
interface IQueryBuilder {
|
|
4
3
|
query: string;
|
|
5
4
|
variables: IReplicationVar;
|
|
@@ -11,7 +10,7 @@ interface IReplicationVar {
|
|
|
11
10
|
}
|
|
12
11
|
export interface ITopicReplicationVar extends IReplicationVar {
|
|
13
12
|
}
|
|
14
|
-
export interface ITopicReplicationData extends
|
|
13
|
+
export interface ITopicReplicationData extends ITopic {
|
|
15
14
|
updatedAt: number;
|
|
16
15
|
deleted: boolean;
|
|
17
16
|
}
|
|
@@ -21,8 +21,8 @@ const pullTopicQueryBuilder = (doc) => {
|
|
|
21
21
|
return {
|
|
22
22
|
query: topicReplicationQuery,
|
|
23
23
|
variables: {
|
|
24
|
-
lastId:
|
|
25
|
-
minUpdatedAt:
|
|
24
|
+
lastId: doc?.id ? doc.id.toString() : '0',
|
|
25
|
+
minUpdatedAt: doc?.updatedAt ? doc.updatedAt : 0,
|
|
26
26
|
limit: REPLICATION_LIMIT,
|
|
27
27
|
},
|
|
28
28
|
};
|
|
@@ -92,8 +92,8 @@ const pullQuestionQueryBuilder = (doc) => {
|
|
|
92
92
|
return {
|
|
93
93
|
query: questionReplicationQuery,
|
|
94
94
|
variables: {
|
|
95
|
-
lastId:
|
|
96
|
-
minUpdatedAt:
|
|
95
|
+
lastId: doc?.id ? doc.id.toString() : '0',
|
|
96
|
+
minUpdatedAt: doc?.updatedAt ? doc.updatedAt : 0,
|
|
97
97
|
limit: REPLICATION_LIMIT,
|
|
98
98
|
},
|
|
99
99
|
};
|
|
@@ -175,8 +175,8 @@ const pullOsceStationQueryBuilder = (doc) => {
|
|
|
175
175
|
return {
|
|
176
176
|
query: osceStationReplicationQuery,
|
|
177
177
|
variables: {
|
|
178
|
-
lastId:
|
|
179
|
-
minUpdatedAt:
|
|
178
|
+
lastId: doc?.id ? doc.id.toString() : '0',
|
|
179
|
+
minUpdatedAt: doc?.updatedAt ? doc.updatedAt : 0,
|
|
180
180
|
limit: REPLICATION_LIMIT,
|
|
181
181
|
},
|
|
182
182
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Id, IPreBuildTodo, ITodo } from '../../../models';
|
|
2
|
+
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
2
3
|
export interface IPreBuildTodoVar {
|
|
3
4
|
topics: number[];
|
|
4
5
|
conceptIds: number[];
|
|
@@ -6,11 +7,11 @@ export interface IPreBuildTodoVar {
|
|
|
6
7
|
source: string;
|
|
7
8
|
filterOlderCard: boolean;
|
|
8
9
|
}
|
|
9
|
-
export declare type IPreBuildTodoData = IPreBuildTodo
|
|
10
|
-
export interface
|
|
11
|
-
|
|
10
|
+
export declare type IPreBuildTodoData = RestrictedData<graphqlNormalize & IPreBuildTodo, 'preBuildTodo'>;
|
|
11
|
+
export interface ITodoVar {
|
|
12
|
+
id: Id;
|
|
12
13
|
}
|
|
13
|
-
export declare type
|
|
14
|
+
export declare type ITodoData = RestrictedData<graphqlNormalize & ITodo, 'todo'>;
|
|
14
15
|
export declare type IDailyFeedVar = null;
|
|
15
16
|
interface IDailyFeedTopicInfo {
|
|
16
17
|
name: string;
|
|
@@ -24,5 +25,5 @@ export interface IDailyFeed {
|
|
|
24
25
|
confidentCard: number;
|
|
25
26
|
reviewCard: number;
|
|
26
27
|
}
|
|
27
|
-
export declare type IDailyFeedData = IDailyFeed
|
|
28
|
+
export declare type IDailyFeedData = RestrictedData<graphqlNormalize & IDailyFeed, 'dailyFeed'>;
|
|
28
29
|
export {};
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ETopicType, Id, ITopic } from '../../../models';
|
|
2
|
+
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
3
|
+
export interface ITopicVar {
|
|
4
|
+
id: Id;
|
|
5
|
+
}
|
|
6
|
+
export declare type ITopicData = RestrictedData<graphqlNormalize & ITopic, 'topic'>;
|
|
7
|
+
export interface ITopicsVar {
|
|
8
|
+
filter: ETopicType;
|
|
9
|
+
}
|
|
10
|
+
export declare type ITopicsData = RestrictedData<(graphqlNormalize & ITopic)[], 'topics'>;
|
|
File without changes
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
1
2
|
export interface IUniversityLeaderboardVar {
|
|
2
3
|
limit: number;
|
|
3
4
|
}
|
|
@@ -11,5 +12,4 @@ export interface IUniversityLeaderboard {
|
|
|
11
12
|
month: IUniversitiesRankSpeciality[];
|
|
12
13
|
quarter: IUniversitiesRankSpeciality[];
|
|
13
14
|
}
|
|
14
|
-
export
|
|
15
|
-
}
|
|
15
|
+
export declare type IUniversityLeaderboardData = RestrictedData<graphqlNormalize & IUniversityLeaderboard, 'universityLeaderboard'>;
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IUser } from '../../../models';
|
|
2
|
+
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
3
|
+
export declare type IDashboardUserVar = null;
|
|
4
|
+
export declare type IDashboardUserData = RestrictedData<graphqlNormalize & IUser, 'dashboardUser'>;
|
|
5
|
+
export declare type IUserVar = null;
|
|
6
|
+
export declare type IUserData = RestrictedData<graphqlNormalize & IUser, 'user'>;
|
|
7
|
+
export declare type IDailyProgressVar = null;
|
|
8
|
+
export interface IDailyProgressInfo {
|
|
9
|
+
totalCount: number;
|
|
10
|
+
totalTrue: number;
|
|
11
|
+
dateString: string;
|
|
12
|
+
}
|
|
13
|
+
export declare type IDailyProgressData = RestrictedData<(graphqlNormalize & IDailyProgressInfo)[], 'dailyProgress'>;
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Id, IVideo } from '../../../models';
|
|
2
|
+
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
3
|
+
export interface IVideoVar {
|
|
4
|
+
id: Id;
|
|
5
|
+
}
|
|
6
|
+
export declare type IVideoData = RestrictedData<graphqlNormalize & IVideo, 'video'>;
|
|
7
|
+
export interface IVideosVar {
|
|
8
|
+
filter: 'new' | 'popular' | 'personal' | 'live' | 'osce';
|
|
9
|
+
limit: number;
|
|
10
|
+
}
|
|
11
|
+
export declare type IVideosData = RestrictedData<(graphqlNormalize & IVideo)[], 'videos'>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RootData } from '../types';
|
|
2
|
+
export interface IUsernameAvailableVar {
|
|
3
|
+
username: string;
|
|
4
|
+
}
|
|
5
|
+
export declare type IUsernameAvailableData = RootData<boolean, 'usernameAvailable'>;
|
|
6
|
+
export interface IUsernameProvisionedVar {
|
|
7
|
+
username: string;
|
|
8
|
+
}
|
|
9
|
+
export declare type IUsernameProvisionedData = RootData<boolean, 'usernameProvisioned'>;
|
|
10
|
+
export interface IValidateResetPasswordTokenVar {
|
|
11
|
+
token: string;
|
|
12
|
+
}
|
|
13
|
+
export declare type IValidateResetPasswordTokenData = RootData<string, 'validateResetPasswordToken'>;
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Id, IVideo } from '../../models';
|
|
2
|
+
import { graphqlNormalize, RootData } from '../types';
|
|
3
|
+
export interface IVideosVar {
|
|
4
|
+
filter: 'new' | 'popular' | 'personal' | 'live';
|
|
5
|
+
limit: number;
|
|
6
|
+
}
|
|
7
|
+
export declare type IVideosData = RootData<(graphqlNormalize & IVideo)[], 'videos'>;
|
|
8
|
+
export interface IVideoVar {
|
|
9
|
+
id: Id;
|
|
10
|
+
}
|
|
11
|
+
export declare type IVideoData = RootData<graphqlNormalize & IVideo, 'video'>;
|
|
12
|
+
export interface IZoomSignatureVar {
|
|
13
|
+
meetingNumber: string;
|
|
14
|
+
}
|
|
15
|
+
export declare type IZoomSignatureData = RootData<graphqlNormalize & string, 'zoomSignature'>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'fmt-obj';
|
|
File without changes
|
|
@@ -35,7 +35,27 @@ function mapPrescribeMarkToAnswer(obj) {
|
|
|
35
35
|
}
|
|
36
36
|
exports.mapPrescribeMarkToAnswer = mapPrescribeMarkToAnswer;
|
|
37
37
|
function formatPrescribeAnswer(baseAnswer) {
|
|
38
|
-
const obj =
|
|
38
|
+
const obj = {
|
|
39
|
+
...baseAnswer,
|
|
40
|
+
drug: {
|
|
41
|
+
...baseAnswer.drug,
|
|
42
|
+
},
|
|
43
|
+
dose: {
|
|
44
|
+
...baseAnswer.dose,
|
|
45
|
+
},
|
|
46
|
+
units: {
|
|
47
|
+
...baseAnswer.units,
|
|
48
|
+
},
|
|
49
|
+
route: {
|
|
50
|
+
...baseAnswer.route,
|
|
51
|
+
},
|
|
52
|
+
frequency: {
|
|
53
|
+
...baseAnswer.frequency,
|
|
54
|
+
},
|
|
55
|
+
duration: {
|
|
56
|
+
...baseAnswer.duration,
|
|
57
|
+
},
|
|
58
|
+
};
|
|
39
59
|
obj.drug.value = obj.drug.value.toLowerCase().replace(/\s/g, '');
|
|
40
60
|
obj.route.value = obj.route.value
|
|
41
61
|
.toLowerCase()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lightgalleryOsceResolve = void 0;
|
|
4
|
+
const lightgalleryRegex = /\[lightgallery\]/;
|
|
5
|
+
function isOsceMarksheet(data) {
|
|
6
|
+
return 'osceStationId' in data;
|
|
7
|
+
}
|
|
8
|
+
async function lightgalleryOsceResolve(data, cache) {
|
|
9
|
+
let station;
|
|
10
|
+
if (isOsceMarksheet(data)) {
|
|
11
|
+
if (!data.osceStation) {
|
|
12
|
+
throw new Error('OsceStation not found on OsceMarksheet');
|
|
13
|
+
}
|
|
14
|
+
station = data.osceStation;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
station = data;
|
|
18
|
+
}
|
|
19
|
+
const upOsceStation = {
|
|
20
|
+
candidateBrief: station.candidateBrief,
|
|
21
|
+
actorBrief: station.actorBrief,
|
|
22
|
+
examinerBrief: station.examinerBrief,
|
|
23
|
+
explanation: station.explanation,
|
|
24
|
+
};
|
|
25
|
+
if (station.candidatePictures && station.candidatePictures.length > 0) {
|
|
26
|
+
upOsceStation.candidateBrief = await lightgalleryMutation(upOsceStation.candidateBrief, station.candidatePictures, cache);
|
|
27
|
+
}
|
|
28
|
+
if (station.actorPictures && station.actorPictures.length > 0) {
|
|
29
|
+
upOsceStation.actorBrief = await lightgalleryMutation(upOsceStation.actorBrief, station.actorPictures, cache);
|
|
30
|
+
}
|
|
31
|
+
if (station.examinerPictures && station.examinerPictures.length > 0) {
|
|
32
|
+
upOsceStation.examinerBrief = await lightgalleryMutation(upOsceStation.examinerBrief, station.examinerPictures, cache);
|
|
33
|
+
}
|
|
34
|
+
if (station.walkthroughPictures && station.walkthroughPictures.length > 0) {
|
|
35
|
+
upOsceStation.explanation = await lightgalleryMutation(upOsceStation.explanation, station.walkthroughPictures, cache);
|
|
36
|
+
}
|
|
37
|
+
if (isOsceMarksheet(data)) {
|
|
38
|
+
return {
|
|
39
|
+
...data,
|
|
40
|
+
osceStation: {
|
|
41
|
+
...data.osceStation,
|
|
42
|
+
...upOsceStation,
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
return {
|
|
48
|
+
...data,
|
|
49
|
+
...upOsceStation,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.lightgalleryOsceResolve = lightgalleryOsceResolve;
|
|
54
|
+
const lightgalleryMutation = async (text, pictures, cache) => {
|
|
55
|
+
if (pictures.length === 0) {
|
|
56
|
+
return text;
|
|
57
|
+
}
|
|
58
|
+
const picturesHTML = [];
|
|
59
|
+
for (const picture of pictures) {
|
|
60
|
+
const pic = picture.path;
|
|
61
|
+
const uri = `https://app.quesmed.com/${pic}`;
|
|
62
|
+
let file = '';
|
|
63
|
+
if (cache) {
|
|
64
|
+
try {
|
|
65
|
+
const localPath = await cache.CacheManager.get(uri, {}).getPath();
|
|
66
|
+
if (localPath) {
|
|
67
|
+
file =
|
|
68
|
+
cache.Platform.OS === 'ios'
|
|
69
|
+
? localPath.replace('file://', '')
|
|
70
|
+
: localPath;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
catch (e) {
|
|
74
|
+
console.error(e);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (picture.caption?.length > 0) {
|
|
78
|
+
picturesHTML.push(``);
|
|
79
|
+
}
|
|
80
|
+
picturesHTML.push(``);
|
|
81
|
+
}
|
|
82
|
+
if (lightgalleryRegex.test(text)) {
|
|
83
|
+
return text.replace(lightgalleryRegex, picturesHTML[0]);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
return text + '\n\n' + picturesHTML[0] + '\n';
|
|
87
|
+
}
|
|
88
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.OfflineLink = void 0;
|
|
7
|
+
const client_1 = require("@apollo/client");
|
|
8
|
+
const uuid4_1 = __importDefault(require("./uuid4"));
|
|
9
|
+
class OfflineLink extends client_1.ApolloLink {
|
|
10
|
+
/**
|
|
11
|
+
* storage
|
|
12
|
+
* Provider that will persist the mutation queue. This can be any AsyncStorage compatible storage instance.
|
|
13
|
+
*
|
|
14
|
+
* retryInterval
|
|
15
|
+
* Milliseconds between attempts to retry failed mutations. Defaults to 0, which disables automatic retry.
|
|
16
|
+
*
|
|
17
|
+
* sequential
|
|
18
|
+
* Indicates if the attempts should be retried in order. Defaults to false which retries all failed mutations in parallel.
|
|
19
|
+
*
|
|
20
|
+
* retryOnServerError
|
|
21
|
+
* Indicates if mutations should be reattempted if there are server side errors, useful to retry mutations on session expiration. Defaults to false.
|
|
22
|
+
*/
|
|
23
|
+
constructor({ storage, retryInterval = 0, sequential = false, retryOnServerError = false, }) {
|
|
24
|
+
super();
|
|
25
|
+
this.queue = new Map();
|
|
26
|
+
this.prefix = 'offlineLink:';
|
|
27
|
+
if (!storage) {
|
|
28
|
+
throw new Error('Storage is required, it can be an AsyncStorage compatible storage instance.');
|
|
29
|
+
}
|
|
30
|
+
this.storage = storage;
|
|
31
|
+
this.sequential = sequential;
|
|
32
|
+
this.retryInterval = retryInterval;
|
|
33
|
+
this.retryOnServerError = retryOnServerError;
|
|
34
|
+
}
|
|
35
|
+
request(operation, forward) {
|
|
36
|
+
const context = operation.getContext();
|
|
37
|
+
const { query, variables } = operation || {};
|
|
38
|
+
if (!context.optimisticResponse) {
|
|
39
|
+
// If the mutation does not have an optimisticResponse then we can't defer it
|
|
40
|
+
return forward(operation);
|
|
41
|
+
}
|
|
42
|
+
return new client_1.Observable((observer) => {
|
|
43
|
+
const mutationId = uuid4_1.default.asBase64();
|
|
44
|
+
this.add({
|
|
45
|
+
mutation: query,
|
|
46
|
+
variables,
|
|
47
|
+
optimisticResponse: context.optimisticResponse,
|
|
48
|
+
}, mutationId);
|
|
49
|
+
const subscription = forward(operation).subscribe({
|
|
50
|
+
next: (result) => {
|
|
51
|
+
this.remove(mutationId);
|
|
52
|
+
observer.next(result);
|
|
53
|
+
},
|
|
54
|
+
error: () => {
|
|
55
|
+
// Mutation failed so we try again after a certain amount of time.
|
|
56
|
+
this.delayedSync();
|
|
57
|
+
// Resolve the mutation with the optimistic response so the UI can be updated
|
|
58
|
+
observer.next({
|
|
59
|
+
data: context.optimisticResponse,
|
|
60
|
+
dataPresent: true,
|
|
61
|
+
errors: [],
|
|
62
|
+
});
|
|
63
|
+
// Say we're all done so the UI is re-rendered.
|
|
64
|
+
observer.complete();
|
|
65
|
+
},
|
|
66
|
+
complete: () => observer.complete(),
|
|
67
|
+
});
|
|
68
|
+
return () => {
|
|
69
|
+
subscription.unsubscribe();
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Obtains the queue of mutations that must be sent to the server.
|
|
75
|
+
* These are kept in a Map to preserve the order of the mutations in the queue.
|
|
76
|
+
*/
|
|
77
|
+
async getQueue() {
|
|
78
|
+
const map = new Map();
|
|
79
|
+
try {
|
|
80
|
+
const storedMutations = await this.storage.getItem(this.prefix + 'Mutations');
|
|
81
|
+
if (!storedMutations) {
|
|
82
|
+
return map;
|
|
83
|
+
}
|
|
84
|
+
const mutationIds = storedMutations.split(',');
|
|
85
|
+
for (const mutationId of mutationIds) {
|
|
86
|
+
const storedMutation = await this.storage.getItem(this.prefix + mutationId);
|
|
87
|
+
if (!storedMutation) {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
map.set(mutationId, JSON.parse(storedMutation));
|
|
91
|
+
}
|
|
92
|
+
return map;
|
|
93
|
+
}
|
|
94
|
+
catch (e) {
|
|
95
|
+
console.error(e);
|
|
96
|
+
return map;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Persist the queue so mutations can be retried at a later point in time.
|
|
101
|
+
*/
|
|
102
|
+
async saveQueue(mutationId, mutation) {
|
|
103
|
+
try {
|
|
104
|
+
if (mutationId && mutation) {
|
|
105
|
+
await this.storage.setItem(this.prefix + mutationId, JSON.stringify(mutation));
|
|
106
|
+
}
|
|
107
|
+
await this.storage.setItem(this.prefix + 'Mutations', [...this.queue.keys()].join());
|
|
108
|
+
}
|
|
109
|
+
catch (e) {
|
|
110
|
+
console.error(e);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Add a mutation attempt to the queue so that it can be retried at a later point in time.
|
|
115
|
+
*/
|
|
116
|
+
async add(item, mutationId) {
|
|
117
|
+
// We give the mutation attempt a random id so that it is easy to remove when needed (in sync loop)
|
|
118
|
+
if (!mutationId) {
|
|
119
|
+
mutationId = uuid4_1.default.asBase64();
|
|
120
|
+
}
|
|
121
|
+
this.queue.set(mutationId, item);
|
|
122
|
+
await this.saveQueue(mutationId, item);
|
|
123
|
+
return mutationId;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Remove a mutation attempt from the queue.
|
|
127
|
+
*/
|
|
128
|
+
async remove(mutationId) {
|
|
129
|
+
this.queue.delete(mutationId);
|
|
130
|
+
await this.storage.removeItem(this.prefix + mutationId);
|
|
131
|
+
await this.saveQueue();
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Takes the mutations in the queue and try to send them to the server again.
|
|
135
|
+
*/
|
|
136
|
+
async sync() {
|
|
137
|
+
if (!this.client) {
|
|
138
|
+
throw new Error('Offline Link not setup with ApolloClient');
|
|
139
|
+
}
|
|
140
|
+
if (this.queue.size === 0) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const attempts = Array.from(this.queue);
|
|
144
|
+
if (this.sequential) {
|
|
145
|
+
for (const [mutationId, attempt] of attempts) {
|
|
146
|
+
let serverProcessed = false;
|
|
147
|
+
try {
|
|
148
|
+
await this.client.mutate({
|
|
149
|
+
...attempt,
|
|
150
|
+
optimisticResponse: undefined,
|
|
151
|
+
});
|
|
152
|
+
serverProcessed = true;
|
|
153
|
+
}
|
|
154
|
+
catch (e) {
|
|
155
|
+
const err = e;
|
|
156
|
+
const networkError = err.networkError;
|
|
157
|
+
if (!this.retryOnServerError && networkError?.response) {
|
|
158
|
+
// There are GraphQL errors, which means the server processed the request so we can remove the mutation from the queue
|
|
159
|
+
serverProcessed = true;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (serverProcessed) {
|
|
163
|
+
try {
|
|
164
|
+
await this.remove(mutationId);
|
|
165
|
+
}
|
|
166
|
+
catch (e) {
|
|
167
|
+
console.error(e);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
await Promise.all(attempts.map(async ([mutationId, attempt]) => {
|
|
174
|
+
let serverProcessed = false;
|
|
175
|
+
try {
|
|
176
|
+
await this.client?.mutate({
|
|
177
|
+
...attempt,
|
|
178
|
+
optimisticResponse: undefined,
|
|
179
|
+
});
|
|
180
|
+
serverProcessed = true;
|
|
181
|
+
}
|
|
182
|
+
catch (e) {
|
|
183
|
+
const err = e;
|
|
184
|
+
const networkError = err.networkError;
|
|
185
|
+
if (!this.retryOnServerError && networkError?.response) {
|
|
186
|
+
serverProcessed = true;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (serverProcessed) {
|
|
190
|
+
await this.remove(mutationId);
|
|
191
|
+
}
|
|
192
|
+
}));
|
|
193
|
+
}
|
|
194
|
+
// Remaining mutations in the queue are persisted
|
|
195
|
+
await this.saveQueue();
|
|
196
|
+
if (this.queue.size !== 0 || this.retryInterval !== 0) {
|
|
197
|
+
this.delayedSync();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Runs sync() after the retryInterval
|
|
202
|
+
*/
|
|
203
|
+
delayedSync() {
|
|
204
|
+
if (this.retryInterval === 0) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
if (this.timeoutId) {
|
|
208
|
+
clearTimeout(this.timeoutId);
|
|
209
|
+
}
|
|
210
|
+
this.timeoutId = setTimeout(() => this.sync, this.retryInterval);
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Configure the link to use Apollo Client and immediately try to sync the queue (if there's anything there).
|
|
214
|
+
*/
|
|
215
|
+
async setup(client) {
|
|
216
|
+
this.client = client;
|
|
217
|
+
this.queue = await this.getQueue();
|
|
218
|
+
await this.sync();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
exports.OfflineLink = OfflineLink;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -182,7 +182,7 @@ class Uuid4 {
|
|
|
182
182
|
* @private
|
|
183
183
|
*/
|
|
184
184
|
static _asBinString(data) {
|
|
185
|
-
let binArray = data
|
|
185
|
+
let binArray = data ?? Uuid4._getRandomArray();
|
|
186
186
|
if (16 !== binArray.length) {
|
|
187
187
|
const mess = `Expected data array length of 16 but was given length: ${binArray.length}`;
|
|
188
188
|
throw new RangeError(mess);
|
|
File without changes
|
|
@@ -11,7 +11,7 @@ class WebSocketLink extends core_1.ApolloLink {
|
|
|
11
11
|
}
|
|
12
12
|
request(operation) {
|
|
13
13
|
return new core_1.Observable((sink) => {
|
|
14
|
-
return this.client.subscribe(
|
|
14
|
+
return this.client.subscribe({ ...operation, query: (0, graphql_1.print)(operation.query) }, {
|
|
15
15
|
next: sink.next.bind(sink),
|
|
16
16
|
complete: sink.complete.bind(sink),
|
|
17
17
|
error: sink.error.bind(sink),
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ILoginUserRes {
|
|
2
|
+
token: string;
|
|
3
|
+
stripeCustomerPortalUrl: string;
|
|
4
|
+
message: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IWithToken {
|
|
7
|
+
token: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ILoginWithExpiredSupportRes {
|
|
10
|
+
activeUser: IWithToken | null;
|
|
11
|
+
expiredUser: IWithToken | null;
|
|
12
|
+
}
|
|
File without changes
|